TASA: Deceiving Question Answering Models by Twin Answer Sentences Attack
Paper · 2022 · Yu Cao, Dianqi Li, Meng Fang et al.
Summary
An extractive question answering system answers by selecting a passage of text from what it has been given. The right words can be present, and the question can be clear, yet the system can still choose a phrase that belongs to the wrong person, object, or event. Cao and colleagues investigate why that happens. On SQuAD 1.1, they find that removing content words shared by the question and the sentence containing the answer hurts BERT and BiDAF substantially. Both can still do surprisingly well when those words and the answer are left in an otherwise sparse sentence. Even a shuffled version can score well. The experiments suggest that a system can locate many correct answers through word matching while remaining sensitive to changes that leave the relevant relationship understandable to a reader.
The authors call their test Twin Answer Sentences Attack, or TASA. It starts with the sentence that contains the reference answer. One version rewords some of the surrounding vocabulary while keeping the answer in place. A second version resembles the wording of the original more closely, but changes whom or what the sentence is about and supplies a different answer. The first version replaces the source sentence, while the second appears at the end of the passage. The question stays the same. The resulting example tests whether the system will follow the evidence about the requested subject when a competing sentence gives it a stronger match to the question's vocabulary.
The authors evaluate the method on the development sets of SQuAD 1.1, NewsQA, Natural Questions, HotpotQA, and TriviaQA. For BERT-base on SQuAD 1.1, the reported answer F1 is 88.23 on the original development set and 50.87 on the examples TASA generates. On the same benchmark, SpanBERT-large has an original F1 of 94.00 and a TASA F1 of 65.50. The approach is particularly effective on SQuAD 1.1, Natural Questions, and HotpotQA, while the order of the methods is less consistent on NewsQA and TriviaQA. The methods also produce different numbers of usable examples, so their reported scores can reflect which inputs they cover as well as what their edits do.
A human evaluation on SQuAD 1.1 finds that the original answer survives in 79.1% of the sampled TASA cases, with a reported confidence interval of ±4.7. Annotators rank its prose quality between the two automatic baselines. The authors also find that predictions on edited passages resemble the inserted wrong answers more closely than predictions on the original passages do. In a separate experiment, training BERT on a suitable mixture of original and TASA examples improves its performance on both TASA and AddSent examples while largely preserving its performance on the original development data. The findings connect a specific failure in choosing textual evidence with a way to test for it and a preliminary result on training against it.
Deep dive: TASA: Deceiving Question Answering Models by Twin Answer Sentences Attack
TASA tests whether extractive question answering follows the evidence when the right answer is reworded and a wrong answer sounds more relevant. · about 35 minutes to read
The problem and its context
A plausible answer can belong to the wrong sentence
Extractive reading comprehension gives a system a question and a passage. Its output is a span, a continuous stretch of that passage identified by where it begins and ends. This setup makes it possible to inspect the text from which an answer was taken. It also leaves open a question about how the system found it. A passage may contain several phrases of the right general kind, such as names, dates, or places. To choose among them, the system has to determine which phrase fills the role specified by the question. Finding familiar words near a plausible answer can lead to the right choice on an ordinary benchmark even when that association would fail as soon as another candidate entered the passage.
The paper draws on a distinction between the sentence containing a reference answer and the passage around that sentence. The authors call the former the answer sentence. It gives them a concrete part of the passage to examine. The reference answer, also called the gold answer, is the text annotated as correct for that question. The rest of the answer sentence can do several jobs. It can name the person or thing in the question, express the relationship being asked about, and carry grammatical information about how the participants fit together. Words in the sentence may also happen to repeat words from the question. Those properties frequently occur together, so ordinary scores give limited evidence about which ones mattered in a given prediction.
A location question in the paper illustrates the distinction. It asks for the city associated with the Moscone Center. The relevant sentence describes an event at the center and places it in San Francisco. The venue name identifies the referent, the location wording expresses the relationship, and the city supplies the answer. The authors show altered forms in which they keep the city but selectively remove other parts of the sentence. A fragment can consequently retain the location vocabulary while losing the name of the venue it is supposed to locate. Success on such a fragment reveals something about what is sufficient for a prediction in that setting. Because the city remains visible, it leaves open whether the same cues would still work in a passage with several cities.
This is the gap the paper studies. A conventional benchmark measures whether the selected answer agrees with a reference. A controlled change can ask whether that agreement survives when a cue and the evidence come apart. Rewording the evidence can reduce a useful surface cue without necessarily changing what the text says. Introducing a competing sentence can make the cue stronger elsewhere while placing its answer in a different relationship. Both changes probe the choice of evidence. Their scientific value depends on the reader still being able to resolve the question from the revised passage.
What earlier work had tested
The paper places this question in a field where extractive reading comprehension had already benefited from both task-specific architectures and pretraining. It discusses BiDAF, R-Net, and QANet as systems built for reading comprehension, and BERT, RoBERTa, and SpanBERT as pretrained systems that could be adapted to the task. The paper cites improvements in benchmark performance as the reason to examine failure modes more closely. As accuracy rises, it matters whether an improvement reflects broader use of the passage or more effective exploitation of cues that the benchmark usually supplies. BiDAF · BERT · RoBERTa · SpanBERT
The authors also connect their question to earlier work on adversarial examples in natural language processing. An adversarial example deliberately changes an input to expose an unreliable prediction. Prior text work had considered edits at several levels, from misspellings within words to changes in whole phrases and sentences. The paper notes that a text edit has to contend with discrete word choices, grammar, and meaning. The extractive task adds a further dependency. A passage can remain grammatical after an edit while ceasing to answer its question, and a reasonable-sounding question rewrite can alter what counts as the correct span. This gives the evaluator two texts to consider together even if the intervention changes only one of them.
Earlier work already offered ways to challenge reading comprehension directly. AddSent supplied passages with distracting sentences produced with human involvement. Another line of work had people interact with a question answerer to develop challenging cases. The paper treats those approaches as effective and points to the effort required to generate such examples at scale. A human-produced distractor is also a meaningful comparison for an automatic method because its quality can differ substantially from text produced by a generic perturbation procedure.
The paper describes several automatic approaches as well. T3 generates a distracting sentence from a representation of the question's structure. Work on question paraphrasing challenges the phrasing of the question. Universal adversarial triggers look for a reusable input pattern capable of changing predictions for a category of questions. These studies place interventions in different parts of the input and make different assumptions about the information available to the evaluator. TASA takes the particular relationship between a question and its existing answer sentence as the starting point for each case. Universal Adversarial Triggers
The distinction matters especially when the evaluation aims to preserve the answer. An appended sentence that happens to mention the same subject may make the passage ambiguous, making an apparent failure hard to interpret. A sentence that changes the subject but also changes every word connecting it to the question may create little competition. The paper's design puts those two concerns together. It tries to retain the evidence a reader needs while making the wording a less reliable guide to where that evidence appears.
How the authors isolated the shared words
Before evaluating TASA, the authors conduct a diagnostic study on SQuAD 1.1. They train BERT and BiDAF on the original training data and compare their predictions across versions of the validation examples. One condition gives the system just the answer sentence. Other conditions leave the rest of the passage intact and modify only that sentence. The distinction matters because a result obtained from the sentence alone speaks to how much surrounding context these examples require, while a result obtained by changing words within that sentence speaks to what cues the system can use once the sentence is available.
The authors group overlapping words into three categories. Named entities are mentions such as the same venue or person in the question and the answer sentence. Lexical words are shared content words, such as verbs, adjectives, and common nouns, with the named entities treated separately. Function words are shared grammatical items, such as determiners, adpositions, and pronouns. A removal condition takes away the chosen category. A retention condition keeps the chosen category and removes other material within the answer sentence. The reference answer is protected in both cases. For the lexical-only condition, the paper also examines shuffled token orders. Named entity recognition · Part-of-speech tagging
These variants can be difficult for a person to read. Their role is diagnostic. Keeping the reference span visible lets the authors see how much the surrounding fragments can guide the system to it, even when the sentence has lost its ordinary structure. Removing a class of words asks the complementary question of how much predictions suffer when that class disappears. The controlled categories give the authors a reason to focus on shared content vocabulary in TASA. They also establish why an evaluation of the eventual method needs a separate check on the quality and interpretation of its passages.
The method, step by step
The two roles of the answer sentence
TASA starts from an annotated example. The question establishes which fact the passage must still support. The reference span identifies the answer whose written form the method is intended to preserve. The sentence containing that span supplies the source for both versions of the sentence. One version should still express the requested fact with some different wording. The other is meant to offer a plausible-looking span associated with different participants. Its proposed wrong answer is called a pseudo answer.
The paper illustrates this with a question about the electricity Tesla investigated. In the original passage, an earlier mention names Tesla and the relevant sentence refers back to him with a pronoun. The edited evidence makes the person explicit and changes some wording near the reference answer. The added sentence describes someone else investigating a different kind of electricity. For a reader, the name determines which of the two accounts addresses the question. For the system being evaluated, the close verbal resemblance of the added sentence tests whether its answer selection respects that distinction.
How TASA constructs a reading comprehension test
The steps in order.
References across sentences are a practical issue in forming the pair. A pronoun is interpreted through its connection to a mention elsewhere in the passage. The connection between mentions of the same referent is called coreference. A sentence that is copied or moved can become harder to interpret when a pronoun is separated from that earlier mention. The authors use NeuralCoref with SpaCy to identify such links and replace relevant pronouns with explicit names. This also gives the method an identifiable participant to work with when constructing the competing sentence. Coreference resolution
The method description explains the answer sentence in terms of matching the answer text. The implementation appendix specifies how the annotated position is used to locate the sentence. This difference matters when the same answer string occurs in several places. Its first appearance in the passage can belong to a sentence with a different evidential role. When several spans are annotated, the appendix gives preference to the one selected most frequently by annotators and also describes using the first span in the passage. TASA then uses the identified sentence as the local starting point, although the passage remains the input to the question answerer.
Rewording the evidence
The first edited version is the perturbed answer sentence, abbreviated PAS. Its purpose is to retain the evidence while weakening some of the shared wording around it. The eligible words are outside the reference span, overlap with the question at the level of the lemma, and have one of the selected content-word tags. A lemma is the base form shared by inflected versions of a word. The tag categories in the implementation include verbs, nouns, adjectives, and adverbs. Both restrictions connect this part of the procedure to the lexical diagnostic while leaving the answer text itself available for extraction. Lemma
The procedure treats different words as having different influence on the original answer. The paper expresses its objective and its diagnostic for this influence as follows.
F(c′, q) ≠ a
Here, F is the question answerer, c′ is the revised passage, q is the original question, and a denotes the annotated answer. The symbol ≠ expresses disagreement between the predicted answer and the reference answer. In this setup, a disagreement is an adversarial failure only insofar as the revised passage still supports the reference answer for a reader. A change to its location in the input can accompany a revision, so the substantive requirement is that the annotated answer text and its supporting meaning remain available.
Iᵢ = p_F(a | c, q) − p_F(a | mask(c, xᵢ), q)
Iᵢ is the importance assigned to candidate word xᵢ, where i identifies the word. p_F is the answer-span probability supplied by F. The notation after | gives the passage and question on which that probability is conditioned. The unmodified passage is c, the question is q, and a is the reference span. mask(c, xᵢ) denotes the version of the passage in which the selected occurrence is replaced with a mask symbol. The subtraction measures the loss of reference-answer probability under that temporary change. A high score says that the system was sensitive to the disappearance of that occurrence in this test.
The mask used for measurement and the wording used in an actual example serve different purposes. The measurement asks how much a word influences the system's preference for the reference span. The revised sentence needs a readable replacement. The authors draw alternatives from WordNet and PPDB 2.0, pooling dictionary synonyms and token-level paraphrases. The implementation uses pyinflect to adapt replacements to the original inflection. An alternative can involve a phrase where the source used a single word. Its value to the test depends on whether it can express the same content in that particular sentence.
The authors consider the candidates in descending order of the importance score. A promising choice early in the sequence influences which combinations get considered later. This is a reason to distinguish between the importance of a word when masked in the original passage and the effect of a complete revised sentence. A word can matter under masking while offering few natural substitutes, and two individually acceptable substitutions can read awkwardly when combined. The method therefore evaluates candidate sentences as they develop and carries several forward to the next stage.
Building a competing sentence
The second version is the distracting answer sentence, abbreviated DAS. It is derived from the source answer sentence, so it inherits wording that was already relevant to the question. Its role is to preserve visible lexical cues while changing what those cues connect. The paper describes editing named entities and nouns outside both the reference span and the protected keyword set. The authors use those categories as practical proxies for participants in the sentence. They report finding this approach more effective for their purpose than trying to locate grammatical subjects and objects with a parser.
The method uses broad type compatibility when considering alternative participants. An entity can be replaced by another of the same entity type. In the main method description, ordinary nouns are matched through a shared hypernym, a more general category to which both can belong. The implementation appendix describes corpus dictionaries organized by entity and part-of-speech tags and sampling according to those tags. These descriptions establish how the paper constrains replacements at the level of category. They give a more limited guarantee about whether a resulting phrase makes sense in the topic and discourse of the whole passage.
The answer text in this competing sentence is handled separately. The authors give the sentence a pseudo answer made from replacements for the lexical material in the original span. This changes what would be extracted by a system that followed the competing sentence. Category matching can keep the alternative in a broadly appropriate answer class, which makes it possible to examine a failure of attribution instead of a failure to tell that a question calls for a name or some other kind of phrase. The answer in the supporting sentence remains the reference for evaluating correctness.
The paper's qualitative examples make it clear why the distinction between a broad type and a coherent alternative matters. The two sentences may be easy to tell apart because they apply to different named subjects. Other cases depend on interpreting descriptions that were already linked indirectly to a named referent. A distractor can also read awkwardly even if its replacement words satisfy local grammatical tags. TASA's main claim about the pair is therefore about the complementary roles of its sentences. The experimental quality checks are needed to establish how frequently a generated passage realizes those roles clearly.
Keeping candidates and screening the evidence
The authors use beam search to keep the number of candidates manageable. A beam is a limited collection of partial solutions. At each stage, several revised sentences may descend from the same preceding version. A fixed-size beam retains the stronger candidates for further consideration. The paper uses a score based on the effect of an edited sentence on the probability of the reference answer.
Eₙ = p_F(a | c, q) − p_F(a | edit(c, sₙ), q)
Eₙ is the effect score of candidate sentence sₙ, and n identifies the candidate. p_F is the probability assigned by the question answerer F to reference span a, with c and q denoting the original passage and question. The expression edit(c, sₙ) denotes the passage after the candidate sentence is applied. For a PAS, that means replacing the source answer sentence. For a DAS, it means appending the competing sentence. The subtraction measures the decrease in reference-answer confidence. When the authors form pairs, they evaluate a distractor in association with a passage that has already received its corresponding PAS.
The importance and effect scores answer different questions. The first measures sensitivity to a word temporarily disappearing from the original context. The second measures the system's response to a revised passage. The reference answer remains the common point of comparison. The effect score also differs from the final benchmark scores. A change in confidence can be visible to the search while the top span remains the same, whereas exact match and answer F1 respond to the span actually selected.
The authors retain a beam of size M, where M = 5 in their experiments. For PAS, the algorithm permits an early stop once the weakest retained candidate reaches the effect threshold T_E. In the reported settings, T_E = 0.2. The appendix also describes a cap of 5 perturbations for each sentence type. Multiple retained PAS candidates can seed the competing-sentence stage, so the final pair can come from a revision that works well with a specific distractor. The scoring principle leaves an important role for the quality screen. The candidate that most reduces confidence can be an unsuitable evaluation example if it also damages the evidence a person needs.
The screen applied to a PAS has two parts. An answerability classifier first checks whether the question can still be answered from the revised passage. The surviving sentence is then assessed for resemblance to the source and fluency relative to it. The similarity calculation uses the Universal Sentence Encoder. Fluency is represented by perplexity, which measures how predictable the wording is to the language system used to score it. The paper uses a small GPT2 system for this purpose. Semantic similarity · Universal Sentence Encoder
Uₙ = USE(sₙ, sₐ) − PPL(sₙ) / PPL(sₐ)
Uₙ is the quality score of candidate n. The revised answer sentence is sₙ, and the source answer sentence is sₐ, with a indicating the reference answer it contains. USE(sₙ, sₐ) measures the similarity between the two sentences. PPL(sₙ) and PPL(sₐ) are the perplexities of the revised and source sentences. The slash divides the candidate's perplexity by the source's. The subtraction penalizes a candidate whose wording is less predictable relative to the original. The procedure retains candidates that reach the quality cutoff T_U, set to -2. The score concerns sentence-level similarity and fluency. The answerability classifier addresses the separate question of whether the revised passage contains sufficient evidence for the question.
The authors apply this screen to the retained PAS candidates. They treat the appended sentence as having a different job because the supporting sentence remains in the passage. The experiments evaluate the quality of the resulting context as a whole, which allows errors in the added material to affect the reported quality. Cases can also enter the final TASA set with only one applicable component. A passage may lack a shared content word suitable for rewording or lack a suitable participant to change in the competing sentence. Thus the twin design defines the full construction, while the reported method includes cases with a single usable edit.
Where the data and judgments come from
The implementation constructs entity and word dictionaries separately for each benchmark using passages from its training and development data. The appendix reports a sampling size of N = 20 for DAS alternatives, where N is the number of replacement candidates sampled at a time. The words and entities come from the benchmark corpus, which gives the method vocabulary appropriate to that collection in a broad sense. Suitability for a particular sentence still depends on how that vocabulary is used.
For SQuAD 1.1, the answerability check comes from a RoBERTa-base system trained on SQuAD 2.0, which includes questions without answers and shares the underlying corpus. The implementation interprets selection of the initial special token as an unanswerable judgment. For the other datasets, the authors train separate checkers using a mixture of original answerable examples and an equal number of examples in which the question comes from a different context. This procedure teaches the checker to distinguish original matches from mismatched questions. The authors acknowledge that many of these artificial negative cases are relatively easy to recognize. SQuAD 2.0
The answerability check is an auxiliary part of the method. The systems whose robustness is measured are trained for ordinary span extraction on the relevant training sets before TASA is applied to their development data. The probability used in the importance and effect scores comes from that evaluated reader, while the answerability judgment comes from a separate system. This arrangement lets the method look for cases the evaluated reader finds difficult while retaining an independent procedural check. It also makes the annotation study important because that check remains an automated judgment. The authors release the TASA implementation and use the baseline authors' implementations in their comparisons.
Experiments and results
Benchmarks, answerers, and comparisons
The main experiments use the official SQuAD 1.1 release and the MRQA versions of the other benchmarks, which the authors convert to a common format. The SQuAD 1.1 development set contains 10,570 examples. NewsQA contributes 4,212 and Natural Questions 12,836. The development set for HotpotQA has 5,901, and TriviaQA has 7,785. The paper reports on development data because public test splits are unavailable for some of the benchmarks in the study. The common input format lets the same extractive task and answer metrics be used across the collections. SQuAD · NewsQA · Natural Questions
Passage length varies considerably. The average SQuAD 1.1 context is 137 tokens, compared with 599 for NewsQA and 784 for TriviaQA. The analogous averages are 153 for Natural Questions and 232 for HotpotQA. Each value describes a context in the dataset, rather than the number of answer tokens. These differences matter to the authors' interpretation of the results because both the revised evidence and the added distractor are local changes. The authors associate the weaker results on NewsQA and TriviaQA with their longer contexts. HotpotQA · TriviaQA
The evaluated answerers are BERT-base, SpanBERT-large, and BiDAF. BERT and SpanBERT begin from pretrained weights and are then fine-tuned, meaning that their parameters are adapted to the labeled reading comprehension task. The paper adds a linear layer for predicting where the answer starts and ends. The BERT configuration uses a maximum sequence length of 384, while SpanBERT uses 512. Both are fine-tuned for 3 epochs with a batch size of 32, and the authors retain the final checkpoint. The two configurations differ in architecture and pretraining as well as in input length, so their results describe the behavior of the configurations as deployed in these experiments. Fine-tuning
BiDAF provides an architectural comparison. It uses recurrent layers and bidirectional attention and is initialized with GloVe embeddings. These are vector representations of words used by its input layer. Its reported maximum context length is 800, and the authors train it for 20 epochs with a batch size of 40, retaining the checkpoint with the best development performance. All three answerers produce a start and end position. The change of architecture therefore preserves the meaning of the answer task and the evaluation metrics. GloVe
The original development sets establish ordinary reading comprehension performance. The main automatic comparisons are TextFooler and T3. TextFooler edits words in the context and uses substitute vocabulary derived from word embeddings. The paper adapts it to protect the answer words and uses its behavior on the reference answer in assessing candidate changes. T3 supplies an added distractor. The authors use its targeted black-box configuration, which aims at a pseudo answer without relying on access to internal parameters. TASA is also black-box in that sense. Its use of span probabilities is part of the output access available in the experiment. SQuAD 1.1 also allows comparison with AddSent, which provides human-authored distracting material for examples with shared source contexts. TextFooler
What the scores measure
Exact match, abbreviated EM, records the share of selected answers that match a reference exactly. Answer F1 gives credit for token overlap, so a span with some of the right words can receive partial credit even if its boundaries or contents differ from the reference. A lower score means a stronger challenge from the attack evaluator's point of view. The reading comprehension objective points in the opposite direction. This change of perspective matters throughout the results, particularly for comparisons involving the original data or the later training experiment.
The paper also records grammatical errors detected by LanguageTool, averaged per 100 tokens, and context perplexity from a small GPT2 system. A lower grammar error count means the checker flagged fewer issues at the reported length normalization. A lower perplexity means the scoring system found the passage more predictable. Neither measure directly tests whether the answer is still valid. The study addresses that issue separately through the human evaluation. The context-level perplexity in the results also has a different scope from the sentence-level ratio used earlier to filter PAS candidates.
Finally, the results give the number of generated adversarial examples. That count is the size of the set the corresponding method produced, while the Original count is the size of the benchmark's development set. It does not by itself tell how many incorrect answers the method induced. The reported answer scores and counts should be read together. A method may return examples for a narrower collection of inputs, and the samples produced by different methods need not coincide. The experiments consequently describe scores on the respective generated sets, with a more tightly paired comparison used in the human study.
The strongest benchmark comparisons
SQuAD 1.1 shows the clearest gap between TASA and the baselines on BERT-base. The Original set has an EM of 80.91; the TASA set has an EM of 40.06. TextFooler and T3 have EM values of 67.18 and 71.63, and AddSent has 57.78. The F1 comparison orders the settings in the same way. The TextFooler and T3 rows also show that adding text and substituting vocabulary are both effective to some extent, while the strongest effect in this comparison comes from a method that can do both within the same example.
BERT-base answer F1 on SQuAD 1.1 development examples by method
TASA leaves the least overlap with the reference answer on the examples it generates.
The numbers
| System or setting | F1 |
|---|---|
| Original | 88.23 |
| AddSent | 64.58 |
| TextFooler | 78.18 |
| T3 | 78.86 |
| TASA (this paper) | 50.87 |
The chart compares scores across sets of different sizes. BERT-base's SQuAD 1.1 TASA row contains 9,559 generated examples. T3 has 9,622 and TextFooler 7,919, while the AddSent row has 3,560. TASA thus combines a relatively large generated set with the lowest F1 in this comparison. The AddSent comparison is informative about the challenge posed by the available examples. Its human annotation and substantially smaller set also give it a different data construction from the automatic baselines.
SpanBERT-large has higher SQuAD 1.1 answer scores throughout the table. Its Original EM is 88.25 and its F1 94.00. The TASA row has an EM of 54.18 and an F1 of 65.50, evaluated on 9,580 generated examples. The F1 is 79.77 on AddSent, 88.08 on TextFooler, and 82.13 on T3. The pattern shows that the result extends to an answerer with stronger original scores. The paper associates SpanBERT's greater resilience with its scale and pretraining. The experiment compares the whole systems, so the separate contribution of each difference remains undetermined.
On Natural Questions, BERT-base has an Original EM of 67.39 and an F1 of 79.28. With TASA, its EM is 43.23 and its F1 55.32. TextFooler has an F1 of 63.08, and T3 has 71.20. Natural Questions is also informative about the size of the generated sets. T3 gives the broadest coverage among the automatic methods for BERT-base, with 10,439 examples. TASA has 8,809, while TextFooler has 7,158. The method with the most examples and the method with the lowest answer score are different here.
HotpotQA shows another clear comparison. The BERT-base TASA row has EM 27.01 and F1 39.10, compared with Original EM 56.89 and F1 75.70. TextFooler scores 47.76 F1 and T3 scores 42.08. SpanBERT-large shows a similar ordering by F1 on its HotpotQA examples. The paper reports 5,355 TASA examples for SpanBERT-large out of an original development set of 5,901.
SpanBERT-large answer F1 on HotpotQA development examples by method
The TASA examples yield the lowest answer F1 among the generated sets.
The numbers
| System or setting | F1 |
|---|---|
| Original | 81.60 |
| TextFooler | 78.94 |
| T3 | 70.55 |
| TASA (this paper) | 60.50 |
Where the comparison is closer
NewsQA makes the distinction between metrics especially visible. On BERT-base, TASA has a slightly lower F1 than T3, 53.46 compared with 53.49. T3 has a slightly lower EM, 39.54 compared with 39.62. TASA yields 2,860 examples, while T3 yields 3,865. SpanBERT-large scores 64.93 F1 on TASA and 66.40 on T3, with an Original F1 of 73.81. TASA generates 2,872 examples for SpanBERT-large in this benchmark. Taken together, the results show a comparatively modest F1 advantage in a setting where TASA produces fewer examples than either automatic baseline.
TriviaQA likewise gives a different ordering from the clearest SQuAD comparisons. For BERT-base, TASA attains 54.23 F1, compared with 56.06 for T3 and 57.39 for TextFooler. The Original F1 is 65.42. For SpanBERT-large, the TASA F1 is 69.97, while T3 reaches 69.62 and TextFooler 69.95. The EM scores also split the ordering. TASA's 63.86 is lower than T3's 64.12, while TextFooler has 63.62. These results support a claim of competitive behavior on TriviaQA, with the clearest performance advantages on other datasets.
The BiDAF appendix broadens the comparison and shows further exceptions. On SQuAD 1.1, the TASA EM is 37.96 and AddSent's EM is 40.87, while AddSent has the slightly lower F1 of 49.19 against TASA's 49.44. On Natural Questions, TASA's 49.56 F1 is below T3's 52.27 and TextFooler's 53.91. On HotpotQA, the corresponding scores are 49.15, 58.41, and 55.40. TextFooler has the lower F1 on NewsQA and TriviaQA. The paper interprets BiDAF as less vulnerable than BERT in terms of how much its performance declines, particularly on the longer contexts. Its original score is also lower, an important part of interpreting the size of any decline.
Readability and reference-answer preservation
The text-quality measurements show differences between methods and benchmarks. On BERT-base's SQuAD 1.1 examples, context perplexity is 41.15 for TASA, 44.84 for TextFooler, and 44.45 for T3. Human-produced AddSent has a perplexity of 33.98, close to the original passages' 33.25. For the grammar measure, TASA records 2.98 flagged errors per 100 tokens, against 2.95 for TextFooler and 3.48 for T3. TASA's substantially lower answer scores thus accompany quality measures that are broadly competitive with the automatic baselines, while the human-produced comparison has better scores on both quality measures here.
Results from other benchmarks qualify any uniform ranking. On BERT-base HotpotQA, the original passages have perplexity 17.01. The TASA passages have 17.29, while the TextFooler and T3 passages have 20.52 and 21.17. On BERT-base TriviaQA, T3's 24.49 is lower than TASA's 24.69, although TASA's grammar error score of 3.81 is lower than T3's 4.06. SpanBERT-large's Natural Questions rows also include a pronounced difference in perplexity. The paper reports 15.24 for TASA and 49.74 for the original Natural Questions development data. Those figures concern different collections of passages. They describe the text as scored in each row, with selection of examples and specific edits both relevant to the comparison.
The human evaluation puts competing methods on a shared source within each group. The authors sample 150 groups associated with BERT on SQuAD 1.1. Each group contains a TextFooler, T3, and TASA version of the same source example. The study involves 63 non-expert annotators. They judge whether the original answer remains and rank the versions for grammar and fluency on a scale of 1 ∼ 3. The paired design helps distinguish preferences about the edited prose from preferences about the topic or difficulty of the source material.
For answer preservation, the study reports 79.1±4.7 for TASA, 79.9±4.5 for TextFooler, and 85.9±3.3 for T3, all in percent with intervals at the 95% confidence level. The mean quality rank is 1.83±0.06 for TASA, 1.52±0.06 for TextFooler, and 2.64±0.07 for T3. Thus the annotators place TASA between the other automatic methods on the quality ranking, while T3 has the highest observed answer preservation. The authors attribute part of T3's answer preservation to leaving the supporting material intact. The result shows why fluency and answer preservation are separate measurements. A passage can retain sufficient evidence while an added sentence reads badly, and a more fluent passage can still make the original answer harder to justify.
What the ablations show
The initial diagnostic points to content words
The paper's lexical diagnostic helps explain the design before the authors turn to component ablations. On the original SQuAD 1.1 validation data, BERT has EM 80.91 and F1 88.23. Restricting the passage to the answer sentence gives reported changes of +2.79 EM and +2.87 F1. For BiDAF, the original EM and F1 are 65.72 and 75.97, and the answer-sentence-only changes are +3.27 EM and +4.37 F1. These are changes relative to each system's original scores. Giving the answer sentence directly removes the need to find it among the surrounding sentences, which helps explain why this is a test of how sufficient that sentence is once supplied.
Deleting shared lexical words from the answer sentence gives BERT an EM change of -18.62 and F1 change of -16.71. For BiDAF the respective changes are -24.43 and -24.46. The corresponding BERT changes when removing shared function words are -5.20 EM and -3.18 F1. Conversely, keeping the shared lexical words along with the answer yields BERT changes of -5.27 EM and -1.81 F1. BiDAF records +0.86 EM and +4.28 F1 in the lexical-only condition. The pattern supports the decision to focus on content-word overlap, since this category matters strongly in the removal test and furnishes surprisingly useful evidence in the retention test.
In the shuffle condition, the best reported lexical-only results among the randomized orders give BERT +4.07 EM and +2.94 F1 relative to the original examples. For BiDAF they give +10.68 EM and +10.46 F1. The distinction between the best result and a typical shuffle matters. The experiment exhibits orders in which limited lexical evidence suffices for high scores, while the preserved answer and, for these edits, the remainder of the passage continue to be available. This motivates the twin construction without implying that word order is generally irrelevant to extractive question answering.
The revised evidence and the distractor work together
The main component ablation runs on SQuAD 1.1 with BERT. Dropping either the PAS or the DAS leaves a higher answer score than the full method. Without PAS, the EM is 59.63 and F1 is 70.91; without DAS, the EM is 54.13 and F1 is 67.68. Under the full method they are 40.06 and 50.87. The first removal leaves an ordinary answer sentence with which the distractor must compete. The second leaves a weaker lexical connection to the right evidence without offering the specially constructed alternative. Both changes give the evaluated reader an easier problem as measured on the respective generated sets.
BERT answer F1 in the SQuAD 1.1 development component ablations
The full method reduces answer F1 more than either version with only one sentence intervention.
The numbers
| System or setting | F1 |
|---|---|
| Without the perturbed answer sentence | 70.91 |
| Without the distracting answer sentence | 67.68 |
| TASA (this paper) | 50.87 |
The example counts are 8,709 without PAS, 5,646 without DAS, and 9,559 for full TASA. The ablation changes the examples the method can generate as well as the score it obtains. The coreference comparison is especially instructive on this point. Without coreference replacement, the method yields 9,374 examples, with EM 39.95 and F1 50.39. The paper therefore emphasizes that explicit references modestly improve the quantity of usable examples. The answer scores in that comparison are slightly lower for the version without this step.
The paper also breaks down the full method's output by which edits were possible on each case. For BERT on SQuAD 1.1, 50.2 percent of the generated examples have both edits. PAS-only examples account for 8.9 percent, and DAS-only examples account for 40.9 percent. BERT's F1 on those groups is 32.98, 63.48, and 70.03, respectively. These are different subsets of the final TASA set. For instance, a sentence that offers both a shared keyword and an editable participant can enter the combined group, while a sentence missing one of those properties enters a single-edit group. This analysis demonstrates what the method returns in practice. The component removal experiment probes the contribution of the interventions from a different angle.
The same breakdown shows a narrower separation between the combined and PAS-only groups on NewsQA. For BERT, the combined cases score 45.77 F1 and PAS-only cases 47.80, while DAS-only cases score 64.52. The authors point to a similar tendency on TriviaQA. This complements the main results, where the advantage over other methods is also less consistent on these longer-context datasets. The comparisons are based on groups with different eligibility conditions, so their figures describe both the edits and the examples on which those edits can occur.
The search and quality controls change the result
Reordering the PAS edits changes the result within the same general design. Without ordering the keywords by importance, the SQuAD 1.1 BERT ablation gives EM 41.44 and F1 52.32. The full method gives EM 40.06 and F1 50.87. The authors describe the effect of ordering as modest. With a limited beam, it matters which alternatives survive early enough to be combined with later edits. The comparison indicates that the measured importance provides a useful ordering in this setting, while much of the overall challenge survives its removal.
The source of the lexical alternatives also matters. With WordNet alone, the ablation gives F1 54.12, and with PPDB alone it gives 56.35. The combined resources in the full method give 50.87. A larger pool increases the chance of finding vocabulary that changes the system's response while fitting the sentence. The quality numbers show the tradeoff. The PPDB-only condition records perplexity 37.19, below the full method's 41.15, but also leaves the reader with the higher answer F1. Different resource choices can therefore favor different experimental objectives.
Removing the quality-score filter gives F1 49.18 and EM 38.70, both lower than in the full method. It also raises the grammar error measure to 3.36 from 2.98 and context perplexity to 44.46 from 41.15. The comparison gives a concrete reason to consider answer scores alongside the quality measures. A method can lower answer agreement further by using edits more likely to produce awkward passages. The full system accepts a somewhat weaker attack on these metrics in exchange for better measured prose quality.
The beam-size experiment varies the number of retained candidates across the answerers and examines the resulting answer scores and sample counts. The authors report that larger beams tend to provide more usable examples and better attack measurements, with diminishing improvement once the beam exceeds 5. Wider beams also take longer to process. The runtime analysis on SQuAD 1.1 reports that TASA is the fastest of the compared methods on the paper's setup. It also reports fewer queries in the varying-query comparison. T3 has a constant query count and is handled separately in that part of the analysis. Runtime and number of queries consequently describe different aspects of the comparison.
The alternative answer explains many of the errors
Changing the answer in the distractor is central to the proposed interpretation. In the ablation that leaves the original answer text in the competing sentence, BERT's F1 is 68.91 and EM 57.63, compared with 50.87 F1 and 40.06 EM for full TASA. A reader that follows the distractor in this ablation can return the right words from evidence about the wrong subject. The score therefore becomes less effective at revealing that specific grounding error. Giving the competing sentence a distinct pseudo answer makes such a shift visible in the predicted text.
The paper also compares ways of changing the competing sentence's participants. Editing only named entities gives BERT F1 51.88 on 8,822 examples. Editing only ordinary nouns gives F1 55.45 on 7,426 examples. Allowing both kinds of edits yields the full method's 50.87 on 9,559. The broader range of eligible changes helps the method apply to more examples. The comparison also distinguishes the availability of an edit from its effect, since both the generated count and the answer score favor the combined setting here.
For a more direct check on where the predictions go, the paper measures F1 against the pseudo answer instead of the reference answer. It also compares the same pseudo answers with predictions made on the original versions of the examples. On SQuAD 1.1, BERT's pseudo-answer F1 is 39.19 on TASA passages containing a DAS and 15.08 on the corresponding original inputs. SpanBERT scores 33.20 and 16.06 in the same comparison. On NewsQA, the BERT scores are 20.95 and 14.40. In this analysis, higher pseudo-answer overlap on the edited input is evidence that some errors move towards the added alternative. The original-input comparison matters because a pseudo answer can share words with a span the system would already have selected.
The examples also show more than one response to a distractor. In the paper's stadium-opening example, the BERT response on the TASA passage gives a date from the source material tied to the earlier decision about the venue. It does not extract the pseudo date in the added sentence. This is still an error about the relationship specified by the question. It illustrates why reference-answer F1 and pseudo-answer F1 are complementary. One measures departure from the annotated answer, while the other tests whether a particular competing phrase accounts for some of that departure.
Training on generated examples
The authors separately test whether TASA can supply useful training data. They replace varying shares of the original SQuAD 1.1 training examples with corresponding TASA versions and fine-tune BERT on those mixtures. They evaluate the resulting answerers on original development examples, on TASA development examples, and on AddSent. With a suitable mixture, the reported curves show improved robustness on the adversarial sets with little deterioration on the original data.
The AddSent comparison matters because it uses an independently constructed set of distractors. Improvement there suggests a benefit beyond the exact construction used to generate the training examples. The paper's evidence is specific to BERT trained on the SQuAD 1.1 mixtures and to the evaluation sets in that experiment. The result connects the failure analysis to a practical training question. It shows that some of the gap revealed by the test can be reduced while the original development score remains mostly intact.
Limitations
Limits the authors identify
The authors explicitly restrict TASA to extractive question answering. Its construction depends on locating an annotated answer span in a passage, identifying a sentence that contains it, and evaluating changes through span predictions. The authors leave question and reference-answer perturbation for future work. Their use of a different answer in the distractor fits within that scope because the changed span belongs to the competing sentence. The original question and its reference answer continue to define the test.
The authors acknowledge that the artificial unanswerable examples for most of the filtering systems are comparatively easy. Randomly pairing a question with a different passage can create an obvious topic mismatch. A perturbed answer sentence can pose a subtler problem. Its topic may remain relevant while a substitution changes a relationship, alters what a pronoun refers to, or weakens the exact claim required for an answer. Performance on the artificial negatives consequently describes how well the classifier judges those mismatches. The human preservation study gives more direct evidence about the validity of the generated examples.
The paper also acknowledges uneven attack effectiveness across benchmarks and ties that pattern to passage length. NewsQA and TriviaQA have the longest average contexts among the evaluated sets, and the interventions alter a small part of those passages. This is a plausible account of the experiments. The paper's cross-dataset comparison varies benchmark, style, and length together, so the effect of length by itself remains open.
Limits visible in the evaluation design
The intended intervention preserves a relationship while making its wording less familiar. The human study shows that this happens imperfectly. Protecting a span from substitution ensures that its words survive, but a reader can still find the surrounding sentence unclear or judge that the passage supports a different interpretation. Similarly, the presence of a distinct pseudo answer can make the wrong span easy to identify while the sentence around it is awkward. The observed 79.1±4.7 percent preservation result is therefore part of the substantive finding. It gives the reader a basis for judging how frequently a low answer score reflects a valid challenge to the system on the sampled cases.
The human evidence is also localized. The comparison samples SQuAD 1.1 examples generated for BERT that can be grouped across the three automatic methods. The pilot of a method on a common set of sources is valuable for comparing readability and validity, but the result does not establish a human preservation rate for other datasets, for SpanBERT or BiDAF, or for cases produced by only one method. The grammar checker and perplexity scores cover a broader range of sets. Their measurements have a different meaning from a person's judgment about what the passage entails.
The results saying that the full method outperforms the baselines are clearest when the gaps in answer scores are substantial and example counts are reasonably close. The NewsQA comparisons show the harder case. TASA and T3 differ in how many examples they return, and the order can change with EM versus F1. A comparison on the intersection of source examples could answer how the methods differ when all have applicable edits. A comparison that assigns an outcome to every original development example could answer a different question about their aggregate effect across the whole split. The paper's reported answer scores and counts characterize the generated sets and leave those two estimands distinct.
Construction also depends on access to an annotated answer and to the target's probability for that answer. The black-box designation means the procedure does not inspect the evaluated system's parameters. An interface exposing only the final text span supplies less information than the paper's importance and effect scores require. The experiments therefore characterize targeted evaluation of the trained readers under the reported access conditions. How the edit choices would generalize across readers without being selected against each reader separately is a different portability question.
Neither the diagnostic nor the pseudo-answer overlap settles which internal computation caused a specific prediction. Removing shared words and observing a drop gives behavioral evidence that those words matter. Shuffling demonstrates that some distorted sentences still contain enough information for correct extraction under the test conditions. Increased overlap with a pseudo answer shows that the inserted alternative attracts some predictions at the output level. A conclusion about the role of internal attention or a general absence of relational understanding would require additional evidence. The strength of these experiments is the direct observation of where the answer behavior changes.
There is a related distinction in the robustness training result. The transfer to AddSent extends the evidence beyond TASA's own development examples, but both evaluations still use SQuAD contexts and distractor-based challenges. The experiment supports improved resilience in that setting. It leaves open whether training has made the system broadly better at resolving relationships across unfamiliar datasets or at answering questions whose evidence spans multiple sentences. The scope of the finding follows from where training and evaluation took place.
What came after
A later survey cites TASA in work organized around the safety and trustworthiness of large language systems through verification and validation. The citation places TASA's extractive reading comprehension experiments in the literature considered by that broader survey. The connection that can be established is that the survey cites the paper. How it interprets the twin-sentence construction, or whether it reuses any procedure or result, is unspecified. A Survey of Safety and Trustworthiness of Large Language Models through the Lens of Verification and Validation
Cite
Cite as Yu Cao, Dianqi Li, Meng Fang, Tianyi Zhou, Jun Gao, Yibing Zhan and Dacheng Tao. 2022. TASA: Deceiving Question Answering Models by Twin Answer Sentences Attack. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{cao2022tasa,
title = {{TASA: Deceiving Question Answering Models by Twin Answer Sentences Attack}},
author = {Yu Cao, Dianqi Li, Meng Fang, Tianyi Zhou, Jun Gao, Yibing Zhan and Dacheng Tao},
booktitle = {Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing},
year = {2022},
doi = {10.18653/v1/2022.emnlp-main.821},
url = {https://doi.org/10.18653/v1/2022.emnlp-main.821}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/cao-2022-tasa-deceiving-question-answering-models/