← Latest papers
💬 NLP

Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inference

This paper introduces ASL, a training-free method that adaptively selects the optimal layer for token pruning based on attention score variance, thereby balancing inference speed and accuracy across diverse tasks while outperforming existing state-of-the-art layer-wise pruning approaches.

Original authors: Rei Taniguchi, Yuyang Dong, Makoto Onizuka, Chuan Xiao

Published 2026-04-17
📖 4 min read☕ Coffee break read

Original authors: Rei Taniguchi, Yuyang Dong, Makoto Onizuka, Chuan Xiao

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a brilliant detective (the Large Language Model or LLM) trying to solve a mystery. To do this, you have a massive filing cabinet (the KV Cache) where you keep notes on every single clue you've read so far.

If the mystery is a short story, the cabinet is small and easy to manage. But if the mystery is a 100,000-page novel, your cabinet becomes so huge that it takes up your entire office, slows you down, and makes it hard to find the one specific clue you need to solve the case.

The Problem: The "One-Size-Fits-All" Filing System

Recently, smart people invented a way to shrink this cabinet. They decided to throw away most of the notes and only keep the "important" ones. This is called Token Pruning.

However, the existing methods have a major flaw: They are rigid.

Imagine a rule that says: "No matter what the mystery is, throw away 90% of the notes exactly when you reach page 15."

  • For an easy mystery (like "Who stole the cookie?"), you might have found the answer by page 5. Throwing away notes at page 15 is fine; you're safe.
  • For a hard mystery (like "Find the hidden key in a haystack of 100,000 pages"), you might not know which note is important until page 50. If you throw away notes at page 15, you accidentally throw away the key, and you fail the case.

Current methods pick a fixed "page number" (a specific layer in the AI) to start deleting notes. This works great for easy tasks but fails miserably for hard ones.

The Solution: ASL (The Adaptive Detective)

The authors of this paper propose a new method called ASL (Adaptive Selection Layer). Instead of following a rigid rule, ASL gives the detective a smart assistant that watches how the detective is thinking.

Here is how it works, using a simple analogy:

1. The "Confusion" Meter

Imagine the detective is reading the novel.

  • Early on: The detective is confused. They are looking at every sentence equally, wondering, "Is this the clue? Or that one? Or this one?" Their attention is scattered.
  • Later on: The detective starts to get it. Their eyes lock onto a specific paragraph. They stop looking at the rest. Their attention becomes focused.

The existing methods just guess when to stop reading everything. ASL actually measures the focus.

2. The Variance Check

ASL looks at the "rank" of the clues.

  • If the detective is confused, the ranking of clues changes wildly from one page to the next. (Today's top clue is tomorrow's bottom clue). This is high variance.
  • When the detective finds the real clue, the ranking stabilizes. The same few clues stay at the top. This is low variance.

ASL keeps a running score of this "stability."

  • If the score is unstable: "Keep reading everything! We aren't sure yet."
  • If the score stabilizes: "Aha! The detective has locked onto the important clues. Now is the perfect time to throw away the rest of the notes and shrink the cabinet."

Why This is a Game Changer

The Flexible Filing System:

  • Easy Task: The detective locks onto the answer quickly. ASL sees the stability early, shrinks the cabinet immediately, and you get a super-fast answer.
  • Hard Task: The detective struggles for a while, scanning many pages. ASL sees the instability, keeps the cabinet full, and waits until the detective is truly sure before shrinking it. You get a slower but correct answer.

The Result:
Instead of forcing a "fast but dumb" or "slow but smart" choice, ASL finds the perfect balance for every single question.

  • It saves memory (keeps the office small).
  • It keeps the speed high when possible.
  • It ensures accuracy when the task is difficult.

In a Nutshell

Think of existing methods as a traffic light that turns red at a fixed mile marker, regardless of traffic. If traffic is light, you stop unnecessarily. If traffic is heavy, you crash because you stopped too late.

ASL is a smart traffic controller that watches the cars. It only turns the light red when the traffic has actually cleared up. It adapts to the situation, ensuring you never wait too long and never crash into a pile-up.

This allows AI models to handle massive amounts of text (like entire books or long conversations) without running out of memory, while still getting the right answers even for the trickiest questions.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →