R295 · AI education › Teaching materials and glossaries

One basis, three fields: spherical harmonics in atomic orbitals, Gaussian splatting and equivariant networks

Read the original

Authors Pallavi Ahuja

teachingfundamentalsmodel-architectureresearch

The observation

Three problems that look unrelated — describing the angular structure of an atomic orbital, representing how a 3D scene's colour changes with viewing angle, and building a neural network whose features transform predictably when its input rotates — are all solved with the same mathematical objects: spherical harmonics.

That is not a coincidence or an analogy. All three are the same underlying problem: representing a function defined on the surface of a sphere.

The right mental model: Fourier, but on a sphere

The most useful framing is by analogy to Fourier analysis, which most engineers already carry.

Sines and cosines form an orthonormal basis for functions on a circle. Any reasonable periodic signal decomposes into a weighted sum of them, indexed by frequency, and truncating the series after k terms gives the best k-term approximation.

Spherical harmonics are the same construction one dimension up. They form an orthonormal basis for square-integrable functions on the 2-sphere, indexed by degree (how rapidly the function varies with direction, the analogue of frequency) and order (which of the independent functions at that degree). Where a Fourier series describes how a quantity varies over time, a spherical-harmonic expansion describes how a quantity varies with direction.

Everything below follows from that one sentence. Each of the three fields has a quantity that depends on direction, and each stores a few low-degree coefficients instead of a dense table of directions.

Three instances

Quantum mechanics: the shapes of orbitals

Separating the hydrogenic wavefunction in spherical coordinates factors it into a radial part and an angular part, and the angular factor is a spherical harmonic. The familiar pictures — the spherical s orbital, the dumbbell p orbitals, the four-lobed d orbitals — are the nodal structure of successive degrees. The lobes are not a chemical fact bolted on afterwards; they are what the degree-1 and degree-2 basis functions look like.

3D Gaussian splatting: view-dependent colour

A splatting renderer represents a scene as a large collection of anisotropic Gaussians. A surface's apparent colour depends on where you look from — specular highlights move, materials shift hue at grazing angles — so colour cannot be a single value per primitive.

The solution is to store, per Gaussian, a set of spherical-harmonic coefficients per colour channel. At render time the viewing direction is evaluated against the basis and the coefficients are combined into a colour. The original implementation uses harmonics up to degree 3, giving 16 basis functions per colour channel: (3+1)² = 16.

This is a compression result. Instead of a colour for every possible camera direction, you store 16 numbers that reconstruct a smooth function over all of them.

Geometric deep learning: equivariance by construction

Rotation-equivariant networks (the tensor-field / e3nn family) use spherical harmonics as the angular part of their filters. The point is not expressiveness but a guarantee: because the basis functions transform under a known representation of the rotation group, a rotation of the input produces a predictable transformation of the features rather than an arbitrary one.

That matters most where the data is genuinely geometric and has no canonical orientation — molecular property prediction being the standard example, since what determines a molecule's behaviour is the relative positions and orientations of its atoms, not their coordinates in some arbitrary frame. The alternative, teaching a network rotation invariance from augmented data, spends capacity and training time on a property you could have had for free.

Why this transfer is worth having

An engineer who has implemented view-dependent colour in a splatting pipeline has already built the intuition needed to read an equivariant-network paper: a function on the sphere, expanded in a basis, truncated at low degree. Most would never notice, because the two literatures share almost no vocabulary.

The general lesson is the one worth carrying: when the same basis appears in unrelated fields, it is usually because the fields share a domain, not because someone borrowed a trick. The sphere shows up wherever direction matters and distance does not.

The cost nobody mentions

The observation is usually presented as elegant. It is also a budget item in both engineering instances.

In splatting, the coefficients dominate the payload. Degree 3 at 16 coefficients across three colour channels is 48 floats per Gaussian, against roughly a dozen for position, scale, rotation and opacity combined. In a scene with millions of Gaussians this is most of the memory and most of the bandwidth. Consequently, reducing or pruning the harmonic degree is one of the first things production pipelines do — lower degree for distant or diffuse primitives, full degree only where specular detail is visible. The choice of degree 3 is a quality knob, not a constant of nature.

In equivariant networks, high degrees are expensive. The tensor products that combine features of different degrees scale badly, and this is the central performance problem of the family. A substantial line of recent work trades exact equivariance for throughput — approximating it, restricting to low degrees, or abandoning the guarantee and recovering it from data — precisely because the exact construction is slow.

So in both cases the right framing is: spherical harmonics give you a principled, smooth, low-parameter representation of a directional quantity, and the degree you can afford is the engineering decision.

Review checklist

If you meet a spherical-harmonic representation in a system you are evaluating:

  1. Find the maximum degree. It sets both the angular detail and the parameter count, and (degree+1)² coefficients per channel tells you the cost immediately.

  2. Ask what fraction of the stored payload the coefficients are. In splatting-like systems the answer is usually "most of it".

  3. Ask whether the degree is uniform or adaptive. Uniform is simpler and usually wasteful.

  4. For an equivariant model, establish whether equivariance is exact or approximate, and what the approximation bought in speed.

  5. Check whether a cheaper representation would do: if the directional dependence is nearly diffuse, a single value plus a small correction may match a full expansion.

  6. Watch for truncation artifacts — a low-degree expansion cannot represent a sharp specular highlight, and will render it as a smooth smear.

  7. Confirm the convention. Real versus complex harmonics, and the several competing normalisation and ordering conventions, are a reliable source of subtle bugs when weights or assets cross implementations.

What this does not tell you

Nothing here is new, and nothing here is measured. It is a conceptual bridge, and its value is entirely in whether you happened not to have the connection already. The claims above are standard results in three mature literatures; the degree-3 / 16-coefficient figure is a property of one reference implementation rather than a requirement; and the costs described are directional rather than benchmarked. Treat it as a reading aid, not as a result.

Connections

See R295 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.