AnchorPrune

August 8, 2026 · View on GitHub

AnchorPrune: Relevance-Anchored Contextual Expansion for Visual Token Pruning
Kyuan Oh and Bumsoo Kim
Chung-Ang University

ECCV 2026 arXiv 2607.07033 Apache 2.0

Official implementation of the ECCV 2026 paper.

AnchorPrune is a training-free visual-token pruning method for efficient vision-language model inference. The method first constructs a protected relevance anchor from query-conditioned visual-token priorities, and then expands the retained set with importance-weighted contextual novelty. This relevance-anchored ordering prevents indispensable query evidence from being displaced by later diversity or coverage optimization.

Contents

Overview

AnchorPrune is designed as a lightweight inference-time module:

  • Training-free: no finetuning, model-parameter updates, or architecture retraining.
  • Relevance-anchored: query-critical visual evidence is protected before contextual expansion.
  • Context-aware: the remaining budget is allocated by maximizing p_i · Delta(i; S), selecting tokens that are both globally informative and non-redundant.
  • Architecture-aware: verified integrations are provided for LLaVA and Qwen.

Installation

Clone the repository:

git clone https://github.com/MULTI-cau/AnchorPrune.git
cd AnchorPrune

LLaVA and Qwen are evaluated with separate dependency stacks. We recommend creating one environment per backbone.

LLaVA

conda create -n anchorprune-llava python=3.10 -y
conda activate anchorprune-llava
pip install -e ".[llava]"

Qwen

conda create -n anchorprune-qwen python=3.10 -y
conda activate anchorprune-qwen
pip install -e ".[qwen]"

Supported Backbones

BackboneUnpruned visual tokensPaper budgets
LLaVA-1.5-7B57632, 64, 128
Qwen2.5-VL-7B1,296 at 1008 x 100864, 128, 256

The current release focuses on image-model evaluation. New backbones can be integrated by providing the token-level relevance, feature, and importance signals consumed by the model-agnostic selector in anchorprune/selection.py.

Repository Layout

AnchorPrune/
|-- anchorprune/             # Core selector and model-specific adapters
|   |-- selection.py         # Model-agnostic relevance-anchored expansion
|   |-- llava.py             # LLaVA pruning integration
|   |-- qwen.py              # Qwen pruning integration
|   `-- README.md            # Core module documentation
|-- lmms-eval/               # Lightweight LMMs-Eval fork for benchmark execution
|-- llava/                   # Compact vendored LLaVA inference backend
|-- scripts/                 # Reproduction scripts
|-- LICENSE
|-- THIRD_PARTY_NOTICES.md
|-- pyproject.toml
`-- README.md

The LMMs-Eval wrappers intentionally remain thin. They parse evaluation inputs, attach the AnchorPrune runtime hook, and delegate pruning logic to anchorprune:

lmms-eval/lmms_eval/models/simple/llava.py
lmms-eval/lmms_eval/models/simple/qwen2_5_vl.py

Reproduction

All scripts follow the same interface:

./scripts/<script>.sh <K> <K_min> <tasks>

where K is the retained-token budget, K_min is the minimum Stage-1 anchor size, and tasks is a comma-separated LMMs-Eval task list.

LLaVA

CUDA_VISIBLE_DEVICES=0,1,2,3 \
./scripts/eval_llava_1_5.sh 32 5 mme

Qwen

The Qwen reproduction path fixes the image resolution to 1008 x 1008, matching the paper setting.

CUDA_VISIBLE_DEVICES=0,1,2,3 \
./scripts/eval_qwen2_5_vl.sh 64 10 mme

Multiple Benchmarks

The task argument accepts the standard comma-separated LMMs-Eval format. For example:

CUDA_VISIBLE_DEVICES=0,1,2,3 \
./scripts/eval_llava_1_5.sh \
32 5 \
"vqav2_val,textvqa_val,gqa,scienceqa_img,mme,pope,mmbench_en_dev,mmbench_cn_dev,mmvet"

Paper Settings

The scripts expose K and K_min because these are the primary budget choices. The remaining method choices are fixed to the paper configuration.

ComponentReleased setting
Stage-1 allocationadaptive protected relevance anchoring
Novelty thresholdtau = 0.2
Patiencecumulative, P = 3
Stage-1 upper boundK_max = 0.5K
Stage-2 objectivemaximize p_i · Delta(i; S)
Output ordernative visual-token order
LLaVA relevance signalnegated CLIP patch-text similarity
Qwen relevance signaltoken-wise maximum matching after multimodal projection

Recommended paper budgets are:

BackboneBudget conventionKK_min
LLaVA-1.5-7Btotal retained tokens325
LLaVA-1.5-7Btotal retained tokens6410
LLaVA-1.5-7Btotal retained tokens12820
Qwen2.5-VL-7Btotal retained tokens6410
Qwen2.5-VL-7Btotal retained tokens12820
Qwen2.5-VL-7Btotal retained tokens25640

Benchmark Task Names

Paper benchmarkLMMs-Eval task
VQAv2vqav2_val
TextVQAtextvqa_val
GQAgqa
ScienceQA-IMGscienceqa_img
MMEmme
POPEpope
MMBench-ENmmbench_en_dev
MMBench-CNmmbench_cn_dev
MM-Vetmmvet
DocVQAdocvqa_val
AI2Dai2d
MMMUmmmu_val

Core Selector Usage

The selector can be used independently of LMMs-Eval:

from anchorprune import AnchorPruneConfig, anchorprune_select

selected_indices, anchor_indices = anchorprune_select(
    relevance=relevance_scores,
    features=stage1_features,
    importance=importance_prior,
    config=AnchorPruneConfig(k_total=64, k_min=10),
    expansion_features=stage2_features,
)

See anchorprune/README.md for the selector interface and model-specific instantiations.

Citation

If AnchorPrune is useful for your research, we appreciate citing the paper:

@misc{oh2026anchorprunerelevanceanchoredcontextualexpansion,
  title         = {AnchorPrune: Relevance-Anchored Contextual Expansion for Visual Token Pruning},
  author        = {Kyuan Oh and Bumsoo Kim},
  year          = {2026},
  eprint        = {2607.07033},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2607.07033},
}

License and Acknowledgements

AnchorPrune is released under the Apache License 2.0. See LICENSE for details.

This release builds on the public implementations and evaluation interfaces of LLaVA, Qwen2.5-VL, and LMMs-Eval. Third-party notices are provided in THIRD_PARTY_NOTICES.md.