Any-dimensional invariant universality

Shengtai Yao, Eitan Levin, Mateo Diaz DiazICML 2026

Machine learning models like Graph Neural Networks (GNNs), Transformers, and DeepSets are designed to process inputs of arbitrary sizes—whether it is a graph with ten nodes or ten thousand. While classical "universality" theorems guarantee that standard neural networks can approximate any continuous function on a fixed-size input, extending this guarantee to variable-sized inputs has remained mathematically elusive. This paper introduces a rigorous framework to prove "universality across dimensions," revealing why some popular architectures fall short and how they can be modified to succeed.

The Challenge of Changing Dimensions

Classical universality relies on fixed, compact domains (e.g., a fixed-size image). When the input dimension constantly changes, "universality" becomes ill-defined. Historically, there has been no consistent way to establish continuity and compactness across a sequence of growing vector spaces. To bridge this gap, the authors provide a mathematical recipe to determine if an architecture can truly learn any symmetric function regardless of input scale.

A New Mathematical Framework

The authors tackle this challenge by viewing variable-sized inputs as a nested sequence of vector spaces ($V_1 \subseteq V_2 \subseteq \dots$), which are then embedded into a single, infinite-dimensional limit space ($V_\infty$).

Because models like GNNs and DeepSets are typically invariant (e.g., the output does not change if graph nodes are permuted), the framework focuses on orbit spaces. An orbit space treats all symmetric versions of an input as a single point. This symmetry acts as a simplifier: it effectively "collapses" the massive infinite-dimensional space, making it much easier to identify rich families of compact sets where universality can be proved.

The authors propose a three-step "recipe" for proving universality:

  1. Characterize Compact Sets: Identify what compactness looks like in the infinite-dimensional orbit space (e.g., using the Wasserstein metric for sets or the Cut Metric for graphs).
  2. Ensure Continuity: Construct model architectures that are "continuously transferable," meaning they remain continuous when extended to the infinite-dimensional limit.
  3. Apply Stone-Weierstrass: Use the Stone-Weierstrass theorem to show that the model class is a "subalgebra" capable of separating points, which mathematically guarantees it can approximate any continuous function.

Key Insights and Domain-Specific Results

The paper applies this purely theoretical framework to three representative domains: Sets, Graphs, and Point Clouds. A recurring theme across all domains is that topology is everything. In finite dimensions, all norms are equivalent; in the infinite-dimensional limit, they are not. A model might be continuous (and thus universal) under one metric but discontinuous under another.

Sets

To maintain continuity as set size approaches infinity, standard sum-pooling fails. The authors prove that modified versions of the DeepSets architecture—using normalized sums (averages) or specific $L_p$ weightings based on the norm of the elements—are required to achieve universality over sequences and probability measures.

Graphs

A surprising finding is the failure of pointwise nonlinearities. For graphs, standard pointwise activations like ReLU are actually discontinuous in the natural "cut metric" used for graph limits (graphons). Consequently, standard GNNs may fail to be universal across dimensions. To resolve this, the authors introduce a new model class based on homomorphism densities (which quantify how often small motifs appear in a graph) and prove it is continuous and universal for all graphons.

Point Clouds

For point clouds, models must be invariant to both permutations and rotations. The authors propose a two-stage architecture: first computing a Gram (inner-product) matrix to handle rotation invariance, followed by a GNN to handle permutation invariance. They prove this combined approach is universal for functions operating on point clouds.

Limitations and Future Directions

While this work represents a significant theoretical leap, the framework has boundaries:

  • Scalar Outputs Only: The current theory applies only to invariant models (producing a single scalar output). It does not yet cover equivariant models where the output size grows with the input (e.g., node-level classification).
  • Dense vs. Sparse Graphs: The graph results focus on "dense" graphs (where edges scale with the square of the nodes). Extending these proofs to sparse graph limits, which are common in real-world networks, remains an open challenge.
  • Network Dimensions: The proofs rely on the order of tensors growing with function complexity. It remains unknown whether universality across all dimensions can be achieved with networks of a fixed width or depth.

Summary updated

BibTeX
@inproceedings{yao2026any,
  author = {Shengtai Yao and Eitan Levin and Mateo Diaz Diaz},
  title = {{Any-dimensional invariant universality}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=wRVTDcEMv8},
}
Figure