An expert selected rarely on one collection of requests may become important on another. KEEP examines what happens when a pruning objective treats the value of an expert as fixed. Its challenge is to reduce the set of weights a deployment must support without silently converting a broadly useful model into one that works only on the tasks used for selection.
The research group set out to solve this by asking a different question: can an MoE model dynamically select which experts to keep during inference, based on the specific input prompt? Instead of applying a static sparsity rule—where a fixed subset of experts is removed regardless of content—they designed a system that observes how each prompt activates experts during prefill and uses that information to determine which experts are most relevant for decoding. This shift from static to dynamic selection allows the model to retain only those components necessary for a given task, preserving accuracy while reducing memory usage.
The core innovation lies in two tightly coupled components: first, an offline calibration phase where the system learns a lightweight linear predictor that maps prefill routing patterns—how often each expert is activated—to their importance during decoding. Second, during real-time inference, full-model prefill runs unmodified to capture all activation statistics. After processing the prompt, the system computes a per-expert score using the learned model and selects the top experts based on the desired sparsity level. These selected experts are then placed across available memory tiers: some stay in GPU RAM, others are copied into pinned host memory, and those that require long-term storage are loaded into disk-based pools. Crucially, no expert is ever evicted from memory during decoding because every one either remains in GPU or has a pinned copy in host memory—ensuring that decoding never accesses disk.
This design addresses the key limitation of prior pruning methods: they assume all prompts are similar and require the same set of experts. In reality, different inputs activate different expert subnetworks. For instance, a coding prompt may heavily engage math-focused or syntax-aware experts, while a question about historical events activates domain-specific knowledge modules. By dynamically selecting experts per prompt, KEEP avoids the degradation seen in static pruning where the model becomes task-biased or collapses on general tasks.
To ensure practicality and performance, the system includes architectural optimizations for both prefill and decoding phases. During prefill, a double-buffering strategy is used: while one buffer performs grouped matrix operations over experts, the next buffer loads the full set of experts from memory, overlapping computation with data loading. Experts are fetched from the fastest available tier—GPU first, then pinned host memory, only falling back to disk for those not already stored. During decoding, an LRU (least recently used) cache manages expert availability on GPU: if a needed expert is missing, it’s copied from host memory into the GPU pool; if space is limited, only experts without pinned copies are evicted. Experts with pinned host copies remain accessible, preventing any disk access during inference.
The evaluation focuses not on overall model size or speed, but on whether accuracy remains stable beyond 50% sparsity across diverse tasks. The system was tested across three MoE models ranging from 35B to 749B parameters, with varying prompt types and lengths. Results show that KEEP maintains consistent performance in both domain-specific and general knowledge tasks when compared to full-model inference. Importantly, the accuracy drop observed in prior methods—especially outside calibrated domains—is absent in this approach because expert selection is tied directly to input content.
A key design decision is that prefill runs fully dense, preserving routing information essential for dynamic sparsification. This means the model does not sacrifice prompt understanding or context retention during early processing. The system does not require auxiliary encoders, backbone modifications, or additional training phases—making it compatible with existing MoE infrastructures. Instead, it operates as a lightweight inference layer that attaches to standard serving pipelines.
By placing experts in the most accessible tier, the system avoids costly memory transfers or disk reads during decoding. This makes it suitable for deployment on edge devices where latency and bandwidth matter as much as model size.
In sum, KEEP does not simply reduce model size—it rethinks how expert selection relates to input content. By treating each prompt as a unique signal that activates distinct experts, the system achieves higher accuracy at lower memory costs than static pruning methods. The result is a more flexible, responsive, and practical approach to MoE deployment—one where expert availability is not fixed but dynamically determined by what the user actually asks.
Retained accuracy has a baseline in its denominator
The KEEP authors report retaining at least 99 percent of dense accuracy at 50 percent sparsity, and 90 to 97 percent at 75 percent sparsity in the reported evaluations. These are fractions of the reference system’s accuracy. If the reference itself makes mistakes, retaining nearly all of its score cannot mean solving nearly every task. A reader comparing two models also needs to know each model’s own dense score. The same retention percentage can leave two pruned models at quite different absolute levels.
How KEEP Dynamically Selects Experts for Each Prompt
KEEP operates by analyzing routing patterns during prefill to determine which experts are most relevant to a given user prompt. Unlike prior methods that apply a fixed set of retained experts across all requests, KEEP uses a lightweight linear predictor trained offline on a diverse calibration dataset. This predictor takes the routing information from the prefill phase—specifically, which experts were activated and how frequently—and outputs a probability distribution over experts for decoding. For each new prompt, the system computes this distribution in real time and selects only those experts with high predicted importance. The selection is not deterministic but rather probabilistic, allowing for flexibility while maintaining performance consistency. This dynamic approach ensures that expert retention adapts to the content of individual prompts, preserving accuracy even when sparsity exceeds 50%.
Experimental Evaluation Across Prompt Types and Domains
The study evaluates KEEP across a wide range of prompt types including mathematical reasoning, coding tasks, creative writing, and agentic workflows involving tool calling. For each task type, the model is tested at three sparsity levels: 0%, 50%, and 75%. The calibration data used includes Open-Platypus, OpenThoughts-114k, evol-codealpaca, tulu-3-sft-personas-math, FineWeb-Edu, codeforces-cots for long coding, xlam-function-calling and SWE-smith-trajectories for tool use, and WritingPrompts for creative writing. These datasets ensure coverage of both short and long generation sequences, with or without thinking steps. The results show that at 50% sparsity, KEEP maintains full model-level accuracy across all domains. At 75% sparsity, performance remains above 90% of the full-model baseline on most benchmarks, including math, reasoning, and coding tasks. Notably, in agentic coding evaluations using SWE-Bench Verified and BFCL-v4, KEEP at 50% sparsity shows no accuracy loss, with only a 2-point drop at 65% sparsity and more significant degradation at 75%. This indicates that the dynamic selection mechanism preserves critical reasoning capabilities even under extreme sparsity.
Interpreting Performance and Limitations in Real-World Contexts
The performance of KEEP must be interpreted within its operational constraints. The method achieves high accuracy not because it retains all experts uniformly, but because it identifies and activates only those most relevant to each specific prompt. This is particularly effective in domains where expert activation patterns are highly variable—such as coding or reasoning tasks that require specialized knowledge. For instance, a prompt asking for code generation may activate only a few experts focused on syntax and logic, while a question about historical facts might rely heavily on knowledge-based experts. The system’s ability to maintain accuracy at 75% sparsity suggests that expert importance is not uniformly distributed across prompts but concentrated in specific contexts. However, the degradation observed at 75% sparsity on agentic benchmarks indicates a limit to how much sparsification can be sustained without impacting task-specific reasoning. This limitation arises because some tasks require coordination between multiple experts during decoding, and when too many are removed, the model may fail to maintain sufficient context or consistency. Additionally, while KEEP enables decode operations entirely within GPU and host memory—avoiding disk access—the performance depends on the hardware configuration and memory availability. Still, real-world deployment may face challenges in environments with limited memory or inconsistent routing behavior due to quantization or model version differences. The transferability of the expert selection matrix from high-precision to lower-precision models is preserved under certain conditions, but performance drops if quantization significantly alters routing patterns. Therefore, for production use, it is recommended that the calibration and deployment occur using the same model precision.
The Boundary of Expert Saliency Transfer Across Domains
The evidence shows that expert sets selected by saliency within one domain—such as coding or math—perform poorly when applied to prompts from unrelated domains, with generalization dropping to as low as 52% of original saliency. This boundary is not merely a statistical artifact; it reflects a fundamental mismatch between static expert selection and the dynamic nature of prompt-specific needs. A key distinction lies in whether the routing patterns observed during prefill are sufficient to predict decoding behavior across domain shifts. If the model’s internal routing dynamics remain consistent under different tasks, then transferability should be stronger. However, the data indicate that even top-50% experts by saliency within a single domain fail to retain their importance when applied to out-of-distribution prompts. This suggests that domain-specific expert activation is not just correlated but structurally distinct—each domain may rely on different combinations of experts due to unique reasoning patterns or knowledge dependencies. The boundary, therefore, appears to be defined by the extent to which routing behavior changes with task context rather than being a fixed threshold in model parameters.
This limitation does not imply that all expert pruning methods are equally flawed. Rather, it highlights that static pruning—whether domain-wide or globally calibrated—is inherently constrained by its inability to capture prompt-specific dynamics. The fact that such transfer fails across domains, even when the underlying model is identical, suggests that the routing patterns are not stable enough for generalization without context-aware adaptation. This boundary has already been tested through cross-domain evaluation on prompts from math, coding, and reasoning tasks, with consistent drops in saliency recovery. These results have ruled out simple assumptions about expert uniformity across domains and confirm that domain-specific calibration is necessary for effective performance.
What Distinguishes Static vs. Dynamic Expert Selection
A critical distinction between existing pruning methods and KEEP lies in whether the selection of retained experts depends on the specific input prompt or relies on a fixed, precomputed set derived from global or domain-level statistics. Static methods, such as REAP or SlimWise, apply the same expert subset to all prompts regardless of content, relying on calibration data collected during training or pre-defined routing patterns. In contrast, KEEP dynamically determines which experts are needed for decoding based on routing information observed during prefill. When evaluated under identical prompt types and generation settings, the dynamic selection consistently outperforms static methods in both accuracy and sparsity.
The key test that distinguishes these approaches is whether a model can maintain high performance when faced with prompts that activate different expert subsets. This dynamic selection is not just a minor adjustment—it fundamentally alters how the model handles memory and computation. For instance, when a prompt requires deep reasoning or specialized knowledge, KEEP identifies and retains those specific experts, whereas static methods may retain irrelevant ones due to prior calibration biases. The evidence shows that this adaptability leads to better performance across diverse inputs without requiring retraining.
However, the distinction is not absolute. A competing explanation could argue that the observed improvements in accuracy stem from a bias in how prefill routing is used—perhaps because certain prompt types naturally activate more experts during prefill, leading to overrepresentation of those experts in the decoding set. To test this, one would need to analyze whether expert selection correlates with prefill activation patterns across different prompt lengths or token counts. If such correlations are strong and consistent, then the improvement might be due to a statistical bias rather than true dynamic relevance. So far, no such analysis has been conducted, leaving open the possibility that the dynamic selection is not capturing genuine expert importance but instead reflecting prefill artifacts.
How Prefill Activation Maps to Decoding Relevance
The method assumes that the most active experts during prefill are also the most relevant during decoding. However, the data show only partial overlap—between 57% and 69% for top-25% to top-50% experts—suggesting a significant disconnect. This raises the possibility that prefill activation is not a sufficient signal for decoding relevance. A competing explanation would be that prefill routing captures early-stage pattern recognition, while decoding requires different expert engagement due to evolving context and response generation.
To resolve this, one must conduct a controlled experiment where expert importance during decoding is measured independently—using metrics such as output saliency or activation frequency—and then correlated with prefill routing data. If the correlation remains weak across prompt types, it would suggest that KEEP’s predictor relies on an incomplete signal. Conversely, if the correlation strengthens under certain conditions (e.g., longer prompts or specific domains), it might indicate that prefill statistics do hold predictive power in some cases. To date, such a direct evaluation has not been performed. Without this test, we cannot confirm whether KEEP’s linear predictor is truly capturing expert relevance or merely reflecting activation patterns from earlier stages of processing. This remains an open question with important implications for future work on dynamic pruning and expert selection.


