#  AGent: A Novel Pipeline for Automatically Creating
Unanswerable Questions

Son Quoc Tran1,3, Gia-Huy Do1, Phong Nguyen-Thuan Do3,
Matt Kretchmar 1, Xinya Du2
1Denison University
2University of Texas at Dallas
3The UIT NLP Group, Ho Chi Minh City
{tran_s2, do_g1<EMAIL_ADDRESS>
<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

The development of large high-quality datasets and high-performing models have
led to significant advancements in the domain of Extractive Question Answering
(EQA). This progress has sparked considerable interest in exploring
unanswerable questions within the EQA domain. Training EQA models with
unanswerable questions helps them avoid extracting misleading or incorrect
answers for queries that lack valid responses. However, manually annotating
unanswerable questions is labor-intensive. To address this, we propose AGent,
a novel pipeline that automatically creates new unanswerable questions by re-
matching a question with a context that lacks the necessary information for a
correct answer. In this paper, we demonstrate the usefulness of this AGent
pipeline by creating two sets of unanswerable questions from answerable
questions in SQuAD and HotpotQA. These created question sets exhibit low error
rates. Additionally, models fine-tuned on these questions show comparable
performance with those fine-tuned on the SQuAD 2.0 dataset on multiple EQA
benchmarks. 111Our code is publicly available at
https://github.com/sonqt/agent-unanswerable.

##  1 Introduction

Figure 1: Examples of an answerable question $Q1$ from SQuAD 1.1, and two
unanswerable questions $Q2$ from SQuAD 2.0 and $Q3$ from SQuAD AGent. In SQuAD
2.0, crowdworkers create unanswerable questions by replacing “large numbers”
with “decimal digits.” On the other hand, our automated AGent pipeline matches
the original question $Q1$, now $Q3$, with a new context $C3$. The pair
$C3-Q3$ is unanswerable as context $C3$ does not indicate whether the trial
division can conveniently test the primality of large numbers.

Extractive Question Answering (EQA) is an important task of Machine Reading
Comprehension (MRC), which has emerged as a prominent area of research in
natural language understanding. Research in EQA has made significant gains
thanks to the availability of many challenging, diverse, and large-scale
datasets Rajpurkar et al. (2016, 2018); Kwiatkowski et al. (2019); Yang et al.
(2018); Trivedi et al. (2022). Moreover, recent advancements in datasets also
lead to the development of multiple systems in EQA Huang et al. (2018); Zaheer
et al. (2020) that have achieved remarkable performance, approaching or even
surpassing human-level performance across various benchmark datasets.

Matching the rapid progress in EQA, the subfield of unanswerable questions has
emerged as a new research area. Unanswerable questions are those that cannot
be answered based only on the information provided in the corresponding
context. Unanswerable questions are a critical resource in training EQA models
because they allow the models to learn how to avoid extracting misleading
answers when confronted with queries that lack valid responses. Incorporating
unanswerable questions in the training set of EQA models enhances the overall
reliability of these models for real-world applications Tran et al. (2023).

Nevertheless, the manual annotation of unanswerable questions in EQA tasks can
be prohibitively labor-intensive. Consequently, we present a novel pipeline to
automate the creation of high-quality unanswerable questions given a dataset
comprising answerable questions. This pipeline uses a retriever to re-match
questions with paragraphs that lack the necessary information to answer them
adequately. Additionally, it incorporates the concept of adversarial filtering
for identifying challenging unanswerable questions. The key contributions of
our work can be summarized as follows:

  1. 1.

We propose AGent which is a novel pipeline for automatically creating
unanswerable questions. In order to prove the utility of AGent, we apply our
pipeline on two datasets with different characteristics, SQuAD and HotpotQA,
to create two different sets of unanswerable questions. In our study, we show
that the two unanswerable question sets created using AGent pipeline exhibit a
low error rate.

  2. 2.

Our experiments show that the two unanswerable question sets created using our
proposed pipeline are challenging for models fine-tuned using human annotated
unanswerable questions from SQuAD 2.0. Furthermore, our experiments show that
models fine-tuned using our automatically created unanswerable questions show
comparable performance to those fine-tuned on the SQuAD 2.0 dataset on various
EQA benchmarks, such as SQuAD 1.1, HotpotQA, and Natural Questions.

##  2 Related Work

###  2.1 Unanswerable Questions

In the early research on unanswerable questions, Levy et al. (2017) re-defined
the BiDAF model Seo et al. (2017) to allow it to output whether the given
question is unanswerable. Their primary objective was to utilize MRC as
indirect supervision for relation extraction in zero-shot scenarios.

Subsequently, Rajpurkar et al. (2018) introduced a crowdsourcing process to
annotate unanswerable questions, resulting in the creation of the SQuAD 2.0
dataset. This dataset later inspired similar works in other languages, such as
French Heinrich et al. (2022) and Vietnamese Nguyen et al. (2022). However,
recent research has indicated that models trained on SQuAD 2.0 exhibit poor
performance on out-of-domain samples Sulem et al. (2021).

Furthermore, apart from the adversarially-crafted unanswerable questions
introduced by Rajpurkar et al. (2018), Natural Question Kwiatkowski et al.
(2019) and Tydi QA Clark et al. (2020) present more naturally constructed
unanswerable questions. While recent language models surpass human
performances on adversarial unanswerable questions of SQuAD 2.0, natural
unanswerable questions in Natural Question and Tidy QA remain a challenging
task Asai and Choi (2021).

In a prior work, Zhu et al. (2019) introduce a pair-to-sequence model for
generating unanswerable questions. However, this model requires a substantial
number of high-quality unanswerable questions from SQuAD 2.0 during the
training phase to generate its own high-quality unanswerable questions.
Therefore, the model introduced by Zhu et al. (2019) cannot be applied on the
HotpotQA dataset for generating high-quality unanswerable questions. In
contrast, although our AGent pipeline cannot generate questions from scratch,
it distinguishes itself by its ability to create high-quality unanswerable
questions without any preexisting sets of unanswerable questions.

###  2.2 Robustness of MRC Models

The evaluation of Machine Reading Comprehension (MRC) model robustness
typically involves assessing their performance against adversarial attacks and
distribution shifts. The research on adversarial attacks in MRC encompasses
various forms of perturbations Si et al. (2021). These attacks include
replacing words with WordNet antonyms Jia and Liang (2017), replacing words
with words having similar representations in vector space Jia and Liang
(2017), substituting entity names with other names Yan et al. (2022),
paraphrasing question Gan and Ng (2019); Ribeiro et al. (2018), or injecting
distractors into sentences Jia and Liang (2017); Zhou et al. (2020). Recently,
multiple innovative studies have focused on enhancing the robustness of MRC
models against adversarial attacks Chen et al. (2022); Zhang et al. (2023);
Tran et al. (2023).

On the other hand, in the research line of robustness under distribution
shift, researchers study the robustness of models in out-of-domains settings
using test datasets different from training dataset Miller et al. (2020);
Fisch et al. (2019); Sen and Saffari (2020).

##  3 Tasks and Models

In the task of EQA, models are trained to extract a list of prospective
outputs (answers), each accompanied by a probability (output of softmax
function) that represents the machine’s confidence in the answer’s accuracy.
When the dataset includes unanswerable questions, a valid response in the
extracted list can be an “empty” response indicating that the question is
unanswerable. The evaluation metric commonly used to assess the performance of
the EQA system is the F1-score, which measures the average overlap between the
model’s predictions and the correct answers (gold answers) in the dataset. For
more detailed information, please refer to the work by Rajpurkar et al.
(2016).

###  3.1 Datasets

In our work, we utilize three datasets: SQuAD Rajpurkar et al. (2016, 2018),
HotpotQA Yang et al. (2018), and Natural Questions Kwiatkowski et al. (2019).
In the SQuAD dataset, each question is associated with a short paragraph from
Wikipedia. HotpotQA is a dataset designed for multi-hop reasoning question
answering where each question requires reasoning over multiple supporting
paragraphs. Additionally, the Natural Questions dataset comprises real queries
from the Google search engine, and each question is associated with a
Wikipedia page.

###  3.2 Models

We employ three transformer-based models in our work: BERT Devlin et al.
(2019), RoBERTa Liu et al. (2019), and SpanBERT Joshi et al. (2020). BERT is
considered the pioneering application of the Transformer model architecture
Vaswani et al. (2017). BERT is trained on a combination of English Wikipedia
and BookCorpus using masked language modeling and next-sentence prediction as
pre-training tasks. Later, a replication study by Liu et al. (2019) found that
BERT was significantly under-trained. Liu et al. (2019) built RoBERTa from
BERT by extending the pre-training time and increasing the size of the pre-
training data. Joshi et al. (2020) developed SpanBERT by enhancing BERT’s
ability to represent and predict text spans by masking random contiguous spans
and replacing NSP with a span boundary objective.

Each of these three models has two versions: base and large. Our study uses
all six of these models.

##  4 Automatically Creating Unanswerable Questions

Figure 2: The AGent pipeline for generating challenging high-quality
unanswerable questions in Extractive Question Answering given a dataset with
answerable questions. The six models used in this pipeline are the base and
large versions of BERT, RoBERTa, and SpanBERT. In step 3 of the pipeline, the
blue dots represent the calculated values (using formula discussed in §4.2)
for unanswerable questions, while the red dots represent the calculated values
for answerable questions. The threshold for discarding questions from the
final extracted set of unanswerable questions is determined by finding the
minimum value among all answerable questions. Any question with a calculated
value greater than the threshold will not be included in our final extracted
set.

###  4.1 Criteria

In order to guarantee the quality of our automatically created unanswerable
questions, we design our pipeline to adhere to the following criteria:

Relevance.  The created unanswerable questions should be closely related to
the subject matter discussed in the corresponding paragraph. This criterion
ensures that the unanswerability of the question is not easily recognizable by
simple heuristic methods and that the created question “makes sense” regarding
the provided context.

Plausibility.  Our pipeline also ensures that the created unanswerable
questions have at least one plausible answer. For instance, when considering a
question like “What is the name of one algorithm useful for conveniently
testing the primality of large numbers?”, there should exist a plausible
answer in the form of the name of an algorithm in Mathematics that is closely
linked to the primality within the corresponding context. See Figure 1 for an
example showcasing an unanswerable question with strong plausible answer(s).

Fidelity.  Our pipeline adds an additional step to ensure a minimal rate of
error or noise in the set of automatically created unanswerable questions. It
is important that the newly created questions are genuinely unanswerable. This
quality control measure bolsters the reliability of the pipeline. The
effectiveness of this step is verified in the study in Section 4.3.

###  4.2 AGent Pipeline

Figure 2 provides a summary of all the steps in the AGent pipeline for
automatically creating unanswerable questions corresponding to each dataset of
answerable questions. Our proposed AGent pipeline consists of three steps
which align with the three criteria discussed in Section 4.1:

#### Step 1

Matching questions with new contexts. In the EQA task, the input consists of a
question and a corresponding context. By matching the question with a new
context that differs from the original context, we can create a new question-
context pair that is highly likely to be unanswerable. This step prioritizes
the criterion of relevance. We employ the term frequency–inverse document
frequency (TF-IDF) method to retrieve the $k$ most relevant paragraphs from
the large corpus containing all contexts from the original dataset (while
obviously discarding the context that was originally matched with this
question). The outcome of this step is a set of unanswerable candidates. It’s
important to note that the unanswerable candidates created in this step may
includes some answerable questions, and these answerable questions will be
filtered out in step 3 of the pipeline.

#### Step 2

Identifying hard unanswerable questions. In this step, we give priority to
both the relevance and plausibility criteria. We aim to identify unanswerable
questions with a highly relevant corresponding context and at least one strong
plausible answer. To achieve this, we leverage the concept of adversarial
filtering where the adversarial model(s) is applied to filter out easy
examples Yang et al. (2018); Zellers et al. (2018); Zhang et al. (2018).

We first fine-tune six models using a dataset comprising answerable questions
from the original dataset and randomly selected unanswerable candidates. We
acknowledge that some unanswerable questions in this training set may be
answerable. Nevertheless, the percentage of answerable questions among the
unanswerable candidates is minimal and within an acceptable range (Appendix
A.2). To ensure training integrity, we then exclude all unanswerable questions
utilized for training these six models from the set of unanswerable
candidates. Then, we employ the six fine-tuned models to evaluate the
difficulty of each sample in the set of unanswerable candidates. If at least
two of the six models predict that a given question is answerable, we consider
it to be a challenging unanswerable question and include it in our set of
challenging unanswerable candidates.

#### Step 3

Filtering out answerable questions. The set of challenging unanswerable
questions consists of questions that at least two out of the six models
predict as answerable. Consequently, there may be a considerable percentage of
questions that are indeed answerable. Therefore, this specific step in our
pipeline aims to ensure the fidelity of the AGent pipeline, ensuring that all
questions created by our pipeline are genuinely unanswerable. We leverage the
predicted answers and confidence scores from the six deployed models in the
previous step to achieve this. Subsequently, we devise a filtering model with
four inputs: $c_{a}$, representing the cumulative confidence scores of the
models attempting to answer (or predicting as answerable); $c_{u}$,
representing the cumulative confidence scores of the models not providing an
answer (or predicting as unanswerable); $n_{a}$, denoting the number of models
attempting to answer; and $n_{u}$, indicating the number of models not
providing an answer. The output of this filtering model is a value $V(q)$ for
each question $q$. The filtering models must be developed independently for
different datasets.

In order to determine the filtering threshold and develop the filtering model,
we manually annotate $200$ challenging unanswerable candidates from each
dataset. The filtering threshold is established by identifying the minimum
value $V(q_{a})$ where $q_{a}$ represents an answerable question from our
annotated set. This approach ensures a precision of $100\%$ in identifying
unanswerable questions on the annotated 200 questions. The filtering model
then acts to minimize the number of false positives (number of unanswerable
candidates that are answerable) at the expense of tossing out some candidate
questions that are unanswerable. However, as the filtering model is applied on
unseen challenging unanswerable candidates, the precision of the filtering
model in this step would not be $100\%$ as on the $200$ muanually annotated
samples. Therefore, in next section, we use human experts to evaluate the
precision exhibited by the filtering model.

Further details for the AGent pipeline are outlined in Appendix A.

###  4.3 Human Reviewing

This section presents our methodology for evaluating the data quality of
unanswerable questions automatically created by AGent.

|  |  | Phase
---
1
| Phase
---
2
SQuAD AGent | Fleiss’ Kappa | $0.76$ | $0.95$
Data Error | $0.10$ | 0.06
HotpotQA AGent | Fleiss’ Kappa | $0.83$ | $0.97$
Data Error | $0.09$ | 0.05

Table 1: The Fleiss’ Kappa score and AGent data error for the annotations
collected from human experts after two distinct phases.

Test $\rightarrow$ | SQuAD | HotpotQA | Natural Questions
---|---|---|---
Train $\downarrow$ | answerable | unanswerable | AGent | answerable | unanswerable | AGent | answerable | unanswerable
| SQuAD
---
2.0
$84.55_{\pm 3.43}$ |  79.16 ±5.16 | $49.38_{\pm 5.21}$ | $51.05_{\pm 5.15}$ | $86.28_{\pm 2.68}$ | $58.98_{\pm 4.64}$ | 44.30±6.36 | $60.55_{\pm 12.95}$
| SQuAD
---
AGent
86.96±1.86 | $29.63_{\pm 3.97}$ | $81.38_{\pm 4.52}$ | $63.26_{\pm 2.88}$ | $90.01_{\pm 2.40}$ | $50.61_{\pm 5.56}$ | $41.05_{\pm 6.81}$ | $78.66_{\pm 13.22}$
| HotpotQA
---
AGent
$59.06_{\pm 6.26}$ | $46.13_{\pm 3.46}$ | 87.61±2.72 | 77.75±1.92 | 99.70±0.06 | 95.94±2.13 | $24.11_{\pm 7.04}$ | 84.20±11.37

Table 2: Performance of 6 models fine-tuned on SQuAD 2.0, SQuAD AGent, and
HotpotQA AGent datasets evaluated on SQuAD, HotpotQA, and Natural Questions.
Each entry in the table is the mean and standard deviation of the F1 scores of
the six MRC models. The left column indicates the dataset used to train the
six MRC models. The top row indicates the dataset used to test the six MRC
models. AGent refers to the unanswerable questions generated using the AGent
pipeline. For a more detailed version of this table, refer to Table 8.

We use three experts to validate 100 random unanswerable questions from each
development set of SQuAD AGent and HotpotQA AGent. In order to prevent an
overwhelming majority of unanswerable questions in our annotation set, which
could potentially undermine the integrity of the annotation, we incorporate 20
manually annotated answerable questions during step 3 of the pipeline.
Consequently, we provide a total of 120 questions to each expert for each set.

The process of expert evaluation involves two distinct phases. During the
first phase, each of the three experts independently assesses whether a given
question is answerable and provides the reasoning behind their annotation. In
the second phase, all three experts are presented with the reasons provided by
the other experts for any conflicting samples. They have the opportunity to
review and potentially modify their final set of annotations based on the
reasons from their peers.

We observe that the annotations provided by our three experts demonstrate
exceptional quality. Table 1 presents the Fleiss’ Kappa score Fleiss (1971)
for our three experts after the completion of both phases, as well as the
error rate of the AGent development set. Notably, the Fleiss’ Kappa score in
phase 1 is remarkably high ($0.76$ on SQuAD AGent, and $0.83$ on HotpotQA
AGent), suggesting that the annotations obtained through this process are
reliable. Besides, after the second phase, all three experts agree that the
$20$ answerable questions we include in the annotation sets are indeed
answerable.

As demonstrated in Table 1, the high-quality annotations provided by three
experts indicate an exceptionally low error rate for the unanswerable
questions created using AGent ($6\%$ for SQuAD and $5\%$ for HotpotQA). For
comparison, this error rate is slightly lower than that of SQuAD 2.0, a
dataset annotated by humans.

##  5 Experiments and Analysis

We now shift our attention from the AGent pipeline to examining the
effectiveness of our AGent questions in training and benchmarking EQA models.

###  5.1 Training Sets

The models in our experiments are trained using SQuAD 2.0, SQuAD AGent, and
HotpotQA AGent. It is important to note that the two AGent datasets includes
all answerable questions from the original datasets and AGent unanswerable
questions.

###  5.2 Testing Sets

In our experiments, we use eight sets of EQA questions as summarized in Table
2. In addition to two sets of AGent unanswerable questions, we also
incorporate the following six types of questions.

SQuAD. We use all answerable questions from SQuAD 1.1. We use all unanswerable
questions from SQuAD 2.0.

HotpotQA.  In preprocessing answerable questions in HotpotQA, we adopt the
same approach outlined in MRQA 2019 Fisch et al. (2019) to convert each
dataset to the standardized EQA format. Specifically, we include only two
supporting paragraphs in our answerable questions and exclude distractor
paragraphs.

In preprocessing unanswerable questions in HotpotQA, we randomly select two
distractor paragraphs provided in the original HotpotQA dataset, which are
then used as the context for the corresponding question.

Natural Questions (NQ). In preprocessing answerable questions in NQ, we again
adopt the same approach outlined in MRQA 2019 to convert each dataset to the
standardized EQA format. This format entails having a single context, limited
in length. Specifically, we select examples with short answers as our
answerable questions and use the corresponding long answer as the context.

For unanswerable questions in NQ, we select questions with no answer and
utilize the entire Wikipedia page, which is the input of original task of NQ,
as the corresponding context. However, in line with the data collection
process of MRQA 2019, we truncate the Wikipedia page, limiting it to the first
800 tokens.

|  |  | SQuAD
---
2.0
$\%$
| SQuAD
---
AGent
$\%$
| Insufficient
---
context for
question
| Murray survives and , in front of the RGS trustees , accuses Fawcett of
abandoning him in
---
the jungle . Fawcett elects to resign from the society rather than apologize .
World War I
breaks out in Europe , and Fawcett goes to France to fight . Manley dies in
the trenches at
the Battle of the Somme , and Fawcett is temporarily blinded in a chlorine gas
attack . Jack ,
Fawcett ’s eldest son – who had long accused Fawcett of abandoning the family
– reconciles
with his father as he recovers .
Question: who dies in the lost city of z?
$54$ | $63$
| typographical
---
errors of key
words
|  Gimme Gimme Gimme has broadcast three series and 19 episodes in total . The
first series
---
premiered on BBC Two on 8 January 1999 and lasted for six episodes ,
concluding on 12
February 1999 . [..]
Question: when did gim me gim me gim me start?
$3$ | $6$

Table 3: Examples of two types of answerable questions in Natural Questions
that can pose challenges for EQA models fine-tuned solely on unanswerable
questions. We conduct a survey to measure the failure rates of RoBERTa models
fine-tuned on both SQuAD 2.0 and SQuAD AGent for these question types.

###  5.3 Main Results

Table 2 presents the results of our experiments. Firstly, our findings
demonstrate that unanswerable questions created by AGent pose significant
challenges for models fine-tuned on SQuAD 2.0, a dataset with human-annotated
unanswerable questions. The average performance of the six models fine-tuned
on SQuAD 2.0 and tested on SQuAD AGent is $49.38$; the average score for
testing these models on HotpotQA AGent data is $58.98$. Notably, unanswerable
questions from HotpotQA AGent are considerably more challenging compared to
their unanswerable counterparts from HotpotQA.

Secondly, models fine-tuned on two AGent datasets exhibit comparable
performance to models fine-tuned on SQuAD 2.0. On unanswerable questions from
HotpotQA and NQ, models fine-tuned on AGent datasets significantly outperform
those fine-tuned on SQuAD 2.0. On answerable questions from SQuAD and
HotpotQA, models fine-tuned on SQuAD AGent also demonstrate significant
improvement over those fine-tuned on SQuAD 2.0 ($86.96-84.55$ on SQuAD and
$63.26-51.05$ on HotpotQA). This finding highlights the applicability of
models fine-tuned on AGent datasets to various question types.

However, on answerable questions from NQ and unanswerable questions from SQuAD
2.0, models fine-tuned on AGent datasets exhibit lower performance than those
fine-tuned on SQuAD 2.0. On the one hand, the lower performance on
unanswerable questions from SQuAD 2.0 of models fine-tuned on AGent datasets
is due to the unfair comparision as models fine-tuned on AGent datasets are
tested with out-of-domain samples, and models fine-tuned with SQuAD 2.0 are
tested with in-domain samples.In the next section, we provide a comprehensive
explanation for the lower performance on NQ answerable questions of models
fine-tuned on AGent datasets.

###  5.4 Analysis on Natural Questions

To delve deeper into the underperformance of models fine-tuned on AGent
dataset on answerable questions of NQ, we analyze two sets of answerable
questions. The first set is $100$ answerable questions that models fine-tuned
on SQuAD AGent predict as unanswerable; the second one is 100 answerable
questions that models fine-tuned on SQuAD 2.0 predict as unanswerable. For the
sake of simplicity, we limit our reporting in this section to the analysis of
models RoBERTa-base. Our analysis uncovers two potential issues that can arise
when evaluating models with answerable questions from the NQ dataset. Table 3
summarizes our findings in this section.

Firstly, a considerable difference between the original NQ dataset and the NQ
used in the EQA task following a prevailing approach in the research community
is the difference in the provided context. While the EQA task uses the long
answer as the context Fisch et al. (2019), NQ supplies an entire Wikipedia
page as the context for a given question. This difference presents a potential
problem of inadequate context for answering the question. For instance, in
Table 3, we observe that the long answer associated with the question “Who
dies in the lost city of z?” fails to mention “the lost city of z”. Using a
long answer as the context causes this question unanswerable due to the
insufficient context provided. We find that most answerable questions
predicted as unanswerable by models fine-tuned on SQuAD 2.0 and SQuAD AGent
belong to this specific question type ($65\%$ and $76\%$ respectively). This
finding highlights the potential unreliability when comparing models using the
NQ dataset in the same way as it is commonly done in multiple EQA studies.
This analysis forms the basis for our decision not to employ our AGent
pipeline on the NQ dataset.

Secondly, the questions in the NQ dataset are sourced from real users who
submitted information-seeking queries to the Google search engine under
natural conditions. As a result, a small portion of these questions may
inevitably contain typographical errors or misspellings. In our analysis, we
observe that models fine-tuned on our AGent training set tend to predict the
questions of this type as unanswerable more frequently. Nevertheless, due to
the relatively small proportion of questions with typographical errors in our
randomly surveyed sets, we refrain from drawing a definitive conclusion at
this point. Therefore, in the subsequent section, we will delve further into
this matter by adopting an adversarial attack on the EQA task.

##  6 Robustness against Syntactic Variations

In this section, we apply the adversarial attack technique TextBugger into
EQA.

###  6.1 TextBugger

Our adversarial attack in this section is inspired by the TextBugger attack Li
et al. (2019). We use black-box TextBugger in this section, which means that
the attack algorithm does not have access to the gradients of the model.
TextBugger generates attack samples that closely resemble the typographical
errors commonly made by real users. We perform adversarial attacks on
questions from the SQuAD 1.1 dataset.

Algorithm 1 in Appendix E provides the pseudocode outlining the process of
generating attacked questions. Table 4 provides examples of how TextBugger
generates bugs in a given token.

Original | Insert | Delete | Swap |  | Substitute
---
Character
South | Sou th | Souh | Souht | S0uth
| What Souh African law recongized two typ es
---
of schools?

Table 4: Examples of how TextBugger generates bugs in a given token "South"
and a full question after the TextBugger attack. The attacked tokens are
highlighted in red.

###  6.2 Robustness against TextBugger

Figure 3: Robustness of RoBERTa-base trained on SQuAD 1.1, SQuAD 2.0, SQuAD
AGent against TextBugger.

We investigate the impact of TextBugger attacks on models fine-tuned using
different datasets, namely SQuAD 1.1, SQuAD 2.0, and SQuAD AGent. To
accomplish this, we generate attacked questions by modifying 1, 2, 3, and 4
tokens in the questions from the SQuAD 1.1 dataset.

Figure 3 reports the performance of three models RoBERTa-base fine-tuned on
SQuAD 1.1, SQuAD 2.0, and SQuAD AGent. Firstly, we see that the performance of
the model fine-tuned on SQuAD 1.1 show small decreases (from $92.2$ to
$71.9$). Adversarial attack TextBugger does not present a significant
challenge to the EQA model when the model is designed only to handle
answerable questions.

Secondly, we can observe that the model fine-tuned on unanswerable questions
from SQuAD 2.0 demonstrates significantly better robustness compared to the
model fine-tuned on SQuAD AGent ($86.1-56.8$ compared to $88.6-34.5$). This
finding confirms our initial hypothesis that the lower performance of models
fine-tuned on AGent datasets for answering questions in the NQ dataset is
partly attributable to misspelled keywords in the questions from the NQ
dataset.

##  7 Conclusion and Future Works

In this work, we propose AGent, a novel pipeline designed to automatically
generate two sets of unanswerable questions from a dataset of answerable
questions. We systematically apply AGent on SQuAD and HotpotQA to generate
unanswerable questions. Through a two-stage process of human reviewing, we
demonstrate that AGent unanswerable questions exhibit a low error rate.

Our experimental results indicate that unanswerable questions generated using
AGent pipeline present significant challenges for EQA models fine-tuned on
SQuAD 2.0. We also demonstrate that models fine-tuned using AGent unanswerable
questions exhibit competitive performance compared to models fine-tuned on
human-annotated unanswerable questions from SQuAD 2.0 on multiple test
domains. The good performance of models finetuned on two AGent datasets with
different characteristics, SQuAD AGent and HotpotQA AGent, demonstrate the
utility of AGent in creating high-quality unanswerable questions and its
potential for enhancing the performance of EQA models.

Furthermore, our research sheds light on two potential issues when utilizing
EQA models designed to handle both answerable and unanswerable questions.
Specifically, we identify the problems of insufficient context and
typographical errors as considerable challenges in this context. In calling
for further study on typographical errors, we propose the inclusion of the
TextBugger adversarial attack in EQA. Our analysis reveals that TextBugger
presents a novel challenge for EQA models designed to handle both answerable
and unanswerable questions. It is important to address this challenge
comprehensively before the real-world deployment of EQA models. By
acknowledging and effectively tackling the influence of typographical errors,
we can enhance the robustness and reliability of EQA models in practical
applications.

## Limitations

We acknowledge certain limitations in our work. Firstly, our study primarily
focuses on evaluating the pipeline using multiple pre-trained transformers-
based models in English, which can be prohibitively expensive to create,
especially for languages with limited resources. Furthermore, given the
empirical nature of our study, there is no guarantee that all other
transformer-based models or other deep neural networks would demonstrate the
same level of effectiveness when applied in the AGent pipeline. Consequently,
the impact of the AGent pipeline on low-resource languages may be challenged
due to this limitation. Potential future research could complement our
findings by investigating the effectiveness of implementing AGent pipeline in
other languages.

Secondly, our analysis does not encompass a comprehensive examination of the
models’ robustness against various types of adversarial attacks in EQA when
fine-tuned on AGent datasets. We believe that such an analysis is crucial in
determining the effectiveness of the AGent pipeline in real-world
applications, and its absence deserves further research.

Finally, our study has not discussed underlying factors for the observed
phenomenon: a model fine-tuned on SQuAD AGent is less robust against
TextBugger attack than its peer model fine-tuned on SQuAD 2.0. The study in
this direction requires remarkably intricate investigation, which we deem
beyond the scope of our present research. We leave this for our future work
where we will propose our hypotheses that may shed light on this phenomenon
and potential solutions to improve the robustness of EQA models against
TextBugger.

## References

  * Asai and Choi (2021) Akari Asai and Eunsol Choi. 2021.  Challenges in information-seeking QA: Unanswerable questions and paragraph retrieval.  In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 1492–1504, Online. Association for Computational Linguistics.
  * Chen et al. (2017) Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017.  Reading Wikipedia to answer open-domain questions.  In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 1870–1879, Vancouver, Canada. Association for Computational Linguistics.
  * Chen et al. (2022) Howard Chen, Jacqueline He, Karthik Narasimhan, and Danqi Chen. 2022.  Can rationalization improve robustness? In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 3792–3805, Seattle, United States. Association for Computational Linguistics.
  * Clark et al. (2020) Jonathan H. Clark, Eunsol Choi, Michael Collins, Dan Garrette, Tom Kwiatkowski, Vitaly Nikolaev, and Jennimaria Palomaki. 2020.  TyDi QA: A benchmark for information-seeking question answering in typologically diverse languages.  _Transactions of the Association for Computational Linguistics_ , 8:454–470.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Fisch et al. (2019) Adam Fisch, Alon Talmor, Robin Jia, Minjoon Seo, Eunsol Choi, and Danqi Chen. 2019\.  MRQA 2019 shared task: Evaluating generalization in reading comprehension.  In _Proceedings of the 2nd Workshop on Machine Reading for Question Answering_ , pages 1–13, Hong Kong, China. Association for Computational Linguistics.
  * Fleiss (1971) Joseph Fleiss. 1971.  Measuring nominal scale agreement among many raters. _Psychological Bulletin_ , 76(5):378–382.
  * Gan and Ng (2019) Wee Chung Gan and Hwee Tou Ng. 2019.  Improving the robustness of question answering systems to question paraphrasing.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 6065–6075, Florence, Italy. Association for Computational Linguistics.
  * Heinrich et al. (2022) Quentin Heinrich, Gautier Viaud, and Wacim Belblidia. 2022.  FQuAD2.0: French question answering and learning when you don’t know.  In _Proceedings of the Thirteenth Language Resources and Evaluation Conference_ , pages 2205–2214, Marseille, France. European Language Resources Association.
  * Huang et al. (2018) Hsin-Yuan Huang, Chenguang Zhu, Yelong Shen, and Weizhu Chen. 2018.  Fusionnet: Fusing via fully-aware attention with application to machine comprehension.  In _International Conference on Learning Representations_.
  * Jia and Liang (2017) Robin Jia and Percy Liang. 2017.  Adversarial examples for evaluating reading comprehension systems.  In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_ , pages 2021–2031, Copenhagen, Denmark. Association for Computational Linguistics.
  * Joshi et al. (2020) Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S. Weld, Luke Zettlemoyer, and Omer Levy. 2020.  SpanBERT: Improving pre-training by representing and predicting spans.  _Transactions of the Association for Computational Linguistics_ , 8:64–77.
  * Kwiatkowski et al. (2019) Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019.  Natural questions: A benchmark for question answering research.  _Transactions of the Association for Computational Linguistics_ , 7:452–466.
  * Levy et al. (2017) Omer Levy, Minjoon Seo, Eunsol Choi, and Luke Zettlemoyer. 2017.  Zero-shot relation extraction via reading comprehension.  In _Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017)_ , pages 333–342, Vancouver, Canada. Association for Computational Linguistics.
  * Li et al. (2019) Jinfeng Li, Shouling Ji, Tianyu Du, Bo Li, and Ting Wang. 2019.  TextBugger: Generating adversarial text against real-world applications.  In _Proceedings 2019 Network and Distributed System Security Symposium_. Internet Society.
  * Liu et al. (2019) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.  RoBERTa: A robustly optimized BERT pretraining approach.  _CoRR_ , abs/1907.11692.
  * Loshchilov and Hutter (2019) Ilya Loshchilov and Frank Hutter. 2019.  Decoupled weight decay regularization.  In _International Conference on Learning Representations_.
  * Miller et al. (2020) John Miller, Karl Krauth, Benjamin Recht, and Ludwig Schmidt. 2020.  The effect of natural distribution shift on question answering models.  In _Proceedings of the 37th International Conference on Machine Learning_ , volume 119 of _Proceedings of Machine Learning Research_ , pages 6905–6916. PMLR.
  * Nguyen et al. (2022) Kiet Van Nguyen, Son Quoc Tran, Luan Thanh Nguyen, Tin Van Huynh, Son T. Luu, and Ngan Luu-Thuy Nguyen. 2022.  VLSP 2021 - ViMRC challenge: Vietnamese machine reading comprehension.
  * Rajpurkar et al. (2018) Pranav Rajpurkar, Robin Jia, and Percy Liang. 2018.  Know what you don’t know: Unanswerable questions for SQuAD.  In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)_ , pages 784–789, Melbourne, Australia. Association for Computational Linguistics.
  * Rajpurkar et al. (2016) Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016.  SQuAD: 100,000+ questions for machine comprehension of text.  In _Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing_ , pages 2383–2392, Austin, Texas. Association for Computational Linguistics.
  * Ribeiro et al. (2018) Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. 2018.  Semantically equivalent adversarial rules for debugging NLP models.  In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 856–865, Melbourne, Australia. Association for Computational Linguistics.
  * Sen and Saffari (2020) Priyanka Sen and Amir Saffari. 2020.  What do models learn from question answering datasets? In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 2429–2438, Online. Association for Computational Linguistics.
  * Seo et al. (2017) Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. 2017.  Bidirectional attention flow for machine comprehension.  In _International Conference on Learning Representations_.
  * Si et al. (2021) Chenglei Si, Ziqing Yang, Yiming Cui, Wentao Ma, Ting Liu, and Shijin Wang. 2021\.  Benchmarking robustness of machine reading comprehension models.  In _Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021_ , pages 634–644, Online. Association for Computational Linguistics.
  * Sulem et al. (2021) Elior Sulem, Jamaal Hay, and Dan Roth. 2021.  Do we know what we don’t know? studying unanswerable questions beyond SQuAD 2.0.  In _Findings of the Association for Computational Linguistics: EMNLP 2021_ , pages 4543–4548, Punta Cana, Dominican Republic. Association for Computational Linguistics.
  * Tran et al. (2023) Son Quoc Tran, Phong Nguyen-Thuan Do, Uyen Le, and Matt Kretchmar. 2023.  The impacts of unanswerable questions on the robustness of machine reading comprehension models.  In _Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics_ , pages 1543–1557, Dubrovnik, Croatia. Association for Computational Linguistics.
  * Trivedi et al. (2022) Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. 2022\.  MuSiQue: Multihop questions via single-hop question composition.  _Transactions of the Association for Computational Linguistics_ , 10:539–554.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _Proceedings of the 31st International Conference on Neural Information Processing Systems_ , NIPS’17, page 6000–6010, Red Hook, NY, USA. Curran Associates Inc.
  * Yan et al. (2022) Jun Yan, Yang Xiao, Sagnik Mukherjee, Bill Yuchen Lin, Robin Jia, and Xiang Ren. 2022.  On the robustness of reading comprehension models to entity renaming.  In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 508–520, Seattle, United States. Association for Computational Linguistics.
  * Yang et al. (2018) Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018.  HotpotQA: A dataset for diverse, explainable multi-hop question answering.  In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing_ , pages 2369–2380, Brussels, Belgium. Association for Computational Linguistics.
  * Zaheer et al. (2020) Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. 2020.  Big bird: Transformers for longer sequences.  In _Advances in Neural Information Processing Systems_ , volume 33, pages 17283–17297. Curran Associates, Inc.
  * Zellers et al. (2018) Rowan Zellers, Yonatan Bisk, Roy Schwartz, and Yejin Choi. 2018.  SWAG: A large-scale adversarial dataset for grounded commonsense inference.  In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing_ , pages 93–104, Brussels, Belgium. Association for Computational Linguistics.
  * Zhang et al. (2018) Sheng Zhang, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, and Benjamin Van Durme. 2018.  Record: Bridging the gap between human and machine commonsense reading comprehension.
  * Zhang et al. (2023) Yiming Zhang, Yangqiaoyu Zhou, Samuel Carton, and Chenhao Tan. 2023.  Learning to ignore adversarial attacks.  In _Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics_ , pages 2970–2984, Dubrovnik, Croatia. Association for Computational Linguistics.
  * Zhou et al. (2020) Xiaorui Zhou, Senlin Luo, and Yunfang Wu. 2020.  Co-attention hierarchical network: Generating coherent long distractors for reading comprehension.  In _Proceedings of AAAI Conference on Artificial Intelligence_ , volume 34, page 9725–9732. AAAI Press.
  * Zhu et al. (2019) Haichao Zhu, Li Dong, Furu Wei, Wenhui Wang, Bing Qin, and Ting Liu. 2019.  Learning to ask unanswerable questions for machine reading comprehension.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 4238–4248, Florence, Italy. Association for Computational Linguistics.

##  Appendix A AGent on SQuAD and HotpotQA

|  | SQuAD
---
AGent
| HotpotQA
---
AGent
| Unanswerable
---
Candidates
$975,520$ | $1,800,550$
| Challenging
---
Candidates
$89,432$ | $41,755$
AGent | $50,404$ | $27,840$

Table 5: Statistics of SQuAD AGent and HotpotQA AGent after each step of the
AGent pipeline.

###  A.1 Generate Unanswerable Candidates

SQuAD. In order to generate unanswerable candidates from questions in SQuAD
1.1, we employ bigram TF-IDF, using the question as the query, Chen et al.
(2017) to retrieve the top-$10$ highest contexts from dataset SQuAD 1.1.
Additionally, our algorithm includes a step to ensure that the set of top-$10$
highest TF-IDF scored contexts does not include the original context
corresponding to the question. As a result, AGent generates $975,520$
unanswerable candidates from SQuAD 1.1.

HotpotQA. In constructing benchmark settings for HotpotQA, Yang et al. (2018)
employ bigram TF-IDF, using the question as the query, to retrieve eight
paragraphs from Wikipedia as distractors. Yang et al. (2018) then mix these
distractors with the two gold paragraphs (the ones used to collect the
question and answer). We then generate unanswerable candidates from questions
in HotpotQA by combining every two distractors from HotpotQA. Consequently,
AGent generates $1,800,550$ unanswerable candidates from HotpotQA.

###  A.2 Identifying Challenging Unanswerable Candidates

Before using unanswerable candidates for fine-tuning the six adversarial
models, we manually annotate 100 unanswerable candidates from each set of
HotpotQA and SQuAD. After the manual annotation, we have $1$ answerable
question from the set of SQuAD and $2$ from the set of HotpotQA. As the error
rate from SQuAD 2.0 is $7\%$, we consider the error rate in unanswerable
candidates is within the acceptable range for fine-tuning the six adversarial
models.

In order to fine-tune adversarial models for identifying challenging
unanswerable candidates, we randomly select a set of unanswerable questions
from the set of unanswerable candidates from the previous step. Here, we adopt
the ratio of answerable over unanswerable of SQuAD 2.0. As a result, the
training set in this step for SQuAD consists of $87,599$ answerable and
$43,799$ unanswerable questions; that for HotpotQA consists of $58,525$
answerable and $29,262$ unanswerable questions.

After step 2 of AGent, we have $89,432$ and $41,755$ challenging candidates on
SQuAD and HotpotQA, respectively.

###  A.3 Filtering Model

We employ a model with the following formula to classify questions as
answerable or unanswerable:

$V(q)=c_{a}\cdot\alpha^{n_{a}}-c_{u}\cdot\beta^{n_{u}}$

In our model, we have four inputs and two adjustable parameters. Firstly,
$c_{a}$ and $c_{u}$ represent the total confidence scores of the models
attempting to answer (or predict as answerable) and the models not providing
an answer (or predict as unanswerable), respectively. Additionally, $n_{a}$
and $n_{u}$ denote the number of models attempting to answer and the number of
models not providing an answer, respectively. The parameters $\alpha$ and
$\beta$ are tunable parameters.

In order to tune the filtering model, we manually annotate $200$ questions
from each set challenging unanswerable candidates. We define the difficulty
level for a particular question as the number of models predicting it as
answerable. Consequently, our sets of challenging unanswerable candidates
encompass five difficulty levels (from $2$ to $6$). From each level, we
randomly choose $40$ questions for manual annotation.

Next, we employ grid search with the step size of $0.01$ to tune for the
parameters $\alpha$ and $\beta$ within the range of $(0,2]$ with the objective
of maximizing the recall of unanswerable questions, aiming to include as many
unanswerable questions as possible in our final dataset. As a result, on
SQuAD, we have $\alpha=0.64$ and $\beta=0.69$; on HotpotQA, we have
$\alpha=0.52$ and $\beta=0.94$. After going through the filtering model, SQuAD
AGent has $50,404$ unanswerable questions; HotpotQA AGent has $27,840$.

##  Appendix B Details for Models Training

The input of a question-context pair into the pre-trained model is in the form
of <Question>[SEP]<Context>, with [SEP] as a special token of pre-trained
tokenizer accompanying the pre-trained model. After getting embeddings for
each token, we feed its final embedding into a start and end token classifier.
After taking the dot product between the output embeddings and the
classifier’s weights, we apply the softmax activation to produce a probability
distribution over all words. The word with the highest probability after the
start classifier will be predicted as the start of the answer span.

| total samples | # unanswerable
---|---|---
| SQuAD
---
Adversarial
130,319 | 43,439
| HotpotQA
---
Adversarial
87,787 | 29,262
| SQuAD
---
AGent
135, 615 | 48, 016
| HotpotQA
---
AGent
83, 589 | 25, 064
SQuAD 2.0 | 130,319 | 43,498

Table 6: Data statistics of all training sets used in this paper. Adversarial
datasets refer to training sets for the adversarial models in Step 2.

| SQuAD | HotpotQA | NQ
---|---|---|---
Answerable | 11,873 | 5,901 | 12,836
Unanswerable | 5,945 | 5,918 | 2,331
AGent | 2,217 | 2,776 | $-$

Table 7: Data statistics of all testing sets used in this paper. AGent refers
to the unanswerable questions generated using the AGent pipeline.

Table 6 provides the statistics for all training sets in this paper. Table 7
provides the statistics for all testing sets in this paper.

We train all models with batch size of 8 for 2 epochs. The maximum sequence
length is set to 384 tokens. We use the AdamW optimizer Loshchilov and Hutter
(2019) with an initial learning rate of $2\cdot 10^{-5}$, and $\beta_{1}=0.9$,
$\beta_{2}=0.999$. We use a single NVIDIA GeForce RTX 3080 for training and
evaluating models.

##  Appendix C Detailed Results of Main Experiments

Table 8 presents a detailed version of our experiments with training six
models on SQuAD 2.0, SQuAD AGent, and HotpotQA AGent and evaluating on SQuAD,
HotpotQA, and Natural Questions.

|  |  | SQuAD | HotpotQA | Natural Questions
---|---|---|---|---|---
|  |  | answerable | unanswerable | AGent | answerable | unanswerable | AGent | answerable | unanswerable
SQuAD 2.0 | BERT | base | 78.2 | 70.9 | 43.6 | 42.7 | 84.2 | 58.2 | 34.7 | 53.2
large | 84.5 | 77.2 | 46.5 | 50.1 | 85.8 | 61.5 | 38.7 | 53.4
RoBERTa | base | 84.5 | 82.5 | 54.1 | 50.0 | 88.5 | 59.6 | 45.1 | 78.7
large | 85.7 | 84.6 | 57.1 | 50.4 | 89.5 | 64.9 | 46.7 | 64.7
SpanBERT | base | 85.9 | 76.8 | 45.9 | 56.7 | 82.4 | 50.9 | 50.9 | 70.0
large | 88.5 | 83.0 | 49.1 | 56.4 | 87.3 | 58.8 | 49.7 | 43.3
SQuAD AGent | BERT | base | 83.6 | 23.6 | 77.0 | 58.1 | 86.6 | 42.0 | 30.0 | 81.2
large | 86.8 | 28.2 | 82.0 | 62.8 | 91.0 | 51.6 | 36.3 | 68.2
RoBERTa | base | 87.6 | 29.2 | 86.2 | 63.8 | 91.6 | 53.8 | 41.9 | 90.7
large | 87.3 | 34.6 | 86.5 | 64.9 | 92.4 | 56.5 | 47.8 | 57.3
SpanBERT | base | 87.2 | 28.7 | 75.6 | 63.3 | 87.4 | 45.8 | 43.2 | 89.3
large | 89.3 | 33.5 | 81.0 | 66.7 | 91.1 | 54.0 | 47.1 | 85.3
HotpotQA AGent | BERT | base | 48.2 | 45.1 | 86.3 | 74.4 | 99.6 | 92.2 | 14.2 | 98.1
large | 56.6 | 45.2 | 87.9 | 77.1 | 99.7 | 96.0 | 20.0 | 98.6
RoBERTa | base | 62.8 | 40.6 | 82.9 | 77.7 | 99.7 | 97.2 | 24.8 | 99.5
large | 62.4 | 49.2 | 89.9 | 79.0 | 99.7 | 98.3 | 35.0 | 71.0
SpanBERT | base | 58.5 | 50.4 | 90.3 | 78.3 | 99.7 | 95.0 | 23.0 | 99.2
large | 65.9 | 46.3 | 88.4 | 80.0 | 99.8 | 96.8 | 27.7 | 98.8

Table 8: Performance of 6 models fine-tuned on SQuAD 2.0, SQuAD AGent and
HotpotQA AGent evaluated on SQuAD, HotpotQA, and NQ. The term AGent refers to
the unanswerable questions that are generated using the AGent pipeline.

##  Appendix D Unanswerable Examples

Table 9 and 10 present some notable examples of unanswerable questions
generated using AGent.

Unanswerable questions | Reasons
---|---
Question: |
What is the most critical resource measured to in assessing the determination of a Turing machine’s ability to solve any given set of problems? |
Context: |
Many types of Turing machines are used to define complexity classes, such as deterministic Turing machines, probabilistic Turing machines, non-deterministic Turing machines, quantum Turing machines, symmetric Turing machines and alternating Turing machines. They are all equally powerful in principle, but when resources (such as time or space) are bounded, some of these may be more powerful than others. |  The context provide examples for critical resources but does not specify whether these resources are most critical or not.
Question: |
What are the specific divisors of all even numbers larger than 2? |
Context: Many questions regarding prime numbers remain open, such as Goldbach’s conjecture (that every even integer greater than 2 can be expressed as the sum of two primes), and the twin prime conjecture (that there are infinitely many pairs of primes whose difference is 2). […] |  The context provides insights into even numbers and primes, but it does not directly specify the divisors of all even numbers larger than 2.
Question: |
What is the atomic number for oxygen? |
Context: |
[…] Dalton assumed that water’s formula was HO, giving the atomic mass of oxygen as 8 times that of hydrogen, instead of the modern value of about 16. […], |  The context only mentions the atomic mass ratio between oxygen and hydrogen. It does not provide information about the atomic number of oxygen.
Question: |
When did Tesla make these claims? |
Context: |
[…] In February 1912, an article “Nikola Tesla, Dreamer” by Allan L. Benson was published in World Today, in which an artist’s illustration appears showing the entire earth cracking in half with the caption, "Tesla claims that in a few weeks he could set the earth’s crust into such a state of vibration that it would rise and fall hundreds of feet and practically destroy civilization. A continuation of this process would, he says, eventually split the earth in two. |  The context only refers to an article published in February 1912 by Allan L. Benson, which discusses Tesla’s claims about setting the earth’s crust into vibration. However, it does not explicitly mention when Tesla made the claims.
Table 9: Examples unanswerable questions in SQuAD AGent. The spans in red are strong plausible answers for the corresponding questions. Unanswerable questions | Reasons
---|---
Question: |
Keene is an unincorporated community in Wabaunsee County, Kansas, in what federal republic composed of 50 states? |
Context: |
The United Mexican States (Spanish: “Estados Unidos Mexicanos” ) is a federal republic composed of 31 states and the capital, Mexico City, an autonomous entity on par with the states. Newbury is an unincorporated community in Wabaunsee County, Kansas, in the United States. |  The context mentions the United Mexican States, which is a federal republic composed of 31 states and Mexico City. However, it does not provide any information about a federal republic composed of 50 states.
Question: |
What was the last date the creator of the NOI was seen by Elijah Muhammad? |
Context: Tynnetta Muhammad […] wrote articles and columns for the Nation of Islam (NOI) newspaper “Muhammad Speaks”. Having worked as a secretary to Elijah Muhammad, she made it known after his death in 1975 that she was one of his widows. Elijah Muhammad […] led the Nation of Islam (NOI) from 1934 until his death in 1975. […]. |  The context mentions that Elijah Muhammad led the Nation of Islam from 1934 until his death in 1975, but it does not specify the exact date of the last encounter between the creator of the NOI and Elijah Muhammad.
Question: |
Polk County Florida’s second most populated city is home to which mall? |
Context: |
Lakeland Square Mall is a shopping mall located on the northern side of Lakeland, Florida in the United States. […] It is owned and managed by Rouse Properties, one of the largest mall owners in the United States. […] |  The context specifically mentions Lakeland Square Mall, which is located in Lakeland, Florida, but it does not state that Lakeland is the second most populated city in Polk County.
Question: |
What podcast was the cheif executive officer of Nerdist Industries a guest on? |
Context: |
Nerdist News […] was founded and operated by Nerdist Industries’ CEO, Peter Levin, and its CCO, Chris Hardwick. […] Nerdist Industries was founded as a sole podcast (The Nerdist Podcast) created by Chris Hardwick but later spread to include a network of podcasts. […] |  The context mentions the Nerdist Industries CEO, Peter Levin. However, the context does not provide information about a specific podcast where the CEO of Nerdist Industries was a guest.
Question: |
What book provided the foundation for Masters and Johnson’s research team? |
Context: |
Sheep is a horror novel by British author Simon Maginn, originally published in 1994 and reissued in 1997. […] William Howell Masters (December 27, 1915 - February 16, 2001) was an American gynecologist, best known as the senior member of the Masters and Johnson sexuality research team. […] |  The context mentions William Howell Masters, who was a prominent member of the Masters and Johnson sexuality research team. However, it does not specify the book that served as the foundation for their research.
Table 10: Examples unanswerable questions in Hotpot AGent. The spans in red
are strong plausible answers for the corresponding questions.

##  Appendix E TextBugger Pseudocode

Algorithm 1 presents the pseudocode of the specific version of TextBugger
employed in our analysis.

Function  _TextBugger(_question, numAttack_)_:

$\mathit{attackPositions}\leftarrow$ randomly select indices of tokens in
question;

forall  _$pos\in\mathit{attackPositions}$_ do

$question[pos]\leftarrow\textnormal{{GenerateBug(}}\textnormal{\emph{question[pos]}}\textnormal{{)}}$;

end forall

Function  _GenerateBug(_token_)_:

$newToken\leftarrow token$

while  _$newToken\neq token$_ do

$bugType\leftarrow$ randomly select Bug type;

$newToken\leftarrow\textnormal{{Bug(}}\textnormal{\emph{newToken,
bugType}}\textnormal{{)}}$;

end while

return $newToken$

Algorithm 1 TextBugger EQA Attack


[a]Zane Ozzello

# Bootstrap methods for digitized scalar field theory

Yannick Meurice

###### Abstract

General positivity constraints linking various powers of observables in energy
eigenstates can be used to sharply locate acceptable regions for the energy
eigenvalues, provided that efficient recursive methods are available to
calculate the matrix elements. These recursive methods are derived by looking
at the commutation relations of the observables with the Hamiltonian. We
discuss how this self-consistent (bootstrap) approach can be applied to the
study of digitized scalar field theory in the harmonic basis. Using known
results, we develop the method by testing on quantum systems, including the
harmonic and anharmonic oscillators. We report recent numerical results for up
to four coupled anharmonic oscillators. From here, we consider the possibility
of using the groundwork of this method as a means of studying phase
transitions in 1+1 dimensions.

##  1 Introduction

Universal quantum computers allow for real time evolution in quantum field
theory. One of the simplest examples is $\lambda\phi^{4}$ [1,2,3]. In [4], a
digitization inspired by Gaussian quadrature for the path integral where
$\phi$ is restricted to the zeros of the $n_{max}$ order Hermite polynomial is
used. With the following modification and resulting commutation relations, the
Dyson Interaction picture is preserved:

$[a,a^{\dagger}]={\bf{1}}-n_{max}|n_{max}-1\rangle\langle n_{max}-1|$ (1)
$[a^{\dagger}a,a]=-a$ (2) $[a^{\dagger}a,a^{\dagger}]=a^{\dagger}$ (3)

It is shown in [4] that since digitization provides a field cutoff, the
perturbation series in $\lambda$ will converge with a radius determined from
complex singularities, for sufficiently small $|\lambda|$ [5]. See below for
case when $n_{max}=8$ (from [4]).

Figure 1:  From [4], an example of radius of convergence for $n_{max}=8$

In 1+1 dimensions these singularities pinch the real axis for
$\lambda=\lambda_{c}$, which indicates second order phase transition.

For the undigitized anharmonic oscillator, the moments $\langle
E|x^{2l}|E\rangle$ can be recursively calculated [6,7].

Within this work, we begin with a discussion of the methods that will yield
this recursive process, the quantum mechanical bootstrap. We then investigate
a specific case for the infinite undigitized anharmonic oscillator, to allow
us to eventually compare to results from applying the bootstrap to the
digitized anharmonic oscillator. Finally, we investigate what can be learned
from combining the bootstrap with the digitization procedure.

##  2 Background

###  2.1 Bootstrap Foundations

Utilizing the following simple identities and constraints with our Hamiltonian
of interest, we can begin to develop a bootstrap.

$\langle[H,O]\rangle=0$ (4) $\langle HO\rangle=E\langle O\rangle$ (5) $\langle
O^{\dagger}O\rangle\geq 0$ (6)

All of these should be familiar from an introductory quantum mechanics course,
but by combining the above equations with different momentum and positional
moments, we begin to build the requisite background. As is shown in [7], by
utilizing $O=x^{m}$, $x^{m}p$, and $x^{m-1}$ we get, respectively:

$s\langle x^{m-1}p\rangle=\frac{i}{2}m(m-1)\langle x^{m-2}\rangle$ (7)

$0=m\langle x^{m-1}p^{2}\rangle+\frac{1}{4}m(m-1)(m-2)\langle
x^{m-3}\rangle-\langle x^{m}V^{\prime}(x)\rangle$ (8) $E\langle
x^{m-1}\rangle=\frac{1}{2}\langle x^{m-1}p^{2}\rangle+\langle
x^{m-1}V(x)\rangle$ (9)

Upon combining the above equations, we recover an equation which can be used
in the bootstrapping algorithm itself:

$0=2mE\langle x^{m-1}\rangle+\frac{1}{4}m(m-1)(m-2)\langle
x^{m-3}\rangle-\langle x^{m}V^{\prime}(x)\rangle-2m\langle x^{m-1}V(x)\rangle$
(10)

This is our moment recursion. Utilizing this we can find higher moments of x
in terms of lower moments, our potential, and our energy. Notice, that upon
setting m=1 this returns the virial theorem. From the positivity of the norm,
a Hankel matrix can be constructed as such:

$0\leq\langle O^{\dagger}O\rangle=\sum_{ij}c_{i}^{*}\langle x^{i+j}\rangle
c_{j}\equiv\sum_{ij}c_{i}^{*}M_{ij}c_{j}$ (11)

We now have the necessary pieces for implementing the bootstrap algorithm.

###  2.2 Bootstrap Algorithm

Starting with a Hamiltonian with a given potential, find a recursive statement
for this potential with equation (10). This will allows us to populate the
Hankel matrix with moments according to (11). Taking a search space S and a
set of trial points A within S, we then utilize the algorithm by the following
steps:

  1. 1.

For each point in A, generate 2K-2 points of the moment sequence for each.

  2. 2.

For these terms, construct a $K\times K$ Hankel matrix where $M_{ij}=\langle
x^{i+j}\rangle$ for each point in A.

  3. 3.

Check positive definiteness of this matrix. If positive definite accept this
point, if not throw it out.

  4. 4.

Obtain a set of values at depth K: $B_{K}$. Note: $B_{K}\subseteq A\subset S$
and, working through different values of K: $B_{K+1}\subseteq B_{K}$

This method will allow us to trial over different values at once, for example
in the infinite anharmonic oscillator, we simultaneously trial over possible
energies and possible $\langle x^{2}\rangle$ moments, as these are needed to
be provided for the moment recursion, as opposed to being found by it. The
ability to deal with multiple trial spaces simultaneously allows for the
handling of more complicated Hamiltonians with the method.

##  3 Infinite Anharmonic Oscillator

To see how the quantum mechanical bootstrap of [6,7] behaves, we tested the
cases of the infinite harmonic oscillator and infinite anharmonic oscillator.
Results for the infinite harmonic oscillator were not illuminating as to the
behavior of the algorithm, but by replicating the work in [6] for the infinite
anharmonic oscillator a useful visualization of the algorithm at work arises.

We use a Hamiltonian equation of the form $H=p^{2}+gx^{2}+hx^{4}$ with
$g=h=m=\omega=\hbar=1$

Figure 2:  From left to right, depths at K= 7,8,9,10,11,12 for the ground
state energy

This highlights how the bootstrap behaves visually. The blue regions are all
possible specific $\langle x^{2}\rangle$ and $E$ combinations for a given
depth. Recall, these depths for a $K\times K$ matrix tell us the highest
moment used for depth K is $\langle x^{2k}\rangle$. So, upon increasing the
depth K, we reduce the possible $\langle x^{2}\rangle$ and $E$ combinations
(seen visually as the "islands" decreasing in size), eventually reducing to
the energy values for the Hamiltonian.

##  4 Applications for Digitization

We now seek to determine if the bootstrap method can be applied to the
digitized case, and if so, what, if any modifications need to be made to
implement. From here, we investigate what information can be learned from such
applications.

###  4.1 Digitized Oscillators

Now, by taking $H_{n_{max}}(\hat{x})=0$ we can re-express the $\langle
x^{n_{max}}\rangle$ moment in terms of lower powers of x, via the Hermite
polynomial. Recall, the Hermite polynomial is the eigenfunction for the
harmonic oscillator, so by setting it to 0 a highest level is imposed at which
this and all successive Hermite polynomials go to zero.

From here, the $n_{max}=4$ case will be investigated. From $H_{4}(\hat{x})=0$,
we get a rescursion relation:

$\hat{x}^{4}=3\hat{x}^{2}-\frac{3}{4}$ (12)

Which we can now use as we did a derived statement from (10) before. Now,
moments larger than $n_{max}=4$ are superfluous. This limits us to a
$\frac{n_{max}}{2}\times\frac{n_{max}}{2}$ Hankel matrix, as we only need to
go to moments of the $n_{max}=4$ power, and the odd moments are all zero,
allowing us to reduce to this $2\times 2$ matrix. It is important to note that
as a result of this truncation, these higher moments are not only superfluous,
but entirely useless as the truncation removes their relevance. This
digitization (1,2,3) introduces new terms as a result of the modifications to
the relations, yielding new terms are introduced from the modified relations,
for instance in the $n_{max}=4$ case terms such as $\langle
E|n_{max}-1\rangle$.

Knowing $\langle E|\hat{x}^{0}|E\rangle,\langle
E|\hat{x}^{2}|E\rangle,...,\langle E|\hat{x}^{n_{max}-2}|E\rangle$ is
equivalent to the knowledge of $|\langle x_{j}|E\rangle|^{2}\geq 0$ for the
$\frac{n_{max}}{2}$ positive zeros of the Hermite polynomial of degree
$n_{max}$. We predict that the positivity constraint imposed by the
eigenvalues of the $\frac{n_{max}}{2}\times\frac{n_{max}}{2}$ Hankel matrix as
a result of the positive definiteness are equivalent to the constraints on
energy also imposed by the necessary positivity of $|\langle
x_{j}|E\rangle|^{2}\geq 0$ as a probability. Specifically, we will attempt to
show this for a digitized harmonic and anharmonic oscillator with $n_{max}=4$.

###  4.2 Digitized Results

When producing the bootstrap for each case, instead of trialing over sample
$\langle x^{2}\rangle$ values randomly, utilizing a position operator built
from raising and lowering operators, we can provide $\langle x^{2}\rangle$ in
terms of energy to be used directly, that will differ with the Hamiltonian.

Resultingly, the digitized harmonic oscillator yields:

Figure 3:  Graph of energy constraints imposed by eigenvalues (orange and
blue) and those imposed by Hermite polynomials (red and green)

It can be seen on the x-axis we get matching intercepts for results from our
probability and from our eigenvalue constraints at the same spots, yielding an
area of possible values together. Energy falls within the range
$\frac{3-\sqrt{6}}{2}$ to $\frac{3+\sqrt{6}}{2}$. Here we have:

$\langle x^{2}\rangle=E-2|\langle E|3\rangle|^{2}$ (13)

With the inner product set to 0 for convenience, but if included would just
provide a shift of the graph.

When looking at the digitized anharmonic oscillator we get:

$\langle x^{2}\rangle=\frac{1}{6\lambda+1}(E-2|\langle
E|3\rangle|^{2}+3\lambda\sqrt{6}\langle E|1\rangle\langle
3|E\rangle+9\lambda|\langle E|2\rangle|^{2}+9\lambda|\langle E|3\rangle|^{2})$
(14)

One can see how with $\lambda=0$ this returns the harmonic case. Which gives
for the digitized anharmonic oscillator:

Figure 4:  Left figure is $\lambda=\frac{1}{2}$ and right is $\lambda=1$ Graph
of energy constraints imposed by eigenvalues (orange and blue) and those
imposed by Hermite polynomials (red and green)

Noticing, these graphs are not exceptionally different from the harmonic case.
The anharmonic case just introduces a scaling difference with a coordinate
shift of the same graph. For $\lambda=\frac{1}{2}$ and $\lambda=1$ they would
respectively have energy fall in ranges of $6-2\sqrt{6}$ to $6+2\sqrt{6}$ for
the former and $\frac{21-7\sqrt{6}}{2}$ to $\frac{21+7\sqrt{6}}{2}$ for the
latter.

##  5 Future Work

We have applied the quantum mechanical bootstrap to different oscillator
models. We have shown that with minimal adjustments, the bootstrap can be
applied to the digitized case, showing for the harmonic and anharmonic case
for $n_{max}=4$. Going forward, we want to see how easily we can apply this
method to larger $n_{max}$, with beginning to look at $n_{max}=8$. We also
want to investigate how the bootstrap works with coupled oscillators.

## Acknowledgements

This work is supported in part by the Department of Energy under Award Numbers
DE-SC0019139 and DE-SC0010113.

## References

  * [1] Stephen P. Jordan, Keith S. M. Lee, and John Preskill.  Quantum Algorithms for Quantum Field Theories.  Science, 336:1130–1133, 2012.
  * [2] Natalie Klco and Martin J. Savage.  Digitization of scalar fields for quantum computing.  Phys. Rev. A, 99:052335, 2019.
  * [3] Alexandru Macridin, Panagiotis Spentzouris, James Amundson, and Roni Harnik.  Digital quantum computation of fermion-boson interacting systems.  Phys. Rev. A, 98:042312, 2018.
  * [4] Robert Maxton, Yannick Meurice.  Perturbative boundaries of quantum advantage: real-time evolution for digitized $\lambda\phi^{4}$ lattice models.  Phys. Rev. D, 107:074508, 2023.
  * [5] Y. Meurice.  A Simple method to make asymptotic series of Feynman diagrams converge.  Phys. Rev. Lett., 88:141601, 2002.
  * [6] Xizhi Han, Sean A. Hartnoll and Jorritt Kruthoff.  Bootstrapping Matrix Quantum Mechanics.  Phys. Rev. Lett, 125:041601 2020.
  * [7] David Berenstein, George Hulsey.  Bootstrapping Simple QM Systems.  arxiv:2108.08757v2.
  * [8] H. Araki.  Hamiltonian Formalism and the Canonical Commutation Relations in Quantum Field Theory  Journal of Math. Phys. 492: 10.1063/1.1703685, 1960.


# EqDrive: Efficient Equivariant Motion Forecasting with Multi-Modality for
Autonomous Driving

Yuping Wang  University of Michigan
Ann Arbor, United States
<EMAIL_ADDRESS>Jier Chen  Shanghai Jiao Tong University
Shanghai, China
<EMAIL_ADDRESS>
###### Abstract

Forecasting vehicular motions in autonomous driving requires a deep
understanding of agent interactions and the preservation of motion
equivariance under Euclidean geometric transformations. Traditional models
often lack the sophistication needed to handle the intricate dynamics inherent
to autonomous vehicles and the interaction relationships among agents in the
scene. As a result, these models have a lower model capacity, which then leads
to higher prediction errors and lower training efficiency. In our research, we
employ EqMotion, a leading equivariant particle, and human prediction model
that also accounts for invariant agent interactions, for the task of multi-
agent vehicle motion forecasting. In addition, we use a multi-modal prediction
mechanism to account for multiple possible future paths in a probabilistic
manner. By leveraging EqMotion, our model achieves state-of-the-art (SOTA)
performance with fewer parameters (1.2 million) and a significantly reduced
training time (less than 2 hours).

###### Index Terms:

Autonomous Driving, Motion Forecasting, Equivariant Neural Networks, Multi-
Modality

##  I Introduction

For autonomous vehicles, accurately predicting the future trajectories of
surrounding vehicles is paramount. While several contemporary models offer
promising results in motion forecasting [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], many
fall short in accounting for the equivariant nature of vehicle trajectories
and the invariance between vehicle-vehicle interactions. Recognizing and
leveraging the patterns of these can be a significant advantage in predicting
the vehicles’ future motions. Furthermore, a critical observation underpinning
our work is the inherent uncertainties that come with dynamic road
environments. Real-world vehicles often exhibit behaviors that can have
multiple plausible future paths.

In this paper, we introduce a novel model that seamlessly combines these two
crucial aspects: recognizing the equivariant and invariant patterns in vehicle
trajectories by employing EqMotion [11], an equivariant particle and human
prediction model with considerations for invariant agent interaction, as the
network backbone. In addition, our model predicts multiple future trajectories
for each vehicle with corresponding probabilities. By doing so, we not only
capture the inherent relations between the vehicle histories but also
prioritize their futures based on their likelihood. This multi-modal approach
acknowledges the unpredictable nature of road scenarios and provides a richer
and more holistic forecast than singular trajectory predictions. Experiments
in real-world scenarios show that our model stands out in terms of accuracy
and training efficiency.

##  II Related Works

###  II-A Equivariant Features and Invariant Interactions

Equivariant feature learning originally rose from the domain of image
processing with convolution neural networks (CNN). In [12], the authors
proposed a method called Group Equivariant Convolutional Networks that is able
to learn image features by preserving their equivariant properties and
demonstrated superior image classification performance as compared to
conventional CNNs. In the past few years, equivariant feature learning has
emerged as a crucial paradigm in machine learning, with widespread
applications in areas other than image processing. For example, in [13], the
authors performed a study on recently developed equivariant feature layers and
proposed a method that utilizes such layers in graph neural networks. In
essence, equivariant representations ensure that transformations in the input
lead to equivalent transformations in the output, thus preserving the
intrinsic relationships. Such properties are invaluable in computer vision and
motion forecasting, where spatial hierarchies and relationships are pivotal.

On a similar trajectory of thought, Graph Convolution Networks (GCNs) [14]
have gained traction due to their capability to capture and model interactions
in structured data. GCNs, designed to operate over graph structures, exploit
the local symmetries present in data, resulting in invariant representations.
These invariants become critical when studying the interactions between nodes,
as they ensure that the network’s response remains consistent irrespective of
the nodes’ ordering or specific graph isomorphisms. Combining equivariant
feature learning with GCNs paves the way for models that not only recognize
and preserve relationships but also ensure consistent interpretations across
transformations. This synergy has been explored in a recent work, EqMotion
[11], showing promise in complex particle and human body movement prediction
tasks that require a deep understanding of interactions and spatial
hierarchies. Both equivariant and invariant learning paradigms, when jointly
harnessed, can provide a robust foundation for understanding complex
structured data. The amalgamation of these techniques offers a promising
direction for future research in representation learning.

###  II-B Multi-Modality Motion Forecasting

Vehicle trajectory forecasting has seen significant advancements in recent
years, such as [15, 16, 17, 18, 7, 19, 20]. These models employ probabilistic
techniques to predict multi-modal futures. In essence, multi-modality allows
for the forecasting of multiple potential trajectories for an agent, rather
than a single path. To quantify the likelihood of each potential path, models
often predict a probability distribution over the set of trajectories. Such
probabilistic predictions have been popularized in part by models like the
Multiple Futures Prediction [21]. The inherent advantage lies in allowing
decision-making systems, like those in autonomous vehicles, to plan and react
to the most probable paths while staying aware of less likely but still
possible trajectories. Moreover, evaluating the predicted probabilities can
provide insights into high-risk or ambiguous scenarios. As systems aim for
safer and more informed decisions, multi-modality combined with probabilistic
reasoning remains at the forefront of research. This dual-pronged approach
ensures that predictions are not only diverse but also anchored in their
likelihood of occurrence.

##  III Problem Formulation

We aim to predict the trajectories of multiple agents based on their past
motions and high-definition (HD) maps, while also capturing the inherent
uncertainty in their future motions.

Our primary input encompasses the historical trajectories of $A$ agents. For
each agent $a$ at each time step $t$ in the input sequence, its location
vector is represented as $x_{a}^{t}$ which encompasses its geometric $x,y$
coordinates. This gives rise to $A\times T_{\text{in}}$ coordinate pairs,
which we symbolize as $X\in\mathbb{R}^{A\times T_{\text{in}}\times 2}.$

We also have the HD map as our second input comprised of $L$ centerlines in
the scene. Each centerline has $K$ coordinate pairs. We organize all pairs in
a matrix $M\in\mathbb{R}^{L\times K\times 2}.$ It is pertinent to note that
$A$, $H$, $T_{\text{in}}$, and $T_{\text{out}}$ are configuration parameters.
In conditions where there are fewer than $A$ agents present, we pad the non-
existent values in the matrices with 0 and exclude them from calculations.

Our first output, $\hat{Y}$, is a compilation of predicted trajectories for
each agent. For every agent $a$, we predict $H$ potential trajectories over
the subsequent $T_{\text{out}}$ timesteps. Thus, our output has $A\times
H\times T_{\text{out}}$ coordinate pairs, represented as
$\hat{Y}\in\mathbb{R}^{A\times H\times T_{\text{out}}\times 2}.$

Additionally, our second output is a set of probabilities correlating with
these trajectories, where each entry signifies the probability of the
associated trajectory being executed by the agent over all the trajectories.
This is denoted by $P\in\mathbb{R}^{A\times H}\text{ where }0<=P_{a}^{h}<=1,$
and for each agent the probability of each head sums to 1: $\sum_{h\in
H}P_{a}^{h}=1.$

During the training and validation phases, we access the ground truth future
trajectories for all $A$ agents, given as $Y\in\mathbb{R}^{A\times
T_{\text{out}}\times 2}.$ Our learning objective is to ensure that for each
agent the most likely trajectory $\hat{Y}_{a}^{\hat{h}}$, where
$\hat{h}=\operatorname*{arg\,max}_{h\in H}P_{a}^{h}$ is an accurate reflection
of $Y_{a}$.

##  IV Methodology

Figure 1: EqDrive Architecture

Our model architecture is shown in Figure 1. In the following subsections, we
explain the model components in detail.

###  IV-A Map Information Encoding

We apply a Self-attention network [22] to encode the map information into a
feature vector.

$M_{\text{encoded}}=\operatorname{SelfAttention}(M).$ (1)

###  IV-B Equivariant Geometry and Invariant Interaction Encoding

Given the historical trajectories of agents $X$, we first apply the Eqmotion
[11] as the backbone feature learners. From input $X$, we derive the initial
geometric $G^{0}\in\mathbb{R}^{A\times T_{\text{out}}}$ alongside the pattern
$H^{0}\in\mathbb{R}^{A\times hidden\\_dim}$ features as:

$G^{0},H^{0}=\mathcal{F}_{\text{InitialFeatureExtractor}}(X).$ (2)

The map features is concatenated to the hidden features:

$H^{0}\leftarrow MLP([H^{0};M_{\text{encoded}}]).$ (3)

We then model each agent feature as a node and assume a relation between each
node. Thus we build a graph convolution mechanism as follows:

${e_{ij}}=\mathcal{F}_{\text{GraphConvolution}}(G^{0},H^{0}).$ (4)

Based on this, a dual-network structure is consecutively executed, focusing on
discerning both the geometric and pattern features. This iterative process
takes place $Q$ cycles as shown in Algorithm 1.

For an in-depth understanding and implementation of these specific layers,
please refer to the EqMotion framework[11]. Note that the same operations
below are applied to each agent, thus from here on we omit the agent dimension
for simplicity.

Algorithm 1 Iterative Process for Feature Learning

1: for $q=1$ to $Q$ do

2:
$G^{q}=\mathcal{F}_{\text{GeometricFeatureExtractor}}(G^{q-1},H^{q-1},e_{ij})$
(5)

3: $H^{q}=\mathcal{F}_{\text{PatternFeatureExtractor}}(G^{q-1},H^{q-1})$ (6)

4: end for

###  IV-C Multi-Head Trajectory Decoder and Probability Estimator

With the final hidden feature vector for each agent $G^{q}$, we begin the
decoding process for $H$ trajectories and a probablistic distribution for
them. For each head, we first have an equivariant trajectory decoder
implemented with a 4-layer multilayer perception (MLP):

$\hat{Y^{h}}=\operatorname{MLP}(G^{P}-\bar{G^{P}})+\bar{G^{P}}.$ (7)

We concatenate the predictions from all heads and employ a final MLP to learn
the probability distribution.

$\hat{p}=\operatorname{MLP}([\hat{Y^{0}},\hat{Y^{1}};...;\hat{Y^{H}}]).$ (8)

Note that during training, this probability estimator does not pass gradients
downstream, because we want the estimator to predict passively based on the
learned geometric and pattern features, to avoid interference.

###  IV-D Training Time Loss Computation

During training, we apply a combined loss of a minimum average displacement
error (minADE) on the trajectory and a cross entropy loss on the probability.
Specifically, given the predictions of all agents at all heads $\hat{Y}$ and
ground truth $Y$, we first compute ADE $E$ for each head:

$E^{h}=\frac{1}{T}\sum_{t=1}^{T}\|\hat{Y_{t}^{h}}-Y_{t}\|_{2}.$ (9)

The index to the trajectory with minimum ADE is:

$\hat{h}=\operatorname*{arg\,min}_{h\in H}E^{h}.$ (10)

We compute the loss as the ADE on $E^{\hat{h}}$:

$L_{\text{trajectory}}=E^{\hat{h}}.$ (11)

We write the ground truth distribution as a one-hot vector:

$r\in\mathbb{R}^{H},r^{h}=\begin{cases}0&\text{for }h\neq\hat{h},\\\
1&\text{for }h=\hat{h}.\end{cases}$ (12)

We then apply a cross-entropy loss on the probability:

$L_{\text{probability}}=-\sum_{h}r^{h}\log(p^{h}).$ (13)

Lastly, we combine the two losses using a weighted sum controlled by
hyperparameter $\beta$, with a higher value in $\beta$ meaning a higher
emphasis on trajectory similarity:

$L=\beta L_{\text{trajectory}}+(1-\beta)L_{\text{probability}}.$ (14)

The above approach ensures that the model not only tries to predict accurate
trajectories but also assigns higher probabilities to the most accurate ones.
It’s a strong combination of losses that encourages both spatial accuracy in
predictions and confidence calibration in the predicted probabilities.

###  IV-E Inference Time Trajectory Selection

At inference time, we simply choose the trajectory that has the maximum
probability:

$\hat{y}=\hat{Y}^{\hat{h}}\text{ and }\hat{h}=\operatorname*{arg\,max}_{h\in
H}p^{h}.$ (15)

###  IV-F Explanation on the Choice of Loss Function

Here we want to prove that by applying the cross entropy loss of the
probability output, we maximize the likelihood of the true trajectory. Assume
our model predicts $H$ trajectories
$\\{\hat{y}^{1},\hat{y}^{2},\ldots,\hat{y}^{H}\\}$ with associated
probabilities $\\{p^{1},p^{2},\ldots,p^{H}\\}$ and the trajectory closest to
the ground truth is indexed at $\hat{h}$. The cross-entropy loss is then:

$\begin{split}\text{CrossEntropy}&=-\sum_{h}r^{h}\log(p^{h})\\\
&=-log(p^{\hat{h}}).\end{split}$ (16)

Therefore, by minimizing the cross-entropy loss, we are equivalently
maximizing $p^{\hat{h}}$, which is the probability of the trajectory that is
closest to the ground truth. This approach ensures that the model gives the
highest probability to the trajectory that most closely matches the actual
ground truth among the predictions.

##  V Experiments

TABLE I: Comparison of Models Model |  minADE at 3s |  minFDE at 3s |  Miss Rate |  Number of Parameters |  Training Time
---|---|---|---|---|---
LaneGCN[9] |  0.71 |  1.08 |  0.1 |  3.7M |  8hrs w/ 4xTitanX
DenseTNT[23] |  0.75 |  1.05 |  0.1 |  1.1M |  5hrs w/ 8x2080Ti
HiVT-128[10] |  0.661 |  0.969 |  0.092 |  2.5M |  56.5hrs w/ 1x3060Ti
EqDrive |  0.518 |  0.915 |  0.089 |  1.2M |  1.8hrs w/ 1x3060Ti

###  V-A Datasets

We use the Argoverse motion forecasting dataset[24]. Argoverse offers a
training set encompassing approximately 200k scenarios, each detailing the
trajectories of both the ego and neighboring agents. The dataset chronicles
agent movements from the preceding 2 seconds and forecasts the subsequent 3
seconds, with data points sampled at 10Hz frequency. In addition, map
information is also included for all the scenes, represented lane center line
waypoints close to the agent.

###  V-B Metrics for Evaluation

We utilize the following metrics to evaluate the performance of our model:

  1. 1.

Minimum Average Displacement Error (minADE): This metric quantifies the
average L2 distance between the ground truth trajectory and the closest
predicted trajectory. Formally, it is defined as:

$\text{minADE}_{\tau}=\frac{1}{\tau}\min_{h}\sum_{t=1}^{\tau}\lVert\mathbf{y}_{t}^{h}-\mathbf{y}_{t}\rVert_{2}$
(17)

where $\mathbf{y}_{t}^{h}$ represents the predicted position at time $t$ from
the $h$-th trajectory, $\mathbf{y}_{t}$ indicates the ground truth position at
time $t$, and $\tau$ is the prediction horizon. In our case, $\tau$ can be
$10$ (for 1s), $20$ (for 2s), or $30$ (for 3s) given our 10Hz sampling
frequency.

  2. 2.

Minimum Final Displacement Error (minFDE): This metric captures the L2
distance between the predicted and actual final positions of the trajectories.

$\text{minFDE}_{\tau}=\min_{h}\lVert\mathbf{y}_{\tau}^{h}-\mathbf{y}_{\tau}\rVert_{2}$
(18)

Here, $\tau$ can take values $10$, $20$, or $30$.

  3. 3.

Miss Rate: This computes the proportion of predictions that deviate beyond a
predefined threshold distance $d$ from the ground truth.

$\text{Miss
Rate}=\frac{1}{N}\sum_{h=1}^{H}\mathbf{1}(\min_{t}\lVert\mathbf{y}_{t}^{h}-\mathbf{y}_{t}\rVert_{2}>d_{threshold})$
(19)

In the above, $\mathbf{1}$ is the indicator function which outputs 1 if its
internal condition holds true, and 0 otherwise. $H$ represents the total
number of predictions.

###  V-C Implementation Details

For the training, we use the Adam optimizer with a learning rate of $10^{-5}$.
The model was trained for 50 epochs with a batch size of 512. Our hardware is
NVIDIA RTX 3060Ti. Our configuration and hyperparameters are illustrated in
the below table:

Description |  Symbol |  Value
---|---|---
Length of input sequence |  $T_{\text{in}}$ |  20
Length of output sequence |  $T_{\text{out}}$ |  30
Number of total agents in the scene |  $A$ |  4
Number of lane centerlines |  $L$ |  10
Number of coordinates per centerline |  $K$ |  100
Number of prediction heads |  $H$ |  6
Number of repeats on the feature learning layers |  $Q$ |  20
Size of all hidden dimension |  $hidden\\_dim$ |  64
Loss Component Weight |  $\beta$ |  0.5

##  VI Results and Discussions

###  VI-A Quantitative Results

We compared our model with current SOTA models including LaneGCN[9],
DenseTNT[23] and HiVT[10]. EqDrive archives competitive and even slightly
better prediction accuracy in terms of minADE, minFDE, and Miss Rate, with
comparatively fewer parameters and much shorter training time.

###  VI-B Qualitative Results

(a) Ego Agent and Neighbors Go Straight

(b) Ego Agent Right Turn

(c) Ego Agent Left Turn

(d) Ego Agent Wide Left Turn

(e) Only Ego Agent Goes Straight

(f) Ego Agent Tight Right Turn

Figure 2: Visualization of Trajectory Predictions

We included Figure 2(a), Figure 2(b), Figure 2(c), Figure 2(d), Figure 2(e)
and Figure 2(f) as six visual demonstrations. The solid lines are the 5s
historical observation plus ground truth future, while the scatter dots are
the 3s prediction. The ego agent is in red. In Figure 2(a) and Figure 2(e) we
show the simplest scenario where all agents or just the ego agent are
predicted to always go straight. The model predicts with high confidence the
agents will continue to drive straight, which aligns with the actual on-road
situation that we do not vehicles to make sudden turns off their lanes. In
Figure 2(b) and Figure 2(f), we see the model provides three predictions that
cover the two right turn destination lanes. In Figure 2(c) and Figure 2(d), we
see the model predicates three possible paths for the ego agent, each
corresponding to a different curvature for a left turn. These show our model
can capture the realistic vehicular motion where the driver might choose
different lanes and/or different turning radius.

In a typical motion planning system for autonomous driving, such as [25], the
multi-model predictions from our model can provide useful information for
planning tasks. For the ego vehicle, the predicted trajectory can provide a
high level of heuristics that drives a higher granular free space search
algorithm such as A* or rapid exploring random tree (RRT) to produce a
drivable path. A realistic guidance makes the search algorithm converge faster
[26]. For the neighbor agents, a multi-modal set of predictions allows the
planning system to perform probabilistic collision checking [27] and solve for
a trajectory that is collision-free at different possible future scenarios.

##  VII Conclusion

By employing EqMotion for autonomous vehicles, we have successfully adopted
equivariant models and invariant interactions in autonomous vehicle trajectory
prediction. Our introduction of multi-modal predictions with probabilistic
heads allows our model to anticipate multiple trajectories, addressing real-
world uncertainties. The results, showing we achieve competitive performance
with other popular models, validate the effectiveness and efficiency of our
approach.

## References

  * [1] Jiyang Gao, Chen Sun, Hang Zhao, Yi Shen, Dragomir Anguelov, Congcong Li, and Cordelia Schmid.  Vectornet: Encoding hd maps and agent dynamics from vectorized representation.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11525–11533, 2020.
  * [2] Hengbo Ma, Yaofeng Sun, Jiachen Li, Masayoshi Tomizuka, and Chiho Choi.  Continual multi-agent interaction behavior prediction with conditional generative memory.  IEEE Robotics and Automation Letters, 6(4):8410–8417, 2021.
  * [3] Harshayu Girase, Haiming Gang, Srikanth Malla, Jiachen Li, Akira Kanehara, Karttikeya Mangalam, and Chiho Choi.  Loki: Long term and key intentions for trajectory prediction.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9803–9812, 2021.
  * [4] Shanshan Xie, Jiachen Li, and Jianqiang Wang.  A cognition-inspired trajectory prediction method for vehicles in interactive scenarios.  IET Intelligent Transport Systems.
  * [5] Yuning Chai, Benjamin Sapp, Mayank Bansal, and Dragomir Anguelov.  Multipath: Multiple probabilistic anchor trajectory hypotheses for behavior prediction.  In Leslie Pack Kaelbling, Danica Kragic, and Komei Sugiura, editors, 3rd Annual Conference on Robot Learning, volume 100, pages 86–99, 2019.
  * [6] Ye Yuan, Xinshuo Weng, Yanglan Ou, and Kris M Kitani.  Agentformer: Agent-aware transformers for socio-temporal multi-agent forecasting.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9813–9823, 2021.
  * [7] Jiachen Li, Hengbo Ma, Zhihao Zhang, Jinning Li, and Masayoshi Tomizuka.  Spatio-temporal graph dual-attention network for multi-agent prediction and tracking.  IEEE Transactions on Intelligent Transportation Systems, 23(8):10556–10569, 2021.
  * [8] Jiachen Li, Fan Yang, Hengbo Ma, Srikanth Malla, Masayoshi Tomizuka, and Chiho Choi.  Rain: Reinforced hybrid attention inference network for motion forecasting.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021.
  * [9] Ming Liang, Bin Yang, Rui Hu, Yun Chen, Renjie Liao, Song Feng, and Raquel Urtasun.  Learning lane graph representations for motion forecasting.  In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part II 16, pages 541–556. Springer, 2020.
  * [10] Zikang Zhou, Luyao Ye, Jianping Wang, Kui Wu, and Kejie Lu.  Hivt: Hierarchical vector transformer for multi-agent motion prediction.  In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 8813–8823, 2022.
  * [11] Chenxin Xu, Robby T Tan, Yuhong Tan, Siheng Chen, Yu Guang Wang, Xinchao Wang, and Yanfeng Wang.  Eqmotion: Equivariant multi-agent motion prediction with invariant interaction reasoning.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1410–1420, 2023.
  * [12] Taco Cohen and Max Welling.  Group equivariant convolutional networks.  In International conference on machine learning, pages 2990–2999. PMLR, 2016.
  * [13] Haggai Maron, Heli Ben-Hamu, Nadav Shamir, and Yaron Lipman.  Invariant and equivariant graph networks.  arXiv preprint arXiv:1812.09902, 2018.
  * [14] Thomas N Kipf and Max Welling.  Semi-supervised classification with graph convolutional networks.  arXiv preprint arXiv:1609.02907, 2016.
  * [15] Balakrishnan Varadarajan, Ahmed Hefny, Avikalp Srivastava, Khaled S Refaat, Nigamaa Nayakanti, Andre Cornman, Kan Chen, Bertrand Douillard, Chi Pang Lam, Dragomir Anguelov, et al.  Multipath++: Efficient information fusion and trajectory aggregation for behavior prediction.  In 2022 International Conference on Robotics and Automation (ICRA), pages 7814–7821. IEEE, 2022.
  * [16] Jiachen Li, Hengbo Ma, and Masayoshi Tomizuka.  Conditional generative neural system for probabilistic trajectory prediction.  In 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 6150–6156. IEEE, 2019.
  * [17] Jiachen Li, Fan Yang, Masayoshi Tomizuka, and Chiho Choi.  Evolvegraph: Multi-agent trajectory prediction with dynamic relational reasoning.  NeurIPS, 33:19783–19794, 2020.
  * [18] Chiho Choi, Joon Hee Choi, Jiachen Li, and Srikanth Malla.  Shared cross-modal trajectory prediction for autonomous driving.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 244–253, 2021.
  * [19] Fan-Yun Sun, Isaac Kauvar, Ruohan Zhang, Jiachen Li, Mykel J Kochenderfer, Jiajun Wu, and Nick Haber.  Interaction modeling with multiplex attention.  Advances in Neural Information Processing Systems, 35:20038–20050, 2022.
  * [20] Hengbo Ma, Yaofeng Sun, Jiachen Li, and Masayoshi Tomizuka.  Multi-agent driving behavior prediction across different scenarios with self-supervised domain knowledge.  In 2021 IEEE International Intelligent Transportation Systems Conference (ITSC). IEEE, 2021.
  * [21] Charlie Tang and Russ R Salakhutdinov.  Multiple futures prediction.  Advances in neural information processing systems, 32, 2019.
  * [22] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin.  Attention is all you need.  NeurIPS, 30, 2017.
  * [23] Junru Gu, Chen Sun, and Hang Zhao.  Densetnt: End-to-end trajectory prediction from dense goal sets.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021.
  * [24] Ming-Fang Chang, John Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, et al.  Argoverse: 3d tracking and forecasting with rich maps.  In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8748–8757, 2019.
  * [25] Dmitri Dolgov, Sebastian Thrun, Michael Montemerlo, and James Diebel.  Practical search techniques in path planning for autonomous driving.  Ann Arbor, 1001(48105):18–80, 2008.
  * [26] Fahad Islam, Jauwairia Nasir, Usman Malik, Yasar Ayaz, and Osman Hasan.  Rrt-smart: Rapid convergence implementation of rrt towards optimal solution.  In 2012 IEEE international conference on mechatronics and automation, pages 1651–1656. IEEE, 2012.
  * [27] Matthias Althoff, Olaf Stursberg, and Martin Buss.  Model-based probabilistic collision detection in autonomous driving.  IEEE Transactions on Intelligent Transportation Systems, 10(2):299–310, 2009.