GradNet documentation
GradNet is a PyTorch-based framework for AI-enabled optimization of networks. Define static or dynamical objectives and constraints, then discover the optimal network structures.
It encodes the network structure as a differentiable object with optional budget and structure constraints. It lets the users directly optimize static objectives using a lightweight PyTorch Lightning training loop. Alternatively, built-in ODE solvers can be used to define and optimize dynamical objectives.
Illustration of the gradient-based optimization pipeline for network structures.
A random network rewires itself with GradNet to optimize synchronization in the Kuramoto model.
Installation
pip install gradnet
Quick links
GradNet – differentiable adjacency matrix model.
fit – wrap your loss in a single-call trainer built on PyTorch Lightning.
integrate_ode – integrate GradNet-defined ODEs into control or simulation workflows.