Abstract
The number of publicly available models is rapidly increasing, yet most remain undocumented. Users looking for suitable models for their tasks must first determine what each model does. Training machine learning models to infer missing documentation directly from model weights is challenging, as these weights often contain significant variation unrelated to model functionality (denoted nuisance). Here, we identify a key property of real-world models: most public models belong to a small set of Model Trees, where all models within a tree are fine-tuned from a common ancestor (e.g., a foundation model). Importantly, we find that within each tree there is less nuisance variation between models. Concretely, while learning across Model Trees requires complex architectures, even a linear classifier trained on a single model layer often works within trees. While effective, these linear classifiers are computationally expensive, especially when dealing with larger models that have many parameters. To address this, we introduce Probing Experts (ProbeX), a theoretically motivated and lightweight method. Notably, ProbeX is the first probing method specifically designed to learn from the weights of a single hidden model layer. We demonstrate the effectiveness of ProbeX by predicting the categories in a model's training dataset based only on its weights. Excitingly, ProbeX can map the weights of Stable Diffusion into a weight-language embedding space, enabling model search via text, i.e., zero-shot model classification.
Introduction: The Documentation Crisis
The AI community is currently facing a "documentation crisis." With over a million models hosted on platforms like Hugging Face, many lack adequate metadata. A researcher looking for a specific fine-tuned model often has no way of knowing exactly what data it was trained on without downloading and testing it manually.
"Weight-space learning" aims to solve this by building metanetworks: models that take the weights of other models as input to predict their attributes. However, this is difficult because weights are inherently noisy. Two models performing identical tasks might have vastly different weight configurations due to random initialization or neuron permutations—factors the authors define as "nuisance variation."
Methods: The Model Tree Framework and ProbeX
The authors introduce two key concepts to make weight-space learning practical:
- Model Trees: Most public models are not created from scratch; they are fine-tuned from a few "foundation" models (e.g., Llama, Stable Diffusion). Within these "Model Trees," nuisance variation is significantly lower because models share a common starting point.
- Probing Experts (ProbeX): Processing millions of parameters in a modern model layer is computationally prohibitive. ProbeX uses a "probing" approach where learned input probes are passed through a single hidden layer of the target model. The responses are then mapped into a final model encoding. For populations with multiple architectures, a Mixture-of-Experts (MoE) approach is used, where a router sends weights to the specific expert trained for that Model Tree.
Key Insights: Ancestry as the Antidote to Noise
A striking finding is that learning within a tree is significantly easier than learning across trees. In fact, adding models from a different tree to a training set can lead to negative transfer, where performance actually decreases.
Within a single Model Tree, even simple linear classifiers can often identify a model's purpose. However, ProbeX incorporates non-linearities (ReLU) which are crucial for zero-shot generalization to unseen categories.
Results and Applications
- Efficiency: ProbeX achieves state-of-the-art accuracy while using 30x fewer parameters than standard dense metanetworks.
- Accuracy: On predicting training classes for ViT models, ProbeX achieved 88.5% accuracy, significantly outperforming standard dense experts (66.3%).
- Zero-Shot Model Retrieval: By mapping Stable Diffusion weights to CLIP language embeddings, ProbeX achieved 89.8% accuracy in classifying models into 30 categories never seen during its training. This enables searching for models using natural language prompts.
- Speed: Training a ProbeX expert on a single model layer takes less than 10 minutes on a consumer-grade GPU.
Limitations and Future Work
ProbeX currently requires knowing the Model Tree a model belongs to. While the MoE router handles known trees, the system cannot yet generalize to entirely new architectures or models trained from scratch. Furthermore, while probing a single layer is effective, future work could explore fusing information across the entire depth of a model to improve robustness and avoid overfitting.
Summary updated