arXiv:2608.23921cs.CV2026-08

通过跨模态对齐动态剪枝视觉令牌,大幅降低推理开销。

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

论文配图:HAP: Head-Adaptive Visual Token Pruning via Cross-Modal Alignment
图 1 · 摘自论文原文
  • 按提示与图像区域对齐度加权计算注意力,避免平均稀释关键信息。
  • 仅保留5.6%的视觉令牌,仍保持99.1%原模型性能,优于现有最佳方法4.2点。
  • 适用于高分辨率图像输入的视觉语言模型,提升推理效率与精度平衡。

近期视觉语言模型将高分辨率图像编码为长视觉令牌序列,带来高昂的预填充成本。现有方法通过在所有注意力头间均匀平均文本到视觉注意力来评分每个视觉令牌,但该方法假设所有头均与查询匹配。然而我们的实证分析显示,错位头主导平均结果,放大背景令牌并淹没细粒度线索。为此,我们提出PAQ(提示锚定注意力质量),量化每个头将提示与图像区域对齐的程度。基于PAQ,我们的剪枝分为三阶段:给定目标浮点运算预算,首先将Transformer层分组并分配每组视觉令牌预算;在每组内,通过PAQ加权softmax聚合各头注意力图,生成组级矩阵;最后,根据该矩阵幅度评分视觉令牌,并按预算保留。通过用PAQ加权头,本方法以更真实反映提示相关性的注意力信号评分,而非通过均匀平均稀释信号。在18个基准测试中表现最优,尤其在LLaVA-1.5-7B(9任务)上,仅保留5.6%令牌即维持99.1%原始性能,超越最强基线AutoPrune 4.2分。代码已开源于https://github.com/baokou-fw2/HAP。

原文摘要 · Abstract (English)

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 \textbf{5.6\%} tokens preserves \textbf{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.

视觉语言模型令牌剪枝跨模态对齐高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。