Manuscript Offprint
arXiv:2610.30041Robust Soft Skill Adaptation via Behavioral Localization in Tool-Using Agents
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Text skills can extend the capabilities of tool-using agents, but long skill descriptions increase computational costs. Soft prompts provide a compact alternative, yet learning from entire successful trajectories may also introduce unnecessary behavioral changes. We find that the useful effect of a text skill is highly concentrated in a small subset of trajectory positions. Based on this observation, we propose Behavioral Localization, which compares the frozen agent with and without the text skill to identify positions where the skill both increases the likelihood of successful tokens and meaningfully changes the next token distribution. We use these localized positions to supervise a short soft prompt. Experiments on Spreadsheet-Bench with a frozen Qwen3.6-35B-A3B agent show that the top 10% of trajectory positions capture 96.12% of the total positive skill gain. In the shared prompt setting, selective supervision improves success from 30.36% with full trajectory to 36.79%. Under task-specific conditions, using the top 10% localized positions achieves 57.38%, outperforming both the full text skill and the on-policy OPCD baseline. These results show that a small set of behaviorally relevant trajectory positions can provide effective supervision of soft skills.
1 Introduction
As agents are increasingly deployed across diverse domains, tasks often differ substantially in their knowledge requirements, operational procedures, and behavioral patterns. These task-specific differences are difficult to address efficiently through repeated retraining or modification of the underlying agent Liu et al. [2024]. A flexible solution is to provide agents with task-specific guidance that helps them develop more effective task behaviors Li et al. [2026].
A direct approach to task adaptation is known as an agent skill, where natural language prompts are used to specify task goals, operational rules, and expected behaviors, allowing the model to perform new tasks without updating its parameters Anthropic [2025]. However, this approach often relies on lengthy and carefully designed prompts, and its effectiveness can be sensitive to wording and example selection. As tasks become more complex, the prompts typically grow longer, increasing both context usage and inference cost Mu et al. [2023].
To obtain more compact and learnable skill representations, prior work has explored directly optimizing prompts in continuous representation spaces. Compared with natural language instructions, soft prompts typically require less storage and can support task adaptation by updating a small set of trainable prompt embeddings Tao et al. [2026], Lester et al. [2021]. However, these continuous vectors lack clear counterparts in natural language Deng et al. [2022]. As a result, while learning a target skill, a soft prompt can also introduce unexpected behavioral changes Ma et al. [2022].
40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Self-Evolving Diversity-Driven Search for Robust AI Systems.
For agents, because generation is sequential, even small shifts in early predictions can propagate and amplify over subsequent steps, leading to incorrect tool selection, malformed outputs, or task execution failures Bengio et al. [2015], Li et al. [2023]. Thus, acquiring new capabilities may come at the cost of degrading abilities that the base model already possesses Zhu et al. [2022].
We find that the behavioral effect of a skill is highly concentrated in a small number of critical decision points, while much of the remaining trajectory is already correctly handled by the base agent. This suggests that robust soft skill adaptation should focus on which behaviors truly need to be learned. Based on this observation, we propose Behavioral Localization, which identifies the trajectory positions where a text skill meaningfully changes the predictions of base agent and selectively uses these positions to train a compact soft skill. At the same time, we constrain selected preservation positions toward the base distribution to reduce unnecessary behavioral drift.
Our contributions are shown below.
First, through token-level distributional analysis, we find that skill induced behavioral changes are highly sparse.
Second, we show that training a soft prompt using only selected positions by Behavioral Localization in the trajectory as supervision outperforms training on the full trajectory.
Agent skills differ from general text compression because their main purpose is to guide an agent's behavior. Therefore, a compressed representation should preserve the behavioral effect introduced by the skill. Recent work has begun to reuse successful agent trajectories to compress textual skills offline. SoftSkill compresses a natural-language skill into a short continuous prefix while keeping the base model frozen Tao et al. [2026]. It trains the prefix by predicting the next tokens in successful trajectories. LatentSkill instead converts textual skills into task-specific LoRA adapters, moving reusable skill knowledge from the context space into the model's weight space Yu et al. [2026]. These studies show that textual agent skills can be encoded as compact latent representations. However, they mainly focus on how a skill should be represented or stored. In contrast, we study which behavioral changes introduced by a skill should be used to learn such a representation.
3 Behavioral Locator
3.1 Problem formulation
Let be a frozen agent and let denote a text skill shared by a family of tasks. Our training set consists of task description and it's trajectory . is a verified successful trajectory called the teacher trajectory. denotes the sequence before position . If we seek a soft prompt that can replace at inference time. The parameters of the base model remain frozen, only is optimized.
We aim to identify a sparse set of trajectory positions
We use C to supervise a short soft prompt. The goal is to focus on skill useful behavior while avoiding harmful updates induced by other trajectory positions.

Figure 1: Aggregate concentration on 61 successful training trajectories. Positive gold token gain is highly concentrated under teacher forcing.
3.2 Method
We compute the next token probability distributions along the teacher trajectory under three different conditions.
Here, , , and p denote the next token distributions under the text skill, non-skill, and soft prompt, respectively.
First, we define the positive gain G induced by the skill on the base model as follows.
at position t of the teacher trajectory, it measures how much the probability of the successful token increases after adding the text Skill, compared with the no-skill condition. Next, we define the distributional shift JS induced by the skill on the base model as follows.
where
at position of the teacher trajectory, it measures how much the full next-token distribution changes after adding the text Skill, compared with the no-skill condition. By combining the two metrics, we define the localization score at each position. We then select the top of positions as the training targets.
At the selected core positions, we minimize the full vocabulary KL divergence between the predictive distributions under the text skill and soft skill conditions. At the unselected preservation positions, we use the token distribution of the no-skill model as a behavioral anchor, encouraging the soft-prompt model to preserve the original predictive behavior of the base model as much as possible.
4 Experiment
4.1 Setup
We conduct our experiments on SpreadsheetBenchMa et al. [2024]. We use GPT-5.5 to generate the successful teacher trajectories. All experiments use Qwen3.6-35B-A3B as the frozen student model, with all parameters fixed during training. Each soft prompt has a length of 8 and is initialized using the embeddings of the first same tokens of the full text skill.
During evaluation, we use greedy decoding with a maximum of 4,096 token cost and set the execution timeout for each task to 600 seconds. A task is considered successful only if the generated output passes all SpreadsheetBench checks.
Table 1: Main SpreadsheetBench results. Bold denotes the best learned soft prompt under each setting.
| Setting | Method | Success Rate |
|---|---|---|
| Shared soft prompt | No Skill | 97/280 (34.64%) |
| Text Skill | 118/280 (42.14%) | |
| SoftSkill | 85/280 (30.36%) | |
| OPCD | 107/280 (38.21%) | |
| Ours (5%) | 101/280 (36.07%) | |
| Ours (10%) | 103/280 (36.79%) | |
| Task-specific soft prompt | No Skill | 26/61 (42.62%) |
| Text Skill | 32/61 (52.46%) | |
| SoftSkill | 28/61 (45.90%) | |
| OPCD | 30/61 (49.18%) | |
| Ours (5%) | 28/61 (45.90%) | |
| Ours (10%) | 35/61 (57.38%) |
4.2 Main Result
We use the Behavioral Locator to select key positions and optimize both a shared soft prompt across tasks and task-specific soft prompts for individual tasks. As shown in Figure 1, the positive gain is highly concentrated in a small subset of trajectory positions. Selecting only of the tokens captures of the total positive Skill effect. This motivates us to use a sparse set of relevant tokens as supervision for soft skill learning.
No Skill measures the capability of the base agent, while Text Skill represents the up bound by providing the full text skill. SoftSkill is the offline full-trajectory compression baseline. OPCD is an important on-policy distillation baseline that trains online rather than relying on fixed teacher trajectories. Our method instead relies on lower cost offline teacher trajectories. Under the shared prompt setting, our method improves over full-trajectory SoftSkill, although it remains below the on-policy OPCD baseline. More importantly, under task-specific condition, selecting the top localized positions achieves , outperforming both Text Skill and OPCD. These results support a small subset of token can provide sufficient supervision for learning effective soft prompts.
References
Anthropic. Equipping agents for the real world with agent skills. https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills, October 2025. Anthropic Engineering Blog.
Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 28. Curran Associates, Inc., 2015. URL https://proceedings.neurips.cc/paper_files/paper/2015/file/e995f98d56967d946471af29d7bf99f1-Paper.pdf.
Mingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang, Han Guo, Tianmin Shu, Meng Song, Eric Xing, and Zhiting Hu. RLPrompt: Optimizing discrete text prompts with reinforcement learning. In Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang, editors, Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3369–3391, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.emnlp-main.222. URL https://aclanthology.org/2022.emnlp-main.222/.
Tao Ge, Hu Jing, Lei Wang, Xun Wang, Si-Qing Chen, and Furu Wei. In-context autoencoder for context compression in a large language model. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=uREj4ZuGJE.
Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Marie-Francine Moens, Xuanjing Huang, Lucia Specia, and Scott Wentau Yih, editors, Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045–3059, Online and Punta Cana, Dominican Republic, November
- Association for Computational Linguistics. doi: 10.18653/v1/2021.emnlp-main.243. URL https://aclanthology.org/2021.emnlp-main.243/.
Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, and Yongbin Li. API-bank: A comprehensive benchmark for tool-augmented LLMs. In Houda Bouamor, Juan Pino, and Kalika Bali, editors, Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 3102–3116, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.187. URL https://aclanthology.org/2023.emnlp-main.187/.
Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4582–4597. Association for Computational Linguistics, 2021. doi: 10.18653/v1/2021.acl-long.353. URL https://aclanthology.org/2021.acl-long.353/.
Xiangyi Li, Yimin Liu, Wenbo Chen, Bingran You, Zonglin Di, Yifeng He, Shenghan Zheng, Kyoung Whan Choe, Jiankai Sun, Shuyi Wang, et al. Skillsbench: Benchmarking how well agent skills work across diverse tasks. arXiv preprint arXiv:2602.12670, 2026.
Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 61–68. Association for Computational Linguistics, 2022. doi: 10.18653/v1/2022.acl-short.8. URL https://aclanthology.org/2022.acl-short.8/.
Xiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu, Xuanyu Lei, Hanyu Lai, Yu Gu, Hangliang Ding, Kaiwen Men, Kejuan Yang, Shudan Zhang, Xiang Deng, Aohan Zeng, Zhengxiao Du, Chenhui Zhang, Sheng Shen, Tianjun Zhang, Yu Su, Huan Sun, Minlie Huang, Yuxiao Dong, and Jie Tang. Agentbench: Evaluating llms as agents. In B. Kim, Y. Yue, S. Chaudhuri, K. Fragkiadaki, M. Khan, and Y. Sun, editors, International Conference on Learning Representations, volume 2024, pages 52989–53046, 2024. URL https://proceedings.iclr.cc/paper_files/paper/2024/file/e9df36b21ff4ee211a8b71ee8b7e9f57-Paper-Conference.pdf.
Fang Ma, Chen Zhang, Lei Ren, Jingang Wang, Qifan Wang, Wei Wu, Xiaojun Quan, and Dawei Song. XPrompt: Exploring the extreme of prompt tuning. In Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang, editors, Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 11033–11047, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.emnlp-main.758. URL https://aclanthology.org/2022.emnlp-main.758/.
Zeyao Ma, Bohan Zhang, Jing Zhang, Jifan Yu, Xiaokang Zhang, Xiaohan Zhang, Sijia Luo, Xi Wang, and Jie Tang. Spreadsheetbench: Towards challenging real world spreadsheet manipulation. Advances in Neural Information Processing Systems, 37:94871–94908, 2024.
Jesse Mu, Xiang Li, and Noah Goodman. Learning to compress prompts with gist tokens. In A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine, editors, Advances in Neural Information Processing Systems, volume 36, pages 19327–19352. Curran Associates, Inc., 2023. doi: 10.52202/075280-0848. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/3d77c6dcc7f143aa2154e7f4d5e22d68-Paper-Conference.pdf.
Xijia Tao, Yihua Teng, Xinyu Fu, Ziru Liu, Kecheng Chen, Yuzhi Zhao, Suiyun Zhang, Rui Liu, and Lingpeng Kong. Softskill: Behavioral compression for contextual adaptation, 2026. URL https://arxiv.org/abs/2606.20333.
Tu Vu, Brian Lester, Noah Constant, Rami Al-Rfou', and Daniel Cer. SPoT: Better frozen model adaptation through soft prompt transfer. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5039–5059. Association for Computational Linguistics, 2022. doi: 10.18653/v1/2022.acl-long.346. URL https://aclanthology.org/2022.acl-long.346/.
Aofan Yu, Chenyu Zhou, Tianyi Xu, Zihan Guo, Rong Shan, Zhihui Fu, Jun Wang, Weiwen Liu, Yong Yu, Weinan Zhang, and Jianghao Lin. Latentskill: From in-context textual skills to in-weight latent skills for llm agents, 2026. URL https://arxiv.org/abs/2606.06087.
Qi Zhu, Bing Li, Fei Mi, Xiaoyan Zhu, and Minlie Huang. Continual prompt tuning for dialog state tracking. In Smaranda Muresan, Preslav Nakov, and Aline Villavicencio, editors, Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1124–1137, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.80. URL https://aclanthology.org/2022.acl-long.80/.