Manuscript Offprint

arXiv:2611.05041

Positional Encoding is All You Need for Scalable Equivariance Constraint Relaxation

Hagay Michaeli, Haggai Maron, Daniel Soudry

Abstract

Equivariant neural networks incorporate known symmetries of the data, such as permutations, rotations, or translations, directly into their architecture, often improving sample efficiency and generalization. However, strict equivariance can make optimization difficult, for example, when the data only approximately satisfy the assumed symmetry, or when the equivariance constraints induce a challenging loss landscape. Recent studies have shown that relaxing equivariance during training by introducing non-equivariant dense linear layers can ease optimization in such cases and improve the performance of the resulting strictly equivariant model, after removing the relaxation layers at test time. While effective, this approach incurs a significant computational overhead, limiting its applicability in scalable architectures. In this work, we propose a more efficient constraint-relaxation method based on positional encoding (PE). Our framework injects a positional encoding with learnable scale that breaks the model's original symmetry. This positional signal is gradually annealed to zero, recovering the original equivariant model by the end of training. Empirically, we demonstrate significant improvements for translational and rotational equivariant models with only marginal compute and memory overhead.

1 Introduction

Many learning tasks involve symmetries, i.e., transformations of the input that induce predictable transformations of the output. Examples include translations in images, rotations in 3D geometry, and permutations in sets and graphs. Most equivariant and invariant neural networks enforce this structure by restricting layers to commute with a group action, often improving sample efficiency and generalization. Classic instances include group-equivariant convolutions for images [4], steerable CNNs for continuous rotation groups [5], and permutation-equivariant models for sets and graphs [6, 7], useful in applications such as 3D perception and physics-inspired learning [8–10].

Despite their advantages, strictly equivariant architectures can be difficult to optimize. Even when an equivariant optimum exists, structured equivariant parameterizations can impede the loss landscape geometry, causing training to stall at stationary points that unconstrained models can escape [11, 12]. When the data only approximately satisfy the assumed symmetry, strict equivariance induces an approximation-generalization trade-off: the same inductive bias that improves generalization under matched symmetries can become restrictive under symmetry misspecification [13, 14]. Motivated by these barriers, a growing literature studies approximate or relaxed equivariance [15–19]. Recent studies have improved trainability by relaxing equivariance early in training and progressively re-imposing the constraint to recover a strictly equivariant model at inference [1–3]. These methods add unconstrained dense branches in parallel to equivariant layers and anneal them to zero, which increases parameter count and training cost and can be prohibitive at scale.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Equivariance constraint relaxation during training. Left: A strictly equivariant model, whose hypothesis class is restricted to equivariant functions. Middle: Dense constraint relaxation [1–3] adds a non-equivariant dense branch in parallel to every equivariant layer during training. This greatly enlarges the hypothesis class, but substantially increases the parameter count and computational cost of training. Right: Our PE constraint relaxation instead adds a single positional encoding to the input. This relaxes the constraint with negligible parameter and compute overhead. In both relaxation methods, the auxiliary component is used only during training and is annealed to zero, recovering the original strictly equivariant architecture at inference.

In this work, we propose a simple, scalable alternative: train-time constraint relaxation via positional encoding (PE; Fig. 1). Positional encodings are a standard tool for injecting order or geometry into symmetry-preserving architectures, such as Transformers [20, 21] and graph neural networks (GNNs) [22, 23]. They are employed to increase the expressivity of such architectures [24–26] and, more recently, to control the symmetry of equivariant models [27–29]. Building on this direction, we use PE as a transient optimization aid that is annealed to zero, recovering the original strictly equivariant model at inference. We evaluate our approach on five architectures: Vector Neurons [10] and Rapidash [30] for rotation-equivariant point-cloud classification, Alias-Free XCiT [31] for shift-invariant image classification, E2CNN [32] for rotation-equivariant smoke plume forecasting [13], and SEGNN [33] for E(3)-equivariant N-body forecasting. Across these models, PE relaxation matches or improves the strict baselines while preserving their equivariance at inference.

References (61)