Tensor Field Networks and Geometric Deep Learning

4 minute read

Published:

TL;DR: TFN (Thomas et al., 2018) builds node features as collections of spherical harmonic coefficients at multiple degrees l. Message passing uses CG tensor products to combine features from different degrees. This is the rigorous algebraic foundation for SE(3) equivariance — EGNN and SE(3)-Transformers are both simplifications or extensions of this framework.

The TFN Framework

In TFN, each node i carries a feature field — a collection of irreducible representations:

F_i = { f_i^{(l)} ∈ ℝ^{(2l+1) × c_l} : l = 0, 1, ..., L }

Where c_l is the number of channels at degree l. This is like having separate “colour channels” for each geometric degree:

  • c_0 channels of scalars (l=0)
  • c_1 channels of 3D vectors (l=1)
  • c_2 channels of 5D quadrupolar features (l=2)
  • etc.

The TFN Layer

Message from node j to node i (via edge direction r̂_{ij} = (r_i - r_j)/ r_i - r_j ):
m_{ij}^{(l_out)} = Σ_{l_in, l_f} W^{l_in, l_f, l_out}(||r_{ij}||) · ( f_j^{(l_in)} ⊗_{l_f} Y^{l_f}(r̂_{ij}) )^{l_out}

Breaking this down:

  • Y^{l_f}(r̂_{ij}): spherical harmonics of degree l_f evaluated at the edge direction
  • f_j^{(l_in)} ⊗_{l_f} Y^{l_f}: CG tensor product combining node features (degree l_in) with geometric features (degree l_f) to produce output degree l_out
  • W^{…}( r_{ij} ): radial weight function (depends only on distance, so invariant)
The triangle rule determines which (l_in, l_f, l_out) combinations are non-zero:l_in - l_f≤ l_out ≤ l_in + l_f.

Aggregation and update:

f_i^{(l)} ← f_i^{(l)} + Σ_j m_{ij}^{(l)} for each l
What the CG product does: Combining a vector (l=1) with a quadrupole (l=2) via tensor product yields features at degrees 1, 2, 3. This is the 3D analogue of combining two signals — the result contains components at all geometrically meaningful frequencies. The radial function W provides distance-dependent weighting, allowing the model to distinguish nearby vs far interactions.

The Geometric Deep Learning Blueprint

The TFN paper, together with Bronstein et al. (2021) “Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges,” established a unified framework:

Every neural network architecture = symmetry group + representation + invariant/equivariant layers

ArchitectureGroupDomainType
CNNTranslation (ℤ²)ImagesEquivariant
Spherical CNNSO(3)SphereEquivariant
Standard GNNPermutation S_NGraphsEquivariant
TFN / EGNNSE(3) / E(n)3D point cloudsEquivariant
Graph TransformerPermutationGraphsInvariant readout

This unification shows that architectural choices are really choices about which symmetries to encode — and which geometric domain the data lives in.

From TFN to NequIP and MACE

NequIP (Batzner et al., 2022): extends TFN with:

  • Message passing framework (not just pair interactions)
  • Gate nonlinearity: f^{(l)} ← f^{(l)} · σ(f^{(0)}) (scalars gate higher-order features)
  • Achieves state-of-the-art in molecular force fields with very few training points

MACE (Batatia et al., 2022): extends NequIP with:

  • Higher-body-order interactions (not just pairwise — triplets, quadruplets)
  • Many-body basis functions via tensor product pooling
  • State-of-the-art on MD17 (molecular dynamics benchmark)

Equivariant Nonlinearities

Standard MLPs (ReLU, sigmoid) break equivariance when applied to l>0 features — the result is not equivariant. Two equivariant nonlinearity designs:

Gate activation: multiply l>0 features by a gating scalar (l=0):

f^{(l)} ← f^{(l)} · σ( W^{(0)} f^{(0)} )

Scalars are gated by nonlinear functions; higher-order features are gated by scalars (maintaining equivariance).

Norm nonlinearity: apply nonlinearity to the norm of each feature vector:

f^{(l)} ← f^{(l)} / ||f^{(l)}|| · σ(||f^{(l)}||)

Norm is invariant; normalised direction is equivariant. Applying σ to the norm and scaling preserves equivariance.

Summary

ArchitectureKey contributionCurrent status
TFNFirst SE(3)-equivariant MPNN using CG productsFoundation
EGNNSimple equivariance without CG (l=1 only)Practical default
SE(3)-TransformerEquivariant attentionStrong baseline
NequIPTFN + MPNN + gatingState-of-the-art force fields
MACEMany-body interactions + tensor poolingCurrent SOTA

TFN’s contribution is not just an architecture — it is the mathematical language in which geometric deep learning is now written. Understanding spherical harmonics, CG products, and irreducible representations is prerequisite knowledge for reading the current state-of-the-art in equivariant GNNs.

References