Latent Merger: Latent-Space Composition of Hypernetwork-Generated LoRAs
Organizations: New York University · KAIST
Abstract
Recent work proposes hypernetworks that convert a document into a low-rank parameter update (LoRA) in a single forward pass, enabling fast injection of new knowledge into a frozen LLM. However, storing separate LoRA adapters for each document can be unsustainable in streaming settings. In this paper, we study the problem of composing hypernetwork-generated LoRAs using two representative systems, Doc-to-LoRA and SHINE. We show that hypernetwork-generated LoRAs have a geometry sharply different from directly fine-tuned LoRAs. They exhibit greater spectral concentration and stronger cross-document alignment than next-token prediction and QA fine-tuned adapters, which are diffuse and nearly orthogonal across documents. Guided by this observation, we propose latent-space LoRA merging. We compose the intermediate hypernetwork latents and then decode the merged latent through the frozen LoRA-generation head. We show that latent-space merging techniques consistently improve over weight-space and factor-space baselines while preserving a single fixed-rank adapter. These results support latent-space composition as a promising mechanism for combining hypernetwork-generated LoRAs under a fixed output-rank budget.
Figures & tables
| Backbone | Method | within cos. | top-1 energy | |
|---|---|---|---|---|
| Hypernetwork-based methods | ||||
| Gemma2-2B | D2L | 30.2 | +0.144 | 15.5% |
| Qwen3-8B | SHINE | 209.4 | +0.888 | 88.8% |
| Gradient based methods | ||||
| Gemma2-2B | NTP-FT | 5.6 | +0.005 | 0.6% |
| Qwen3-8B | NTP-FT | 8.5 | +0.001 | 0.2% |
| Hyperparameter | D2L | SHINE |
| Bottleneck dimension | 128 | 256 |
| Transformer layers | 3 | 3 |
| Attention heads | 8 | 8 |
| FFN hidden dimension | 512 | 1024 |
| Activation | GELU | GELU |
| SQuAD | MS MARCO | |||||
| Method | ||||||
| Oracle D2L | ||||||
| Rank Concatenation Methods | ||||||
| 1/N Scaled Concat | 24.1 2.5 | 19.3 2.1 | 18.6 1.4 | 20.3 3.0 | 20.5 1.9 | 20.7 1.7 |
| Unscaled Concat | 30.9 2.7 | 22.9 2.7 | 0.6 0.2 | 24.3 2.8 | 6.7 1.5 | 2.2 0.6 |
| Norm-preserving | 26.6 2.5 | 21.8 2.2 | 20.0 1.5 | 21.1 2.8 | 22.1 1.9 | 22.2 1.8 |
| SQuAD | MS MARCO | |||||
| Method | ||||||
| Oracle SHINE | 56.8 | 38.1 | ||||
| Rank Concatenation Methods | ||||||
| 1/N Scaled Concat | 44.3 3.1 | 29.2 3.0 | 24.7 2.9 | 26.6 3.9 | 22.1 2.1 | 20.0 1.6 |
| Unscaled Concat | 12.2 2.0 | 0.0 0.0 | 0.0 0.0 | 6.4 1.2 | 0.1 0.1 | 0.1 0.1 |
| Norm-preserving | 44.9 3.0 | 29.1 2.7 | 21.7 2.3 | 28.9 3.9 | 21.7 2.1 | 19.4 1.5 |
| D2L | SHINE | |||||
|---|---|---|---|---|---|---|
| Loss | ||||||
| KL Divergence | 51.5 4.1 | 29.8 2.5 | 21.0 1.3 | 50.2 4.2 | 40.6 2.8 | 32.3 2.6 |
| Cross-Entropy | 48.3 4.1 | 24.7 2.4 | 17.9 1.2 | 49.8 4.6 | 39.8 2.8 | 30.2 2.5 |
| Method | Merger training data | Judge accuracy (%) |
|---|---|---|
| Latent averaging | None | |
| Latent Merger | SQuAD | |
| Latent Merger | XSum+2Wiki+MMLU |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | |||
|---|---|---|---|
| D2L Mistral-7B | |||
| Per-document oracle | |||
| Latent Merger | |||
| Latent averaging | |||
| SVD-compressed weight averaging | |||
| Factor averaging | |||
| Setting | D2L Gemma-2B | SHINE Qwen3-8B |
|---|---|---|
| Closed-book | ||
| Per-document oracle | ||
| Flat Latent Merger, | ||
| Flat Latent Merger, |
| Operation | ||||
|---|---|---|---|---|
| Composition block | ||||
| Generator head | ||||
| Complete latent path | ||||
| Elementwise mean | ||||
| Rank concatenation | ||||
| TIES |
| Operation | ||||
|---|---|---|---|---|
| Composition block | ||||
| Generator head | ||||
| Complete latent path | ||||
| Elementwise mean | ||||
| Rank concatenation | ||||
| TIES |
Language Model Merging
Language model merging combines capabilities from multiple models or adapters by composing their weights, updates, or outputs.
See all 120 papers