ChatPaper.aiChatPaper

Da f(x) e g(x) a f(g(x)): i modelli linguistici di grandi dimensioni apprendono nuove abilità nell'apprendimento per rinforzo componendo quelle esistenti

From f(x) and g(x) to f(g(x)): LLMs Learn New Skills in RL by Composing Old Ones

September 29, 2025
Autori: Lifan Yuan, Weize Chen, Yuchen Zhang, Ganqu Cui, Hanbin Wang, Ziming You, Ning Ding, Zhiyuan Liu, Maosong Sun, Hao Peng
cs.AI

Abstract

L'RL insegna alle LLM abilità veramente nuove, o si limita ad attivare quelle esistenti? Questa domanda è al centro dei dibattiti in corso sul ruolo dell'RL nel post-addestramento delle LLM. Da un lato, si possono ottenere risultati empirici significativi con l'RL anche senza un precedente fine-tuning supervisionato; dall'altro, i critici sostengono che l'RL contribuisca poco oltre a riponderare le strategie di ragionamento esistenti. Questo lavoro fornisce prove concrete che le LLM possono acquisire abilità veramente nuove durante l'RL componendo quelle esistenti, riflettendo uno dei meccanismi centrali con cui gli esseri umani acquisiscono nuove abilità cognitive. Per mitigare la contaminazione dei dati e altri fattori confondenti, e per consentire un controllo preciso sulla complessità del compito, sviluppiamo un framework sintetico per la nostra indagine. Nello specifico, definiamo un'abilità come la capacità di inferire l'output di una funzione di trasformazione di stringhe f(x) dato x. Quando una LLM ha già appreso f e g prima dell'RL, i nostri esperimenti rivelano che l'RL le consente di apprendere composizioni non viste di esse h(x)=g(f(x)). Inoltre, questa capacità compositiva si generalizza a problemi più difficili come composizioni di >2 funzioni non viste durante l'addestramento RL. Sorprendentemente, i nostri esperimenti mostrano che l'abilità compositiva acquisita su un compito sorgente si trasferisce a un diverso compito target. Questo trasferimento avviene anche senza un addestramento compositivo sul target, richiedendo solo la conoscenza preliminare delle abilità atomiche del target. La nostra analisi qualitativa mostra che l'RL cambia fondamentalmente i comportamenti di ragionamento dei modelli. Al contrario, l'addestramento next-token con gli stessi dati non produce nessuno di questi risultati. I nostri esperimenti sistematici forniscono nuove intuizioni sull'apprendimento delle LLM, suggerendo il valore di costruire prima modelli di base con abilità di base, per poi utilizzare l'RL per incentivare abilità avanzate e generalizzabili per problemi complessi.
English
Does RL teach LLMs genuinely new skills, or does it merely activate existing ones? This question lies at the core of ongoing debates about the role of RL in LLM post-training. On one side, strong empirical results can be achieved with RL even without preceding supervised finetuning; on the other, critics argue that RL contributes little beyond reweighting existing reasoning strategies. This work provides concrete evidence that LLMs can acquire genuinely new skills during RL by composing existing ones, mirroring one of the central mechanisms by which humans acquire new cognitive skills. To mitigate data contamination and other confounding factors, and to allow precise control over task complexity, we develop a synthetic framework for our investigation. Specifically, we define a skill as the ability to infer the output of a string transformation function f(x) given x. When an LLM has already learned f and g prior to RL, our experiments reveal that RL enables it to learn unseen compositions of them h(x)=g(f(x)). Further, this compositional ability generalizes to more difficult problems such as compositions of >2 functions unseen during RL training. Surprisingly, our experiments show that compositional skill acquired on a source task transfers to a different target task. This transfer happens even without compositional training on the target, requiring only prior knowledge of the target's atomic skills. Our qualitative analysis shows that RL fundamentally changes the reasoning behaviors of the models. In contrast, next-token training with the same data yields none of these findings. Our systematic experiments provide fresh insights into LLM learning, suggesting the value of first building base models with basic skills, then using RL to incentivize advanced, generalizable skills for complex problems.
PDF172September 30, 2025