Latent Merger: Latent-Space Composition of Hypernetwork-Generated LoRAs
Yanlai Yang1, Minki Kang2, Divyam Madaan1, Sung Ju Hwang2,3, and Mengye Ren1
1New York University, 2KAIST, 3DeepAuto.ai
NeurIPS 2026
TL;DR: Merge document knowledge in hypernetwork latent space, then decode a single fixed-rank LoRA adapter.
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.
Motivation
Hypernetworks such as Doc-to-LoRA (D2L) and SHINE turn a document into a LoRA adapter in a single forward pass, letting a frozen language model absorb new text without per-document fine-tuning. But keeping one adapter per document makes storage grow with the stream. Concatenating their low-rank factors also increases the output rank. Can we combine many documents into one adapter at the original rank?
Generated adapters are not the endpoints of independent fine-tuning runs: a shared generator decodes each one from an intermediate latent. We therefore combine the document latents before decoding the weights, then decode once.
Geometry
Do generated adapters behave like directly fine-tuned LoRAs? We compare D2L on Gemma-2-2B-it and SHINE on Qwen3-8B with LoRAs fine-tuned on the same 500 SQuAD validation passages and corresponding backbones, using next-token prediction (NTP-FT) or QA supervised fine-tuning (QA-SFT).


The leading component captures 15.5% of D2L's spectral energy, versus 0.6% (NTP-FT) and 1.5% (QA-SFT) on its backbone. For SHINE, it captures 88.8%, versus 0.2% and 2.6%. Cross-document alignment is also stronger: after unit-norm normalization, mean pairwise cosine similarity is +0.144 for D2L and +0.888 for SHINE, compared with at most +0.025 for the directly fine-tuned adapters.
This shared structure, together with a common decoder, motivates testing the generator's latent space as a place to combine document knowledge.
Method

Latent Merger treats the document latents as an unordered set. At each latent position, a small transformer mixes information across documents without positional embeddings, then mean-pools the result. It adds a gated, RMS-matched residual to the plain latent average. The output projection starts at zero, so training begins at latent averaging. The composition is permutation invariant by construction.
- One fixed-rank adapter: the frozen LoRA-generation head decodes the merged latent at the generator's original rank, regardless of the number of documents.
- Only the merger is trained: the language model, hypernetwork encoder, and generation head stay frozen. A separate merger is trained for each generator checkpoint.
- Trained on SQuAD tuples: the merger sees tuples of 2–5 training passages. We study both KL distillation from per-document adapters and cross-entropy on gold answers.
We evaluate the approach with D2L on Gemma-2-2B-it and SHINE on Qwen3-8B.
Results
We evaluate on SQuAD validation and MS MARCO, which is out of distribution for the SQuAD-trained merger. Each method produces one adapter per tuple of N passages. The model answers every question in that tuple using the same adapter, without the passages in its prompt. This tests per-document knowledge retention, not reasoning that combines facts across documents.
Tables 1 and 2 report token-overlap F1 × 100 (mean ± 95% confidence interval) for representative methods. These are not all asserted to have the same output rank. N = 10 exceeds the training tuple sizes. SVD denotes a rank-r approximation of the average weight update. Full results, including rank-concatenation and TIES baselines, appear in Tables 3–4 of the paper.
For context, using each question's own unmerged adapter scores 66.8 / 42.2 on SQuAD / MS MARCO for D2L and 56.8 / 38.1 for SHINE. Merging therefore still loses substantial information, particularly as N grows.
| SQuAD | MS MARCO | |||||
|---|---|---|---|---|---|---|
| Method | N = 2 | N = 5 | N = 10 | N = 2 | N = 5 | N = 10 |
| Factor averaging | 41.2±2.7 | 19.8±2.0 | 14.8±1.6 | 29.5±3.5 | 22.4±2.1 | 19.7±1.5 |
| SVD | 48.5±2.8 | 22.0±2.1 | 15.5±1.7 | 31.0±3.5 | 23.2±2.1 | 20.1±1.5 |
| DARE | 18.7±2.3 | 17.0±1.9 | 17.1±1.4 | 19.2±2.9 | 19.2±1.9 | 19.5±1.7 |
| Latent averaging | 47.6±2.8 | 25.2±2.5 | 18.6±1.7 | 31.3±3.5 | 23.5±2.2 | 20.7±1.5 |
| Latent Merger (ours) | 50.7±2.8 | 29.8±2.5 | 21.0±1.3 | 32.0±3.7 | 23.5±2.0 | 22.2±1.7 |
| SQuAD | MS MARCO | |||||
|---|---|---|---|---|---|---|
| Method | N = 2 | N = 5 | N = 10 | N = 2 | N = 5 | N = 10 |
| Factor averaging | 44.7±3.1 | 29.5±3.0 | 23.7±2.6 | 26.7±3.9 | 22.1±2.0 | 20.1±1.6 |
| SVD | 44.6±3.1 | 29.3±3.0 | 23.6±2.7 | 26.5±3.7 | 22.2±2.0 | 20.1±1.6 |
| DARE | 31.3±4.1 | 27.5±3.1 | 23.8±2.8 | 31.8±6.7 | 27.0±3.6 | 26.0±1.4 |
| Latent averaging | 45.4±3.0 | 30.6±2.8 | 23.5±2.5 | 29.5±3.6 | 22.9±2.1 | 20.9±1.5 |
| Latent Merger (ours) | 50.2±4.2 | 39.8±2.8 | 30.2±2.5 | 33.5±4.0 | 27.2±2.2 | 25.8±1.8 |
Discussion
- Learning improves on latent averaging, with uneven gains. Latent Merger's mean matches or exceeds latent averaging in all 12 settings shown. The largest gains are on SHINE SQuAD: 30.6 → 39.8 at N = 5 and 23.5 → 30.2 at N = 10. For D2L, gains are smaller and the confidence intervals overlap at every N on both datasets.
- The advantage is not universal. On SHINE MS MARCO, DARE's confidence intervals overlap Latent Merger's at every N. At N = 10, their means are 26.0 and 25.8, respectively.
- The comparison includes additional training. Latent Merger is learned; the baselines shown are training-free. This is not an equal-training-budget comparison.
Takeaway
For the two generators studied here, generated LoRAs are more aligned across documents and more spectrally concentrated than directly fine-tuned adapters. Combining their latents and decoding once offers a promising route to a single fixed-rank document memory. A learned merger improves retention over latent averaging, but scores remain below the per-document oracle and decline as more documents are combined. The evaluations focus on QA; non-QA and conflicting-source settings remain untested.
BibTeX
@inproceedings{yang2026empirical,
title = {Latent Merger: Latent-Space Composition of Hypernetwork-Generated LoRAs},
author = {Yang, Yanlai and Kang, Minki and Madaan, Divyam and Hwang, Sung Ju and Ren, Mengye},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026},
}