Abstract
Foundation models for physical systems are currently limited by fixed-dimensional architectures, preventing seamless knowledge transfer across 1D, 2D, and 3D simulations. We present Axial Neural Networks (XNNs), a dimension-agnostic framework that treats tensor axes as interchangeable elements. By employing axis-permutation equivariance through set-based and graph-based message passing, XNNs enable a single set of parameters to process data of arbitrary dimensionality. Our results demonstrate that XNN-based models, such as X-MPP, significantly outperform traditional dimension-specific models in zero-shot and few-shot generalization to unseen dimensions, while maintaining competitive performance on standard benchmarks.
Introduction: Breaking the Dimensional Silo
In the rapidly evolving field of AI for physics, researchers have developed highly effective models for solving Partial Differential Equations (PDEs). However, most state-of-the-art architectures are currently trapped in "dimensional silos." A model designed for 2D Navier-Stokes equations cannot naturally process a 1D Burgers' equation or a 3D climate simulation without significant architectural modification.
To build a true "foundation model" for physics—one that understands general physical principles across various scales and geometries—we must combine diverse datasets. Current strategies to bridge these gaps, such as padding lower-dimensional data with zeros or using "inflation" (copying weights across new axes), are either computationally wasteful or fail to share knowledge effectively between dimensions. There is a critical need for a unified, dimension-free architecture capable of learning from a 1D wave and applying that knowledge to a 3D fluid flow.
The Axial Neural Network (XNN) Framework
The core innovation of the Axial Neural Network (XNN) is the application of parameter sharing across the axes of a data tensor. Inspired by Deep Sets and Graph Neural Networks (GNNs), XNNs treat the dimensions of an input not as fixed indices, but as interchangeable elements. The authors propose two primary variants:
- Set-Based XNN (SXNN): This variant treats the axes of a tensor as a set. It applies the same transformation to each axis independently before aggregating the results. While computationally efficient, SXNN is limited by "symmetric kernels," where weights are forced to be identical in every direction.
- Graph-Based XNN (GXNN): This more advanced version treats axes as nodes in a graph, utilizing message passing between them. This allows the model to capture complex interactions between dimensions (e.g., the relationship between height and width) without being locked into a fixed dimensionality.
By "axial-izing" existing state-of-the-art PDE models—specifically the Multiple Physics Pretraining (MPP) and CViT architectures—the researchers created X-MPP and X-CViT. These models replace dimension-specific layers with XNN components, allowing them to scale dynamically to the input data's dimensionality.
Experimental Setup and Generalization
The models were evaluated against a rigorous battery of tasks designed to test both standard performance and cross-dimensional generalization:
- Synthetic Benchmarks: A Gaussian Process (GP) kernel prediction task involving data from 2D up to 5D.
- PDEBench & PDEArena: Standard benchmarks featuring 1D and 2D PDEs, including Diffusion-Reaction, Shallow Water equations, and Incompressible Navier-Stokes.
- Unseen Dimensions: To test true dimension-agnosticism, models were pretrained on 2D data and then evaluated on 1D Burgers’ equations and 3D Compressible Fluid Dynamics.
Key Insights
Axis Permutation Equivariance
The "secret sauce" of XNNs is axis permutation equivariance. The architecture is designed so that if the $x$ and $y$ axes of an input are swapped, the output swaps accordingly. This mathematical constraint forces the model to learn general spatial relationships rather than memorizing specific grid layouts, which is essential for generalizing to higher dimensions.
Overcoming the Inflation Limit
Traditional models often move from 2D to 3D via "inflation" (repeating 2D kernels along a 3D axis). The authors demonstrate that this approach is redundant and limits the model's ability to generalize. XNNs naturally expand to higher dimensions because they view the third axis simply as an additional node in the graph, allowing for more fluid adaptation.
Multidimensional Pretraining
The results suggest that learning from 1D and 2D data simultaneously improves performance when the model eventually encounters a 3D problem. This indicates that "physics-ness"—the underlying logic of spatial derivatives and temporal evolution—is a transferable trait that XNNs can capture across dimensional boundaries.
Results and Performance
- Superior Generalization: In "unseen dimension" tests, X-MPP significantly outperformed the standard MPP. When pretrained on 2D and fine-tuned on 3D data, X-MPP adapted faster and required significantly less data than baseline models.
- Efficiency and Expressivity: The GXNN variant achieved higher accuracy than the simpler SXNN while utilizing 6x fewer parameters and reducing forward computation time by 80% compared to enlarged set-based versions.
- Competitive Accuracy: On standard 2D PDE tasks, XNN variants performed as well as, and occasionally better than, models specifically engineered for 2D. This proves that dimension-agnosticism does not require a sacrifice in precision.
Limitations and Future Directions
While XNNs represent a significant step toward foundation models for physics, several challenges remain. The authors note that an "axial version" of cross-attention—attending between two tensors of different dimensions—is not yet fully realized. Additionally, while GXNN is more efficient than padding, its computational cost still scales with the number of dimensions, posing a challenge for extremely high-dimensional scientific simulations. Finally, maintaining strict equivariance in positional encodings and de-embedding layers remains a target for future refinement.
Summary updated