Distilling Calibrated Knowledge for Stance Detection

Yingjie Li, Cornelia Caragea

Abstract

Stance detection models often struggle with "hard" labels that fail to capture nuanced similarities between viewpoints. We present Calibration-based Knowledge Distillation (CKD), a framework that leverages multiple generations of student models and dynamic temperature scaling to produce smoother, better-calibrated training signals. Our results across three major stance detection benchmarks—AM, COVID-19, and P-Stance—demonstrate significant improvements in both predictive performance and model reliability.

Introduction

Stance detection—identifying whether an author is in favor of, against, or neutral toward a specific target—is a fundamental task in natural language processing. Traditionally, models are trained using one-hot vectors (hard labels). However, these labels are often too rigid; they fail to capture the reality that a "Neutral" stance might be semantically closer to "Favor" than "Against" in certain contexts.

Knowledge Distillation (KD) offers a potential solution by having a "teacher" model provide "soft labels" (probability distributions) to a "student." However, modern neural networks are notoriously miscalibrated, often producing overconfident, "peaky" distributions. If a teacher is overconfident yet incorrect, the student inherits these biases, hindering effective knowledge transfer.

Methodology: Calibration-based Knowledge Distillation (CKD)

To address the calibration-transfer gap, we propose the CKD (Calibration-based Knowledge Distillation) framework. This approach integrates two core components:

  1. Born-Again Networks: Instead of a single teacher-student iteration, CKD employs multiple generations. The student of the first generation becomes the teacher for the second, and so on, allowing for iterative refinement of the knowledge signal.
  2. Dynamic Temperature Scaling: To mitigate teacher overconfidence, we apply dynamic temperature scaling ($\tau$) at each generation. Unlike static methods, CKD searches for the optimal $\tau$ that minimizes the Expected Calibration Error (ECE) on a validation set for every new teacher.
The iterative CKD process across multiple steps, showing the evolution from initial hard labels to calibrated soft labels.

By recalibrating the teacher at every step, the student receives "smoother" supervision signals. This helps the student learn inter-class similarities and reduces the risk of overfitting to the teacher's overconfident errors.

Experimental Setup

We evaluated CKD on three distinct stance detection benchmarks:

  • AM (Argument Mining): Arguments on eight controversial topics (e.g., "Abortion", "Minimum Wage").
  • COVID-19: Tweets regarding pandemic-related targets (e.g., "Face Masks", "Stay at Home Orders").
  • P-Stance: A large-scale dataset focused on political figures (Donald Trump, Joe Biden, Bernie Sanders) from the 2020 U.S. election.

Results and Discussion

CKD consistently outperformed strong baselines, including BERT, BERTweet, and Adaptive Knowledge Distillation (AKD).

Performance Gains

On the COVID-19 dataset, CKD achieved an $F_{micro}$ score of 76.93, surpassing the best baseline (AKD) at 75.07. Similar gains were observed on the AM dataset, where CKD reached 66.92 compared to 64.82 for baselines.

Improved Calibration

The primary advantage of CKD is the drastic reduction in Expected Calibration Error (ECE). For instance, on the AM dataset, CKD’s ECE was reduced to 3.79%, a significant improvement over the standard teacher model's 20.25%.

Reliability diagrams across COVID-19, AM, and P-Stance datasets, illustrating the gap between model confidence and actual accuracy.

As shown in the reliability diagrams, CKD models stay much closer to the "perfect calibration" diagonal. This indicates that the model's confidence scores are more representative of its actual predictive accuracy, making the "soft labels" more meaningful signals of uncertainty.

Conclusion and Future Work

CKD demonstrates that a well-calibrated teacher is a more effective source of knowledge. By smoothing the supervision signal through dynamic temperature scaling and generational distillation, we achieve higher accuracy and more reliable confidence estimates.

Future work will address the computational overhead of training multiple generations and explore the application of calibrated distillation to other hierarchical NLP tasks, such as emotion classification.

Summary updated

BibTeX
@inproceedings{li2023distilling,
  author = {Yingjie Li and Cornelia Caragea},
  title = {{Distilling Calibrated Knowledge for Stance Detection}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.393},
}
Figure