Zero- and Few-Shot Event Detection via Prompt-Based Meta Learning (2023)

Abstract: With emerging online topics as a source for numerous new events, detecting unseen / rare event types presents an elusive challenge for existing event detection methods, where only limited data access is provided for training. To address the data scarcity problem in event detection, we propose MetaEvent, a meta learning-based framework for zero- and few-shot event detection. Specifically, we sample training tasks from existing event types and perform meta training to search for optimal parameters that quickly adapt to unseen tasks. In our framework, we propose to use the cloze-based prompt and a trigger-aware soft verbalizer to efficiently project output to unseen event types. Moreover, we design a contrastive meta objective based on maximum mean discrepancy (MMD) to learn class-separating features. As such, the proposed MetaEvent can perform zero-shot event detection by mapping features to event types without any prior knowledge. In our experiments, we demonstrate the effectiveness of MetaEvent in both zero-shot and few-shot scenarios, where the proposed method achieves state-of-the-art performance in extensive experiments on benchmark datasets FewEvent and MAVEN.

## introduction event detection tasks have experienced significant improvements thanks to the recent efforts in developing language-based methods @xcite . one of such methods is pretrained large language models, which can be fine-tuned for detecting events upon input context @xcite . however, the detection of unseen or rare events remains a challenge for existing methods, as large amounts of annotated data are required for training in a supervised fashion @xcite . for instance, existing models often fail to detect unseen event types due to the lack of domain knowledge, as demonstrated in figure 1 . to detect unseen event types (i.e., zero-shot learning), existing methods leverage external knowledge or contrastive learning to build classseparating features @xcite . similarly, it is possible to leverage limited annotated examples (i.e., few-shot learning) for event detection. for instance, prototypical features can be constructed to match event types upon inference @xcite . promptbased methods align with the pretraining objective of language models to improve detection performance @xcite . specifically, a clozebased prompt template (e.g., @xmath0, and the prediction can be obtained by decoding @xmath1. as such, prompt-based methods exploit the masked language modeling (mlm) pretraining task by constructing similar input examples. nevertheless, no existing method is designed for both zero-shot and few-shot event detection, as it is a non-trivial problem to combine both settings under a unified framework. previous efforts either address the zero-shot or the few-shot setting, yet detecting both unseen and rare events can be helpful in various scenarios (e.g., detecting emergency events online), which renders current approaches less effective in real-world applications. additionally, event detection comprises of two subtasks: trigger identification and classification. some methods provide an incomplete solution by solely performing the classification task, while many other approaches execute both tasks at the cost of reduced performance @xcite . this is because existing methods heavily rely on trigger words for classification, which causes drastic performance drops in the case of trigger mismatch or ambiguity @xcite . in this paper, we propose a meta learning framework metaevent for zero-and few-shot event detection. we consider both settings and optimize language models to identify unseen / rare events via a unified meta learning framework. that is, given zero / limited number of annotated examples per event type, our objective is to maximize the model performance in detecting such events. to this end, we develop a solution to integrate the trigger identification and classification subtasks for efficient forward passing in meta training. moreover, we design a trigger-aware soft verbalizer to identify event types in our prompt-based event detection model. for optimization, we propose a meta objective function based on contrastive loss to learn generalizable and class-separating event features. in training, the model is first updated and evaluated upon the sampled zero-or few-shot tasks, then the meta loss is computed to derive gradients w.r.t. the initial parameters, such that the updated model learns to generalize to the target tasks even without labeled examples. in other words, metaevent learns from seen tasks, yet with the objective to generalize in rare and unseen scenarios. therefore, the resulting model can optimally adapt to the target task upon deployment. we demonstrate the effectiveness of metaevent by evaluating zero-and few-shot event detection tasks on benchmark datasets, where metaevent consistently outperforms state-of-theart methods with considerable improvements. we summarize our contributions as follows foot_0 : metaevent is designed to exploit prompt tuning and contrastive learning for quick adaptation to unseen tasks. ## preliminary we consider the following event detection problem setup, where n -way k-shot examples are available for training each task (k is 0 for zero-shot setting). our goal is to train a model f that maximizes the performance in unseen tasks. problem: our research focuses on zero-and fewshot event detection based on a collection of tasks {t i } m @xmath2. for each task t i , a n -way k-shot training set and a held-out evaluation set are provided (i.e., d train i , d test @xmath3. the training of metaevent is two-fold: (1) an initial model is updated using the training sets in each sampled task to achieve local convergence (i.e., inner-loop optimization); (2) the updated models are used to compute a meta loss on the corresponding evaluation sets, followed by deriving the gradients w.r.t. the initial model using our meta learning algorithm (i.e., outer-loop optimization). in particular, the input for each task t i include: in the fewshot setting, d train i is used to tune the model, while d train i is an empty set for zero-shot setting. training set is also known as support set. ## conclusion in this paper, we design a meta learning framework metaevent for zero-and few-shot event detection. metaevent proposes to leverage attentive trigger features for efficient inference and predicts via a trigger-aware soft verbalizer. moreover, the proposed metaevent trains the model to search for the optimal parameter set for quick adaptation to unseen event detection tasks. extensive experiment results demonstrate the effectiveness of metaevent by consistently outperforming stateof-the-art methods on benchmark datasets in both zero-and few-shot event detection.