← Latest papers
🤖 AI

COREY: A Prototype Study of Entropy-Guided Operator Fusion with Hadamard Reparameterization for Selective State Space Models

COREY is a prototype framework that enhances State Space Models by combining memory-aware operator fusion with Hadamard-based feature reparameterization and entropy-guided scheduling to reduce latency, improve throughput, and lower DRAM traffic in long-context inference.

Original authors: Bo Ma, Jinsong Wu, Hongjiang Wei, Weiqi Yan

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

Original authors: Bo Ma, Jinsong Wu, Hongjiang Wei, Weiqi Yan

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 running a massive, high-speed library where books (data) need to be read, processed, and summarized. In the past, the best way to do this was to have a librarian (the AI) read every single word, remember the context, and write a summary. But as the books got longer, the librarian got overwhelmed, and the process slowed down because they had to constantly walk back and forth to the shelves to grab new pages.

Enter State Space Models (SSMs), like the "Mamba" family. These are like a super-efficient librarian who can read a whole book in linear time—they don't get slower as the book gets longer. However, there's a catch: even though they read fast, they are constantly dropping off piles of notes on the floor (memory) and running back to pick them up. This "running back and forth" (moving data between memory and the processor) is the bottleneck. It's like a chef who can chop vegetables instantly but spends 90% of their time walking to the fridge to get ingredients.

This paper introduces COREY, a new way to organize the kitchen to stop the walking.

Here is the simple breakdown of how COREY works, using everyday analogies:

1. The Problem: Too Many Trips to the Fridge

In current AI systems, the "chef" (the processor) has to stop, write down a note, walk to the fridge (memory), grab a new ingredient, walk back, and continue cooking. This happens thousands of times for a single sentence. It wastes energy and time.

2. The Solution: "Operator Fusion" (Batching the Chopping)

The first trick COREY uses is Operator Fusion. Instead of chopping one onion, then walking to the fridge, then chopping a carrot, then walking back, the chef groups the tasks. They chop the onion, the carrot, and the garlic all in one go before walking to the fridge.

  • The Analogy: Imagine a delivery driver who usually drops off one package, drives back to the warehouse, gets another, and drives back out. Fusion is like loading the truck with 10 packages and making one efficient trip.

3. The Smart Scheduler: The "Entropy" Traffic Cop

The hard part is knowing which tasks to group together. If you group too many, the truck gets too heavy and breaks down. If you group too few, you waste gas.

  • The Old Way: The driver just groups 3 items every time, no matter what.
  • The COREY Way: COREY uses a metric called Entropy. Think of entropy as a measure of "chaos" or "surprise" in the data.
    • If the data is very predictable (low entropy), the chef knows exactly what's coming. They can safely group a huge batch of tasks together because the risk of error is low.
    • If the data is chaotic and full of surprises (high entropy), the chef needs to be careful. They group fewer tasks to avoid mistakes.
    • The Metaphor: Imagine a traffic cop at a busy intersection. If the traffic is smooth and predictable, they let a long line of cars pass through the green light at once. If the traffic is erratic and dangerous, they let only a few cars through at a time to keep everyone safe. COREY is that traffic cop, deciding exactly how many tasks to bundle together based on how "chaotic" the data is at that moment.

4. The Secret Sauce: The "Hadamard Shuffle" (Smoothing the Outliers)

Sometimes, the data has "outliers"—weird, massive spikes in numbers that can crash the system (like a sudden, massive spike in temperature that breaks a thermometer). These spikes make it dangerous to group tasks together (fusion) because the system might get confused.

  • The Fix: COREY uses a mathematical trick called a Hadamard Transform.
  • The Analogy: Imagine you have a bag of marbles where one is a giant boulder and the rest are tiny pebbles. If you try to pour them through a narrow pipe, the boulder gets stuck.
    • COREY takes the bag and shuffles the marbles. It doesn't change the total weight (the information is still there), but it breaks that giant boulder into smaller, manageable chunks and spreads them out evenly among the pebbles.
    • Now, the "pipe" (the processor) can handle the flow smoothly. This "shuffling" makes the data less "spiky" and allows the chef to group more tasks together without fear of a crash.

5. The Result: Faster, Smoother, and Cooler

By combining these two ideas:

  1. Smart Grouping: Only grouping tasks when the data is calm enough to handle it.
  2. Smoothing: Breaking up the "boulders" so they don't cause traffic jams.

COREY achieves:

  • Less Walking: The processor spends less time fetching data from memory.
  • Faster Cooking: Tasks get done quicker, especially with very long books (long sequences).
  • Lower Energy: Less movement means less power consumption.

The Bottom Line

The paper admits that this is currently a "prototype" (a working model in a lab, not yet a fully commercial product). They tested it on synthetic data and found that it consistently reduces the time the AI spends waiting for memory and speeds up the processing.

In short: COREY is a smart kitchen manager that shuffles the ingredients to make them easier to handle and then tells the chef exactly how many dishes to prep at once, ensuring the kitchen runs at maximum speed without burning the food or breaking the stove.

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 →