arXiv:2608.23921cs.CVAug 2026

Manuscript Offprint

arXiv:2608.23921

HAP: Head-Adaptive Visual Token Pruning via Cross-Modal Alignment

Yuanhao Sun, Huawei Ji, Yuan Jin, Cheng Deng, Luoyi Fu, Xinbing Wang

Abstract

Recent Vision-Language Models encode high-resolution images into long visual token sequences, incurring prohibitive prefill costs. To compress them, existing methods score each visual token by averaging text-to-visual attention uniformly across all heads, which assumes every head matches the query. However, our empirical analysis shows that misaligned heads dominate the average, amplifying background tokens and drowning out fine-grained cues.

To address this, we propose PAQ (Prompt-Grounded Attention Quality), a metric quantifying how well each head aligns the prompt with image regions. Built on PAQ, our pruning proceeds in three stages. Given a target FLOPs budget, we first partition the transformer layers into groups and allocate a visual token budget to each. Within each group, we then aggregate per-head attention maps via PAQ-weighted softmax into a group-level matrix. Finally, we score visual tokens by this matrix's magnitude and retain the allocated budget per group. By weighting heads with PAQ, our method scores tokens by attention signals that more faithfully reflect prompt relevance, rather than diluting them through uniform averaging.

Across 18 benchmarks, our method delivers state-of-the-art trade-offs. Specifically, on LLaVA-1.5-7B (9 tasks), retaining only 5.6% tokens preserves 99.1% of the original performance, surpassing the strongest baseline AutoPrune by 4.2 points. Code is available in https://github.com/baokou-fw2/HAP.

1 Introduction

Recent advances in Vision-Language Models (VLMs) (Liu et al., 2023; Lu et al., 2026; Bai et al., 2025b) have achieved remarkable progress in multimodal reasoning and understanding. To capture fine-grained details, state-of-the-art VLMs increasingly adopt high-resolution visual encoders that

Figure

Figure 1: Head-level cross-modal attention patterns. Layer 2 attention maps reveal sink, optimal, and dispersed cross-modal patterns across three VLMs.

produce long sequences of visual tokens. This visual token explosion imposes substantial computational and memory overhead during the autoregressive prefill stage, creating a critical bottleneck for real-time deployment and limiting the scalability of VLMs in resource-constrained environments.

To mitigate this prefill burden, existing methods exploit cross-modal attention statistics to rank and prune visual tokens. These weights are already computed in the forward pass and naturally indicate where the model focuses under the text prompt. For instance, SparseVLM (Zhang et al., 2025e) identifies informative text tokens as raters and accumulates their attention mass over visual tokens to produce a layer-wise importance score. PDrop (Xing et al., 2024) aggregates attention scores uniformly across all heads within each target layer and progressively discards low-ranking tokens following a pyramid schedule. AutoPrune (Wang et al., 2026) further derives mutual information from attention distributions to guide layer-wise budget allocation.

Despite their varied designs, these methods share a critical simplification. They implicitly assume that all attention heads within a layer exhibit the same degree of focus on prompt-relevant regions. Consequently, they average attention scores indiscriminately across all heads. However, our em-

∗^{*}Corresponding author pirical analysis in Fig. 1 reveals attention heads split into three distinct modes (sink, dispersed, and optimal) with starkly different spatial focus. Sink heads collapse to fixed regions regardless of the text prompt. Dispersed heads spread attention broadly without clear prompt correspondence. Only optimal heads concentrate on task-relevant regions that shift with the query. This reveals a critical yet overlooked property. The image regions that the model attends to under text guidance vary drastically across heads. We term this property prompt-grounded attention. Fig. 2 makes this cost concrete, showing that tokens selected by uniform head averaging consistently fall short of those selected by the single best-aligned head, both in task accuracy and in spatial localization.

To distinguish reliable prompt-grounded attention from spurious noise, we propose the Prompt-Grounded Attention Quality (PAQ) score. Based on the uncertainty coefficient (Theil, 1970), PAQ is computed purely from post-softmax intrinsic attention statistics. It measures how genuinely an attention head's visual distribution is driven by the text prompt. A high PAQ indicates concentrated attention on semantically prompt-relevant regions, while a low PAQ reflects attention-sink or dispersed patterns that are unreliable for pruning.

Building upon PAQ, we introduce HAP, a head-adaptive visual token pruning framework that requires no per-task hyper-parameter tuning. Given a target FLOPs budget, HAP organizes transformer layers into groups and allocates visual token budgets following a geometric pyramid structure, progressively reducing tokens from lower to higher layers. Within each layer, HAP evaluates every attention head with PAQ. Heads with high PAQ, which concentrate on prompt-relevant regions, receive greater weight in the scoring. Heads with low PAQ are effectively softly suppressed. This produces a quality-aware layer-level score. HAP then hierarchically merges these layer scores across the group under the same PAQ weighting to obtain the final token importance ranking. This two-stage design replaces uniform head averaging with a principled mechanism that scores visual tokens by their true prompt relevance.

We validate the effectiveness of our method across 18 benchmarks and five model architectures, including LLaVA, InternVL, Qwen-VL and Deepseek-VL. In terms of accuracy, retaining only 5.6% of the visual tokens, our model still preserves 99.1% of the original performance, outperforming

(a) Performance Fluctuations

Figure

(b) Layer-Wise Alignment Heterogeneity is Non-Monotonic

Figure

Figure 2: (a) MME performance when retaining 25% of visual tokens at different layers across three VLMs. (b) RefCOCO IoU when retaining 50% of visual tokens at different layers. In both panels, solid curves denote average attention mass and dashed curves denote the best single head; average aggregation consistently trails the optimal head.

the strongest baseline AutoPrune by 4.2 points. In terms of efficiency, it reduces KV-cache usage by 80% and achieves a 2.82×2.82\times inference speedup. Our contributions are summarized as follows:

• We empirically reveal diverse cross-modal alignment patterns across attention heads. We propose PAQ, a metric that discriminates reliable alignment from attention-sink or dispersed patterns in a single score.

• We propose HAP, a training-free pruning strategy whose only user-specified input is the target FLOPs budget. HAP replaces coarse head averaging with PAQ-guided softmax aggregation, so that visual tokens are scored by attention signals that better reflect prompt relevance.

• We evaluate HAP on five representative VLM architectures across 18 benchmarks. Results show that HAP achieves state-of-the-art performance-efficiency trade-offs, validating the strong generalizability of our approach.

References (16)