Papers
Topics
Authors
Recent
Search
2000 character limit reached

Adaptive Token Selection & Aggregation

Updated 8 March 2026
  • Adaptive Token Selection and Aggregation (ATSA) is a set of techniques that dynamically compress and filter token sequences based on data and task-specific constraints.
  • It employs methods such as query-adaptive exploration, cluster-based aggregation, and uncertainty-driven selection across vision, language, and video tasks.
  • ATSA improves computational efficiency and maintains high task performance by selectively retaining high-saliency tokens while merging redundant ones.

Adaptive Token Selection and Aggregation (ATSA) encompasses a family of techniques for adaptively compressing, filtering, or merging token sequences—primarily in transformer-based architectures—based on data, query, or downstream task constraints, while minimizing loss of critical information and maximizing end task performance. Recent lines of research have instantiated ATSA in diverse domains, including visual-LLMs, video question answering (VideoQA), spiking neural networks (SNNs), and hallucination detection in LLMs, with strong empirical results across these disparate modalities. ATSA protocols frequently combine unsupervised selection, query/task-adaptive metric-driven selection, and cluster-aware aggregation to dynamically allocate representational “budget” only to tokens that maximize informativeness or task relevance within computational or memory constraints.

1. Core Principles and Motivations

Token-level redundancy is endemic in both vision and language pipelines, with attention costs or memory footprints scaling quadratically in sequence length. ATSA’s central goal is to preserve essential information by dynamically selecting and aggregating tokens—using relevance, importance, saliency, or informativeness scores—such that:

  • Irrelevant or redundant tokens are pruned or merged, with possible denoising effects.
  • Critical details—task-adapted spatial/temporal features or high-saliency clusters—are retained at maximal resolution.
  • The final token sequence satisfies strict computational, memory, or bandwidth constraints.

A defining aspect of ATSA, distinguishing it from static sparsification or uniform thinning, is explicit adaptivity—selection and aggregation rules change on a per-query, per-sample, or per-task basis, often leveraging contextual or uncertainty cues.

ATSA is frequently realized as a plug-and-play pre-processing step, requiring neither fine-tuning of the underlying model nor modification of architecture heads or decoders (Shi et al., 30 Apr 2025, Omri et al., 24 Apr 2025).

2. Methodological Architectures

Several ATSA implementations with distinct selection/granularity trade-offs have been recently established:

2.1 Token Aggregation via Clustering

Cluster-level aggregation operates on token embeddings output from a vision encoder (e.g., ViT or CLIP), grouping tokens into clusters CjC_j using K-means (often K-means++), and then retaining the most salient tokens within each cluster while aggregating (averaging) the remainder (Omri et al., 24 Apr 2025). Saliency is typically computed from cross-modal attention maps or using text-conditioned attention weights:

si=1Hh=1Hmaxt[1,T]softmax(QtextKvi(h))ts_i = \frac{1}{H}\sum_{h=1}^H\max_{t\in[1,T]} \mathrm{softmax}(Q_\mathrm{text} K_{v_i}^{(h)})_t

Within each cluster, the top mj=pCjm_j = \lceil p |C_j| \rceil most salient tokens are preserved; the rest are replaced by their centroid:

aj=1RjiRjxia_j = \frac{1}{|R_j|}\sum_{i\in R_j} x_i

The compressed token sequence is Z=j(Sj{aj})Z = \bigcup_j (S_j \cup \{a_j\}). This achieves aggressive reduction (MNM \ll N) with little loss in visual-language performance metrics.

2.2 Query-Adaptive Exploration–Selection in VideoQA

In video-language applications, ATSA operates via a two-stage “Explore–then–Select” protocol (Shi et al., 30 Apr 2025): (i) exploring all feasible static-vs-dynamic token splits under a fixed token budget, and (ii) selecting the optimal allocation using a query-aware cross-attention metric.

  • Explore: Construct nn candidate token sequences T^v(m)\hat T_v^{(m)}, each with a different number of fully retained “static” spatial frames (and complementary dynamic “delta” tokens, selected by maximal feature distance from the static anchor).
  • Select: For each candidate, compute the sum over maximal cross-attention weights from the query tokens to the visual tokens at layer two of the frozen VideoLM:

s=j=1Nvmaxi=1..Nqsoftmax(QKdk)ijs = \sum_{j=1}^{N_v} \max_{i=1..N_q} \mathrm{softmax}\left(\frac{\bm{Q}\bm{K}^\top}{\sqrt{d_k}}\right)_{ij}

The candidate maximizing ss is selected and concatenated with instruction and query tokens for downstream inference.

2.3 Adaptive Token Scoring for Hallucination Detection

In the HaMI protocol (Niu et al., 10 Apr 2025), adaptive token selection is embedded within a MIL (multiple-instance learning) setup, in which each generation sequence (“bag”) is scored at the token level by an MLP on uncertainty-augmented representations. Selection is effected by choosing only the highest scoring token (via argmax) per bag for loss calculation and evaluation:

S(B)=maxiBsiS(\mathcal B) = \max_{i \in \mathcal B} s_i

where si=fθ(hi)s_i = f_\theta(h'_i), with hih'_i representing an optional uncertainty-augmented internal LLM activation.

2.4 Adaptive Halting and Merging in SNN-ViTs

AT-SNN (Kang et al., 2024) extends adaptive computation time (ACT) to SNN-based ViTs, using a token-specific “halting” score hkl,th_k^{l,t}, accumulated both across blocks and spiking time steps:

hkl,t=σ(αTkl,t,1NTkl,t+β)h_k^{l,t} = \sigma \left( \alpha \frac{\mathcal{T}_k^{l,t,1}}{NT_k^{l,t} + \beta} \right)

Tokens are masked (removed for further computation) as soon as accumulated halting exceeds a threshold. In parallel, highly similar token pairs per block/timestep are merged using cosine similarity, further reducing the sequence length.

Method Core Operation Adaptivity Source Domain
Cluster Agg. ATSA K-means + agg Cross-modal saliency / clusters VLM, VQA
Explore–Select ATSA Search + selection Query-aware cross-attention VideoQA
HaMI ATS Max-scoring MIL Hallucination signal/uncertainty Halluc. Detection
AT-SNN Halting + merge Spatial/temporal redundancy Spiking ViT/SNN

3. Theoretical and Algorithmic Details

All major ATSA protocols are defined by explicit optimization or greedy routines to compress or rank tokens:

  • Saliency/attention scores may be derived from frozen network weights or attention maps, requiring no model fine-tuning (Omri et al., 24 Apr 2025, Shi et al., 30 Apr 2025).
  • Clustering is typically performed with K-means++ on the vision-encoder embeddings, with optional cross-attention-based saliency rankings for per-cluster token selection (Omri et al., 24 Apr 2025).
  • Merging is operationalized as arithmetic averaging of feature vectors, with careful accounting for aggregation masks.
  • Query adaptivity is accomplished by evaluating attention metrics for multiple candidate splits and selecting the configuration maximizing relevance to the prompt (Shi et al., 30 Apr 2025).
  • Plug-and-play design is pervasive: ATSA modules are inserted before major bottleneck attention layers, producing negligible compute overhead relative to downstream self-attention (Omri et al., 24 Apr 2025).
  • For MIL-based selection, only the maximal-scoring token per positive/negative bag is used for hinge-loss computation, and adjacent token scores are regularized for smoothness (Niu et al., 10 Apr 2025).

4. Integration into Vision, Language, and Multimodal Pipelines

ATSA is “plug-and-play” and can directly replace initial uniform subsampling, dense feature flattening, or static token pruning operations in vision-language and video-LLMs:

  • In vision-LLMs (e.g., LLaVA, VILA), the ATSA block is inserted after the vision-projection layer, prior to the LLM’s first cross-attention, with no need to retrain encoder weights (Omri et al., 24 Apr 2025).
  • In VideoQA, the explore-select ATSA block is applied post-frame-feature extraction but before concatenation with instruction and query tokens (Shi et al., 30 Apr 2025).
  • In spiking neural architectures, ATSA’s halting/merging mechanics operate at each SNN-ViT block and timestep, directly modulating the ViT token processing (Kang et al., 2024).
  • For LLM hallucination detection, ATS/HaMI operates solely on extracted internal hidden states (layers 12–18), requiring no modification to the base LLM or output heads (Niu et al., 10 Apr 2025).

5. Empirical Performance and Comparative Analyses

ATSA implementations have demonstrated gains in computational efficiency, accuracy, or both, across diverse settings:

  • Vision-LLM benchmarking with ATSA aggregation achieves 98%+ reduction in FLOPs for LLM attention (e.g., from 576 to 64 tokens), with minimal accuracy loss on SQA, TextVQA, POPE, MME, MMBench, GQA, and VizWiz (Omri et al., 24 Apr 2025).
  • Cluster aggregation and saliency-based ATSA consistently outperform random, purely spatial, or existing token merging/pruning baselines (VisionZip, SparseVLM, FastV) at various token retention budgets (Omri et al., 24 Apr 2025).
  • Explore–then–Select ATSA in VideoQA boosts EgoSchema accuracy by 1.6 points (66.2%→67.8%) and VideoMME by up to 5.8 points under budgeted settings, outperforming similarity and retrieval-based baselines (Shi et al., 30 Apr 2025).
  • In SNN-ViTs (AT-SNN), token reduction of 42% yields only a 0.15% loss in CIFAR-100 accuracy, with up to 36% energy savings; entropy-aware halting can paradoxically increase accuracy (Kang et al., 2024).
  • For hallucination detection (HaMI), ATS increases AUROC from 0.879 to 0.923 (Trivia QA) and posts 2–3 point gains vs. next-best candidates across SQuAD, NQ, and BioASQ benchmarks using LLaMA-2 7B/13B (Niu et al., 10 Apr 2025).

6. Limitations and Qualitative Insights

Research has identified limitations and perplexing behaviors motivating further refinements:

  • Saliency maps often fail to track semantic importance or query dependence: visual regions highlighted by cross-modal attention may not correspond to entities or attributes referenced in prompts (Omri et al., 24 Apr 2025).
  • Aggressive reliance on cluster aggregation is robust to this unreliability, denoising spurious attention signals, but spatial/random baselines remain surprisingly competitive—underscoring token redundancy.
  • Explore-select ATSA in VideoQA is sensitive to search space size nn; too many candidates lead to overly static sequences and possible distribution shift, while too few limit adaptivity (Shi et al., 30 Apr 2025).
  • In SNN-ViTs, the merge operation must be temporally aware; merging tokens inconsistently across timesteps impairs information integration (Kang et al., 2024).
  • Non-uniform token removal can disrupt positional encoding schemes, particularly when 1D encodings meet 3D visual structures (Shi et al., 30 Apr 2025).
  • All current plug-and-play ATSA modules introduce some extra pre-processing latency, with exploration-selection dominating cost compared to static sampling (Shi et al., 30 Apr 2025).

7. Prospects for Future Development

Potential ATSA extensions include:

  • Learning lightweight selector or policy networks to dynamically predict cluster numbers, static/dynamic splits, or saliency/budget thresholds (Shi et al., 30 Apr 2025).
  • Joint end-to-end training of aggregation modules with vision encoder and LLM, in contrast to the current plug-and-play paradigm.
  • Adapting token selection metrics to explicit motion saliency, multi-query, or conversational scenarios.
  • Addressing positional encoding mismatches via token-aware position projections.
  • Extending multiple-instance learning-based ATS to other sequence anomaly or error detection tasks.
  • Integrating ATSA selection loops into the inner-optimization of large foundation models to increase robustness to sequence compression.

ATSA research converges on the principle that adaptive, context- or task-aware token compression is essential both for scaling multimodal models and for maintaining or improving downstream fidelity and resource efficiency in current and emerging architectures (Shi et al., 30 Apr 2025, Omri et al., 24 Apr 2025, Kang et al., 2024, Niu et al., 10 Apr 2025).

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 Adaptive Token Selection and Aggregation (ATSA).