Skip to content

kgarg8/Stanceformer

Repository files navigation

Stanceformer

A Target-Aware Transformer Model for Stance Detection

Abstract

The task of Stance Detection involves discerning the stance expressed in a text towards a specific subject or target. Prior works have relied on existing transformer models that lack the capability to prioritize targets effectively. Consequently, these models yield similar performance regardless of whether we utilize or disregard target information, undermining the task’s significance.

To address this challenge, we introduce Stanceformer, a target-aware transformer model that incorporates enhanced attention towards the targets during both training and inference. Specifically, we design a Target Awareness matrix that increases the self-attention scores assigned to the targets.

We demonstrate the efficacy of Stanceformer with various BERT-based models, including state-of-the-art models and Large Language Models (LLMs), and evaluate its performance across three stance detection datasets, alongside a zero-shot dataset. Our approach not only provides superior performance but also generalizes to other domains, such as Aspect-based Sentiment Analysis.

Features

  • Target-aware attention mechanism
  • Enhanced performance on stance detection tasks
  • Generalization to other NLP domains

About

Target Aware Transformer for Stance Detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published