← Latest papers
🤖 machine learning

MaskPro: Linear-Space Probabilistic Learning for Strict (N:M)-Sparsity on LLMs

MaskPro introduces a novel linear-space probabilistic framework that learns categorical distributions to efficiently generate (N:M)-sparsity in large language models via N-way sampling without replacement, while employing a moving average of loss residuals to stabilize training and achieve superior memory efficiency and robustness compared to existing greedy or gradient-driven methods.

Original authors: Yan Sun, Qixin Zhang, Zhiyuan Yu, Xikun Zhang, Li Shen, Dacheng Tao

Published 2026-05-14
📖 5 min read🧠 Deep dive

Original authors: Yan Sun, Qixin Zhang, Zhiyuan Yu, Xikun Zhang, Li Shen, Dacheng Tao

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 detailed library (a Large Language Model) with billions of books (parameters). To make this library easier to carry around and read quickly, you want to throw away some books. However, you can't just throw away random books; you have to follow a strict rule: For every group of 4 books on a shelf, you must keep exactly 2 and throw away the other 2. This is what the paper calls (N:M) sparsity (specifically 2:4).

The challenge is figuring out which 2 books to keep in every single group of 4 to ensure the library still tells the best stories. If you pick the wrong ones, the library stops making sense.

Here is how the paper, MaskPro, solves this problem using simple analogies:

1. The Problem: The "Too Many Choices" Nightmare

There are two main ways people have tried to solve this before, and both have big flaws:

  • The "Rulebook" Method: This approach uses simple math rules (like "keep the heaviest books") to guess which to keep. It's fast, but it's often wrong because it doesn't look at the whole picture. It's like trying to pick the best team players just by looking at their height, ignoring their actual skills.
  • The "Trial and Error" Method: This approach tries to learn the best combination by testing millions of possibilities. The problem? The number of combinations is so huge (like trying to find a specific grain of sand in a desert) that the computer runs out of memory and crashes. It's like trying to memorize every possible combination of a 100-digit lock; it takes too much brainpower.

2. The Solution: MaskPro (The "Smart Lottery")

The authors propose MaskPro, a new way to learn which books to keep without running out of memory or making bad guesses.

The "Linear Space" Trick (Simplifying the Map)
Instead of trying to memorize the probability of every single possible combination of books (which is impossible), MaskPro creates a simple "lottery ticket" for every group of 4 books.

  • Old Way: Imagine a lottery with billions of tickets, one for every possible way to pick 2 books out of 4. You need a warehouse to store all those tickets.
  • MaskPro Way: Instead, you just have 4 small boxes (one for each book). You put a ticket in each box that says, "How likely is this book to be picked?" You then run a special lottery where you pick 2 winners from these 4 boxes, making sure you don't pick the same book twice.
  • The Result: This shrinks the memory needed from a "warehouse" down to a "backpack." It scales linearly, meaning even if the library gets huge, your backpack doesn't get heavier.

The "Smoothing Tracker" (The Coach with a Memory)
When teaching a computer to pick the right books, you show it examples (data). Sometimes, a "bad" set of books might look good just because the example was easy, and a "good" set might look bad because the example was hard. This confuses the computer.

  • The Problem: If the computer sees a "bad" set of books perform well on one easy test, it might think, "Great! I'll keep doing this!" even though it's a fluke.
  • The Fix: MaskPro introduces a "Coach with a Memory" (a moving average tracker). Instead of looking at just the score of the current test, the Coach looks at the difference between the current score and the average score of the last few tests.
  • The Analogy: Imagine a student taking a test. If they get a perfect score, the Coach asks, "Was this test easy? Did you usually get this high?" If the student usually gets 80% and suddenly gets 100% on a super easy test, the Coach says, "That's not a real improvement; let's not change your study habits yet." This stops the computer from getting confused by random luck and keeps the training stable.

3. The Results: Fast, Cheap, and Reliable

The paper claims that MaskPro is a game-changer for three reasons:

  • Memory Efficient: It fits on standard computers where other methods crash. It's like packing a tent that fits in a pocket instead of a tent that needs a truck.
  • Data Efficient: You don't need a massive library of training data to teach it. The paper shows it can learn effectively even with just one single example (though more is better). It's like a chef who can learn a new recipe after tasting it once, rather than needing to taste it a thousand times.
  • Performance: It keeps the model smart. When they tested it on famous AI models (like LLaMA and Gemma), MaskPro kept the model's intelligence much better than the old "Rulebook" methods and performed almost as well as the expensive "Trial and Error" methods, but without the cost.

Summary

MaskPro is a new tool that helps shrink giant AI models by teaching them which parts to cut out. It does this by:

  1. Simplifying the math so it doesn't need a supercomputer to remember the choices.
  2. Using a "smart coach" to ignore random luck and focus on real improvements.
  3. Working with very little data, making it practical and cheap to use.

The authors have made their code available so others can try it out, proving that you can make AI models smaller and faster without losing their brainpower.

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 →