Exploring Automatically Perturbed Natural Language Explanations in Relation Extraction (2023)

Abstract: Previous research has demonstrated that natural language explanations provide valuable inductive biases that guide models, thereby improving the generalization ability and data efficiency. In this paper, we undertake a systematic examination of the effectiveness of these explanations. Remarkably, we find that corrupted explanations with diminished inductive biases can achieve competitive or superior performance compared to the original explanations. Our findings furnish novel insights into the characteristics of natural language explanations in the following ways: (1) the impact of explanations varies across different training styles and datasets, with previously believed improvements primarily observed in frozen language models. (2) While previous research has attributed the effect of explanations solely to their inductive biases, our study shows that the effect persists even when the explanations are completely corrupted. We propose that the main effect is due to the provision of additional context space. (3) Utilizing the proposed automatic perturbed context, we were able to attain comparable results to annotated explanations, but with a significant increase in computational efficiency, 20-30 times faster.

## introduction the application of neural networks in nlp has been a great success. however, the opaque nature of neural network mechanisms raises concerns regarding the reliability of their inferences and the potential for superficial pattern learning. this has led to severe issues with the generalization ability and vulnerability of neural networks. @xcite . one common attempt to address the opacity of neural networks is to guide them with explanations. researchers propose that by connecting the model and the inductive bias from explanations, the reliability of neural network inferences can be improved. this approach has been successfully applied in relation extraction tasks, as demonstrated in previous studies such as @xcite @xcite . earlier approaches relied on explanations from semantic parsers @xcite , which incurs a high annotation cost. the recently proposed approach, expbert @xcite , was a breakthrough in its ability to directly incorporate natural language explanations. for example, in fig. 1a , o 1 and o 2 went on a honeymoon can be used as one explanation to guide the recognition of the spousal relation. expbert with annotated explanations achieves 63.5% accuracy in the spousal relation extraction dataset, while bert without explanations only achieves 52.9%. considering the simple mechanism of expbert, such improvement is quite surprising. expbert simply concatenates explanations with the original text before being encoded by a language model. based on the success of expbert, one might conclude that text concatenation and pre-trained language models are sufficient for integrating the inductive bias from natural language explanations and guide models to make a sound inference. on the other hand, as exemplified by the history of deep learning, introducing extra inductive biases into neural networks is never trivial. due to the strong generalization ability of neural networks, introducing inductive biases by humans is often surpassed by simpler models or even random inductive biases @xcite @xcite . in this paper, starting from investigating the working mechanism of expbert, we study how explanations guide and enhance the model effect. we first propose a simple strategy to control the inductive bias of explanations by the lens of corrupted explanations, wherein some words of annotated explanations are replaced by random words. we show an example of the corrupted explanation x: robert and julie had a terrible honeymoon last month. y: spouse explanation: o1 and o2 went on a honeymoon. corrupted explanation: o1 and o2 went on a frog. perturbed context: o1 [m]1 [m]2 • • • [m]m o2 our results show that the random corruption does not result in a decrease in performance on the disease dataset. while corruptions do lead to a reduction in the effect on the spouse dataset, we find that even when explanations are 100% corrupted, they still result in an improvement over the baseline without explanations. these findings are an average of 3 runs. in fig. 1a , where the word honeymoon is replaced by the random word frog. obviously, the explanations will provide less valid information after random corruption. we show the effect of corrupted explanations in fig. 1b and fig. 1c . on both datasets, adding explanations shows a clear improvement to the baseline with no explanation. surprisingly, however, reducing the inductive bias of explanations has almost no effect on the improvement of explanations on the disease dataset. on the spouse dataset, although the improvement decreases as the corruption increases, the effect of 100% corrupted explanations is still better than no explanations. these results suggest that the effect of explanations should not be entirely attributed to their inductive bias. with comprehensive experiments of corrupted explanations in §3, we identified the following characters of natural language explanations: the above findings motivate us to further investigate and improve natural language explanations. to get rid of the potential entanglement of the existing vocabulary, we further proposed the perturbed context as the substitute, which only contains randomly initialized embeddings. we conducted different variants of perturbed contexts to investigate how natural language explanations work. we find that full-rank random contexts achieve competitive results with annotated explanations but are 18-29 times faster. ## characterizing natural language explanations in this section, we make a thorough experimental study of the characters of natural language explanations. we plot the accuracy of different settings in character 1 the effect and data efficiency of natural language explanations are sensitive to the training style and the dataset. effect improves for frozen language models. for frozen language models (fig. 1 ), introducing annotated natural language explanations significantly improves the effect over models without explanations. this is in line with the finding in @xcite . the improvement becomes less significant for fine-tuning language models and varies across datasets. however, in the more common setting where all parameters are fine-tuned, the effect of annotated explanations is unstable (fig. 2 ). on the spouse and tacred datasets, introducing annotated explanations has accuracy improvement, but not on disease. the improvement is less significant compared to the frozen language models. this challenges the perception in previous work that introducing natural language explanations has significant effects @xcite . data efficiency only holds for frozen language models as to data efficiency, previous study @xcite found that the effect of a model trained on a full amount of data without explanations can be achieved by using a small subset (e.g. 5%) of training data with explanations. however, they only verified this in frozen language models. we analyzed the data efficiency in fine-tunable language models. we vary the proportion of training data on different datasets. the results are shown in fig. 3 . similar to the accuracy experiments, we find that figure 2 : results for fine-tunable language models. annotated explanations show unstable and minor improvement over vanilla language models. the effectiveness did not significantly decrease after random corruptions. figure 3 : for fine-tunable language models, introducing explanations does not improve data efficiency. the data efficiency of natural language explanations does not generalize to fine-tunable language models. the natural language explanation does not improve the data efficiency, nor does the corrupted explanation. character 2 reducing the inductive bias of annotated explanations does not significantly decrease the effect. we also demonstrate the results of corrupting a certain fraction of tokens in annotated explanations in fig. 1 and fig. 2 . the results are surprising: after corrupting with random words, the performance does not drop in most cases. even when we replace 100% of the words in explanations with random words, the results are still competitive with the original explanations. this phenomenon was observed in all three datasets in the fine-tuning setting. obviously, the 100% corrupted explanations do not provide any valid inductive bias for the model. interestingly, for the frozen language models, the results for spouse and disease diverge. in fig. 1b , corrupting the explanations does not reduce the effect of disease. the results of spouse in fig. 1c , however, shows that randomly corrupting the explanations does reduce the effect. fig. 1c conflicts with other settings. we further investigate this exception below. character 3 parameter search over the corrupted tokens makes corrupted explanations comparable with annotated explanations in frozen language models. in the frozen language models, both the language model and the corrupted explanations are not finetunable. the randomly corrupted explanations may not be well-initialized if no optimization is allowed. we expect that the corrupted explanation will still be effective after proper initialization. to verify this, we slightly modified the training strategy to allow the word embeddings of the corrupted words to be fine-tuned, while still freezing other parameters of the language model. that is, we search for the parameters for the corrupted explanation. note that, during this process, no annotated explanation is used. we show the results with tunable corrupted tokens in fig. 1 . we find that while not introducing extra annotations, the parameter search for the corrupted explanation performs competitively (on spouse) or surpasses (on disease) the annotated explanations. the results suggest that random initialization does not necessarily perform well. on the other hand, manually annotated explanations serve as a good initialization for the extra context. ## how do explanations work? an investigation via perturbed context the effect of corrupted explanations and natural language explanations reminds us to investigate how explanations work through their commonality: they both provide extra contexts. we hypothesize that the real factor at play is the context space provided by (corrupted) explanations, rather than the inductive bias. hence, in this section, we systematically analyze how explanations work regarding the extra context space. to address this, we present perturbed context. ## conclusion in this paper, we revisit the role of explanations for relation extraction. in previous studies, explanations were thought to provide effective inductive bias, thus guiding the model learn the downstream task more effectively. we argue that it is imprudent to simply interpret explanations' effects as inductive bias. we find that the effect of natural language explanations varies across different training styles and datasets. by randomly corrupting the explanations, we found that the effect of explanations did not change significantly as the inductive bias decreased. this suggests that the inductive bias is not the main reason for the improvement. we further propose that the key of explanation for the improvement lies in the fine-tunable context. based on this idea, we propose perturbed contexts. perturbed contexts do not require any annotated explanations, while still providing (fine-tunable) contexts like annotated explanations. our experiments verified that the effectiveness of the perturbed context is comparable to that of annotated explanations, but (1) the perturbed context does not require any manual annotation, making them more adaptable; (2) the perturbed context is much more efficient than that of using annotated explanations.