Large Language Models and Algorithm Execution: Application to an Arithmetic Function
Farah Ben Slama, Frédéric Armetta
TL;DR
The paper addresses the difficulty of enabling large language models to autonomously execute algorithms. It introduces LLM-DAL, a decompositional learning framework that trains LLMs via a progressive subtask curriculum and Chain-of-Thought guidance to perform complex inferences such as multiplication. Through synthetic corpora and incremental fine-tuning on a 3B-instruct Llama model with a long context, the approach yields a substantial accuracy boost on the global arithmetic task (from 13.5% to 42.1%) and demonstrates strong transfer to intermediate steps, thereby improving generalization. The work provides a practical path toward internalizing algorithmic reasoning in LLMs with efficient training and recursive prompting, and proposes extension to other algorithms and unsupervised reasoning extraction.
Abstract
Large Language Models (LLMs) have recently developed new advanced functionalities. Their effectiveness relies on statistical learning and generalization capabilities. However, they face limitations in internalizing the data they process and struggle, for instance, to autonomously execute algorithms. In this paper, we investigate the possibility of extending these models' capabilities to algorithm execution through specialized supervised training focused on reasoning decomposition. We introduce a training model called LLM-DAL (Large Language Model - Decompositional Algorithmic Learning), through which we demonstrate that LLMs' ability to perform complex algorithmic inferences and generalize can be significantly improved when the training method is properly designed to guide the model in its learning process.
