Skip to main content
Back

Lyapunov Stability Theory Makes Graph Neural Networks Resist Adversarial Attacks by 25%

A new framework borrows Lyapunov stability from control theory to make graph neural networks provably resilient against adversarial attacks on nodes and edges.

Pro

Paper, Full Access
  • New framework applies Lyapunov stability theory to graph neural flows for provable adversarial robustness.
  • Learnable Lyapunov function built from an input-convex neural network projects dynamics into a stable half-space.
  • Supports both integer-order and fractional-order flows including GRAND, GraphBel, and GraphCON as base models.
  • FL-GRAND on Cora gains roughly 24% accuracy under PGD, TDGIA, and MetaGIA injection attacks.
  • Orthogonal to adversarial training; combining both adds another 4.25% under white-box PGD on Citeseer.
  • Code released at anonymous.4open.science/r/test-LSGNF; small training-time overhead versus base flows.

Graph neural networks power everything from recommendation engines to molecular property prediction, but they share an uncomfortable trait with the rest of deep learning: tiny, targeted perturbations to a graph can wreck their predictions. A new paper proposes fixing this at the level of the dynamics itself, by borrowing Lyapunov stability theory from control engineering and grafting it onto continuous-time GNNs.

The result is a family of models the authors call Lyapunov-stable graph neural flows, in both integer-order and fractional-order variants. They come with provable stability guarantees, work as a drop-in module on top of several existing GNN dynamics, and can be stacked with adversarial training for extra robustness.

Why GNNs keep falling over

Adversarial examples, first introduced in computer vision, involve imperceptible perturbations to inputs that cause misclassifications, and researchers have demonstrated that GNNs are similarly susceptible to attacks on the graph. On graphs the attack surface is wider: an adversary can flip edges, tweak node features, or inject fake nodes.

Existing defenses fall into two camps. Reactive methods try to detect or denoise perturbations at inference. Proactive methods retrain the network with adversarial samples or bake in constraints like Lipschitz bounds. Both work, but adversarial training is expensive and purification adds a fragile preprocessing stage.

A more recent line of work treats GNNs as continuous dynamical systems. GRAND formulates information propagation as a heat diffusion equation, GRAND++ extends it with a source term, GREAD introduces a reaction term, and GraphCON uses a second-order ODE. Viewing message passing as an ODE opens the door to tools from physics and control theory, including the one at the heart of this paper.

The Lyapunov trick, in plain terms

A Lyapunov function is an abstract energy that a stable system dissipates over time. If you can construct one whose value only ever decreases along the trajectory of your dynamics, the system provably converges to an equilibrium and small kicks to the input get absorbed rather than amplified.

The authors use Lyapunov's direct method, which they argue is simpler to implement than the indirect method and can provide stricter stability criteria locally. Their framework has three moving pieces:

  • A base graph neural flow (they support GRAND, GraphBel, and GraphCON, plus fractional-order versions of each).
  • A stability module that projects the flow into a Lyapunov-stable half-space at every step.
  • An equilibrium-separating classification layer that spreads class equilibria apart so perturbations cannot easily cross a decision boundary.

The Lyapunov function itself is learned. It uses an input-convex neural network, a fully connected network with special properties that guarantees convexity of the output with respect to the input, plus a quadratic term to enforce positive definiteness. Because it is differentiable, gradients flow through automatic differentiation as usual.

Fractional dynamics for long-range memory

The fractional-order variant is the more interesting half. Integer-order differential equations govern systems whose behavior depends solely on the current state, whereas fractional-order differential equations correlate a series of past states with the current state, enabling more accurate characterization of cumulative memory effects and non-local properties. That non-locality helps GNNs propagate information across long paths without oversmoothing.

For fractional systems, plain Lyapunov stability is replaced by Mittag-Leffler stability, and the authors prove their projection guarantees it. Concretely, when the projection condition fails, the base dynamics F is corrected by subtracting a term proportional to the gradient of V, pushing the trajectory back into the stable region.

The numbers

Experiments cover Cora, Citeseer, Computers, and PubMed under both black-box injection attacks (PGD-GIA, TDGIA, MetaGIA) and white-box attacks, plus poisoning via Metattack. The gains over the base flows are substantial:

  • Compared to F-GRAND on Cora, FL-GRAND improves clean accuracy by an average of 2.51% and gains 24.38%, 23.18%, and 25.33% under PGD, TDGIA, and MetaGIA respectively.
  • Under 25% poisoning on Cora, GCON drops from 83.1% to 53.2%. FL-GCON only drops from 80.0% to 72.2%.
  • On Citeseer, GCON and F-GCON decrease by 13.18% and 4.77% as the perturbation rate rises from 0% to 25%, while IL-GCON and FL-GCON only decrease by 1.65% and 1.26%.
  • Combining FL-GRAND with adversarial training adds another 4.25% under white-box PGD on Citeseer, confirming the two defenses are complementary.

The method also beats HANG, a Hamiltonian-inspired robustification approach, across most settings. The authors frame the contrast as energy dissipation versus energy conservation: dissipating energy actively drags the state toward a minimum-energy equilibrium instead of letting it orbit.

Cost and caveats

Training and inference are slightly slower than the base flows because of the extra projection and ICNN forward pass, though the authors describe this as a justified trade-off. Clean accuracy occasionally dips against the strongest baseline. On PubMed under injection attacks, HANG still wins by a noticeable margin, so the framework is not uniformly dominant.

The equilibrium-separating layer matters more than it first appears. Ablations show that removing it degrades robustness across the board, because stable equilibria for different classes can otherwise sit uncomfortably close together and share overlapping basins of attraction.

When to reach for it

If you are running continuous-time GNNs like GRAND or GraphCON on tasks where an adversary might realistically tamper with graph structure (fraud detection, recommendation, security-sensitive citation or knowledge graphs), this is a low-friction way to add certified robustness without swapping architectures. It layers cleanly on top of adversarial training, so teams already paying that cost can compound their defenses.

The trade-offs are the usual ones for stability-constrained models: slightly slower training, a small hit to clean accuracy in some regimes, and an extra hyperparameter for the fractional order beta that controls how aggressively the system converges. Source code is available at https://anonymous.4open.science/r/test-LSGNF.