Soft Equivariance through Lie Algebra Regularisation
Abstract
Equivariant Graph Neural Networks (GNNs) encode geometric symmetries in data through architectural constraints. Exact equivariance can be too restrictive and often requires specially designed architectures, while unconstrained models may fail to recover symmetry, thereby harming generalisation. We introduce a general regularisation framework that controls the equivariance of an otherwise unconstrained GNN by penalising its infinitesimal equivariance defect. We show that the integrated defect defines the Casimir quadratic form of the induced representation and, under a spectral-gap assumption, controls the distance to the equivariant subspace. We estimate the regulariser efficiently using random Lie algebra directions, avoiding explicit evaluation along every infinitesimal generator. In controlled synthetic experiments, the regulariser reduces learned symmetry breaking and can improve generalisation under anisotropic sampling, while remaining flexible as the target progressively departs from exact symmetry. Random-direction estimation also scales more favourably than evaluating the full defect over a basis of the Lie algebra. This provides a practical alternative to both exact architectural equivariance and fully unconstrained learning, treating symmetry as a task-dependent inductive bias whose strength can be controlled rather than imposed categorically.