Metraipolis › archive › dc_5f2810fc8155
LLMs program using Reusable and Composable Abstract Representations — arXiv:2610.19238
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2610.19238
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-15T14:15:19.274Z
- SHA-256 of the archived text
86a9325b2074526fe644b2e9528f3e22400439e573f1daa7e6c18c434beb4dfa- Stable URL of this page
https://metraipolis.com/documento/dc_5f2810fc8155
How to cite
LLMs program using Reusable and Composable Abstract Representations — arXiv:2610.19238 — arXiv (en), https://arxiv.org/abs/2610.19238 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_5f2810fc8155 (Metraipolis archive dc_5f2810fc8155, sha256 86a9325b2074526fe644b2e9528f3e22400439e573f1daa7e6c18c434beb4dfa)
BibTeX
@misc{dc5f2810fc8155,
title = {LLMs program using Reusable and Composable Abstract Representations — arXiv:2610.19238},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2610.19238},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_5f2810fc8155; sha256 86a9325b2074526fe644b2e9528f3e22400439e573f1daa7e6c18c434beb4dfa},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2610.19238. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
When writing code, the same computation can be expressed in different programming languages and through different implementation strategies. We show that the activations of LLMs capture this shared structure in reusable and composable abstract representations when they generate code. These representations emerge in the middle layers, are reusable across programming languages, and afford the model an impressive amount of generalization ability when generating code under various interventions. Using activation steering, we show that function, programming language, and implementation strategy can be independently manipulated. The independent interventions on language and function can be flexibly composed to control code generation, even in cases when the prompt contains no information about language and function. We additionally find that finetuning on examples of arbitrarily defined functions in one programming language transfers to other languages, consistent with the models reusing abstract features of code generation that are shared across different examples. Finally, to study how such abstract representations come to be, we implement a minimal model of shared, reusable, and composable structure in a synthetic setting, and show that transformers trained on such data learn representations that reuse these parts flexibly across contexts. Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.LG, nuovi lavori del giorno). Categorie arXiv: Machine Learning (cs.LG) ; Programming Languages (cs.PL). Pagina del lavoro: https://arxiv.org/abs/2610.19238 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-15T13:53:35.548Z dalla pagina https://arxiv.org/list/cs.LG/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).