Original: Plug and Play Counterfactual Text Generation for Model Robustness
Revised: Counterfactual Sentence Generation with Plug-and-Play Perturbation

Original: Abstract —Generating counterfactual test-cases is an important backbone for testing NLP models and making them as robust and reliable as traditional software.
Revised: Abstract —Generating counterfactual test-cases is an important backbone for testing NLP models and making them as robust and reliable as traditional software.

Original: 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.
Revised: 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.

Original: In this direction, significant progress has been made in the prior works by manually writing rules for generating controlled counterfactuals.
Revised: In this direction, significant progress has been made in the prior works by manually writing rules for generating controlled counterfactuals.

Original: However, this approach requires heavy manual supervision and lacks the flexibility to easily introduce new controls.
Revised: However, this approach requires heavy manual supervision and lacks the flexibility to easily introduce new controls.

Original: 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.
Revised: 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.

Original: We introduce CASPer, a plug-and-play counterfactual generation framework to generate test cases that satisfy goal attributes on demand.
Revised: We introduce CASPer, a plug-and-play counterfactual generation framework to generate test cases that satisfy goal attributes on demand.

Original: Our plug-and- play model can steer the test case generation process given any attribute model without requiring attribute-specific training of the model.
Revised: Our plug-and- play model can steer the test case generation process given any attribute model without requiring attribute-specific training of the model.

Original: 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.
Revised: 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.

Original: 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.
Revised: 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.

Original: I. I NTRODUCTION
Revised: I. I NTRODUCTION

Original: Machine learning and deep learning-based decision making has become part of today’s software.
Revised: Machine learning and deep learning-based decision making has become part of today’s software.

Original: This creates the need to ensure that machine learning and deep learning-based systems are as trusted as traditional software with increased deployment and wider-use.
Revised: This creates the need to ensure that machine learning and deep learning-based systems are as trusted as traditional software with increased deployment and wider-use.

Original: Traditional software is made dependable by following rigorous practice like static analysis, testing, debugging, verifying, and repairing throughout the development and maintenance life-cycle.
Revised: Traditional software is made dependable by following rigorous practice like static analysis, testing, debugging, verifying, and repairing throughout the development and maintenance life-cycle.

Original: Similarly, for testing and repairing NLP systems, we need inputs where models can fail and thereby bringing out issues early on [52], [53].
Revised: Similarly, for testing and repairing NLP systems, we need inputs where models can fail and thereby bringing out issues early on [4], [5].

Original: For this, counterfactual text data [12], [62] can be used.
Revised: For this, counterfactual text data [6], [7] can be used.

Original: By treating counterfactual text as test cases, we are asking: Would the model fail if the input text was modified to have different characteristics ?
Revised: By treating counterfactual text as test cases, we are asking: Would the model fail if the input text was modified to have different characteristics ?

Original: Furthermore, with such counterfactual text, NLP systems can be repaired by augmenting the training samples with these counterfactual test cases and its labels [10].
Revised: Furthermore, with such counterfactual text, NLP systems can be repaired by augmenting the training samples with these counterfactual test cases and its labels [8].

Original: Hence, enabling model repair by generating counterfactual text is a crucial step in deploying these NLP systems more widely.
Revised: Hence, enabling model repair by generating counterfactual text is a crucial step in deploying these NLP systems more widely.

Original: An important aspect of model testing and repair is to ensure that we can control these counterfactual test cases.
Revised: An important aspect of model testing and repair is to ensure that we can control these counterfactual test cases.

Original: The ability to control will allow us to test for specific types of failures that are important for the deployed model.
Revised: The ability to control will allow us to test for specific types of failures that are important for the deployed model.

Original: Controlled counterfactuals can also allow us to fix the failures by creating new training samples in a focused manner for augmenting the existing training dataset.
Revised: Controlled counterfactuals can also allow us to fix the failures by creating new training samples in a focused manner for augmenting the existing training dataset.

Original: Thus we require a model that can generate counterfactuals that can be controlled by providing some goal attributes.
Revised: Thus we require a model that can generate counterfactuals that can be controlled by providing some goal attributes.

Original: In addition to controlling the test-cases, we would also like to have flexibility about which goal attributes to apply and the flexibility to chain together multiple goal attributes in order to test how the deployed model behaves for a wide variety of textual characteristics.
Revised: In addition to controlling the test-cases, we would also like to have flexibility about which goal attributes to apply and the flexibility to chain together multiple goal attributes in order to test how the deployed model behaves for a wide variety of textual characteristics.

Original: Bringing such flexibility requires a model that allows us to plug-and-play new attribute goals as and when required.
Revised: Bringing such flexibility requires a model that allows us to plug-and-play new attribute goals as and when required.

Original: In this work, we propose a framework for counterfactual testcase generation also called Counterfactual Sentence Generation with Plug-and-Play Perturbation or CASPer that provides both control and flexibility during test case generation.
Revised: In this work, we propose a framework for counterfactual testcase generation also called Counterfactual Sentence Generation with Plug-and-Play Perturbation or CASPer that provides both control and flexibility during test case generation.

Original: To achieve these, we build on the framework of Plug-and-Play
Revised: To achieve these, we build on the framework of Plug-and-Play

Original: Language Models or PPLMs [9].
Revised: Language Models or PPLMs [9].

Original: PPLMs have shown an impressive ability to flexibly steer pre-trained language models to generate attribute-conditioned text samples.
Revised: PPLMs have shown an impressive ability to flexibly steer pre-trained language models to generate attribute-conditioned text samples.

Original: However, PPLMs cannot be directly used for perturbing an input text and generating counterfactual samples.
Revised: However, PPLMs cannot be directly used for perturbing an input text and generating counterfactual samples.

Original: In this work, instead of steering language models, we steer a text-to-text model that is pre-trained to reconstruct its text inputs and we steer this model in a plug-and-play manner.
Revised: In this work, instead of steering language models, we steer a text-to-text model that is pre-trained to reconstruct its text inputs and we steer this model in a plug-and-play manner.

Original: Thus, like PPLM, our model is plug-and-play and is capable of generating counterfactuals for any arbitrary goal attributes provided at sampling time.
Revised: Thus, like PPLM, our model is plug-and-play and is capable of generating counterfactuals for any arbitrary goal attributes provided at sampling time.

Original: In
Revised: In

Original: CASPer, we take BART [151] as our text-to-text reconstruction model.
Revised: CASPer, we take BART [10] as our text-to-text reconstruction model.

Original: To generate each counterfactual, we perturb the hidden layer of the BART model similarly to PPLM to sample the counterfactual text.
Revised: To generate each counterfactual, we perturb the hidden layer of the BART model similarly to PPLM to sample the counterfactual text.

Original: In experiments, we apply our framework to generate counterfactuals by providing named-entity and sentiment-based goal attributes.
Revised: In experiments, we apply our framework to generate counterfactuals by providing named-entity and sentiment-based goal attributes.

Original: We show that our simple plugand-play framework can generate counterfactuals that are fluent and content-preserving while also attaining the goal attributes and being effective as training samples for data-augmentation to improve the performance of the deployed model.
Revised: We show that our simple plugand-play framework can generate counterfactuals that are fluent and content-preserving while also attaining the goal attributes and being effective as training samples for data-augmentation to improve the performance of the deployed model.

Original: We show counterfactual samples generated by CASPer and from existing models in Table I.
Revised: We show counterfactual samples generated by CASPer and from existing models in Table I.

Original: The main contribution of the paper can be seen as three folds:1)
Revised: The main contribution of the paper can be seen as three folds:

Original:  We propose CASPer, the first plug and-play counterfactual generation model that achieves both control and flexibility.
Revised: 1) We propose, CASPer, the first plug-and-play counterfactual generation model that achieves both control and flexibility.

Original: Empirically, we

Original:  show that our approach can generate fluent counterfactuals that preserve the content and 
Revised: 2) Empirically, we show that our approach can generate fluent counterfactuals that preserve the content and also attain the goal attribute.

Original: also

Original: attain the goal attribute.

Original: We

Original:  also show the effectiveness of our counterfactuals as new training data in making the test models robust.
Revised: 3) We also show the effectiveness of our counterfactuals as new training data in making the test models robust.

Original: Inputs
Revised: [Table]

Original: Token-based [15]
Revised: Token-based [Table]

Original: Adversarial [42]
Revised: Adversarial [Table]

Original: Polyjuice [26]
Revised: Polyjuice [ [Table]

Original: Ours
Revised: Ours

Original: [Table]
Revised: [Table]

Original: , EFFECTIVELY ACHIEVES THE STEERING GOAL .
Revised: [Table]

Original: II. P RELIMINARIES A. Counterfactual Text Generation for Model Testing and Repair
Revised: II. P RELIMINARIES A. Counterfactual Text Generation for Model Testing and Repair

Original: Taking a text x from the input distribution and modifying it x → y is known as the task of counterfactual text generation.
Revised: Taking a text x from the input distribution and modifying it x → y is known as the task of counterfactual text generation.

Original: However, our goal of counterfactual text generation is to help improve NLP models by using counterfactual text as test-cases in various stages of the model deployment.
Revised: However, our goal of counterfactual text generation is to help improve NLP models by using counterfactual text as test-cases in various stages of the model deployment.

Original: For such models, we would like to i) test for failures, ii) explain when those failures occur and iii) fix the failures by augmenting the training data with new training samples.
Revised: For such models, we would like to i) test for failures, ii) explain when those failures occur and iii) fix the failures by augmenting the training data with new training samples.

Original: However, from the perspective of model repair, it is not enough to simply obtain uncontrolled and random perturbations x → y to generate these test-cases.
Revised: However, from the perspective of model repair, it is not enough to simply obtain uncontrolled and random perturbations x → y to generate these test-cases.

Original: We would like these testcases to be controlled x control −−−−−→ y through a given control input.
Revised: We would like these testcases to be controlled x control −−−−−→ y through a given control input.

Original: By controlling the generated test cases, we would be able to i) test for specific types of failures that are important for the deployed model, ii) explain which controls lead to high failure and iii) create targeted data sets for augmenting the training set and fixing the models.
Revised: By controlling the generated test cases, we would be able to i) test for specific types of failures that are important for the deployed model, ii) explain which controls lead to high failure and iii) create targeted data sets for augmenting the training set and fixing the models.

Original: Hence, our work lies at the intersection of counterfactual text generation and controlled text generation.
Revised: Hence, our work lies at the intersection of counterfactual text generation and controlled text generation.

Original: In the following subsection, we provide an overview of controlled text generation.
Revised: In the following subsection, we provide an overview of controlled text generation.

Original: B. Controlled Text Generation
Revised: B. Controlled Text Generation

Original: The goal of controlled text generation is to generate samples x from a controlled distribution p ( y | a ) which is conditioned on a specific attribute or control a .
Revised: The goal of controlled text generation is to generate samples x from a controlled distribution p ( y | a ) which is conditioned on a specific attribute or control a .

Original: For example, the language model p ( y | a ) may be used to generate product reviews conditioned on a specific product category by setting a = kitchen .
Revised: For example, the language model p ( y | a ) may be used to generate product reviews conditioned on a specific product category by setting a = kitchen .

Original: 1) Plug-and-Play Language Models: Plug-and-Play Language Models (or simply PPLMs) provide an attractive solution to model the class-conditional distribution p θ ( y | a ) .
Revised: 1) Plug-and-Play Language Models: Plug-and-Play Language Models (or simply PPLMs) provide an attractive solution to model the class-conditional distribution p θ ( y | a ) .

Original: Plug-andplay models take a pre-trained unconditional generative model p θ ( y ) and use the reward signal from the attribute model p ( a | y ) to quickly (in ∼ 10 gradient steps) modify the unconditional generative model p θ ( y ) to generate samples from the desired distribution p θ ( y | a ) .
Revised: Plug-andplay models take a pre-trained unconditional generative model p θ ( y ) and use the reward signal from the attribute model p ( a | y ) to quickly (in ∼ 10 gradient steps) modify the unconditional generative model p θ ( y ) to generate samples from the desired distribution p θ ( y | a ) .

Original: To achieve this, PPLMs [9] take GPT-2 to be the unconditional generative model p θ ( y ) .
Revised: To achieve this, PPLMs [9] take GPT-2 to be the unconditional generative model p θ ( y ) .

Original: In GPT-2, the text generation is done iteratively word-by-word.
Revised: In GPT-2, the text generation is done iteratively word-by-word.

Original: In each iteration t , one word is predicted and is fed back to the Transformer to predict the next word.
Revised: In each iteration t , one word is predicted and is fed back to the Transformer to predict the next word.

Original: This generation process can be described as follows:
Revised: This generation process can be described as follows:

Original: [Equation]
Revised: [Equation]

Original: where t is the word position in the text, H t is the last hidden layer before the prediction head and o t are the log-probabilities of the words in the vocabulary used for sampling the next word y t .
Revised: where t is the word position in the text, H t is the last hidden layer before the prediction head and o t are the log-probabilities of the words in the vocabulary used for sampling the next word y t .

Original: We shall refer to this model as the unmodified language model and denote the distribution that it models for the next word prediction as p ( y t | y <t ) .
Revised: We shall refer to this model as the unmodified language model and denote the distribution that it models for the next word prediction as p ( y t | y <t ) .

Original: To generate a text from p θ ( y | a ) at test time, PPLMs learn a perturbation for the hidden state H t of the unconditional model p θ ( y ) .
Revised: To generate a text from p θ ( y | a ) at test time, PPLMs learn a perturbation for the hidden state H t of the unconditional model p θ ( y ) .

Original: This is achieved as follows:
Revised: This is achieved as follows:

Original: [Equation]
Revised: [Equation]

Original: where ∆ H t is the learned perturbation.
Revised: where ∆ H t is the learned perturbation.

Original: We shall refer to this model as the modified language model and denote the distribution that it models for the next word prediction as ¯ p ( y t | y <t ) .
Revised: We shall refer to this model as the modified language model and denote the distribution that it models for the next word prediction as ¯ p ( y t | y <t ) .

Original: The learning of the perturbation parameters { ∆ H 1 , . . .
Revised: The learning of the perturbation parameters { ∆ H 1 , . . .

Original: , ∆ H T } is driven by the following objective:
Revised: , ∆ H T } is driven by the following objective:

Original: [Equation]
Revised: [Equation]

Original: where the first term provides the learning signal to steer the generation towards the desired class or attribute by trying to maximize the log-probability of the desired attribute.
Revised: where the first term provides the learning signal to steer the generation towards the desired class or attribute by trying to maximize the log-probability of the desired attribute.

Original: The second term tries to keep the generations close to the unmodified language model to ensure that the text remains fluent and plausible.
Revised: The second term tries to keep the generations close to the unmodified language model to ensure that the text remains fluent and plausible.

Original: We note that this learning process is done separately each time we need to generate a new sample.
Revised: We note that this learning process is done separately each time we need to generate a new sample.

Original: However, the learning of the perturbation parameters { ∆ H 1 , . .
Revised: However, the learning of the perturbation parameters { ∆ H 1 , . .

Original: . , ∆ H T } can be done very quickly and it only takes about 10 gradient steps.
Revised: . , ∆ H T } can be done very quickly and it only takes about 10 gradient steps.

Original: This property makes PPLMs flexible during generation.
Revised: This property makes PPLMs flexible during generation.

Original: PPLMs provide some useful properties that are lacking in other conditional generative models that are not plug-and-play.
Revised: PPLMs provide some useful properties that are lacking in other conditional generative models that are not plug-and-play.

Original: Plug-and-play models are flexible during sampling – meaning that new class-conditioning can be easily introduced at test time by simply replacing the attribute model p ( a | y ) with a new attribute model for the new class without requiring costly retraining with respect to the new attribute.
Revised: Plug-and-play models are flexible during sampling – meaning that new class-conditioning can be easily introduced at test time by simply replacing the attribute model p ( a | y ) with a new attribute model for the new class without requiring costly retraining with respect to the new attribute.

Original: Furthermore, plug-and-play models can support conditioning on logical clauses by simply composing multiple attribute models together.
Revised: Furthermore, plug-and-play models can support conditioning on logical clauses by simply composing multiple attribute models together.

Original: For instance, to generate product review text conditioned on a logical clause kitchen + electronics + not electrical , the attribute model p ( a | y ) can be written as the product of individual attribute models p ( kitchen | y ) · p ( electronics | y ) · [1 − p ( electrical | y )] and easily plugged into the PPLM framework [9].
Revised: For instance, to generate product review text conditioned on a logical clause kitchen + electronics + not electrical , the attribute model p ( a | y ) can be written as the product of individual attribute models p ( kitchen | y ) · p ( electronics | y ) · [1 − p ( electrical | y )] and easily plugged into the PPLM framework [9].

Original: Our model architecture is shown in Figure 1.
Revised: Our model architecture is shown in Figure 1.

Original: III. M ETHOD : P LUG - AND -P LAY COUNTERFACTUAL G ENERATION F RAMEWORK
Revised: III. M ETHOD : P LUG - AND -P LAY C

Revised: G ENERATION F RAMEWORK

Original: We now describe our proposed method to generate controlled counterfactual text in a plug-and-play fashion.
Revised: We now describe our proposed method to generate controlled counterfactual text in a plug-and-play fashion.

Original: In particular, given a text x and a control attribute a , we seek to generate a controlled counterfactual y .
Revised: In particular, given a text x and a control attribute a , we seek to generate a controlled counterfactual y .

Original: That is, we seek to draw samples from a distribution p ( y | x , a ) where the generated sample y depends both on the input text x
Revised: That is, we seek to draw samples from a distribution p ( y | x , a ) where the generated sample y depends both on the input text x

Original: and the given control attribute a .
Revised: and the given control attribute a .

Original: Hence, our task is different and more challenging than the simple controlled text generation task where the generated samples need to depend only on the control attribute a .
Revised: Hence, our task is different and more challenging than the simple controlled text generation task where the generated samples need to depend only on the control attribute a .

Original: Our main idea is as follows:
Revised: Our main idea is as follows:

Original: Similar to how PPLM [9] steers a pretrained text generator p ( y ) → p ( y | a ) using the control attribute a , we shall steer a pretrained text-to-text generator p ( y | x ) → p ( y | x , a ) .
Revised: Similar to how PPLM [9] steers a pretrained text generator p ( y ) → p ( y | a ) using the control attribute a , we shall steer a pretrained text-to-text generator p ( y | x ) → p ( y | x , a ) .

Original: In PPLM [9], the base model p ( y ) is a pretrained GPT-2, while in our model, the base model p ( y | x ) is a pretrained BART model.
Revised: In PPLM [9], the base model p ( y ) is a pretrained GPT-2, while in our model, the base model p ( y | x ) is a pretrained BART model.

Original: A BART model is a text-to-text model that takes as input a text x and produces a reconstruction y of the input text.
Revised: A BART model is a text-to-text model that takes as input a text x and produces a reconstruction y of the input text.

Original: The BART text-to-text framework consists of two modules:
Revised: The BART text-to-text framework consists of two modules:

Original: A BERT encoder and a GPT-2 decoder.
Revised: A BERT encoder and a GPT-2 decoder.

Original: That is, the model takes an input text and the BERT encoder first returns a text representation e .
Revised: That is, the model takes an input text and the BERT encoder first returns a text representation e .

Original: This text representation is then given to the
Revised: This text representation is then given to the

Original: GPT-2 decoder to reconstruct the input text word-by-word.
Revised: GPT-2 decoder to reconstruct the input text word-by-word.

Original: This can be summarized as follows:
Revised: This can be summarized as follows:

Original: [Equation]
Revised: [Equation]

Original: where t is the word position in the text, H t is the last hidden layer before the prediction head and o t are the log-probabilities of the words in the vocabulary used for sampling the next word y t .
Revised: where t is the word position in the text, H t is the last hidden layer before the prediction head and o t are the log-probabilities of the words in the vocabulary used for sampling the next word y t .

Original: We will refer to this as the unmodified BART model having the next word prediction distribution p ( y t | y <t , x ) .
Revised: We will refer to this as the unmodified BART model having the next word prediction distribution p ( y t | y <t , x ) .

Original: To steer the BART model, similarly to PPLM, we add a learnable perturbation ∆ H t to the hidden states H t of the unmodified
Revised: To steer the BART model, similarly to PPLM, we add a learnable perturbation ∆ H t to the hidden states H t of the unmodified

Original: BART model.
Revised: BART model.

Original: This can be summarized as follows:
Revised: This can be summarized as follows:

Original: [Equation]
Revised: [Equation]

Original: We will refer to this as the modified BART model having the next word prediction distribution ¯ p ( y t | y <t , x ) Similarly to PPLM, the learning of the perturbation parameters { ∆ H 1 , . . .
Revised: We will refer to this as the modified BART model having the next word prediction distribution ¯ p ( y t | y <t , x ) Similarly to PPLM, the learning of the perturbation parameters { ∆ H 1 , . . .

Original: , ∆ H T } is driven by the following objective:
Revised: , ∆ H T } is driven by the following objective:

Original: [Equation]
Revised: [Equation]

Original: where the first term provides the learning signal to steer the counterfactuals towards the desired goal attribute by trying to maximize the log-probability of the desired attribute.
Revised: where the first term provides the learning signal to steer the counterfactuals towards the desired goal attribute by trying to maximize the log-probability of the desired attribute.

Original: The second term tries to keep the generations close to the unmodified BART to ensure that the text remains similar in content to the original input text and also remains fluent and plausible.
Revised: The second term tries to keep the generations close to the unmodified BART to ensure that the text remains similar in content to the original input text and also remains fluent and plausible.

Original: We note that this learning process is done separately each time we need to generate a new sample.
Revised: We note that this learning process is done separately each time we need to generate a new sample.

Original: However, the learning of the perturbation parameters { ∆ H 1 , . .
Revised: However, the learning of the perturbation parameters { ∆ H 1 , . .

Original: . , ∆ H T } can be done very quickly and it only takes about 100 gradient steps.
Revised: . , ∆ H T } can be done very quickly and it only takes about 100 gradient steps.

Original: This property makes CASPer a flexible way to generate counterfactuals of a given text.
Revised: This property makes CASPer a flexible way to generate counterfactuals of a given text.

Original: Discussion.
Revised: Discussion.

Original: Note that if we simply obtain samples from a pretrained BART model p ( y | x ) , a sample y can be considered as a counterfactual of the input text x .
Revised: Note that if we simply obtain samples from a pretrained BART model p ( y | x ) , a sample y can be considered as a counterfactual of the input text x .

Original: However, this sample would be an almost exact reconstruction of the input text.
Revised: However, this sample would be an almost exact reconstruction of the input text.

Original: Hence from the perspective of model testing, this type of counterfactual would not be much useful.
Revised: Hence from the perspective of model testing, this type of counterfactual would not be much useful.

Original: However, by applying steering to p ( y | x ) using a control attribute a , we are able to control in what way we want to modify the input text to generate the counterfactual.
Revised: However, by applying steering to p ( y | x ) using a control attribute a , we are able to control in what way we want to modify the input text to generate the counterfactual.

Original: Hence, from the perspective of model testing, this type of counterfactual would be useful because we can test how a deployed model will behave if the distribution of its inputs are perturbed in a certain way .
Revised: Hence, from the perspective of model testing, this type of counterfactual would be useful because we can test how a deployed model will behave if the distribution of its inputs are perturbed in a certain way .

Original: IV. R ELATED W ORK
Revised: IV. R ELATED W ORK

Original: The task of controlled text generation is well studied in literature.
Revised: The task of controlled text generation is well studied in literature.

Original: [17] propose a model aims to generate plausible sentences conditioned on representation vectors with semantic structure.
Revised: [11] propose a model aims to generate plausible sentences conditioned on representation vectors with semantic structure.

Original: Another work [16] focuses on controlled text generation, however, unlike the previous work [17], the conditioning need not be simply a class label.
Revised: Another work [12] focuses on controlled text generation, however, unlike the previous work [11], the conditioning need not be simply a class label.

Original: The conditioning can be a data structure such as a table.
Revised: The conditioning can be a data structure such as a table.

Original: The model is trained end-toend similarly to the objective of [17].
Revised: The model is trained end-toend similarly to the objective of [11].

Original: PPLM [9] combine a pre-trained language model, similarly to [1] with an attribute classifier to perform controlled language generation and use the attribute classifier to steer the text generation process without further training of any of the two models.
Revised: PPLM [9] combine a pre-trained language model, similarly to [13] with an attribute classifier to perform controlled language generation and use the attribute classifier to steer the text generation process without further training of any of the two models.

Original: [3], adopting a similar direction, deal with story completion with a desired sentiment.
Revised: [14], adopting a similar direction, deal with story completion with a desired sentiment.

Original: [37] is a model that controls text generation viarigid control codes predetermined at training time.
Revised: [15] is a model that controls text generation viarigid control codes predetermined at training time.

Original: However all these works, cannot be used for counterfactual text generation as these are purely class-conditional generative models and do not allow generation conditioned on a given input text.
Revised: However all these works, cannot be used for counterfactual text generation as these are purely class-conditional generative models and do not allow generation conditioned on a given input text.

Original: Some earlier works, including and not limited to,[2], [9], [257]–[260] propose the idea of steering Language Models but these also can not be directly used for counterfactual generation task.
Revised: Some earlier works, including and not limited to, [9], [16]– [20] propose the idea of steering Language Models but these also can not be directly used for counterfactual generation task.

Original: To tackle text-to-text generation tasks dealing with transfer of style or content, models such as [4]–[6] have been proposed.
Revised: To tackle text-to-text generation tasks dealing with transfer of style or content, models such as [21]–[23] have been proposed.

Original: However, these works are not plug-and-play and lack the use of attribute model that can plugged flexibly at sampling time.
Revised: However, these works are not plug-and-play and lack the use of attribute model that can plugged flexibly at sampling time.

Original: This task of generating controlled counterfactuals has been attempted in prior works by relying on template-matching and token-based substitutions to generate the test-cases [15], [26].
Revised: This task of generating controlled counterfactuals has been attempted in prior works by relying on template-matching and token-based substitutions to generate the test-cases [1], [3].

Original: However, this can require significant human-involvement to curate the templates and the dictionaries.
Revised: However, this can require significant human-involvement to curate the templates and the dictionaries.

Original: Hence, it cannot scale well when template and dictionaries need to be updated frequently.
Revised: Hence, it cannot scale well when template and dictionaries need to be updated frequently.

Original: The work [15] employs a tool Checklist which is one of the attempts to come up with generalized perturbations.
Revised: The work [1] employs a tool Checklist which is one of the attempts to come up with generalized perturbations.

Original: For generation, Checklist uses a set of pre-defined templates, lexicons, generalpurpose perturbations, and context-aware suggestions.
Revised: For generation, Checklist uses a set of pre-defined templates, lexicons, general-purpose perturbations, and context-aware suggestions.

Original: To better evaluate the deployed models, some prior works have relied on human designed test examples or either using templates [15], [155], [169], [190], [200], [238], [250].
Revised: To better evaluate the deployed models, some prior works have relied on human designed test examples or either using templates [1], [24]–[29].

Original: Polyjuice [26], while seeking to automate the process, still requires paired dataset in the form of text and their perturbed versions for different control codes.
Revised: Polyjuice [3], while seeking to automate the process, still requires paired dataset in the form of text and their perturbed versions for different control codes.

Original: Therefore the mapping between text and perturbed version is learned through supervision.
Revised: Therefore the mapping between text and perturbed version is learned through supervision.

Original: Another parallel work Tailor [118] generates perturbations designed for different control codes by making use of a combination of semantic roles and content keywords.
Revised: Another parallel work Tailor [30] generates perturbations designed for different control codes by making use of a combination of semantic roles and content keywords.

Original: And thereby require supervision for different controls.
Revised: And thereby require supervision for different controls.

Original: In contrast, CASPer does not require any task-specific or control-code specific training and can be used to work with different control code models given input text.
Revised: In contrast, CASPer does not require any task-specific or control-code specific training and can be used to work with different control code models given input text.

Original: One work related to ours has been tackled in [107] which generates text samples given a text with a controlling that specify the scope of the generated text.
Revised: One work related to ours has been tackled in [31] which generates text samples given a text with a controlling that specify the scope of the generated text.

Original: LEWIS attempts to generate text perturbations by introducing blanks via template matching and filling in using pretrained language models [206].
Revised: LEWIS attempts to generate text perturbations by introducing blanks via template matching and filling in using pretrained language models [32].

Original: However, this relies on rule-based template matching and human supervision to develop such templates.
Revised: However, this relies on rulebased template matching and human supervision to develop such templates.

Original: CATGen [116] tries to generate attribute-specific text but it requires training of sequence to sequence model with pre-determined control codes for perturbation.
Revised: CATGen [33] tries to generate attribute-specific text but it requires training of sequence to sequence model with pre-determined control codes for perturbation.

Original: Hence, it lacks the flexibility of a plug-and-play approach like ours.
Revised: Hence, it lacks the flexibility of a plug-and-play approach like ours.

Original: MiCE [103] proposes a technique to generate counterfactual explanations which are human interpretable and user-centric.
Revised: MiCE [34] proposes a technique to generate counterfactual explanations which are human interpretable and user-centric.

Original: It fine-tunes a T5 model to generate counterfactual text and use them as explanations for the behavior of the deployed models but lack featureattributions.
Revised: It fine-tunes a T5 model to generate counterfactual text and use them as explanations for the behavior of the deployed models but lack feature-attributions.

Original: Another work [118] tries to generate perturbation with semantic controls but rely on specific templates derived using semantic roles and other labeling heuristics.
Revised: Another work [30] tries to generate perturbation with semantic controls but rely on specific templates derived using semantic roles and other labeling heuristics.

Original: A work close to ours, GYC, the inference of latent representation of the input text with respect to a GPT-2 decoder is done directly via optimization.
Revised: A work close to ours, GYC, the inference of latent representation of the input text with respect to a GPT2 decoder is done directly via optimization.

Original: This approach fails to achieve good inference for long and complex text [107].
Revised: This approach fails to achieve good inference for long and complex text [31].

Original: To target model failure, thus implicitly acting as a form of model testing, prior works have attempted the use of adversarial approaches [181], [198], [229] stemming from the need to build robust models via adversarial testing [42]–[44], [54].
Revised: To target model failure, thus implicitly acting as a form of model testing, prior works have attempted the use of adversarial approaches [35]–[37] stemming from the need to build robust models via adversarial testing [2], [38]–[40].

Original: However, these are still limited to specific deomains and generations are likely to be not plausible to be seen in the input text [55] or may require additional human effort [56].
Revised: However, these are still limited to specific domains and generations are likely to be not plausible to be seen in the input text [41] or may require additional human effort [42].

Original: Some works have attempted to change style attributes automatically either with no control or with predefined style templates [205], [208].
Revised: Some works have attempted to change style attributes automatically either with no control or with predefined style templates [43], [44].

Original: The notion of counterfactuals [8], [12] and their use in model testing for has also been applied towards testing in models that consume structured inputs [65], [66], [68]
Revised: The notion of counterfactuals [6], [45] and their use in model testing for has also been applied towards testing in models that consume structured inputs [46]–[48]

Original: V. E XPERIMENTS
Revised: V. E XPERIMENTS

Original: The goal of the experiments is to: 1) show that a flexible plug-and-play framework can effectively achieve controlled counterfactual text generation and the generated text is fluent, plausible, diverse and follows the steering provided by the attribute model.
Revised: The goal of the experiments is to: 1) show that a flexible plug-and-play framework can effectively achieve controlled counterfactual text generation and the generated text is fluent, plausible, diverse and follows the steering provided by the attribute model.

Original: We evaluate how well the generated perturbations can act as data-augmentation samples in order to make a downstream classification task performance more robust.
Revised: We evaluate how well the generated perturbations can act as data-augmentation samples in order to make a downstream classification task performance more robust.

Original: A. Datasets
Revised: A. Datasets

Original: We evaluate the models on the following data sets text.
Revised: We evaluate the models on the following data sets text

Original:  1) YELP Sentiment Dataset.
Revised: . 1) YELP Sentiment Dataset.

Original: To evaluate how our model is able to change the sentiment of the original text and achieve the target sentiment, we use the YELP sentiment dataset [46].
Revised: To evaluate how our model is able to change the sentiment of the original text and achieve the target sentiment, we use the YELP sentiment dataset [49].

Original: This dataset is also characterized by informal text which can be seen in realistic user inputs.
Revised: This dataset is also characterized by informal text which can be seen in realistic user inputs.

Original: 2) IMDB Sentiment Dataset.
Revised: 2) IMDB Sentiment Dataset.

Original: To further evaluate how our model is able to change the sentiment of the original input text, we test on IMDB Sentiment Dataset [204].
Revised: To further evaluate how our model is able to change the sentiment of the original input text, we test on IMDB Sentiment Dataset [50].

Original: This dataset is also characterized by long and complex text and is thus a challenging dataset.
Revised: This dataset is also characterized by long and complex text and is thus a challenging dataset.

Original: B. Controlled Text Generation with Attribute Steering
Revised: B. Controlled Text Generation with Attribute Steering

Original: We first evaluate the quality of our generated text with respect to the steering signal.
Revised: We first evaluate the quality of our generated text with respect to the steering signal.

Original: We expect our generated text to preserve the semantic content and syntactic structure of the input text while being fluent and diverse as we steer the text towards the target attribute.
Revised: We expect our generated text to preserve the semantic content and syntactic structure of the input text while being fluent and diverse as we steer the text towards the target attribute.

Original: The steering signal we evaluate in this work is to make the sentiment of the target text from negative to positive.
Revised: The steering signal we evaluate in this work is to make the sentiment of the target text from negative to positive.

Original: 1) Baselines: To compare with state-of-the-art templatebased methods relying on token substitutions via dictionaries we compare with Checklist [15].
Revised: 1) Baselines: To compare with state-of-the-art templatebased methods relying on token substitutions via dictionaries we compare with Checklist [1].

Original: We specifically consider the perturbation helper that relies on RoBERTa [49] to fillin-the-blank.
Revised: We specifically consider the perturbation helper that relies on RoBERTa [51] to fill inthe- blank

Original: In comparison to this baseline, we expect ours to generate more fluent and diverse text samples that is free from the restrictions of the pre-specified templates.
Revised: In comparison to this baseline, we expect ours to generate more fluent and diverse text samples that is free from the restrictions of the pre-specified templates We also compare against Masked

Original: We also compare against Masked-LM [36], which is a dictionary-free approach but stillrelies on masking a specific token in the input text and and letting the model fill-in the masked token.
Revised: LM , which is a dictionary-free approach but still

Revised: relies

Revised: on

Revised: masking a specific token in the input text

Revised: and and letting the

Revised: model fill-

Revised: in

Revised: the

Revised: masked token.

Revised: Metrics

Revised: Dataset

Revised: RoBERTa

Revised: [Table]

Revised: -based

Revised: GPT

Revised: Gradient-based

Revised: [Table]

Revised: Polyjuice

Revised: [Table]

Original:  The randomness in this filling-in process leads to generation of counterfactual samples.
Revised: [Table] [Table] [Table] The randomness in this filling-in process leads to generation of counterfactual samples.

Original: Hence this model generates only tokenlevel substitutions and does not generate fluent sentence-level text.
Revised: Hence this model generates only tokenlevel substitutions and does not generate fluent sentence-level text.

Original: We expect CASPer to address this limitation of purely token-level substitutions.
Revised: We expect CASPer to address this limitation of purely token-level substitutions.

Original: To compare with state-of-the-art adversarial methods we compare with Hotflip [44] [42].
Revised: To compare with state-of-the-art adversarial methods we compare with Hotflip [39] [2].

Original: In comparison to this baseline, we expect ours to generate more fluent samples.
Revised: In comparison to this baseline, we expect ours to generate more fluent samples.

Original: We expect to see that content preservation of such approaches is high as these methods rely on changing the highest gradient word with another word that would flip the label.
Revised: We expect to see that content preservation of such approaches is high as these methods rely on changing the highest gradient word with another word that would flip the label.

Original: To compare with state-of-the-art text generation methods we compare with PPLM [9] based on GPT-2 [19] and Polyjuice [26] based on finetuned GPT-2 [19].
Revised: To compare with state-of-the-art text generation methods we compare with PPLM [9] based on GPT-2 [53] and Polyjuice [3] based on finetuned GPT-2 [53].

Original: In comparison to this baseline, we expect ours to generate more fluent and diverse Metrics Dataset
Revised: In comparison to this baseline, we expect ours to generate more fluent and diverse samples.

Original: RoBERTa

Original: Token-based

Original: Ours

Original: [Table]

Original: Polyjuice [Table] samples. While for PPLM, since it simply takes a prompt text and completes the text, it has no incentive to generate text that preserves its content.
Revised: While for PPLM, since it simply takes a prompt text and completes the text, it has no incentive to generate text that preserves its content.

Original: Thus, we expect ours to preserve content better.
Revised: Thus, we expect ours to preserve content better.

Original: In diversity of the samples, PPLM, because it is not tasked with preserving content, can generate arbitrary and overly diverse samples.
Revised: In diversity of the samples, PPLM, because it is not tasked with preserving content, can generate arbitrary and overly diverse samples.

Original: Thus we highlight that while we perform a comparison of sample diversity between PPLM and our model, still the performances are not directly comparable because the expectations are different from both models.
Revised: Thus we highlight that while we perform a comparison of sample diversity between PPLM and our model, still the performances are not directly comparable because the expectations are different from both models.

Original: For
Revised: For

Original: Polyjuice, we expect ours to generate more fluent and diverse samples because, unlike Polyjuice, ours is free from specific template-based generation.
Revised: Polyjuice, we expect ours to generate more fluent and diverse samples because, unlike Polyjuice, ours is free from specific template-based generation.

Original: 2) Metrics: To assess the quality of generated counterfactual text we focus on evaluating content preservation, fluency, diversity and syntactic similarity.
Revised: 2) Metrics: To assess the quality of generated counterfactual text we focus on evaluating content preservation, fluency, diversity and syntactic similarity.

Original: We use the following metrics to measure the above characteristics.
Revised: We use the following metrics to measure the above characteristics.

Original: 1) Content Preservation.
Revised: 1) Content Preservation.

Original: By measuring content preservation, we assess the similarity between input text and the counterfactual text samples.
Revised: By measuring content preservation, we assess the similarity between input text and the counterfactual text samples.

Original: For this, we use the transformer model proposed in 
Revised: For this, we use the transformer model proposed in [54].

Original: While higher content preservation is desirable in general, this metric alone does not provide the complete evaluation.
Revised: While higher content preservation is desirable in general, this metric alone does not provide the complete evaluation.

Original: Therefore for proper evaluation, we will introduce a second metric that measures sample diversity.
Revised: Therefore for proper evaluation, we will introduce a second metric that measures sample diversity.

Original: 2) Diversity.
Revised: 2) Diversity.

Original: This metric evaluates how different are the generated samples from each other.
Revised: This metric evaluates how different are the generated samples from each other.

Original: We find the BLEU4 score between the input text and the generated text.
Revised: We find the BLEU4 score between the input text and the generated text.

Original: Hence, if this score is lower, then the generated counterfactual samples have a high diversity at the token level.
Revised: Hence, if this score is lower, then the generated counterfactual samples have a high diversity at the token level.

Original: 3) Fluency.
Revised: 3) Fluency.

Original: Fluency of the generated samples is important to evaluate because the samples must come from a distribution that the test model is likely to see when it is deployed.
Revised: Fluency of the generated samples is important to evaluate because the samples must come from a distribution that the test model is likely to see when it is deployed

Original: This is computed by finding the perplexity score of the generated output.
Revised: This is computed by finding the perplexity score of the generated output.

Original: We take a GPT-2 model for computing the perplexity.
Revised: We take a GPT-2 model for computing the perplexity.

Original: Lower perplexity implies that the generated text is more fluent.
Revised: Lower perplexity implies that the generated text is more fluent.

Original: 3) Quantitative Results: In Tab. II, our results on perplexity show that CASPer outperforms the baselines significantly and achieves a lower perplexity score.
Revised: 3) Quantitative Results: In Tab. III, our results on perplexity show that CASPer outperforms the baselines significantly and achieves a lower perplexity score.

Original: This shows that the samples generated by CASPer are fluent and plausible.
Revised: This shows that the samples generated by CASPer are fluent and plausible.

Original: We also show that CASPer is able effectively preserve the content in its samples.
Revised: We also show that CASPer is able effectively preserve the content in its samples.

Original: We note that our model is competitive with rule-based token substitution methods like Checklist.
Revised: We note that our model is competitive with rule-based token substitution methods like Checklist.

Original: Lastly, in terms of BLEU-4 score, we note that our model again outperforms the baselines with our generated samples achieving the lowest values of BLEU-4 score with the original input text only exception being PPLM.
Revised: Lastly, in terms of BLEU-4 score, we note that our model again outperforms the baselines with our generated samples achieving the lowest values of BLEU-4 score with the original input text only exception being PPLM.

Original: This shows that our model indeed generates diverse samples with that have low tokenlevel match with the input text.
Revised: This shows that our model indeed generates diverse samples with that have low tokenlevel match with the input text.

Original: In diversity of the samples, the baseline model PPLM, because it is not tasked with preserving content, can generate arbitrary and overly diverse samples.
Revised: In diversity of the samples, the baseline model PPLM, because it is not tasked with preserving content, can generate arbitrary and overly diverse samples.

Original: Thus we highlight that while we perform a comparison of sample diversity between PPLM and our model, still the performances are not directly comparable because the expectations are different from both models.
Revised: Thus we highlight that while we perform a comparison of sample diversity between PPLM and our model, still the performances are not directly comparable because the expectations are different from both models.

Original: Considering the performance on all the metrics together shows that CASPer is able to effectively generate samples that preserve the original content, are fluent and diverse in comparison to the baselines.
Revised: Considering the performance on all the metrics together shows that CASPer is able to effectively generate samples that preserve the original content, are fluent and diverse in comparison to the baselines.

Original: 4) Qualitative Analysis: In Tab.
Revised: 4) Qualitative Analysis: In Tab.

Original: III, we show samples of text generated by CASPer.
Revised: IV, we show samples of text generated by CASPer.

Original: We show two experiments.
Revised: We show two experiments.

Original: In the first experiment, our steering goal was to take an input text and perturb it so that the probability of its sentiment becomes large.
Revised: In the first experiment, our steering goal was to take an input text and perturb it so that the probability of its sentiment becomes large.

Original: The probability of the sentiment is estimated using a pre-trained sentiment classification model.
Revised: The probability of the sentiment is estimated using a pre-trained sentiment classification model.

Original: The initial label of the text was negative.
Revised: The initial label of the text was negative.

Original: On the right we note that CASPer has successfully perturbed the text to change its sentiment label to positive.
Revised: On the right we note that CASPer has successfully perturbed the text to change its sentiment label to positive.

Original: Furthermore, note that the generated sample have good content preservation as all the samples talk about movies and actors.
Revised: Furthermore, note that the generated sample have good content preservation as all the samples talk about movies and actors.

Original: Furthermore, the model makes some important changes to the content that result in a change in the sentiment of the text.
Revised: Furthermore, the model makes some important changes to the content that result in a change in the sentiment of the text.

Original: We also note that each sample is different from the other thus producing diverse samples.
Revised: We also note that each sample is different from the other thus producing diverse samples.

Original: Lastly, we note thatthe samples are fluent and plausible text samples. In the second experiment, our steering goal was to take a sentence that does not contain a location named-entity and perturb it so that contains a location named-entity. We see that CASPer produces samples that contain a location namedentity tag. We also note that the named entity that the model introduces are diverse and are used in a variety of contexts in the generated text.
Revised: Lastly, we note that

Original: As before, the text samples are fluent and preserve the content of the original input text.

Original: For this task, note that these samples clearly retain the sentiment of the text and only introduce some location entities.

Original: Because we expect the actual location (i.e. UK or Libya) should not be a causal term in prediction of the sentiment of the text, these samples can act as effective samples for augmenting the training data when we train a downstream sentiment model.

Original: While a model that is

Original: Inputs
Revised: Inputs

Original: [Table]
Revised: [Table]

Original: We know from other movies that the writers can’t solve problems, like this one.
Revised: We know from other movies that the writers can’t solve problems, like this one.

Original: The actors are also good.
Revised: The actors are also good.

Original: [Table]
Revised: [Table]

Original: We
Revised: We

Original: [Table]
Revised: [Table]

Original: We
Revised: We

Original: [Table]
Revised: [Table]

Original: We
Revised: We

Original: [Table]
Revised: [Table]

Original: We know
Revised: We know

Original: [Table]
Revised: [Table]

Original: they
Revised: they

Original: [Table]
Revised: [Table]

Original: was
Revised: was

Original: [Table]
Revised: [Table]

Original: We
Revised: We

Original: [Table]
Revised: [Table]

Original: are
Revised: are

Original: [Table]
Revised: [Table]

Original: They
Revised: They

Original: [Table]
Revised: [Table]

Original: The premise was
Revised: The premise was

Original: [Table]
Revised: [Table]

Original: Input
Revised: Input

Original: Text
Revised: Text

Original: [Table]
Revised: [Table]

Original: A wonderful little production.
Revised: A wonderful little production.

Original: The filming technique is very unassuming- very old-time-BBC fashion.
Revised: The filming technique is very unassuming- very old-time-BBC fashion.

Original: [Table] [Table]
Revised: [Table] [Table]

Original: entity is present
Revised: entity is present

Original: [Table]
Revised: [Table]

Original: the
Revised: the

Original: [Table]
Revised: [Table]

Original: A wonderful first look at this film from the UK.
Revised: A wonderful first look at this film from the UK.

Original: The filming is unassertive.
Revised: The filming is unassertive.

Original: ¡/s¿ioisalso
Revised: ¡/s¿ioisalso

Original: one of the best productions.
Revised: one of the best productions.

Original: Location Named-Entity : UK
Revised: Location Named-Entity : UK

Original: A wonderful little Theatre is an old-time BBC production, set in an old London apartment block.
Revised: A wonderful little Theatre is an old-time BBC production, set in an old London apartment block.

Original: The film is set in London landmarks Location Named-Entity : London A Wonderful Little Edition by BBC Films - set, out in UK now via iPlayer.
Revised: The film is set in London landmarks Location Named-Entity : London A Wonderful Little Edition by BBC Films - set, out in UK now via iPlayer.

Original: A wonderful little production with some nice twists.
Revised: A wonderful little production with some nice twists.

Original: Location Named-Entity : UK
Revised: Location Named-Entity : UK

Original: A wonderful little series about a BBC crew in Africa.
Revised: A wonderful little series about a BBC crew in Africa.

Original: Well-executed bythe team who are experienced in film and rigging procedures.
Revised: Well-executed bythe team who are experienced in film and rigging procedures.

Original: Location Named-Entity : Africa
Revised: Location Named-Entity : Africa

Original: A wonderful little show about BBC’s wartime bombing of Libya contributed by Peter Bradshaw in 1959.
Revised: A wonderful little show about BBC’s wartime bombing of Libya contributed by Peter Bradshaw in 1959.

Original: Location Named-Entity : Libya
Revised: Location Named-Entity : Libya

Original: [Table]
Revised: [Table]

Original: Goal : To maximize the probability of the positive class label with respect to a pre-trained sentiment classifier.
Revised: Goal : To maximize the probability of the positive class label with respect to a pre-trained sentiment classifier.

Original: Input Text : I had the terrible misfortune of having to view this "b-movie" in it’s entirety.
Revised: Input Text : I had the terrible misfortune of having to view this "b-movie" in it’s entirety.

Original: All I have to say is--- save your time and money!!
Revised: All I have to say is--- save your time and money!!

Original: [Table]
Revised: [Table]

Original: I have the wonderful misfortune of
Revised: I have the wonderful misfortune of

Original: [Table]
Revised: [Table]

Revised: [Table]

Revised: CASPer

Revised: [Table]

Revised: [Table]

Revised: [Table]

Original: [Table]
Revised: [Table]

Revised: the samples are fluent and plausible text samples.

Revised: In the second experiment, our steering goal was to take a sentence that does not contain a location named-entity and perturb it so that contains a location named-entity.

Revised: We see that CASPer produces samples that contain a location namedentity tag.

Revised: We also note that the named entity that the model introduces are diverse and are used in a variety of contexts in the generated text.

Revised: As before, the text samples are fluent and preserve the content of the original input text.

Revised: For this task, note that these samples clearly retain the sentiment of the text and only introduce some location entities.

Revised: Because we expect the actual location (i.e. UK or Libya) should not be a causal term in prediction of the sentiment of the text, these samples can act as effective samples for augmenting the training data when we train a downstream sentiment model.

Original:  biased may predict different labels based on the actual location token used, this kind of data augmentation will regularize the model to be more robust to such changes which should ideally not affect the predicted label of the test model.
Revised: While a model that is biased may predict different labels based on the actual location token used, this kind of data augmentation will regularize the model to be more robust to such changes which should ideally not affect the predicted label of the test model.

Original: C. Controlled Text for Model Robustification
Revised: C. Controlled Text for Model Robustification

Original: In this section, we evaluate how well our generated samples can improve robustness of the test classifier.
Revised: In this section, we evaluate how well our generated samples can improve robustness of the test classifier.

Original: For this, we generated text samples to introduce a location named-entity in the input text.
Revised: For this, we generated text samples to introduce a location named-entity in the input text.

Original: We assume that simply introducing a location named-entity should not change the class label of the text with respect to the test model.
Revised: We assume that simply introducing a location named-entity should not change the class label of the text with respect to the test model.

Original: Hence, after generating the controlled perturbations, we take the original label of the input text from the training set and assign the same label to the generated samples.
Revised: Hence, after generating the controlled perturbations, we take the original label of the input text from the training set and assign the same label to the generated samples.

Original: These new examples are added to the training set and producing data-augmented training set.
Revised: These new examples are added to the training set and producing data-augmented training set.

Original: Using this augmented training set, we then train the test model.
Revised: Using this augmented training set, we then train the test model.

Original: 1) Baselines and Metrics: We generate samples using CASPer.
Revised: 1) Baselines and Metrics: We generate samples using CASPer.

Original: We augment the generated samples to the training set and train the test model.
Revised: We augment the generated samples to the training set and train the test model.

Original: We compared the accuracy of the test model trained without data augmentation and then trained with data augmentation via our counterfactual generation method.
Revised: We compared the accuracy of the test model trained without data augmentation and then trained with data augmentation via our counterfactual generation method.

Original: 2) Quantitative Results:
Revised: 2) Quantitative Results:

Revised: In Table

Revised: V

Original: In Table IV we show a comparison betweenthe models.
Revised: we show a comparison between

Original:  We note that the samples generated by 
Revised: the models We note that the samples generated by CASPer using NER model

Original: CASPer using NER model are effective in robustifying the test model and produces significant improvement in the accuracy as compared to when training with original samples.
Revised: 1 are effective in robustifying the test model and produces significant improvement in the accuracy as compared to when training with original samples

Original: VI. C ONCLUSION
Revised: VI. C ONCLUSION

Original: In this paper, we introduced CASPer, a plug-and-play counterfactual text generation framework.
Revised: In this paper, we introduced CASPer, a plug-and-play counterfactual text generation framework.

Original: We showed that our generated controlled perturbations preserve the content of the original text while also being fluent, diverse and effective in terms of the provided steering signal flexibly.
Revised: We showed that our generated controlled perturbations preserve the content of the original text while also being fluent, diverse and effective in terms of the provided steering signal flexibly.

Original: We showed that samples generated by CASPer can act as effective candidates for training data augmentation and improve the robustness of the target model and preventing the target model from modeling spurious correlations between the target label and non-causal aspects of the input text.
Revised: We showed that samples generated by CASPer can act as effective candidates for training data augmentation and improve the robustness of the target model and preventing the target model from modeling spurious correlations between the target label and non-causal aspects of the input text.