TensorNet: Cartesian Tensor Representations for Efficient Learning of Molecular Potentials

Guillem Simeon, Gianni De Fabritiis

Abstract

Equivariance is a fundamental requirement for machine learning models targeting molecular systems, ensuring that internal representations transform consistently under spatial rotations and reflections. While current state-of-the-art models often rely on complex spherical harmonics and Clebsch-Gordan coefficients to achieve this, they suffer from high computational costs and mathematical complexity. We present TensorNet, a novel O(3)-equivariant message-passing neural network that utilizes Cartesian rank-2 tensors (3x3 matrices) as primary atomic features. By leveraging simple matrix algebra and a specific equivariant product ($XY + YX$), TensorNet achieves state-of-the-art accuracy across multiple benchmarks—including QM9 and rMD17—while utilizing significantly fewer parameters and maintaining high computational efficiency on modern hardware.

1. Introduction

In molecular machine learning, the ability to preserve physical symmetries is critical. A model must be equivariant: if a molecule is rotated in 3D space, its predicted properties (such as forces or dipole moments) must rotate accordingly. Historically, researchers have faced a trade-off. Simple models using only scalars and vectors are computationally efficient but often lack the descriptive power to capture complex many-body interactions. Conversely, sophisticated models using spherical tensors provide high accuracy but are mathematically cumbersome and computationally expensive due to their reliance on Clebsch-Gordan products.

TensorNet seeks a "middle ground" by employing Cartesian rank-2 tensors. These 3x3 matrices provide enough geometric bandwidth to model higher-order interactions, such as quadrupolar effects or the orientation of electron clouds, without the heavy computational tax associated with spherical harmonics.

2. Methodology

2.1 Cartesian Rank-2 Representations

The core innovation of TensorNet is the use of 3x3 matrices as the primary feature representation for each atom. Every rank-2 Cartesian tensor can be decomposed into three irreducible components:

  1. A Scalar: The trace of the matrix.
  2. A Vector: The skew-symmetric part.
  3. A Symmetric Traceless Tensor: The remaining components.

TensorNet processes these components separately when necessary but maintains them in a bundled matrix form for most operations, allowing the model to exploit optimized matrix multiplication kernels on GPUs.

2.2 Equivariant Matrix Products

To update these features while maintaining O(3) equivariance (handling both rotations and reflections), TensorNet introduces a modified matrix product: $XY + YX$. The authors demonstrate that this specific operation prevents the "mixing" of vectors and pseudovectors, ensuring strict adherence to the parity requirements of the O(3) group. This algebraic approach replaces the expensive tensor products found in spherical models with standard, highly optimized matrix operations.

2.3 Message Passing Architecture

TensorNet operates within a standard message-passing graph neural network (GNN) framework. Atomic numbers and interatomic distances are embedded into tensor representations. Interaction layers then update these representations by aggregating messages from neighboring atoms. Notably, TensorNet performs its matrix products at the node level after aggregation, rather than on every edge. This design choice improves scaling as the number of neighbors increases.

3. Experimental Setup

The model was evaluated on several standard molecular property benchmarks:

  • QM9: 130k small organic molecules used for energy prediction ($U_0, H, G$).
  • rMD17: A revised dataset of molecular trajectories used to evaluate force accuracy and conformational diversity.
  • SPICE & ANI1x: Large-scale datasets covering a wide range of chemical space.
  • Multi-Property Tasks: Evaluation of scalar (energy), vector (forces, dipoles), and tensor (polarizability) predictions using ethanol in a vacuum.

4. Results and Discussion

4.1 Accuracy and Parameter Efficiency

TensorNet demonstrates remarkable parameter efficiency. On the QM9 dataset, it outperformed top-tier models like Allegro and MACE in predicting internal energy ($U_0$) and enthalpy ($H$) while using only 4 million parameters—approximately 23% of Allegro’s 17.9 million parameters. On the rMD17 benchmark, TensorNet achieved state-of-the-art energy accuracy on 6 out of 10 molecules, often reaching these levels with only a single interaction layer.

4.2 Computational Performance

By avoiding custom kernels for spherical harmonics, TensorNet remains highly performant on modern hardware. Inference tests on an NVIDIA RTX 4090 showed that TensorNet is faster than or comparable to the Equivariant Transformer (ET) for systems up to 200 atoms. It also showed superior training efficiency in terms of steps per second compared to more complex spherical tensor models.

4.3 Multi-Property Prediction

Beyond energy and forces, TensorNet proved capable of predicting complex physical quantities. It predicted molecular dipole moments and polarizability tensors with higher accuracy than previous specialized architectures like FieldSchNet, confirming that the rank-2 representation is sufficient for capturing these higher-order physical properties.

5. Conclusion

TensorNet demonstrates that rank-2 Cartesian tensors represent a "sweet spot" for molecular modeling. They provide the necessary geometric information to achieve state-of-the-art results while remaining computationally efficient and easy to implement using standard matrix algebra. While the model is currently limited to rank-2 information—meaning it cannot directly represent higher-rank quantities like octupole moments—its performance on standard benchmarks suggests that rank-2 representations are sufficient for the vast majority of current molecular property prediction tasks. Future work may explore extending this framework to even larger systems and higher-rank interactions.

Summary updated

BibTeX
@inproceedings{simeon2023tensornet,
  author = {Guillem Simeon and Gianni De Fabritiis},
  title = {{TensorNet: Cartesian Tensor Representations for Efficient Learning of Molecular Potentials}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=BEHlPdBZ2e},
}
Figure