Abstract
Semi-structured explanation depicts the implicit process of a reasoner with an explicit representation. This explanation highlights how available information in a specific query is utilised and supplemented with information a reasoner produces from its internal weights towards generating an answer. Despite the recent improvements in generative capabilities of language models, producing structured explanations to verify a model’s true reasoning capabilities remains a challenge. This issue is particularly pronounced for not-so-large LMs (e.g., FLAN-T5-XXL). In this work, we first underscore the limitations of supervised fine-tuning (SFT) in tackling this challenge, and then introduce a carefully crafted reward engineering method in reinforcement learning (RL) to better address this problem. We investigate multiple reward aggregation methods and provide a detailed discussion which sheds light on the promising potential of RL for future research. Our proposed method on two semi-structured explanation generation benchmarks (ExplaGraph and COPA-SSE) achieves new state-of-the-art results.
Introduction
While Large Language Models (LLMs) have achieved remarkable performance in various tasks, their reasoning processes often remain opaque "black boxes." Semi-structured explanations offer a solution by representing reasoning as a graph of "triples" (e.g., [Urban Areas, Built Over, Natural Habitats]). This format explicitly maps how a model utilizes input information and internal knowledge. However, generating these structured outputs is difficult for smaller models and even poses challenges for giants like GPT-4, which often struggle with strict formatting constraints and structural integrity requirements, such as ensuring a Connected Directed Acyclic Graph (DAG).
Methodology: Reward Engineering
The researchers propose a two-stage pipeline to overcome the limitations of standard Supervised Fine-Tuning (SFT). While SFT often results in overly simplistic or structurally flawed explanations that merely imitate training data, the addition of Reinforcement Learning (RL) allows for more expressive and logically sound reasoning.
- Supervised Fine-Tuning (SFT): A base model (FLAN-T5) is fine-tuned on high-quality explanation data to establish a baseline capability.
- Reinforcement Learning with Reward Engineering: Using Proximal Policy Optimization (PPO), the model is optimized against a composite reward function consisting of:
- Reward Model ($R_\phi$): A LLaMA-7B model trained on human preference data to distinguish "good" from "bad" explanations.
- Metric Reward ($R_m$): A hard-coded reward based on graph-matching. The study highlights Graph-BERTScore as the most effective metric because it captures semantic alignment rather than literal word overlap.
As shown in Figure 1, RL-tuned models generate more comprehensive graphs that include "external" concepts—ideas not explicitly in the prompt but necessary for a complete logical chain—whereas SFT models often stick too closely to the input text.
Key Insights
Semantics Over Syntax
Traditional n-gram metrics like BLEU or ROUGE are often inadequate for evaluating graph-based explanations. Since graphs are composed of discrete triples, a model might capture the correct logical relationship using synonymous terms. Graph-BERTScore addresses this by measuring semantic similarity, providing a smoother and more useful reward signal for the RL process.
Avoiding Reward Hacking
A critical component of the RL process is the KL-divergence penalty. Without a sufficient penalty, models may engage in "reward hacking," where they learn to generate repetitive or nonsensical triples that technically satisfy the reward function's criteria (like length or keyword matching) without providing meaningful reasoning.
Results and Discussion
The proposed FLAN-T5-XXL + RL method achieved new state-of-the-art (SOTA) results on the ExplaGraph and COPA-SSE benchmarks. Notably, the 11B-parameter FLAN-T5 model with RL significantly outperformed GPT-4 in both structural and semantic correctness on the ExplaGraph task, proving that specialized RL can help smaller models punch above their weight class.
Human evaluation confirmed these findings, with evaluators consistently ranking SFT+RL outputs higher than SFT-only outputs. The RL-tuned models were praised for producing more detailed and logically complete reasoning chains that better connected the argument to the belief.
Conclusion
This work demonstrates that carefully engineered rewards in an RL framework can significantly enhance the ability of language models to generate semi-structured explanations. By prioritizing semantic similarity and expressivity over simple imitation, the proposed method allows moderately sized models to achieve performance levels exceeding much larger models in specialized reasoning tasks. Future work will explore more computationally efficient "offline" alignment methods and harder structural constraints during decoding.
Reference: Han, J., Buntine, W., & Shareghi, E. (2024). Reward Engineering for Generating Semi-structured Explanation. Findings of the Association for Computational Linguistics: EACL 2024.
Summary updated