SKIM: Pruning Large Language Model Agents via Selective Knowledge Informed Masking
NeurIPS 2026
1KAIST 2University of Wisconsin–Madison
†Co-corresponding authors
| free decodingno grammar | constrained decodingdeployment | |
|---|---|---|
dense | ||
standard | ||
SKIM | not needed | best |
Agents are served with constrained decoding: a grammar writes most of every tool call, and the model decides only a few tokens. SKIM prunes and distills for exactly those decisions, and its lead over standard compression grows with sparsity.
Constrained decoding in production
Strict function calling in the APIs, grammar backends in the open-source engines:
Abstract
Large Language Model (LLM) agents are increasingly deployed under structured generation, where grammar constraints enforce output format at inference time. Whereas existing compression methods target unconstrained generation, we first identify a fundamental mismatch: under structured generation, grammar constraints reduce the model's output distribution to valid tokens, and the logits matter most at the small set of positions that decide the agent's action. Motivated by this finding, we propose SKIM (Selective Knowledge-Informed Masking), the first pruning and distillation framework for LLM agents under structured generation, with both stages guided by token role. SKIM partitions token positions into context, decision, and format categories, and this partition drives two complementary axes: (1) category-aware pruning saliency scores that preserve parameters most relevant for decision positions; and (2) an on-policy distillation objective that aligns student and teacher on valid tokens, paired with category-aware feature matching. We evaluate SKIM on tool-calling benchmarks and within multi-step agent loops, across multiple model scales and sparsity levels. SKIM consistently improves accuracy over baselines, with its superiority becoming most striking in high-sparsity regimes where conventional methods struggle, demonstrating the potential of category-aware compression for deployment-time grammar-constrained agents.
Motivation
Under constrained decoding, only a few positions are the model's to decide
1The grammar blocks format-breaking tokens, so most positions have one valid token
2Standard compression preserves every token; SKIM preserves the decisions
Method
Results
| BFCL-v3 | API-Bank L1 | |||||
|---|---|---|---|---|---|---|
| Method / Sparsity | 10% | 25% | 50% | 10% | 25% | 50% |
Full-match accuracy of the generated tool calls. All pruned models are healed with the same distillation budget; structured is decoding under the grammar, the deployment setting, and free is decoding without it. SKIM is the best pruned model in most columns, and its margin is largest at 50% sparsity, where the baselines lose the most.
Inside a multi-step agent loop
Qwen3.5-2B inside a multi-step agent loop on HotpotQA (ReAct-style search and read). The healing data are single-turn tool calls, yet SKIM keeps the most F1 at every sparsity.
| Method / Sparsity | 10% | 25% | 50% |
|---|---|---|---|
| Dense | 43.6 | ||
| Wanda-sp | 19.2 | 14.0 | 11.1 |
| FLAP | 21.6 | 14.5 | 13.3 |
| SlimGPT | 20.8 | 19.5 | 10.8 |
| SKIM (ours) | 31.7 | 20.2 | 14.9 |
Analysis
Structured accuracy is bought with free-generation accuracy
One SKIM-pruned model (Qwen3.5-2B, BFCL-v3, 25% sparsity), healed with a growing weight λ on vanilla KD, which also matches the teacher outside the grammar. λ = 0 is a specialist: the best structured accuracy and no free generation. A larger λ buys free generation back at a structured cost.
BibTeX
@inproceedings{choi2026skim,
title = {{SKIM}: Pruning Large Language Model Agents via Selective Knowledge Informed Masking},
author = {Choi, Moonseok and Jeong, Jongwon and Kang, Minki and Nam, Giung and Lee, Juho},
booktitle = {Conference on Neural Information Processing Systems (NeurIPS)},
year = {2026}
}
dense
standard
SKIM