SandHouse
Pages and contents

Approximate Equivariance

https://proceedings.mlr.press/v258/park25d.html

Park, Bhatt, Zheng 2025

Problem
Symmetry can be a powerful inductive bias in reinforcement learning. If two states are related by a known transformation, such as a reflection or rotation, then the optimal behavior in one state should often correspond to a transformed version of the optimal behavior in the other. Exactly equivariant neural networks enforce this relationship directly, reducing the number of distinct situations that the agent has to learn independently.

The problem is that real environments are rarely perfectly symmetric. A reflected state may have slightly different rewards or dynamics because of obstacles, physical imperfections, noise, or other symmetry-breaking factors. Enforcing exact equivariance can therefore force the agent to treat two situations as identical when they are only approximately equivalent. The paper asks whether the sample-efficiency benefits of symmetry can be retained while allowing the learned function to deviate from the symmetry when the environment requires it.

Method

Equivariance

Let a group G act on an input space X and output space Y . A function f:X→Y is exactly equivariant if transforming the input and then evaluating the function is equivalent to evaluating the function and then transforming its output:

f(gx)=gf(x)

For an RL policy, this means that if the environment state is transformed, the action should transform correspondingly:

Ο€(gs)=gΟ€(s)

For a scalar value or Q-function, the output itself does not transform, so the corresponding property is invariance:

Q(gs,ga)=Q(s,a)

Exact equivariance is useful when the symmetry is actually exact, but becomes too restrictive when rewards or dynamics only approximately respect the transformation.

Equivariance Error

The paper defines the amount by which a function violates a symmetry using the equivariance error:

ee(f,g,x)=|f(gx)βˆ’g(f(x))|

An exactly equivariant function has

ee(f,g,x)=0

for every g and x .

The Ο΅ \-stabilizer is the set of transformations whose equivariance error remains below some threshold:

Stabϡ⁑(f,G)=g∈G∣ee(f,g,x)≀ϡ

The paper calls f approximately G \-equivariant when every transformation in the group produces only bounded error:

Stabϡ⁑(f,G)=G

This differs from partial equivariance, where only a subset of the transformations satisfy the bound.

Approximately Symmetric MDP

Consider the discounted MDP

β„³=(S,A,P,R,Ξ³)

with a group G acting on both states and actions.

An exactly symmetric MDP would require rewards and transitions to remain unchanged under every transformation. The authors relax these conditions.

The reward may change slightly:

|R(gs,ga)βˆ’R(s,a)|≀ϡR

and the transition distributions may differ slightly:

dβ„±(P(gsβ€²βˆ£gs,ga),P(sβ€²βˆ£s,a))≀ϡP

where dβ„± is an integral probability metric between probability distributions.

The parameters Ο΅R and Ο΅P therefore quantify how badly the symmetry is broken in the reward and dynamics respectively.

When

Ο΅R=Ο΅P=0

this reduces to an exactly symmetric MDP.

Approximate Symmetry of the Optimal Value Function

The paper's main theoretical result is that if the MDP is approximately symmetric, then its optimal value functions must also be approximately symmetric.

Specifically,

|Qβˆ—(s,a)βˆ’Qβˆ—(gs,ga)|≀α
|Vβˆ—(s)βˆ’Vβˆ—(gs)|≀α

where

Ξ±=Ο΅R+γρℱ(Vβˆ—)Ο΅P1βˆ’Ξ³

The quantity ρℱ(Vβˆ—) measures how sensitive the value function is under the metric being used for transition distributions.

It also shows that symmetry errors can compound over long horizons because the error bound grows roughly as 1/(1βˆ’Ξ³) . Small differences in dynamics can therefore matter much more when the agent cares about consequences far into the future.

Group Convolutions

An exactly equivariant group convolution has the form

(fβ‹†ΟˆΞΈ)(g)=βˆ‘h∈Gψθ(gβˆ’1h)f(h)

The key property is that the convolutional kernel depends only on the relative transformation gβˆ’1h . This ties the parameters together across transformations and forces exact equivariance.

The benefit is reduced sample complexity: knowledge learned for one transformed configuration automatically applies to the others.

Relaxed Group Convolutions

The authors replace exact group convolutions with relaxed group convolutions.

Instead of a single shared equivariant kernel, they use several equivariant kernels ψθl and learn transformation-dependent weights:

(f⋆~ψθ)(g)=βˆ‘h∈Gf(h)βˆ‘l=1Lwl(h)ψθl(gβˆ’1h)

The important change is that

wl(h)

depends on the specific group element h .

If these weights are the same across transformations, the layer behaves like an exactly equivariant network. If the environment contains symmetry-breaking effects, the weights are free to become different.

The model can therefore learn something between

fully shared parameters⟷fully independent parameters

rather than having to choose between an exactly equivariant network and a completely unconstrained network.

Approximately Equivariant Actor-Critic

The authors apply these relaxed layers to modern actor-critic algorithms including SAC and DrQv2.

The encoder and policy are approximately equivariant:

E(gs)β‰ˆgE(s)
Ο€(gs)β‰ˆgΟ€(s)

while the critic is approximately invariant:

Q(gs,ga)β‰ˆQ(s,a)

The encoder, actor, and critic therefore retain symmetry as an inductive bias while being allowed to learn systematic violations of it.

The learned relaxed weights also provide some indication of where symmetry is being broken. If the weights remain similar across group elements, the learned solution is close to exactly equivariant. If they diverge, the network has learned that the corresponding transformations are not genuinely equivalent.

Results

The authors introduce controlled symmetry-breaking effects into continuous-control environments, such as modifying gravity or changing how actions behave in particular regions.

Exactly equivariant networks are generally more sample-efficient than unconstrained networks when the symmetry is valid. However, approximately equivariant networks can outperform exact equivariance when the environment contains symmetry-breaking factors.

Importantly, when symmetry actually is exact, the relaxed model generally remains close to exactly equivariant. The model therefore does not necessarily pay a large cost for having the additional flexibility.

The approximately equivariant models also showed increased robustness to noisy observations.


The largest limitation is that the symmetry itself is still specified in advance. The agent is given the group G and told exactly how that group acts on the state and action spaces. It learns how strongly the symmetry should be enforced, but it does not discover the transformations themselves. The experiments are also mostly relatively simple continuous-control domains with synthetic symmetry breaking, and the theoretical analysis assumes a fully observable MDP. The authors explicitly identify learning or handling unknown symmetries as an important direction for future work.

The work builds on exact equivariant RL and MDP symmetry approaches including Ravindran and Barto's MDP homomorphisms and later MDP Homomorphic Networks. Related approximate-equivalence approaches include Residual Pathway Priors, which combine equivariant and unrestricted pathways, and earlier work on relaxed group convolutions and approximate symmetry in physical systems. A major distinction from Ravindran's partial homomorphisms is that this paper begins with a known transformation group and relaxes how accurately it must hold. Ravindran instead allows the abstraction itself to apply only over subsets of the state-action space. Combining these ideas suggests a stronger formulation in which both the transformation and the region over which it approximately preserves dynamics are learned.