![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/imitation_learning_backtracking_e4de0b5810.png?w=3840&q=75)
Abstract
In many domains, autoregressive models can attain high likelihood on the task of predicting the next observation. However, this maximum-likelihood (MLE) objective does not necessarily match a downstream use-case of autoregressively generating high-quality sequences. The MLE objective weights sequences proportionally to their frequency under the data distribution, with no guidance for the model's behaviour out of distribution (OOD): leading to compounding error during autoregressive generation. In order to address this compounding error problem, we formulate sequence generation as an imitation learning (IL) problem. This allows us to minimize a variety of divergences between the distribution of sequences generated by an autoregressive model and sequences from a dataset, including divergences with weight on OOD generated sequences. The IL framework also allows us to incorporate backtracking by introducing a backspace action into the generation process. This further mitigates the compounding error problem by allowing the model to revert a sampled token if it takes the sequence OOD. Our resulting method, SequenceMatch, can be implemented without adversarial training or major architectural changes. We identify the SequenceMatch-χ2 divergence as a more suitable training objective for autoregressive models which are used for generation. We show that empirically, SequenceMatch training leads to improvements over MLE on text generation with language models.
![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/thumbnail_man_alone_in_the_stands_e0fe9d0ef4.png?w=256&q=75)
![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/thumbnail_pap_pitti_bananas_dressed_as_people_sitting_at_their_desks_in_a_1c3ea47e_a8eb_432d_bcd5_03505b975c6f_081f3a85ab.png?w=256&q=75)
![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/thumbnail_finetuning_modernbert_argilla_828e0d3969.png?w=384&q=75)
![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/thumbnail_finetuning_modernbert_philschmidt_0d32e4f3eb.png?w=384&q=75)
![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/thumbnail_modernbert_anserai_a65c02643c.png?w=384&q=75)
![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/thumbnail_ai_bubble_thumbnail_8909f3f6f8.png?w=384&q=75)
![](https://pitti-backend-assets.ams3.digitaloceanspaces.com/thumbnail_LMSYS_arena_cf9d4a89a6.png?w=384&q=75)