Source-linked AI summary
Self-AMPLIFY: Improving Small Language Models with Self Post Hoc Explanations
Milan Bhan, Jean-Noel Vittaut, Nicolas Chesneau, Marie-Jeanne Lesot
TL;DR
Rationale-enhanced ICL can improve reasoning, but producing rationales typically requires human annotation or auxiliary models. Self-AMPLIFY instead uses post hoc explanations from the target SLM to select samples, generate rationales, and build an ICL prompt, achieving performance gains over competing prompting methods across the considered tasks.
Problem
Generating high-quality rationales for rationale-enhanced ICL requires human annotation or auxiliary models.
Source: §1 · p. 1Method
Self-AMPLIFY applies post hoc explanation methods directly to an SLM to select samples, generate rationales, and construct an ICL prompt.
Source: §1 · p. 2, §3.3 · p. 5Results
Takeaways & Limitations
Post hoc explanations can be applied directly to SLMs to generate rationales for self-improvement without human annotations or auxiliary models.
Source: §1 · p. 2, §6 · p. 9The study evaluates Self-AMPLIFY on limited model and dataset sets, and does not assess the quality of generated rationales.
Source: §7 · p. 9
Abstract
from arXiv · showhide
Incorporating natural language rationales in the prompt and In-Context Learning (ICL) have led to a significant improvement of Large Language Models (LLMs) performance. However, generating high-quality rationales require human-annotation or the use of auxiliary proxy models. In this work, we propose Self-AMPLIFY to automatically generate rationales from post hoc explanation methods applied to Small Language Models (SLMs) to improve their own performance. Self-AMPLIFY is a 3-step method that targets samples, generates rationales and builds a final prompt to leverage ICL. Self-AMPLIFY performance is evaluated on four SLMs and five datasets requiring strong reasoning abilities. Self-AMPLIFY achieves good results against competitors, leading to strong accuracy improvement. Self-AMPLIFY is the first method to apply post hoc explanation methods to autoregressive language models to generate rationales to improve their own performance in a fully automated manner.
1 Introduction
Self-AMPLIFY addresses the cost of generating rationales for reasoning-focused ICL by applying post hoc explanations directly to SLMs. It reports performance gains over IO, Auto-CoT, and AMPLIFY across a wide range of datasets.
1 Introduction
- Rationales help language models generate intermediate reasoning steps before answers, improving performance on complex reasoning tasks.Prior automatic approaches either use proxy models or auxiliary components to construct rationale-enriched prompts.Source: §1 · p. 1
- SLMs make post hoc attribution methods more affordable because they are smaller while retaining substantial benchmark accuracy.The paper highlights models with fewer than 14 billion parameters and methods such as KernelSHAP and DeepLift.Source: §1 · pp. 1–2
- Self-AMPLIFY applies post hoc explanations directly to an SLM, avoiding human annotations and auxiliary models when generating rationales.The framework targets instances using the SLM’s predictions and uses its explanations as a self-improving signal.Source: §1 · p. 2
- Self-AMPLIFY generates the correct Snarks answer, whereas IO, Auto-CoT, and AMPLIFY fail on the illustrated example.The example shows important tokens generated as a rationale before the correct answer.Source: Figure 1 · p. 1, §1 · p. 2
- Self-AMPLIFY improves performance across a wide range of datasets compared with IO, Auto-CoT, and AMPLIFY.The reported comparison supports directly applying varied post hoc explanation methods to SLMs for automatic rationale generation.Source: §1 · p. 2
2 Background and Related Work
The background reviews post hoc attribution and free-text explanations, then contrasts human- and automatically generated rationales for ICL. Self-AMPLIFY is motivated by the cost of annotations and the dependence of prior automatic methods on auxiliary models.
2.1 Post Hoc Explanations Background
- Post hoc attribution methods estimate input-feature importance through perturbations or gradients, but their computational cost has limited application to autoregressive LLMs.KernelSHAP and LIME perturb inputs, whereas Integrated Gradients and DeepLift use backpropagated gradients.Source: §2.1 · p. 2
- Free-text self-rationales ask a language model to explain its prediction after producing an answer, providing a higher-level alternative to numerical attribution vectors.They are distinct from attribution explanations in abstraction level.Source: §2.1 · p. 2
2.2 Related Work
- Self-AMPLIFY is presented as a three-step approach that selects samples, generates rationales with post hoc explanations, and builds a rationale-enriched ICL prompt.Its overview includes success or error selection and KernelSHAP, DeepLift, Ph-CoT, or Self_topk rationale generation.Source: §2.2 · p. 2, Figure 2 · p. 3
- Human-annotated Chain-of-Thought uses the (x, r, y) prompt format and can improve reasoning performance, but annotation is costly and gains often require sufficiently large LLMs.A predict-then-explain (x, y, r) design is also reported to improve performance relative to (x, r, y).Source: §2.2 · p. 3
- Auto-CoT generates rationales automatically but depends on an auxiliary Sentence-Transformer and may include incorrect demonstrations because it does not use ground-truth answers for final prompt construction.Its clustering step produces one rationale per input cluster.Source: §2.2 · p. 3
- AMPLIFY generates attribution-based rationales with an auxiliary fine-tuned proxy model, relying on that model for both sample selection and rationale generation.It has been tested on GPT-3 and GPT-3.5 and does not incorporate free-text rationales.Source: §2.2 · p. 3
3 Proposed approach: Self-AMPLIFY
Self-AMPLIFY uses an SLM to select demonstrations, generate post hoc rationales, and construct the final ICL prompt. Its design replaces proxy-model selection and explanation with signals derived directly from the target SLM.
3 Proposed approach: Self-AMPLIFY
- Self-AMPLIFY directly generates rationales from the SLM, eliminating the auxiliary fine-tuned proxy model used by AMPLIFY.This makes the rationale-enrichment process fully automated for SLMs.Source: §3 · p. 3
3.4 Prompt Design for SLMs
- The final prompt begins with an instruction and contains demonstrations formatted as (x_i, r_i, y_i), which are then used for test-set ICL prediction.The rationale is placed between each input and its answer.Source: §3.1 · p. 4, §3.4 · p. 5
3.2 n-shot Sample Selection
- The method selects n-shot examples using either success or error strategies based solely on the SLM’s predictions.Success selects correctly predicted instances, while error selects incorrectly predicted instances; other cases are discarded.Source: §3.2 · p. 4
- Success selection assumes more certain predictions yield more relevant explanations, whereas error selection aims to reduce similar misclassifications.The paper evaluates the effect of selection strategy on performance.Source: §3.2 · p. 4
3.3 Rationale Generation
- Post hoc attribution methods convert token importance scores into rationales by selecting the highest-scoring input tokens.DeepLift and KernelSHAP explain the output associated with the ground-truth answer, while attribution is restricted to tokens in the input text.Source: §3.3 · pp. 4–5
- Self_topk prompts the SLM for important tokens, while Ph-CoT prompts it for a p-step free-text explanation conditioned on the ground-truth answer.These provide predict-then-explain rationale variants beyond attribution methods.Source: §3.3 · p. 5
4 Experimental Settings
Self-AMPLIFY is evaluated across five reasoning datasets and SLMs up to 7 billion parameters, using multiple post hoc rationale generators and comparisons with IO, Auto-CoT, and AMPLIFY. Across the reported experiments, it generally improves accuracy over competing prompting methods, while gains weaken substantially on the tiny Gemma-2B model.
4 Experimental Settings
- The study evaluates five reasoning benchmarks using Mistral-7B, Zephyr-7B, Gemma-7B, and the smaller Gemma-2B.The benchmarks cover commonsense reasoning, sarcasm detection, and causal judgment.Source: §4 · p. 5, §4.1 · pp. 5–6
4.2 Results.
- Self-AMPLIFY modalities generally outperform IO and often Auto-CoT, while also exceeding AMPLIFY on Mistral-7B without an auxiliary fine-tuned proxy model.Ph-CoT produces the best average Self-AMPLIFY results in the global comparison.Source: §4.2 · pp. 6–7
- Success-based selection performs about as well as error-based selection on average, but the results do not establish a universally better strategy.Success selection enables adding initially correctly classified examples, unlike the original AMPLIFY framework.Source: §4.2 · p. 7
- Ph-CoT gives the best average results, while random topk rationales perform worst and other topk variants remain similar on average.The ablation uses 10 Self-AMPLIFY runs on Mistral-7B, and the results indicate that rationale content affects performance.Source: §4.2 · p. 7, Table 2 · p. 7
- DeepLift requires accessible model parameters, while Self_topk is cheaper but offers less control over the generated explanation format.The recommended topk setting depends on parameter access and computational cost.Source: §4.2 · p. 7
- On Gemma-7B, every Self-AMPLIFY version outperforms IO and AMPLIFY on average, whereas enhancement methods barely match IO on Gemma-2B.The authors link the contrast to Gemma-2B’s smaller size and less advanced reasoning capabilities.Source: §4.2 · p. 7, Figure 4 · p. 8
5 Discussion
Self-AMPLIFY is presented as flexible across post hoc explanation methods, but the preferred explainer depends on whether accuracy or rationale faithfulness is the priority. The discussion also identifies faithfulness evaluation and richer rationale types as open directions.
5 Discussion
- Self-AMPLIFY can incorporate other post hoc attribution methods, including Integrated Gradients and LIME.The framework is described as versatile with respect to the explainer used.Source: §5 · p. 8
- Ph-CoT is recommended for highest accuracy, whereas attribution explainers are preferred when rationale faithfulness must be evaluated.Faithfulness is easier to assess for topk rationales using stability and self-consistency metrics than for free-text rationales.Source: §5 · p. 8
- Future work includes counterfactual rationales, deeper analysis of task complexity and selection strategy, and direct assessment of generated-rationale faithfulness.One proposed comparison is between ICL-generated rationales and ground-truth post hoc explanations.Source: §5 · p. 8
6 Conclusion
Self-AMPLIFY automatically enriches ICL prompts for SLMs with self-generated rationales, without human annotations or auxiliary models, and improves performance over competitors on the considered tasks.
- Self-AMPLIFY generates rationales to enrich ICL prompts using only the SLM itself, without human-annotated rationales or auxiliary models.Source: §6 · p. 8
- Self-AMPLIFY implements two selection strategies and four post hoc explanation methods, making the framework versatile and flexible.Source: §6 · p. 8
- Self-AMPLIFY achieves performance gains over its competitors on the considered tasks for 7-billion-parameter models.Source: §6 · p. 9
7 Limitations
The study’s limitations concern evaluation scope, unassessed rationale quality, and the computational cost of some explanation methods.
- Evaluation covered five datasets and three language models, leaving conclusions less generalizable to other models and larger SLMs.The authors suggest testing slightly bigger SLMs with better reasoning abilities.Source: §7 · p. 9
- Generated rationale quality was not assessed during either prompt enrichment or test-set prediction, so rationales should be interpreted cautiously.The paper notes that low-quality rationales can still improve performance.Source: §7 · p. 9
- KernelSHAP and DeepLift are computationally costly, although reducing KernelSHAP’s sample count can make their use more affordable.Source: §7 · p. 9
Ethics Statement
Because SLM training data can be biased, Self-AMPLIFY may generate harmful text during inference and should be used cautiously.
- Biased SLM training data creates a risk of harmful text during inference, requiring users to analyze generated texts cautiously.The statement also notes that SLMs consume energy and may emit greenhouse gases.Source: Ethics Statement · p. 9
A.1 Scientific libraries
The work uses several open-source software libraries for modeling, machine learning, and explanation implementation.
- The implementation uses PyTorch, HuggingFace Transformers, scikit-learn, and Captum.Source: §A.1 · p. 11
A.2 SLMs implementation Details
The appendix specifies the SLMs, experimental protocols, prompting formats, post hoc attribution methods, and analyses used to evaluate Self-AMPLIFY against competing rationale-generation approaches.
A.2 SLMs implementation Details
- The experiments used Hugging Face implementations of Mistral, Zephyr, and Gemma instruction-tuned backbones, with model-specific instruction tokens.The listed backbones are Mistral-7B-Instruct-v0.2, zephyr-7b-beta, gemma-1.1-7b-it, and gemma-1.1-2b-it.Source: §A.2 · p. 11
A.3 Experimental protocol details
- Experimental runs and test-set sizes varied by analysis because evaluating many datasets and texts was computationally expensive.The protocol specifies fixed test sizes for Snarks and Causal Judgment, random sampling for ARC Challenge, CQA, and SIQA, and additional ablation runs.Source: §A.3 · p. 12, Table 4 · p. 12
A.4 Prompting format
- Self-AMPLIFY prompts generate either topk important keywords or concise p-step explanations before constructing an n-sample ICL prompt.The final prompt asks the model to use generated keywords or rationales as hints for producing the answer.Source: §A.4 · pp. 12–13
A.5 Post hoc attribution explanation methods
- The framework supports gradient, perturbation, Shapley-based, and custom post hoc attribution methods, with attribution computed relative to the SLM embedding layer.DeepLift and KernelShap use Captum defaults, while the baseline masks prompt components so attribution focuses on the initial prompt content.Source: §A.5 · p. 13
A.6 Impact of topk explanation length and context size
- Accuracy was generally higher for Self-AMPLIFY than IO across topk explanation lengths and most tested context sizes.The topk explanation length did not appear to affect accuracy, while most context sizes outperformed IO on Causal Judgment.Source: §A.6 · p. 13, Figure 5 · p. 14, Figure 6 · p. 14
A.7 Self-AMPLIFY and competitors generated text example
- The appendix includes generated-answer examples across ARC Challenge, Causal Judgment, Commonsense QA, Snarks, and SIQA for different rationale generators.The figures show examples conditioned on prompts built from alternative rationale-generation methods.Source: §A.7 · p. 13, Figure 7 · p. 16, Figure 8 · p. 16
- Self-AMPLIFY and competing methods were evaluated on five test sets using Mistral-7B, Zephyr-7B, Gemma-7B, and Gemma-2B.Table 6 compares two Self-AMPLIFY versions with IO, Auto-CoT, and AMPLIFY; the best results are highlighted and paired-test significance is reported.Source: Table 6 · p. 15