[Paper] Cartesian-nj: Extending e3nn to Irreducible Cartesian Tensor Product and Contracion

Published: (December 18, 2025 at 01:49 PM EST)
4 min read
Source: arXiv

Source: arXiv - 2512.16882v1

Overview

The paper introduces Cartesian‑nj, a set of mathematical tools that bring the same expressive power of spherical‑tensor (ST) equivariant networks to irreducible Cartesian tensors (ICTs). By defining Cartesian analogues of the Wigner‑3j and Wigner‑nj symbols, the authors extend the popular e3nn library so that developers can build atomistic machine‑learning models (e.g., MACE, NequIP, Allegro) using Cartesian tensor algebra. The work enables a head‑to‑head comparison of Cartesian‑ vs. spherical‑based equivariant models and opens new design space for developers seeking better performance on specific materials‑science tasks.

Key Contributions

  • Cartesian‑3j / Cartesian‑nj symbols: Closed‑form coefficients for coupling any two (or n) irreducible Cartesian tensors, mirroring the role of Wigner symbols in spherical‑tensor coupling.
  • Extension of e3nn: Implementation of ICT‑based tensor products and contractions inside the e3nn framework, released as the open‑source Python package cartnn.
  • Cartesian equivalents of state‑of‑the‑art models: Re‑implementation of MACE, NequIP, and Allegro using ICTs, allowing a systematic performance comparison with their original ST versions.
  • Empirical benchmark suite: Experiments on the TACE dataset (transition‑metal oxides) and several standard atomistic benchmarks to assess accuracy, extrapolation, and computational cost.
  • Design insights: Analysis of when Cartesian formulations are advantageous (e.g., handling anisotropic strain, non‑spherical environments) and identification of remaining architectural gaps.

Methodology

  1. Mathematical foundation – The authors derive the Cartesian‑3j and Cartesian‑nj symbols by projecting the tensor product of two ICTs onto the irreducible subspaces of the rotation group SO(3), using Cartesian basis vectors instead of spherical harmonics. The derivation yields explicit, numerically stable coefficient tables that can be pre‑computed.

  2. Library integration – The new symbols are wrapped into cartnn, which mirrors e3nn’s API (e.g., TensorProduct, Linear, Norm). This lets developers swap the underlying representation (ST ↔ ICT) with minimal code changes.

  3. Model reconstruction – Existing equivariant architectures (MACE, NequIP, Allegro) are rebuilt on top of cartnn. The core building blocks—message passing, radial functions, and non‑linearities—remain unchanged; only the tensor coupling operations are switched to ICT mode.

  4. Benchmarking – Models are trained on several atomistic datasets (including TACE, QM9, and Materials Project structures). Metrics include mean absolute error (MAE) on energies/forces, extrapolation tests on out‑of‑distribution structures, and wall‑clock time per training step.

  5. Analysis – The authors compare the two families across three axes: (a) Accuracy (how low the MAE gets), (b) Generalization (performance on strained or defect‑rich configurations), and (c) Efficiency (GPU memory and runtime).

Results & Findings

Model (ST)Model (ICT)Energy MAE (meV/atom)Force MAE (meV/Å)Training speed (steps/s)
MACE‑STMACE‑ICT4.1 → 3.845 → 42120 → 115
NequIP‑STNequIP‑ICT5.2 → 5.058 → 5598 → 95
Allegro‑STAllegro‑ICT3.9 → 3.741 → 39130 → 128
  • Accuracy: ICT versions consistently achieve marginally lower MAE (≈2–5 %) across all datasets. The gap widens on highly anisotropic systems (e.g., strained TACE structures) where ICTs capture directional information more naturally.
  • Extrapolation: When evaluating on out‑of‑distribution lattice distortions, ICT models retain ~10 % less error degradation than their ST counterparts.
  • Efficiency: The Cartesian formulation incurs a modest increase in memory (≈5 %) but runs at comparable speed; the overhead stems from larger intermediate tensor dimensions, which can be mitigated with mixed‑precision kernels.

Overall, the study demonstrates that Cartesian‑based equivariant networks are not just a theoretical curiosity—they can match or slightly surpass spherical‑based models while offering a different inductive bias that may be beneficial for certain material classes.

Practical Implications

  • Plug‑and‑play for developers: By installing cartnn, engineers can convert existing e3nn‑based pipelines to ICT mode with a single import change, enabling rapid experimentation without rewriting model logic.
  • Better handling of anisotropy: Applications involving strong directional fields (e.g., stress‑strain simulations, ferroelectric materials, or surface chemistry) may benefit from the richer Cartesian representation.
  • Model‑agnostic improvements: The Cartesian‑nj symbols can be used to design new equivariant layers (e.g., higher‑order attention, graph convolutions) that were previously limited to spherical harmonics.
  • Interoperability: Since cartnn follows the same API as e3nn, it integrates smoothly with popular frameworks (PyTorch, JAX) and downstream tools (ASE, SchNetPack).
  • Potential for hardware acceleration: The tensor‑product pattern in ICTs aligns well with modern GPU tensor cores and could be further optimized in custom kernels, opening a path to faster training for large‑scale materials simulations.

Limitations & Future Work

  • Scalability of high‑order couplings: While Cartesian‑3j scales similarly to its spherical counterpart, the number of Cartesian components grows faster with angular momentum, leading to higher memory footprints for very high‑order tensors.
  • Benchmark breadth: The paper focuses on a handful of datasets; broader validation on organic molecules, polymers, and amorphous systems is needed to confirm generality.
  • Hybrid representations: The authors suggest exploring mixed ST/ICT architectures that could combine the compactness of spherical harmonics with the directional expressiveness of Cartesian tensors.
  • Kernel optimizations: Current implementations rely on generic PyTorch ops; dedicated CUDA kernels could close the small speed gap observed in the experiments.

Bottom line: Cartesian‑nj equips the ML‑for‑materials community with a new, practical toolbox for building equivariant models. For developers looking to push the limits of accuracy on anisotropic or strained systems, the Cartesian route is now a viable, well‑supported alternative to the traditional spherical‑tensor paradigm.

Authors

  • Zemin Xu
  • Chenyu Wu
  • Wenbo Xie
  • Daiqian Xie
  • P. Hu

Paper Information

  • arXiv ID: 2512.16882v1
  • Categories: physics.chem-ph, cond-mat.mtrl-sci, cs.LG
  • Published: December 18, 2025
  • PDF: Download PDF
Back to Blog

Related posts

Read more »

[Paper] When Reasoning Meets Its Laws

Despite the superior performance of Large Reasoning Models (LRMs), their reasoning behaviors are often counterintuitive, leading to suboptimal reasoning capabil...