Continuous Learning from Executable Environments: Autonomous Skill Acquisition, Retention, and Transfer in Language Models
Organizations: Swedish Embedded AB
Abstract
A language model does not keep the experience of a task it completes. Where an attempt can be checked by executing it, that experience can become training data without human-written tasks or labels. We present and evaluate a framework that generates practice tasks, verifies attempts by execution, trains a small adapter (added weights; the base model remains fixed) on the verified records, and repeats, one generation per repetition, evaluating every model on a held-out examination that no stage of the pipeline reads. In predicting the output of Lua programs, using an interpreter as the sole source of labels, a 4-billion-parameter (4B) model's examination accuracy rises from 5.05% to 13.24% over four generations. In editing files with Vim, a larger teacher model writes tasks from the user manual and supplies most verified solutions. Trained on these records, the 4B model solves hand-written examination tasks its base never solves (up to 3.50% of attempts, versus 62.25% for the teacher), whereas a control trained with mismatched task requests solves none. On 228 easier hand-written course exercises, the pass rate rises from 15-16% to 37-41% (exploratory). An iterative protocol then ran three generations with 4B and 8B models, governing every release by a fixed rule. In the first generation, examination gains were one-tenth to one-fifth of the gains on held-out generated tasks. Across training seeds, later candidates averaged 1.2 to 6.1 percentage points above their baselines on generated tasks, implying an expected examination gain of 0.1 to 1.3 points, below the 100-task examination's 2.8-point detection threshold. Consequently, no later examination gain was established, and because outcomes were recorded per attempt rather than per task, whether transfer, acquisition, or retention stalled remains undecided.
Figures & tables
| Term | Meaning |
|---|---|
| Base; adapter | the published model before any training of ours; a small set of additional weights trained while the base’s own weights stay fixed. Ours are low-rank adapters [ 10 ] : each added weight matrix is the product of two thin ones, which makes an adapter cheap to train and store. A base with an adapter is what is evaluated |
| Generation; candidate | one pass of the loop of Fig. 1 (generate tasks, attempt, verify, train, evaluate); the model that generation produces |
| Release rule; champion | the fixed test that accepts or rejects a candidate; the most recently accepted model when generation is evaluated: the base at first, and not necessarily generation afterwards, because a candidate can be rejected |
| Training seed | the number that fixes the random choices of one training run (such as the order of the records); two seeds give two slightly different adapters from the same data |
| Lineage; training-step replication | one independent run of the whole sequence of generations from the base; one generation’s training repeated with another training seed, from the same champion, on the same tasks and records |
| Training material | Records (teacher’s) | Passes (per seed) | Tasks | Base | vs base, | vs control, |
|---|---|---|---|---|---|---|
| all verified | 3359 (2699) | 22 (6, 6, 10) | 10 | 0/1174 | 10/0, 0.00098 | 10/0, 0.00098 |
| one per task | 771 (629) | 10 (5, 2, 3) | 6 | 0/1188 | 6/0, 0.016 | 6/0, 0.016 |
| productive actions | 3359 (2699) | 22 (10, 4, 8) | 11 | 0/1187 | 11/0, 0.00049 | 11/0, 0.00049 |
| shuffled requests | 3359 (2699) | 0 (0, 0, 0) | 0 | 0/1177 | – | – |
| outcome first | 1100 (1014) | 42 (14, 11, 17) | 25 | 0/1175 | 24/0, | 25/0, |
| Capability | Status |
|---|---|
| Generate practice tasks, reject invalid ones, verify solutions by execution, build training sets, train adapters, evaluate outside the pipeline, run successive generations with releases decided by rule, re-measure earlier tasks | exercised |
| Improve interpreter-based examination accuracy | supported |
| Extend that gain to program families never examined before | supported |
| Acquire transferable Vim capabilities | supported, under the tested conditions |
| Transfer to hand-written course exercises | supported (exploratory) |
| Retain earlier capabilities across generations | release rule satisfied; not established |
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Role in the framework | Implementation |
|---|---|
| Learning controller: runs the stages of a generation, builds training sets, applies the release rule | Splinter |
| Agent and tool execution: one attempt of a model on a task | Sven |
| Inference and optimisation: serving models, training adapters | Brain |
| Vim task environment, authoring prompts, schemas, operators and recipes; Lua examination generator, its check and the examiner | the reproduction materials of this paper ( swedishembedded/continuous-learning-materials ) |
| Lua learning cycle: proposing programs, keeping the mispredicted ones, training, the learner’s own release rule | the lineage program of Splinter’s repository ( samples/campaign-lua ), at the commit pinned in prereg/rsi5-launch.md |
| Kind | Repository | Revision | Access | Holds |
|---|---|---|---|---|
| dataset | swedishembedded/vim-headless-mastery | ff83d49b1b7d | public | the hand-written Vim course: its single-idea exercises and the examination tasks, with their checks and reference answers (the composite course exercises are not published) |
| dataset | swedishembedded/vim-headless-mastery-manual | e3ee7a458c06 | private | the tasks authored from the user manual in both authoring modes and for the later generations, held-out tasks included |
| dataset | swedishembedded/vim-headless-mastery-sft-manual | bc55f91f923f | private | verified trajectories of teacher and learner on the authored tasks, with every graded attempt and its reward |
| dataset | swedishembedded/vim-headless-mastery-sft | 303ba2e401c2 | public | the training trajectories of the all-verified and outcome-first conditions as chat records, without the records of the held-out tasks; and, as its default configuration, teacher trajectories on the course’s exercises, on which no model of this paper was trained |
| dataset | swedishembedded/vim-headless-mastery-sft-g2 | f0b91d2b7700 | private | a second generation of the course-exercise trajectories, not used by any model of this paper |
| model | swedishembedded/vim-manual-transfer-adapters | 0485d8a1e2a8 | private | the adapters of the training-material experiment (six conditions, three seeds) and one seed of the first 8B generation of the earlier iterative runs; the adapters of the iterative protocol and of its replications were not retained |
| Repo. | Commit | Frozen binary | sha256 | Used for |
|---|---|---|---|---|
| splinter | f6661e34be6b | splinter-f6661e34b/splinter | aa162ad978cfab42 | Vim training-material experiment: datasets, training, evaluations |
| splinter | cc5581333a14 | splinter-cc5581333/splinter | eb814939016bbf04 | Vim authoring run, attempt stages |
| splinter | d3ab644fafa2 | splinter-d3ab644fa/splinter | faa5b47e3b360d9a | Vim authoring run, authoring stages |
| brain | b726c045bb34 ( d6bd3baaff53 ) | brain-b726c045b/brain | 0d62d4c7ae404664 | Vim serving and training of the training-material experiment |
| brain | b726c045bb34 ( d6bd3baaff53 ) | brain-b726c045b/brain-gpu-worker | ab5c2e8692370fed | as above |
| brain | 2104ee58f960 | brain-2104ee58f/brain | 02d475dd9fdb6a44 | Vim serving of the iterative runs on part of the nodes: the router spreads an adapter’s requests |
| Claim | Question | Unit of analysis | Reg. | Status |
|---|---|---|---|---|
| lua-early-steps | Do the first two Lua generations each improve on their predecessor on the independent examination? | program family and lineage (examiner’s bootstrap) | primary | improvement supported |
| lua-late-steps | Do Lua generations 3 and 4 each improve on their predecessor? | program family and lineage (examiner’s bootstrap) | primary | inconclusive |
| lua-total-gain | Does Lua generation 4 improve on the base on the independent examination? | program family and lineage (examiner’s bootstrap) | primary | improvement supported |
| lua-new-families | Does the Lua gain extend to program families never used in any examination before? | program family and lineage (examiner’s bootstrap) | primary | improvement supported |
| vim-transfer-arms | Do trajectories on automatically authored Vim tasks teach a 4B model skills it applies to the independent examination? | task (examination task), passes pooled over three training seeds | primary | improvement supported |
| vim-heldout-arms | Do the training-material conditions improve on held-out generated tasks? | task (held-out generated task), passes pooled over three seeds | secondary | improvement supported |
| Evidence file | Tests | Unit as computed | Unit the file states | Task-level test |
|---|---|---|---|---|
| vim-transfer/decision/decision-eval-exam.json | 8 | task | not stated | recorded |
| vim-transfer/decision/decision-eval-unseen.json | 7 | task | not stated | recorded |
| vim-transfer/decision/secondary-eval-exam.json | 4 | task | not stated | recorded |
| vim-transfer/decision/secondary-eval-unseen.json | 3 | task | not stated | recorded |
| vim-transfer/decision/student-only-decision-eval-exam.json | 1 | task | not stated | recorded |
| vim-transfer/loop/loop.json | 13 | task | not stated | recorded |
| Comparison | After | Before | Difference [95% interval] | Outcome |
|---|---|---|---|---|
| Generation 1 vs base | 10.12% | 5.05% | [ , ] | improvement supported |
| Generation 2 vs 1 | 11.72% | 10.12% | [ , ] | improvement supported |
| Generation 3 vs 2 | 12.95% | 11.72% | [ , ] | inconclusive |
| Generation 4 vs 3 | 13.24% | 12.95% | [ , ] | inconclusive |
| Generation 4 vs base | 13.24% | 5.05% | [ , ] | improvement supported |
| never-examined families | 4.63% | 1.38% | [ , ] | improvement supported |
| Authoring mode | Model | Counted attempts | Pass rate | Tasks | Tasks solved |
|---|---|---|---|---|---|
| section by section | Qwen3-4B | 8204 | 10.0% | 1026 | 231 |
| section by section | Qwen3.8-27B-FP8 | 4095 | 81.1% | 1026 | 944 |
| outcome first | Qwen3-4B | 3688 | 3.1% | 467 | 36 |
| outcome first | Qwen3.8-27B-FP8 | 1868 | 72.2% | 467 | 410 |
| Step | Tasks | Candidate | Reference | Diff. | Slots | Task-level , range | Outcome |
|---|---|---|---|---|---|---|---|
| 8B generation 1 vs base | own held-out tasks | 85/224 | 9/224 | 79/3 | to 0.00024 | improvement supported | |
| 8B generation 1 vs base | examination | 25/400 | 0/391 | 25/0 | to 0.0078 | excluded | |
| 8B generation 2 vs generation 1 | own held-out tasks | 55/188 | 40/188 | 29/14 | to 0.942 | inconclusive | |
| 8B generation 2 vs generation 1 | generation 1 held-out tasks | 92/224 | 86/224 | 29/23 | to 0.999 | inconclusive | |
| 8B generation 2 vs generation 1 | examination | 30/400 | 30/400 | 17/17 | 0.0059 to 1 | inconclusive | |
| 8B generation 3 vs generation 2 | own held-out tasks | 59/196 | 45/196 | 25/11 | to 0.895 | inconclusive |
| Step | Tasks | Seeds | Passes per seed | Champion | Above/below | Slots, summed | Outcome |
|---|---|---|---|---|---|---|---|
| 8B generation 2 | own held-out tasks | 4 | 55, 51, 51, 49 | 40/188 | 4/0 | 99/53 | inconclusive |
| 8B generation 2 | generation 1 held-out tasks | 4 | 92, 91, 96, 96 | 86/224 | 4/0 | 115/84 | inconclusive |
| 8B generation 2 | examination | 4 | 30, 27, 29, 33 | 30/400 | 1/2 | 63/64 | inconclusive |
| 8B generation 3 | own held-out tasks | 3 | 59, 51, 54 | 45/196 | 3/0 | 64/35 | inconclusive |
| 8B generation 3 | generation 2 held-out tasks | 3 | 49, 57, 58 | 54/188 | 2/1 | 61/59 | inconclusive |
| 8B generation 3 | generation 1 held-out tasks | 3 | 109, 106, 104 | 105/224 | 2/1 | 52/48 | inconclusive |
| First generation | Held-out | Examination | Ratio | Comparison |
|---|---|---|---|---|
| Iterative protocol, 4B (one run) | 0.11 | inconclusive | ||
| Iterative protocol, 8B (one run) | 0.18 a | excluded | ||
| Training material, outcome first (three seeds) | 0.20 | supported | ||
| Training material, all verified (three seeds) | 0.04 | supported | ||
| Training material, productive actions (three seeds) | 0.03 | supported | ||
| Training material, one per task (three seeds) | 0.02 | supported |
| Held-out | Examination difference | ||||||
|---|---|---|---|---|---|---|---|
| Step | diff. | predicted | mean | seeds, range | first seed, 95% | Detectable | Tasks needed |
| 8B generation 2 | to | to | to | 840 to 3 100 | |||
| 8B generation 3 | to | to | to | 1 400 to 5 100 | |||
| 4B generation 2 | to | to | to | 14 000 to 52 000 | |||
| 4B generation 3 | to | to | to | 720 to 2 700 | |||
| Training material | Tasks | Passes (rate) | Base | vs base: won/lost, | Difference [95%] |
|---|---|---|---|---|---|
| all verified | 94 | 705/1128 (62.5%) | 126/1128 | 82/1, | [ , ] |
| one per task | 94 | 642/1128 (56.9%) | 113/1126 | 79/3, | [ , ] |
| productive actions | 94 | 723/1128 (64.1%) | 119/1128 | 84/1, | [ , ] |
| shuffled requests | 94 | 9/1128 (0.8%) | 133/1128 | 2/26, (two-sided) | [ , ] |
| outcome first | 51 | 127/612 (20.8%) | 22/612 | 25/0, | [ , ] |
| Comparison | Tasks won/lost | Pass-rate difference [95% interval] | |
|---|---|---|---|
| outcome first vs all verified | 21/5 | 0.0025 | [ , ] |
| productive actions vs all verified | 7/5 | 0.774 | [ , ] |
| one per task vs all verified | 2/8 | 0.109 | [ , ] |
| Candidate | Passes | Base | Tasks won/lost, | Difference [95%] |
|---|---|---|---|---|
| 4B outcome first, seed 3 | 378/912 | 138/912 | 120/16, | [ , ] |
| 4B productive actions, seed 1 | 360/912 | 141/910 | 109/13, | [ , ] |
| 4B one per task, seed 1 | 336/912 | 142/912 | 103/17, | [ , ] |
| 8B generation 1, seed 1 a | 463/912 | 139/893 | 129/14, | [ , ] |
| 8B generation 1, seed 2 | 461/908 | 138/903 | 138/10, | [ , ] |
| 8B generation 1, seed 3 | 408/912 | 134/897 | 127/14, | [ , ] |
| Stage | Devices | Work recorded | Hours |
|---|---|---|---|
| Lua generation 1 | 4 lineages, one card each | 5100 programs proposed, 4000 records trained, 1000 steps | 2.99 |
| Lua generation 2 | 4 lineages, one card each | 9300 programs proposed, 8000 records trained, 2000 steps | 2.25 |
| Lua generation 3 | 4 lineages, one card each | 18600 programs proposed, 16000 records trained, 4000 steps | 4.31 |
| Lua generation 4 | 4 lineages, one card each | 39506 programs proposed, 32000 records trained, 8000 steps | 11.90 |
| Vim training, condition all verified | 3 seeds, one card each | 3739 training and validation records, 2400 steps completed, 82.6M row tokens | 2.56 |
| Vim training, condition one per task | 3 seeds, one card each | 857 training and validation records, 1760 steps completed, 47.1M row tokens | 0.86 |
| Quantity | Scope | Why it is not in the evidence |
|---|---|---|
| evaluation accelerator time | every Vim evaluation stage (the training-material experiment, the iterative protocol and its replications, the earlier runs, the course exercises) and the Lua examiner | evaluation results hold counts of attempts, not durations or the cards that served them |
| rollout accelerator time | learner, teacher, admission-replay and outcome-reproduction attempt stages of both authoring runs | the attempt reports hold attempts, physical attempts and statuses, not durations; requests were routed over several cards |
| rollout tokens | every agent rollout (authoring attempts and evaluations) | prompt and completion tokens per attempt are not in the attempt reports or evaluation results |
| rollout tool calls | every agent rollout | tool-call counts per attempt are in the private attempt data only |
| authoring tokens | task proposal, review and repair by the task author, both authoring modes | the stage manifests hold item counts and rejections, not token usage or durations |
| sandbox time | admission by replay and replay verification | executions are counted; their durations are not recorded in the published reports |
| Level | Needs | Reaches | Exercised |
|---|---|---|---|
| 1. The publication: every table, figure, statistic and claim status from the committed evidence | the public source repository; Python 3 and a L a T e X distribution on a CPU; minutes | every research question, as arithmetic on recorded aggregates: it checks the analysis, not the measurements | yes, at every build; the build fails on a broken invariant of the evidence or a claim registry that differs from what the evidence gives |
| 2. Evaluation: examine the recorded adapters again | the adapters (private); the Vim course (public); one accelerator that holds a 4B model | RQ2 and RQ3 only. The adapters of RQ4 were not retained; the Lua adapters are private and the Lua examination stays with the examiner | no: no script here evaluates a recorded adapter |
| 3. Training: train again on the recorded training sets | the exact training sets (private; a public copy of the trajectories, without held-out tasks, exists) and the authored tasks (private); one accelerator; a recorded training took 17 to 51 minutes | RQ2 and RQ3 | in part: four training steps on one recorded training set, on which the base’s validation loss equalled the one the recorded run logged |
| 4. Full replication: author tasks and run every stage | the reproduction materials (public; swedishembedded/continuous-learning-materials , commit b6ef00a64cce ), the Vim manual and a model that can author; for the Lua cycle the controller’s repository and a Lua 5.1.5 interpreter; the recorded Vim run used four nodes of four accelerators; training its fifteen adapters took 10.55 accelerator-hours, and the time of its attempts and evaluations was not recorded | every research question, as a new sample: authored tasks, attempts and examination items are drawn again ( Section J.5 ) | build, data, task and recipe steps and a small end-to-end run of the training-material experiment: yes; the materials’ recipes: validated, not run; a full experiment, the iterative protocol or a Lua lineage from these scripts: no |
| Product | Recorded run |
|---|---|
| section-by-section material | admission 1026 of 1030 tasks; learner 8204 counted attempts, 10.0% passed, 231 tasks solved; teacher 4095, 81.1%, 944 ( material/funnel.json ) |
| outcome-first material | admission 467 of 467; learner 3688, 3.1%, 36 solved; teacher 1868, 72.2%, 410 |
| training sets | B and D 3359 training and 380 validation records of 857 tasks, C 771 training records, F as B with the requests shuffled, G 1100 training records of 348 tasks ( arm-datasets/*/composition.json ) |
| training | up to 800 steps, the checkpoint of lowest validation loss of every 40 ( evaluation/aggregates.json ); accelerator time in Table 18 |
| examination | passes of 1200 attempts per condition: B 22, C 10, D 22, F 0, G 42; the base none ( decision/decision-eval-exam.json ) |
| held-out generated tasks | B 705 of 1128, C 642, D 723, F 9, G 127 of 612 ( decision/decision-eval-unseen.json ) |
Continual Learning for LLMs
Continual learning for large language models studies how models absorb new knowledge and skills while retaining previously learned capabilities.
See all 271 papers