Beyond Task-Agnostic: Task-Aware Grouping for Communication-Efficient Multi-Task MoE Inference
This paper proposes Task-Aware Coactivation Grouping (TACG) and Generic Expert Shared Replication (GESR), a framework that optimizes multi-task MoE inference by grouping experts based on task-specific co-activation patterns rather than global averages, thereby significantly reducing communication costs and maintaining load balance across diverse workloads.
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 run a massive, high-speed library (the AI model) where thousands of different experts (specialized knowledge modules) live on different floors of a skyscraper (the GPUs). When a visitor (a user's question) arrives, the librarian (the router) quickly decides which 6 experts are needed to answer that specific question.
The Problem: The "One-Size-Fits-All" Map
In the past, the library managers tried to figure out the best floor plan by looking at all the visitors who ever came in, averaging their habits. They assumed that because "Math" and "Code" questions both sometimes need "Expert 5," those two experts should always be neighbors.
But the paper argues this is a mistake. It's like assuming that because a person who loves cooking and a person who loves gaming both sometimes visit the "Snack Bar," those two hobbies are the same. In reality:
- A Math question might need Experts A, B, and C working together.
- A Code question might need Experts X, Y, and Z working together.
- Experts A and X might never actually need to talk to each other.
If you put Experts A and X on the same floor just because they both get visited occasionally, you create traffic jams. The librarian has to run up and down stairs (send data across the network) to get the right experts, slowing everything down. This is called "communication overhead."
The Solution: The "Task-Aware" Map (TACG)
The authors propose a new way to organize the library called Task-Aware Coactivation Grouping (TACG).
Instead of averaging everyone's habits, they look at specific groups of visitors:
- Group by Interest: They separate the "Math" visitors from the "Code" visitors.
- Map the Neighborhoods: They notice that Math visitors always send their requests to a specific cluster of experts who live close together. Code visitors send theirs to a different cluster.
- Reorganize the Floors: They move the experts so that the "Math Cluster" lives on one set of floors, and the "Code Cluster" lives on another.
The Analogy:
Think of it like organizing a busy airport.
- Old Way: You put all the "Business Travelers" and "Vacationers" in the same waiting lounge because, on average, both groups need to use the restroom. This causes chaos.
- New Way (TACG): You realize Business Travelers mostly need the "Meeting Room" and "Coffee," while Vacationers need "Souvenirs" and "Snacks." You create a "Business Zone" and a "Vacation Zone." Now, people don't have to walk across the whole airport to get what they need. The traffic flow is much smoother.
The Safety Net: The "Universal Helpers" (GESR)
There's a catch. Some experts are "Universal Helpers" (like a general doctor or a security guard). They are needed by everyone (Math, Code, and Legal questions alike). If you only put them on one floor, that floor gets crushed with traffic while the others sit empty.
To fix this, the paper introduces Generic Expert Shared Replication (GESR).
- The Analogy: Imagine the "Universal Helper" is a famous chef. Instead of having just one chef in one kitchen, you have a few copies of that chef in different kitchens.
- Smart Selection: When a visitor arrives, the system checks which kitchen is currently the least busy and sends the request there. This ensures no single floor gets overloaded, even if everyone suddenly wants the "Universal Helper."
The Results
The authors tested this on three different AI models (DeepSeek, Qwen, and Moonlight).
- Speed: By organizing the experts based on who actually works together for specific tasks, they reduced the "running up and down stairs" (communication) by about 31%.
- Fairness: They managed to do this without creating traffic jams on any single floor. The workload remained perfectly balanced (a fairness score of nearly 100%).
In Summary
The paper says: "Stop treating all AI tasks the same." By realizing that different types of questions (Math vs. Code) activate different teams of experts, we can arrange those experts on the computer chips in a way that makes them work together much faster, without needing to change the AI's brain itself. It's a smarter way to park the cars in the garage so everyone can get out faster.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.