Distilling Where a Rationale-Trained Teacher Is Sensitive, Not Where It Attends

Small text classifiers learn shortcuts. A compact hate-speech detector may flag any post that mentions "Muslim" or "gay". A small stance model may key on topic words rather than on the argument. Two lines of work attack this problem separately. Supervised attention trains a model's internal weighting of input words to agree with the words humans marked as justifying the label. Knowledge distillation trains a small "student" model to imitate a large "teacher". Each has a documented failure. Models supervised on attention learn to make their top-layer attention look plausible while the actual decision logic moves to lower layers. Students distilled only on the teacher's output probabilities often pick up the easy shortcut even when the teacher has been debiased.

We propose to use human rationales only to shape a large teacher, and then to distill into the student the teacher's input-gradient attributions: how much the teacher's prediction changes when each word's representation is nudged. We do not distill the teacher's attention weights. The gradient depends on the whole network, so it is harder to fake than one attention layer. It is also a target a neural network can actually produce, unlike a binary human highlight mask. And the teacher can supply it on every distillation example, including the large majority that have no human rationale. The bet is that rationales and distillation each fix the other's weakness: the teacher turns sparse, binary human highlights into dense, continuous targets, and matching input sensitivities pushes the student to copy the teacher's mechanism rather than only its outputs.

Core Claim

Gradient-level distillation from a rationale-supervised teacher should produce students that rely less on shortcut words and generalize better out of domain than three alternatives. The first is students that copy the teacher's attention. The second is students that copy an unsupervised teacher's gradients. The third is students trained directly on the same human rationales. The advantage should grow as rationale coverage shrinks and as the teacher–student size gap widens.

Three findings motivate the claim. Explanation Regularisation through the Lens of Attributions shows that regularizing top-layer attention is "hacked" through lower layers. The same paper shows that forcing global attributions toward human masks under a hard constraint collapses out-of-domain F1 on Movies from 91.01 to 75.80, while a soft joint attention penalty raises it to 93.10. Do Students Debias Like Teachers? shows that logit distillation fails to pass on debiasing, and fails more as the scale gap grows. It never tested explanation-based transfer. What Mechanisms Does Knowledge Distillation Distill? supplies the method. It shows that matching teacher input-gradients (Jacobians) suppresses simplicity bias in students, but only on synthetic tasks and with teachers that had no human guidance.

Our reading of the Ferreira collapse is a target-realizability problem. A binary, subjective human mask is not an attribution any network can produce while still solving the task. Deriving Machine Attention from Human Rationales made a related argument and trained a separate network to map rationales to continuous attention. Our teacher plays that mapping role and is itself the model being compressed.

Relation to the Closest Work

The nearest method is Good Teachers Explain (e²KD). It adds a cosine loss between teacher and student GradCAM or B-cos maps to distillation in vision and reports up to 13 points out-of-distribution gain over standard KD on Waterbirds. Its teacher explanations are purely machine-generated, so a flawed teacher passes on its flaws. It also does not touch text or token-level rationales. We differ on three counts: the teacher is anchored to human rationales, the modality is text, and we test explicitly whether gradient matching resists the layer-hacking that attention matching suffers.

Shortcut-Resistant CAM Distillation builds attention-map teachers from heuristic energy functions, and Human visual attention-inspired knowledge distillation distills relational maps in pathology. Both use no human rationales at training time, and both are vision-only.

Large Language Models as Attribution Regularizers does match a small model's input gradients to a large model's judgments. Its targets, however, are global, per-feature tabular scores obtained by prompting; ours are per-instance, per-token attributions from a trained teacher. Preventing Shortcut Learning in Medical Image Analysis distills intermediate class predictions from a teacher trained on clean data. We borrow its point that shortcuts live at different depths, but our supervision comes from rationales rather than a curated clean split.

Research Program

Teacher training. A large BERT-family teacher is trained with the task loss plus a soft (joint, not constrained) rationale penalty on the rationale-annotated subset. Following Ferreira's finding that joint regularization helps while hard constraints hurt, the penalty is applied both to attention, in the style of Supervised Rational Attention from Aligning Attention with Human Rationales, and to gradient-times-input attributions. We then verify that the teacher's gradient attributions, and not only its attention, became more plausible. If they did not, the teacher hacked its own constraint, and that diagnosis is itself a reportable result.

Student training. For an input $x$, let $a(x)$ be the word-level attribution vector. It is computed as the gradient-times-input norm of the gold-class logit with respect to each word's embedding, summed over subword pieces, and normalized with a softmax at temperature $\tau$. The student $S$ is trained on all distillation data with

$$ \mathcal{L}_S = \mathcal{L}_{\text{task}} + \alpha\,\mathrm{KL}\big(p_T(x)\,\|\,p_S(x)\big) + \lambda\,\mathrm{KL}\big(a_T(x)\,\|\,a_S(x)\big), $$

where the symbols are defined as follows. $p_T$ and $p_S$ are the softened teacher and student class distributions. $a_T$ and $a_S$ are the teacher and student attributions. $\alpha$ and $\lambda$ are loss weights.

The teacher's attributions are pre-computed once, as in e²KD's frozen explanations. The student needs double backpropagation, so its training cost is roughly twice that of standard KD. Inference cost is unchanged. Because the target is defined at the word level, it is independent of architecture. We therefore test both a small transformer student and a BiRNN student; the BiRNN is the architecture HateXplain itself used. This bears on whether explanation transfer can cross architecture families.

Analysis of hacking. For every student we compute attributions at each layer, in the style of Ferreira et al., and erasure-based faithfulness scores. Erasure removes the top-attributed words and measures how much the prediction drops. These tell us whether plausibility at the output is backed by the computation underneath.

Baselines

Naive reference. A student of the same size fine-tuned on task labels alone. It shows how much shortcut reliance compression creates by default.

Standard logit distillation. Logit KD from the same rationale-supervised teacher, which is the setting where Do Students Debias Like Teachers? found debiasing fails to transfer. We also include that paper's best remedies, data augmentation and iterative distillation through intermediate model sizes, because they are its strongest reported fixes: up to 4.5 and 2.8 absolute points on the spurious gap. We have no per-dataset number from that paper for our text benchmarks.

Strongest existing method for the explanation property. Supervised Rational Attention applied directly to the student with the same human rationales. On HateXplain it is reported at IoU F1 0.539 versus 0.130 for plain BERT, with Macro F1 0.682 (Aligning Attention with Human Rationales). For bias, BERT-HateXplain reports Macro F1 0.687, AUROC 0.851, and subgroup bias AUC (GMB-Subgroup) rising from 0.762 to 0.807 with attention supervision (HateXplain). These are full-size BERT figures. No reported result found on Lacuna for distilled small students on HateXplain, so we re-run every method on our student architectures.

Ablations that isolate the key ingredients. Three variants each change one thing:

  • Attention-map distillation from the same teacher, a text analogue of e²KD. This isolates gradients versus attention.
  • Jacobian matching from an unsupervised teacher, as in What Mechanisms Does Knowledge Distillation Distill?. This isolates the human-rationale anchor.
  • Our full method restricted to the rationale-annotated subset only. This isolates the value of the teacher labeling unannotated data.

Fairness of comparison. All methods share the same data splits, student architecture, number of training steps, and a tuning budget of equal size (the same number of trials over $\alpha$, $\lambda$, and learning rate), selected on in-domain validation only. Beating SRA-on-student means matching its Macro F1 within one point while improving GMB-Subgroup bias AUC and out-of-domain F1, at equal or better rationale IoU.

Why not just…?

Why not just train the small student directly on the human rationales? This is the real threat. If rationales cover the whole training set, a student with direct attention supervision may close most of the gap. Our expected advantage comes from two sources. Rationales are usually sparse: VAST has them on about 4% of training data, and R2A worked from 200 examples. Direct supervision also targets the hackable top layer. The coverage sweep below settles this. If direct SRA matches us at full coverage and at 4%, the teacher contributes only compression and we will report that.

Why not just distill the unsupervised teacher's Jacobians? Jacobian matching already transfers mechanisms (What Mechanisms Does Knowledge Distillation Distill?). But it transfers whatever mechanism the teacher has, including identity-term shortcuts, which HateXplain shows unsupervised BERT uses. The unsupervised-teacher ablation measures exactly how much the rationale anchor adds on the bias metrics.

Why not just augment the data or stick with logit KD? Augmentation narrows spurious gaps (Do Students Debias Like Teachers?), but it targets known shortcuts only. Right for the Wrong Reasons describes how such fixes invite new templates. Logit KD is documented to amplify shortcuts. Both are run as baselines, and augmentation is also combined with our loss to test whether the two are complementary.

Proposed Experiments

The benchmarks are HateXplain, used for Macro F1, rationale IoU and token F1, and GMB bias AUC; VAST, used for macro-F1, rationale congruity, and a reduced-data setting; and Movies, used for out-of-domain F1. On VAST the reported macro-F1 is about 0.67–0.69, with congruity 1.12 versus 0.18 for the baseline (Human Rationales as Attribution Priors). HateBRXplain serves as a cross-lingual check. Teacher–student pairs span three size ratios, to test whether gradient matching weakens the scale penalty reported for logit KD.

Four results are decisive.

  1. Gradients versus attention. Gradient distillation should beat attention distillation on out-of-domain F1 and bias AUC, and should show smaller divergence between layer-wise attributions. That would be the direct evidence against hacking.
  2. The rationale anchor. Rationale-anchored Jacobians should beat unsupervised Jacobians on GMB-Subgroup.
  3. Coverage. Sweeping rationale coverage from 4% to 100% should show our advantage over direct SRA-on-student shrinking as coverage rises.
  4. Scale gap. The student-minus-teacher gap in out-of-domain F1 should grow more slowly with size ratio than it does under logit KD.

If the teacher's own gradient attributions fail to become plausible under joint supervision, the method's premise is false. That check is run first.