A Practical Method for Generating String Counterfactuals
Matan Avitan, Ryan Cotterell, Yoav Goldberg, Shauli Ravfogel
Abstract
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.- Anthology ID:
- 2025.findings-naacl.180
- Volume:
- Findings of the Association for Computational Linguistics: NAACL 2025
- Month:
- April
- Year:
- 2025
- Address:
- Albuquerque, New Mexico
- Editors:
- Luis Chiruzzo, Alan Ritter, Lu Wang
- Venue:
- Findings
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 3267–3286
- Language:
- URL:
- https://preview.aclanthology.org/landing_page/2025.findings-naacl.180/
- DOI:
- Cite (ACL):
- Matan Avitan, Ryan Cotterell, Yoav Goldberg, and Shauli Ravfogel. 2025. A Practical Method for Generating String Counterfactuals. In Findings of the Association for Computational Linguistics: NAACL 2025, pages 3267–3286, Albuquerque, New Mexico. Association for Computational Linguistics.
- Cite (Informal):
- A Practical Method for Generating String Counterfactuals (Avitan et al., Findings 2025)
- PDF:
- https://preview.aclanthology.org/landing_page/2025.findings-naacl.180.pdf