Source-linked AI summary
Avoiding Inference Heuristics in Few-shot Prompt-based Finetuning
Prasetya Ajie Utama, Nafise Sadat Moosavi, Victor Sanh, Iryna Gurevych
TL;DR
Prompt-based finetuning performs well in low-data sentence-pair classification but can replace useful pretrained linguistic behavior with lexical-overlap heuristics. The paper studies this degradation across three tasks and shows that preserving pretrained weights through regularization mitigates it while maintaining strong in-distribution performance.
Problem
Standard evaluations can hide lexical-overlap heuristics in finetuned prompt-based models, despite greater robustness in zero-shot evaluation.
Source: §1 · p. 1Method
The paper evaluates prompt-based finetuning across three sentence-pair datasets and applies weight-preserving regularization to limit updates from pretrained values.
Source: §1 · p. 1, §3 · pp. 3–4Results
Takeaways & Limitations
Abstract
from arXiv · showhide
Recent prompt-based approaches allow pretrained language models to achieve strong performances on few-shot finetuning by reformulating downstream tasks as a language modeling problem. In this work, we demonstrate that, despite its advantages on low data regimes, finetuned prompt-based models for sentence pair classification tasks still suffer from a common pitfall of adopting inference heuristics based on lexical overlap, e.g., models incorrectly assuming a sentence pair is of the same meaning because they consist of the same set of words. Interestingly, we find that this particular inference heuristic is significantly less present in the zero-shot evaluation of the prompt-based model, indicating how finetuning can be destructive to useful knowledge learned during the pretraining. We then show that adding a regularization that preserves pretraining weights is effective in mitigating this destructive tendency of few-shot finetuning. Our evaluation on three datasets demonstrates promising improvements on the three corresponding challenge datasets used to diagnose the inference heuristics.
1 Introduction
Prompt-based finetuning adapts pretrained language models effectively with few labels, but standard evaluations can conceal reliance on lexical-overlap heuristics. This work tests whether finetuning preserves pretrained linguistic knowledge and finds that regularization can mitigate destructive heuristic adoption.
1 Introduction
- Prompt-based finetuning reformulates downstream examples as language-modeling inputs, enabling useful zero-shot predictions and data-efficient adaptation.A cloze prompt and label-word probabilities provide task predictions without a newly initialized classifier head.Source: §1 · p. 1
- Lexical-overlap heuristics can produce high in-distribution performance while causing systematic failures on counterexamples in sentence-pair classification.For example, models may predict entailment when two sentences share words despite reversing their semantic roles.Source: §1 · p. 1
- Zero-shot prompt-based models are relatively robust to lexical-overlap heuristics, but finetuning increasingly adopts those heuristics as labeled data grow.Challenge-set performance degrades progressively during finetuning, indicating that useful pretrained behavior can be lost.Source: §1 · p. 1
- Regularizing updates toward the original pretrained weights improves target-task in-distribution performance while mitigating inference-heuristic adoption.The approach is motivated by preserving information learned during pretraining rather than allowing weights to move too far during few-shot adaptation.Source: §1 · pp. 1–2
2 Inference Heuristics in Prompt-based Finetuning
Across sentence-pair tasks, prompt-based models improve rapidly on in-distribution data but increasingly rely on lexical-overlap heuristics as finetuning data expand. Challenge-set behavior reveals this degradation, especially for HANS non-entailment examples.
2 Inference Heuristics in Prompt-based Finetuning
- Prompt-based sentence-pair classification converts each pair into a masked-language-model input and predicts labels from probabilities assigned to mapped label words.For NLI, “yes,” “maybe,” and “no” map to entailment, neutral, and contradiction.Source: §2 · p. 2
- The evaluation covers MNLI, SNLI, and QQP, paired respectively with HANS, Scramble Test, and PAWS challenge datasets designed to oppose lexical-overlap heuristics.Models are evaluated across multiple few-shot data sizes and repeated subsamples to account for instability in small-data finetuning.Source: §2 · p. 2
- On HANS, Scramble, and related challenge sets, finetuning increases heuristic-consistent predictions while reducing performance on counterexamples.The lexical-overlap HANS non-entailment median falls below 10%, while entailment reaches 100%.Source: §2 · p. 3, Figure 1 · p. 3
- In-distribution performance improves with more training data, whereas challenge performance follows a different trajectory and exposes increasing reliance on surface features.The contrast between these evaluation regimes reveals behavior that standard held-out performance can miss.Source: §2 · p. 3, Figure 1 · p. 3
3 Avoiding Inference Heuristics
The paper regularizes prompt-based finetuning by penalizing deviations from pretrained weights, improving challenge-set performance while preserving most in-distribution performance. Across data regimes, the benefit is strongest for lexical-overlap examples and peaks at moderate training sizes.
Method
- Regularized finetuning penalizes updates away from pretrained weights, combining standard cross-entropy with a quadratic penalty through RecAdam.The penalty avoids requiring pretraining data by treating the regularizer as an L2 loss between updated and original weights; RecAdam anneals toward the standard loss late in training.Source: §3 · p. 3
Results
- rFT improves HANS, PAWS, and Scramble by +6pp, +8pp, and +5pp, respectively, while incurring only small drops on corresponding in-distribution datasets.These results use median performance after finetuning on 512 examples per label.Source: §3 · p. 4, Table 2 · p. 4
Baselines
- Freezing pretrained layers has mixed challenge-set effects: FT-fix18 improves HANS and PAWS but degrades Scramble and all in-distribution performances.The FT-fixn baselines freeze the first n layers, including token embeddings, with n ∈ {6, 12, 18}.Source: §3 · p. 4
Results
- rFT’s advantage over vanilla prompt-based finetuning is strongest on the lexical-overlap subset, which had the highest zero-shot performance.Figure 2 compares relative median-accuracy differences with and without regularization on MNLI and HANS.Source: §3 · p. 4, Figure 2 · p. 4
- The benefit of rFT peaks at moderate data sizes such as K = 32 before saturating with more training data, and remains consistent across prompt templates and epoch counts.The epoch comparison suggests that heuristic adoption is more associated with the number of training examples than with the number of learning steps.Source: §3 · p. 4
4 Related Work
Related work studies spurious inference heuristics, their mitigation, and the efficiency–robustness trade-off. This paper extends that literature to zero- and few-shot prompt-based finetuning and argues for preserving useful zero-shot behavior.
Inference Heuristics
- Challenge datasets expose heuristic-driven errors by supplying counterexamples to spurious surface cues, extending analyses beyond standard in-distribution evaluation.Prior work documents such heuristics across reading comprehension, story cloze, fact verification, argumentation mining, and natural language inference.Source: §4 · p. 5
- This work adds evidence about inference heuristics in models trained in zero- and few-shot settings, whereas most prior studies examine standard training with larger datasets.The paper focuses on whether prompt-based adaptation transfers pretrained linguistic information during finetuning.Source: §4 · p. 5
Heuristics Mitigation
- Heuristic mitigation has used cleaner or adversarially augmented data, human-in-the-loop collection, feature augmentation, reweighting, and confidence regularization.Biases may be identified automatically or through hand-crafted models based on prior knowledge.Source: §4 · p. 5
- The paper’s finding that prompted zero-shot models rely less on heuristics motivates preserving their learned behavior during finetuning for more robust models.This complements data-centered and algorithmic approaches to mitigating heuristic reliance.Source: §4 · p. 5
Efficiency and Robustness
- Prior efficiency work shows that reducing compute or memory through pruning and quantization can leave standard-test performance unchanged while disproportionately harming underrepresented subsets.This motivates comprehensive evaluation of robustness alongside efficiency.Source: §4 · p. 5
5 Conclusion
The experiments reveal that low-resource prompt-based finetuning can improve in-distribution performance while increasing reliance on surface heuristics. Preserving pretrained weights through regularization mitigates this trade-off and maintains high in-distribution performance.
5 Conclusion
- Finetuning rapidly improves in-distribution performance as labeled data increase but gradually increases reliance on surface heuristics that are less present in zero-shot evaluation.The resulting degradation is obscured by standard evaluation setups.Source: §5 · p. 5
- Regularization that preserves pretrained weights mitigates heuristic adoption while maintaining high in-distribution performance.The conclusion supports evaluating prompt-based finetuning with challenge datasets rather than standard benchmarks alone.Source: §5 · p. 5
A Experimental Details
The experiments use prompt templates and label-word mappings across MNLI, SNLI, and QQP, evaluate challenge sets targeting lexical-overlap heuristics, and apply L2 weight regularization with a scheduled mixing coefficient.
- Experiments cover MNLI, SNLI, and QQP, using prompt templates and label words for both finetuning and challenge-set evaluation.Source: A Experimental Details · p. 10, Table 3 · p. 10
- Challenge datasets contain word-overlapping pairs labeled as non-entailment or non-duplicate, directly testing lexical-overlap heuristics.Source: A Experimental Details · p. 10, Table 4 · p. 10
- HANS tests lexical overlap, subsequence, and constituent heuristics with both entailment and non-entailment examples sharing word overlap.Source: A Experimental Details · p. 10
- Regularization uses RecAdam with a quadratic penalty λ of 5000 and a sigmoid schedule for α, whose rate k is 0.01 and midpoint t0 is 0.6 of training.Source: A Experimental Details · p. 10
B Additional Results
Additional results show that heuristic adoption is not explained by learning steps alone, persists across templates and pretrained models, and can be reduced by regularization across data regimes.
Standard CLS finetuning
- Prompt-based finetuning outperforms classifier-head finetuning on challenge behavior, while regularization further improves out-of-distribution performance.Source: B Additional Results · p. 11
Impact of prompt templates
- Automatically generated MNLI templates show similar behavior, with HANS accuracy around 62% zero-shot and below 55% after finetuning on 512 examples.Source: Table 5 · p. 11, B Additional Results · p. 12
Impact of learning steps
- Both fixed-data epoch schedules show an immediate HANS non-entailment drop followed by stagnation, indicating training-data amount matters more than learning steps.Source: Figure 3 · p. 11, B Additional Results · p. 12
Regularization across data regimes
- Regularization improvements on QQP/PAWS and SNLI/Scramble are largest at intermediate regimes such as 32 examples per label.Source: B Additional Results · p. 12, Figure 5 · p. 12
Impact of pretrained model
- Across RoBERTa-base, RoBERTa-large, BERT-base-uncased, and BERT-large-uncased, improved in-distribution scores coincide with degraded challenge-set scores.Source: B Additional Results · p. 12, Table 6 · p. 12