ChatPaper.aiChatPaper

Impara a Ragionare in Modo Efficiente con la Modellazione Adattiva delle Ricompense Basata sulla Lunghezza

Learn to Reason Efficiently with Adaptive Length-based Reward Shaping

May 21, 2025
Autori: Wei Liu, Ruochen Zhou, Yiyun Deng, Yuzhen Huang, Junteng Liu, Yuntian Deng, Yizhe Zhang, Junxian He
cs.AI

Abstract

I Large Reasoning Models (LRM) hanno dimostrato capacità notevoli nel risolvere problemi complessi attraverso il reinforcement learning (RL), in particolare generando tracce di ragionamento lunghe. Tuttavia, questi output estesi spesso presentano una ridondanza sostanziale, che limita l'efficienza degli LRM. In questo articolo, indaghiamo approcci basati su RL per promuovere l'efficienza del ragionamento. Nello specifico, presentiamo prima un framework unificato che formula vari metodi di ragionamento efficiente attraverso la lente del reward shaping basato sulla lunghezza. Basandoci su questa prospettiva, proponiamo un nuovo metodo di reward shaping basato su una funzione a gradino, chiamato Length-bAsed StEp Reward shaping (LASER), che utilizza una funzione a gradino come ricompensa, controllata da una lunghezza target. LASER supera i metodi precedenti, raggiungendo un equilibrio Pareto-ottimale superiore tra prestazioni ed efficienza. Successivamente, estendiamo ulteriormente LASER basandoci su due intuizioni chiave: (1) Il comportamento di ragionamento del modello evolve durante l'addestramento, richiedendo specifiche di ricompensa che siano anche adattive e dinamiche; (2) Piuttosto che incoraggiare uniformemente catene di pensiero (CoT) più brevi o più lunghe, ipotizziamo che il reward shaping basato sulla lunghezza debba essere consapevole della difficoltà, cioè dovrebbe penalizzare maggiormente le CoT lunghe per query facili. Questo approccio dovrebbe facilitare una combinazione di pensiero veloce e lento, portando a un migliore compromesso complessivo. Il metodo risultante è denominato LASER-D (Dinamico e Consapevole della Difficoltà). Esperimenti su DeepSeek-R1-Distill-Qwen-1.5B, DeepSeek-R1-Distill-Qwen-7B e DeepSeek-R1-Distill-Qwen-32B mostrano che il nostro approccio migliora significativamente sia le prestazioni di ragionamento che l'efficienza della lunghezza della risposta. Ad esempio, LASER-D e la sua variante ottengono un miglioramento di +6.1 su AIME2024 riducendo l'uso di token del 63%. Un'ulteriore analisi rivela che la nostra compressione basata su RL produce modelli di ragionamento più concisi con meno "auto-riflessioni" ridondanti. Le risorse sono disponibili su https://github.com/hkust-nlp/Laser.
English
Large Reasoning Models (LRMs) have shown remarkable capabilities in solving complex problems through reinforcement learning (RL), particularly by generating long reasoning traces. However, these extended outputs often exhibit substantial redundancy, which limits the efficiency of LRMs. In this paper, we investigate RL-based approaches to promote reasoning efficiency. Specifically, we first present a unified framework that formulates various efficient reasoning methods through the lens of length-based reward shaping. Building on this perspective, we propose a novel Length-bAsed StEp Reward shaping method (LASER), which employs a step function as the reward, controlled by a target length. LASER surpasses previous methods, achieving a superior Pareto-optimal balance between performance and efficiency. Next, we further extend LASER based on two key intuitions: (1) The reasoning behavior of the model evolves during training, necessitating reward specifications that are also adaptive and dynamic; (2) Rather than uniformly encouraging shorter or longer chains of thought (CoT), we posit that length-based reward shaping should be difficulty-aware i.e., it should penalize lengthy CoTs more for easy queries. This approach is expected to facilitate a combination of fast and slow thinking, leading to a better overall tradeoff. The resulting method is termed LASER-D (Dynamic and Difficulty-aware). Experiments on DeepSeek-R1-Distill-Qwen-1.5B, DeepSeek-R1-Distill-Qwen-7B, and DeepSeek-R1-Distill-Qwen-32B show that our approach significantly enhances both reasoning performance and response length efficiency. For instance, LASER-D and its variant achieve a +6.1 improvement on AIME2024 while reducing token usage by 63%. Further analysis reveals our RL-based compression produces more concise reasoning patterns with less redundant "self-reflections". Resources are at https://github.com/hkust-nlp/Laser.
PDF343May 22, 2025