Papers
Topics
Authors
Recent
Search
2000 character limit reached

CBSA: Contract-and-Broadcast Self-Attention

Updated 12 July 2026
  • Contract-and-Broadcast Self-Attention (CBSA) is an attention mechanism that contracts global structure using a small set of representative tokens and broadcasts contracted information back to all tokens.
  • It is derived from an explicit coding rate and maximal coding rate reduction objective, integrating interpretable subspace projections and learned coefficient matrices.
  • CBSA improves efficiency by replacing quadratic token interactions with operations over a few representatives while enhancing model interpretability and robustness.

Contract-and-Broadcast Self-Attention (CBSA) is an attention mechanism in which a small set of representative tokens is used to contract global structure and then broadcast the contracted information back to the full token sequence. In the formulation introduced in "Towards Interpretable and Efficient Attention: Compressing All by Contracting a Few" (Wen et al., 21 Sep 2025), CBSA is derived from an explicit optimization objective based on coding rate and maximal coding rate reduction, rather than from a purely heuristic redesign of self-attention. The mechanism is presented as both inherently interpretable and computationally efficient: interpretability follows from the white-box meaning of its subspace projections, representatives, contraction, and broadcast coefficients, while efficiency follows from replacing token-token interactions over all NN tokens by operations over m≪Nm \ll N representatives. A related earlier line of work is "Scratching Visual Transformer’s Back with Uniform Attention" (Hyeon-Woo et al., 2022), whose Context Broadcasting (CB) module contracts tokens by averaging and broadcasts the result uniformly; that module is not identical to CBSA, but it supplies a closely related contract-and-broadcast design principle in Vision Transformers.

1. Formal definition and conceptual basis

CBSA is defined around the idea of compressing all tokens by contracting a few representative tokens and then broadcasting those contractions back to the full sequence (Wen et al., 21 Sep 2025). Let Z∈Rd×NZ \in \mathbb{R}^{d \times N} denote NN tokens in a dd-dimensional feature space. CBSA introduces a set of representatives Q∈Rd×mQ \in \mathbb{R}^{d \times m} with m≪Nm \ll N, together with a union of subspaces U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K, where each UkU_k is a d×pd \times p matrix with orthonormal columns and m≪Nm \ll N0 (Wen et al., 21 Sep 2025). The mechanism projects tokens into these subspaces, extracts representatives, contracts those representatives, and broadcasts the resulting contracted information back to all tokens.

The stated motivation is twofold. First, standard softmax self-attention is described as difficult to interpret because post-hoc attention visualizations and gradient-based explanations lack a principled theoretical foundation. Second, its m≪Nm \ll N1 time and memory complexity becomes increasingly prohibitive for long sequences and high-resolution inputs (Wen et al., 21 Sep 2025). CBSA addresses both issues through a single optimization-based construction: the forward operator is obtained by unrolling optimization over a compression objective, so each computational stage has an explicit geometric meaning rather than being treated as a black-box module.

The core conceptual move is not to compress all tokens directly in the ambient space, but to compress a much smaller representative set within low-dimensional subspaces and then redistribute the resulting information. This creates a separation between representation of global structure and redistribution of that structure, which is central to the contract-and-broadcast paradigm (Wen et al., 21 Sep 2025). A plausible implication is that CBSA can be read as a structured decomposition of attention into summary formation and sequence-wide propagation, rather than as direct all-pairs interaction.

2. Optimization objective and derivation

The theoretical basis of CBSA is the coding-rate objective. For tokens m≪Nm \ll N2 and precision m≪Nm \ll N3, the coding rate is defined as

m≪Nm \ll N4

The associated MCRm≪Nm \ll N5 objective seeks representations that are expanded in ambient space while compressed onto a union of subspaces (Wen et al., 21 Sep 2025). With orthonormal bases m≪Nm \ll N6 and projections m≪Nm \ll N7, the original objective is

m≪Nm \ll N8

with

m≪Nm \ll N9

CBSA modifies this formulation by introducing representatives Z∈Rd×NZ \in \mathbb{R}^{d \times N}0. Writing Z∈Rd×NZ \in \mathbb{R}^{d \times N}1, the modified objective is

Z∈Rd×NZ \in \mathbb{R}^{d \times N}2

Because the equality constraint is too restrictive, it is relaxed to

Z∈Rd×NZ \in \mathbb{R}^{d \times N}3

and regularized by requiring representatives to be linear combinations of projected tokens: Z∈Rd×NZ \in \mathbb{R}^{d \times N}4 This leads to the constrained CoCa objective

Z∈Rd×NZ \in \mathbb{R}^{d \times N}5

In this formulation, representatives are required both to preserve subspace coding-rate structure approximately and to remain in the span of the token projections (Wen et al., 21 Sep 2025).

Unrolling gradient descent on the compression term yields the CBSA update

Z∈Rd×NZ \in \mathbb{R}^{d \times N}6

where Z∈Rd×NZ \in \mathbb{R}^{d \times N}7 is implemented as a learnable scalar and

Z∈Rd×NZ \in \mathbb{R}^{d \times N}8

The inverse term is then approximated by a softmax attention matrix, following an approximation used in CRATE, producing the implemented operator

Z∈Rd×NZ \in \mathbb{R}^{d \times N}9

In this derivation, contraction corresponds to gradient-driven reduction of representative coding rate, while broadcast applies the representative update back to the original tokens through the coefficient matrices NN0 (Wen et al., 21 Sep 2025).

3. Architecture and computational structure

In a CBSA-based Transformer layer, tokens are first projected into subspaces: NN1 Representatives are then initialized by pooling over input tokens, following Agent Attention and related work, and subsequently refined by a cross-attention or MSCA-style extraction step that yields both representatives NN2 and coefficient matrices NN3 (Wen et al., 21 Sep 2025). The contraction stage applies self-attention over representatives in each subspace,

NN4

the broadcast stage forms

NN5

and aggregation across heads gives

NN6

The layer output is then updated by a residual step of the form

NN7

The feed-forward component is interpreted as handling the expansion term NN8, so the complete attention-plus-FF block is presented as alternating optimization over compression and expansion (Wen et al., 21 Sep 2025).

The efficiency claim follows from replacing operations over all NN9 tokens by operations over dd0 representatives. The reported complexity formulas are

dd1

for full interpretable softmax attention, and

dd2

for CBSA (Wen et al., 21 Sep 2025). The extraction and broadcast stages cost dd3, the contraction stage costs dd4, and the projection term dd5 is shared with other attention mechanisms. When dd6 is fixed or grows slowly relative to dd7, the quadratic dd8 term is replaced by dd9 and Q∈Rd×mQ \in \mathbb{R}^{d \times m}0, so the attention-specific part scales linearly in Q∈Rd×mQ \in \mathbb{R}^{d \times m}1.

This computational profile is accompanied by an interpretability claim. The subspace bases Q∈Rd×mQ \in \mathbb{R}^{d \times m}2 are said to represent low-dimensional structure, the representatives Q∈Rd×mQ \in \mathbb{R}^{d \times m}3 act as token centroids or dictionary atoms, the contraction term compresses representative structure, and the broadcast coefficients Q∈Rd×mQ \in \mathbb{R}^{d \times m}4 encode how representative changes are redistributed to tokens (Wen et al., 21 Sep 2025). This means that representative interactions and token-to-representative assignment weights are meant to be directly inspectable rather than inferred post hoc.

4. Relation to Context Broadcasting in Vision Transformers

A closely related but distinct mechanism appears in "Scratching Visual Transformer’s Back with Uniform Attention" (Hyeon-Woo et al., 2022), which introduces Context Broadcasting (CB) for Vision Transformers. That work begins from the observation that ViT attention maps are empirically high-entropy and close to dense global interactions rather than sparse ones. For attention weights Q∈Rd×mQ \in \mathbb{R}^{d \times m}5 with Q∈Rd×mQ \in \mathbb{R}^{d \times m}6, entropy is defined as

Q∈Rd×mQ \in \mathbb{R}^{d \times m}7

and the reported average entropy per attention map is approximately Q∈Rd×mQ \in \mathbb{R}^{d \times m}8, close to the maximum entropy for Q∈Rd×mQ \in \mathbb{R}^{d \times m}9 tokens, m≪Nm \ll N0 (Hyeon-Woo et al., 2022). The paper further analyzes the softmax Jacobian

m≪Nm \ll N1

and the nuclear norm proxy

m≪Nm \ll N2

arguing that this quantity is maximized by uniform attention m≪Nm \ll N3 for all m≪Nm \ll N4. The interpretation given is that dense, especially uniform, attention is optimization-unstable but nevertheless strongly preferred by ViTs (Hyeon-Woo et al., 2022).

CB addresses this by injecting dense interactions deterministically rather than forcing multi-head self-attention to maintain them through softmax. For tokens m≪Nm \ll N5, the module is

m≪Nm \ll N6

or, with per-channel scaling,

m≪Nm \ll N7

In the default design, the layer order is MSA block m≪Nm \ll N8 MLP block m≪Nm \ll N9 CB, with CB applied after the MLP (Hyeon-Woo et al., 2022). The implementation can be reduced to the line m≪Nm \ll N50 which introduces one mean over the token dimension, one broadcast add, and one scalar multiply, all of cost U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K0, while adding no parameters in the basic form (Hyeon-Woo et al., 2022).

The relation to CBSA is explicit in the technical exposition provided for (Hyeon-Woo et al., 2022): CB is described as an instantiation of the contract-and-broadcast idea implemented outside the core self-attention module. The contract step is the global average

U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K1

and the broadcast step uniformly injects U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K2 back into every token (Hyeon-Woo et al., 2022). The important distinction is that CB does not use representative extraction, subspace decomposition, or a coding-rate objective; its broadcast is uniform and deterministic rather than mediated by learned token-to-representative coefficients. This suggests that CB can be viewed as a lightweight contract-and-broadcast baseline, whereas CBSA is a more general optimization-derived attention mechanism.

5. Empirical behavior and applications

On image classification, the CBSA paper reports results for CBT-Tiny, CBT-Small, CBT-Base, and CBT-Large, pretrained on ImageNet-1K at U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K3 with patch size U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K4 (Wen et al., 21 Sep 2025). The reported model scales are CBT-Tiny with U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K5M parameters and U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K6G FLOPs, CBT-Small with U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K7M parameters and U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K8G FLOPs, CBT-Base with U={Uk∈O(d,p)}k=1KU = \{U_k \in O(d,p)\}_{k=1}^K9M parameters and UkU_k0G FLOPs, and CBT-Large with UkU_k1M parameters and UkU_k2G FLOPs. Against ViT-S, listed as UkU_k3M parameters and UkU_k4G FLOPs, CBT-Small is reported to achieve comparable top-1 accuracy on ImageNet-1K and better performance on several smaller datasets while using approximately UkU_k5 of the parameters and approximately UkU_k6 of the FLOPs (Wen et al., 21 Sep 2025). Controlled comparisons at UkU_k7 tokens further report the following top-1 accuracies: MSSA UkU_k8, CBSA UkU_k9, TSSA d×pd \times p0, and Agent d×pd \times p1–d×pd \times p2–d×pd \times p3, together with pairwise-similarity counts of d×pd \times p4M/d×pd \times p5M for MSSA, d×pd \times p6M/d×pd \times p7M for CBSA, d×pd \times p8M/d×pd \times p9M for TSSA, and m≪Nm \ll N00M/m≪Nm \ll N01M for Agent (Wen et al., 21 Sep 2025). These numbers are presented as a trade-off curve between interaction count and accuracy.

For semantic segmentation on ADE20K, CBSA is used in ViT encoders with CBSA decoders formed by stacked CBSA layers without feed-forward blocks, similarly to DEPICT (Wen et al., 21 Sep 2025). The reported result is that the CBSA decoder outperforms both DEPICT and Segmenter while using only approximately m≪Nm \ll N02 FLOPs and a tiny fraction of pairwise similarities, specifically m≪Nm \ll N03 of Segmenter’s in the decoder (Wen et al., 21 Sep 2025). The paper also reports robustness under Gaussian noise perturbations to attention parameters in the decoder, stating that CBSA-based decoders remain robust whereas Segmenter collapses (Wen et al., 21 Sep 2025).

The earlier Context Broadcasting work provides a complementary empirical picture. On ImageNet classification with non-distilled DeiT-style models, the reported results are: ViT-Ti baseline m≪Nm \ll N04 top-1, m≪Nm \ll N05 m≪Nm \ll N06, m≪Nm \ll N07 m≪Nm \ll N08; ViT-S baseline m≪Nm \ll N09, m≪Nm \ll N10 m≪Nm \ll N11, m≪Nm \ll N12 m≪Nm \ll N13; and ViT-B baseline m≪Nm \ll N14, m≪Nm \ll N15 m≪Nm \ll N16, m≪Nm \ll N17 m≪Nm \ll N18 (Hyeon-Woo et al., 2022). On ADE20K with UperNet, ViT-Ti at m≪Nm \ll N19K iterations improves from m≪Nm \ll N20 mIoU to m≪Nm \ll N21 with CB, and ViT-B from m≪Nm \ll N22 to m≪Nm \ll N23 (Hyeon-Woo et al., 2022). Robustness results for ViT-S include center occlusion from m≪Nm \ll N24 to m≪Nm \ll N25, ImageNet-A from m≪Nm \ll N26 to m≪Nm \ll N27, and FGSM from m≪Nm \ll N28 to m≪Nm \ll N29 with CB (Hyeon-Woo et al., 2022). These findings are not CBSA results proper, but they reinforce the broader contract-and-broadcast theme by showing that explicit dense global mixing can improve generalization and robustness in visual token models.

6. Special cases, limitations, and open questions

A central claim of CBSA is that it generalizes several attention mechanisms as special cases by changing the number and structure of representatives (Wen et al., 21 Sep 2025). If each token is its own representative, so that m≪Nm \ll N30, m≪Nm \ll N31, and m≪Nm \ll N32, CBSA reduces to the MSSA operator

m≪Nm \ll N33

which is the full interpretable softmax self-attention form and remains quadratic in m≪Nm \ll N34 (Wen et al., 21 Sep 2025). If representatives are orthogonal and related to principal directions of m≪Nm \ll N35, the resulting form is described as a linear-attention variant; if subspace bases are fixed principal directions for any input, the mechanism reduces to the Token-Statistics Self-Attention (TSSA) channel-attention form

m≪Nm \ll N36

where m≪Nm \ll N37 is diagonal and its entries are deterministic functions of second moments (Wen et al., 21 Sep 2025). Agent Attention is likewise presented as a CBSA variant obtained when contraction is fused into extraction or removed, so that representatives act as global agents without explicit contraction (Wen et al., 21 Sep 2025).

Several limitations are also stated explicitly. CBSA does not eliminate the projection bottleneck m≪Nm \ll N38 associated with m≪Nm \ll N39, so although the attention-specific term is linearized in m≪Nm \ll N40, total complexity remains sensitive to large m≪Nm \ll N41 (Wen et al., 21 Sep 2025). Its modeling assumption—that tokens lie near a union of low-dimensional subspaces—is said to be well-motivated for images but may be less accurate for some modalities or tasks (Wen et al., 21 Sep 2025). The softmax replacement of the contraction inverse introduces overparameterization and potential sign ambiguities that are absorbed in m≪Nm \ll N42, which weakens theoretical rigor for practical performance (Wen et al., 21 Sep 2025). The paper also notes a decompression phenomenon in early layers, where coding rate sometimes increases before later compression, and identifies extension to language and very long sequences as an open question (Wen et al., 21 Sep 2025).

The Context Broadcasting precursor raises related but distinct caveats. Its benefits are larger on smaller ViTs than on ViT-B; as the number of attention heads increases, its marginal benefit declines (Hyeon-Woo et al., 2022). Some CB-S settings slightly reduce ADE20K mIoU, and class-token-based context broadcasting is reported to decrease ImageNet accuracy from m≪Nm \ll N43 to m≪Nm \ll N44, whereas average pooling is more effective (Hyeon-Woo et al., 2022). Those observations suggest that the choice of contract operator and the depth at which broadcasting is applied are consequential design variables. In the CB paper, applying broadcasting only in upper layers, denoted m≪Nm \ll N45, improves ViT-Ti from m≪Nm \ll N46 to m≪Nm \ll N47 and ViT-S from m≪Nm \ll N48 to m≪Nm \ll N49, relative to applying CB in all layers (Hyeon-Woo et al., 2022). A plausible implication for CBSA is that representative-based broadcasting may be especially beneficial in deeper semantic layers, where the model’s preference for dense global interaction is strongest.

Taken together, these works define a spectrum of contract-and-broadcast mechanisms. Context Broadcasting (Hyeon-Woo et al., 2022) supplies a deterministic global average branch that relieves self-attention from learning uniform dense interactions, while CBSA (Wen et al., 21 Sep 2025) embeds contraction and broadcast inside a principled representative-based attention operator derived from coding-rate optimization. The common premise is that dense global mixing need not be realized solely through all-pairs softmax attention; it can instead be factored into explicit summarization and redistribution steps, with different trade-offs among interpretability, efficiency, and expressive power.

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 Contract-and-Broadcast Self-Attention (CBSA).