Differentiable SO(3) Power Spectrum Objective
- The paper introduces a differentiable SO(3) power spectrum loss that quantifies deviations in atomic environments via rotation-invariant descriptors.
- It employs GPU-accelerated, batched PyTorch operations to enable end-to-end gradient optimization in both direct and latent spaces.
- Quantitative benchmarks show significant improvements in unique and low-energy structure yields, highlighting its potential in computational materials discovery.
A differentiable SO(3) power spectrum objective is a loss function formulated on crystal structures that quantifies the deviation of atomic local environments from a prescribed reference, in a way that is both fully rotationally invariant and end-to-end differentiable. This objective enables the steering of structure generation processes—particularly those based on deep generative models such as VAEs—toward configurations exhibiting targeted local symmetries, such as the sp²-bonding motif characteristic of graphite. Recent implementations leverage GPU-accelerated tensor operations and full support for automatic differentiation, facilitating high-throughput, gradient-based optimization in both direct (atomic configuration) and latent (model embedding) spaces (Ridwan et al., 8 Jan 2026).
1. Mathematical Foundation of the SO(3) Power Spectrum Objective
At the core is a rotation-invariant descriptor, constructed for each Wyckoff site in a candidate crystal. The local atomic neighborhood within a cutoff is represented by a continuous, Gaussian-smeared neighbor density:
with and the smearing width. This density is expanded in a combined radial–spherical-harmonic basis with orthonormal radial functions and spherical harmonics , yielding coefficients:
The rotation-invariant SO(3) power spectrum is evaluated as:
which is flattened to a descriptor vector for each Wyckoff site.
Given a reference descriptor (e.g., extracted from graphite), a squared-error loss is constructed:
and the structure-level mean-squared loss is
where is the number of Wyckoff sites in the unit cell.
2. Fully Differentiable Implementation
Every step in the computation of the SO(3) power spectrum objective is implemented as a fully differentiable, batched GPU pipeline in PyTorch, distinguishing it from prior CPU-based workflows reliant on numerical gradients. Key elements include:
- Symmetry mapping: Precomputed tensors reconstruct Cartesian coordinates from the reduced, learnable crystal representation tensor , where is batch size and the number of free parameters.
- Neighbor listing: Constructed as differentiable tensor operations, vectorized over crystal batches.
- Basis function computation: Radial basis and spherical harmonics are constructed from elementary PyTorch operations, preserving compatibility with reverse-mode autodiff.
- Loss and gradient calculation: Mean-squared error in the descriptor space is minimized using exact gradients derived from PyTorch autograd throughout the computational graph. No finite-difference approximations are used, in contrast to legacy CPU/SciPy implementations (Ridwan et al., 8 Jan 2026).
3. Integration with Symmetry-Conditioned Variational Autoencoders
In a crystal generation pipeline, the differentiable SO(3) loss is coupled to a symmetry-conditioned variational autoencoder (CVAE):
- Training: The CVAE is trained using the standard reconstruction and KL-divergence losses, optimizing for a latent space conditioned on specified discrete variables (space group and Wyckoff positions).
- Inference: New candidates are sampled by decoding latent vectors (raw crystal parameters). Prior to first-principles relaxation, the differentiable power spectrum loss refines candidate structures via gradient-based updates, enforcing the target local environment downstream of the CVAE.
This environmental objective provides a descriptor-guided refinement layer, bridging the latent generative model and geometric local environment specification under space-group symmetry constraints (Ridwan et al., 8 Jan 2026).
4. Dual-Level Gradient-Based Optimization
Optimization is performed at two hierarchical levels:
Algorithm 1: Representation-space (direct geometry) optimization
- Treat the reduced free-parameter tensor as learnable.
- Compute and its gradient with respect to .
- Update with AdamW optimizer, clamp coordinates, and repeat for iterations.
Algorithm 2: Latent-space optimization
- Fix the discrete condition , treat the latent vector as learnable.
- Decode , reconstruct geometry, compute .
- Update by backpropagation and AdamW optimization over steps.
Gradient flows from descriptor-space MSE all the way back to or . Adaptive techniques such as per-sample gradient clipping and learning-rate scheduling are employed to regularize optimization for diverse and heterogeneous samples (Ridwan et al., 8 Jan 2026).
5. High-Throughput Batched Processing and Computational Efficiency
Efficient, high-throughput implementation is achieved by sorting candidates into batches (e.g., ), and fusing all mapping, neighbor listing, projection, and averaging operations into single batched PyTorch kernels. This architecture yields:
- Approximately speedup over previous CPU/SciPy routines (1 minute per $1,000$ samples on NVIDIA H100 GPUs vs 5 minutes on 96-core CPUs).
- Stable convergence for large and statistically diverse sample batches, facilitated by the AdamW optimizer and robust gradient regularization.
- Optional post-processing with MACE-FF relaxation and duplicate removal for database finalization (Ridwan et al., 8 Jan 2026).
6. Quantitative Performance Benchmarks
Empirical performance, as benchmarked on $100,000$ generated candidates, demonstrates the efficacy and throughput of the differentiable SO(3) power spectrum objective:
| Scenario | Valid Env† | Unique | Low-Energy |
|---|---|---|---|
| VAE, 1-pass refinement | 18,248 | 4,878 | 508 |
| CVAE, 1-pass refinement | 23,372 | 5,695 | 571 |
| CPU/SciPy batch (L-BFGS-B, num. grad) | 18,248 | 4,878 | - |
| GPU/PyTorch batch (AdamW, autograd) | 12,874 | 4,817 | - |
| Dual-level, 4 rounds (CVAE, GPU, full) | 48,308 | 11,546 | 1,014 |
Sequential dual-level optimization (alternating between representation- and latent-space) more than doubles the number of unique and low-energy sp² carbon nets relative to single-pass representation-space optimization, in under $9$ hours of GPU runtime. CVAE-augmented pipelines yield approximately more target-environment structures and more low-energy hits than baseline VAEs (Ridwan et al., 8 Jan 2026).
7. Significance and Extension
The differentiable SO(3) power spectrum objective functions as an effective, scalable molecular descriptor and environmental constraint, simultaneously enabling rigorous symmetry preservation and high-yield, high-throughput generation of complex materials. Its extension to multi-component, multi-environmental systems is plausible given the generality of the underlying descriptor and the flexibility of the differentiable implementation. Current evidence substantiates its impact in increasing both the rate and diversity of successful crystal structure generation, underlining its role as a central methodological advancement in computational materials discovery (Ridwan et al., 8 Jan 2026).