Fixing Model Bugs with Natural Language Patches

29899

Authors

nan

Abstract

AbstractCurrent approaches for fixing systematic problems in NLP models (e.g., regex patches, finetuning on more data) are either brittle, or labor-intensive and liable to shortcuts. In contrast, humans often provide corrections to each other through natural language. Taking inspiration from this, we explore natural language patches—declarative statements that allow developers to provide corrective feedback at the right level of abstraction, either overriding the model (“if a review gives 2 stars, the sentiment is negative”) or providing additional information the model may lack (“if something is described as the bomb, then it is good”). We model the task of determining if a patch applies separately from the task of integrating patch information, and show that with a small amount of synthetic data, we can teach models to effectively use real patches on real data—1 to 7 patches improve accuracy by ~1–4 accuracy points on different slices of a sentiment analysis dataset, and F1 by 7 points on a relation extraction dataset. Finally, we show that finetuning on as many as 100 labeled examples may be needed to match the performance of a small set of language patches.

Keywords

nan

Full Content

Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 11600 - 11613 December 7-11, 2022 ©2022 Association for Computational Linguistics Fixing Model Bugs with Natural Language Patches Shikhar Murty†⋆ Christopher D. Manning† Scott Lundberg‡ Marco Tulio Ribeiro‡ †Computer Science Department, Stanford University ‡Microsoft Research {smurty,manning}@cs.stanford.edu, {scott.lundberg, marcotcr}@microsoft.com Abstract Current approaches for fixing systematic prob- lems in NLP models (e.g., regex patches, fine- tuning on more data) are either brittle, or labor-intensive and liable to shortcuts. In con- trast, humans often provide corrections to each other through natural language. Taking inspi- ration from this, we explore natural language patches—declarative statements that allow de- velopers to provide corrective feedback at the right level of abstraction, either overriding the model (“if a review gives 2 stars, the sentiment is negative”) or providing additional informa- tion the model may lack (“if something is de- scribed as the bomb, then it is good”). We model the task of determining if a patch applies separately from the task of integrating patch in- formation, and show that with a small amount of synthetic data, we can teach models to ef- fectively use real patches on real data—1 to 7 patches improve accuracy by ~1–4 accuracy points on different slices of a sentiment anal- ysis dataset, and F1 by 7 points on a relation extraction dataset. Finally, we show that fine- tuning on as many as 100 labeled examples may be needed to match the performance of a small set of language patches. 1 Introduction Natural language enables humans to communicate a lot at once with shared abstractions. For example, in teaching someone about the colloquial use of the term “bomb”, we might say describing food as ‘bomb’ means it is very good, while saying someone bombed means it was disappointing. This simple sentence uses various abstractions (e.g., “food”) to provide context-dependent information, making it easy for humans to generalize and understand sen- tences such as “The tacos were bomb” or “The chef bombed” without ever having seen such examples. ⋆ Part of the work done at Microsoft Research. There is a growing body of research focused on using language to give instructions, supervi- sion and even inductive biases to models instead of relying exclusively on labeled examples, e.g., building neural representations from language de- scriptions (Andreas et al., 2018; Murty et al., 2020; Mu et al., 2020), or language / prompt-based zero- shot learning (Brown et al., 2020; Hanjie et al., 2022; Chen et al., 2021). However, language is yet to be successfully applied for corrective purposes, where the user interacts with an existing model to improve it. As shown in Fig. 1a, if a developer discovers that a model contains bugs (i.e., system- atic errors; Ribeiro et al., 2020), common fixes are either brittle regex-based patches (e.g., Fig. 1a left, where patches either override predictions or replace the word “bomb” with the word “good”), or collecting hundreds of additional datapoints for finetuning, a tedious and computationally demand- ing process that can still …

Content truncated to 500 words

Labeled Text

AbstractCurrent approaches for fixing systematic problems in NLP models (e.g., regex patches, finetuning on more data) are either brittle, or labor-intensive and liable to shortcuts. In contrast, humans often provide corrections to each other through natural language. Taking inspiration from this, we explore natural language patches—declarative statements that allow developers to provide corrective feedback at the right level of abstraction, either overriding the model (“if a review gives 2 stars, the sentiment is negative”) or providing additional information the model may lack (“if something is described as the bomb, then it is good”). We model the task of determining if a patch applies separately from the task of integrating patch information, and show that with a small amount of synthetic data, we can teach models to effectively use real patches on real data—1 to 7 patches improve accuracy by ~1–4 accuracy points on different slices of a sentiment analysis dataset, and F1 by 7 points on a relation extraction dataset. Finally, we show that finetuning on as many as 100 labeled examples may be needed to match the performance of a small set of language patches.

Publication Details

Paper ID:
29899
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan