Manuscript Offprint
arXiv:2610.21016CausalEvo: Causal Skill Self-Evolution for Health LLM Agents
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Large language model (LLM) agents for health can accumulate reusable textual skills from task feedback, such as calculation criteria, measurement time points, and formula units. Deciding which skills to retain is consequential: useful rules improve later answers, while faulty generalizations propagate errors. We propose CausalEvo, a method for causal skill self-evolution that estimates the relative effects of deliberately changed skill sets while holding the model weights, feedback cases, and rule count fixed. At each evolution step, a frozen LLM proposes candidate rules, which are pooled with the incumbent skills so that the current skill set remains a feasible choice. Paired skill replacements against shared background rules are scored on the same feedback cases; least squares converts the score differences into relative skill values, and the top-ranked rules are retained, favoring incumbents on ties. A decision-loss bound separates candidate support, approximation, and estimation errors. On six MedCalc-Bench-Verified tasks with 120 held-out cases, CausalEvo achieves 60.00% accuracy, compared with 55.83% for SkillOpt and 51.67% without skills. Across the recorded training configurations, which use different optimization budgets, it consumes 55.6% fewer training tokens than SkillOpt. Gains concentrate in particular calculations alongside regressions on others, and paired accuracy intervals include zero. CausalEvo turns task feedback into controlled decisions about skill retention and replacement. Project repository: https://github.com/txbrook/CausalEvo.
1 Introduction
Health LLM agents with frozen weights can retain instructions distilled from feedback. In medical calculation, these skills may specify a scoring criterion, a measurement time point, or a formula's units. A useful rule can improve later answers; an incorrect generalization can also persist across cases. This makes the decision to retain or replace a skill part of agent reliability: what evidence should guide skill evolution?
External-memory adaptation stores knowledge acquired from feedback [Shinn et al., 2023, Wang et al., 2024, Zhang et al., 2026], and textual optimizers already combine proposals with evaluation [Agrawal et al., 2026, Lin et al., 2026, Zhao et al., 2026]. We focus on how changing the supplied skill set affects task performance.
CausalEvo treats skill evolution as a causal comparison: on the same feedback case, we change the supplied rules while keeping the model weights and rule count fixed, and observed score differences estimate the relative effects of the compared skill sets. We call this controlled change a skill intervention. Our organizing principle is that skill selection should use comparisons that preserve the deployed rule capacity. A generator that rewrites every candidate may remove an old skill before retention can be evaluated, so the incumbent skill stays in the feasible set. Comparisons that change the number of rules mix content effects with size effects, so compared skills have equal capacity.
GenAI for Health Workshop @ NeurIPS 2026, Sydney.

Figure 1: Overview of CausalEvo. Incumbent skills ( ) and model-generated proposals form a candidate pool. On a fixed feedback case, two skill sets share background rules and exchange one rule. The frozen actor scores both skill sets; paired score differences fit relative skill values for top- selection, with ties favoring incumbent rules.
The frozen model proposes rules; a program collects paired exchanges on a comparison graph, estimates relative rule values, and selects the next skill (Figure 1). Proposal quality remains the model’s responsibility; credit estimation and selection are programmatic.
Our contributions are (i) a formulation of skill evolution with incumbent-containing feasible sets; (ii) a fixed-capacity exchange estimator and decision-loss decomposition, using classical statistical tools to analyze textual skills; and (iii) a 120-case held-out comparison with SkillOpt and no skill, learning dynamics, output-validity diagnostics, and a credit-assignment ablation.
Textual optimization. Self-Refine revises individual outputs through self-feedback [Madaan et al., 2023]; TextGrad propagates textual feedback through computation graphs [Yuksekgonul et al., 2025]; GEPA tests reflected prompt changes and combines complementary candidates [Agrawal et al., 2026]. SkillOpt optimizes external skill documents through feedback and validation [Yang et al., 2026]. SkillBoost evaluates repairs under regression constraints [Lin et al., 2026], while SkillCAT combines contrastive extraction, patch assessment, and skill topology [Chen et al., 2026]. CausalEvo shares proposal generation and empirical evaluation, focusing on comparisons among deployable skills in an incumbent-containing, fixed-capacity family. We compare with adapted SkillOpt; broader end-to-end comparisons remain open.
Composition-aware valuation. SkillShapley attributes performance to skill steps using Shapley values and boundary-adaptive sampling [Liu et al., 2026]. CASS combines paired coalition-knockout margins with aggregate reward when accepting skill banks [Zhao et al., 2026]. Beta Shapley weights marginal contributions across coalition sizes, while Data Banzhaf studies robustness to noisy utility measurements [Kwon and Zou, 2022, Wang and Jia, 2023]. CausalEvo compares equal-capacity replacements to identify a first-order value projection aligned with the deployment constraint. Higher-order interactions and finite-sample errors can still impair selection.
Causal skill curation. ASSAY uses randomized masking to estimate skill–task effects for library restructuring and task-conditioned masking [Wang et al., 2026]. CaSKG calibrates skill relations through textual counterfactual probes for task-conditioned retrieval [Li et al., 2026]. CausalEvo studies skill evolution in a persistent textual skill. Its exchanges hold background rules fixed and estimate effects of skill replacement under a specified case and background distribution. Least-squares recovery from paired observations follows classical graph ranking [Jiang et al., 2011]; we connect this estimator to constrained skill selection and its decision errors.
Health agent benchmarks. MedCalc-Bench and its Verified repository provide numerical medical-calculation records and automatically scored feedback [Khandekar et al., 2024, MedCalc-Bench maintainers, 2026]. This permits evaluation of skill evolution through accuracy, regressions, and task-specific behavior. MedAgentBench evaluates interaction with a virtual electronic health record and clinical APIs [Jiang et al., 2025]. Our static calculation study addresses one component of health-agent adaptation; interactive workflows and longitudinal validation remain open.
3 Problem formulation
Skill definition. A rule is a short, reusable instruction clause. The agent's skill is an ordered rendering of its selected rules. A skill evolution step selects the next skill using externally supplied labeled feedback.
Let be a frozen language model, its current skill, and x a task input with reference answer y. For a skill S, let
Here includes model and execution randomness; rendering fixes the order and formatting of rules. The value function is conditional on a fixed execution configuration, including reasoning mode and decoding settings, whose notation we suppress. The distribution specifies which health tasks matter at round . We analyze each evolution step under its current task distribution and execution configuration.
Given a new labeled experience , a proposal operator generates text . The controller constructs a candidate collection and a feasible family , then chooses . The separation is substantive: the model determines what can be proposed, while the experimental controller determines what the available observations support selecting.
3.1 Incumbent feasibility
Retention requires candidate support: keeping a previous rule requires that rule or an equivalent replacement to be available in . To preserve the entire incumbent skill as a feasible choice, we impose
For the prototype, , returns two new rules, has distinct clauses, and . The first round generates six rules from an empty skill. Invalid or textually duplicate proposals retain the current skill.
3.2 Value projection
Condition on a fixed round, candidate collection, and value function, and suppress . Let be the indicator of a uniformly chosen member of . Define the best first-order approximation
The zero-sum condition resolves the intercept ambiguity on a fixed-size slice. The projection applies to arbitrary skill-value functions, including those with interactions between rules. Selecting the largest k coordinates optimizes the fitted first-order surrogate; nonlinear complementarity can make that selection suboptimal for V.
For , sample a background uniformly from the -subsets excluding . The two treatments are and . They have equal rule counts and share all other rules. Define
Proposition 1 (Fixed-capacity exchange identity). For any real-valued on , with , the projection in (3) satisfies
The result follows from the covariance matrix of fixed-size sampling and is proved in Appendix A. Equation (5) averages over eligible backgrounds; individual-background contrasts can differ from this average. Any component depending only on rule count cancels exactly in these exchanges. Token count, rule order, and meaning can still affect the measured contrast.
4 Method
4.1 Evidence collection on a comparison graph
Direct evaluation estimates separately for each feasible skill: the prototype has such sets. CausalEvo collects paired exchanges from (4) to fit relative rule values, then selects rules by their summed value. The connected comparison graph places all rules on a common scale; the resulting first-order representation supports selection across the feasible family. For each directed edge , we run the agent twice on the same feedback case with the two skills from (4). The measured difference is
Let A be the edge–vertex incidence matrix, with a +1 at i and -1 at j. We estimate
Under the randomized backgrounds and a common case distribution, and hence . This mean identity also holds for dependent edges; variance analysis additionally requires their covariance structure.
The prototype uses a randomly relabeled six-vertex cycle: six paired comparisons require 12 actor calls per evolution step, or 288 across 24 evolution steps, with each of three feedback cases serving two randomly assigned edges. Appendix A details exact cycle computation and its design rationale under independent, equal-variance noise; shared cases and unequal noise reduce that idealization.
4.2 Skill evolution
The next skill maximizes the fitted value, breaking exact ties by retaining more incumbent rules:
A fixed random order resolves remaining ties; if every observed difference is zero, the incumbent is retained. Misleading score differences can still cause a harmful evolution step.
Algorithm 1 in Appendix B.3 gives the pseudocode for one evolution step; the actor and proposal templates appear in Figures 5 and 6.
4.3 Decision error
Let , where is a specified reference family and is the available fixed-capacity family. Define the support gap , approximation error , and coefficient error .
Proposition 2 (Support, approximation, and estimation). The selection in (8) obeys
If , then .
Support and approximation errors persist even with exact coefficient estimates, and numerical certification would require reliable bounds on each term. Appendix A gives the proof and a complementarity counterexample.
5 Health calculation experiments
5.1 Experimental setup
The main experiment uses six MedCalc-Bench-Verified tasks in the order SIRS, HEART, PERC, CURB-65, Child-Pugh, and Cockcroft–Gault. A shared 96-case learning pool supplies 24 teaching and 72 feedback cases to CausalEvo and 72 training and 24 internal-validation cases to SkillOpt.
Comparison with no skill measures the change in performance from supplying learned rules. Comparison with SkillOpt assesses the final skills produced by two learning procedures. The separate shuffled-credit ablation tests the role of assigning estimated credits to their associated rules within the exchange controller.
We compare CausalEvo with SkillOpt [Yang et al., 2026] and the no-skill baseline. CausalEvo uses the six-cycle exchange design of Section 4.1, with four sequential steps per task. SkillOpt optimizes persistent textual skills for a frozen actor. We adapt its official ReflACTTrainer to the common task and scoring interface, using four epochs with six 12-case batches per epoch and its internal-validation-selected state (step 5). No skill uses the common task instruction with an empty skill. Appendix C.1 provides baseline implementation details.
The test panel contains 120 cases, 20 per task, sampled independently of model correctness. All cases originate from the source training split, with learning and evaluation roles assigned for this study. Record-identifier and text-overlap checks separate the test panel from the 96 learning cases, the 24-case development panel, and a separate 115-case evaluation panel. Appendix C details the filtering and sampling. These checks operate at the record and text levels; patient-level independence remains unverified.
Both methods learn with low reasoning and frozen model weights, with output caps of 4,096 tokens for the actor and 8,192 tokens for proposals and optimization. We retain low reasoning during learning to support problem solving and the construction of reusable rules. Optimization budgets and skill lengths differ between methods.
5.2 Evaluation protocol
All skills and evaluated checkpoints are fixed before test evaluation. Reported results use thinking-off inference with the same DeepSeek V4 Flash 0731 actor, temperature 0, and a 16,384-token output cap. Each case receives eight independent, interleaved state evaluations: no skill, CausalEvo at steps 4, 8, 12, 16, 20, and 24, and final SkillOpt. Case and within-case state order are randomized.
We disable thinking at evaluation to prioritize stable completion and inference efficiency. This choice was motivated by reasoning-enabled runs that could exhaust the available token budget. Each learned skill is frozen and supplied as instruction text to the same thinking-off actor, so the final comparison measures its utility under a common inference configuration. Calculation criteria, units, and procedural steps remain available through the prompt in either mode, although their effect can depend on the reasoning setting. Selection and final evaluation therefore measure skill value under their respective execution configurations, as formalized in Section 3.
The primary endpoint is equal-weight task-macro accuracy, equal to case accuracy on this balanced panel. Unparsed answers, communication failures, and non-normal completions count as incorrect. Integer tasks use Python rounding against the reference answer; Cockcroft–Gault uses the inclusive reference interval. Secondary diagnostics measure parser-based output validity and pooled accuracy among valid outputs (Appendix C.5). The 95% intervals use 20,000 task-stratified paired bootstrap replicates. Final-state comparisons use exact two-sided McNemar tests with Holm correction across three comparisons. Intervals are unadjusted and conditional on the frozen skills and one training trajectory per method; they do not account for training variability or method-development choices.
5.3 Main results
Table 1 summarizes overall accuracy and output quality on the balanced 120-case panel. CausalEvo answers 72 cases correctly (60.00%), compared with 67 for SkillOpt (55.83%) and 62 without skills (51.67%).
Table 1: Main results on 120 held-out cases with thinking-off inference. Accuracy gives equal weight to the six tasks; invalid outputs count as incorrect. Valid-only accuracy is a secondary diagnostic with method-specific denominators. Bold marks the highest observed overall accuracy.
| Method | Accuracy (%) | Accuracy 95% CI | Valid outputs (%) | Accuracy on valid outputs (%) |
|---|---|---|---|---|
| No skill | 51.67 | [43.33, 60.00] | 100.00 | 51.67 |
| SkillOpt | 55.83 | [47.50, 64.17] | 100.00 | 55.83 |
| CausalEvo | 60.00 | [52.50, 67.50] | 99.17 | 60.50 |

Figure 2: Final task accuracy for the three frozen skill states. Each task has 20 held-out cases, so five percentage points equal one case. Invalid outputs count as incorrect. Exact values appear in Appendix C.4.
Paired outcomes. The higher aggregate score combines corrections with losses on other cases. Relative to no skill, CausalEvo repairs 22 errors but loses 12 previously correct answers; relative to SkillOpt, it repairs 21 and loses 16. The paired intervals are points against no skill and against SkillOpt. Neither comparison is significant after Holm correction (Appendix C.3).
Output quality. Both baselines return 120 valid outputs and CausalEvo returns 119, with one invalid response on Child-Pugh; across all eight states, 959 of 960 outputs are valid and none is truncated. The remaining errors are valid numerical answers that disagree with the reference: 47 for CausalEvo, 53 for SkillOpt, and 58 for no skill. Appendix C.5 specifies the accepted formats.
5.4 Task heterogeneity
Figure 2 shows where the aggregate gains arise. CausalEvo leads SkillOpt on three of six tasks, but Cockcroft–Gault alone contributes nine additional correct answers, exceeding the overall five-case advantage. The other five tasks therefore contribute a net loss of four. SkillOpt leads on SIRS and PERC, while no skill performs best on Child-Pugh. The higher macro score thus combines task-specific gains and regressions.
Skill content and task behavior. Two of the four retained rules explicitly target Cockcroft–Gault, covering weight calculation and conversion precision (Figure 7). This concentration of task-specific instructions accompanies the largest observed task-level gain. The other two rules address threshold logic and measurement timing; one applies its instruction to any scoring system with numeric thresholds. All four rules are supplied to every task, so the final skill combines uneven calculator-specific coverage with broadly scoped instructions.
5.5 Learning dynamics
Skill changes. All 24 proposal rounds are valid. After initialization, 12 of 23 rounds change the skill and 11 retain all four incumbent rules. The final skill contains 180 whitespace words, compared with 999 for SkillOpt, approximately 82% fewer. Figure 7 reproduces it in full. Section 5.7 reports training token use under these different skill representations and optimization budgets.
Accuracy over learning. Figure 3 follows CausalEvo on the same 120 cases throughout learning. Accuracy stays at baseline through step 8, dips at step 12, and then rises, with an intervening decline at step 20, to 60.00% at the prescribed endpoint of step 24.
Task transfer. The final four steps add eight correct answers: three on the currently taught Cockcroft–Gault task and a net five across earlier tasks, as HEART rises from 35% to 50% and PERC from 25% to 35%. Losses also occur: Child-Pugh falls from 50% at step 16 to 30% at the endpoint. Average immediate learning acquisition is -3.33 points (95% interval [-12.50, 5.83]), while backward and forward transfer are both +7.00 points, with intervals [-3.00, 17.00] and [-4.00, 18.00] (definitions in Appendix C). All three intervals include zero: the endpoint gain coexists with weak immediate acquisition and an uncertain direction of transfer.

Figure 3: Macro accuracy over learning steps on the fixed 120-case test panel. Step 0 uses an empty skill. Error bars are conditional 95% task-stratified bootstrap intervals. Dashed lines show no skill and the selected SkillOpt endpoint as fixed references.
5.6 Credit-assignment ablation
Table 2 isolates credit-rule correspondence within the controller. This ablation uses a separate dataset with a relatively small test set of 24 cases, four per task. The control permutes the six fitted credits before selection while retaining the proposal interface, candidate construction, six paired exchanges, and tie rule; each trajectory subsequently proposes from its own skill. Training uses 24 teaching and 72 feedback cases.
Table 2: Credit-assignment ablation on a separate dataset with a 24-case test set. Phase mean averages the six phase-end seen-task accuracies. Bold marks the highest observed value in each column.
| Setting | Final accuracy (%) | Phase mean (%) |
|---|---|---|
| No skill | 62.50 | 61.94 |
| Shuffled credit | 62.50 | 68.68 |
| CausalEvo | 70.83 | 73.33 |
Intact credits yield 17 correct answers, compared with 15 for each control, and a 4.65-point phase-mean gain over shuffled credit. The final paired gain is +8.33 points (95% interval [-4.17, 25.00]). These estimates condition on single trajectories and a panel reused for method development. Appendix D reports the protocol, phase curves, and failure diagnostics.
5.7 Training token use
Across the recorded training configurations with different optimization budgets, CausalEvo uses 2.203 million training tokens, compared with 4.961 million for SkillOpt: a reduction (Figure 4). Input tokens fall by , while output tokens, including reasoning, fall by . The saving therefore comes predominantly from lower aggregate input volume.
The exchange design specifies 12 scoring calls per evolution step. Including one teaching call and one proposal call gives 14 requests per step and 336 over 24 steps, compared with SkillOpt's 839 training requests. Token volume also depends on prompt content, skill length, and generated responses. The reported totals combine these factors with each method's optimization schedule; the learned skills contain 180 words for CausalEvo and 999 for SkillOpt. Call counts describe the work performed, while the input/output breakdown identifies where the token difference occurs.

Figure 4: Training token use in the recorded configurations, whose optimization budgets differ; output includes reasoning. Exact counts are in Appendix C.2.
6 Discussion
CausalEvo makes the evidence for reusing a health-agent skill explicit: which candidate skills were tested, under what capacity constraint, and with which measured outcomes. Medical calculations provide an inspectable setting for this mechanism, while the four-rule prototype keeps individual evolution steps small enough to examine. Proposition 2 separates three improvement targets: candidate coverage, interactions between rules, and estimation noise.
The empirical findings also inform reliability evaluation. Aggregate gains coexist with case-level regressions. Nearly universal output validity leaves substantial numerical error. Evaluating an adaptive health agent therefore requires task-level accuracy and measures of which correct answers become errors after a skill evolution step.
A concrete extension is electronic-record querying with clinical tools [Jiang et al., 2025]. Rules could specify a retrieval time window, a unit check, or a tool-call sequence. Each paired evaluation would start from the same user request and record snapshot, share rules, and exchange the remaining rule. A reference answer or predefined task-completion criterion would score the resulting trajectory. Resetting the environment between runs would prevent one run's tool actions from changing the next run's starting conditions. In this mapping, the feedback case includes the query and initial environment, and the reward measures the outcome of a multi-step interaction.
Persistent rules also require domain review before deployment: a retained rule is a standing instruction to the model, and the controller judges it only by measured accuracy on the available cases. The four-rule capacity is a design choice; larger skills need more exchanges for a connected comparison graph, and the trade-off between capacity, call budget, and estimation noise remains to be characterized.
7 Limitations
The evidence covers 120 static medical-calculation cases from six previously represented calculators and one training trajectory per method; training backends, skill lengths, and optimization budgets differ. Broader comparator coverage with matched budgets, independent learning runs, an isolated test of incumbent preservation, a comparison against exhaustive evaluation of all feasible skills, and evaluation on new calculators would strengthen the evidence. The credit-assignment ablation reused a development panel. Selection can overfit its three-case feedback panel and incurs projection error when rules interact.
Some development labels depend on disputed choices of measurement time point or units; scores measure agreement with the frozen references. Erroneous labels can reinforce an incorrect rule and create unwarranted confidence. Clinical application would require independent validation and oversight appropriate to its intended use.
8 Conclusion
CausalEvo performs causal skill self-evolution for health LLM agents: a frozen model proposes rules, paired fixed-capacity exchanges estimate their relative values, and selection keeps the incumbent skill available at every step. On 120 held-out medical-calculation cases it reaches 60.00% accuracy; paired differences remain uncertain and task-level gains vary. Across the recorded training configurations, which use different optimization budgets, it consumes 55.6% fewer training tokens than SkillOpt, primarily through lower input volume. The method turns feedback into explicit, inspectable decisions about retaining or replacing reusable skills.
References
Lakshya A. Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong, Arnav Singhvi, Herumb Shandilya, Michael J. Ryan, Meng Jiang, Christopher Potts, Koushik Sen, Alexandros G. Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, and Omar Khattab. GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning. In International Conference on Learning Representations, 2026.
Kunfeng Chen, Qihuang Zhong, Juhua Liu, and Bo Du. SkillCAT: Contrastive, Assessment-Augmented and Topology-Aware Skill Self-Evolution for LLM Agents. arXiv preprint arXiv:2606.13317, 2026. URL https://arxiv.org/abs/2606.13317.
Xiaoye Jiang, Lek-Heng Lim, Yuan Yao, and Yinyu Ye. Statistical ranking and combinatorial Hodge theory. Mathematical Programming, 127(1):203–244, 2011.
Yixing Jiang, Kameron C. Black, Gloria Geng, Danny Park, James Zou, Andrew Y. Ng, and Jonathan H. Chen. MedAgentBench: A Virtual EHR Environment to Benchmark Medical LLM Agents. NEJM AI, 2(9):AIdbp2500144, 2025.
Nikhil Khandekar, Qiao Jin, Guangzhi Xiong, Soren Dunn, Serina S Applebaum, Zain Anwar, Maame Sarfo-Gyamfi, Conrad W Safranek, Abid A Anwar, Andrew Zhang, Aidan Gilson, Maxwell B Singer, Amisha Dave, Andrew Taylor, Aidong Zhang, Qingyu Chen, and Zhiyong Lu. MedCalc-Bench: Evaluating Large Language Models for Medical Calculations. In Advances in Neural Information Processing Systems 37, Datasets and Benchmarks Track, 2024. URL https://proceedings.neurips.cc/paper_files/paper/2024/hash/99e81750f3fdfcaf9613db2dbf4bd623-Abstract-Datasets_and_Benchmarks_Track.html.
James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526, 2017.
Yongchan Kwon and James Zou. Beta Shapley: a Unified and Noise-reduced Data Valuation Framework for Machine Learning. In Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, volume 151 of Proceedings of Machine Learning Research, pages 8780–8802. PMLR, 2022. URL https://proceedings.mlr.press/v151/kwon22a.html.
Zhiyuan Li, Linyuan Gao, Xuechun Ding, Hongwei Chen, Yuan Wu, and Yi Chang. CaSKG: Counterfactual-Causal Skill Graphs for Scalable Agent Skill Retrieval. arXiv preprint arXiv:2608.25500, 2026. URL https://arxiv.org/abs/2608.25500.
Hongqiang Lin, Chao Liu, Xiaofan Bai, Xuan Jin, Yuhong Li, Nenggan Zheng, and Xipeng Cao. Rethinking Self-Evolution: A Constrained Exploration-Exploitation Process for Mitigating Skill Overfitting. arXiv preprint arXiv:2607.26643, 2026. URL https://arxiv.org/abs/2607.26643.
Chang Liu, Yuqi Zhang, Yiman Zhong, Boyi Liu, Hengjun Wang, and Shuyue Wei. SkillShapley: Boundary-Adaptive Shapley Valuation for Skill Step Attribution in LLM Agents. arXiv preprint arXiv:2608.13173, 2026. URL https://arxiv.org/abs/2608.13173.
David Lopez-Paz and Marc’Aurelio Ranzato. Gradient Episodic Memory for Continual Learning. In Advances in Neural Information Processing Systems 30, pages 6467–6476, 2017.
Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. Self-Refine: Iterative Refinement with Self-Feedback. In Advances in Neural Information Processing Systems 36, pages 46534–46594, 2023.
MedCalc-Bench maintainers. MedCalc-Bench-Verified. Dataset repository, 2026. URL https://github.com/nikhilk7153/MedCalc-Bench-Verified. CC-BY-SA-4.0; accessed September 9, 2026.
Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language Agents with Verbal Reinforcement Learning. In Advances in Neural Information Processing Systems 36, pages 8634–8652, 2023.
Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar. Voyager: An Open-Ended Embodied Agent with Large Language Models. Transactions on Machine Learning Research, 2024.
Jiachen T. Wang and Ruoxi Jia. Data Banzhaf: A Robust Data Valuation Framework for Machine Learning. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics, volume 206 of Proceedings of Machine Learning Research, pages 6388–6421. PMLR, 2023. URL https://proceedings.mlr.press/v206/wang23e.html.
Yixuan Wang, Yiyang Zhou, Yiming Liang, Congyu Zhang, Fuxiao Liu, Jiawei Zhou, and Huaxiu Yao. Not All Skills Help: Measuring and Repairing Agent Knowledge. arXiv preprint arXiv:2606.15390, 2026. URL https://arxiv.org/abs/2606.15390.
Yifan Yang, Ziyang Gong, Weiquan Huang, Qihao Yang, Ziwei Zhou, Zisu Huang, Yan Li, Xuemei Gao, Qi Dai, Bei Liu, Kai Qiu, Yuqing Yang, Dongdong Chen, Xue Yang, and Chong Luo. SkillOpt: Executive Strategy for Self-Evolving Agent Skills. arXiv preprint arXiv:2605.23904, 2026. URL https://arxiv.org/abs/2605.23904.
Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Pan Lu, Zhi Huang, Carlos Guestrin, and James Zou. Optimizing generative AI by backpropagating language model feedback. Nature, 639:609–616, 2025.
Qizheng Zhang, Changran Hu, Shubhangi Upasani, Boyuan Ma, Fenglu Hong, Vamsidhar Kamanuru, Jay Rainton, Chen Wu, Mengmeng Ji, Hanchen Li, Urmish Thakker, James Zou, and Kunle Olukotun. Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models. In International Conference on Learning Representations, 2026.
Qiyan Zhao, Xiaofeng Zhang, Bo Liu, Minda Chen, Wei Xiong, Jingyang Chen, Guanting Ye, Wenhao Yu, Xiaosong Yuan, Shijie Han, Da-Han Wang, Jianmin Ji, Fei Huang, and Xu-Yao Zhang. Coalition-Aware Skill Reliability for Self-Evolving Agents. arXiv preprint arXiv:2608.22610, 2026. URL https://arxiv.org/abs/2608.22610.
A Proofs
All statements condition on a fixed candidate collection and a fixed value function on its size-k subsets. An index denotes a particular rule string with a deterministic rendering convention. The intervention includes the effect of inserting that text into the resulting prompt. Semantically similar strings may have different effects.
A.1 Exchange identity
For a uniform size-k indicator vector, ,
The covariance matrix therefore acts as multiplication by on the subspace . On that subspace, the normal equations of the least-squares projection give . The optimal intercept is , because . This proves the first identity and the uniqueness of the zero-sum coefficient vector.
For the second identity, write
(11)
The two conditional backgrounds are uniform -subsets of the same remaining indices. Dividing by proves the result for arbitrary . The derivation requires uniform averaging over these backgrounds.
A.2 Graph estimation
For a connected graph, has nullspace span(1). If the conditional mean of each observed edge difference is the corresponding , then
since . With independent homoskedastic edge noise of variance , the covariance on this subspace is . Correlated or unequal-variance errors require a corresponding covariance adjustment.
For a six-cycle with vertices and oriented differences , let , set , and recursively set . Centering the six values gives (7). The fitted differences are , and the residual sum of squares is . A zero observed residual is compatible with nonlinear rule interactions, because the mean identity itself holds for arbitrary .
By the matrix-tree theorem, the product of the nonzero Laplacian eigenvalues is times the number of spanning trees. A connected simple graph on six vertices with six edges is unicyclic. If its unique cycle has length , it has spanning trees: delete one of the cycle edges, while every attached tree edge must remain. Thus , with equality for the six-cycle. This proves D-optimality only among this restricted family under the equal-variance independent-noise model. In our experiment, two edges share each feedback case, and different model responses can have different variability.
A.3 Decision bound
Let maximize V within . The uniform approximation bound gives
Because maximizes the estimated coefficient sum, adding and subtracting bounds the final two sums by
The last inequality follows because both sets have size in a universe of size . Adding the support gap proves (9). If , then , giving the incumbent comparison. Lexicographic tie-breaking preserves the first objective, so the proof applies.
A.4 Complementarity counterexample
Take and assign values
The exact zero-sum projection coefficients are . Selecting the two largest coefficients returns or with value , whereas the optimal feasible skill has value . Approximation error therefore remains even with exact coefficient estimates.
The accompanying mathematical checker verifies the exchange identity on arbitrary finite value tables, the decision-loss bound, this counterexample, and the restricted six-cycle design calculation.
B Implementation details
This section documents the actor and proposal interfaces, the training configuration, and the pseudocode shared by the main experiment and the credit-assignment ablation.
B.1 Model interfaces
Figures 5 and 6 show the actor and proposal templates. Braced fields describe the variable inputs schematically; the fixed instructions retain their documented wording.
Prompt Template for the Calculation Actor
[System] Solve the requested medical calculation as a research exercise using the supplied patient note and calculator name. Show a brief calculation (maximum160 words), then end with a separate line exactly FINAL: followed by one numeric value only, with no units or commas. Do not provide treatment advice. Do not output JSON. [Selected Rules – appended to System] {selected_rules_in_rendering_order}
[User Input] {patient_note} {calculation_question}
Figure 5: Actor prompt. Selected rules follow the fixed instruction; the no-skill state leaves that field empty. Field headings indicate message structure.
The user message contains the original patient note and question. An output is valid only if it ends normally and the fixed numerical parser extracts an explicit answer. Integer tasks require round(value) to equal the numerical gold answer, using Python rounding. Decimal tasks require the value to lie within the source's inclusive lower and upper bounds.
Prompt Template for Skill Proposals
[System]
Propose exactly {m} reusable medical-calculation rules from the current rules and labeled attempt.
Each rule must state its applicability and procedure in 5–80 English words; propose additions, corrections, or compact replacements.
Treat the example as evidence, not a universal condition; exclude patient values, narratives, and treatment advice.
Return only RULE 1: through RULE {m}: on separate lines; the program preserves old rules and decides what to retain.
[Current Rules]
{current_rules}
[Labeled Teaching Case]
{calculator_name, patient_note, question}
{reference_answer, reference_explanation}
[Actor Attempt]
{attempt_text, correctness, validity, finish_reason}
Figure 6: Skill-proposal template, with at initialization and for a nonempty incumbent. The lower fields summarize the structured user payload. The program selects rules from the scored comparisons.
The structured user payload contains current rules; the teaching case's calculator name, note, question, reference answer and explanation; and the actual attempt's text, correctness, validity, and finish reason. Evaluation cases remain separate from this payload. The parser requires ordered rule labels, distinct rule text, normal completion, and 5–80 English words per rule. Exact duplication of an incumbent clause invalidates the proposal; semantic near-duplication can pass this check. An invalid proposal leaves the incumbent skill unchanged and is recorded.
B.2 Training configuration
Table 3 lists the skill evolution settings. Each feedback case has equal probability of assignment to each edge. The estimator's mean concerns the realized three-case panel and its task composition; generalization to a broader health-task distribution requires additional evidence.
Table 3: Settings for skill evolution.
| Setting | Value |
|---|---|
| Model identifier | deepseek/deepseek-v4-flash-0731 |
| Temperature | Actor 0, proposer 0.3 |
| Output caps | Actor 4,096; proposer 8,192 tokens |
| State constraint | Four rules, 5–80 words each |
| Comparison design | Random six-cycle; six pairs, 12 actor calls per valid evolution step |
B.3 Pseudocode
Algorithm 1 specifies one skill evolution step. Here preserves increasing candidate-index order, , and is the scored actor in (1). The proposal-validity check follows the parser above; the ablation's random seed schedule is given in Appendix D.2. Invalid actor outputs have score zero.
Algorithm 1: CausalEvo: one skill evolution step
Input: Frozen actor and proposer ; skill with ; labeled lesson with input ; labeled feedback cases ; random seed schedule .
Output: Next skill .
1 ; ;
2
3 // Request candidate rules
4 if is invalid or then
5 return
6 ; ;
7 ;
8 // Directed cycle
9 // Two edges per case
10 for do
11
12
13 ;
14
15 foreach do
16
17 ;
18 // Exact cycle fit; (7)
19
20 // Fixed candidate order
21
22 return
The manuscript source includes figure-generation code, a mathematical checker, aggregate results, and record-role identifiers. Complete training code and raw responses are not currently included in the package.
C Main experiment: supplementary protocol
The test panel is drawn from the frozen MedCalc-Bench-Verified source training split. Child-Pugh uses Synthetic cases and the other tasks use Extracted cases, following the source labels. Overlap filtering checks record identifiers, normalized text, complete-case matches against auxiliary evaluation records, and five-word shingle Jaccard similarity with threshold 0.85. Of 824 candidates, 592 pass these checks before sampling 20 cases per task.
Test selection uses seed 2026091001, schedule randomization uses 2026091011, and bootstrap resampling uses 2026091012. A bootstrap draw samples 20 cases with replacement within each task, carrying all state responses together. Exact McNemar tests use discordant pairs, and the three final-state tests form one Holm family. This correction applies only to the three stated comparisons.
Let be accuracy on task after stage , where denotes no skill and stages 1–6 denote steps 4–24. All entries use the same 20 test cases per task. We report
SkillOpt uses mixed-task optimization and contributes its selected endpoint to the final comparisons. The sequential learning matrix tracks CausalEvo. Training uses low reasoning; endpoint and check-point evaluation uses reasoning disabled. Each round runs six paired exchanges on three feedback cases, fits relative rule values, and selects the top four rules.
C.1 Baselines
The SkillOpt comparison evaluates final skills learned from a shared case pool through a common frozen-actor interface. We adapt the released ReflACTTrainer using its environment interface for new tasks. Training budgets and optimization schedules differ between methods. The four-rule capacity applies to CausalEvo's candidate interventions; SkillOpt retains its own text representation.
Other skill-evolution systems were not run for two reasons. At the time of writing, SkillCAT and CASS have no public code, and the CaSKG release omits its skill corpus and experiment workspace [Chen et al., 2026, Zhao et al., 2026, Li et al., 2026]. Independently of code, each system requires protocol choices that our setup does not specify: SkillCAT and SkillBoost need multi-trajectory collection, replay budgets, and inference-time routing [Chen et al., 2026, Lin et al., 2026]; SkillShapley values steps within an existing skill and needs a proposal and evolution policy to become a learning baseline [Liu et al., 2026]; ASSAY and CaSKG need task-conditioned masking or retrieval [Wang et al., 2026, Li et al., 2026]. Established optimizers such as ACE, GEPA, and TextGrad remain relevant controls [Zhang et al., 2026, Agrawal et al., 2026, Yuksekgonul et al., 2025]. Broader comparator coverage and training-budget control remain limitations of the present evaluation.
C.2 Training token totals
Table 4 reports aggregate usage for skill learning and optimization, separately from fixed-skill test evaluation. Output counts include reasoning tokens. Total tokens equal input plus output tokens; request counts are reported separately. The comparison uses each method's recorded training configuration and optimization budget.
Table 4: Training usage for the main experiment.
| Method | Requests | Input tokens | Output tokens including reasoning | Total tokens |
|---|---|---|---|---|
| SkillOpt | 839 | 3,924,153 | 1,036,499 | 4,960,652 |
| CausalEvo | 336 | 1,186,029 | 1,016,551 | 2,202,580 |
C.3 Paired statistical results
All 960 saved predictions were rescored offline with the fixed parser and reference labels, and the reported statistics were recomputed from those scores. The final skills answer 72 cases correctly for CausalEvo, 67 for SkillOpt, and 62 for no skill. Relative to SkillOpt, CausalEvo corrects 21 previously incorrect answers and changes 16 correct answers to incorrect ones. Its accuracy difference is +4.17 percentage points, with a conditional 95% bootstrap interval of [-5.00, 13.33] and Holm-adjusted p = 0.9737. Relative to no skill, it corrects 22 answers and worsens 12, giving +8.33 points, interval [-0.83, 17.50], and adjusted p = 0.3643. SkillOpt corrects 19 answers and worsens 14 relative to no skill, giving +4.17 points, interval [-5.00, 13.33], and adjusted p = 0.9737. No comparison is significant after correction. The intervals condition on the learned skills and do not capture training variability.
C.4 Final task accuracies
Table 5 provides the values plotted in Figure 2. Each task contains 20 held-out cases, so one additional correct answer changes task accuracy by five percentage points. The single invalid final CausalEvo output is retained in the Child-Pugh denominator.
C.5 Output quality
An output is valid when its request succeeds, completion ends normally, and the fixed parser accepts one numeric answer. The parser accepts numeric-only responses and supported final-line labels,
Table 5: Final accuracy (%) on each task, with 20 held-out cases per task. Bold marks the highest observed accuracy in each column.
| Method | SIRS | HEART | PERC | CURB-65 | Child-Pugh | Cockroft–Gault |
|---|---|---|---|---|---|---|
| No skill | 65 | 25 | 40 | 65 | 45 | 70 |
| SkillOpt | 85 | 40 | 55 | 70 | 40 | 45 |
| CausalEvo | 75 | 50 | 35 | 80 | 30 | 90 |
so validity measures acceptance across these formats. The aggregate records lack counts for each accepted format and the specific cause of the lone invalid output, preventing separate estimates of strict FINAL: compliance and parse-failure rate.
For each final state, let , be the number of valid outputs, and the number of correct answers. Output validity is , and valid-only accuracy is . The latter pools the valid cases and can have a different task mixture and denominator for each method. Overall accuracy remains . The three disjoint outcome categories in Table 6 sum to : correct answers, valid but incorrect answers (), and invalid outputs ().
Table 6: Final-state output decomposition on the 120-case panel. All values are counts. Invalid outputs remain errors in the primary accuracy metric; truncation is one possible invalid-output cause.
| Method | Correct | Valid but incorrect | Invalid | Length truncations |
|---|---|---|---|---|
| No skill | 62 | 58 | 0 | 0 |
| SkillOpt | 67 | 53 | 0 | 0 |
| CausalEvo | 72 | 47 | 1 | 0 |
Across all eight evaluated states, validity is 959 of 960 outputs and the recorded truncation rate is zero. This pool contains repeated evaluations of the same 120 cases. Only failures that return no model output are eligible for a retry. Completed answers, including formatting failures, are scored once. The evaluation truncation count covers endpoint and checkpoint responses; the three capped SkillOpt optimizer responses belong to training.
C.6 A complete learned skill
Figure 7 reproduces the final skill learned in the main experiment. Two rules address thresholds and source measurements, and two specify Cockcroft–Gault procedures. The same four-rule skill is deployed across all six evaluation tasks.
Final CausalEvo skill (step 24)
RULE 1: For criteria with dual blood-pressure thresholds (e.g., SBP <90 or DBP ≤60), award 1 point if either threshold is met, using the initial recorded BP pair. Do not require both conditions, and do not adjust based on later measurements.
RULE 2: For any scoring system with numeric thresholds, use the exact value from the earliest set of labs and apply the stated inequalities; do not round, infer, or adjust that number even if a later representation differs. Score within the defined categories precisely.
RULE 3: For Cockcroft-Gault, compute adjusted weight from initial BMI and Devine ideal body weight: if underweight use actual weight; if normal use minimum(ideal, actual); if overweight/obese use ideal + 0.4 × (actual – ideal). Then apply CrCl = ((140 – age) × adjusted weight × [0.85 if female, else 1]) / (creatinine in mg/dL × 72).
RULE 4: When converting height to inches for Cockcroft-Gault, use the exact factor 2.54 cm/in, retain the unrounded inch value, and keep it unrounded through ideal-body-weight and all subsequent steps; never round intermediate height or weight conversions before final CrCl.
Figure 7: Complete deployed skill from the main experiment at step 24. The actor receives these four rules after its fixed task instruction. The rule text is preserved from the saved skill artifact.
D Credit-assignment ablation
This ablation tests credit-rule correspondence within the CausalEvo controller. It uses a separate dataset with a 24-case test set.
D.1 Experimental setup
The six tasks are introduced in the same order as in the main experiment, with four learning rounds each. We compare two learning trajectories, CausalEvo and shuffled credit. Both use the model interfaces and training configuration of Appendix B, the same incumbent-containing feasible sets, intervention design, and tie rule. The control permutes the six fitted credits before assigning them to rules. When the trajectories enter a round with identical skills, they share teaching and proposal responses; intervention calls remain separate. After their states diverge, each trajectory proposes from its own skill. Truncated proposals leave the skill unchanged, and invalid actor outputs score zero.
D.2 Dataset allocation and seeds
We use MedCalc-Bench-Verified, available under the CC-BY-SA-4.0 license [MedCalc-Bench maintainers, 2026], with a fixed development allocation and unchanged reference labels: 24 teaching cases, 72 feedback cases, and 24 development evaluation cases (four per task). These learning and development records are drawn from the source training split, with separation from each other and from the main test panel established at the note-ID and exact-text levels. Table 7 lists the task composition. The learning allocation contains 88 Extracted and 8 Synthetic records; evaluation contains 20 Extracted and 4 Synthetic records, using the dataset's own note-type labels. The manuscript source includes a machine-readable allocation manifest containing record identifiers and roles.
Table 7: Fixed allocation. Each task is introduced for four consecutive rounds. Feedback can come from tasks introduced previously; early tasks consequently appear more often.
| ID | Task | Teaching | Feedback | Development |
|---|---|---|---|---|
| 51 | SIRS | 4 | 32 | 4 |
| 18 | HEART | 4 | 18 | 4 |
| 48 | PERC | 4 | 10 | 4 |
| 45 | CURB-65 | 4 | 6 | 4 |
| 15 | Child-Pugh | 4 | 4 | 4 |
| 2 | Cockcroft-Gault | 4 | 2 | 4 |
| Total | 24 | 72 | 24 |

Figure 8: Accuracy at each phase end on all tasks introduced so far. The evaluated task mixture expands with each phase.
For round index , the implementation uses seeds for the cycle and backgrounds, for intervention order, for the two executions on edge , and for final tie-breaking. The shuffled-credit permutation uses the last seed plus 100000. Teaching and proposal seeds are and . The two policies use matched sampling schedules; stochastic model outputs may still differ.
D.3 Evaluation protocol
All learning states are finalized before evaluation begins. At the end of each four-round task phase, we evaluate every introduced task on its four development cases, yielding 84 predictions per trajectory. The empty skill is evaluated on the 24 cases once. The primary endpoint is final task-macro accuracy; with four cases per task, this equals final case accuracy. A secondary endpoint averages the six phase-end accuracies over the tasks introduced by each phase; that curve reflects both performance changes and the expanding task mixture, and empty-skill outcomes are reused to compute the corresponding changing-mixture reference.
Bootstrap intervals use 10,000 draws, sampling four paired cases with replacement independently within each of the six task strata, with random-number generator seed 188000. This analysis reuses the evaluation panel for method development and includes one learning trajectory per method; the intervals quantify case-sampling uncertainty conditional on the two realized trajectories and do not account for method-development choices.
D.4 Results
Table 2 shows that CausalEvo answers 17 of 24 development cases correctly, compared with 15 for each control. Its phase-mean advantage over shuffled credit is 4.65 percentage points (Figure 8). The paired final difference from shuffled credit is +8.33 percentage points, with a conditional 95% interval of . The difference from no skill is also +8.33 points, with interval . All 24 final answers are valid for both learned trajectories; 23 are valid for no skill.
D.5 Diagnostics
Paired outcomes. Both gains over the empty skill occur on HEART, where both methods produced complete, valid answers. Relative to shuffled credit, the intact-credit trajectory gains one case each on HEART, Child-Pugh, and Cockcroft–Gault, and loses one PERC case. All four discordant pairs have valid outputs on both sides, so the differences reflect answer correctness; case identifiers are retained in the evidence files. In the PERC loss, the intact-credit trajectory returns a criterion count opposite to the reference, illustrating a task-level failure despite the aggregate gain.
Learning dynamics. CausalEvo makes 20 valid proposals in 24 rounds, changes its skill in 12 evolution steps, and encounters four truncated proposals. The shuffled control makes 23 valid proposals and changes its skill in 10 rounds. Across valid evolution steps, 18 of 120 exchange edges in CausalEvo and 13 of 138 in the control have nonzero binary differences; seven and thirteen steps, respectively, have all-zero edges. The measured distinctions between paired skill sets are therefore sparse.
Skill content. The final CausalEvo skill's four rules first appear in rounds 9, 22, 23, and 24. Two express near-duplicate body-weight procedures, one retains an editing reference to a rule number that can change after subset selection, and a unit-conversion rule includes a broadly worded time-point instruction. The control retains broader unit and source-value instructions. Both final documents provide incomplete explicit coverage of the six named calculation procedures, exposing limitations in semantic coverage and coherent composition. The last exchange graph has zero residual alongside the redundant final rules, illustrating the distinction between graph fit and skill-set quality.
E Use of large language models
DeepSeek serves as the frozen actor and proposer. An LLM-based coding assistant supported implementation, mathematical exposition, literature organization, and drafting.