Invariant Loss Functions for Geometric and Structural Symmetries

24 concepts15 papers1 proposal

Imagine training a neural network to predict the 3D coordinates of a molecule. If the molecule is rotated 45 degrees in space, its absolute $(x, y, z)$ coordinates change entirely, yet its chemical identity and internal structure remain identical. If we train a model using a standard Mean Squared Error (MSE) loss on absolute coordinates, a devastating failure mode emerges: the model attempts to minimize the distance to multiple valid, rotated versions of the same target. The mathematical optimum for MSE under this directional ambiguity is to average the coordinates, resulting in physically impossible, collapsed geometries—such as a benzene ring imploding into a single central point.

This fundamental mismatch between standard loss functions and spatial symmetries spans molecular modeling, computer vision, and structural biology. To solve it, researchers design symmetry-aware and permutation-invariant loss functions that evaluate predictions based on their intrinsic geometry rather than their arbitrary coordinate parameterization.

Eliminating Coordinates via Pairwise Distances

One of the most direct ways to achieve rotation and translation invariance is to discard absolute spatial coordinates entirely. Instead of forcing a network to predict where a component sits in an arbitrary 3D coordinate frame, models can optimize the internal relationships between components.

As demonstrated by Holdijk et al. in their work on molecular transition paths, calculating the training loss using pairwise atomic distances ensures that the objective depends solely on the internal geometry. By utilizing an exponentiated pairwise distance matrix, Holdijk et al. show that the loss function becomes naturally differentiable and completely invariant to rigid rotations and translations.

Similarly, Li et al. and Lu et al. leverage distance-based metrics to enforce internal structural consistency. By focusing the loss function on relative distances rather than absolute coordinates, the model is freed from tracking global orientation, allowing it to generalize across diverse spatial configurations.

Dynamic Alignment via the Kabsch Algorithm

While pairwise distances are powerful, many generative tasks require explicitly outputting 3D coordinates. In these scenarios, how do we compute a loss without penalizing a model for generating a perfectly valid structure that happens to be rotated or translated?

The solution is dynamic rigid alignment. Before computing the coordinate error, the predicted structure is mathematically aligned to the ground truth using the Kabsch algorithm, which finds the optimal rotation matrix and translation vector to minimize the root-mean-square deviation (RMSD).

[Predicted Coordinates] \
                         ---> [Kabsch Alignment] ---> [Rotation-Invariant Loss]
[Ground-Truth Targets]  /

Zhu et al. utilize this alignment-corrected loss to directly generate molecular conformations, preventing the model from receiving conflicting gradients from arbitrary spatial orientations. This strategy is critical for training stability; as Scarpellini et al. demonstrate in all-atom flow maps, integrating rigid alignment into the training loss ensures global geometric consistency where standard velocity-matching techniques fail. Furthermore, Poletukhin et al. apply this dynamic alignment to rigid molecular motifs, ensuring that chemically equivalent orientations of functional groups are not penalized during generation.

Resolving Permutation Ambiguity

Geometry is only half the battle; structural data also exhibits permutation symmetry. For instance, a symmetric molecule like an aromatic ring contains identical atoms that can be indexed in multiple ways without changing the chemical structure. If a model predicts a valid structure but indexes the atoms differently than the ground truth, a naive loss function will heavily penalize it.

To address this, Zhu et al. incorporate permutation-invariant loss functions that account for graph isomorphism, ensuring the model is evaluated on the physical molecule rather than its numerical indexing. Gao et al. show that designing losses invariant to atom ordering is essential for molecular docking, as it prevents the generation of physically impossible averaged conformations when multiple valid symmetric poses exist.

This concept extends beyond molecular graphs to bounding box regression in computer vision. Qian et al. introduce a modulated rotation loss for bounding boxes that calculates the minimum error across all geometrically equivalent parameterizations (such as vertex ordering or orientation wrap-around), smoothing out sudden spikes in loss at boundary conditions.

Enforcing Invariance through Self-Supervision

When explicit geometric alignment is computationally prohibitive or the underlying structure is unknown, models can learn invariance by exploring the symmetry space during training.

In X-ray single particle imaging, the authors of Scalable 3D reconstruction for X-ray single particle imaging with online machine learning introduce a randomized symmetric loss. By applying random symmetry operations to predicted orientations during training, the framework enforces the known point-group symmetries of a target molecule without requiring explicit orientation priors.

In the visual domain, such as digital pathology where tissue structures retain their meaning regardless of the scanning angle, Alfasly et al. incorporate 360-degree random rotations into a self-supervised learning framework. This forces the model's embeddings to remain consistent across all orientations. Similarly, Yang et al. utilize a self-supervised contrastive loss to require consistent cell segmentation across geometric transformations like flips and rotations.

This focus on orientation-agnostic features mirrors biological systems; as Kheradpisheh et al. and Arevalo et al. note, bio-inspired unsupervised learning mechanisms naturally excel at extracting features robust to rotation and translation, prioritizing meaningful structural properties over arbitrary spatial coordinates.

History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_rotation_agnostic_representation_learnin_edc581f6,
  title = {rotation-agnostic representation learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/rotation-agnostic-representation-learning/rdr_edc581f6dec64ed784f10786397d0f64},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 1, frozen text):

@misc{lacuna_rotation_agnostic_representation_learnin_edc581f6_v1,
  title = {rotation-agnostic representation learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/rotation-agnostic-representation-learning/rdr_edc581f6dec64ed784f10786397d0f64/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-20},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake