CORP: Closed-Form One-shot Representation-Preserving Structured Pruning for Transformers
The paper proposes CORP, a closed-form one-shot structured pruning method that removes MLP and attention components in Transformers using only unlabeled data and affine reconstruction to achieve high accuracy without retraining or fine-tuning.
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 smart library (a Transformer model) that can answer questions, recognize images, and write stories. But this library is so huge that it takes up an entire building, requires a massive staff to run, and is too heavy to move into a small apartment (like a phone or a laptop).
You want to shrink this library down to fit in a backpack without losing its ability to tell good stories or recognize cats. This is called pruning.
The Problem: The "Brute Force" Approach
Most current methods of shrinking these libraries are like hiring a team of editors to read every single book, decide which pages to cut out, and then hire a whole new team of teachers to re-teach the library how to function with the missing pages. This takes a long time, requires a lot of "labeled" data (answer keys), and often breaks the library if you cut too much too fast.
The Solution: CORP (The "One-Shot" Fix)
The authors of this paper propose a new method called CORP. Think of CORP as a master architect who can look at the library, decide what to cut, and instantly redesign the remaining shelves so the books still fit perfectly together—all in a single pass, without needing any answer keys or re-teaching.
Here is how CORP works, using simple analogies:
1. The "Missing Page" Problem
When you cut out a chapter (a dimension) from a book, the story gets broken. The remaining text doesn't make sense anymore because it was relying on the missing part.
- Old Way: Just cut the page and hope the reader can guess what was there. (Result: The story makes no sense).
- CORP Way: CORP realizes that the missing page wasn't random; it was actually a predictable mix of the pages that stayed.
2. The "Affine" Translator (For the MLP)
Inside the library, there are sections (called MLPs) that process information. CORP looks at the pages it keeps and asks: "Can I write a simple formula that predicts what the missing pages would have said, based only on the pages I kept?"
It uses a bit of math (called ridge regression) to create a "translator." It calculates exactly how the kept pages relate to the missing ones. Then, it folds this translation directly into the remaining shelves.
- The Magic: You don't need to keep the missing pages. You just tweak the shelves that remain so they "speak" for the missing ones. The library becomes smaller, but the story remains the same.
3. The "Attention" Fix (For the Brain)
The library also has a "brain" (Attention mechanism) that decides which books to look at together. When you cut parts of this brain, the connections get weak.
CORP does something similar here. It looks at the connections that were cut and figures out how to adjust the connections that remain so they can still "talk" to each other effectively. It essentially rewrites the map of the library so the remaining paths lead to the same destinations.
Why is this special?
- No Re-Training: You don't need to re-teach the library. You just do the math once on a small sample of data (like looking at a few random books to understand the style) and then cut.
- No Labels Needed: You don't need to know the "correct answers" to the books. You just need to see the text.
- One-Shot: It happens in a single step. No back-and-forth optimization.
The Results
The authors tested this on a famous image-recognition library (DeiT).
- They cut out 50% of the library's structure (half the shelves, half the brain connections).
- Result: The library still recognized images with 83.27% accuracy.
- Bonus: It became much faster (1.6x speedup) and used less memory.
They also tested it on language models (OPT) and other vision models (DINOv2), showing that this "architect" approach works well for different types of libraries, keeping them smart even when they are significantly smaller.
In Summary
CORP is like a magic shrink-ray for AI models. Instead of just deleting parts and hoping for the best, it calculates exactly how the remaining parts need to change to compensate for what was lost. It does this instantly, without needing a teacher or a re-write, allowing huge AI models to fit into smaller devices while staying smart.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.