Manuscript Offprint

arXiv:2610.01934

Learning to Predict Distributions over Weight Updates for Test-Time Adaptation

Azal Ahmad Khan, Keshav Ramji, Tahira Naseem, Ali Anwar, Ramón Fernandez Astudillo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Hypernetworks have recently shown success in dynamically adapting the parameters of Large Language Models (LLMs) at runtime based on signals such as task descriptions or additional demonstrations. Here we ask: how much adaptation signal can be obtained using only the input query to an LLM? To answer this, we study query-conditioned hypernetworks for LoRA estimation. Further, we introduce distributional hypernetworks, able to produce not only point estimates of parameter adapters, but also a distribution over possible LoRAs. For this we propose a simple end-to-end loss using a differentiable Monte Carlo approximation and explore multiple distribution parameterizations including regression and convex combination variants. Results show that even using the mean of the learned distribution can outperform deterministic hypernetworks. Crucially, the learned distribution enables a different form of test-time scaling: instead of spending additional compute only by sampling more token sequences from a fixed model, we sample weight updates, yielding multiple adapted models for the same query. Performance improves as more weight samples are considered and remains stronger than corresponding token-sampling adaptation baselines. Finally, we find that generated updates can transfer across queries, suggesting that the hypernetwork learns reusable structure in how the model should adapt. Together, these results show that query-conditioned distributions over weight updates can support both adaptation and test-time scaling.

1 INTRODUCTION

Updating parameters in a Large Language Model (LLM) requires gradient-based optimization over multiple rounds with sufficient data. This is a brittle process that can lead to catastrophic forgetting, even when using parameter efficient adaptation such as LoRA [1]. Gradient-descent is therefore particularly unsuitable for altering parameters of models at test-time, where there is little or no supervision data available. Hypernetworks offer a promising alternative way to do this. A hypernetwork is a neural network that generates the weights of another network [2]. Hypernetworks are trained offline using ordinary backpropagation, but at inference time, they directly predict weight updates for a target network. The learned parameters of the hypernetwork can therefore be viewed as slow weights that learn how to produce fast weights for each new input [3, 4]. Unlike learned optimizers [5], the hypernetwork does not require gradients at inference time. It turns parameter adaptation from a repeated optimization process into a direct prediction.

Recent work has shown success using hypernetworks to generate LoRA adapters from natural-language task descriptions [6], or generate adapters from multiple demonstrations of related examples [7]. These methods allow gradient-free adaptation, but still require such auxiliary information to be available. Here, we propose to predict a LoRA directly from the language model input. The key intuition is that different queries may reveal regularities in how the model should adapt, allowing the hypernetwork to learn an implicit mapping from input structure to useful parameter updates rather than relying on an explicit task description. This leads to a broader question: how much adaptation signal is contained in a single query? Is it sufficient to determine a useful weight update? And if a single update is underdetermined, can the query instead constrain a useful distribution over

*✉ Correspondence: Azal Ahmad Khan khan1069@umn.edu

Figure

Figure 1: Distributional hypernetworks predict a query-conditioned distribution over LoRA updates. The regression hypernetworks model the distribution directly in LoRA weight space, while the mixing hypernetwork models a distribution over combinations of reference LoRAs.

plausible updates? To address this, we propose a simple differentiable Monte Carlo approximation of the marginal log-likelihood using two types of updates: Gaussian LoRA regression and convex combinations of LoRA exemplars, depicted in Figure 1. We explore multiple parameterization and optimization variants, such as weight correlations and loss aggregation, and compare our approach with a point-estimate hypernetwork.

Our experiments show a single query does indeed contain substantial adaptation signal. It suffices to generate useful LoRA updates without task descriptions or demonstrations, and can further support a distribution over plausible updates. The mean of the learned distribution outperforms deterministic hypernetworks by 4.6–11.7% accuracy across 9 benchmarks. More importantly, this distribution becomes a new axis for test-time scaling: sampling different adapted models is competitive with, and often stronger than, sampling additional outputs from fixed weights. The generated updates also exhibit reusable structure across queries, as distributions produced from one subset of inputs can be aggregated and successfully applied to held-out queries without re-invoking the hypernetwork.

Our contributions can be summarized as follows:

• We study how much adaptation signal can be extracted from a single query, showing that it is sufficient to generate useful query-conditioned LoRA updates without test-time optimization or task-level auxiliary information.

• We introduce distributional hypernetworks that predict a distribution over query-specific weight updates based on a simple differentiable Monte Carlo approximation.

• We introduce test-time scaling in weight space, where additional inference compute is used to sample alternative model updates rather than additional token sequences.

• We study the structure of the generated updates, including when query-specific generation becomes useful and whether generated adaptations generalize to other in-domain queries.

References (47)