KPatch: Knowledge Patch to Pre-trained Language Model for Zero-Shot Stance Detection on Social Media

Shuohao Lin, Wei Chen, Yunpeng Gao, Zhishu Jiang, Mengqi Liao, Zhiyu Zhang, Shuyuan Zhao, Huaiyu WanCOLING 2024

Abstract

Zero-shot stance detection on social media (ZSSD-SM) aims to distinguish the attitude in tweets towards an unseen target. Previous work capture latent variables between source and target domains to perform this task, but the lack of context knowledge hinders the detection performance. Recent studies have been devoted to obtaining the accurate representation of tweets by bringing additional facts from Knowledge Graph (KG), showing promising performance. However, these knowledge injection methods still suffer from two challenges: (i) The pipeline of knowledge injection causes error accumulation and (ii) irrelevant knowledge makes them fail to understand the semantics. In this paper, we propose a novel knowledge injection method for ZSSD-SM, which adopts two training stages, namely knowledge compression and task guidance, to flexibly inject knowledge into the pre-trained language model (PLM) and adaptively expand tweets context. Specifically, in the knowledge compression stage, the latent representation of KG is reconstructed by the triplet denoising task and compressed into external matrices; while in the task guidance stage, the frozen matrices are employed to guide the PLM to adaptively extract its own context-related knowledge, and then complete the fine-tuning of the ZSSD-SM task. Extensive experiments on multiple datasets show the effectiveness of our proposed method.

Introduction

Zero-shot stance detection (ZSSD) is the task of determining a user's attitude (Favor, Against, or Neutral) toward a topic the model has never seen during training. This is notoriously difficult on social media because tweets are short and often lack the necessary context to infer a stance without external information. While researchers have tried injecting facts from Knowledge Graphs (KGs) to fill this gap, traditional methods rely on a fragile "pipeline" approach involving Named Entity Recognition (NER) and Entity Linking (EL).

Traditional knowledge injection pipelines suffer from error accumulation and irrelevant knowledge.

As shown in Figure 1, traditional pipelines suffer from two fatal flaws: Error Accumulation (e.g., if NER misses "electricity," the model loses the link to "climate change") and Irrelevant Knowledge (injecting every fact about an entity creates noise). KPatch aims to provide the benefits of a KG without the fragility of these pipelines.

Methodology

KPatch shifts from explicit knowledge injection to implicit knowledge guidance through a two-stage process: Knowledge Compression and Task Guidance.

Knowledge Searching

Before training, the framework uses a Large Language Model (ChatGPT) to expand a simple topic (e.g., "Donald Trump") into a list of secondary keywords ("billionaire," "Republican candidate"). These are used to query WikiData and extract relevant triplets (head, relation, tail) to build a topic-specific subgraph.

Knowledge Compression (Stage 1)

Instead of linking entities at runtime, KPatch "compresses" the KG into external matrices ($M_K$) using Parameter-Efficient Fine-Tuning (PEFT) techniques like LoRA or P-Tuning V2. The backbone model (BERT) is frozen while the external matrices are trained on a Triplet Denoising Task (TDT). This forces the matrices to store the structural semantics of the KG by distinguishing real triplets from corrupted ones.

The KPatch framework consists of (a) Knowledge Compression and (b) Task Guidance stages.

Task Guidance (Stage 2)

The "knowledge patch" ($M_K$) is frozen, and the backbone model is fine-tuned for the stance detection task. Because the patch contains the compressed KG, the model learns to adaptively extract only the contextually relevant information needed to judge a tweet’s stance, effectively acting as an internal "knowledge librarian."

Experiments and Results

The authors evaluated KPatch on two primary benchmarks: Sem16 (classic topics like "Climate Change") and MiDe22-EN (focused on fake news like the "Russia-Ukraine war"). KPatch consistently outperformed state-of-the-art ZSSD-SM baselines like JointCL and traditional injection models like K-BERT.

  • Significant Gains: On the Sem16 "Climate Change" topic, KPatch (LoRA) achieved an F1 score of 31.92%, compared to K-BERT’s 12.34%.
  • Ablation Success: Removing the LLM-based keyword expansion phase dropped performance by up to 5.86%, proving that initial semantic broadening is crucial.
  • Stability: The model showed much lower performance fluctuation across different random seeds compared to traditional methods, suggesting the "compressed patch" approach is more reliable than sampling subgraphs on the fly.

Conclusion

KPatch demonstrates that implicit knowledge guidance is superior to explicit pipeline-based injection for zero-shot stance detection. By bypassing the "house of cards" of NER and EL, the model becomes robust to the noise and sparsity of social media text. Future work will focus on improving the explainability of the high-dimensional knowledge patches and optimizing the training overhead of the two-stage process.

Summary updated

BibTeX
@inproceedings{lin2024kpatch,
  author = {Shuohao Lin and Wei Chen and Yunpeng Gao and Zhishu Jiang and Mengqi Liao and Zhiyu Zhang and Shuyuan Zhao and Huaiyu Wan},
  title = {{KPatch: Knowledge Patch to Pre-trained Language Model for Zero-Shot Stance Detection on Social Media}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=ON46DYVbkr},
}
Figure