BEIKE NLP at SemEval-2022 Task 4: Prompt-Based Paragraph Classification for Patronizing and Condescending Language Detection

Yong Deng, Chenxiao Dou, Liangyu Chen, Deqiang Miao, Xianghui Sun, Baochang Ma, Xiangang Li

Abstract

The Patronizing and Condescending Language (PCL) detection task is aimed at identifying and categorizing language that is patronizing or condescending towards vulnerable communities in general media. Compared to other NLP tasks of paragraph classification, the negative language presented in the PCL detection task is usually more implicit and subtle, making the performance of common text-classification approaches disappointing. Targeting the PCL detection problem in SemEval-2022 Task 4, this paper introduces the Beike NLP team's solution, which exploits the power of prompt-based learning on paragraph classification. We reformulate the task as an appropriate cloze prompt and use pre-trained Masked Language Models to fill the cloze slot. For the two subtasks—binary classification and multi-label classification—the DeBERTa model is adopted and fine-tuned to predict masked label words of task-specific prompts. On the evaluation dataset, our approach achieves an F1-score of 0.6406 for binary classification and a macro-F1-score of 0.4689 for multi-label classification, ranking first in the leaderboard for the latter.

Introduction

Patronizing and Condescending Language (PCL) is a nuanced form of communication that, while often well-intentioned, reinforces power imbalances and stereotypes against vulnerable groups. Unlike hate speech or overt offensive language, PCL is characterized by its subtlety and implicitness. It often manifests as "pitying" or "looking down upon" subjects, making it exceptionally difficult for standard Natural Language Processing (NLP) models to detect using traditional keyword-based or simple classification methods.

In the context of SemEval-2022 Task 4, the challenge was divided into two subtasks:

  1. SubTask 1 (Binary Classification): Identifying whether a given paragraph contains PCL.
  2. SubTask 2 (Multi-label Classification): Categorizing the specific type of PCL into seven categories, such as "Unbalanced power relations," "Shallow solution," or "Presupposition."

Methodology

The core of our approach is the transition from traditional classification to Prompt-based Learning. Traditional methods typically append a classification head to a model's [CLS] token. In contrast, we reformulate the task into a "cloze" test, allowing the model to leverage its pre-trained knowledge more effectively.

Prompting Paradigm

We wrapped input paragraphs in a template designed to elicit a natural language response from the model. For example, an input sentence would be followed by the prompt: "Is it patronizing or condescending? [MASK]". The model is then tasked with predicting the word that best fits the [MASK] token. If the model predicts words like "yes" or "true," the paragraph is classified as PCL. This method bridges the gap between the pre-training objective (Masked Language Modeling) and the downstream task.

Model Architecture and Training Strategies

We utilized DeBERTa (Decoding-enhanced BERT with disentangled attention) as our backbone model. DeBERTa improves upon BERT by using two vectors to represent each token—one for content and one for position—which is particularly effective for understanding the structural nuances of PCL.

To optimize performance, we implemented several advanced training strategies:

  • Verbalizer: A mapping system that translates the model's vocabulary predictions (e.g., "certainly," "exactly") into the final task labels.
  • R-Drop: A regularization technique that forces the model to maintain consistency across different dropout sub-models, improving generalization and training stability.
  • Easy Data Augmentation (EDA): Given the scarcity of PCL examples, we used synonym replacement and word swapping to expand the training set.
  • Ensemble Strategy: We employed 10-fold cross-validation, training ten distinct models and averaging their predictions to ensure robust results.

Datasets

The study utilized the SemEval-2022 Task 4 dataset, comprising 10,469 English paragraphs from general media. The dataset is significantly imbalanced, with only 993 paragraphs (approximately 9.5%) labeled as PCL. This imbalance necessitated the use of data augmentation and robust regularization to prevent the model from biasing toward the majority (non-PCL) class.

Results and Analysis

Our prompt-based approach demonstrated superior performance over traditional classification methods. In internal testing, prompting outperformed standard [CLS] classification by 0.5% in binary tasks and 3.1% in multi-label tasks.

On the official leaderboard, the Beike NLP team achieved:

  • SubTask 1: An F1-score of 0.6406, ranking 4th globally.
  • SubTask 2: A Macro-F1 score of 0.4689, ranking 1st globally.

Ablation studies confirmed that the combination of Prompting, Ensembling, R-Drop, and EDA created a cumulative "staircase" of improvement, with each component contributing significantly to the final Macro-F1 score.

Conclusion

By reframing PCL detection as a prompt-based cloze task, we successfully captured the subtle linguistic cues that traditional models often miss. While our results in SubTask 2 led the field, the overall F1 scores highlight that PCL detection remains a challenging frontier in NLP. Future work will focus on automated prompt engineering and extending these techniques to multi-lingual contexts to address condescension across different cultural and linguistic frameworks.

Summary updated

Abstract

PCL detection task is aimed at identifying and categorizing language that is patronizing or condescending towards vulnerable communities in the general media.Compared to other NLP tasks of paragraph classification, the negative language presented in the PCL detection task is usually more implicit and subtle to be recognized, making the performance of common text-classification approaches disappointed. Targeting the PCL detection problem in SemEval-2022 Task 4, in this paper, we give an introduction to our team's solution, which exploits the power of prompt-based learning on paragraph classification. We reformulate the task as an appropriate cloze prompt and use pre-trained Masked Language Models to fill the cloze slot. For the two subtasks, binary classification and multi-label classification, DeBERTa model is adopted and fine-tuned to predict masked label words of task-specific prompts. On the evaluation dataset, for binary classification, our approach achieves an F1-score of 0.6406; for multi-label classification, our approach achieves an macro-F1-score of 0.4689 and ranks first in the leaderboard.
BibTeX
@inproceedings{deng2022beike,
  author = {Yong Deng and Chenxiao Dou and Liangyu Chen and Deqiang Miao and Xianghui Sun and Baochang Ma and Xiangang Li},
  title = {{BEIKE NLP at SemEval-2022 Task 4: Prompt-Based Paragraph Classification for Patronizing and Condescending Language Detection}},
  booktitle = {SemEval @ NAACL},
  year = {2022},
  url = {https://openreview.net/forum?id=B6Z7z4EZkd},
}
Figure