Abstract
Event Causality Identification (ECI) aims at determining the existence of a causal relation between two events. Although recent prompt learning-based approaches have shown promising improvements on the ECI task, their performance are often subject to the delicate design of multiple prompts and the positive correlations between the main task and derivate tasks. The in-context learning paradigm provides explicit guidance for label prediction in the prompt learning paradigm, alleviating its reliance on complex prompts and derivative tasks. However, it does not distinguish between positive and negative demonstrations for analogy learning. Motivated from such considerations, this paper proposes an In-Context Contrastive Learning (ICCL) model that utilizes contrastive learning to enhance the effectiveness of both positive and negative demonstrations. Additionally, we apply contrastive learning to event pairs to better facilitate event causality identification. Our ICCL is evaluated on the widely used corpora, including the EventStoryLine and Causal-TimeBank, and results show significant performance improvements over the state-of-the-art algorithms.
Introduction
Event Causality Identification (ECI) is a fundamental task in Natural Language Processing, focused on determining whether one event mentioned in text causes another. For instance, in the sentence "The plane was delayed because of the rain," a system must identify "rain" as the cause of the "delay." This capability is crucial for downstream applications like question answering, document summarization, and timeline generation.
While Large Language Models (LLMs) have advanced significantly, identifying the nuance of causality remains challenging. Previous prompt-based methods often required labor-intensive, hand-crafted prompts. In-Context Learning (ICL) emerged as a solution, allowing models to learn from a few examples (demonstrations) provided in the prompt. However, standard ICL treats all examples equally, failing to explicitly contrast causal vs. non-causal patterns. To address this, researchers developed In-Context Contrastive Learning (ICCL), which explicitly highlights the differences between positive and negative demonstrations to sharpen the model's causal reasoning.
Methodology
The ICCL framework is composed of three integrated modules designed to optimize the representation of causal relationships:
- Prompt Learning Module: This module constructs the input by prepending the target query with "demonstrations"—randomly selected examples of both causal and non-causal event pairs from the training set.
- In-Context Contrastive Module: This core component calculates a relation vector ($z$) by taking the difference between the hidden states of the two event mentions ($z = h_{e1} - h_{e2}$). A supervised contrastive loss is then applied to pull the query's relation vector closer to "causal" demonstrations (positives) and push it away from "non-causal" ones (negatives).
- Causality Prediction Module: The model utilizes a Masked Language Model (MLM) head to predict a virtual "answer word" (e.g.,
<causal>or<none>) at a[MASK]position inserted between the events in the query.
The model is trained jointly using a total loss function $L_{total} = \beta * L_{con} + L_{pre}$, where $L_{con}$ is the contrastive loss and $L_{pre}$ is the prediction loss.
Experimental Evaluation
The authors evaluated ICCL on two standard ECI benchmarks:
- EventStoryLine Corpus (ESC): Contains 22 topics and over 5,000 event mentions, including both intra-sentence and complex cross-sentence causalities.
- Causal-TimeBank (CTB): A high-quality dataset of 184 documents focused primarily on intra-sentence causal relations.
Key Results
ICCL achieved state-of-the-art results using RoBERTa-base as the backbone:
- Performance Gains: On the ESC dataset (intra-sentence), ICCL reached an F1 score of 70.4%, significantly outperforming previous models like DPJL (67.9%).
- Few-Shot Efficiency: ICCL is remarkably data-efficient. When trained on only 20% of the training data, it achieved a 51.9% F1 score, surpassing several older models trained on 100% of the data.
- Architectural Flexibility: The contrastive approach provided consistent performance boosts across various backbones, including BERT, ERNIE, and DeBERTa.
Discussion and Insights
- Relational Offsets: By representing relationships as vector differences ($h_{e1} - h_{e2}$), ICCL creates a dedicated geometric space for causal patterns, facilitating better separation between classes.
- Analogy through Contrast: Unlike standard ICL, which relies on implicit pattern matching, ICCL forces the model to perform explicit "analogy learning" by seeing what a causal relationship is not.
- Cross-Sentence Reasoning: In-context demonstrations were found to be particularly helpful for cross-sentence causality, likely by providing structural cues that span sentence boundaries.
Conclusion and Future Work
While ICCL shows significant promise, it is currently constrained by the context window of pre-trained language models, which limits the number of demonstrations. Additionally, the small number of samples per prompt may limit the refinement of the representation space. Future research will explore adapting the In-Context Contrastive framework to other relational tasks, such as general relation extraction and sentiment analysis, to further validate the "learning by contrast" principle.
Summary updated