TPRL Cuts Vision AI Token Bloat by 66% With Barely Any Accuracy Loss
TPRL frames visual token pruning as a reinforcement learning problem, dropping up to 66.7% of tokens on LLaVA with only 0.7% accuracy loss.
ProTakeaways
- TPRL trains an RL agent to prune visual tokens in LVLMs, cutting up to 66.7% of tokens with 0.7% average accuracy drop.
- Pruning is framed as a Markov Decision Process with rewards tied to downstream task performance and efficiency.
- A token-wise autoencoder compresses each token to 64 dims for policy learning; the LLM still sees full tokens.
- Three-stage training: autoencoder, imitation from Vispruner demos, then PPO fine-tuning over up to 3 pruning steps.
- Cuts FLOPs by 54.2% and KV cache memory by 77.7% on LLaVA-1.5-7B, beating FastV and SparseVLM.
- Code available at github.com/MagicVicCoder/TPRL; validated on LLaVA-1.5 and Qwen2.5-VL.
Vision language models have a token bloat problem. When you feed a high-resolution image into something like LLaVA-1.5, the vision encoder can spit out 576 or more visual tokens, and every single one of them has to travel through the LLM's attention mechanism for both prefill and every decoded token. A new paper called TPRL proposes training a reinforcement learning agent to decide which of those tokens actually matter for the question being asked, and the numbers are striking: up to 66.7% of visual tokens removed and up to 54.2% fewer FLOPs at inference, with an average accuracy drop of just 0.7%.
Why heuristic pruning keeps hitting a wall
Most existing token pruners work off hand-engineered rules. They look at attention weights from the vision transformer, compute cosine similarities between token embeddings, or use fixed importance scores to decide what to drop. These approaches suffer from two critical limitations: they are generally task-agnostic, so pruning decisions are disconnected from the semantic requirements of the downstream language task, and they treat pruning as a one-shot operation, failing to model progressive refinement as a sequential decision process.
In plain terms: a rule that says "keep the tokens with highest attention" doesn't know whether the user asked about the elephant in the foreground or the tree behind it. And once you throw tokens away in a single pass, you cannot revisit that decision even if later tokens make it obvious you kept the wrong ones.
Pruning as a sequence of decisions
TPRL reformulates the problem as a Markov Decision Process. At each step, the agent looks at the remaining visual tokens plus the text query, then outputs a binary keep/drop mask. The next state contains only the surviving tokens, and the policy gets another chance. The reward has two parts: a task term that measures whether the LLM's answer got better or worse after the cut, and an efficiency term that pays out for pruning more aggressively.
The problem with running RL directly on raw visual tokens is that each token is a 1024 or 4096-dimensional vector, and the action space explodes with hundreds of them. TPRL's fix is a token-wise autoencoder trained with a per-token mean squared reconstruction objective that squeezes each token to a 64-dimensional code. Critically, this compressed representation is only used by the pruning policy. The LLM still sees the original, full-dimensional tokens that survive.

Warm-starting the policy with imitation
Training an RL policy from scratch on this action space converges poorly. Training the policy from scratch leads to poor convergence and suboptimal results because the agent fails to navigate the vast token-wise action space without a prior semantic warm start. The authors solve this with a demonstration phase before RL kicks in.
Here's the three-stage recipe:
- Autoencoder training: Learn the compressed 64-dim state representation.
- Learning from Demonstrations: Use Vispruner to construct 50K pruning trajectories at 25% and 50% pruning rates, then supervised-train the policy to imitate them.
- PPO fine-tuning: Let the policy explore longer pruning trajectories (up to T_max=3 steps) and optimize against the actual downstream reward.
The policy and value networks share a small multi-head self-attention module that mixes the compressed token codes with a projected text query embedding, so pruning decisions are conditioned on what was actually asked.
The numbers
The team evaluated on LLaVA-1.5-7B, LLaVA-1.5-13B, and Qwen2.5-VL-3B across GQA, MMBench, MME, POPE, SEED-Bench, ScienceQA-Image, and VQA-v2. On LLaVA-1.5-7B with 192 retained tokens (down from 576), TPRL hit 99.3% of the full-model average accuracy. It actually exceeds the upper bound on MMBench because the RL agent effectively filters redundant visual noise and reduces potential interference for the LLM. Compared to FastV at the same token budget, which drops to 86% relative accuracy, and SparseVLM at 94.2%, the RL-trained pruner sits noticeably higher on the Pareto curve.
Efficiency gains at 128 retained tokens are meaningful: during the decoding stage, which accounts for a substantial portion of the inference time, reducing visual token count directly minimizes the size of the KV cache and decreases the computational cost of the attention mechanism for every newly generated token. FLOPs drop by 63.5%, latency by 63.3%, and KV cache memory by 77.7% versus the full model.

Where this actually helps, and where it doesn't
The clearest wins are for latency-sensitive or memory-constrained deployments of LVLMs, especially when the same visual encoder is paired with a large language model for tasks like VQA, document QA, or chart understanding. Because the pruning module is a small attention block operating on compressed 64-dim codes, its own overhead is negligible next to the LLM savings.
A few caveats worth knowing before you reach for the code:
- The full pipeline requires fine-tuning the underlying LLM to adapt to sparser visual inputs. A frozen LLM works, but ablations show fine-tuning is what closes the last accuracy gap.
- Training needs demonstration trajectories from an existing heuristic pruner, so you inherit a dependency on methods like Vispruner for the warm start.
- Pushing T_max beyond 3 steps hurts accuracy, so the sequential decision process is shallower than the framing suggests.
- Benchmarks are image-only. Video, where sequential pruning would seem most valuable, is left as future work.
The broader point is that end-to-end reward optimization keeps beating clever heuristics in yet another corner of the efficiency stack. If your inference bill is dominated by visual tokens hitting a big LLM, a learned, task-aware pruner is starting to look like the right default.