Papers
Topics
Authors
Recent
Search
2000 character limit reached

Dynamic Parameter Memory (DPM)

Updated 6 July 2026
  • Dynamic Parameter Memory (DPM) is a mechanism that temporarily adjusts model parameters using context-dependent, inference-time memory updates.
  • It leverages both explicit key–value memory retrieval and temporary LoRA modules to overcome limitations like fixed context windows and catastrophic forgetting.
  • Empirical results in tasks such as image classification, language modeling, and emotion recognition demonstrate its ability to rapidly adapt and improve accuracy under shifting conditions.

Dynamic Parameter Memory (DPM) denotes mechanisms that use context-dependent, inference-time parameter updates to augment a base model with rapidly writable memory. In the formulation grounded in memory-based parameter adaptation, DPM stores embedded examples in a key–value memory and uses a retrieved local context to produce an adapted parameter set θx=θ+ΔM(x,θ)\theta^x = \theta + \Delta_M(x,\theta) for prediction (Sprechmann et al., 2018). In the later speech LLM formulation, DPM progressively encodes sentence-level information and emotions into a temporary LoRA module during inference, allowing a finite-window model to process unlimited-length audio without modifying the frozen backbone (Mai et al., 11 Jul 2025). This suggests a common principle: slowly learned global parameters are preserved, while sample-specific or dialogue-specific information is written into transient parameters that are discarded after use.

1. Origins, scope, and common abstraction

The 2018 formulation begins from a limitation of standard deep neural networks: they “very gradually incorporate information into weights as they process data, requiring very low learning rates,” so if “the training distribution shifts, the network is slow to adapt,” and when it does adapt it “typically performs badly on the training distribution before the shift” (Sprechmann et al., 2018). The proposed response is to “store examples in memory and then use a context-based lookup to directly modify the weights of a neural network,” enabling “much higher learning rates” for local adaptation and addressing “catastrophic forgetting, fast, stable acquisition of new knowledge, learning with an imbalanced class labels, and fast learning during evaluation.”

The 2025 formulation addresses a different bottleneck: in speech emotion recognition with SLLMs, “the inherently high frame rate in speech modality severely limits the signal processing and understanding capabilities of SLLM,” and a model with a “4K context window can only process 80 seconds of audio at 50Hz feature sampling rate before reaching its capacity limit” (Mai et al., 11 Jul 2025). Its solution is to write contextual semantics and sentence-level emotion encoding into a temporary LoRA during inference, so that the model “never exceeds its context window,” while the temporary parameters cumulatively “remember” prior sentences.

Aspect 2018 formulation 2025 formulation
Memory substrate Fixed-size circular buffer of key–value pairs Fresh temporary LoRA during inference
Update signal Retrieved neighbours from explicit memory Sentence-level autoregressive loss
Lifetime Local adaptation discarded after prediction Temporary LoRA discarded after final label

The two formulations are not identical implementations. However, both instantiate a dynamic-memory pattern in which the effective predictor is altered at test time by a local signal rather than by permanently changing the backbone. A plausible implication is that DPM is best understood not as a single architecture but as a design family for transient parameter writing.

2. Explicit key–value memory and local parameter adaptation

In the memory-based parameter adaptation formulation, the memory module is a collection of NN key–value pairs,

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.

Each key kiRdk_i \in \mathbb{R}^d is the embedding of an input example xix_i, produced by a learned embedding network fγf_\gamma:

ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.

Each value viv_i is the target associated with xix_i: for classification, the one-hot label yi{1,,C}y_i\in\{1,\dots,C\}; for regression, NN0 (Sprechmann et al., 2018). In practice, NN1 is implemented as a fixed-size circular buffer of capacity NN2, and when full, the oldest entries are overwritten.

Given a new query NN3, DPM computes similarity scores to stored keys by dot-product or, as specified in the paper, an inverse-distance kernel:

NN4

The mechanism then either selects the top NN5 keys or normalizes scores into weights,

NN6

where NN7 indexes the NN8 highest-scoring keys.

The central operation is local parameter adaptation. If NN9 denotes the base parameters of the output network, DPM constructs a local adapted parameter set

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.0

From a Bayesian/MAP view, the adapted parameters maximize a regularized log-posterior on the retrieved context,

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.1

with Gaussian prior

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.2

A single gradient step around M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.3 yields the local update

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.4

Equivalently,

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.5

followed by

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.6

In notation closer to weights M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.7, this is

M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.8

where M={(ki,vi)}i=1N.M = \{(k_i, v_i)\}_{i=1}^N.9 is the local learning rate.

The formalism makes DPM explicitly parametric at prediction time. Unlike methods that only average labels or logits in embedding space, the retrieved context induces a temporary reconfiguration of the predictor itself.

3. Learning regimes, algorithmic workflow, and computational properties

The learning-rate regime is bifurcated. Global training of kiRdk_i \in \mathbb{R}^d0 uses “a small learning rate (e.g. Adam with kiRdk_i \in \mathbb{R}^d1), ensuring stable, slow incorporation of data,” whereas inference-time or rapid local adaptation uses “a much larger local rate kiRdk_i \in \mathbb{R}^d2,” but only for “a handful kiRdk_i \in \mathbb{R}^d3 of gradient steps on the small context kiRdk_i \in \mathbb{R}^d4” (Sprechmann et al., 2018). Because kiRdk_i \in \mathbb{R}^d5 is discarded after prediction, DPM performs “fast, on-the-fly adaptation without disturbing the slowly evolving global parameters—hence no catastrophic forgetting.”

The training and inference procedures are correspondingly separated. During training, the model updates kiRdk_i \in \mathbb{R}^d6 by gradient descent on

kiRdk_i \in \mathbb{R}^d7

and appends each minibatch example to memory. During test-time adaptation, the model embeds the query, retrieves top-kiRdk_i \in \mathbb{R}^d8 memory items, computes kernel weights, accumulates local updates over kiRdk_i \in \mathbb{R}^d9, and predicts with xix_i0. This makes memory insertion continuous during training, while adaptation is activated only at evaluation time.

Several operational properties are specified. Memory capacity is fixed at xix_i1 and implemented as a circular buffer; empirically, performance “saturates around a few xix_i2 entries.” Retrieval can use approximate xix_i3-NN in xix_i4 “with e.g. FAISS,” while adaptation performs xix_i5 gradient steps with cost approximately xix_i6; in practice, “xix_i7 and xix_i8.” Evaluation is stable because xix_i9 is discarded per example, so “global behavior remains unchanged,” with “no long-term drift or forgetting.” The paper also attributes DPM’s behavior under class imbalance to local fitting that “automatically re-weights under-represented examples in memory, correcting global biases” (Sprechmann et al., 2018).

These properties position DPM between persistent training and stateless retrieval. The memory is persistent across samples, but the parameter change is ephemeral and query-conditioned.

4. Empirical behavior in supervised learning

The 2018 evaluation covers continual learning, large-scale image classification, and language modelling (Sprechmann et al., 2018). In continual learning on permuted MNIST, DPM “recovers accuracy on earlier tasks from only a few stored examples,” and “outperform[s] both MLP and Elastic Weight Consolidation (EWC) except at very small memory sizes.” The reported memory scale is modest: “memory sizes as small as 100–1 000 examples per task suffice.”

In incremental ImageNet classification, the setup is to “pre-train ResNet on half the classes; present the other half.” Under this protocol, DPM reaches “>64 % Top-1 on novel classes within 1 epoch (vs ~54 % for non-parametric and ~53 % mixture).” The paper further states that the “overall speed-vs-accuracy trade-off [is] far superior to fine-tuning or shallow mixture models.” Under class imbalance—specifically, when “half the new classes are under-sampled (×10 less data)”—DPM “still outperforms baselines by up to +10 % accuracy.”

In language modelling, the reported Penn Treebank baseline perplexity is “59.6 (PTB).” Adding a Neural cache yields “55.3,” DPM adaptation yields “54.3,” and “combining cache+DPM yields 54.4 (PTB).” On WikiText-2, “DPM+cache achieves 49.4 PPL vs 51.3 (cache alone), a −1.9 improvement,” and the “gains are strongest on rarer words.”

These results are consistent with the stated objective of rapid local adaptation under distributional shift, rare-event prediction, and imbalanced supervision. A plausible implication is that DPM is most effective when the retrieved context is semantically concentrated enough for a small number of gradient steps to provide a useful local correction.

5. Temporary LoRA DPM for long-sequence speech emotion recognition

The 2025 formulation instantiates DPM inside a speech LLM for emotion recognition in conversation (Mai et al., 11 Jul 2025). The input pipeline is “Raw audio → speech tokenizer (CosyVoice2, 25 Hz codebook) → discrete audio tokens fγf_\gamma0.” The tokenizer is expanded with three new token types: fγf_\gamma1, fγf_\gamma2, and the four emotion labels fγf_\gamma3, fγf_\gamma4, fγf_\gamma5, and fγf_\gamma6. These tokens are embedded into fγf_\gamma7 and fed into a frozen Llama2-7B backbone, with LoRA adapters of “rank = 64, fγf_\gamma8” inserted into every linear layer.

The training-stage “Emotion SLLM” uses two objectives per sentence. The audio autoregressive loss is

fγf_\gamma9

and the emotion classification loss is

ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.0

The final loss is

ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.1

Training uses “LR = ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.2 on LoRA parameters only; epochs = 20; batch size = 1.”

Inference with DPM freezes “all foundation weights, including original LoRA,” then spawns a fresh temporary LoRA with the same rank and ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.3. The model processes the conversation “sentence by sentence.” At the end of sentence ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.4, it takes the last ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.5 tokens as context, predicts sentence ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.6’s tokens, computes the autoregressive loss against the true tokens, and performs “one backward-and-update step only on the temporary LoRA.” After all sentences are processed, one ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.7 token is inferred as the sample’s emotion, and the temporary LoRA is discarded.

The LoRA parameterization is

ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.8

with ki=hi=fγ(xi)Rd.k_i = h_i = f_\gamma(x_i)\in\mathbb{R}^d.9, viv_i0, and viv_i1, viv_i2. The sentence-wise autoregressive loss is

viv_i3

and the temporary LoRA update is

viv_i4

with viv_i5 and viv_i6. The paper writes the memory at turn viv_i7 as

viv_i8

where viv_i9 is the gradient-descent update operator.

Because each step only consumes xix_i0 tokens of context, “the LLM never overflows its window,” while the temporary LoRA “cumulatively ‘remembers’ all prior sentences.” This yields a working-memory interpretation in which the temporary LoRA stores dialogue-local state and the frozen backbone functions as long-term memory.

6. Evaluation in emotion recognition in conversation

The experimental setting for the 2025 DPM uses “IEMOCAP (5 sessions, 5531 utterances),” a “4-class ERC (angry, happy/excited, sad, neutral),” and “LOSO (Leave-One-Session-Out)” (Mai et al., 11 Jul 2025). The backbone is “Llama2-7B with 32 k context window,” the speech tokenizer is “CosyVoice2, 25 Hz,” and the metrics are “Weighted Accuracy (WA), Unweighted Accuracy (UA), Weighted F1 (WF1).”

In the ablation on complete dialogues, SLLM-DPM reports “79.38 WA, 79.62 UA, 79.34 WF1,” compared with “72.82 WA, 73.34 UA, 73.58 WF1” for SLLM and “70.96 WA, 70.51 UA, 70.64 WF1” for the classifier. Across “all lengths (single to full),” SLLM-DPM reports “75.38 WA, 74.67 UA, 74.99 WF1,” compared with “73.15 WA, 71.98 UA, 73.12 WF1” for SLLM and “66.19 WA, 63.40 UA, 65.22 WF1” for the classifier. The paper summarizes the long-dialogue effect as follows: “On long dialogues (3–5 min), DPM yields +6.56 % WA over vanilla SLLM, +8.42 % over classifier.” “Across all lengths, DPM still gives +2.23 % WA.”

In the reported SOTA comparison, the listed results are: ESA-CRF with “73.17 WA, 74.47 UA”; MER-HAN with “73.33 WA, 74.20 UA, 73.66 WF1”; Mi-CGA with “73.77 WF1”; GatedxLSTM with “76.34 WA, 75.97 WF1”; MERITS-L with “77.95 WF1”; and DPM with “79.38 WA, 79.62 UA, 79.34 WF1.” The context-window ablation further reports “One-time inference WA: 4 k window → 69.59 vs. 32 k → 72.85,” which the paper states “verifies that full context benefits emotion understanding, motivating DPM.”

These measurements support the specific claim made by the paper: DPM improves the emotion recognition capabilities of SLLM when processing long audio sequences. More narrowly, they indicate that sentence-wise temporary adaptation is most consequential when full conversational context is otherwise inaccessible due to context-window limits.

7. Relation to adjacent methods, misconceptions, and limitations

The 2018 work explicitly situates memory-based parameter adaptation relative to other dynamic-memory methods (Sprechmann et al., 2018). “Neural Cache / Pointer Sentinel” perform “non-parametric interpolation at the output layer by summing recent word scores,” whereas DPM “fine-tunes the entire output network locally.” “Differentiable Neural Dictionary (DND / NEC)” also uses a key–value store plus xix_i1-NN lookup, but it “uses a nearest-neighbour Q-value lookup in RL”; DPM instead “uses retrieved values to back-propagate and adapt weights.” “Matching / Prototypical Networks” perform a “kernel-weighted average of labels in embedding space,” while DPM “generalises this by fitting a parametric local model, not just a constant.” “MAML / Meta-Learner LSTM” learn an initialization for fast gradient-based adaptation on new tasks, but DPM “does not meta-learn per-task gradients,” instead relying on “an explicit memory of past examples to guide adaptation at inference.”

The 2025 work presents a closely related contrast in a different architectural regime (Mai et al., 11 Jul 2025). Its DPM is not an external key–value store; the memory is identified with the evolving temporary LoRA, xix_i2. This can be read as a shift from explicit memory retrieval to implicit memory accumulation. A plausible implication is that the same high-level idea—local, transient parameter writing—can be implemented either by retrieving examples from memory or by recursively updating a temporary adapter with self-supervised losses.

Several limitations and concerns are stated directly. For the speech-LM formulation, the authors note an “efficiency vs. performance trade-off (many gradient steps per sample),” that “alternative stepping strategies (e.g. fixed strides larger than one sentence) remain unexplored,” and “privacy concerns when tracking a user’s emotional history over long conversations.” For the key–value formulation, computational cost depends on retrieval and local gradient steps, although the paper characterizes retrieval as approximate xix_i3 and local adaptation as approximately xix_i4.

A common misconception is to treat DPM as merely another retrieval layer or cache. The cited works do not support that simplification. In both cases, the defining operation is parameter adaptation at inference time: in one case by local MAP over retrieved examples, and in the other by updating a temporary LoRA. Another misconception is that DPM permanently rewrites the model. The sources instead emphasize that the local update is discarded after prediction or after the sample is processed, preserving the slowly evolving global parameters.

Across both formulations, DPM can therefore be characterized as a transient-memory approach that sits between static parametric models and purely non-parametric retrieval systems. Its technical identity lies in converting local context into short-lived parameter changes, thereby extending adaptability without requiring continual permanent fine-tuning.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Dynamic Parameter Memory (DPM).