Abstract
This study details our approach for the CASE 2024 Shared Task on Climate Activism Stance and Hate Event Detection, focusing on Hate Speech Detection, Hate Speech Target Identification, and Stance Detection as classification challenges. We explored the capability of Large Language Models (LLMs), particularly GPT-4, in zero- or few-shot settings enhanced by retrieval augmentation and re-ranking for Tweet classification. Our goal was to determine if LLMs could match or surpass traditional methods in this context. We conducted an ablation study with LLaMA for comparison, and our results indicate that our models significantly outperformed the baselines, securing second place in the Target Detection task. The code for our submission is available at https://github.com/NaiveNeuron/bryndza-case-2024
Introduction
Climate change activism on social media serves as a vital platform for community building and advocacy, yet it frequently attracts significant polarization and hate speech. Effectively monitoring this discourse requires the ability to detect nuances such as the presence of hate speech, the specific targets of that speech (e.g., individuals versus organizations), and the overall stance of the author toward climate activism.
Traditionally, these classification tasks are addressed by fine-tuning specialized encoder models, such as BERT, on domain-specific labeled datasets. However, fine-tuning requires substantial computational resources, high-quality labeled data, and specialized expertise. This study investigates whether a competitive system can be built using only API access to a Large Language Model (LLM), specifically GPT-4, without any traditional fine-tuning. We evaluate this approach through the CASE 2024 Shared Task, which encompasses three distinct classification challenges within the climate activism domain.
Methodology
Our pipeline was centered on GPT-4 (version 2023-07-01-preview) and utilized a three-stage architecture designed to maximize the model's reasoning capabilities without weight updates.
1. Automated Prompt Engineering
Rather than manually iterating on prompt templates, we employed GPT-4 to generate its own classification criteria. By providing the model with a small sample of tweets, we tasked it with identifying common linguistic patterns and logical reasons for specific labels. This resulted in highly detailed, "chain-of-thought" style prompts that provided the model with a robust framework for its final classifications.
2. Retrieval-Augmented Generation (RAG)
To transition from zero-shot to few-shot classification, we implemented a RAG system. We utilized a vector database (Chroma) to store the training set embeddings. For every new tweet, the system retrieved the $k$ most similar examples. These examples were then injected into the prompt as context, allowing the model to learn from relevant historical labels in real-time.
3. Re-ranking
To refine the retrieval process, we employed flashrank (using a RankT5-flan model). This step was crucial for distinguishing between tweets that shared keywords but possessed divergent semantic meanings—for instance, differentiating between a tweet supporting environmentalism and one using similar vocabulary to mock it. This ensured that the few-shot examples provided to GPT-4 were contextually relevant rather than just superficially similar.
We also conducted an ablation study using LLaMA 2 70B to determine if an open-source model could achieve comparable results under the same RAG-enhanced conditions.
Datasets and Subtasks
The study utilized the ClimaConvo dataset, which consists of approximately 7,000 tweets related to climate activism. The dataset is divided into three subtasks:
- Subtask A (Hate Event): Binary classification identifying the presence of hate speech.
- Subtask B (Target Detection): Identifying the target of hate (Individual, Organization, or Community).
- Subtask C (Stance Detection): Determining the author's position (Support, Oppose, or Neutral).
Notably, the dataset contained specific recurring artifacts, such as the phrase "You’ve been fooled by Greta Thunberg," which appeared in nearly 500 tweets and strongly correlated with specific labels.
Results and Discussion
The GPT-4 RAG approach proved highly effective, particularly in identifying the targets of hate speech. Our team, "Bryndza," achieved the following results:
- Target Detection (Subtask B): Secured 2nd place out of 18 teams with an F1 score of 0.776.
- Hate Event Detection (Subtask A): Achieved an F1 of 0.881, placing 7th out of 22 teams.
- Stance Detection (Subtask C): Achieved an F1 of 0.693, placing 12th out of 19.
Key Insights
- LLMs as Prompt Engineers: Using the model to describe its own classification criteria significantly reduced the need for manual trial-and-error and improved reasoning consistency.
- Base Model Supremacy: The choice of the underlying model was the most significant factor in performance. While RAG and re-ranking improved results across the board, LLaMA 2 70B failed to surpass the simple baselines, whereas GPT-4 excelled. This suggests that the inherent reasoning capability of the base model remains the primary driver of success in complex social NLP tasks.
- Data Quality and Label Noise: Error analysis revealed that many of the model's "errors" were actually instances where the model's prediction was more accurate than the original human-provided label. This suggests that LLMs can serve as effective tools for identifying noise in large datasets.
Conclusion
Our participation in the CASE 2024 Shared Task demonstrates that "black-box" LLMs, when combined with RAG and automated prompt engineering, can outperform traditional fine-tuned classifiers. While the reliance on closed-source APIs like GPT-4 presents challenges for reproducibility and cost, the performance gains in complex tasks like Target Detection are substantial. Future work will focus on improving Stance Detection, where the model currently struggles to distinguish between neutral reporting and active advocacy, and exploring ways to achieve similar performance with smaller, open-source models.
Summary updated