Interventions targeting the representation space of language models (LMs) have emerged as an effective means to influence model behavior. Such methods are employed, for example, to eliminate or alter the encoding of demographic information such as gender within the model's representations and, in so doing, create a counterfactual representation. However, because the intervention operates within the representation space, understanding precisely what aspects of the text it modifies poses a challenge. In this paper, we give a method to convert representation counterfactuals into string counterfactuals. We demonstrate that this approach enables us to analyze the linguistic alterations corresponding to a given representation space intervention and to interpret the features utilized to encode a specific concept. Moreover, the resulting counterfactuals can be used to mitigate bias in classification through data augmentation.
翻译:针对语言模型表征空间进行干预已成为影响模型行为的有效手段。此类方法常用于消除或改变模型中人口统计信息(如性别)的编码,从而创建反事实表征。然而,由于干预操作发生在表征空间内部,因此难以精确理解其修改了文本的哪些具体方面。本文提出一种将表征反事实转换为字符串反事实的方法。我们证明,该方法既能分析特定表征空间干预对应的语言变化,也能解释用于编码特定概念的特征。此外,通过数据增强技术,所生成的反事实可用于缓解分类任务中的偏见。