TL;DR
This paper introduces "Learning on LoRAs" (LoL), a new framework for training models that learn directly from LoRA weights. By leveraging the unique GL(r) symmetries inherent in LoRA decompositions, they develop efficient, symmetry-aware architectures that can predict various properties of finetuned models, achieving massive speedups over traditional evaluation methods.
What Problem Does This Paper Address?
Finetuning large foundation models has become standard practice, but full finetuning is computationally expensive. Low-Rank Adaptation (LoRA) offers an efficient alternative by introducing low-rank matrices to update weights. This has led to a proliferation of LoRAs, creating a new "data modality" in the form of these low-rank weights. The challenge is how to effectively learn from these LoRA weights themselves. Previous "weight-space learning" methods often struggle with the unique symmetries of LoRAs, which differ from those of standard neural networks. This paper aims to bridge this gap by developing models that can learn from LoRA weights, respecting their inherent symmetries, and demonstrating their utility for various prediction tasks.
Methods
The core contribution is the development of "Learning on LoRAs" (LoL) models. The authors identify that LoRA weights (represented as matrices U and V) have a specific symmetry: they are invariant to transformations of the form $(U, V) \rightarrow (UR, VR^{-T})$ for any invertible matrix $R \in GL(r)$. To exploit this, they propose several GL(r)-equivariant and invariant neural architectures:
- Naive Architectures: Standard MLPs and Transformers applied directly to flattened LoRA weights, or to the multiplied-out dense matrices ($UV^T$). These lack the necessary inductive biases and are computationally expensive, respectively.
- Symmetry-Aware Architectures:
- MLP(O-Align([U, V])): Canonicalizes LoRA weights using an orthogonal transformation, making it O(r)-invariant but not fully GL(r)-invariant.
- MLP(σ(UV<sup>T</sup>)): Uses singular values of the multiplied-out LoRA weights as features. This is GL(r)-invariant but not fully expressive.
- GL-net: A novel architecture that combines GL-equivariant linear layers and nonlinearities with a GL-invariant head. This is designed to be both efficient and fully GL(r)-equivariant/invariant.
Datasets
The authors created several new datasets for training and evaluating their LoL models:
- CelebA-LoRA: ~3,900 LoRAs finetuned from Stable Diffusion 1.4 on celebrity images, with varying ranks and hyperparameters.
- Imagenette-LoRA: ~4,000 LoRAs finetuned from Stable Diffusion 1.4/1.5 on the Imagenette dataset, with varying ranks.
- Qwen2-ARC-LoRA: ~2,000 LoRAs finetuned from Qwen2-1.5B on the ARC dataset.
- Llama3.2-ARC-LoRA: ~2,000 LoRAs finetuned from Llama3.2-3B on the ARC dataset.
- CivitAI-LORA: A dataset of ~500 open-source LoRAs for Stable Diffusion, with diverse ranks and hyperparameters, used for generalization experiments.
Key Insights and Ideas
- LoRA weights are a rich data modality: The paper convincingly argues that LoRA weights themselves can be treated as data, opening up new avenues for meta-learning and model analysis.
- GL(r) symmetry is crucial: The inherent GL(r) symmetry of LoRA decompositions is not just a theoretical curiosity; it's a critical property that symmetry-aware models (like GL-net) leverage to achieve superior performance compared to naive approaches.
- Massive speedups are achievable: LoL models can predict downstream task performance (e.g., CLIP scores, LLM accuracy) orders of magnitude faster than direct evaluation, enabling rapid hyperparameter tuning and model assessment.
- Generalization across models and ranks: LoL models can generalize to LoRAs trained on different base models from the same family and even to LoRAs with unseen ranks, demonstrating broad applicability.
Key Results
- CLIP Score Prediction: GL-net achieved significantly lower test MSE for predicting CLIP scores of diffusion model LoRAs compared to other models, with a speedup of over 53,000x compared to traditional evaluation.
- Language Model Performance Prediction: LoL models (especially GL-net and MLP(UV<sup>T</sup>)) achieved very high R<sup>2</sup> scores for predicting finetuning validation loss (up to 0.998) and ARC-C test accuracy (up to 0.987) for language models.
- Attribute Prediction: GL-net achieved high accuracy (91.3%) in predicting CelebA attributes and Imagenette classes from LoRA weights.
- Generalization: LoL models trained on SD1.4 LoRAs generalized well to SD1.5 LoRAs (e.g., GL-net achieved 87.8% accuracy). GL-net and MLP(UV<sup>T</sup>) also showed good generalization to unseen LoRA ranks.
- Scalability: LoL models, except for MLP(UV<sup>T</sup>), scale well to large base models (up to GPT-3 scale), with preprocessing and forward passes taking only seconds.
Limitations and Future Work
- Data Requirements: Training effective LoL models may require thousands of finetuned networks, which can be a significant upfront cost. However, this is offset by the speedup in downstream applications like model evaluation.
- Potential for Misuse: The ability to predict dataset size or other properties could be used for privacy attacks, though the authors believe the work is largely foundational.
- Future Directions: The authors suggest exploring equivariant tasks such as editing or merging LoRAs, and applying LoL models to other areas where parameter-efficient finetuning is prevalent.
Summary updated