ChatPaper.aiChatPaper

Refletir, Reiterar, Recompensar: Melhorando LLMs por Meio de Aprendizado por Reforço

Reflect, Retry, Reward: Self-Improving LLMs via Reinforcement Learning

May 30, 2025
Autores: Shelly Bensal, Umar Jamil, Christopher Bryant, Melisa Russak, Kiran Kamble, Dmytro Mozolevskyi, Muayad Ali, Waseem AlShikh
cs.AI

Resumo

Exploramos um método para melhorar o desempenho de modelos de linguagem de grande escala por meio de autorreflexão e aprendizado por reforço. Ao incentivar o modelo a gerar autorreflexões melhores quando responde incorretamente, demonstramos que a capacidade do modelo de resolver tarefas complexas e verificáveis pode ser aprimorada, mesmo quando a geração de dados sintéticos é inviável e apenas feedback binário está disponível. Nosso framework opera em duas etapas: primeiro, ao falhar em uma tarefa específica, o modelo gera um comentário autorreflexivo analisando sua tentativa anterior; segundo, o modelo recebe outra chance de realizar a tarefa com a autorreflexão em contexto. Se a tentativa subsequente for bem-sucedida, os tokens gerados durante a fase de autorreflexão são recompensados. Nossos resultados experimentais mostram ganhos substanciais de desempenho em uma variedade de arquiteturas de modelos, com melhorias de até 34,7% na escrita de equações matemáticas e 18,1% na chamada de funções. Notavelmente, modelos menores e ajustados (1,5 bilhão a 7 bilhões de parâmetros) superam modelos da mesma família que são 10 vezes maiores. Nosso novo paradigma é, portanto, um caminho promissor para modelos de linguagem mais úteis e confiáveis que podem se autoaperfeiçoar em tarefas desafiadoras com feedback externo limitado.
English
We explore a method for improving the performance of large language models through self-reflection and reinforcement learning. By incentivizing the model to generate better self-reflections when it answers incorrectly, we demonstrate that a model's ability to solve complex, verifiable tasks can be enhanced even when generating synthetic data is infeasible and only binary feedback is available. Our framework operates in two stages: first, upon failing a given task, the model generates a self-reflective commentary analyzing its previous attempt; second, the model is given another attempt at the task with the self-reflection in context. If the subsequent attempt succeeds, the tokens generated during the self-reflection phase are rewarded. Our experimental results show substantial performance gains across a variety of model architectures, as high as 34.7% improvement at math equation writing and 18.1% improvement at function calling. Notably, smaller fine-tuned models (1.5 billion to 7 billion parameters) outperform models in the same family that are 10 times larger. Our novel paradigm is thus an exciting pathway to more useful and reliable language models that can self-improve on challenging tasks with limited external feedback.
PDF1945June 4, 2025