Adhering to explicit length constraints, such as generating text with a precise word count, remains a significant challenge for Large Language Models (LLMs). This study aims at investigating the differences between foundation models and their instruction-tuned counterparts, on length-controlled text generation in English and Italian. We analyze both performance and internal component contributions using Cumulative Weighted Attribution, a metric derived from Direct Logit Attribution. Our findings reveal that instruction-tuning (IT) substantially improves length control, primarily by specializing components in deeper model layers. Specifically, attention heads in later layers of IT models show increasingly positive contributions, particularly in English. In Italian, while attention contributions are more attenuated, final-layer MLPs exhibit a stronger positive role, suggesting a compensatory mechanism. These results indicate that instruction-tuning reconfigures later layers for task adherence, with component-level strategies potentially adapting to linguistic context.
How Instruction-Tuning Imparts Length Control: A Cross-Lingual Mechanistic Analysis / E. Rocchetti, A.F. (LECTURE NOTES IN COMPUTER SCIENCE). - In: Artificial Neural Networks in Pattern Recognition / [a cura di] G.M. Dimitri, S. Aslan, S. Montanelli, M. Ravanelli, C. Subakan, E. Trentin. - [s.l] : Springer Science and Business Media Deutschland GmbH, 2027. - ISBN 9783032390271. - pp. 263-275 (( 12th IAPR TC3 Workshop on Artificial Neural Networks in Pattern Recognition, ANNPR 2026 Milano 2026 [10.1007/978-3-032-39028-8_22].
How Instruction-Tuning Imparts Length Control: A Cross-Lingual Mechanistic Analysis
E. Rocchetti;A. Ferrara
2027
Abstract
Adhering to explicit length constraints, such as generating text with a precise word count, remains a significant challenge for Large Language Models (LLMs). This study aims at investigating the differences between foundation models and their instruction-tuned counterparts, on length-controlled text generation in English and Italian. We analyze both performance and internal component contributions using Cumulative Weighted Attribution, a metric derived from Direct Logit Attribution. Our findings reveal that instruction-tuning (IT) substantially improves length control, primarily by specializing components in deeper model layers. Specifically, attention heads in later layers of IT models show increasingly positive contributions, particularly in English. In Italian, while attention contributions are more attenuated, final-layer MLPs exhibit a stronger positive role, suggesting a compensatory mechanism. These results indicate that instruction-tuning reconfigures later layers for task adherence, with component-level strategies potentially adapting to linguistic context.| File | Dimensione | Formato | |
|---|---|---|---|
|
2509.02075v1.pdf
accesso aperto
Tipologia:
Pre-print (manoscritto inviato all'editore)
Licenza:
Creative commons
Dimensione
458.21 kB
Formato
Adobe PDF
|
458.21 kB | Adobe PDF | Visualizza/Apri |
|
27_How_Instruction_Tuning_Impa.pdf
accesso riservato
Tipologia:
Pre-print (manoscritto inviato all'editore)
Licenza:
Nessuna licenza
Dimensione
403.45 kB
Formato
Adobe PDF
|
403.45 kB | Adobe PDF | Visualizza/Apri Richiedi una copia |
Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.




