Learning to Focus: Causal Attention Distillation via Gradient‐Guided Token Pruning
ELVIA analysis
Independent review pending
The first reported finding concerns “The gradient detector indexes an unretained non-leaf gradient”. Under the inspected loader configuration, the released detector cannot obtain its gradients through this access. Historical use of frozen parameters, another internal kernel or precomputed outputs remains unresolved; benchmark scores are not refuted.
Problem 1. The gradient detector indexes an unretained non-leaf gradient
MinorEvidence and reasoning
Problem statement
The detector needs teacher/student loss derivatives with respect to token embeddings. Each released kernel constructs embedding outputs, calls requires_grad_(True), backpropagates, then indexes inputs_embeds.grad. The inspected loader leaves embedding weights trainable.
Proof
If the embedding matrix is trainable, is a non-leaf operation result. Enabling requires_grad does not detach it or retain its intermediate gradient. Backward can populate while leaving which the subsequent indexing cannot use. No detach, retain_grad or explicit returned input-gradient operation appears in the four kernels.
For a concrete derivative oracle, with three-dimensional tokens and has gradient norms hence normalized sensitivities The failure is retention of that existing derivative, independently of whether the downstream differentiable loss is linear or language-model cross-entropy. Freezing embedding weights before constructing an explicit input leaf is a valid countercontrol.
Possible revision
The supplied local correction detaches embedding values, enables their input gradient and explicitly requests the loss derivative with respect to that input. This preserves the requested downstream partial derivative. Retaining the intermediate gradient is another option; full detection and benchmark recovery remain unverified.
The existing correction is retained as a bounded proposal; author adoption is not established.
Problem 2. The response mask selects shifted target positions incorrectly
MinorEvidence and reasoning
Problem statement
The release copies token IDs into labels, ignores prompt labels with and applies the unshifted label mask to raw causal-LM output logits in the separate distillation reduction.
Proof
Raw logit row predicts token
Therefore response prediction rows require for Passing labels to the causal model shifts its internal supervised loss, not the returned raw logits. The source instead uses
Take four positions: two prompt tokens, one response token and EOS, with labels At row use teacher probabilities and student probabilities set both distributions to at the other rows. The source selects rows and gives zero KL. The intended response prediction rows give Thus it omits the first-response prediction and includes the row after the final supervised token.
Possible revision
With aligned tokenization, prefixes and vocabulary, compare teacher/student logits at rows using labels at rows State an empty-target convention. This repairs the one-position relation, but not arbitrary cross-tokenizer or differently pruned sequence alignment.
The existing correction is retained as a bounded proposal; author adoption is not established.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
The training pipeline comprises two key stages: () Confounding Token Detection: gradient-based comparisons between an advanced teacher model and the student model are used to identify confounding tokens in the training samples and constructs counterfactual samples by pruning these tokens; and ()Causal Attention Distillation: prune identified confounders respectively during training to align the student’s attention with the teacher’s and capture casual relationships.
NeurIPS 2025 official proceedings PDF; current endpoint freshly retrieved and relevant current author revisions compared; PDF p. 4
Actual review scope
The recorded inspection concerns these source locations: Proceedings Section 2.2.1, Eq.(2), PDF p.4; current author src/Confounding_token_detection/run_gradients_{llama,qwen}_{instruct,response}_level.py, compute_token_gradients; Proceedings Section 2.2.2, PDF p.5; current author src/Causal_attention_distillation/LeaF_instruct_level/distill_instruct_level.py, lines 201,225–229,423–460; LeaF_response_level analogous reduction.