Abstract
Identifying the exact weights and architecture of a black-box neural network—known as parameter recovery—is a long-standing challenge in machine learning. Inherent symmetries and the non-convex nature of the loss landscape typically make this problem intractable. This paper, presented at ICML 2024, introduces Expand-and-Cluster (E&C), a novel framework that turns overparameterization from a hurdle into a solution. By training multiple overparameterized "student" networks to imitate a target "teacher" network, E&C leverages the smoothed loss landscape to reliably reach global minima. Subsequent hierarchical clustering of the student weights allows for the precise identification and extraction of the original teacher parameters.
Introduction: The Challenge of Parameter Recovery
In theory, recovering the weights of a neural network from its input-output mapping is plagued by several types of symmetries:
- Permutation Symmetries: Neurons within a layer can be reordered without affecting the output.
- Scaling and Sign Symmetries: For activations like ReLU or Tanh, weights can be scaled or flipped if compensated for in adjacent layers.
- Overparameterization Symmetries: Redundant neurons can be added that functionally cancel each other out.
These symmetries create a "rough" loss landscape for networks of minimal size, causing standard gradient descent to stall in local minima. The authors propose bypassing this complexity by intentionally overparameterizing the search space.
The Expand-and-Cluster (E&C) Framework
The E&C method operates in two primary phases to navigate the symmetry-laden landscape.
1. The Expand Phase
Instead of training a student network of the same size as the target teacher, the authors train $N$ independent student networks that are significantly larger (e.g., 4x the width). This overparameterization "lifts" the optimization problem, smoothing the loss landscape and allowing students to reach near-zero imitation loss consistently.
2. The Cluster Phase
At near-zero loss, the students are functionally equivalent to the teacher but contain many redundant neurons. The authors categorize these into a "Symmetry Catalogue":
- Duplicate-type: Neurons that directly copy a teacher neuron.
- Zero-type: Neurons that cancel each other out.
- Linear-type: Neurons that contribute only to the linear component of the mapping.
By applying hierarchical clustering to the weight vectors across all $N$ students, the algorithm identifies "teacher-like" neurons that appear consistently across different initializations.
Experimental Evaluation
The authors tested E&C on both synthetic and real-world datasets:
- Synthetic Tasks: Challenging regression problems like multidimensional XOR and checkerboard patterns, where precise hyperplane alignment is critical.
- Standard Benchmarks: Teacher networks pre-trained on MNIST, FashionMNIST, and CIFAR10. E&C was used to "steal" these models using only their probabilistic outputs.
Key Results
- High Fidelity: E&C recovered the exact number of neurons and their weights with minimal overhead (less than 10%) in the final reconstructed architecture.
- Superior to Pruning: Unlike standard pruning methods (e.g., OTOv2), which often lose accuracy when trying to reach the minimal architecture, E&C successfully compressed overparameterized students back to the teacher's original size with near-zero error.
- Multi-layer Scalability: The method successfully extended to deep fully connected and convolutional networks, demonstrating that the clustering logic holds across hierarchical representations.
Discussion and Future Work
While E&C provides a path to exact recovery, it faces practical limitations. Training dozens of overparameterized students is computationally expensive. Furthermore, the method currently requires a high number of input-output queries. Future research may focus on reducing query complexity or scaling the approach to massive architectures like Transformers. Beyond machine learning, the authors suggest E&C could eventually assist in reverse-engineering biological neural circuits by analyzing unit activity patterns.
Summary updated