TL;DR
MoRAM reimagines continual learning by decomposing multi-rank LoRA updates into atomic, rank-1 key-value pairs that function as linear associative memory. By replacing error-prone external routers with an elegant self-activation mechanism, MoRAM achieves state-of-the-art plasticity and stability across vision-language and large language model benchmarks without catastrophic forgetting.
What Problem Does This Paper Address?
When training large pre-trained models (PTMs) on a sequence of tasks, they inevitably suffer from catastrophic forgetting—new knowledge overwrites old capabilities. To combat this, researchers often use Parameter-Efficient Fine-Tuning (PEFT) techniques like Low-Rank Adaptation (LoRA) combined with Mixture-of-Experts (MoE) frameworks. In theory, these "MoE-LoRA" setups isolate task-specific knowledge into separate experts.
However, the authors point out that existing MoE-LoRA methods operate at a coarse granularity, treating multi-rank LoRA blocks as indivisible experts. This introduces three critical challenges:
- Interference: Activating a high-rank expert block for a specific input inevitably triggers irrelevant parameter subspaces, causing cross-task interference.
- Redundancy: New experts cannot selectively reuse fine-grained "atoms" of knowledge from older experts, leading to inefficient capacity usage.
- Routing Collapse: As the number of tasks and experts grows, external routing networks suffer from ambiguity and drift, failing to reliably index the expert pool and accelerating the forgetting of older tasks.
Methods
The authors introduce MoRAM (Mixture of Rank-1 Associative Memory), a framework that fundamentally rethinks model adaptation through the lens of Linear Associative Memory. Instead of adding a monolithic rank-$r$ LoRA block per task, MoRAM expands capacity "little by little" by adding $r$ independent, rank-1 memory atoms.
Key Innovations:
- Rank-1 Key-Value Experts: Each rank-1 adapter is treated as an atomic memory slot consisting of a key vector ($A$) and a value vector ($B$). The key determines the relevance of the atom to the input, while the value stores the retrieved knowledge.
- Self-Activation Gating: MoRAM completely eliminates the need for an external router. Instead, the input token computes its own relevance score directly against each expert's intrinsic key vector via an inner product. This shifts the architecture from address-based routing to content-addressable retrieval.
- Sparse Expert Routing & Sharpness: To keep compute bounded and minimize interference, MoRAM applies a top-$k$ masking constraint. It uses temperature-scaled softmax normalization to sharpen the gradient signals toward the most relevant specialist atoms, and applies a threshold-based filter ($\delta$) at inference time to prune out weak, noisy activations.
Datasets
MoRAM was extensively evaluated across multiple modalities and benchmarks:
- Vision-Language (CLIP): Evaluated on the X-TAIL (10 datasets) and MTIL (11 datasets) benchmarks, which include diverse image classification tasks such as Aircraft, Caltech101, DTD, EuroSAT, Flowers, Food, MNIST, OxPet, Cars, and SUN397.
- Continual Learning of LLMs: Tested on the TRACE benchmark using LLaMA-2, LLaMA-3, and Gemma. TRACE standardizes 8 datasets spanning domain-specific understanding, reasoning, summarization, and code generation (e.g., ScienceQA, Py150, MeetingBank).
- Language Classification: Evaluated on standard 5-dataset streams (Yelp, Amazon, DBpedia, Yahoo, AG News) and an extended 15-dataset long-sequence stream using a T5-Large backbone.
Key Insights and Ideas
- Weights as Static Memories: Reconceptualizing neural network weights as static key-value associative memory slots provides a cleaner mathematical framework for modular adaptation than traditional dense matrix updates.
- The Power of Rank-1 Granularity: Breaking down updates to rank-1 allows true mathematical isolation. Coarse-grained blocks force entanglement; atomic blocks allow precise, input-specific retrieval.
- Routers are a Liability: External routing networks are notoriously unstable in continual learning because their representation space drifts as new tasks are added. Letting the memory keys route themselves solves routing collapse natively.
Key Results
- LLM Benchmark Superiority: On the TRACE benchmark with LLaMA-2-7B, MoRAM achieved the highest Overall Performance (44.54%) and a remarkably low Backward Transfer (BWT) of just 1.37% (compared to a devastating 18.5% forgetting for SeqLoRA and 7.16% for O-LoRA).
- CLIP Performance: On the X-TAIL benchmark, MoRAM achieved a final average accuracy of 72.7% and a last-task accuracy of 80.9%, outperforming competitive state-of-the-art baselines like CoDyRA and MoE-Adapter.
- Parameter and Compute Efficiency: MoRAM achieves these results while utilizing roughly one-third of the active parameters required by a standard rank-32 LoRA during inference.
- Post-Pruning Advantage: Because the rank-1 experts are independent, low-utility atoms can be easily pruned post-training. The authors successfully pruned away 30% of the parameter storage with virtually zero performance degradation.
Limitations and Future Work
- Linear Storage Growth: Although MoRAM is highly parameter-efficient during inference, the total pool of frozen rank-1 experts still grows linearly with the number of tasks.
- Static Hyperparameters: The current sparse activation mechanism relies on fixed hyperparameters (like temperature $\tau$ and threshold $\delta$). The authors note that making these parameters adaptive or aware of the input data distribution is an important avenue for future research.
Summary updated