Generating counterfactual test-cases is an important backbone for testing NLP models and making them as robust and reliable as traditional software. In generating the test-cases, a desired property is the ability to control the test-case generation in a flexible manner to test for a large variety of failure cases and to explain and repair them in a targeted manner. In this direction, significant progress has been made in the prior works by manually writing rules for generating controlled counterfactuals. However, this approach requires heavy manual supervision and lacks the flexibility to easily introduce new controls. Motivated by the impressive flexibility of the plug-and-play approach of PPLM, we propose bringing the framework of plug-and-play to counterfactual test case generation task. We introduce CASPer, a plug-and-play counterfactual generation framework to generate test cases that satisfy goal attributes on demand. Our plug-and-play model can steer the test case generation process given any attribute model without requiring attribute-specific training of the model. In experiments, we show that CASPer effectively generates counterfactual text that follow the steering provided by an attribute model while also being fluent, diverse and preserving the original content. We also show that the generated counterfactuals from CASPer can be used for augmenting the training data and thereby fixing and making the test model more robust.
CREST: A Joint Framework for Rationalization and Counterfactual Text Generation
Instituto de Telecomunicações(电信研究所);Instituto Superior Técnico(里斯本高等理工学院);LUMLIS (Lisbon ELLIS Unit)(LUMLIS(里斯本ELLIS单元));Massachusetts Institute of Technology(麻省理工学院);Unbabel(Unbabel公司)
Truth or Twist? Optimal Model Selection for Reliable Label Flipping Evaluation in LLM-based Counterfactuals
Quality and Usability Lab, Technische Universität Berlin(柏林技术大学质量与可用性实验室);University of Marburg(马尔堡大学);German Research Center for Artificial Intelligence (DFKI)(德国人工智能研究中心);Deutsche Telekom(德国电信);BIFOLD – Berlin Institute for the Foundations of Learning and Data(柏林学习与数据基础研究院)
Parallel Universes, Parallel Languages: A Comprehensive Study on LLM-based Multilingual Counterfactual Example Generation
Technische Universität Berlin(柏林工业大学);German Research Center for Artificial Intelligence (DFKI)(德国人工智能研究中心(DFKI));University of Marburg(马尔堡大学);LMU Munich(慕尼黑大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心(MCML));BIFOLD – Berlin Institute for the Foundations of Learning and Data(柏林学习与数据基础研究所(BIFOLD))
Beyond Semantic Relevance: Counterfactual Risk Minimization for Robust Retrieval-Augmented Generation
National Engineering Research Center for Software Engineering, Peking University(软件工程国家工程研究中心,北京大学);City University of Hong Kong(香港城市大学);Tencent Technology(腾讯科技);Peking University(北京大学)
Prompt2Fingerprint: Plug-and-Play LLM Fingerprinting via Text-to-Weight Generation
Shenzhen International Graduate School, Tsinghua University, Shenzhen, China(清华大学深圳国际研究生院,中国深圳);South China University of Technology, Guangzhou, China(华南理工大学,中国广州);Harbin Institute of Technology, Shenzhen, Shenzhen, China(哈尔滨工业大学深圳校区,中国深圳)