Abide by the Law and Follow the Flow: Conservation Laws for Gradient Flows

Sibylle Marcotte, Rémi Gribonval, Gabriel Peyré · DOI

Abstract

Modern neural networks are often over-parameterized, yet they generalize remarkably well. This phenomenon is largely attributed to the "implicit bias" of optimization algorithms like gradient descent. This paper establishes a rigorous mathematical framework to identify conservation laws—quantities that remain invariant during training—within gradient flows. By leveraging Lie algebra and differential geometry, the authors demonstrate that for several common architectures, the known "balancedness" properties are the only independent conservation laws that exist. This work provides both a theoretical foundation for understanding the geometry of parameter space and algorithmic tools to automate the discovery of these invariants.

Introduction: The Geometry of Implicit Bias

In the era of deep learning, models frequently possess far more parameters than training examples. Theoretically, such models could converge to an infinite variety of solutions that fit the training data perfectly. However, the optimization process—typically gradient descent—exhibits an implicit bias, steering the model toward specific solutions that generalize well.

One of the most fundamental forms of this bias is the existence of conservation laws. These are mathematical quantities that remain constant throughout the entire optimization process, regardless of the specific data or loss function used. While specific instances of these laws, such as "balancedness" in matrix factorization (where the difference between squared weights of adjacent layers remains constant), have been documented, a general theory was missing. This paper addresses two critical questions: How can we systematically identify all conserved quantities for any given architecture, and how can we prove when a set of laws is complete?

Theoretical Framework: Gradient Flow and Lie Algebras

To analyze these invariants, the authors treat neural network training as a gradient flow—the continuous-time limit of gradient descent. This perspective allows the application of powerful tools from differential geometry and algebra.

Local Reparameterization

The framework begins by factoring the model's output into a mapping function $\phi$ that depends solely on the parameters $\theta$. By isolating the architectural mapping from the external influences of the loss function and the dataset, the authors can focus on the geometric properties inherent to the network structure itself.

The Frobenius Theorem and Lie Algebra

The core innovation lies in the use of the Frobenius Theorem. The authors show that the number of independent conservation laws is dictated by the dimension of the Lie algebra generated by the Jacobian of the model's parameterization. In physical terms, if gradient descent is viewed as a trajectory through a high-dimensional landscape, these algebraic structures define the "walls" or manifolds that the flow cannot cross. If the Lie algebra spans a certain subspace, the conservation laws define the orthogonal directions where movement is impossible.

Algorithmic Discovery

To move beyond manual proofs, the authors developed two algorithms implemented in SageMath to automate the study of these laws:

  1. Symbolic Computation: An algorithm to compute a basis of polynomial conservation laws for a given architecture.
  2. Rank Verification: An algorithm that calculates the maximal number of independent laws (including non-polynomial ones) by checking the rank of the generated Lie algebra.

These tools were tested on a variety of architectures, including deep linear networks and ReLU networks. In experiments involving 50 random architectures with varying depths (2 to 5) and widths (2 to 10), the algorithms consistently identified the precise number of conservation laws predicted by the theory.

Key Insights and Results

The Completeness of Balancedness

A major contribution of this work is the first formal proof of completeness for specific architectures. For two-layer ReLU networks and matrix factorization, the authors prove that the previously known balancedness laws are exhaustive. There are no "hidden" conservation laws left to discover for these models. For a two-layer linear network with $r$ neurons, they established that there are exactly $rk(2r + 1 - rk)/2$ independent laws.

Independence from Data and Loss

Because these laws are derived from the Jacobian of the parameterization mapping $\phi$, they are entirely independent of the task. Whether a model is trained for regression using Mean Squared Error or classification using Cross-Entropy, the parameters are constrained to the same manifold. This suggests that conservation laws are a "weak" but universal form of implicit bias baked directly into the network's architecture.

Dimensionality Reduction

The existence of these laws implies that the high-dimensional gradient flow can be mathematically reduced to a lower-dimensional "intrinsic" flow on a Riemannian manifold. This simplification is crucial for future theoretical work aiming to prove convergence properties of deep networks.

Limitations and Future Directions

While the paper provides a robust foundation, several avenues for future research remain:

  • Discrete vs. Continuous Time: The theory holds strictly for continuous gradient flow. In practice, discrete gradient descent with large learning rates can "drift" from these conserved manifolds, leading to only approximate conservation.
  • Stochasticity: The impact of Stochastic Gradient Descent (SGD) is not yet integrated into this framework. The noise introduced by mini-batching may interact with these geometric constraints in ways that alter the implicit bias.
  • Complex Architectures: While the framework is general, the completeness proofs focus on linear and shallow ReLU networks. Extending these proofs to modern components like Attention mechanisms in Transformers or Batch Normalization is a logical next step.

Conclusion

By bridging the gap between deep learning and classical differential geometry, this research provides a definitive way to count and identify the invariants of neural network training. Understanding these "laws of motion" is a vital step toward a complete theory of why over-parameterized models behave as reliably as they do in practice.

Summary updated

BibTeX
@inproceedings{marcotte2023abide,
  author = {Sibylle Marcotte and Rémi Gribonval and Gabriel Peyré},
  title = {{Abide by the Law and Follow the Flow: Conservation Laws for Gradient Flows}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=kMueEV8Eyy},
}
Figure