betaFeedback

WorksComputer Science

Dynamic Positional Attention Modulation for Parameter-Efficient Fine-Tuning of Large Language Models

Abstract

Parameter-efficient fine-tuning (PEFT) has become a standard approach for adapting large language models to downstream tasks. However, most existing PEFT methods rely on uniform and static adaptations, without accounting for the structured heterogeneity of attention across dimensions, heads, layers, and input tokens. In practice, attention representations exhibit non-uniform behavior, and positional encoding mechanisms such as rotary positional embeddings (RoPE) induce dimension-dependent positional structure, making uniform adaptation suboptimal. In this work, we propose DyPAM (Dynamic Positional Attention Modulation), a PEFT method that adapts how positional information contributes to attention by operating directly on the query and key representations. DyPAM combines input-conditioned, dimension-wise modulation with head-wise and layer-wise structural modulation, performing fine-grained adaptation of positional attention aligned with the RoPE-induced structure without modifying the pretrained backbone. Extensive experiments on mathematical and commonsense reasoning benchmarks across multiple backbone models demonstrate that DyPAM consistently outperforms existing strong PEFT baselines.

CCS Concepts

• Information systems → Data mining; • Computing methodologies → Artificial intelligence.

Keywords

Large Language Models, Parameter-Efficient Fine-Tuning, Positional Attention, Attention Modulation

ACM Reference Format:

Dayan Pan, Jingyuan Wang, and Xie Yu. 2026. Dynamic Positional Attention Modulation for Parameter-Efficient Fine-Tuning of Large Language Models. In Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining V.2 (KDD ’26), August 09–13, 2026, Jeju Island, Republic of Korea. ACM, New York, NY, USA, 12 pages. https://doi.org/10.1145/3770855.3817911

Resource Availability:

The source code of this paper has been made publicly available at https://doi.org/10.5281/zenodo.20507186.

Introduction

Large language models (LLMs) have been widely adopted across a broad range of real-world applications, including question answering, code generation, and mathematical reasoning [5, 31, 53, 54]. Despite their strong general-purpose capabilities, different application scenarios and downstream tasks often impose substantially different requirements on model behavior. Effectively adapting an LLM to diverse task-specific requirements is essential in practical deployment [24, 25, 56, 61].

Full-parameter fine-tuning for a specific task is effective but computationally and storage intensive, which limits its practicality in many settings. Parameter-efficient fine-tuning (PEFT) addresses this issue by updating only a small subset of parameters while keeping the backbone model frozen, achieving a favorable balance between efficiency and performance [14, 26, 32, 35]. Representative PEFT methods include LoRA [16], which reparameterizes weight updates into a low-rank subspace, IA³ [28], which modulates intermediate activations via lightweight scaling vectors, BOFT [29], which applies orthogonality-constrained multiplicative transformations with butterfly factorization, and Bone [21], which introduces block-wise affine updates with shared parameters.

Despite their strong empirical performance, most existing PEFT methods apply additional parameters in a largely uniform manner across layers, attention heads, and feature dimensions (i.e., individual dimensions of the hidden representations), and therefore lack mechanisms to account for the structured and heterogeneous roles of different model components in a fine-grained manner.

Figure 1 visualizes attention activation patterns of Llama-3.2-3B, focusing on the query (Q) representations used in self-attention. Similar heterogeneous patterns are also observed for key (K) representations, while such patterns are not significant for value (V) representations. Activations vary substantially across query dimensions, attention heads, and layers. As shown in Figure 1(a), attention exhibits distinct activation patterns across dimensions at different

Figure 1. Activation heterogeneity in a pretrained Llama-3.2-3B model. The x-axis in (a), (b), and (d) indexes query dimensions of attention mechanism. Activation patterns vary across layers (a), heads (b), and input token types (c, d), indicating that attention operates heterogeneously across dimensions, heads, layers, and tokens.

Corresponding authors.

This work is licensed under a Creative Commons Attribution 4.0 International License.

KDD ’26, Jeju Island, Republic of Korea

© 2026 Copyright held by the owner/author(s).

ACM ISBN 979-8-4007-2592-2/2026/08

https://doi.org/10.1145/3770855.3817911 layers, indicating that different dimensions contribute differently to attention. Figure 1(b) further shows clear head-wise variation within the same layer, indicating that different attention heads exhibit distinct activation patterns. Figure 1(c) and (d) show that activation patterns also depend on the input tokens. Tokens with different semantic roles induce systematically different activation distributions, both when aggregated across dimensions and when examined at the level of individual dimensions for a fixed head and layer. Together, these visualizations demonstrate that attention in pretrained LLMs operates in a structured and heterogeneous manner across dimensions, heads, layers, and input tokens.

Such heterogeneous activation patterns are consistent with the fact that different components of LLMs play distinct functional roles [58]. Recent studies have shown that Transformer modules are not functionally uniform, with different layers and components specializing in different aspects [11]. For example, feed-forward networks have been shown to primarily store factual information [33], while attention mechanisms are more closely associated with contextual interaction [7]. Within the attention module, architectural design choices further introduce structured differences in how information is processed. In particular, positional encoding mechanisms in Transformer-based LLMs introduce structured differences in internal representations, resulting in non-uniform usage of attention dimensions across layers and heads [2, 20]. Beyond structural differences across model components, attention behavior also varies with the input, where different tokens can induce different activation patterns depending on their semantic roles and contextual requirements [18, 51]. Taken together, these findings suggest that LLMs exhibit intrinsic functional heterogeneity across components and inputs, and effective adaptation methods should account for such fine-grained structural differences.

These observations suggest three requirements for structure-aware adaptation. First, adaptation should distinguish attention dimensions, since different dimensions exhibit different positional and functional behaviors. Second, it should account for head-wise and layer-wise differences, because the same dimension can play different roles across attention heads and network depths. Third, adaptation should remain input-conditioned, as different tokens and contexts can induce different attention activation patterns. This provides a direct way to adapt dependency modeling while keeping the original attention architecture unchanged.

Motivated by these observations, we propose DyPAM (Dynamic Positional Attention Modulation), a PEFT method that adapts how positional information contributes to attention. DyPAM addresses attention heterogeneity from two complementary perspectives. It combines input-conditioned, dimension-wise modulation with head-wise and layer-wise structural modulation to adapt attention behavior. In contrast to prior PEFT methods that apply static adaptation shared across inputs, DyPAM models heterogeneity jointly at the token, dimension, head, and layer levels, and aligns the modulation with the RoPE-induced dimension pairing. Extensive experiments across multiple models and tasks demonstrate the effectiveness of this design.

We summarize the main contributions of this work as follows:

  • We propose DyPAM, the first parameter-efficient fine-tuning method that explicitly adapts large language models by modulating positional attention in a fine-grained and structured manner.

  • DyPAM introduces input-conditioned, dimension-wise modulation, enabling different attention dimensions to be dynamically adjusted according to the input context.

  • DyPAM further incorporates head-wise and layer-wise structural modulation, allowing different attention heads and network layers to maintain distinct positional preferences.

  • Extensive experiments across multiple backbone models and downstream tasks demonstrate the effectiveness and robustness of DyPAM compared to existing PEFT methods.

Preliminaries

We briefly review the attention mechanism, Rotary Position Embedding (RoPE), and parameter-efficient fine-tuning (PEFT), which provide the necessary background for describing our method.

Attention in Large Language Models

Large language models are typically built upon the Transformer architecture [48], where self-attention is the core mechanism for modeling interactions among tokens. Given an input sequence, each layer ℓ\ell of the model produces a sequence of hidden states H(ℓ)=[h1(ℓ),h2(ℓ),…,hT(ℓ)]H^{(\ell)} = [h_1^{(\ell)}, h_2^{(\ell)}, \ldots, h_T^{(\ell)}], where ht(ℓ)∈Rdh_t^{(\ell)} \in\mathbb{R}^d denotes the hidden representation of the tt-th token. In each attention layer, the hidden states are linearly projected into query, key, and value representations,

Q(ℓ)=H(ℓ)WQ(ℓ),K(ℓ)=H(ℓ)WK(ℓ),V(ℓ)=H(ℓ)WV(ℓ),(1)Q^{(\ell)} = H^{(\ell)}W_Q^{(\ell)}, \quad K^{(\ell)} = H^{(\ell)}W_K^{(\ell)}, \quad V^{(\ell)} = H^{(\ell)}W_V^{(\ell)}, \tag*{(1)}

where WQ(ℓ),WK(ℓ),WV(ℓ)∈Rd×dW_Q^{(\ell)}, W_K^{(\ell)}, W_V^{(\ell)} \in\mathbb{R}^{d \times d} are learned projection matrices.

The projected representations are then reshaped into HH attention heads. For each head h∈{1,…,H}h \in\{1, \ldots, H\}, we denote the per-head matrices as Q(ℓ,h),K(ℓ,h),V(ℓ,h)∈RT×dheadQ^{(\ell,h)}, K^{(\ell,h)}, V^{(\ell,h)} \in\mathbb{R}^{T \times d_{\mathrm{head}}}, where dhead=d/Hd_{\mathrm{head}} = d/H. For a given token position tt, we denote by qt(ℓ,h)∈Rdheadq_t^{(\ell,h)} \in\mathbb{R}^{d_{\mathrm{head}}} and kt(ℓ,h)∈Rdheadk_t^{(\ell,h)} \in\mathbb{R}^{d_{\mathrm{head}}} the query and key vectors corresponding to the tt-th token. We further denote by qt,j(ℓ,h)q_{t,j}^{(\ell,h)} the jj-th feature dimension of qt(ℓ,h)\mathbf{q}_{t}^{(\ell,h)}. Self-attention is computed independently for each head. For head hh at layer ℓ\ell, the attention output is given by

Attn⁡(Q(ℓ,h),K(ℓ,h),V(ℓ,h))=softmax⁡(Q(ℓ,h)K(ℓ,h)⊤dhead)V(ℓ,h).(2)\operatorname{Attn}\left(\mathbf{Q}^{(\ell,h)},\mathbf{K}^{(\ell,h)},\mathbf{V}^{(\ell,h)}\right)=\operatorname{softmax}\left(\frac{\mathbf{Q}^{(\ell,h)}\mathbf{K}^{(\ell,h)\top}}{\sqrt{d_{\mathrm{head}}}}\right)\mathbf{V}^{(\ell,h)}. \tag*{(2)}

Notably, the attention operation itself is permutation-invariant and does not encode positional order [38]. As a result, positional information must be explicitly incorporated into the attention computation. Modern LLMs achieve this by applying position-dependent transformations to the query and key representations.

Rotary Position Embedding

Rotary Position Embedding (RoPE) [45] incorporates positional information into attention by applying position-dependent transformations to the query and key representations. For each attention head, RoPE views the per-head vector as two halves of equal size: a “real” part and an “imaginary” part, each of dimension dhead/2d_{\mathrm{head}}/2. RoPE then applies a 2D rotation to each index ii by jointly rotating the paired components (zireal,ziimag)(z_i^{\mathrm{real}},z_i^{\mathrm{imag}}). As a consequence, the two halves share the same rotation at each index, and thus exhibit closely related positional behavior across corresponding dimensions.

The rotations vary across dimensions, resulting in different positional behaviors. Figure 2 visualizes this effect, showing that different attention dimensions respond differently to relative positional distances in a non-uniform and multi-scale manner. As a result, different attention dimensions play different roles in encoding positional information, which motivates treating them differently when adapting positional attention.

Figure 2. Position-dependent responses across attention dimensions induced by RoPE. (a) Different dimensions respond differently to relative positional distances. (b) Heatmap of all dimensions, showing non-uniform positional sensitivity.

Parameter-Efficient Fine-Tuning

Parameter-efficient fine-tuning (PEFT) adapts LLMs by introducing lightweight transformations, while keeping the pretrained backbone fixed. We describe PEFT by applying a constrained transformation to an intermediate representation zz in the model. Formally, the adapted representation can be written as

z′=T(z;θ),(3)z'=\mathcal{T}(z;\theta), \tag*{(3)}

where T(⋅;θ)\mathcal{T}(\cdot;\theta) denotes a parameter-efficient transformation with a small number of trainable parameters θ\theta. Many existing PEFT methods adopt an additive update,

z′=z+Δz,Δz=A(z;θ),(4)z'=z+\Delta z,\qquad\Delta z=\mathcal{A}(z;\theta), \tag*{(4)}

where the adaptation module A(⋅)\mathcal{A}(\cdot) is typically applied in a static and largely uniform manner across model components.

While effective, this formulation typically applies the same adaptation mechanism uniformly across layers, attention heads, feature dimensions, and input tokens. However, attention behavior in modern LLMs is highly heterogeneous, particularly in how positional information is encoded. This motivates PEFT approaches that perform fine-grained and structure-aware adaptation.

In this work, we follow the PEFT paradigm and apply multiplicative modulation to attention representations:

z′=s(x)⊙z,s(x)=M(x;θ),(5)z'=s(x)\odot z,\qquad s(x)=\mathcal{M}(x;\theta), \tag*{(5)}

where s(x)s(x) is an input-conditioned modulation signal and ⊙\odot denotes element-wise multiplication. In DyPAM, this modulation is applied to the query and key representations in attention and indexed by the internal structure of attention, including layers, heads, tokens, and feature dimensions. Both formulations follow the same parameter-efficient adaptation paradigm. The key difference is that DyPAM performs input-conditioned, structure-aware modulation, enabling fine-grained adaptation of positional attention.

Method

In this section, we introduce DyPAM, a PEFT method for LLMs that explicitly modulates positional information in attention. We first present an overview of the DyPAM framework and its core design principles, and then describe each component in detail.

Framework Overview

In RoPE-based LLMs, attention exhibits heterogeneous behavior across feature dimensions, layers, heads, and input tokens. However, most existing PEFT methods rely on uniform and static adaptation mechanisms, without accounting for such heterogeneity.

To address this limitation, we propose Dynamic Positional Attention Modulation (DyPAM), a parameter-efficient fine-tuning method that adapts how positional information contributes to attention. DyPAM operates directly on the query and key representations and jointly models input-conditioned, dimension-wise modulation together with head-wise and layer-wise structural modulation, enabling fine-grained and structured adaptation of positional attention. As illustrated in Figure 3, DyPAM introduces modulation into attention representations in a manner aligned with the internal structure of attention and conditioned on the input. The two modulation sources play different roles. The input-conditioned component captures token-dependent variation by generating modulation features from hidden states. The structural bias terms capture persistent preferences associated with heads and layers. Their combination allows DyPAM to adapt to each input while maintaining stable structural differences across the attention hierarchy.

Figure 3. The architecture of DyPAM framework. DyPAM applies input-conditioned, dimension-wise modulation together with head-wise and layer-wise structural biases to the query and key representations before RoPE, enabling fine-grained adaptation of positional attention within the PEFT paradigm.

In the following, we present DyPAM by detailing how the modulation is constructed and how it is applied to attention representations, and summarize the overall procedure in Algorithm 1.

Query–Key Representations and Modulation Features

DyPAM operates on the query and key representations used in self-attention. At each Transformer layer ℓ\ell, these representations are derived from the token-level hidden states H(ℓ)∈RB×T×dH^{(\ell)} \in\mathbb{R}^{B \times T \times d}, where BB is the batch size, TT is the sequence length, and dd is the model dimension. Following the standard attention formulation described in § 2.1, the hidden states are linearly projected to obtain the query and key matrices Q(ℓ)Q^{(\ell)} and K(ℓ)K^{(\ell)}, which are subsequently reshaped into per-head representations Q(ℓ,h)Q^{(\ell,h)} and K(ℓ,h)K^{(\ell,h)} as defined in Eq. (1).

To enable input-conditioned adaptation of attention behavior, DyPAM derives modulation features directly from the same hidden states H(ℓ)H^{(\ell)}. Since the hidden states encode token-specific contextual information, the resulting modulation features are token-dependent and differ across inputs, providing the basis for input-conditioned modulation. Concretely, we apply a lightweight low-rank projection to the hidden states, yielding modulation features:

M(ℓ)=H(ℓ)A(ℓ)B(ℓ),M(ℓ)∈RB×T×(Hde),(6)M^{(\ell)} = H^{(\ell)} A^{(\ell)} B^{(\ell)}, \qquad M^{(\ell)} \in\mathbb{R}^{B \times T \times(H d_e)}, \tag*{(6)}

where A(ℓ)∈Rd×rA^{(\ell)} \in\mathbb{R}^{d \times r} and B(ℓ)∈Rr×(H⋅de)B^{(\ell)} \in\mathbb{R}^{r \times(H \cdot d_e)} are learnable matrices with rank r≪dr \ll d, HH is the number of attention heads, and ded_e denotes the feature dimension per head.

The projected features are reshaped into HH head-specific components, yielding modulation features mt,h(ℓ)∈Rdem_{t,h}^{(\ell)} \in\mathbb{R}^{d_e} for each token position tt and attention head hh. These features encode contextual information associated with each token and attention head, capturing how the current input is represented at different heads within the layer. They serve as an intermediate representation that bridges the token-level hidden states and the dimension-wise modulation subsequently applied to the query and key representations.

Input-Conditioned Dimension-Wise Modulation

Given the modulation features constructed from the hidden states, DyPAM maps them to dimension-wise modulation values that are aligned with the query and key representations in attention. This mapping determines how the contribution of each attention dimension is modulated in an input-conditioned manner, allowing the model to dynamically adjust the influence of each dimension. By conditioning on both the token and its context, DyPAM enables fine-grained control over how positional information is utilized across different attention dimensions.

For each layer ℓ\ell, DyPAM introduces learnable dimension embedding matrices that project modulation features to the attention dimension space. Concretely, for the query and key representations, we use separate embedding matrices

EQ(ℓ)∈Rdhead2×de,EK(ℓ)∈Rdhead2×de,(7)E_Q^{(\ell)} \in\mathbb{R}^{\frac{d_{\mathrm{head}}}{2} \times d_e}, \qquad E_K^{(\ell)} \in\mathbb{R}^{\frac{d_{\mathrm{head}}}{2} \times d_e}, \tag*{(7)}

where each row corresponds to one pair of attention dimensions. This design reflects the structure induced by RoPE, where each pair of dimensions shares the same positional rotation and therefore exhibits similar positional behavior. By assigning a single modulation value to each dimension pair, DyPAM reduces parameter overhead while respecting the RoPE-induced structure. This pair-wise sharing also avoids assigning unrelated modulation values to two coordinates that jointly represent the same rotated subspace. In this way, DyPAM changes the strength of each RoPE-aligned channel without breaking the internal pairing used by the positional transformation. This also supports grouped-query attention (GQA) [1], where multiple attention heads share key and value projections. In such cases, the key-side modulation is shared across heads that use the same key representation, while the query-side modulation remains head-specific.

Given the modulation feature mt,h(ℓ)∈Rdem_{t,h}^{(\ell)} \in\mathbb{R}^{d_e} for token position tt and attention head hh, the dimension-wise modulation scores for queries and keys are computed as

gt,h,Q(ℓ)=EQ(ℓ)mt,h(ℓ),gt,h,K(ℓ)=EK(ℓ)mt,h(ℓ),(8)\mathbf{g}_{t,h,Q}^{(\ell)} = \mathbf{E}_{Q}^{(\ell)}m_{t,h}^{(\ell)}, \qquad\mathbf{g}_{t,h,K}^{(\ell)} = \mathbf{E}_{K}^{(\ell)}m_{t,h}^{(\ell)}, \tag*{(8)}

where gt,h,Q(ℓ),gt,h,K(ℓ)∈Rdhead/2\mathbf{g}_{t,h,Q}^{(\ell)}, \mathbf{g}_{t,h,K}^{(\ell)} \in\mathbb{R}^{d_{\mathrm{head}}/2} denote the modulation scores for query and key dimension pairs, respectively. Each entry corresponds to one RoPE dimension pair, and we use ii to index dimension pair ii.

At this stage, the modulation scores provide input-conditioned, dimension-wise adjustments for the query and key representations.

Discussion. Input-conditioned dimension-wise modulation enables DyPAM to adapt the contribution of individual attention dimensions based on the input context. By aligning modulation with RoPE-induced dimension pairing, DyPAM selectively adjusts how positional information influences attention, while maintaining parameter efficiency. This mechanism provides fine-grained control over positional attention that is sensitive to both token-level context and the structured organization of attention dimensions.

Head-Wise and Layer-Wise Structural Modulation

While input-conditioned dimension-wise modulation captures token-dependent variation, attention behavior also exhibits differences across attention heads and network layers. To model such structure-level heterogeneity, DyPAM introduces head-wise and layer-wise structural modulation that is independent of the input.

For each layer ℓ\ell, DyPAM maintains layer-wise bias vectors

βQ(ℓ),βK(ℓ)∈Rdhead/2,(9)\boldsymbol{\beta}_{Q}^{(\ell)}, \boldsymbol{\beta}_{K}^{(\ell)} \in\mathbb{R}^{d_{\mathrm{head}}/2}, \tag*{(9)}

which capture layer-specific preferences over attention dimension pairs for the query and key representations. In addition, for each attention head hh at layer ℓ\ell, DyPAM introduces head-wise bias vectors

βh,Q(ℓ),βh,K(ℓ)∈Rdhead/2,(10)\boldsymbol{\beta}_{h,Q}^{(\ell)}, \boldsymbol{\beta}_{h,K}^{(\ell)} \in\mathbb{R}^{d_{\mathrm{head}}/2}, \tag*{(10)}

allowing different heads within the same layer to maintain distinct structural biases. Here the subscripts QQ and KK indicate that the query and key representations use separate bias vectors of the same shape. These bias terms are added to the dimension-wise modulation scores. For queries and keys, the structurally augmented modulation scores are given by

g~t,h,Q(ℓ)=gt,h,Q(ℓ)+βh,Q(ℓ)+βQ(ℓ),(11)\widetilde{\mathbf{g}}_{t,h,Q}^{(\ell)} = \mathbf{g}_{t,h,Q}^{(\ell)} + \boldsymbol{\beta}_{h,Q}^{(\ell)} + \boldsymbol{\beta}_{Q}^{(\ell)}, \tag*{(11)}
g~t,h,K(ℓ)=gt,h,K(ℓ)+βh,K(ℓ)+βK(ℓ),(12)\widetilde{\mathbf{g}}_{t,h,K}^{(\ell)} = \mathbf{g}_{t,h,K}^{(\ell)} + \boldsymbol{\beta}_{h,K}^{(\ell)} + \boldsymbol{\beta}_{K}^{(\ell)}, \tag*{(12)}

where gt,h,Q(ℓ)\mathbf{g}_{t,h,Q}^{(\ell)} and gt,h,K(ℓ)\mathbf{g}_{t,h,K}^{(\ell)} are the input-conditioned dimension-wise scores from § 3.3. The bias terms are shared across token positions and encode structural preferences that persist across inputs.

At this stage, the modulation scores integrate input-conditioned, dimension-wise adjustments with head-wise and layer-wise structural biases, capturing both token-dependent variation and persistent structural preferences in attention. These scores are then transformed into bounded modulation factors and applied to the query and key representations.

Algorithm 1 DyPAM: Dynamic Positional Attention Modulation

Input: Input sequence x=(x1,…,xT)\mathbf{x} = (x_1, \ldots, x_T), pretrained RoPE-based LLM, DyPAM parameters

Output: Model output distribution and training loss L\mathcal{L}

  1. Obtain token embeddings from x\mathbf{x}

  2. for each Transformer layer ℓ=1,…,L\ell= 1, \ldots, L do

  3.     Compute hidden states H(ℓ)\mathbf{H}^{(\ell)}

  4.     Project hidden states to query and key representations Q(ℓ),K(ℓ)\mathbf{Q}^{(\ell)}, \mathbf{K}^{(\ell)} according to Eq. (1)

  5.     Reshape Q(ℓ),K(ℓ)\mathbf{Q}^{(\ell)}, \mathbf{K}^{(\ell)} into per-head representations Q(ℓ,h),K(ℓ,h)\mathbf{Q}^{(\ell,h)}, \mathbf{K}^{(\ell,h)}

  6.     Construct modulation features from hidden states mt,h(ℓ)\mathbf{m}_{t,h}^{(\ell)} according to Eq. (6)

  7.     Compute input-conditioned, dimension-wise modulation scores gt,h,Q(ℓ),gt,h,K(ℓ)\mathbf{g}_{t,h,Q}^{(\ell)}, \mathbf{g}_{t,h,K}^{(\ell)} according to Eq. (8)

  8.     Add head-wise and layer-wise structural biases g~t,h,Q(ℓ),g~t,h,K(ℓ)\widetilde{\mathbf{g}}_{t,h,Q}^{(\ell)}, \widetilde{\mathbf{g}}_{t,h,K}^{(\ell)} according to Eqs. (11) and (12)

  9.     Normalize modulation scores to obtain modulation factors st,h,i(ℓ)\mathbf{s}_{t,h,i}^{(\ell)} according to Eq. (13)

  10.     Apply modulation to query and key representations Q^(ℓ,h),K^(ℓ,h)\widehat{\mathbf{Q}}^{(\ell,h)}, \widehat{\mathbf{K}}^{(\ell,h)} according to Eq. (14)

  11.     Apply RoPE to modulated query and key representations

  12.     Compute attention outputs using modulated queries and keys

  13. end for

  14. Compute model outputs and training loss L\mathcal{L} using Eq. (15)

Applying Modulation in Attention

The combined modulation scores obtained from the previous steps encode both input-conditioned and structural adjustments over attention dimensions. We next apply a normalization step that maps these scores to bounded modulation factors, ensuring stable and controlled adaptation.

Here, g~t,h,i(ℓ)\widetilde{g}_{t,h,i}^{(\ell)} denotes the modulation score for dimension pair ii in the combined score vector for the query or key representation at layer ℓ\ell, head hh, and token position tt. For brevity, we omit the explicit Q/KQ/K subscript when the formulation applies identically to both. For each layer ℓ\ell, token position tt, attention head hh, and dimension pair ii, the normalized modulation factor is computed as

st,h,i(ℓ)=1+α⋅(σ(g~t,h,i(ℓ))−0.5),(13)s_{t,h,i}^{(\ell)} = 1 + \alpha\cdot\left(\sigma\left(\widetilde{g}_{t,h,i}^{(\ell)}\right) - 0.5\right), \tag*{(13)}

where σ(⋅)\sigma(\cdot) is the sigmoid function and α\alpha controls the modulation strength. This normalization maps the modulation factors to a bounded interval [1−α2,1+α2]\left[1 - \frac{\alpha}{2}, 1 + \frac{\alpha}{2}\right], centering them around the original scale and preventing deviation from the pretrained representations.

The modulation factors are applied to the query and key representations before positional encoding. Let qt,i(ℓ,h)∈R2\mathbf{q}_{t,i}^{(\ell,h)} \in\mathbb{R}^{2} and kt,i(ℓ,h)∈R2\mathbf{k}_{t,i}^{(\ell,h)} \in\mathbb{R}^{2} denote the paired dimensions of the query and key vectors corresponding to dimension pair ii. Both dimensions within each pair are modulated using the same factor:

q^t,i(ℓ,h)=st,h,i(ℓ)⋅qt,i(ℓ,h),k^t,i(ℓ,h)=st,h,i(ℓ)⋅kt,i(ℓ,h).(14)\widehat{\mathbf{q}}_{t,i}^{(\ell,h)} = s_{t,h,i}^{(\ell)} \cdot\mathbf{q}_{t,i}^{(\ell,h)}, \qquad\widehat{\mathbf{k}}_{t,i}^{(\ell,h)} = s_{t,h,i}^{(\ell)} \cdot\mathbf{k}_{t,i}^{(\ell,h)}. \tag*{(14)}

This operation corresponds to the multiplicative PEFT formulation introduced in Eq. (5), where the pretrained representation $\mathbf{z} … corresponds to the query or key vectors, and the modulation signal s(x)s(\mathbf{x}) is indexed by layer, head, token position, and dimension pair. Following the convention above, st,h,i(f)s_{t,h,i}^{(f)} is computed independently for the query and key sides from their respective scores g~t,h,Q(ℓ)\tilde{g}_{t,h,Q}^{(\ell)} and g~t,h,K(ℓ)\tilde{g}_{t,h,K}^{(\ell)}, so the query and key representations are modulated by their own factors. As the two coordinates within each pair share the same factor, the modulation signal s(x)s(\mathbf{x}) takes a common value over each pair and thus spans the full dheadd_{\mathrm{head}} dimensions of the query and key vectors. The modulated query and key representations are then passed through the RoPE mechanism and used in the standard attention computation. By applying modulation prior to RoPE, DyPAM aligns adaptation with the RoPE-induced positional structure.

More broadly, DyPAM addresses attention heterogeneity by jointly modeling input-conditioned, dimension-wise modulation and head-wise, layer-wise structural modulation. This design enables attention dimensions to adapt to input context, while allowing different heads and layers to maintain distinct positional preferences. Rather than introducing uniform parameter updates, DyPAM performs targeted modulation aligned with how positional information is encoded and utilized in attention. As a result, DyPAM provides a structured and fine-grained mechanism for adapting positional attention within the PEFT paradigm.

Training Details

DyPAM is trained end-to-end using the standard cross-entropy loss for language modeling. Given an input sequence x=(x1,…,xT)\mathbf{x} = (x_1, \ldots, x_T) and the corresponding target sequence y=(y1,…,yT)\mathbf{y} = (y_1, \ldots, y_T), the training loss is defined as

L=−∑t=1Tlog⁡p(yt∣x≤t),(15)\mathcal{L} = -\sum_{t=1}^{T} \log p(y_t \mid x_{\leq t}), \tag*{(15)}

where p(yt∣x≤t)p(y_t \mid x_{\leq t}) denotes the model output distribution at position tt. The model is parameterized by the pretrained backbone together with the DyPAM parameters. Algorithm 1 summarizes the overall forward computation and training procedure.

Experiments

This section evaluates DyPAM across tasks, models, and experimental settings. Our experimental design is organized around a set of research questions that assess overall performance, scalability across model sizes, component contributions, and learned positional modulation behavior.

Specifically, we investigate the following research questions:

  • RQ1: Does DyPAM outperform existing PEFT methods with comparable numbers of trainable parameters?

  • RQ2: Is DyPAM effective across different backbone model sizes?

  • RQ3: Which components of DyPAM contribute most to its performance?

  • RQ4: How sensitive is DyPAM to its hyperparameters?

  • RQ5: What positional modulation patterns does DyPAM learn?

We first introduce the experimental setup, followed by a systematic evaluation of DyPAM with respect to each research question.

Experimental Setup

Datasets. We evaluate DyPAM on mathematical and commonsense reasoning tasks with distinct reasoning patterns and positional sensitivity, and train on two datasets drawn from multiple existing benchmarks [17], emphasizing multi-step arithmetic and general commonsense reasoning, respectively. Mathematical reasoning performance is evaluated on GSM8K [9], AQuA [27], MAWPS [23], AddSub [15], MultiArith [42], SingleEq [22], and SVAMP [37], while commonsense reasoning is evaluated on BoolQ [6], PIQA [4], Social IQA [44], ARC-Easy and ARC-Challenge [8], OpenBookQA [34], HellaSwag [57], and WinoGrande [43]. Across benchmarks, inputs are natural-language questions and outputs are either final numeric answers or discrete choices, and we report accuracy as the evaluation metric with further details provided in the Appendix.

Backbone Models. Experiments are conducted on three widely used RoPE-based LLM families with different architectures and design choices, namely LLaMA 3.2, Qwen3, and Gemma 3 [12, 46, 47], to evaluate the robustness and generality of DyPAM.

Baseline Methods. We compare DyPAM with a diverse set of PEFT methods that adopt different adaptation strategies. Low-rank adaptation methods include LoRA [16] and AdaLoRA [58], which parameterize weight updates in a low-dimensional subspace, with AdaLoRA further adjusting rank allocation across layers according to their relative importance. We also consider structured weight reparameterization approaches, including OFT [39] and Bone [21], where OFT constrains updates to orthogonal transformations and Bone employs block-wise affine parameterization to capture structured correlations within weight matrices. In addition, we include lightweight modulation-based methods such as IA3^3 [28] and LN-Tuning [60], which adapt the model by rescaling internal activations or normalization parameters with minimal trainable parameters. We further compare against FourierFT [10], which performs adaptation in the frequency domain by learning a compact set of spectral coefficients for weight updates. Finally, we include SHiRA [3], which applies sparse high-rank adapters to update only a small subset of backbone weights, and RoSA [36], which performs RoPE-aware selective adaptation over attention dimensions and layers.

Implementation Details. All experiments are conducted using DeepSpeed [41] with bfloat16 precision on NVIDIA RTX 4090 GPUs. For DyPAM, we use a modulation embedding dimension de=64d_e = 64, a low-rank projection rank r=128r = 128, and a modulation strength α=0.3\alpha= 0.3. For baseline methods, except for extremely low-parameter approaches, we match the number of trainable parameters to a comparable scale. Additional implementation details are provided in the appendix, and all code and data are released to ease reproducibility2.

Overall Performance (RQ1)

Across both mathematical and commonsense reasoning benchmarks, DyPAM consistently outperforms existing PEFT baselines under comparable parameters, providing a clear positive answer to RQ1. The improvements are observed across all evaluated backbone models and task categories, indicating that the effectiveness of DyPAM generalizes across different models and datasets.

Specifically, on mathematical reasoning benchmarks as shown in Table 1, DyPAM demonstrates strong and stable gains across heterogeneous tasks that require multi-step computation, and numerical reasoning. The improvements are reflected in both micro- and macro-averaged metrics, suggesting that DyPAM enhances overall reasoning capability rather than favoring a small subset of benchmarks. In contrast, existing PEFT baselines exhibit more uneven behavior. Low-rank methods such as LoRA and AdaLoRA tend to yield limited gains, particularly on more challenging datasets. Frequency-domain approaches such as FourierFT show moderate performance but lack robustness across datasets. Methods with extremely small parameter budgets, including IA3^{3} and LN-Tuning, generally underperform due to their limited adaptation capacity. Structured or orthogonal methods such as OFT and Bone often perform well on specific tasks but struggle to maintain consistent improvements across the full benchmark suite, whereas sparse adaptation methods like SHiRA, which selectively activate a subset of parameters during fine-tuning, achieve strong performance on multiple tasks, highlighting the potential of structured parameter updates. RoSA also benefits from structured adaptation by introducing rotational subspace updates, leading to competitive results on several benchmarks. However, RoSA applies a static RoPE-aware selection that is shared across all inputs, whereas DyPAM modulates query and key dimension pairs in an input-conditioned, token-dependent manner coordinated with head-wise and layer-wise structure. This fine-grained and input-conditioned modulation, rather than the use of positional structure alone, accounts for the consistent margin of DyPAM over RoSA across backbones. Compared with these baselines, DyPAM achieves more balanced improvements across tasks and models, indicating superior robustness and generalization.

Backbone LLMMethodParam(%)MultiArithGSM8KAddSubAQuASingleEqSVAMPMAWPSmicro-avg(%)↑macro-avg(%)↑
LLaMA 3.2 3BLoRA1.1271.5033.2178.4822.4481.5054.1076.4754.9659.67
LLaMA 3.2 3BAdaLoRA2.2275.6736.3280.5122.8387.8055.6078.5757.9062.47
LLaMA 3.2 3BOFT0.7387.1740.1885.8224.0286.4261.5084.0362.7567.02
LLaMA 3.2 3BBone1.1487.5039.7385.5723.6286.6163.7081.9363.0366.95
LLaMA 3.2 3BIA3^{3}0.0258.3327.3768.6120.4772.8347.9058.8246.8950.62
LLaMA 3.2 3BLN-Tuning0.0158.0026.3866.5821.2674.8044.9060.0846.0150.29
LLaMA 3.2 3BFourierFT0.7378.6733.2182.0320.4785.4354.3077.3156.7261.63
LLaMA 3.2 3BSHiRA1.1282.5038.8284.8124.0287.9956.9081.9360.5965.28
LLaMA 3.2 3BRoSA0.5484.3337.9182.7822.8387.0152.5078.9959.0263.77
LLaMA 3.2 3BDyPAM (ours)0.9288.5039.8886.3325.2088.7863.0084.0363.58*67.96*
Qwen3 8BLoRA0.7997.6774.9189.8735.8390.5584.7089.0882.0480.37
Qwen3 8BAdaLoRA1.5795.1773.0190.6337.0192.3284.8091.6081.6280.65
Qwen3 8BOFT0.5195.6773.4690.3833.0794.0984.9091.6081.8080.45
Qwen3 8BBone0.8198.0072.2591.6533.4693.9083.8090.3481.5580.49
Qwen3 8BIA3^{3}0.0292.5072.1884.8135.0486.6180.9086.5578.4976.94
Qwen3 8BLN-Tuning0.0091.6768.6985.3239.7687.4078.0085.7177.0176.65
Qwen3 8BFourierFT0.3794.5070.0587.3431.5086.8182.7081.0978.2876.28
Qwen3 8BSHiRA0.7994.8375.3690.1337.0193.9085.7090.3482.5781.04
Qwen3 8BRoSA0.3697.8374.0790.3835.4394.4984.8092.0282.4881.29
Qwen3 8BDyPAM (ours)0.6199.1776.7291.9040.9495.2885.5092.8684.24*83.20*
Gemma 3 4BLoRA1.3386.0051.2572.4125.9875.5962.2075.2163.2664.09
Gemma 3 4BAdaLoRA2.6282.6751.8666.3331.5073.8262.3073.9562.4963.20
Gemma 3 4BOFT0.7585.8354.2872.9132.2875.5963.8076.4765.0265.88
Gemma 3 4BBone1.4186.1745.8771.3930.3172.6455.1073.1159.6962.08
Gemma 3 4BIA3^{3}0.0342.6738.8940.5127.1740.7537.2037.3938.6237.80
Gemma 3 4BLN-Tuning0.0132.6730.6345.0623.6256.6940.8037.8237.6438.18
Gemma 3 4BFourierFT1.1060.8331.2465.3228.3566.7346.3065.9747.8952.10
Gemma 3 4BSHiRA1.3372.6742.0873.1631.5076.5761.3075.6358.9261.84
Gemma 3 4BRoSA0.4034.5038.5166.8431.1063.1943.7062.1845.5348.58
Gemma 3 4BDyPAM (ours)0.6286.3355.1973.4232.6876.1862.7076.8965.28*66.20*

Table 1. Comparison of DyPAM with PEFT baselines on mathematical reasoning benchmarks across three backbone models. Micro-avg and macro-avg denote micro- and macro-averaged performance. Best results are highlighted in bold, and second-best results are underlined. * indicates statistically significant improvements over the best baseline (two-sided t-test, p<0.05p < 0.05).

A similar pattern is observed on commonsense reasoning tasks as shown in Table 3. DyPAM yields balanced improvements across diverse datasets spanning factual verification and social commonsense. The consistent gains in macro-averaged performance indicate improved robustness at the task level, while the improvements in micro-averaged accuracy reflect stronger overall performance.

Backbone LLMMethodParam(%)BoolQPIQASocialIQAARC-CARC-EOpenBookQAHellaSwagWinoGrandeMicro AvgMacro Avg
LLaMA 3.2 3BLoRA1.1263.6179.7166.9469.4584.0567.0073.9455.5671.9470.03
LLaMA 3.2 3BAdaLoRA2.2263.5278.9467.0968.9485.1470.2078.1156.3573.9571.04
LLaMA 3.2 3BOFT0.7365.6379.5470.3770.3985.0671.8083.1566.3877.5274.04
LLaMA 3.2 3BBone1.1464.5675.6869.3464.4279.7670.2075.9265.7572.7770.70
LLaMA 3.2 3BIA3^{3}0.0262.3277.0959.6757.9477.1057.4050.4852.2558.6661.78
LLaMA 3.2 3BLN Tuning0.0162.5176.9959.5259.8176.5259.0052.0252.1759.4262.32
LLaMA 3.2 3BFourierFT0.7362.1479.4961.9861.8680.9362.4073.2149.0969.7566.39
LLaMA 3.2 3BSHiRA1.1265.2379.6569.1471.1684.9771.2083.1865.6777.3573.78
LLaMA 3.2 3BRoSA0.5464.5379.6569.8669.2884.4370.8083.1263.5477.0073.15
LLaMA 3.2 3BDyPAM (ours)0.9265.9379.7670.8870.3985.1971.8083.7165.3577.83*74.13*
Qwen3 8BLoRA0.7970.4986.3477.1890.1996.5187.6089.5072.8585.1983.83
Qwen3 8BAdaLoRA1.5770.7386.5176.7190.3696.5587.2088.9272.3884.9183.67
Qwen3 8BOFT0.5169.9786.8376.5689.9396.9788.0089.1776.4885.2084.24
Qwen3 8BBone0.8169.0285.3175.6488.9195.5887.6089.3076.5684.7183.49
Qwen3 8BIA3^{3}0.0269.5186.3476.7190.2796.0984.4085.1266.7782.5981.90
Qwen3 8BLN Tuning0.0069.3386.4075.9590.2796.0083.0083.8665.4381.8281.28
Qwen3 8BFourierFT0.3769.5484.4973.1385.9295.2977.8080.4862.2779.3478.62
Qwen3 8BSHiRA0.7970.8387.0577.3390.3696.9788.2089.5675.7785.5784.51
Qwen3 8BRoSA0.3668.9686.9475.3389.8596.3888.2089.4376.1684.9983.91
Qwen3 8BDyPAM (ours)0.6170.8987.1177.3390.5397.0588.8089.5376.8085.66*84.75*
Gemma 3 4BLoRA1.3365.7279.7169.4074.4987.0871.0074.5355.0173.3772.12
Gemma 3 4BAdaLoRA2.6266.0979.4968.7376.5489.0274.0073.2058.0973.3073.14
Gemma 3 4BOFT0.7565.6981.9974.5176.7188.4778.0083.8665.2779.1776.81
Gemma 3 4BBone1.4164.6875.3571.2470.3982.8375.8078.3364.4874.7072.89
Gemma 3 4BIA3^{3}0.0262.1771.4957.3257.5173.1955.2044.8957.8555.3059.95
Gemma 3 4BLN Tuning0.0062.6066.7049.8549.9163.5945.2047.2960.4653.9055.70
Gemma 3 4BFourierFT0.3763.9475.5767.1467.3276.0557.8071.8159.3569.7667.37
Gemma 3 4BSHiRA0.7965.5782.2574.5376.1989.7178.2083.1964.4878.9476.77
Gemma 3 4BRoSA0.4063.7079.5467.4072.2786.6669.4048.5347.5160.6266.88
Gemma 3 4BDyPAM (ours)0.6266.2182.5974.8277.1389.2379.2084.0965.3579.56*77.33*

Table 3. Comparison of DyPAM with PEFT baselines on commonsense reasoning benchmarks across three backbone models. Micro-avg and macro-avg denote micro- and macro-averaged performance. Best results are highlighted in bold, and second-best results are underlined. * indicates statistically significant improvements over the best baseline (two-sided t-test, p<0.05p < 0.05).

Overall, these results show that DyPAM provides a more reliable and general-purpose adaptation mechanism than prior PEFT approaches. By delivering consistent gains across tasks, domains, and backbone models, DyPAM effectively addresses RQ1 and demonstrates clear advantages over existing PEFT baselines.

Scalability Analysis (RQ2)

Table 2 evaluates the scalability of DyPAM across Qwen3 models from 0.6B to 8B using macro-averaged accuracy on mathematical reasoning benchmarks. As model size increases, DyPAM consistently achieves better performance than the strongest PEFT baselines at each scale. Moreover, the performance difference between DyPAM and baselines becomes larger as the backbone grows, indicating that DyPAM continues to benefit from increased capacity.

BaselineQwen 3 0.6BQwen 3 1.7BQwen 3 4BQwen 3 8B
LoRA64.0666.6475.6080.37
OFT65.9667.8175.5480.45
SHiRA63.9564.6573.3381.04
RoSA63.9967.3877.9281.29
DyPAM (ours)66.1369.2478.2483.20

Table 2. Macro-averaged accuracy on mathematical reasoning benchmarks across Qwen3 model scales. The comparison includes representative strong PEFT baselines from the main experiments.

Overall, these results demonstrate that DyPAM maintains strong scalability across model sizes and remains effective when applied to both small and large backbone models, directly addressing RQ2.

Ablation and Sensitivity Analysis (RQ3, 4)

We further analyze DyPAM through ablation studies and parameter sensitivity experiments, aiming to understand the contribution of individual components and the robustness of key hyperparameters.

The ablation results show that each core component of DyPAM plays a complementary role in overall performance. Removing any single component consistently leads to performance degradation, indicating that the gains of DyPAM arise from their joint design rather than isolated architectural choices. In addition, the sensitivity analysis on the modulation strength α\alpha demonstrates the effectiveness of this design choice. Proper modulation significantly improves performance compared to weak or overly strong modulation. Overall, these analyses confirm that the performance improvements of DyPAM are structurally grounded and robust.

Analysis of Modulation Patterns (RQ5)

We analyze the learned modulation from two perspectives: the structural bias terms and the effective modulation ranges.

Figure 5 visualizes the learned layer-wise query bias over attention dimensions on LLaMA-3.2-3B under commonsense and mathematical reasoning settings. Rather than exhibiting uniform shifts, the bias values vary across both layers and dimensions, indicating that DyPAM learns heterogeneous, dimension-specific adjustments. This structured non-uniformity suggests that different attention dimensions develop distinct positional preferences at different depths, aligning with the intuition that positional information is utilized differently across layers. In addition, faint horizontal band patterns can be observed, hinting that certain layers may exhibit consistent preferences over specific subsets of attention dimensions.

Learned layer-wise query bias over attention dimensions

Figure 5. Learned layer-wise query bias over attention dimensions on LLaMA-3.2-3B under commonsense and mathematical reasoning settings. The heatmaps show that the structural bias varies across layers and dimensions rather than following a uniform pattern.

Figure 6 summarizes the effective modulation range of query and key representations under the same two settings. The scale factors remain centered around 1, while the range varies across layers and training data. This restrained behavior preserves the pretrained attention structure while allowing flexibility.

Layer-wise modulation range of query and key representations

Figure 6. Layer-wise modulation range of query and key representations on LLaMA-3.2-3B under commonsense and mathematical reasoning settings. The mean scale remains close to 1, while the effective range changes across layers and training data.

Overall, these visualizations demonstrate that DyPAM learns structured and stable positional modulation patterns. By combining dimension-wise modulation with restrained head-wise and layer-wise scaling, DyPAM adapts positional attention in a targeted manner, shaping how token dependencies are formed and thereby helping explain its consistent performance gains across models and tasks.

Ablation study and sensitivity to $\alpha$

Figure 4. Ablation and hyperparameter sensitivity of DyPAM. The ablation removes individual modulation components, while the sensitivity study varies the modulation strength α\alpha.

Related Work

Parameter-Efficient Fine-Tuning

Recent advancements in PEFT focus on reducing the number of trainable parameters while maintaining performance. Low-rank approaches such as LoRA [16] and AdaLoRA [58] adapt pre-trained weights through additive low-rank updates, while scaling-based methods including IA3^{3} [28] and LNTuning [60] employ lightweight gating to modulate activations under strict parameter constraints. Structured PEFT approaches, such as OFT [39] and Bone [21], further constrain the update space by enforcing geometric properties, whereas spectral-domain methods like FourierFT [10] perform adaptation via frequency-based transformations of model representations. In addition, RoSA [36] is motivated by the structure of RoPE and proposes RoPE-aware selective adaptation by emphasizing low-frequency attention components. Compared with RoSA, which applies static RoPE-aware selection, DyPAM generates input-conditioned modulation over query and key dimension pairs. In contrast to these approaches, our method explicitly models fine-grained, input-conditioned modulation within attention, enabling structure-aware adaptation.

Structured Modeling in Transformer

Transformer attention has been recognized for its structural heterogeneity, with different attention heads specializing in various semantic or syntactic aspects of the input [40]. Recent works have analyzed head-level specialization and layer-wise differences, demonstrating that attention heads should not be treated uniformly [49, 59]. Beyond language modeling, attention- and frequency-aware designs have also been widely adopted in spatiotemporal modeling [19, 30] and financial prediction [50, 52], further underscoring the value of structure-aware mechanisms. Positional encodings, particularly in RoPE and its variants, are not just external biases but integral to the attention computation, providing a way to model relative positional relationships more effectively [13]. Newer methods, such as ComRoPE [55], introduce dynamic and input-conditioned positional encodings, enhancing the flexibility of position representations in transformers. RoSA [36] is also motivated by the structure of RoPE and explores selective adaptation of attention components guided by frequency characteristics. While these studies highlight the structured and positional nature of attention, they largely rely on static or coarse-grained mechanisms, motivating the need for fine-grained and input-conditioned modulation within attention.

Conclusion

In this work, we introduce DyPAM, a PEFT method that adapts LLMs by modulating positional attention in a fine-grained and structured manner. Motivated by heterogeneous attention behavior across dimensions, heads, layers, and input tokens, DyPAM operates directly on the query and key representations and aligns adaptation with the RoPE-induced positional structure. It jointly models input-conditioned, dimension-wise and head-wise, layer-wise structural modulation, providing a principled approach to adapting positional attention within the PEFT paradigm. By reshaping how positional information influences attention, DyPAM adjusts the way dependencies are formed across tokens, which is consistent with its gains on tasks that rely on multi-step and relational reasoning. Extensive experiments across mathematical and commonsense reasoning benchmarks demonstrate that DyPAM consistently outperforms strong PEFT baselines. Future work will further optimize the runtime implementation and extend DyPAM across diverse architectural mechanisms.

Acknowledgments

This work is supported by the National Natural Science Foundation of China (No. 725B2004, 72242101, 72222022), and the Science and Technology Development Fund Macau SAR (0052/2023/RIA1).

References

Attention Activation Patterns

Effect of Positional Encoding Schemes

To verify that the heterogeneous attention behavior motivating DyPAM is tied to the positional encoding mechanism, we compare query activation patterns across models using different positional encodings, including RoPE, ALiBi, and learned positional embeddings. Specifically, we visualize query representations from LLaMA-3.2-3B, BLOOM-560M, and OPT-350M under a unified scheme covering all attention dimensions (Figure 7). RoPE-based models exhibit structured, dimension-dependent activation patterns, whereas models using ALiBi or learned positional embeddings display substantially more homogeneous behavior across dimensions, supporting our focus on RoPE-induced positional structure.

Figure 7. Cross-model comparison of query activation patterns across layers and attention dimensions. RoPE-based LLaMA-3.2-3B shows structured, dimension-dependent patterns, while ALiBi-based BLOOM-560M and OPT-350M with learned embeddings are more homogeneous.

Token-Dependent Activation Patterns

We further examine token-dependent variation in attention activations. We visualize query activations conditioned on different token types and input contexts, extending the analysis of Figure 1(c,Figure 1d) to multiple models (Figure 8). In the RoPE-based model, different tokens induce systematically different activation patterns, while such token-dependent structure is less pronounced under alternative positional encoding schemes. These observations motivate the input-conditioned, token-level component of DyPAM.

Figure 8. Token-type activation patterns across layers and attention dimensions for LLaMA-3.2-3B, BLOOM-560M, and OPT-350M. Token-dependent variation is most pronounced in the RoPE-based model.

Experimental and Implementation Details

All experiments reported in the main paper use a primary random seed of 2333, with additional runs using seeds 1000, 2000, 3000, and 4000 to assess statistical significance and reproducibility. Training employs mixed-precision (BF16) and DeepSpeed [41] with ZeRO Stage 1. A randomly selected validation set of 300 samples from the training data is used for checkpoint selection, and the checkpoint with the lowest validation loss is used for testing.

The default hyperparameter settings are summarized below:

  • Optimizer: AdamW; learning rate 1×10−31 \times10^{-3} with cosine schedule; warmup ratio 0.05; weight decay 0.

  • Batch size: 2 (gradient accumulation steps of 2); max sequence length: 2048.

  • Modulation feature dimension de=64d_e = 64; low-rank projection rank r=128r = 128; modulation strength α=0.3\alpha= 0.3.

Software and Environment

The software environment uses PyTorch 2.7.0, DeepSpeed 0.18.4, NumPy 2.2.6, PEFT 0.18.1, Transformers 4.51.0, Tokenizers 0.21.4, and CUDA 12.8. Experiments run on Ubuntu 24.04 LTS with an Intel Xeon Gold 6330 CPU, an NVIDIA GeForce RTX 4090 GPU, and 512GB RAM. For baseline methods, except for extremely low-parameter approaches, we match the number of trainable parameters to a comparable scale; all other hyperparameters follow their default configurations from the PEFT library [32] or the original implementations. Detailed implementation and datasets can be found in our codebase3.

Dataset Details

We use two instruction-tuning datasets from the LLM-Adapters benchmark suite [17]: Math10K for math word problems with step-by-step solutions and Commonsense15K for commonsense reasoning questions normalized into a consistent instruction format. Statistics are summarized in Table 4.

DatasetSamplesTotal TokensAvg. Tokens/Sample
Math10K9,9192,273,016229.16
Commonsense15K15,1191,778,782117.65

Table 4. Statistics of the training datasets for commonsense and mathematical reasoning tasks.

We evaluate on well-established commonsense and mathematical reasoning benchmarks; detailed statistics are in Table 5 (Mathematical) and Table 6 (Commonsense).

DatasetSamplesAnswer Type
MultiArith600Numeric
GSM8K1,319Numeric
AddSub395Numeric
AQuA254Multiple Choice (A–E)
SingleEq508Numeric
SVAMP1,000Numeric
MAWPS238Numeric

Table 5. Statistics of Mathematical Reasoning Test Datasets.

DatasetSamplesAnswer Format
BoolQ3,270true / false
PIQA1,838solution1 / solution2
SIQA1,954answer1 / answer2 / answer3
ARC-Challenge1,172answer1 / answer2 / answer3 / answer4
ARC-Easy2,376answer1 / answer2 / answer3 / answer4
OBQA500answer1 / answer2 / answer3 / answer4
HellaSwag10,042ending1 / ending2 / ending3 / ending4
WinoGrande1,267option1 / option2

Table 6. Statistics of Commonsense Reasoning Test Datasets.

a) Mathematical Reasoning: MultiArith [42] (multi-step arithmetic), GSM8K [9] (grade-school multi-step reasoning), AddSub [15] (addition/subtraction), AQuA [27] (algebraic problems with rationales), SingleEq [22] (equation-tree parsing), SVAMP [37] (structural variations), and MAWPS [23] (unified word-problem benchmark).

b) Commonsense Reasoning: BoolQ [6] (yes/no QA), PIQA [4] (physical commonsense), SIQA [44] (social commonsense), ARC-Challenge/ARC-Easy [8] (science QA), OBQA [34] (open-book science QA), HellaSwag [57] (adversarial NLI), and WinoGrande [43] (pronoun resolution).

Evaluation Protocol and Metrics

All model outputs are generated with greedy decoding (do_sample=False, max_new_tokens=256) via the generate() API in Hugging Face Transformers, using the instruction template below.

<s>Below is an instruction that describes a task. Write a response that appropriately completes the request.

Instruction:

{instruction}

Response:

Predictions are extracted with task-specific regular expressions: for mathematical reasoning, numerical answers (absolute tolerance 10−310^{-3}) or alphabetic choices (A–E) for AQuA; for commonsense reasoning, exact-match answers (true/false and option labels) against ground-truth labels. All extraction and accuracy computation scripts are provided in our codebase.

Inference Overhead

We report the inference overhead of DyPAM against the base model and representative PEFT baselines in Table 7, measured on LLaMA-3.2-3B. DyPAM adds 1.03% FLOPs overhead, lower than unmerged LoRA (1.13%), as it avoids low-rank updates to all linear layers and the per-token modulation introduces only a small cost. DyPAM is about 10% faster than unmerged LoRA at batch size 1 and comparable at batch size 32, with negligible memory overhead. Unlike LoRA, DyPAM cannot be merged into the backbone weights due to its input-conditioned design, but the overhead remains controlled and can be further reduced with optimizations such as KV-cache reuse and kernel fusion.

MethodBS-1 (ms/tok)BS-32 (ms/tok)Mem (GB)FLOPs overhead
Base14.490.496.00—
LoRA (unmerged)27.641.526.0673.0M (+1.13%)
RoSA22.401.456.0334.9M (+0.54%)
DyPAM (ours)24.981.496.0666.1M (+1.03%)

Table 7. Inference overhead of DyPAM compared with the base model and representative PEFT baselines on LLaMA-3.2-3B. Latency is reported per token. The per-token value is lower at batch size 32 because more tokens are processed in parallel.

References

  1. [1]Joshua Ainslie, James Lee-Thorp, Michiel De Jong, Yury Zemlyanskiy, Federico Lebrón, and Sumit Sanghai. 2023. Gqa: Training generalized multi-query transformer models from multi-head checkpoints. arXiv preprint arXiv:2305.13245 (2023).arxiv.org/abs/2305.13245
  2. [2]Federico Barbero, Alex Vitvitskyi, Christos Perivolaropoulos, Razvan Pascanu, and Petar Velicković. 2024. Round and round we go! what makes rotary positional encodings useful? arXiv preprint arXiv:2410.06805 (2024).
  3. [3]Kartikeya Bhardwaj, Nilesh Prasad Pandey, Sweta Priyadarshi, Viswanath Ganapathy, Shreya Kadambi, Rafael Esteves, Shubhankar Borse, Paul Whatmough, Risheek Garrepalli, Mart Van Baalen, Harris Teague, and Markus Nagel. 2024. Sparse high rank adapters. In Proceedings of the 38th International Conference on Neural Information Processing Systems (Vancouver, BC, Canada) (NIPS ’24). Curran Associates Inc., Red Hook, NY, USA, Article 438, 31 pages.arxiv.org/abs/2406.13175
  4. [4]Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, et al. 2020. Piqas: Reasoning about physical commonsense in natural language. In Proceedings of the AAAI conference on artificial intelligence, Vol. 34. 7432–7439.
  5. [5]Jiawei Cheng, Jingyuan Wang, Yichuan Zhang, Jiahao Ji, Yuanshao Zhu, Zhibo Zhang, and Xiangyu Zhao. 2025. Poi-enhancer: An llm-based semantic enhancement framework for poi representation learning. In Proceedings of the AAAI conference on artificial intelligence, Vol. 39. 11509–11517.arxiv.org/abs/2502.10038
  6. [6]Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristin Toutanova. 2019. Boolq: Exploring the surprising difficulty of natural yes/no questions. arXiv preprint arXiv:1905.10044 (2019).arxiv.org/abs/1905.10044
  7. [7]Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D Manning. 2019. What does bert look at? an analysis of bert’s attention. arXiv preprint arXiv:1906.04341 (2019).
  8. [8]Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457 (2018).arxiv.org/abs/1803.05457
  9. [9]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168 (2021).arxiv.org/abs/2110.14168
  10. [10]Ziqi Gao, Qichao Wang, Aochuan Chen, Zijing Liu, Bingzhe Wu, Liang Chen, and Jia Li. 2024. Parameter-efficient fine-tuning with discrete fourier transform. arXiv preprint arXiv:2405.03003 (2024).arxiv.org/abs/2405.03003
  11. [11]Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy. 2021. Transformer Feed-Forward Layers Are Key-Value Memories. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing. 5484–5495.
  12. [12]Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783 (2024).arxiv.org/abs/2407.21783
  13. [13]Zihan Gu, Han Zhang, Ruoyu Chen, Yue Hu, and Hua Zhang. 2025. Unpacking Positional Encoding in Transformers: A Spectral Analysis of Content-Position Coupling. arXiv preprint arXiv:2505.13027 (2025).
  14. [14]Zeyu Han, Chao Gao, Jinyang Liu, Jeff Zhang, and Sai Qian Zhang. 2024. Parameter-efficient fine-tuning for large models: A comprehensive survey. arXiv preprint arXiv:2403.14608 (2024).arxiv.org/abs/2403.14608
  15. [15]Mohammad Javad Hosseini, Hannah Hajiširzi, Oren Etzioni, and Nate Kushman. 2014. Learning to solve arithmetic word problems with verb categorization. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP). 523–533.
  16. [16]Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685 (2021).arxiv.org/abs/2106.09685
  17. [17]Zhiqiang Hu, Lei Wang, Yihui Lan, Wanyu Xu, Ee-Peng Lim, Lidong Bing, Xing Xu, Soujanya Poria, and Roy Ka-Wei Lee. 2023. Llm-adapters: An adapter family for parameter-efficient fine-tuning of large language models. arXiv preprint arXiv:2304.01933 (2023).
  18. [18]Jiahao Ji, Jingyuan Wang, Yu Mou, Cheng Long, and Junjie Wu. 2026. How to Break It Down for Building It Up? Theory-Guided Graph Decomposition Learning for Spatiotemporal Traffic Prediction. IEEE Transactions on Pattern Analysis and Machine Intelligence (2026).DOI
  19. [19]Jiawei Jiang, Chengkai Han, Wayne Xin Zhao, and Jingyuan Wang. 2023. Pdformer: Propagation delay-aware dynamic long-range transformer for traffic flow prediction. In Proceedings of the AAAI conference on artificial intelligence, Vol. 37. 4365–4373.arxiv.org/abs/2301.07945
  20. [20]Mingyu Jin, Kai Mei, Wujiang Xu, Mingjie Sun, Ruixiang Tang, Mengnan Du, Zirui Liu, and Junfeng Zhang. 2025. Massive Values in Self-Attention Modules are the Key to Contextual Knowledge Understanding. arXiv preprint arXiv:2502.01563 (2025).arxiv.org/abs/2502.01563
  21. [21]Jiale Kang and Qingyu Yin. 2024. Balancing LoRA Performance and Efficiency with Simple Shard Sharing. arXiv preprint arXiv:2409.15371 (2024).
  22. [22]Rik Koncel-Kedziorski, Shubho Roy, Aida Amini, Kate Kushman, and Hannah Hajishirzi. 2015. MAWPS: A math word problem repository. In Proceedings of the 2016 conference of the north american chapter of the association for computational linguistics: human language technologies. 1152–1157.
  23. [23]Rik Koncel-Kedziorski, Shubho Roy, Aida Amini, Kate Kushman, and Hannah Hajishirzi. 2016. MAWPS: A math word problem repository. In Proceedings of the 2016 conference of the north american chapter of the association for computational linguistics: human language technologies. 1152–1157.
  24. [24]Junyi Li, Tianyi Tang, Zheng Gong, Lixin Yang, Zhuhao Yu, Zhipeng Chen, Jingyuan Wang, Wayne Xin Zhao, and Ji-Rong Wen. 2022. EllipLM: an empirical study on general language ability evaluation of pretrained language models. In Proceedings of the 2022 conference of the North American chapter of the Association for Computational Linguistics: human language technologies. 3519–3539.
  25. [25]Junyi Li, Tianyi Tang, Wayne Xin Zhao, Jingyuan Wang, Jian-Yuan Nie, and Ji-Rong Wen. 2023. The web can be your oyster for improving language models. In Findings of the Association for Computational Linguistics: ACL 2023. 728–746.DOI
  26. [26]Ziming Li, Li Hongjun, Jingyuan Wang, and Ke Tang. 2025. Approximation to Smooth Functions by Low-Rank Swish Networks. In Forty-second International Conference on Machine Learning.
  27. [27]Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunsom. 2017. Program induction by rationale generation: Learning to solve and explain algebraic word problems. arXiv preprint arXiv:1705.04146 (2017).arxiv.org/abs/1705.04146
  28. [28]Haokun Liu, Derek Tam, Mohammed Muqeeth, Jay Mothа, Tenghao Huang, Mohit Bansal, and Colin A Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. Advances in Neural Information Processing Systems 35 (2022), 1950–1965.
  29. [29]Weiyang Liu, Zeqi Qiu, Yuxuan Xie, Yuliang Xiu, Yunxuan Xue, Longhui Yu, Haiwen Feng, Zhen Liu, Juyeon Heo, Songyou Peng, et al. 2023. Parameter-efficient orthogonal finetuning via butterfly factorization. arXiv preprint arXiv:2311.06243 (2023).arxiv.org/abs/2311.06243
  30. [30]Jingtian Ma, Jingyuan Wang, et al. 2026. Hierarchical Frequency-Decomposition Graph Neural Networks for Road Network Representation Learning. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 40. 15510–15518.
  31. [31]Jingtian Ma, Jingyuan Wang, Wayne Xin Zhao, Guoqing Liu, and Xianwen. 2025. Spatio-Temporal Data Enhanced Vision-Language Model for Traffic Scene Understanding. IEEE Transactions on Intelligent Transportation Systems (2025).arxiv.org/abs/2511.08978
  32. [32]Sourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, Sayak Paul, and Benjamin Bossan. 2022. PEFT: State-of-the-art Parameter-Efficient Fine-Tuning methods. https://github.com/huggingface/peft.
  33. [33]Kevin Meng, Arnab Sen Sharma, Alex Andonian, Yonatan Belinkov, and David Bau. 2022. Mass-editing memory in a transformer. arXiv preprint arXiv:2210.07229 (2022).
  34. [34]Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. 2018. Can a suit of armor conduct electricity? a new dataset for open book question answering. arXiv preprint arXiv:1809.02789 (2018).
  35. [35]Dayan Pan, Zhaoyang Fu, Jingyuan Wang, Xiao Han, Yue Zhu, and Xiangyu Zhao. 2025. Contextual Attention Modulation: Towards Efficient Multi-Task Adaptation in Large Language Models. In Proceedings of the 34th ACM International Conference on Information and Knowledge Management. 2273–2283.DOI
  36. [36]Dayan Pan, Jingyuan Wang, Yilong Zhou, Jiawei Cheng, Pengyue Jia, and Xiangyu Zhao. 2026. RoSA: Enhancing Parameter-Efficient Fine-Tuning via RoPE-aware Selective Adaptation in Large Language Models. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 40. 15600–15608.
  37. [37]Arkıl Patel, Satwik Bhattamishra, and Navin Goyal. 2021. Are NLP models really able to solve simple math word problems? arXiv preprint arXiv:2103.10791 (2021).
  38. [38]Ofir Press, Noah A Smith, and Mike Lewis. 2021. Train short, test long: Attention with linear biases enables input length extrapolation. arXiv preprint arXiv:2108.12409 (2021).arxiv.org/abs/2108.12409
  39. [39]Zeqiu Qiu, Weiyang Liu, Haiwen Feng, Yuxuan Xue, Yao Feng, Zhen Liu, Dan Zhang, Adrian Weller, and Bernhard Schölkopf. 2023. Controlling text-to-image diffusion by orthogonal finetuning. Advances in Neural Information Processing Systems 36 (2023), 79320–79362.arxiv.org/abs/2306.07280
  40. [40]Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2020. Fixed encoder self-attention patterns in transformer-based machine translation. arXiv preprint arXiv:2002.10260 (2020).
  41. [41]Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and Yuxiong He. 2020. DeepSpeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining. 3505–3506.
  42. [42]Shubho Roy and Dan Roth. 2016. Solving general arithmetic word problems. arXiv preprint arXiv:1608.01413 (2016).arxiv.org/abs/1608.01413
  43. [43]Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2020. Winogrande: An adversarial winograd schema challenge at scale. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 34. 8732–8740.
  44. [44]Maarten Sap, Hannah Rashkin, Derek Chen, Ronan LeBras, and Yejin Choi. 2019. SocialIQ: Commonsense reasoning about social interactions. arXiv preprint arXiv:1904.09728 (2019).arxiv.org/abs/1904.09728
  45. [45]Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. 2024. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing 568 (2024), 127063.arxiv.org/abs/2104.09864
  46. [46]Gemma Team. 2025. Gemma 3. (2025). https://goo.gle/Gemma3Report
  47. [47]Qwen Team. 2025. Qwen3 Technical Report. arXiv:2505.09388 [cs.CL]. https://arxiv.org/abs/2505.09388
  48. [48]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems 30 (2017).arxiv.org/abs/1706.03762
  49. [49]Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. 2019. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. arXiv preprint arXiv:1905.09418 (2019).
  50. [50]Jingyuan Wang, Ke Tang, Kai Feng, Xin Lin, Weifeng Lv, Kun Chen, and Fei Wang. 2021. Impact of temperature and relative humidity on the transmission of COVID-19: a modelling study in China and the United States. BMJ open 11, 2 (2021), e043863.
  51. [51]Jingyuan Wang, Chen Yang, Xiaohan Jiang, and Junjie Wu. 2023. WHEN: A Visual-BDTW hybrid attention network for heterogeneous time series analysis. In Proceedings of the 29th ACM SIGKDD conference on knowledge discovery and data mining. 2361–2373.
  52. [52]Jingyuan Wang, Yang Zhang, Ke Tang, Junjie Wu, and Zhang Xiong. 2019. AI-phastock: A buying-winners-and-selling-losers investment strategy using interpretable deep reinforcement attention networks. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining. 1900–1908.
  53. [53]Xiaolei Wang, Xinyu Tang, Xin Zhao, Jingyuan Wang, and Ji-Rong Wen. 2023. Rethinking the evaluation for conversational recommendation in the era of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. 10052–10065.DOI
  54. [54]Zhongyuan Wu, Jingyuan Wang, Zexuan Cheng, Yilong Zhou, Weizhi Wang, Juhua Pu, Chao Li, and Changqing Ma. 2026. Icad-llm: One-for-all anomaly detection via in-context learning with large language models. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 40. 15986–15994.
  55. [55]Hao Yu, Tangyu Jiang, Shuning Jia, Shannan Yan, Shunning Liu, Haolong Qian, Guanhao Li, Shuting Dong, and Chun Yuan. 2025. ComRoPE: Scalable and Robust Rotary Position Embedding Parameterized by Trainable Computing Angle Matrices. In Proceedings of the Computer Vision and Pattern Recognition Conference. 4508–4517.arxiv.org/abs/2506.03737
  56. [56]Xie Yu, Jingyuan Wang, Yifan Yang, Qian Huang, and Ke Qu. 2025. BIGCity: A universal spatiotemporal model for unified trajectory and traffic state data analysis. In 2025 IEEE 41st International Conference on Data Engineering (ICDE). IEEE, 4455–4469.arxiv.org/abs/2412.00953
  57. [57]Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. 2019. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830 (2019).arxiv.org/abs/1905.07830
  58. [58]Qingru Zhang, Minshuo Chen, Alexander Bukharin, Nikos Karampatziakis, Pengcheng He, Yu Cheng, Weizhu Chen, and Tuo Zhao. 2023. Adalora: Adaptive budget allocation for parameter-efficient fine-tuning. arXiv preprint arXiv:2303.10512 (2023).arxiv.org/abs/2303.10512
  59. [59]Xiaofeng Zhang, Yikang Shen, Zeyu Huang, Jie Zhou, Wenge Rong, and Zhang Xiong. 2022. Mixture of attention heads: Selecting attention heads per token. arXiv preprint arXiv:2210.05144 (2022).arxiv.org/abs/2210.05144
  60. [60]Bingchen Zhao, Haoqin Tu, Chen Wei, Jieru Mei, and Cihang Xie. 2023. Tuning layermorm in attention: Towards efficient multi-modal llm finetuning. arXiv preprint arXiv:2312.11420 (2023).arxiv.org/abs/2312.11420
  61. [61]Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. 2023. A survey of large language models. arXiv preprint arXiv:2303.18223 (2023).

Paper details

vlnc:W_2u42g53k
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents