Abstract
Low-rank adaptations (LoRAs) have revolutionized the finetuning of large foundation models, enabling efficient adaptation even with limited computational resources. The resulting proliferation of LoRAs presents exciting opportunities for applying machine learning techniques that take these low-rank weights themselves as inputs. In this paper, we investigate the potential of Learning on LoRAs (LoL), a paradigm where LoRA weights serve as input to machine learning models. We identify the inherent parameter symmetries of low-rank decompositions and develop GL-net, a symmetry-aware architecture using equivariant layers. In numerical experiments, we show that LoL architectures are capable of processing low-rank weight decompositions to predict CLIP scores, finetuning data attributes, data membership, and accuracy on downstream tasks.
Introduction: The Problem of "Reading" Weights
Finetuning massive foundation models like Llama 3 or Stable Diffusion is computationally expensive. LoRA (Low-Rank Adaptation) solved this by only training two small matrices ($U$ and $V$) that, when multiplied ($UV^\top$), represent the weight update. Because LoRAs are small and portable, thousands are shared on platforms like Hugging Face and Civitai.
However, we lack tools to "read" these weights. If you download a LoRA, how do you know if it’s high quality, if it was trained on private data, or if it will perform well on your specific task?
The challenge is that LoRA weights have a "hidden" symmetry: for any invertible matrix $R$, the pair $(UR, VR^{-\top})$ produces the exact same weight update as $(U, V)$. Standard neural networks (MLPs) get confused by this because the same functional model can look like completely different numbers in the weight matrices. This paper builds "weight-space" models that are invariant to these transformations.
Methods: The GL-net Architecture
The authors propose the LoL (Learning on LoRAs) paradigm. The centerpiece is GL-net, an architecture designed to be GL-equivariant.
Key technical components include:
- Equivariant Linear Layers: Instead of flattening weights, GL-net applies learnable transformations to the "left" side of the $U$ and $V$ matrices, preserving the relationship between them.
- Equivariant Non-linearities: A custom version of ReLU scales rows of $U$ and $V$ based on the product $UV^\top$, ensuring the symmetry holds even after non-linear steps.
- Invariant Head: The final layer computes products like $UV^\top$ to extract features that are mathematically identical regardless of the specific $R$ transformation used during training.
Datasets and Benchmarks
Since no "LoRA-as-data" benchmarks existed, the authors created three massive new datasets:
- CelebA-LoRA: 3,900 rank-4 LoRAs for Stable Diffusion 1.4, each personalized to a different celebrity.
- Imagenette-LoRA: 2,046 rank-32 LoRAs for Stable Diffusion trained on various image subsets.
- Qwen2-ARC-LoRA: 2,000 LoRAs for the Qwen2 1.5B language model, trained on different slices of the ARC reasoning dataset.
Key Insights
- Weights as Features: The weights of a finetuned model act as a compressed summary of its training data and capabilities.
- Symmetry as Inductive Bias: Vanilla MLPs fail to generalize because they don't understand that $U$ and $V$ are just one representation of a weight update. GL-net’s mathematical constraints act as a powerful inductive bias.
- Cross-Rank Generalization: GL-net trained on rank-4 LoRAs can often perform well on higher ranks by using simple zero-padding or truncation, showing it learns the underlying "features" of the weight space.
Experimental Results
- Performance Prediction: GL-net predicted the CLIP score of diffusion models with significantly lower error than any other method.
- Data Forensics: On the CelebA dataset, GL-net achieved 91.3% accuracy in identifying specific attributes (like facial hair) of the celebrity the model was trained on, just by looking at the weights.
- Language Model Insights: For Qwen2, the model predicted downstream reasoning accuracy on the ARC test set with an $R^2$ of 0.987, effectively "seeing" how much the model learned without running a single evaluation prompt.
- Membership Inference: The model could detect which data sources were used to train a specific LoRA with ~62% accuracy, highlighting potential privacy implications for shared weights.
Conclusion and Future Work
While this paper focuses on predicting from weights, the authors suggest the next step is generating weights—creating new model edits or merging LoRAs without traditional training. Currently, LoL models are tied to specific base models; future work aims to create "universal" weight-space learners.
Summary updated