Introduction
Neural networks are defined by their weights, but these weights possess a fundamental symmetry: neuron permutation. Swapping the order of hidden neurons in a layer, provided the corresponding incoming and outgoing weights are adjusted, results in a mathematically identical function. This symmetry creates a complex "weight space" where many different sets of parameters represent the same model.
Recently, the field of "weight-space learning" has emerged, aiming to build neural functionals—models that take the weights of other networks as input. These functionals can perform critical tasks such as predicting a model's generalization performance or acting as "learned optimizers." To be effective, these functionals must be equivariant: if the input weights are permuted, the functional's output should transform in a consistent, predictable manner.
The Challenge of Symmetry
Historically, designing equivariant layers for neural functionals required manual, mathematically intensive derivation. While solutions existed for simple Multi-Layer Perceptrons (MLPs) or basic Convolutional Neural Networks (CNNs), scaling these to modern architectures like Recurrent Neural Networks (RNNs) or Transformers was a significant bottleneck. These complex models involve residual connections, multi-head attention, and recurrence, making the manual construction of symmetry-preserving layers nearly impossible.
The UNF Framework: Automating Equivariance
The primary contribution of this work is the Universal Neural Functional (UNF), a general algorithm that automates the construction of linear equivariant layers for any arbitrary weight space. Instead of manual derivation, the user provides a "weight-space specification"—a dictionary mapping weight tensors to the specific "neuron groups" they interact with.
The UNF algorithm identifies "valid partitions" of indices that permute simultaneously and constructs a complete basis for the most general linear equivariant layer. By interleaving these automated linear layers with standard non-linearities, the authors create deep, expressive models that are mathematically guaranteed to respect the internal symmetries of the target architecture, whether it's a 1D convolution or a multi-head attention block.
Experimental Evaluation
The researchers evaluated UNFs across two distinct domains:
- Generalization Prediction: Using the "Tiny RNN Zoo"—a dataset of 10,000 RNNs trained on arithmetic tasks—the authors trained a UNF to predict a model's success rate from its weights.
- Learned Optimization: UNFs were used to meta-learn optimizers for a variety of architectures, including MLPs (FashionMNIST), CNNs (CIFAR-10), and both RNNs and Transformers (LM1B benchmark).
Results and Impact
The results demonstrate that respecting symmetry is a powerful inductive bias. In the RNN generalization task, the UNF achieved a rank correlation (Kendall’s $\tau$) of 0.8968, outperforming strong baselines like STATNN.
In meta-learning experiments, UNF-based optimizers consistently outperformed standard Stochastic Gradient Descent with Momentum (SGDM) and "Deep Sets" (which ignore specific neuron-group symmetries). Notably, UNFs successfully handled Transformer architectures—a first for this class of equivariant models—showing that the learned optimizer could effectively navigate the complex structure of multi-head attention.
Conclusion
Universal Neural Functionals lower the barrier to weight-space learning by moving from manual derivation to algorithmic automation. By providing a "universal" way to respect neuron permutation symmetry, UNFs enable more efficient learning and better generalization for models that process the weights of state-of-the-art neural architectures.
Reference: Zhou, A., Finn, C., & Harrison, J. (2024). Universal Neural Functionals. arXiv:2402.05232v1 [cs.LG].
Summary updated