Programming by Backprop: An Instruction is Worth 100 Examples When Finetuning LLMs

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Cook, Jonathan, Sapora, Silvia, Ahmadian, Arash, Khan, Akbir, Rocktaschel, Tim, Foerster, Jakob, Ruis, Laura
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866917289766420480
author Cook, Jonathan
Sapora, Silvia
Ahmadian, Arash
Khan, Akbir
Rocktaschel, Tim
Foerster, Jakob
Ruis, Laura
author_facet Cook, Jonathan
Sapora, Silvia
Ahmadian, Arash
Khan, Akbir
Rocktaschel, Tim
Foerster, Jakob
Ruis, Laura
contents Large language models (LLMs) are typically trained to acquire behaviours from demonstrations or experience, yet much of their training data is declarative: instructions, rules, and descriptions that specify behaviours without showing how to execute them. We introduce Programming by Backprop (PBB): a training regime that enables LLMs to acquire procedural knowledge (i.e., reusable behaviours) from declarative instructions encountered during training. With PBB, instructions in training data provide an opportunity to `program' specific behaviours into model weights. The core principle underpinning PBB is the separation of learning how instructions map to behaviour from internalising new instructions. We devise two distinct PBB curricula that leverage this principle. Through controlled experiments across two domains (algorithmic execution from Python source code and text generation from context-free grammars), we demonstrate the benefit of these curricula over training on a homogeneous data mixture. Crucially, PBB is highly sample efficient, with a single instruction substituting for up to 100 execution examples. Though execution of instructions in training data remains less reliable than when instructions are given in-context, our results demonstrate that procedural knowledge can be noisily `programmed' into LLMs through PBB, with important implications for data curation and safety.
format Preprint
id arxiv_https___arxiv_org_abs_2506_18777
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Programming by Backprop: An Instruction is Worth 100 Examples When Finetuning LLMs
Cook, Jonathan
Sapora, Silvia
Ahmadian, Arash
Khan, Akbir
Rocktaschel, Tim
Foerster, Jakob
Ruis, Laura
Artificial Intelligence
Computation and Language
Machine Learning
Large language models (LLMs) are typically trained to acquire behaviours from demonstrations or experience, yet much of their training data is declarative: instructions, rules, and descriptions that specify behaviours without showing how to execute them. We introduce Programming by Backprop (PBB): a training regime that enables LLMs to acquire procedural knowledge (i.e., reusable behaviours) from declarative instructions encountered during training. With PBB, instructions in training data provide an opportunity to `program' specific behaviours into model weights. The core principle underpinning PBB is the separation of learning how instructions map to behaviour from internalising new instructions. We devise two distinct PBB curricula that leverage this principle. Through controlled experiments across two domains (algorithmic execution from Python source code and text generation from context-free grammars), we demonstrate the benefit of these curricula over training on a homogeneous data mixture. Crucially, PBB is highly sample efficient, with a single instruction substituting for up to 100 execution examples. Though execution of instructions in training data remains less reliable than when instructions are given in-context, our results demonstrate that procedural knowledge can be noisily `programmed' into LLMs through PBB, with important implications for data curation and safety.
title Programming by Backprop: An Instruction is Worth 100 Examples When Finetuning LLMs
topic Artificial Intelligence
Computation and Language
Machine Learning
url https://arxiv.org/abs/2506.18777