Masked language models like BERT can perform text classification in a zero-shot fashion by reformulating downstream tasks as text infilling. However, this approach is highly sensitive to the template used to prompt the model, yet practitioners are blind when designing them in strict zero-shot settings. In this paper, we propose an alternative mining-based approach for zero-shot learning. Instead of prompting language models, we use regular expressions to mine labeled examples from unlabeled corpora, which can optionally be filtered through prompting, and used to finetune a pretrained model. Our method is more flexible and interpretable than prompting, and outperforms it on a wide range of tasks when using comparable templates. Our results suggest that the success of prompting can partly be explained by the model being exposed to similar examples during pretraining, which can be directly retrieved through regular expressions.
翻译:BERT等遮掩语言模型可以通过将下游任务改制为文本填充方式,以零发方式对文本进行文字分类。 但是,这一方法对于用于促进模型的模板非常敏感,但实践者在严格零发设置下设计这些模型时视而不见。 在本文中,我们建议了一种基于采矿的零发学习替代方法。我们不鼓励语言模型,而是用常规表达方式对来自未贴标签的子公司的标签示例进行标记,这些示例可以通过提示进行过滤,并用来微调一个预先培训的模型。我们的方法更灵活,可解释性强,在使用类似的模板时超越了它。我们的结果表明,在培训前的模拟中,可以通过常规表达方式直接检索到类似的示例,可以部分地解释促动成功与否。