Papers
Topics
Authors
Recent
Search
2000 character limit reached

Bank of Values: Transformer Innovation

Updated 7 June 2026
  • Bank of Values (BoV) is an architectural modification for transformer attention layers that uses static, token-specific lookups to compute value vectors in deep layers.
  • It replaces the conventional, dense context-dependent value projections with a per-layer learnable lookup table, preserving token identity and reducing computational overhead.
  • Empirical results demonstrate that BoV enhances model accuracy and efficiency in large language models, yielding improvements in tasks such as SQuAD and CoQA.

The Bank of Values (BoV) is an architectural innovation for transformer attention layers that replaces the conventional, context-dependent computation of value vectors in the deepest model layers with static, token-specific, context-free lookups. This mechanism aims to preserve token identity information while simultaneously delivering efficiency improvements in compute and memory. BoV is introduced and systematically evaluated in “Do Value Vectors in Deep Layers Need Context from the Residual Stream?” (He et al., 1 Jun 2026), where it demonstrates both improved model quality and significant efficiency gains in LLMs.

1. Motivation and Theoretical Rationale

In standard transformer attention, the value vectors VV are computed as dense projections of the residual stream:

V=xiWVV = x_i W_V

where xiRdx_i \in \mathbb{R}^d is the residual input at position ii and WVW_V is a learned projection. While this enables rich, context-dependent representations across layers, it introduces two key shortcomings in deeper layers:

  • Dilution of token identity: Repeated cross-token mixing through many stacked attention layers causes VV to lose the context-free, token-specific information present at the model’s input.
  • Inference and cache overhead: At inference time, VV must be calculated and cached at every layer and position, resulting in O(Td2)O(T \cdot d^2) computation and memory consumption per layer, where TT is context length and dd is hidden dimensionality.

Empirical studies revealed that introducing a context-free value component in deep layers produces nearly all measurable performance gains, rendering the additional context-dependent part nearly redundant for aggregate performance. The core intuition is that since value vectors are passively weighted by attention (not actively mixed across tokens), it is more beneficial in deep layers to supply a clean, token-specific signal rather than a highly entangled contextual one (He et al., 1 Jun 2026).

2. BoV Architectural Modifications

BoV revises only the last V=xiWVV = x_i W_V0 layers of a transformer with V=xiWVV = x_i W_V1 total layers. In these layers:

  • Query and key computation: Unchanged, as projections of the residual stream.

V=xiWVV = x_i W_V2

  • Value computation via lookup: Instead of V=xiWVV = x_i W_V3, a per-layer, learnable lookup table V=xiWVV = x_i W_V4 is introduced, where V=xiWVV = x_i W_V5 is vocabulary size. For each token position V=xiWVV = x_i W_V6 with token index V=xiWVV = x_i W_V7:

V=xiWVV = x_i W_V8

with V=xiWVV = x_i W_V9 a learned, per-layer scalar.

  • Attention mechanism: Standard attention is performed, but with xiRdx_i \in \mathbb{R}^d0 replacing context-dependent xiRdx_i \in \mathbb{R}^d1.

xiRdx_i \in \mathbb{R}^d2

where xiRdx_i \in \mathbb{R}^d3, and xiRdx_i \in \mathbb{R}^d4 is the number of heads.

  • Output projection: Concatenation of attended head outputs, output projection, and residual addition remain as usual.

This removes the need for xiRdx_i \in \mathbb{R}^d5 in these layers and replaces token-dependent value computation with a static lookup followed by scalar scaling (He et al., 1 Jun 2026).

3. Formal Description and Memory Analysis

The BoV mechanism for layer xiRdx_i \in \mathbb{R}^d6 (xiRdx_i \in \mathbb{R}^d7) is defined by:

  • xiRdx_i \in \mathbb{R}^d8: input residuals
  • xiRdx_i \in \mathbb{R}^d9: projections
  • ii0: per-layer lookup table
  • ii1: learnable scalar

Value vectors at each position:

ii2

Memory savings for the value cache per layer:

ii3

For ii4, BoV provides net memory reduction, as the dense cache is replaced with a (potentially sparse) static table; only accessed rows need active memory. As the context length ii5 grows, benefits increase (He et al., 1 Jun 2026).

4. Implementation Aspects

A BoV attention layer operates as follows (notation as above):

  1. Compute ii6, ii7 via projections from ii8.
  2. Lookup ii9 for each position from WVW_V0, apply WVW_V1 scaling.
  3. Reshape WVW_V2, WVW_V3, WVW_V4 for multi-head computation.
  4. For autoregressive inference, append WVW_V5, WVW_V6 to caches.
  5. Compute attention weights and apply them.
  6. Concatenate and linearly project the outputs, then add to the residual.

The PyTorch-style pseudocode below captures the essential modifications: TT4 Key points:

  • WVW_V7 is implemented as an nn.Embedding, enabling on-demand and memory-sparse lookups.
  • WVW_V8 is entirely absent from BoV layers.
  • There is no need to cache value projections for past tokens beyond the current batch lookup (He et al., 1 Jun 2026).

5. Empirical Evaluation and Ablation Findings

Ablation studies conducted at WVW_V9M and VV0M scale under fixed compute budgets validate the BoV approach:

  • Substitutive vs. Additive: Entirely replacing VV1 with a context-free variant outperforms additive combinations of context-free and context-dependent VV2.
  • Learnable scaling: Per-layer, learnable scalar coefficients VV3 lower loss compared to fixed scalings (e.g., VV4).
  • Lookup source: Layer-specific context-free values (VV5 or dedicated VV6) surpass shared, early-layer sources.
  • Layer targeting: Restricting BoV substitution to only the final VV7 layers yields gains; replacing value computation in shallow layers degrades performance.

Summary of validation results (bits per byte, 135M model):

Configuration Validation Loss (BPB)
Baseline: VV8 0.854
VV9, substitute last 4 layers, learnable VV0 0.845
BoV, lookup VV1 in last 4 layers, learnable VV2 0.845

At 780M scale:

  • Baseline: 0.722 BPB, CORE score 0.260
  • BoV: 0.714 BPB, CORE score 0.272
  • Largest gains observed on SQuAD (0.40 → 0.42), CoQA (0.29 → 0.32), and symbolic tasks; BoV matches or exceeds competitive token-lookup approaches while consuming less compute (He et al., 1 Jun 2026).

6. Efficiency and Resource Utilization

Compute savings: Standard VV3 computation is VV4 per token per layer; BoV lookups require only VV5 gather, netting a VV6 FLOP reduction in the last VV7 layers. Using VV8, VV9, BoV yields approximately O(Td2)O(T \cdot d^2)0 fewer multiplies per token.

Memory tradeoff: Standard attention maintains a O(Td2)O(T \cdot d^2)1 value cache per layer (total O(Td2)O(T \cdot d^2)2), whereas BoV substitutes this with a fixed O(Td2)O(T \cdot d^2)3 table per layer, eliminating per-token cache requirements for those layers. For O(Td2)O(T \cdot d^2)4, the reduction in GPU memory usage can be substantial; only lookup rows are brought to device memory on demand. This can also benefit distributed and memory-constrained inference workflows (He et al., 1 Jun 2026).

7. Hyperparameter Selection and Deployment Considerations

Experimental and scaling evidence support the following recommendations for BoV:

  • Restrict BoV to the last O(Td2)O(T \cdot d^2)5 transformer layers (O(Td2)O(T \cdot d^2)6).
  • Use a learnable, unbounded scalar O(Td2)O(T \cdot d^2)7 per affected layer, rather than fixing it.
  • Maintain separate O(Td2)O(T \cdot d^2)8 tables for each BoV layer; do not share across depths.
  • Initialize each O(Td2)O(T \cdot d^2)9 with TT0, optionally RMS-normalized, to match baseline context-free TT1 at start.
  • Set the embedding dimensionality TT2 of TT3 to match the transformer’s hidden size.

Under these settings, BoV achieves lower validation loss, better accuracy on reading-comprehension and symbolic tasks, and reduced resource consumption compared to standard and previously proposed value-lookup methods (He et al., 1 Jun 2026).

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

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 Bank of Values (BoV).