ChatPaper.aiChatPaper

Il Reinforcement Learning ottimizza piccole sottoreti all'interno di grandi modelli linguistici.

Reinforcement Learning Finetunes Small Subnetworks in Large Language Models

May 16, 2025
Autori: Sagnik Mukherjee, Lifan Yuan, Dilek Hakkani-Tur, Hao Peng
cs.AI

Abstract

L'apprendimento per rinforzo (RL) apporta miglioramenti significativi nelle prestazioni dei modelli linguistici di grandi dimensioni (LLMs) su task downstream e nel loro allineamento con i valori umani. Sorprendentemente, tali grandi miglioramenti derivano dall'aggiornamento di una piccola sottorete che comprende solo il 5% al 30% dei parametri, mentre il resto rimane sostanzialmente invariato. Definiamo questo fenomeno come sparsità degli aggiornamenti dei parametri indotta dall'RL. Questo comportamento è stato osservato in tutti i 7 algoritmi di RL ampiamente utilizzati (ad esempio, PPO, GRPO, DPO) e in tutti i 10 LLMs appartenenti a famiglie diverse nei nostri esperimenti. Tale sparsità è intrinseca e si verifica senza l'uso esplicito di regolarizzazioni che promuovono la sparsità o vincoli architetturali. Il fine-tuning della sola sottorete recupera l'accuratezza sul test e, in modo notevole, produce un modello quasi identico a quello ottenuto con un fine-tuning completo. Le sottoreti ottenute da diversi seed casuali, dati di addestramento e persino algoritmi di RL mostrano una sovrapposizione sostanzialmente maggiore rispetto a quanto ci si aspetterebbe casualmente. La nostra analisi suggerisce che questa sparsità non è dovuta all'aggiornamento di un solo sottoinsieme di layer, ma quasi tutte le matrici di parametri ricevono aggiornamenti altrettanto sparsi. Inoltre, gli aggiornamenti per quasi tutte le matrici di parametri sono quasi a rango pieno, suggerendo che l'RL aggiorna un piccolo sottoinsieme di parametri che tuttavia coprono quasi tutti i sottospazi che le matrici di parametri possono rappresentare. Ipotesizziamo che questa sparsità degli aggiornamenti possa essere principalmente attribuita all'addestramento su dati vicini alla distribuzione della policy, mentre tecniche che incoraggiano la policy a rimanere vicina al modello pre-addestrato, come la regolarizzazione KL e il clipping del gradiente, hanno un impatto limitato.
English
Reinforcement learning (RL) yields substantial improvements in large language models (LLMs) downstream task performance and alignment with human values. Surprisingly, such large gains result from updating only a small subnetwork comprising just 5 percent to 30 percent of the parameters, with the rest effectively unchanged. We refer to this phenomenon as parameter update sparsity induced by RL. It is observed across all 7 widely used RL algorithms (e.g., PPO, GRPO, DPO) and all 10 LLMs from different families in our experiments. This sparsity is intrinsic and occurs without any explicit sparsity promoting regularizations or architectural constraints. Finetuning the subnetwork alone recovers the test accuracy, and, remarkably, produces a model nearly identical to the one obtained via full finetuning. The subnetworks from different random seeds, training data, and even RL algorithms show substantially greater overlap than expected by chance. Our analysis suggests that this sparsity is not due to updating only a subset of layers, instead, nearly all parameter matrices receive similarly sparse updates. Moreover, the updates to almost all parameter matrices are nearly full-rank, suggesting RL updates a small subset of parameters that nevertheless span almost the full subspaces that the parameter matrices can represent. We conjecture that the this update sparsity can be primarily attributed to training on data that is near the policy distribution, techniques that encourage the policy to remain close to the pretrained model, such as the KL regularization and gradient clipping, have limited impact.
PDF112May 23, 2025