Skip to content

dynamical-inference/ebc

Repository files navigation

Equivariance by Contrast: Identifiable Equivariant Embeddings from Unlabeled Finite Group Actions

Tobias Schmidt, Steffen Schneider and Matthias Bethge

Accepted at NeurIPS 2025.

[Paper] [Preprint] [Poster]

This repository contains the code that was used to produce the results in the paper.

Abstract

We propose Equivariance by Contrast (EbC) to learn equivariant embeddings from observation pairs (y, g · y), where g is drawn from a finite group acting on the data. Our method jointly learns a latent space and a group representation in which group actions correspond to invertible linear maps—without relying on group-specific inductive biases. We validate our approach on the infinite dSprites dataset with structured transformations defined by the finite group G := (Rm × Zn × Zn), combining discrete rotations and periodic translations. The resulting embeddings exhibit high-fidelity equivariance, with group operations faithfully reproduced in latent space. On synthetic data, we further validate the approach on the nonabelian orthogonal group O(n) and the general linear group GL(n). We also provide a theoretical proof for identifiability. While broad evaluation across diverse group types on real-world data remains future work, our results constitute the first successful demonstration of general-purpose encoder-only equivariant learning from group action observations alone, including non-trivial non-abelian groups and a product group motivated by modeling affine equivariances in computer vision.

Result

image

Method

image image

Setup

To set up the environment and install all dependencies, run the following commands in your terminal:

# Create and activate conda environment
conda create -n ebc python=3.10 --no-default-packages --channel conda-forge --override-channels -y
conda activate ebc

# Install PyTorch (choose appropriate command for your system if needed)
pip install torch torchvision

# Install remaining dependencies and the EbC package
pip install -r requirements.txt
pip install -e .

Example Usage

We provide example notebooks for reproducing results from the paper in the examples folder:

Citation

@inproceedings{
  schmidt2025ebc,
  title={Equivariance by Contrast: Identifiable Equivariant Embeddings from Unlabeled Finite Group Actions},
  author={Tobias Schmidt and Steffen Schneider and Matthias Bethge},
  booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
  year={2025},
  url={https://openreview.net/forum?id=kvI0QTVRQD}
}

About

Official implementation of Equivariance by Contract (EbC)

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages