{"id":{"repo_id":"catalunya","oai_identifier":"oai:openaccess.uoc.edu:10609/152788"},"canonical_url":"https://search.ndltd.org/etd/catalunya/oai:openaccess.uoc.edu:10609/152788","repository":{"repo_id":"catalunya","name":"Universitat Oberta de Catalunya","base_url":"https://openaccess.uoc.edu/server/oai/request"},"display":{"title":"Explainability and reasoning in Large Language Models: a comparative analysis between base and fine-tuned models with RL","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.","abstract_html":"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.","abstract_has_math":false,"creators":["Pérez Lázaro, Pablo"],"institution":"Universitat Oberta de Catalunya (UOC)","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2025,"date_issued":"2025-06-22","date_published":"2025-06-22","updated_at":"2026-11-26T16:24:14Z","subjects":["explainability","LLM","reinforcement learning","Mathematics -- Data processing -- TFM"],"languages":["eng"],"rights":["info:eu-repo/semantics/openAccess","CC BY-NC-ND"],"rights_urls":["https://creativecommons.org/licenses/by-nc-nd/4.0/"],"identifier_entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["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"],"render_values":[{"text":"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","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10609/152788","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10609/152788","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","access_status":"open","embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Acatalunya%3Aoai%3Aopenaccess.uoc.edu%3A10609%2F152788","prefix":"oai_dc"},"source_record":{"url":"https://openaccess.uoc.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aopenaccess.uoc.edu%3A10609%2F152788","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.tutor","label":"Dc Contributor Tutor","values":["Blanco-Justicia, Alberto","del Hoyo Alonso, Rafael"]},{"key":"dc:creator","label":"Author","values":["Pérez Lázaro, Pablo"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:coverage.spatial","label":"Dc Coverage Spatial","values":["Zaragoza, ESP"]},{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-07-01T13:41:31Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-07-01T13:41:31Z"]},{"key":"dc:date.issued","label":"Date","values":["2025-06-22"]},{"key":"dc:publisher","label":"Institution","values":["Universitat Oberta de Catalunya (UOC)"]},{"key":"dc:type.version","label":"Dc Type Version","values":["info:eu-repo/semantics/masterThesis"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["explainability","LLM","reinforcement learning"]},{"key":"dc:subject.lcsh","label":"Dc Subject Lcsh","values":["Mathematics -- Data processing -- TFM"]},{"key":"dc:subject.lemac","label":"Dc Subject Lemac","values":["Matemàtica -- Informàtica -- TFM"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["CC BY-NC-ND"]},{"key":"dc:rights.accessrights","label":"Access Rights","values":["info:eu-repo/semantics/openAccess"]},{"key":"dc:rights.uri","label":"Rights URI","values":["https://creativecommons.org/licenses/by-nc-nd/4.0/"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["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"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10609/152788"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:audience","label":"Dc Audience","values":["Estudis de Màster","Estudios de Máster","Master's degrees"]},{"key":"dc:description.abstract","label":"Abstract","values":["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."]},{"key":"dc:title","label":"Title","values":["Explainability and reasoning in Large Language Models: a comparative analysis between base and fine-tuned models with RL"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:audience":["Estudis de Màster","Estudios de Máster","Master's degrees"],"dc:contributor.tutor":["Blanco-Justicia, Alberto","del Hoyo Alonso, Rafael"],"dc:coverage.spatial":["Zaragoza, ESP"],"dc:creator":["Pérez Lázaro, Pablo"],"dc:date.accessioned":["2025-07-01T13:41:31Z"],"dc:date.available":["2025-07-01T13:41:31Z"],"dc:date.issued":["2025-06-22"],"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."],"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"],"dc:identifier.uri":["https://hdl.handle.net/10609/152788"],"dc:language.iso":["eng"],"dc:publisher":["Universitat Oberta de Catalunya (UOC)"],"dc:rights":["CC BY-NC-ND"],"dc:rights.accessrights":["info:eu-repo/semantics/openAccess"],"dc:rights.uri":["https://creativecommons.org/licenses/by-nc-nd/4.0/"],"dc:subject":["explainability","LLM","reinforcement learning"],"dc:subject.lcsh":["Mathematics -- Data processing -- TFM"],"dc:subject.lemac":["Matemàtica -- Informàtica -- TFM"],"dc:title":["Explainability and reasoning in Large Language Models: a comparative analysis between base and fine-tuned models with RL"],"dc:type.version":["info:eu-repo/semantics/masterThesis"],"others:access_status":["open.access"]},"updated_at":"2026-11-26T16:24:14Z"}