Back to search

Universitat Oberta de Catalunya (UOC)

Explainability and reasoning in Large Language Models: a comparative analysis between base and fine-tuned models with RL

Abstract

dc:description.abstract

Reinforcement learning (RL)-based fine-tuning is widely credited with enhancing large language models’ (LLMs) reasoning abilities and boosting benchmark performance. However, how this tuning alters a model’s internal computation remains poorly understood. In this work, RL finetuned models are found to explore more, as reflected in higher mid layer entropy and forward KL divergence, but converge sharply to low final-layer entropy, indicating a late yet decisive commitment to the answer. Specifically, the base Qwen-2.5-14B model, its GRPO fine-tuned variant, and the distilled DeepSeek-R1 model are compared on the mathematical reasoning dataset GSM8K. Further analysis shows that when both models arrive at the correct answer, there is no significant difference in their layer-wise log-probability trajectories. Finally, using Integrated Gradients, it is shown that the fine-tuned models assign greater attribution weight to intermediate reasoning steps. Taken together, these metrics reveal that RL tuning reshapes confidence allocation encouraging longer exploration and later commitment. More broadly, this study illustrates how interpretability techniques can uncover functional shifts in modern LLMs.

Degree

thesis:*
Grantor dc:publisher
Universitat Oberta de Catalunya (UOC)
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Pérez Lázaro, Pablo

Subjects

dc:subject × 4

Rights

dc:rights.accessrights
Statement dc:rights.accessrights
  • info:eu-repo/semantics/openAccess
  • CC BY-NC-ND
Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Citation
Pérez Lázaro, P. [Pablo]. (2025). Explainability and reasoning in Large Language Models: a comparative analysis between base and fine-tuned models with RL. Universitat Oberta de Catalunya (UOC). https://hdl.handle.net/10609/152788

Chain of custody

source
Harvested from
Universitat Oberta de Catalunya
Base URL
openaccess.uoc.edu/server/oai/request
Last updated
2026-11-26
Source record
OAI-PMH GetRecord
citation

Pérez Lázaro, Pablo. Explainability and reasoning in Large Language Models: a comparative analysis between base and fine-tuned models with RL. Universitat Oberta de Catalunya (UOC), 2025. https://hdl.handle.net/10609/152788