Locality-Aware Redundancy Pruning for LLM Depth Compression
This paper proposes LoRP, a training-free, one-shot depth pruning framework that dynamically allocates layer removal based on a novel Representation Locality Score to effectively reduce redundancy in large language models while preserving performance.
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 have a massive, incredibly deep library of knowledge (a Large Language Model). This library has hundreds of floors (layers), and each floor contains a team of librarians (neurons) who help process information. The problem is that this library is huge, expensive to run, and slow to navigate. You want to remove some floors to make it faster, but you're terrified that if you remove the wrong ones, the library will stop making sense.
This paper introduces a new way to decide which floors to knock down, called LoRP (Locality-Aware Redundancy Pruning). Here is how it works, explained simply:
The Old Way: Guessing and Checking
Previously, people tried to shrink these libraries using two main strategies:
- The "Local" Approach: They looked at each floor individually and said, "This floor seems weak, let's remove it." They assumed every floor was unique and independent.
- The "Contiguous" Approach: They assumed that redundancy (unnecessary repetition) only happens in a specific block of floors, like floors 10 through 15. So, they would just chop out that whole chunk.
The Problem: The authors discovered that different libraries (AI models) have different "architectures." In some libraries, the extra, useless work is concentrated in one specific block. In others, the extra work is spread out evenly across the entire building. The old methods used a "one-size-fits-all" rule, which often resulted in cutting out important floors or leaving behind useless ones.
The New Way: LoRP (The Smart Architect)
LoRP is like a smart architect who walks through the library before making any cuts to see how the floors actually relate to each other. It doesn't need to retrain the library (it's "training-free"); it just observes how the librarians talk to each other.
Here is the step-by-step process:
1. The "Echo" Test (Measuring Similarity)
The architect sends a few sample sentences through the library and listens to how the "hidden thoughts" (representations) change from floor to floor.
- If Floor 5 and Floor 6 are saying almost the exact same thing, they are redundant.
- If Floor 5 is saying something totally different from Floor 6, they are unique.
2. The "Locality Score" (The RLS)
The architect calculates a score called the Representation Locality Score (RLS). Think of this as a "clumpiness meter":
- High Score (Clumpy): The library has "echo chambers." Floors 10–20 are all repeating the same ideas. The redundancy is localized.
- Low Score (Spread Out): The library has "diffuse echoes." The repetition is scattered all over the building, from the basement to the roof. The redundancy is globally distributed.
3. Grouping the Floors (Clustering)
Based on that score, the architect groups the floors into "neighborhoods" (clusters) of similar thinking.
- If the library is "clumpy," the neighborhoods are tight groups of identical floors.
- If the library is "spread out," the neighborhoods are more diverse.
4. The Two-Stage Cut (Pruning)
Now, the architect decides which floors to remove using a two-step strategy:
- Step 1 (Coverage): First, they make sure to remove one floor from every single neighborhood. This ensures they don't accidentally wipe out an entire unique neighborhood.
- Step 2 (The Cleanup): Then, they look at the remaining floors in each neighborhood. They keep removing the most "redundant" (most repetitive) floors until they hit their target size.
Why It Works Better
The paper tested this on several different types of AI models (like LLaMA, Mistral, and Qwen).
- For "Clumpy" models: LoRP correctly identified that it could safely remove a big chunk of floors from one specific area.
- For "Spread Out" models: LoRP correctly realized it needed to take a little bit from many different areas, rather than chopping off a big block.
The Result:
Because LoRP adapts to the specific shape of the library, it keeps the AI smarter and more accurate than the old "one-size-fits-all" methods. It preserves the library's ability to answer questions and understand language much better, even after removing a significant number of floors.
In a Nutshell
Think of it like editing a movie.
- Old methods were like blindly cutting out every 10th scene or cutting out a whole 5-minute block because they assumed the movie was repetitive in a specific way.
- LoRP is like a director who watches the whole movie first, sees exactly where the dialogue repeats, and then cuts the specific redundant lines while keeping the story flow intact, no matter how the movie was originally structured.
The paper concludes that understanding where and how information repeats in an AI is the key to shrinking it efficiently without breaking it.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.