Robust Reading Comprehension with Linguistic Constraints via Posterior Regularization
Extracted source text · arXiv 1911.06948
%% bare_jrnl.tex
%% V1.4b
%% 2015/08/26
%% by Michael Shell
%% see http://www.michaelshell.org/
%% for current contact information.
%%
%% This is a skeleton file demonstrating the use of IEEEtran.cls
%% (requires IEEEtran.cls version 1.8b or later) with an IEEE
%% journal paper.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/pkg/ieeetran
%% and
%% http://www.ieee.org/
%%*************************************************************************
%% Legal Notice:
%% This code is offered as-is without any warranty either expressed or
%% implied; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE!
%% User assumes all risk.
%% In no event shall the IEEE or any contributor to this code be liable for
%% any damages or losses, including, but not limited to, incidental,
%% consequential, or any other damages, resulting from the use or misuse
%% of any information contained here.
%%
%% All comments are the opinions of their respective authors and are not
%% necessarily endorsed by the IEEE.
%%
%% This work is distributed under the LaTeX Project Public License (LPPL)
%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
%% distributed and modified. A copy of the LPPL, version 1.3, is included
%% in the base LaTeX documentation of all distributions of LaTeX released
%% 2003/12/01 or later.
%% Retain all contribution notices and credits.
%% ** Modified files should be clearly indicated as such, including **
%% ** renaming them and changing author support contact information. **
%%*************************************************************************
% *** Authors should verify (and, if needed, correct) their LaTeX system ***
% *** with the testflow diagnostic prior to trusting their LaTeX platform ***
% *** with production work. The IEEE's font choices and paper sizes can ***
% *** trigger bugs that do not appear when using other class files. *** ***
% The testflow support page is at:
% http://www.michaelshell.org/tex/testflow/
\documentclass[journal]{IEEEtran}
%
% If IEEEtran.cls has not been installed into the LaTeX system files,
% manually specify the path to it like:
% \documentclass[journal]{../sty/IEEEtran}
% Some very useful LaTeX packages include:
% (uncomment the ones you want to load)
% *** MISC UTILITY PACKAGES ***
%
%\usepackage{ifpdf}
% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional
% compilation based on whether the output is pdf or dvi.
% usage:
% \ifpdf
% % pdf code
% \else
% % dvi code
% \fi
% The latest version of ifpdf.sty can be obtained from:
% http://www.ctan.org/pkg/ifpdf
% Also, note that IEEEtran.cls V1.7 and later provides a builtin
% \ifCLASSINFOpdf conditional that works the same way.
% When switching from latex to pdflatex and vice-versa, the compiler may
% have to be run twice to clear warning/error messages.
% *** CITATION PACKAGES ***
%
\usepackage{cite}
% cite.sty was written by Donald Arseneau
% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package
% \cite{} output to follow that of the IEEE. Loading the cite package will
% result in citation numbers being automatically sorted and properly
% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using
% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's
% \cite will automatically add leading space, if needed. Use cite.sty's
% noadjust option (cite.sty V3.8 and later) if you want to turn this off
% such as if a citation ever needs to be enclosed in parenthesis.
% cite.sty is already installed on most LaTeX systems. Be sure and use
% version 5.0 (2009-03-20) and later if using hyperref.sty.
% The latest version can be obtained at:
% http://www.ctan.org/pkg/cite
% The documentation is contained in the cite.sty file itself.
% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
\usepackage[pdftex]{graphicx}
% declare the path(s) where your graphic files are
\graphicspath{{../pdf/}{../jpeg/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
% or other class option (dvipsone, dvipdf, if not using dvips). graphicx
% will default to the driver specified in the system graphics.cfg if no
% driver is specified.
\usepackage[dvips]{graphicx}
% declare the path(s) where your graphic files are
\graphicspath{{../eps/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.eps}
\fi
% graphicx was written by David Carlisle and Sebastian Rahtz. It is
% required if you want graphics, photos, etc. graphicx.sty is already
% installed on most LaTeX systems. The latest version and documentation
% can be obtained at:
% http://www.ctan.org/pkg/graphicx
% Another good source of documentation is "Using Imported Graphics in
% LaTeX2e" by Keith Reckdahl which can be found at:
% http://www.ctan.org/pkg/epslatex
%
% latex, and pdflatex in dvi mode, support graphics in encapsulated
% postscript (.eps) format. pdflatex in pdf mode supports graphics
% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure
% that all non-photo figures use a vector format (.eps, .pdf, .mps) and
% not a bitmapped formats (.jpeg, .png). The IEEE frowns on bitmapped formats
% which can result in "jaggedy"/blurry rendering of lines and letters as
% well as large increases in file sizes.
%
% You can find documentation about the pdfTeX application at:
% http://www.tug.org/applications/pdftex
% *** MATH PACKAGES ***
%
\usepackage{amsmath}
% A popular package from the American Mathematical Society that provides
% many useful and powerful commands for dealing with mathematics.
%
% Note that the amsmath package sets \interdisplaylinepenalty to 10000
% thus preventing page breaks from occurring within multiline equations. Use:
%\interdisplaylinepenalty=2500
% after loading amsmath to restore such page breaks as IEEEtran.cls normally
% does. amsmath.sty is already installed on most LaTeX systems. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/pkg/amsmath
% *** SPECIALIZED LIST PACKAGES ***
%
\usepackage{algorithmic}
% algorithmic.sty was written by Peter Williams and Rogerio Brito.
% This package provides an algorithmic environment fo describing algorithms.
% You can use the algorithmic environment in-text or within a figure
% environment to provide for a floating algorithm. Do NOT use the algorithm
% floating environment provided by algorithm.sty (by the same authors) or
% algorithm2e.sty (by Christophe Fiorio) as the IEEE does not use dedicated
% algorithm float types and packages that provide these will not provide
% correct IEEE style captions. The latest version and documentation of
% algorithmic.sty can be obtained at:
% http://www.ctan.org/pkg/algorithms
% Also of interest may be the (relatively newer and more customizable)
% algorithmicx.sty package by Szasz Janos:
% http://www.ctan.org/pkg/algorithmicx
% *** ALIGNMENT PACKAGES ***
%
\usepackage{array}
% Frank Mittelbach's and David Carlisle's array.sty patches and improves
% the standard LaTeX2e array and tabular environments to provide better
% appearance and additional user controls. As the default LaTeX2e table
% generation code is lacking to the point of almost being broken with
% respect to the quality of the end results, all users are strongly
% advised to use an enhanced (at the very least that provided by array.sty)
% set of table tools. array.sty is already installed on most systems. The
% latest version and documentation can be obtained at:
% http://www.ctan.org/pkg/array
% IEEEtran contains the IEEEeqnarray family of commands that can be used to
% generate multiline equations as well as matrices, tables, etc., of high
% quality.
% *** SUBFIGURE PACKAGES ***
%\ifCLASSOPTIONcompsoc
% \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
%\else
% \usepackage[caption=false,font=footnotesize]{subfig}
%\fi
% subfig.sty, written by Steven Douglas Cochran, is the modern replacement
% for subfigure.sty, the latter of which is no longer maintained and is
% incompatible with some LaTeX packages including fixltx2e. However,
% subfig.sty requires and automatically loads Axel Sommerfeldt's caption.sty
% which will override IEEEtran.cls' handling of captions and this will result
% in non-IEEE style figure/table captions. To prevent this problem, be sure
% and invoke subfig.sty's "caption=false" package option (available since
% subfig.sty version 1.3, 2005/06/28) as this is will preserve IEEEtran.cls
% handling of captions.
% Note that the Computer Society format requires a larger sans serif font
% than the serif footnote size font used in traditional IEEE formatting
% and thus the need to invoke different subfig.sty package options depending
% on whether compsoc mode has been enabled.
%
% The latest version and documentation of subfig.sty can be obtained at:
% http://www.ctan.org/pkg/subfig
% *** FLOAT PACKAGES ***
%
%\usepackage{fixltx2e}
% fixltx2e, the successor to the earlier fix2col.sty, was written by
% Frank Mittelbach and David Carlisle. This package corrects a few problems
% in the LaTeX2e kernel, the most notable of which is that in current
% LaTeX2e releases, the ordering of single and double column floats is not
% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a
% single column figure to be placed prior to an earlier double column
% figure.
% Be aware that LaTeX2e kernels dated 2015 and later have fixltx2e.sty's
% corrections already built into the system in which case a warning will
% be issued if an attempt is made to load fixltx2e.sty as it is no longer
% needed.
% The latest version and documentation can be found at:
% http://www.ctan.org/pkg/fixltx2e
%\usepackage{stfloats}
% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e
% the ability to do double column floats at the bottom of the page as well
% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in
% LaTeX2e). It also provides a command:
%\fnbelowfloat
% to enable the placement of footnotes below bottom floats (the standard
% LaTeX2e kernel puts them above bottom floats). This is an invasive package
% which rewrites many portions of the LaTeX2e float routines. It may not work
% with other packages that modify the LaTeX2e float routines. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/pkg/stfloats
% Do not use the stfloats baselinefloat ability as the IEEE does not allow
% \baselineskip to stretch. Authors submitting work to the IEEE should note
% that the IEEE rarely uses double column equations and that authors should try
% to avoid such use. Do not be tempted to use the cuted.sty or midfloat.sty
% packages (also by Sigitas Tolusis) as the IEEE does not format its papers in
% such ways.
% Do not attempt to use stfloats with fixltx2e as they are incompatible.
% Instead, use Morten Hogholm'a dblfloatfix which combines the features
% of both fixltx2e and stfloats:
%
% \usepackage{dblfloatfix}
% The latest version can be found at:
% http://www.ctan.org/pkg/dblfloatfix
\ifCLASSOPTIONcaptionsoff
\usepackage[nomarkers]{endfloat}
\let\MYoriglatexcaption\caption
\renewcommand{\caption}[2][\relax]{\MYoriglatexcaption[#2]{#2}}
\fi
% endfloat.sty was written by James Darrell McCauley, Jeff Goldberg and
% Axel Sommerfeldt. This package may be useful when used in conjunction with
% IEEEtran.cls' captionsoff option. Some IEEE journals/societies require that
% submissions have lists of figures/tables at the end of the paper and that
% figures/tables without any captions are placed on a page by themselves at
% the end of the document. If needed, the draftcls IEEEtran class option or
% \CLASSINPUTbaselinestretch interface can be used to increase the line
% spacing as well. Be sure and use the nomarkers option of endfloat to
% prevent endfloat from "marking" where the figures would have been placed
% in the text. The two hack lines of code above are a slight modification of
% that suggested by in the endfloat docs (section 8.4.1) to ensure that
% the full captions always appear in the list of figures/tables - even if
% the user used the short optional argument of \caption[]{}.
% IEEE papers do not typically make use of \caption[]'s optional argument,
% so this should not be an issue. A similar trick can be used to disable
% captions of packages such as subfig.sty that lack options to turn off
% the subcaptions:
% For subfig.sty:
% \let\MYorigsubfloat\subfloat
% \renewcommand{\subfloat}[2][\relax]{\MYorigsubfloat[]{#2}}
% However, the above trick will not work if both optional arguments of
% the \subfloat command are used. Furthermore, there needs to be a
% description of each subfigure *somewhere* and endfloat does not add
% subfigure captions to its list of figures. Thus, the best approach is to
% avoid the use of subfigure captions (many IEEE journals avoid them anyway)
% and instead reference/explain all the subfigures within the main caption.
% The latest version of endfloat.sty and its documentation can obtained at:
% http://www.ctan.org/pkg/endfloat
%
% The IEEEtran \ifCLASSOPTIONcaptionsoff conditional can also be used
% later in the document, say, to conditionally put the References on a
% page by themselves.
% *** PDF, URL AND HYPERLINK PACKAGES ***
%
\usepackage{url}
% url.sty was written by Donald Arseneau. It provides better support for
% handling and breaking URLs. url.sty is already installed on most LaTeX
% systems. The latest version and documentation can be obtained at:
% http://www.ctan.org/pkg/url
% Basically, \url{my_url_here}.
\usepackage{times}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage[normalem]{ulem}
\usepackage{color}
\usepackage{colortbl}
\usepackage{multirow}
%\usepackage[justification=centering]{caption}
\usepackage{caption}
% *** Do not adjust lengths that control margins, column widths, etc. ***
% *** Do not use packages that alter fonts (such as pslatex). ***
% There should be no need to do such things with IEEEtran.cls V1.6 and later.
% (Unless specifically asked to do so by the journal or conference you plan
% to submit to, of course. )
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
\begin{document}
\newcolumntype{I}{!{\vrule width 0pt}}
%
% paper title
% Titles are generally capitalized except for words such as a, an, and, as,
% at, but, by, for, in, nor, of, on, or, the, to and up, which are usually
% not capitalized unless they are the first or last word of the title.
% Linebreaks \\ can be used within to get better formatting as desired.
% Do not put math or special symbols in the title.
\title{Robust Reading Comprehension with \\Linguistic Constraints via Posterior Regularization}
%
%
% author names and IEEE memberships
% note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break
% a structure at a ~ so this keeps an author's name from being broken across
% two lines.
% use \thanks{} to gain access to the first footnote area
% a separate \thanks must be used for each paragraph as LaTeX2e's \thanks
% was not built to handle multiple paragraphs
%
\author{Mantong~Zhou,%~\IEEEmembership{Member,~IEEE,}
Minlie~Huang,%~\IEEEmembership{Fellow,~OSA,}
Xiaoyan~Zhu%~\IEEEmembership{Life~Fellow,~IEEE}% <-this % stops a space
\thanks{Mantong Zhou, Minlie Huang and Xiaoyan Zhu are with the Institute for Artificial Intelligence,
State Key Lab of Intelligent Technology and Systems,
Beijing National Research Center for Information Science and Technology,
Department of Computer Science and Technology, Tsinghua University, Beijing 100084, China, e-mail: (zmt.keke@gmail.com, aihuang@tsinghua.edu.cn, zxy-dcs@tsinghua.edu.cn).}% <-this % stops a space
\thanks{Corresponding author: Minlie Huang.}
%\thanks{Color version of this paper are available online at http://ieeexplore.ieee.org.}% <-this % stops a space
%\thanks{Manuscript received September *, 2018}
}
% note the % following the last \IEEEmembership and also \thanks -
% these prevent an unwanted space from occurring between the last author name
% and the end of the author line. i.e., if you had this:
%
% \author{....lastname \thanks{...} \thanks{...} }
% ^------------^------------^----Do not want these spaces!
%
% a space would be appended to the last name and could cause every name on that
% line to be shifted left slightly. This is one of those "LaTeX things". For
% instance, "\textbf{A} \textbf{B}" will typeset as "A B" not "AB". To get
% "AB" then you have to do: "\textbf{A}\textbf{B}"
% \thanks is no different in this regard, so shield the last } of each \thanks
% that ends a line with a % and do not let a space in before the next \thanks.
% Spaces after \IEEEmembership other than the last one are OK (and needed) as
% you are supposed to have spaces between the names. For what it is worth,
% this is a minor point as most people would not even notice if the said evil
% space somehow managed to creep in.
% The paper headers
\markboth{IEEE/ACM TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING,~Vol.*, No.~*,* *}%
{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for IEEE Journals}
% The only time the second header will appear is for the odd numbered pages
% after the title page when using the twoside option.
%
% *** Note that you probably will NOT want to include the author's ***
% *** name in the headers of peer review papers. ***
% You can use \ifCLASSOPTIONpeerreview for conditional compilation here if
% you desire.
% If you want to put a publisher's ID mark on the page you can do it like
% this:
%\IEEEpubid{0000--0000/00\$00.00~\copyright~2015 IEEE}
% Remember, if you use this you must call \IEEEpubidadjcol in the second
% column for its text to clear the IEEEpubid mark.
% use for special paper notices
%\IEEEspecialpapernotice{(Invited Paper)}
% make the title area
\maketitle
% As a general rule, do not put math, special symbols or citations
% in the abstract or keywords.
\begin{abstract}
In spite of great advancements of machine reading comprehension (RC), existing RC models are still vulnerable and not robust to different types of adversarial examples.
Neural models over-confidently predict wrong answers to semantic different adversarial examples, while over-sensitively predict wrong answers to semantic equivalent adversarial examples.
Existing methods which improve the robustness of such neural models merely mitigate one of the two issues but ignore the other.
In this paper, we address the {\it over-confidence} issue and the {\it over-sensitivity} issue existing in current RC models simultaneously with the help of external linguistic knowledge.
We first incorporate external knowledge to impose different linguistic constraints (entity constraint, lexical constraint, and predicate constraint), and then regularize RC models through posterior regularization.
Linguistic constraints induce more reasonable predictions
for both semantic different and semantic equivalent adversarial examples, and posterior regularization provides an effective mechanism to incorporate these constraints.
Our method can be applied to any existing neural RC models including state-of-the-art BERT models.
Extensive experiments show that our method remarkably improves the robustness of base RC models, and is better to cope with these two issues simultaneously.
\end{abstract}
% Note that keywords are not normally used for peerreview papers.
\begin{IEEEkeywords}
Machine Reading Comprehension, Robust, Adversarial Examples, Linguistic constraints, Posterior Regularization
\end{IEEEkeywords}
% For peer review papers, you can put extra information on the cover
% page as needed:
\ifCLASSOPTIONpeerreview
\begin{center} \bfseries EDICS Category: 3-BBND \end{center}
\fi
%
% For peerreview papers, this IEEEtran command inserts a page break and
% creates the second title. It will be ignored for other modes.
\IEEEpeerreviewmaketitle
\section{Introduction}
% The very first letter is a 2 line initial drop letter followed
% by the rest of the first word in caps.
%
% form to use if the first word consists of a single letter:
% \IEEEPARstart{A}{demo} file is ....
%
% form to use if you need the single drop letter followed by
% normal text (unknown if ever used by the IEEE):
% \IEEEPARstart{A}{}demo file is ....
%
% Some journals put the first two words in caps:
% \IEEEPARstart{T}{his demo} file is ....
%
% Here we have the typical use of a "T" for an initial drop letter
% and "HIS" in caps to complete the first word.
% You must have at least 2 lines in the paragraph with the drop letter
% (should never be an issue)
\label{sec:intro}
\IEEEPARstart{R}{eading} Comprehension (RC) has been much advanced by recently proposed datasets~\cite{CBT,squad,NarrativeQA} and models \cite{hu2018reinforced,sun2018u-net:}.
However, RC models are still vulnerable and faced with two typical issues.
One is \textbf{the over-confidence issue}: {\it when a model is fed with \textbf{S}emantic \textbf{D}ifferent \textbf{A}dversarial (\textbf{SDA}) examples}~\cite{squadadv}, {\it the model wrongly predicts the same answer}. If small perturbations are applied to the question/passage, for instance replacing ``America" with ``Canada" in the example of Fig.~\ref{fig:example}, the model still predicts the same answer even though the question is unanswerable.
The other is \textbf{the over-sensitivity issue}: {\it a model is not robust when fed with \textbf{S}emantic \textbf{E}quivalent \textbf{A}dversarial (\textbf{SEA}) examples}~\cite{sear}. If we make perturbations yet keep the semantics unchanged, for instance replacing ``1790s" with ``nineties of the 18th century", the model may be distracted and possibly predict wrong answers.
\begin{figure*}[ht]
\centering
\includegraphics[width=18cm]{example.png}
\caption{Different types of adversarial examples in reading comprehension.}
\label{fig:example}
\end{figure*}
The over-confidence issue can be attributed to overfitting~\cite{calibration,pathologies}: the model, for instance, may use a trick to output low-entropy distributions over classes to minimize negative log-likelihood loss. %%%%%%%%
The over-sensitivity issue can be attributed to non-local generalization of neural networks caused by massive nonlinear operations~\cite{nonlinear} or high-dimensional linear operations~\cite{advexp}.
As for RC, the representation dilemma additionally leads to the over-confidence and over-sensitivity issues: if words are replaced with analogous but semantic-different counterparts (``America" $\rightarrow$ ``Canada", where the entities have very similar embeddings), the representation of the sentence may change slightly, so it is not surprising that a RC model outputs the same answer.
Conversely, if words are replaced with synonymous phrases (``1790s" $\rightarrow$ ``nineties of the 18th century"), it is hard for the model to regard them as equivalent through much different representations.
Recent solutions, such as entropy regularization~\cite{entropyreg} and adversarial training~\cite{advexp}, merely mitigate one issue but ignore the other. However, a robust RC model should be able to cope with both SDA and SEA examples simultaneously.
In this work, we aim to improve the robustness of RC models with linguistic constraints via posterior regularization (PR, \cite{pr}).
Specifically, once we obtain predictions from a base RC model, we can extract linguistic feature pairs (synonyms, antonyms, entity pairs, etc.) with external knowledge resources, and derive linguistic constraints with the extracted features.
Then, we adjust the output distribution according to these linguistic constraints.
The training objective is reformulated as a constrained optimization problem in the posterior regularization framework, which can be solved by an expectation maximization (EM) algorithm.
The aforementioned issues are addressed as follows:
\textbf{First}, posterior regularization alleviates overfitting
by restricting the parameter space. Regularization term functions as penalty for vanilla negative log-likelihood loss.
\textbf{Second}, applying constraints to the output distribution is more straightforward than to the input or intermediate layers, which makes predictions less affected by massive non-linear operations.
\textbf{Third}, the constraints to regularize RC models are designed with paired linguistic knowledge (synonyms, antonyms, entity pairs, etc.), which has two benefits. On one hand, linguistic constraints are designed to capture two types of adversarial examples simultaneously. On the other hand, instead of operating in the embedding space, symbolic changes in entity or lexicon can be more easily and explicitly captured by the constraints, and thus address the representation dilemma.
%Our main contribution is to address the over-confidence issue and the over-sensitivity issue simultaneously in reading comprehension tasks.
Our main contribution is to improve the robustness of reading comprehension models by \textbf{considering the over-confidence issue and the over-sensitivity issue simultaneously}.
We incorporate external linguistic knowledge to impose different constraints on the models via posterior regularization.
Using this method, semantic different and semantic equivalent adversarial examples can be handled effectively.
Moreover, our method can be applied to many RC models, and depends less on the quality of adversarial examples compared with adversarial training.
\section{Related Works}
\noindent \textbf{Adversarial Reading Comprehension Tasks}\\
Many studies~\cite{kaushik2018much,mudrakarta2018did} start to retrospect the benchmark datasets and tasks of reading comprehension (RC) critically.
%Kaushik et al.~\cite{kaushik2018much} found that question-only and passage-only models perform surprisingly well on some reading comprehension corpora such as CNN~\cite{cnn}, bAbI~\cite{babi}, and Who-did-What~\cite{who}. According to their findings, SQuAD1.1~\cite{squad} was suggested as ***an unusually carefully-designed RC task*** compared to others. %%%positive or negative??? hml
%However,
Existing RC models which perform well on SQuAD1.1~\cite{squad} are not robust to adversarial sentences.
For instance, adversarial examples in SQuAD-ADDSENT~\cite{squadadv}, collected with semantic-altering noise using AddSent algorithm, fooled most of the successful models trained on SQuAD1.1.
AddSentDiverse~\cite{wang2018robust} modified AddSent by generating more diverse adversarial examples to prevent RC models from learning superficial clues. %regarding what is a distractor and subsequently ignoring it.
Gao et al.~\cite{distractors} generated longer and semantic-richer distractors which are closer to those in real RC examinations.
Rajpurkar et al.~\cite{squad2.0} developed SQuAD2.0 that combines SQuAD1.1 with new unanswerable questions, to test the ability of distinguishing unanswerable questions in RC.
SQuAD-ADDSENT and SQuAD2.0 examined the overconfidence issue of RC models using adversarial examples which differ in semantics.
%\\
Ribeiro et al.~\cite{sear} designed adversarial examples and rules, which can preserve original semantics but cause models to make wrong predictions.
Iyyer et al.~\cite{adversarialparaphrase} proposed syntactically controlled paraphrase networks to generate semantic equivalent adversarial examples. % for sentiment classification and language inference.
%\\
However, to our best knowledge, there exists no dataset which combines both SDA and SEA examples.
\noindent \textbf{Robust Reading Comprehension Models}\\
Current RC models are vulnerable since remarkable performance drops can be observed on adversarial examples compared to that on original examples.
Entropy regularization~\cite{pathologies} is proposed to alleviate overfitting by maximizing the entropy of prediction distributions of similar inputs.
Label smoothing~\cite{labelsmoothing} is equivalent to adding the KL divergence between the uniform distribution and the predicted answer distribution thus alleviates overfitting~\cite{entropyreg}.
But these methods only target at making models more sensitive to input permutations, yet ignoring the semantic-equivalent adversarial examples. %%%%%By contrast, our method considers two types of adversarial examples simultaneously.\\
The standard method to defend against adversarial attacks is adversarial training~\cite{mixdata,advexp}.
Szegedy et al.~\cite{mixdata} discovered that several machine learning models are vulnerable to adversarial examples and found that by training on a mixture of adversarial and clean examples, a neural network can be regularized to some degree.
Goodfellow et al.~\cite{advexp} introduced a family of fast methods for generating adversarial examples and demonstrated that adversarial training can result in regularization in theory.
Wang et al.~\cite{wang2018robust} introduced adversarial training to RC models and improved robustness using more diverse adversarial examples.
A3Net~\cite{a3net} blended adversarial training into each layer of the network by adding numerical perturbations to original variables.
However, adversarial training relies on high-quality training adversarial examples~\cite{wang2018robust}. Such models cannot recognize unseen adversarial patterns
%(e.g., ``regressive" $\rightarrow$ ``progressive")
without sufficient training data. %, which is much easier for our model with external knowledge.
In comparison, our model effectively
identifies adversarial patterns with the help of external knowledge.
%Wang et al.~\cite{swqp} trained NLI models with adversarial examples by swapping premise and hypothesis.
Min et al.~\cite{sentenceselector} proposed a selector to pick out oracle sentences from adversarial ones, but cannot deal with unanswerable questions.
No-answer scoring~\cite{levy2017zero-shot,docqa} and answer verification modules~\cite{hu2019read,sun2018u-net:} were used in some models to determine whether a question is unanswerable. However, these modules depend on the specific ``no-answer-classification" setting of SQuAD2.0.
By contrast, our framework is more general.
\begin{figure*}[!htp]
\centering
\includegraphics[width=16cm]{model.jpg}
\caption{Posterior regularization framework for robust reading comprehension. Base RC model obtains the preliminary answer distribution $p(y|x;\theta)$, and the values of constraint functions $f^l(x,y)$ are computed via linguistic knowledge for each candidate answer. A larger $h(x,y)$ is derived for candidates which satisfy the constraints but a smaller $h(x,y)$ for those which violate the constraints. $h(x,y)$ is then used to regularize $p(y|x;\theta)$ to obtain the final answer distribution $q^*(y|x)$.}
\label{fig:model}
\end{figure*}
\noindent \textbf{Posterior Regularization}\\
%Adversarial examples that violate a set of given First-Order Logic constraints in Natural Language Inference are used to regularize the NLI model~\cite{minervini2018adversarially}.
Posterior Regularization (PR)~\cite{pr} is a structured learning framework which enables flexible injection of various constraints with structured knowledge, and already applied to many NLP tasks such as Machine Translation~\cite{ganchev2013cross-lingual,Zhang2018Priormt,smtnmt} and Sentiment Classification~\cite{Yang2014Context,zhao2016semi}.
Hu et al.~\cite{logicnn} developed a knowledge distillation framework to incorporate PR into neural networks. A student neural network is trained to imitate a teacher network which is constructed by imposing posterior constraints.
However, these models have limited generalization since constraints are fixed and manually designed.
Mei et al.~\cite{pmlr-v32-mei14} attempted to learn the constraint weights with additional supervisions in a Bayesian model with posterior regularization.
Hu et al.~\cite{learnedlogicnn} proposed mutual distillation to further enable the former distillation framework to learn constraints by parameterizing constraints.
These works inspired us to incorporate linguistic constraints to improve the robustness of RC models.
\section{Methodology}
\subsection{Reading Comprehension with Posterior Regularization}
The RC problem can be formulated as follows: given a set of triples $(Q,P,A)$, where $Q=(q_1,q_2,...,q_m)$ is the question with $m$ words, $P = (p_1,...,p_n)$ is the passage with $n$ words, and $A=(p_s,...,p_e)$ is the answer span extracted from the passage where $s$/$e$ indicates the start/end word position. The task is to build a model with parameters $\theta$ to estimate the conditional probability
$p(A|Q,P;\theta)=p(s|Q,P;\theta)p(e|s,Q,P;\theta)$.
In general, we can optimize $\theta$ by maximizing the log-likelihood of the ground truth answer as follows:
\begin{align}
&\max \mathcal{L}(\theta) =\sum_{i}\log p(A_i|Q_i,P_i;\theta) \notag \\
&= \sum_{i} \log p(s_i|Q_i,P_i;\theta)
+\log p(e_i|s_i,Q_i,P_i;\theta)
\end{align}
Our central idea is to build a robust model with linguistic constraints. Following the posterior regularization (PR) framework, we apply a set of constraints to the posterior distribution over the answers. We can define the constraints in the form of $E_q[\phi(x,y)]\leq b$ where $x$ and $y$ are an input question\footnote{We input a question-passage pair as $x$ to the RC model $p(y|x;\theta)$, but merely use the question in constraints $\phi(x,y)$.}
and the answer respectively. $\phi(x,y)$ is a constraint function whose value is expected to be less than $b$ according to some particular linguistic rules, and $q$ is any distribution satisfying the constraints.
The PR objective with slack penalty variables is as follows:
\begin{align}
\max \mathcal{J}(\theta,q) &=\mathcal{L}(\theta)- \min_{q}\{ KL(q(y|x)|| p(y|x;\theta)) \notag \\
&+ C\sum\xi\}\\
s.t. \quad &\lambda^{l}E_q[\phi^l(x,y)] - b^l \leq \xi \quad l=1,...,L \notag
\end{align}
Let $f^l(x,y)=b^l-\phi^l(x,y)$ denotes constraint functions whose values are expected to be larger than $-\xi$, i.e. $f^l(x,y)>0$, when $(x,y)$ satisfies the constraints.
The solution to the second term of $\mathcal{J}(\theta,q)$ is given by:
\begin{align}
q^*(y|x)= \frac{p(y|x;\theta)\exp\{C\sum_l\lambda^lf^l(x,y)\}}{Z}
\label{eq:q}
\end{align}
%%%%%%%%%%%%%%%%%
where $Z$ is the normalization factor. $q^*(y|x)$ is the desired distribution which is close to the distribution learned from data $p(y|x;\theta)$ and meanwhile is regularized by constraints.
In theory, this PR framework can be applied to any probabilistic model $p(y|x;\theta)$ which is called the base model hereafter.
\subsection{Linguistic Constraints}
We design three constraints in this section.
\textbf{All constraints are designed to account for two types (semantic-different and semantic-equivalent) of adversarial examples in this framework}.
Since it is inadequate to pre-define all adversarial situations by deterministic functions,\textbf{ we introduce learnable parameters $\omega$ to parameterize the constraint functions as $f^l(x,y;\omega_l)$}.
%%\iffalse
%Once we obtain a predicted answer $y$ from a base RC model $p_{\theta}$, we first extract linguistic features between input question $x$ and predicted answer $y$, and then compute constraints $f^l(x,y)$ to derive the regularized distribution $q$.
%As a result, if $y$ meets the $l^{th}$ linguistic constraint, $f^l(x,y)$ is large and therefore the regularized probability $q(y|x) \propto p(y|x)\exp(\lambda^l f^l(x,y))$ is larger than original probability $p(y|x)$. Conversely, $q(y|x)$ becomes smaller if $y$ conflicts the constraint.
%\fi
%Since it is hard to pre-define all adversarial situations by deterministic functions, we also model the constraints by networks with learnable parameters $\omega$.
\begin{figure}
\centering
\includegraphics[width=0.95\linewidth]{f.jpg}
\caption{The work flow of entity constraint. The entity pairs are extracted from $x$ and $s_y$, and are weighted by the attention network $Att_{\omega}$. The constraint function $f^1(x,y)$ is then evaluated and used to regularize $q(y|x)$.}
\label{fig:f}
\end{figure}
\noindent \textbf{Entity Constraint:} The answer should be extracted from a sentence that has the same entities (person, location, time, event, etc) with the question, and on the contrary, the answer should not be extracted from a sentence that has different entities.
For example, the model should not extract {\it \small``New York"} from sentence {\it \small``New York is the largest city in America since 1790s"} as the answer to the question {\it \small``Which is the largest city in America in 1780s"}.
As shown in Fig.~\ref{fig:f}, we first extract entity pairs\footnote{See section 4.1 {\it Data Preparation}.} $\{(e_x,e_y)|e_x \in x, e_y\in s_y\}$
between the question sentence $x$ and the sentence $s_y$ where answer $y$ is located%%\footnote{The answer position is given in RC, so $s_y$ can be located uniquely.}
.
In this example, we have pairs \{(\textit{America}, \textit{America}), (\textit{1780s}, \textit{1790s})\}.
The entity constraint is formulated as:
$$
f^{1}(x,y;\omega_1)=\sum_k \alpha_{\omega_1}^k \mu(e^k_x, e^k_y)
$$
where $\mu(e^k_x,e^k_y)=1$ if the $k^{th}$ entity pair is semantic equivalent or $\mu(e^k_x,e^k_y)=-1$ if semantic different, according to external linguistic knowledge. $\alpha_{\omega_1}=Att(x,s_y;\omega_1)$ is the weight of each entity pair, obtained from an attention network parameterized by $\omega_1$.
Intuitively, $f^{1}(x,y;\omega_1)$ is positive when $y$ is the ground truth, whereas negative when $y$ locates in a semantic different sentence.
%As a result, the regularized distribution $q(y|x) \propto p(y|x)\exp(\sum\lambda f(x,y))$ meets the entity constraint by encouraging the probability of answer $y$ in oracle sentences ($f^1(x,y)>0$) and suppressing the probability of answer $y$ in adversarial sentences($f^1(x,y)<0$).%~\cite{sentenceselector}.%%%%
Consequently, according to Eq.~\ref{eq:q}, positive $f^1(x,y;\omega_1)$ makes the regularized probability $q(y|x)$ larger than $p(y|x)$.
Conversely, if $f^1(x,y;\omega_1)$ is negative, $q(y|x)$ becomes smaller.
\\
\noindent \textbf{Lexical Constraint:} The answer should be extracted from a sentence that has the synonyms (same adjectives/adverbs, full name noun vs. abbreviation, etc.) with the question, or on the contrary, the answer should not be extracted from where antonyms exist.
For example, {\it \small``New York is the largest city in America."} v.s. {\it \small``Which is the smallest city in America?"}.
Similarly, we extract synonym and antonym pairs $\{(w_x,w_y)|w_x \in x, w_y\in s_y\}$ and define the lexical constraint as:
$$f^{2}(x,y;\omega_2)=\sum_k\alpha_{\omega_2}^k\mu(w^k_x, w^k_y)$$
which regularizes the probability of answer $y$ in the same way as $f^{1}(x,y;\omega_1)$. $\alpha_{\omega_2}$ is obtained similar to $\alpha_{\omega_1}$.
\\
\noindent \textbf{Predicate Constraint:}
%There are still lots of cases where no explicit same or different entity/word pair signals whether semantics are equivalent or different.
Verbs (predicates) sometimes provide crucial semantic information.
For example, in the {\it other neutral case}~\cite{squad2.0}
irrelevant verbs may act as indicators of irrelevant events. (e.g. {\it \small ``Who discovered Y. pestis?”} vs. {\it \small ``The Black Death was caused by a variant of Y. pestis.”}).
Since it is difficult to explicitly define whether two verb sequences are semantic equivalent or different,
we model the predicate constraint by a neural network as: $$f^3(x,y;\omega_3)=F(v_x,v_y;\omega_3)$$
where $v_x$ is the verb sequence in the input question $x$ and $v_y$ is the verb sequence in the answer sentence $s_y$ ($y \in s_y$)\footnote{A verb sequence is all the verbs in their original order in the sentence.}.
The network $F$ is expected to output a positive value for a semantic equivalent pair but a negative value for a semantic different pair.
Consequently, $f^3(x,y;\omega_3)$ regularizes the answer distribution by decreasing the probability of extracting answers from irrelevant sentences.\\
\subsection{Training Algorithm}
Ganchev et al.~\cite{pr} presented a min-max algorithm to optimize $\mathcal{J}(\theta,q)$ as follows:
\begin{align}
&E: \quad q^{t+1} = \arg\min_{q} KL(q(y)||p(y|x;\theta^{t})) \\
&M: \quad\theta^{t+1} = \arg\max_{\theta}E_{q^{t+1}}[\log p(y|x;\theta)]
\end{align}
Hu et al.~\cite{learnedlogicnn} proposed a mutual distillation algorithm that transfers PR into optimization of neural networks. Following the mutual distillation algorithm, we can design the training objectives to update the RC model's parameters $\theta$ and the constraint functions' parameters $\omega=(\omega_1,\omega_2, \omega_3)$.
The RC model $p(y|x;\theta)$ at iteration $t$ is updated with a distillation objective that balances fitting ground truth distribution $g$ (one-hot) and imitating soft predictions of desired regularized distribution $q^{t}$ with distillation parameter $\beta$:
\begin{align}
\theta^{t+1} = \arg\max_{\theta} &\frac{1}{N}\sum_{i}E_g[\log p(y|x_i;\theta)] \notag \\
&+\beta*E_{q^{t}}[\log p(y|x_i;\theta)]
\label{eq:theta}
\end{align}
%This is equivalent to minimizing the cross-entropy.
Inspecting the posterior regularization objective, $h(x,y;\omega) = \exp\{C\sum_l\lambda^lf^l(x,y;\omega_l)\}$ should be larger when $y$ is ground truth. In previous work~\cite{learnedlogicnn}, it
was considered as a ``likelihood" metric w.r.t the observations and was optimized the same way as $p(*;\theta)$. In this work, we considered it as a ``score" indicating whether the answer is reasonable or not.
We labelled positive examples as $\log h^*(x,y)=1$ and negative examples as $\log h^*(x,y)=-1$.
Ground truths or semantic equivalent adversarial sentences are regarded as positive examples, but irrelevant or semantic different adversarial sentences are marked as negative examples.
The parameters of the constraint functions $\omega$ can be optimized using mean-square-error loss (MSE loss):
\begin{align}
\omega^{t+1} =
\arg\min_{\omega}&\frac{1}{N}\sum_{i}(
\log h(x_i,y_i;\omega) - \log h^*(x_i,y_i))^2
%\arg\max_{\omega}&\frac{1}{N}\sum_{i}E_g[\log h(y|x_i;\omega)] \notag \\
%&+\beta_2*E_{q^{t}}[\log h(y|x_i;\omega)]
\label{eq:omega}
\end{align}
As $\lambda$ serves to balance different constraints, it is adjusted as follows:
\begin{align}
\lambda^{t+1} = \arg\max_{\lambda}\frac{1}{N}\sum_{i}E_g[q(y|x_i;\lambda)]
\label{eq:lambda}
\end{align}
\begin{table}[ht]
\normalsize
\centering
\begin{tabular}{IlI}
\hline
Algorithm: Mutual Distillation \\
\hline
Input: data $\{(x_n,y_n)\}^N_{n=1}$ and hyper-parameters $C$,$\beta$\\
1: Pretrain RC model $p(y|x;\theta)$\\
2: Initialize constraint functions $f(x,y;\omega)$ and weights $\lambda$ \\
3: While not converged do:\\
4: \quad Sample a minibatch (X,Y)\\
5: \quad (E) Build the desired distribution:\\
\qquad \qquad $q^{t+1} = p^t\exp\{C\sum\lambda^t f(x,y;\omega^{t})\}$\\
5: \quad (M) Update ${\theta}$ with distillation objective Eq.~\ref{eq:theta} \\
6: \quad (M) Update ${\omega}$ with objective Eq.~\ref{eq:omega}\\
\qquad \qquad and update $\lambda$ with objective Eq.~\ref{eq:lambda}\\
8: End while\\
Output: Regularized model $q = p\exp\{C\sum\lambda f\}$\\
\hline
\end{tabular}
\label{tab:algorithm}
\end{table}
\section{Experiments}
\subsection{Data Preparation}
We prepared the SQuAD-Adv dataset which consists of original examples, semantic different adversarial (SDA) examples and semantic equivalent adversarial (SEA) examples.
The original examples are randomly sampled from SQuAD1.1 to keep the size balanced with that of adversarial examples.
SDA examples are randomly sampled from SQuAD-ADDSENT~\cite{squadadv} and unanswerable questions in SQuAD2.0~\cite{squad2.0}.
We simply generated SEA examples by replacing the adjectives, adverbs, and noun phrases in questions or oracle sentences with their synonyms.
%The synonyms are defined strictly in WordNet.
The statistics of SQuAD-Adv are listed in Table~\ref{tab:dataset}.
\begin{table}[htbp]
%\setlength{\abovecaptionskip}{0.3cm}
\normalsize
\centering
\caption{\label{tab:dataset}Statistics of SQuAD-Adv which consists of original, SDA, and SEA examples. }
%\resizebox{!}{0.6cm}
{
\begin{tabular}{c I c I c I c I c }
\hline
& \#(Q,P,A) triples & \#Original & \#SDA & \#SEA\\
\hline
Train & 120,280 & 45,005 & 51,696 & 23,579 \\
Test & 23,603 & 9,981 & 8,032 & 5,590 \\
\hline
\end{tabular}
}
\end{table}
We used NLTK\footnote{\url{ http://www.nltk.org}} and spaCy\footnote{\url{https://spacy.io}} toolkits to extract entities, verbs, noun phrases, etc.
The words/entities from a question and those from a sentence are paired.
We then filtered irrelevant pairs in which two words/entities do not share similar types or contexts. We obtained
the semantic relationship of each pair, such as {\it``1790s /r/IsA/ nineties"} and {\it ``America /r/Synonym/ U.S."} using WordNet\footnote{NLTK WordNet interface: {\url{http://www.nltk.org/howto/wordnet.html}}}
and ConceptNet\footnote{\url{http://conceptnet.io}}.
More details are presented in {\it Supplementary Material}.
\subsection{Experiment Settings}
\label{sec:expset}
We adopted open-source reproduction\footnote{The open-source codes are available at: \url{https://github.com/HKUST-KnowComp/MnemonicReader} and \url{https://github.com/huggingface/pytorch-pretrained-BERT}} of R-Net~\cite{rnet}, Mnemonic Reader (MemReader)~\cite{hu2018reinforced} and BERT~\cite{devlin2018bert:} as the base models.
The former two models are top performing models on SQuAD except those based on BERT.
BERT introduced a large and empirically powerful language model pre-trained with massive data. It can be fine-tuned to create state-of-the-art models for various tasks including reading comprehension.
%We conducted experiments with not only simple neural base models but also powerful pre-trained BERT to show the effectiveness of our method in terms of robustness.
The weight networks $Att(\boldsymbol{x},\boldsymbol{s_y};\omega)$ are used to decide the weights of entity/word pairs in constraint $f^1$ and $f^2$.
They first apply bi-linear attention to input embeddings of sequence $\boldsymbol{x}=(x_1,...x_m)$ and $\boldsymbol{s_y}=(y_1,..,y_n)$ and then obtain the weight of an entity/word pair by summing the attention scores of some tokens that are included in the pair.
Concretely, if the two entities of one entity pair $(\boldsymbol{e^k_x},\boldsymbol{e^k_y})$ are represented as $(\boldsymbol{e^k_x}=(x_{s_1},..,x_{e_1}), \boldsymbol{e^k_y}=(y_{s_2},..,y_{e_2}))$ respectively, the weights of the entity pair $\alpha^k$ can be calculated as follows:
\begin{align}
o^x_i &= Softmax(\sum_{j=1}^{n}y_j^TW_1x_i)\notag \\
o^y_i &= Softmax(\sum_{j=1}^{m}x_j^TW_1y_i) \notag \\
\alpha^k &= \sum_{i=s_1}^{e_1}o^x_i + \sum_{j=s_2}^{e_2}o^y_j \notag
\end{align}
While the predicate constraint network $f^3 = F(\boldsymbol{v}_x,\boldsymbol{v}_y;\omega_3)$ adopts one LSTM layer and one feed-forward layer.
Concretely, $F$ receives two verb sequences and outputs a score as:
\begin{align}
o^x &= LSTM(\boldsymbol{v}_x;\omega_3) \notag\\
o^y &= LSTM(\boldsymbol{v}_y;\omega_3) \notag\\
F(\boldsymbol{v_x},\boldsymbol{v_y};\omega_3) & = tanh(W_3[o^x;o^y;o^x-o^y;o^x*o^y] + b_3) \notag
\end{align}
If the base RC model is BERT, the base model adopts WordPiece embeddings~\cite{wordpiece} and constraint networks share randomly initialized word vectors.
Otherwise, both base RC models and constraint networks use 300-dimension GloVe word embeddings~\cite{pennington2014glove:} and we kept the pre-trained embeddings fixed during training.
The dimension of hidden states of $LSTM(\omega_3)$ is set to 100.
The dimensions of other parameters are $W_1 \in \mathbb{R}^{300\times300}$, $W_3 \in \mathbb{R}^{1\times400}$ and $b_3 \in \mathbb{R}^{1}$. $f^l(\boldsymbol{x},\boldsymbol{y};\omega)$ outputs a scalar for each input.
We used Adam~\cite{Adam} optimizer.% and a mini-batch size of 45.
Regularization parameter is set as $C=1$ and distillation parameter is set as $\beta=0.005$.
%We compare {\it Ori-Training} setting, {\it Adv-Training} and our {\it PR} method to verify the effect of linguistic constraints. Besides, we compare {\it Feature-Input} setting and {\it PR} method to verify the effect of posterior regularization.\\
\begin{table*}[!ht]
\normalsize
\centering
\caption{\label{tab:mainresults}Performance comparison with different settings and on different test subsets. {\it Overall} means the original, SDA and SEA test examples are evaluated together.}
\setlength{\tabcolsep}{8pt}
\begin{tabular}{c|c|c| cIc | cIc | cIc | cIc}
\hline
\multirow{3}{*}{Base Model}&\multirow{3}{*}{Train set}&\multirow{3}{*}{Method}&\multicolumn{6}{c|}{Test set}&\multicolumn{2}{c}{\multirow{2}{*}{Overall}}\\
\cline{4-9}
& & &\multicolumn{2}{c|}{Original} &\multicolumn{2}{c|}{SDA} &\multicolumn{2}{c|}{SEA} &\\
\cline{4-11}
& & &EM & F1 &EM&F1 &EM & F1 &EM & F1\\
\hline
\multirow{4}{*}{R-Net} & Original
& Ori-Training &\bf 65.3 & \bf 74.9& 30.9& 37.9& 54.4 & 65.1 & 51.0 & 60.0 \\
\cline{2-11}
&\multirow{3}{*}{SQuAD-Adv}
&Adv-Training & 59.2 & 68.3&57.3&65.6&52.8 & 63.0 & 57.1 & 66.1\\
\cline{3-11}
& &Feature-Input & 60.1 & 69.7 &57.5 & 63.3 & 53.9 & 64.4 & 57.7 & 66.3\\
\cline{3-11}
& &PR (ours) & 61.4 & 69.8 & \bf 59.4 &\bf 70.8& \bf 59.1 &\bf 69.8 &\bf 60.2 &\bf 70.1 \\
\hline
\multirow{4}{*}{MemReader} & Original
& Ori-Training &\bf 66.8 &\bf 76.5&35.5&41.9 &56.2 & 67.0 & 53.7 & 62.5\\
\cline{2-11}
&\multirow{3}{*}{SQuAD-Adv}
& Adv-Training & 59.6 & 69.3 & 58.5& 69.0 & 53.2 & 63.6 &57.7 & 67.8\\
\cline{3-11}
& &Feature-Input & 61.9 & 71.8 & 56.5 & 65.6 & 55.2 & 65.6 & 58.5 & 68.2\\
\cline{3-11}
& &PR (ours) & 62.0 &72.8 &\bf 66.7 & \bf 72.4 & \bf 58.7 & \bf 69.7 & \bf 62.8 & \bf 71.9 \\
\hline
\multirow{4}{*}{BERT-base} & Original
& Ori-Training &\bf 73.2 & \bf 82.7 & 41.3 & 48.8 & 62.2 & 73.1 & 59.7 & 68.9\\
\cline{2-11}
&\multirow{3}{*}{SQuAD-Adv}
& Adv-Training & 71.7 & 79.0 & 76.8 & 84.1 & 68.2 & 76.5 &72.6 & 80.1\\
\cline{3-11}
& &Feature-Input &\multicolumn{8}{c}{Not Applicable}\\
\cline{3-11}
& &PR (ours) & \bf 73.1 & \bf 82.8 &\bf 77.4 & \bf 85.7 & \bf 71.2 & \bf 80.8 & \bf 74.1 & \bf 83.3 \\
\hline
\end{tabular}
%\caption{\label{tab:mainresults}\small Performance comparison with different settings and on different test subsets. The {\it Ori-Training} models are trained on the original data without adversarial examples. The Adv-Training/Feature-Input/PR models are trained on SQuAD-Adv which includes original, SDA and SEA examples. {\it Overall} means three types of test examples are mixed together.}
\end{table*}
We compared the following settings and methods to verify the effectiveness of our PR method:\\
%%%%%
\textbf{Ori-Training}: base RC models are trained with only original examples without any adversarial examples. \\
\textbf{Adv-Training}: base RC models are trained on SQuAD-Adv where both SDA and SEA examples are used in training.\\
\textbf{Feature-Input}: base RC models' inputs are concatenations of word vectors and feature vectors. For each word, its linguistic features such as entity type (``type=DATE") and POS-tag (``pos=NN") are extracted by the toolkit. The feature vector of one word will be formulated as $f(w)\in \mathbb{R}^{|F|}$ where $|F|$ is the amount of features\footnote{In our baselines, $|F|=74$}. Each position $f_i(w)$ use $1/0$ to indicate a property feature like entity type or use a scalar to record a numerical feature like tf-idf. This is a practical method to utilize linguistic knowledge in RC models~\cite{hu2018reinforced}. Feature-Input models are trained on SQuAD-Adv. Due to BERT specifies its input layers, Feature-Input method is only applied to R-Net and MemReader in the following experiments. \\
%\textbf{Ori-Feature-Input} denotes the models trained on the original data and \textbf{Adv-Feature-Input} the models trained on SQuAD-Adv.\\
\textbf{PR}: our method regularizes base RC models with linguistic constraints via PR. PR models are also trained on SQuAD-Adv. Different from {\it Feature-Input}, {\it PR} utilizes linguistic knowledge in the output stage by adjusting the prediction distributions.
To predict unanswerable\footnote{We found that most models learned the strategy to select the ``unanswerable" positions. So we only evaluated with answerable SDA examples in our experiments.} questions, we padded the original document with an extra position (equal to index the answers' positions as $-1$ in BERT) to indicate ``unanswerable".
We adopted EM (Exact Match) and F1 score as evaluation metrics.
\subsection{Main Results}
For brevity, we presented the following comparisons with respect to the F1 metric of MemReader, but our statements also hold for the EM metric and other two base models.
%%%Without loss of generality, we represent the trend of results discussed hereafter quantificationally by the F1 scores of MemReader.
\textbf{First}, we investigated whether linguistic constraints can benefit RC models. \\
\noindent \textbf{(a-1)} As shown in Table \ref{tab:mainresults}, {\it Ori-Training} achieves good results on the original test examples\footnote{The scores differ from the original papers since we only sampled half of SQuAD1.1 examples for training and the test set is also different, but the codes we used can produce the results reported in the original papers on their own datasets.},
but its performance drops remarkably on both SDA (76.5$\rightarrow$41.9) and SEA (76.5$\rightarrow$67.0).
These drops indicate that base RC models cannot handle the over-confidence issue (for SDA examples) or over-sensitivity issue (for SEA examples). \\
%%%%%%%%
\noindent \textbf{(a-2)} Compared to other settings, {\it Ori-Training} performs best on the original test examples but has the worst overall performance because it overfits the original data and lacks of robustness to the adversarial data.\\
%%%%%%%%%%%%%%%
\noindent \textbf{(b-1)} {\it Adv-Training} obtains better overall performances compared to {\it Ori-Training} (62.5$\rightarrow$67.8), showing that the model becomes more robust when trained with adversarial examples. \\
%%%%%%%%%%%%%%%%%
\noindent \textbf{(b-2)} Compared to {\it Ori-Training }, {\it Adv-Training} improves the performance on SDA examples (41.9$\rightarrow$69.0) but degrades that on SEA examples (67.0$\rightarrow$63.6). The inconsistency indicates {\it Adv-Training} cannot balance the over-confidence and over-sensitivity issues simultaneously. \\
%%%%%%%%%%%%%%%%%%%
\noindent \textbf{(c)} Compared to {\it Ori-/Adv-Training}, our {\it PR} method achieves the best overall performance (62.5/67.8 vs. 71.9), verifying the effectiveness of linguistic constraint regularization. Our method can improve the performance on SDA and SEA examples simultaneously, as the constraints account for two types of adversarial examples at the same time. \\
\noindent \textbf{(d)} Our {\it PR} method improves the robustness of both lightweight models (R-Net and MemReader) and the BERT model, manifesting the linguistic constraint regularization is a versatile method and has a positive effect for all the tested models.
\begin{figure*}[ht]
\begin{minipage}[t]{0.48\textwidth}
\centering
\makeatletter\def\@captype{table}\makeatother
\caption{\label{tab:sda-train}Performance of Adv-Training (Adv-T) and PR models that were trained with only \textbf{SDA} examples.}
\begin{tabular}{c | c | cIc | cIc }
\hline
\multirow{3}{*}{Base Model}&\multirow{3}{*}{Method}&\multicolumn{4}{c}{Test}\\
\cline{3-6}
& &\multicolumn{2}{c|}{SDA} &\multicolumn{2}{c}{SEA}\\
\cline{3-6}
& &EM & F1 &EM & F1 \\
\hline
\multirow{2}{*}{R-Net} & Adv-T & 54.7 & 65.1 & 41.1 & 51.7 \\
& PR & 65.4 &71.8 &\bf 57.2 & \bf 67.5 \\
\cline{2-6}
% & \multirow{2}{*}{SEA} & Adv-T & 26.7 & 33.4 & 57.9 & 67.9 \\
%& & PR & \bf 41.3 & \bf 49.5 & 58.2 & 69.1 \\
\hline
\multirow{2}{*}{MemReader} & Adv-T & 58.4 & 69.9 & 41.2 & 52.0 \\
& PR & 65.4 & 74.5 &\bf 57.8 &\bf 68.4 \\
\cline{2-6}
% & \multirow{2}{*}{SEA} & Adv-T & 28.8 &35.5 & 58.1 & 69.1 \\
%& & PR & \bf 49.0 & \bf 55.9 & 60.2 & 69.9 \\
\hline
\multirow{2}{*}{BERT-base} & Adv-T & 70.1 & 77.8 & 23.8 & 26.4 \\
& PR & 77.2 & 86.1 &\bf 53.6 &\bf 66.1 \\
\hline
% & \multirow{2}{*}{SEA} & Adv-T & 42.2 & 48.8 & 70.2 & 79.9 \\
%& & PR & \bf 69.8 & \bf 77.2 & 74.3 & 85.9 \\
\end{tabular}
\end{minipage}
\quad
\begin{minipage}[t]{0.48\textwidth}
\centering
\makeatletter\def\@captype{table}\makeatother
\caption{\label{tab:sea-train}Performance of Adv-Training (Adv-T) and PR models that were trained with only \textbf{SEA} examples.}
\begin{tabular}{c | c | cIc | cIc }
\hline
\multirow{3}{*}{Base Model}&\multirow{3}{*}{Method}&\multicolumn{4}{c}{Test}\\
\cline{3-6}
& &\multicolumn{2}{c|}{SDA} &\multicolumn{2}{c}{SEA}\\
\cline{3-6}
& &EM & F1 &EM & F1 \\
\hline
\multirow{2}{*}{R-Net} & Adv-T & 26.7 & 33.4 & 57.9 & 67.9 \\
& PR & \bf 41.3 & \bf 49.5 & 58.2 & 69.1 \\
\hline
\multirow{2}{*}{MemReader} & Adv-T & 28.8 &35.5 & 58.1 & 69.1 \\
& PR & \bf 49.0 & \bf 55.9 & 60.2 & 69.9 \\
\hline
\multirow{2}{*}{BERT-base} & Adv-T & 42.2 & 48.8 & 70.2 & 79.9 \\
& PR & \bf 69.8 & \bf 77.2 & 74.3 & 85.9 \\
\hline
\end{tabular}
\end{minipage}
\end{figure*}
\textbf{Second}, we compared the effect of different ways to incorporate linguistic knowledge. As shown in Table~\ref{tab:mainresults}, {\it PR} works more effectively than {\it Feature-Input} when faced with adversarial examples (SDA:65.6$\rightarrow$72.4; SEA:65.6$\rightarrow$69.7). \textbf{For one reason}, regularization on the output distribution is more straightforward than feeding traditional feature vectors into the input layer since the symbolic features may vanish after massive nonlinear operations in neural networks.
\textbf{For another reason}, {\it PR} applies paired features, which are more informative than features assigned to individual words. For example, feature ``1790s$\neq$1780s" is more useful than features \{``1790s /r/IsA/ DATE", ``1780s /r/IsA/ DATE"\}.
\subsection{Cross Evaluation}
\label{sec:cross}
As discussed above, {\it Adv-Training} models trained with both types of adversarial examples cannot cope with these two types at the same time.
%%%By contrast, our PR method is able to deal with two types of adversarial examples simultaneously. %%
We further conducted experiments to verify whether a model trained with only one type of adversarial (e.g. SDA) examples is robust to the other type of adversarial (e.g. SEA) examples.
%%%on only one type of adversarial examples to show that the effect of Adv-Training relies on training data while our PR method can handle unseen adversarial type.
\iffalse
\begin{table}[!ht]
\centering
\normalsize
\caption{\label{tab:subtrainresults}Performance of Adv-Training (Adv-T) and PR models that were trained with only one type of adversarial examples.}
\setlength{\tabcolsep}{4pt}
\begin{tabular}{c |c| c | cIc | cIc }
\hline
\multirow{3}{*}{Base Model}&\multirow{3}{*}{Train}&\multirow{3}{*}{Method}&\multicolumn{4}{c}{Test}\\
\cline{4-7}
& & &\multicolumn{2}{c|}{SDA} &\multicolumn{2}{c}{SEA}\\
\cline{4-7}
& & &EM & F1 &EM & F1 \\
\hline
\multirow{4}{*}{R-Net} & \multirow{2}{*}{SDA} & Adv-T & 54.7 & 65.1 & 41.1 & 51.7 \\
& & PR & 65.4 &71.8 &\bf 57.2 & \bf 67.5 \\
\cline{2-7}
& \multirow{2}{*}{SEA} & Adv-T & 26.7 & 33.4 & 57.9 & 67.9 \\
& & PR & \bf 41.3 & \bf 49.5 & 58.2 & 69.1 \\
\hline
\multirow{4}{*}{MemReader} & \multirow{2}{*}{SDA} & Adv-T & 58.4 & 69.9 & 41.2 & 52.0 \\
& & PR & 65.4 & 74.5 &\bf 57.8 &\bf 68.4 \\
\cline{2-7}
& \multirow{2}{*}{SEA} & Adv-T & 28.8 &35.5 & 58.1 & 69.1 \\
& & PR & \bf 49.0 & \bf 55.9 & 60.2 & 69.9 \\
\hline
\multirow{4}{*}{BERT-base} & \multirow{2}{*}{SDA} & Adv-T & 70.1 & 77.8 & 23.8 & 26.4 \\
& & PR & 77.2 & 86.1 &\bf 53.6 &\bf 66.1 \\
\cline{2-7}
& \multirow{2}{*}{SEA} & Adv-T & 42.2 & 48.8 & 70.2 & 79.9 \\
& & PR & \bf 69.8 & \bf 77.2 & 74.3 & 85.9 \\
\hline
\end{tabular}
\end{table}
\fi
As shown in Table~\ref{tab:sda-train}, if trained with only SDA examples, the performance of {\it Adv-Training} drops remarkably from SDA test examples to SEA test examples (69.9$\rightarrow$52.0).
Moreover, {\it Adv-Training} performs even worse than {\it Ori-Training} on SEA examples (52.0 v.s. 67.0).
Similarly, as shown in Table~\ref{tab:sea-train},
if trained with only SEA examples, the performance of {\it Adv-Training} degrades substantially from SEA test examples to SDA test examples (69.1$\rightarrow$35.5), and {\it Adv-Training} is even worse than {\it Ori-Training} when faced with unseen SDA examples (35.5 v.s. 41.9).
The gap is even enlarged when it is applied to the BERT model.
By contrast, {\it PR} performs much better than {\it Adv-Training} on those unseen cases with higher EM/F1 scores and smaller performance gaps between seen and unseen cases.
Particularly for the BERT model trained on SDA examples where the powerful model may overfit the training data easily, {\it PR} can positively modulate the base RC model substantially (26.4$\rightarrow$66.1).
These results reveal that {\it Adv-Training} mitigates one robustness issue however deteriorates the other issue. Though {\it Adv-Training} improves the robustness of a model, the effect of such a method relies heavily on the training data.
Considering the larger gaps of BERT's results, where the BERT model leverages very large-scale data with pretraining, it is still insufficient to defend against different adversarial types.
As SDA examples requires a model to be sensitive enough, while SEA examples requires a model to be confident, it is hard for data-driven models to handle the two cases simultaneously.
By contrast, our {\it PR} method can handle unseen adversarial types with the help of external linguistic knowledge. The linguistic constraints are applicable to different types of adversarial examples, which consider more symbolic semantics instead of operate in embedding spaces.
%The results of Ori-PR are comparable to the models trained on full data (Adv-*), indicating that external linguistic knowledge reduces the demands for training data.
\subsection{Ablation Test}
\begin{table}[ht]
\normalsize
\centering
\caption{Ablation test to investigate the effect of different constraints.}
\begin{tabular}{l|cIc|cIc}
\hline
& \multicolumn{2}{c|}{SDA} & \multicolumn{2}{c}{SEA} \\
\cline{2-5}
&EM & F1&EM & F1 \\
\hline
Adv-Training & 58.5 & 69.0 & 53.2 & 63.6\\
\hline
(Full)PR& 66.7 & 72.4 & 58.7 & 69.7 \\
\hline
$-$Entity & 62.3 & 71.0 & 57.1 & 67.4\\
$-$Lexical & 62.5 & 71.6 & 56.2 & 66.5\\
$-$Predicate & 65.4 & 71.8 & 58.3 & 69.2\\
\hline
Only Entity & 61.9 & 70.5 & 56.0 & 66.3 \\
Only Lexical & 61.2 & 70.2 & 56.9 & 66.8 \\
Only Predicate& 58.8 & 66.3 & 52.9 & 63.3\\
\hline
\end{tabular}
\label{tab:abla_test}
\end{table}
\begin{figure*}[!ht]
\centering
\includegraphics[width=18cm]{case.jpg}
\caption{Entity/Word pairs and corresponding weights in SDA and SEA examples.
Adversarial pairs (in bold text) were successfully identified by external knowledge and derived expected constraint values $f^l$.
Note that $\lambda^l$ is only specific to the constraint type thus identical across different question-sentence pairs.}
\label{fig:case}
\end{figure*}
We conducted ablation test to investigate the effect of each constraint. MemReader was chosen as the base model and it was evaluated on adversarial examples to discriminate between different constraints.
%and it was evaluated on answerable SDA examples\footnote{Since all the models predict unanswerable questions well, we only inspected answerable SDA examples to discriminate between different constraints.} and SEA examples.
Results in Table~\ref{tab:abla_test} show that:
\\
\textbf{First}, the entity constraint and lexical constraint play more important roles in robustness than the predicate constraint. On one hand, adversarial examples violating the former two constraints are observed more frequently than those violating the predicate constraint in our data. On the other hand, determining SEA and SDA examples via entity/lexical constraints is more straightforward and precise than predicate constraint.
\\
\textbf{Second}, models with more constraints perform better than those with less constraints: three constraints (Full) $>$ two constraints ($-*$) $>$ single constraint (Only *) $>$ no constraint (Adv-Training). When more constraints are adopted, the performance is better since more adversarial phenomena~\cite{squad2.0} are captured.
\subsection{Case Study and Error Analysis}
%%%%We show the learned weights to illustrate how our model makes decisions and discuss a few observations upon manual inspection of test cases.
We demonstrated here how the constraint weight works in our model via case studies. We also conducted error analysis on failure cases to give insights on the method's behavior.
For the SDA example in Fig.~\ref{fig:case}, our model correctly identifies the most important entity pair (``Prussia$\neq$Warsaw") and obtains a negative $f^1$ value which suppresses the probability of wrong answer {\it ``1313"}.
As for the SEA example, our model successfully identifies the adversarial substitution (``television$=$TV" and ``prizes$=$awards").
The model then derives a positive $f^2$ value to increase the probability of the correct answer.
%However, we noticed that the quality of data processing correlates with the effect of applying these constraints.
In spite of successfully answering these adversarial examples, data processing is still insufficient in our model.
As shown in Fig.~\ref{fig:case}, pairs like ``history vs. historical" are excluded because we merely compared words with the same POS tags. Verb phrase ``dates back to" and the key entity ``Doctor Who" are not identified by the data processing toolkit either.
To analyze how the quality of data processing affects the performance,
we sampled 100 error cases for manual annotation. The reasons why our model failed to answer these adversarial examples broadly fall into the following categories: \\
\textbf{(a)} For $28\%$ examples, the model failed to extract basic verbs, adjectives, etc, and thus had no constraint features. For examples, passive voice ``be colonized" cannot be tagged as a verb. Improving these examples needs more precise tools. \\
\textbf{(b)} For $31\%$ examples, the model failed to group words as an entity like ``15 June 1520", and thus had wrong pairs. Improving these examples needs more rules or better tools in data processing.\\
\textbf{(c)} For $12\%$ examples, the model failed to find the correct relationship of a pair, and thus obtained wrong $f$ values. Improving these examples needs larger knowledge bases.\\
\textbf{(d)} For $29\%$ examples, wrong predictions were just due to the deficiency of models. Better base models and more constraints may benefit these examples.\\
\section{Conclusion}
This paper studies two robustness issues existing in current machine reading comprehension models: over-confidence and over-sensitivity.
To address these two issues simultaneously, we leverage external linguistic knowledge to impose three linguistic constraints (entity constraint, lexical constraint, and predicate constraint) on the answer distribution via posterior regularization.
Experiments demonstrate that our method improves the robustness of reading comprehension models, and it is better to cope with these two types of adversarial examples simultaneously.
%Furthermore, the proposed method can handle unseen type adversarial examples.
% if have a single appendix:
%\appendix[Proof of the Zonklar Equations]
% or
%\appendix % for no appendix heading
% do not use \section anymore after \appendix, only \section*
% is possibly needed
% use appendices with more than one appendix
% then use \section to start each appendix
% you must declare a \section before using any
% \subsection or using \label (\appendices by itself
% starts a section numbered zero.)
%
\appendices
\section{Data Processing}
\label{sec:supp-dataprocessing}
We present the details of data processing in this section.
%%%%%%%%%%%
%%%%%%%%
To obtain the linguistic constraints, we have two steps: the first step is to obtain the entity set (entities), the word set (adjectives, adverbs, noun phrases) and the verb sequence (verbs in original order) for each sentence. The second step is to obtain paired entities and words from the entity or word sets of the two sentences.
%%%%%%%
The first step has the following procedure:
\textbf{Firstly}, We use NLTK and spaCy toolkits to tokenize a sentence, and then obtain the POS tag and entity type of each word in the sentence.
\textbf{Secondly}, the following rules are applied to decide which set (the entity set, word set, or verb sequence) a word belongs to:
\begin{itemize}
\item Discard a word if its POS tag is in set \{'PDT', 'POS', 'PRP', 'PRP\$', 'RP', 'CD', 'EX'\}.
\item Add a word to the entity set if it has an entity type given by spaCy.
\item Add a word to the verb sequence if its POS tag is VB*.
\item Add a word to the word set if its POS tag is JJ* or RB*.
\item If a word's POS tag is NN*, we first obtain a noun phrases (e.g., 'train station') by merging the word with its adjacent words which have the same POS tag, and then add the phrase to the word set.
\end{itemize}
The second step is to obtain entity or word pairs from the entity and word sets for the input question $x$ and sentence $s_y$. This process is mainly based on the semantic relationship between two words or two entities.
The procedure is as follows:
%%%%To calculate the constraints $f^1(x,y)$ and $f^2(x,y)$, we prepare the entity pairs and the word pairs with their semantic types of each input $(x,s_y)$.\\
\textbf{Firstly}, each item (a word or a phrase) in the word set of the question $x$ is paired with each in that of the sentence $s_y$. The same process is applied to the entity sets of $x$ and $s_y$.
\textbf{Secondly}, for each entity or word pair, we decide its semantic relationship sequentially as follows:
\begin{itemize}
\item If the two items in this pair have different POS tags or entity types, such as (``hot",``city") and (``1949",``America"), the pair is treated as irrelevant and discarded.
\item For each item in the pair, We extract a contextual word set from a sentence with a 10-word window. If the number of overlapping words in the two contextual word sets is less than 3, the pair is treated as irrelevant and discarded.
\item If the two items in this pair are exactly the same, or are defined as synonyms in WordNet, or have relationships like /r/IsA/ and /r/RelatedTo/ according to ConceptNet, the pair is judged as semantic equivalent.
\item For an entity pair, we additionally obtain abbreviations by concatenating initials with ``." like ``United State$\rightarrow$U.S.". If one entity's abbreviation is the same as the other entity, the pair is judged as semantic equivalent.
\item If the two items differ in negative prefix such as ``(unbalanced, balanced), (possible, impossible)", the pair is judged as semantic different.
\item If the two items are defined as antonyms in WordNet, or have /r/Not* relationship according to ConceptNet, the pair is judged as semantic different.
\item For an entity pair, if the two items are different and this pair is not judged as semantic equivalent before, we judge it as semantic different.
\end{itemize}
\iffalse
\section{Implement Details of the Networks in Constraint Function}
\label{sec:supp-constraints}
In the entity/lexical constraint functions $f^l(\boldsymbol{x},\boldsymbol{y};\omega_l)(l=1,2)$, we use two networks to decide the weights of entity/word pairs respectively. The weights are computed as follows:
$$\alpha_{\omega_1}=Att(\boldsymbol{x},\boldsymbol{s_y};\omega_1)$$ $$\alpha_{\omega_2}=Att(\boldsymbol{x},\boldsymbol{s_y};\omega_2)$$
$Att(\boldsymbol{x},\boldsymbol{s_y};\omega_1)$ receives two sequences $\boldsymbol{x}=(x_1,...x_m)$ and $\boldsymbol{s_y}=(y_1,..,y_n)$ as input, and outputs the weight of an entity pair by summing attention scores of tokens included in the pair. Concretely, if the two entities of one entity pair are represented as $(\boldsymbol{e^k_x}=(x_{s_1},..x_{e_1}), \boldsymbol{e^k_y}=(y_{s_2},y_{e_2}))$ respectively, $\alpha^k$ can be calculated as follows:
\begin{align}
o^x_i &= Softmax(\sum_{j=1}^{n}y_j^TW_1x_i)\notag \\
o^y_i &= Softmax(\sum_{j=1}^{m}x_j^TW_1y_i) \notag \\
\alpha^k &= \sum_{i=s_1}^{e_1}o^x_i + \sum_{j=s_2}^{e_2}o^y_j \notag
\end{align}
$Att(\boldsymbol{x},\boldsymbol{s_y};\omega_2)$ is simply set to be the same network with $Att(\boldsymbol{x},\boldsymbol{s_y};\omega_1)$ in our experiments (namely, $\omega_1=\omega_2$ ).\\
The predicate constraint network $F(\boldsymbol{v}_x,\boldsymbol{v}_y;\omega_3)$ receives two verb sequences and outputs a score $f$ as:
\begin{align}
o^x &= LSTM(\boldsymbol{v}_x;\omega_3) \notag\\
o^y &= LSTM(\boldsymbol{v}_y;\omega_3) \notag\\
F(\boldsymbol{v_x},\boldsymbol{v_y};\omega_3) & = tanh(W_3[o^x;o^y;o^x-o^y;o^x*o^y] + b_3) \notag
\end{align}
We adapt 300-dimension GloVe word embeddings, the same with base RC models. The dimension of hidden states of LSTM($\omega_3$) is set to 100.
The dimensions of other parameters are $W_1 \in \mathbb{R}^{300\times300}$, $W_3 \in \mathbb{R}^{1\times400}$ and $b_3 \in \mathbb{R}^{1}$. $f^l(\boldsymbol{x},\boldsymbol{y};\omega)$ outputs a scalar for each input.
\fi
% use section* for acknowledgment
\section*{Acknowledgment}
This work was supported by the National Key R\&D Program of China (Grant No. 2018YFC0830200),
and partly by the National Science Foundation of China (Grant No.61876096/61332007).
The authors would like to thank all the workers who help us to annotate sampled data.
Mantong Zhou would like to acknowledge Dr.Yao Xiao and Yijie Zhang for fruitful discussions and data preparation.
% Can use something like this to put references on a page
% by themselves when using endfloat and the captionsoff option.
\ifCLASSOPTIONcaptionsoff
\newpage
\fi
% trigger a \newpage just before the given reference
% number - used to balance the columns on the last page
% adjust value as needed - may need to be readjusted if
% the document is modified later
%\IEEEtriggeratref{8}
% The "triggered" command can be changed if desired:
%\IEEEtriggercmd{\enlargethispage{-5in}}
% references section
% can use a bibliography generated by BibTeX as a .bbl file
% BibTeX documentation can be easily obtained at:
% http://mirror.ctan.org/biblio/bibtex/contrib/doc/
% The IEEEtran BibTeX style support page is at:
% http://www.michaelshell.org/tex/ieeetran/bibtex/
\bibliographystyle{plain}
% argument is your BibTeX string definitions and bibliography database(s)
\bibliography{reference}
%
% <OR> manually copy in the resultant .bbl file
% set second argument of \begin to the number of references
% (used to reserve space for the reference number labels box)
\iffalse
\begin{thebibliography}{1}
\bibitem{IEEEhowto:kopka}
H.~Kopka and P.~W. Daly, \emph{A Guide to \LaTeX}, 3rd~ed.\hskip 1em plus
0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999.
\end{thebibliography}
\fi
\iffalse
%\newpage
% biography section
%
% If you have an EPS/PDF photo (graphicx package needed) extra braces are
% needed around the contents of the optional argument to biography to prevent
% the LaTeX parser from getting confused when it sees the complicated
% \includegraphics command within an optional argument. (You could create
% your own custom macro containing the \includegraphics command to make things
% simpler here.)
%\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{mshell}}]{Michael Shell}
% or if you just want to reserve a space for a photo:
\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{img.jpg}}]{Mantong Zhou}
received the B.E. degree from Tsinghua University, Beijing, China, in 2015. she is a PhD student at the Department of Computer Science and Technology, Tsinghua University. Her research interests include question answering and machine comprehension.
\end{IEEEbiography}
% if you will not have a photo at all:
\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{huangml.jpg}}]{Minlie Huang}
received the Ph.D. degree from Tsinghua University, in 2006. He is currently an associate Professor at Institute for Artificial Intelligence, the Department of Computer Science and Technology, Tsinghua University, Beijing, China. His research interests include deep/reinforcement learning and natural language processing. He has published 70+ papers in premier conferences and journals (ACL, IJCAI, AAAI, KDD, SIGIR, WWW, etc.). He won IJCAI 2018 distinguished paper award, CCL 2018 best demo award, NLPCC 2015 best paper award, Hanvon Youngth Innovation Award in 2018, and MSRA Collaborative Research Award in 2019. His work, Emotional Chatting Machines, was reported by MIT Technology Review, the Guardian, nVIDIA, and other mass media.
He served as area chair for EMNLP 2019, ACL 2016, EMNLP 2014/2011; as senior PC member for AAAI 2018/2019 and IJCAI 2018/2019; and as reviewers for premier conferences and journals.
\end{IEEEbiography}
% insert where needed to balance the two columns on the last page with
% biographies
%\newpage
\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{zxy.jpg}}]{Xiaoyan Zhu}
received the bachelor degree at University of Science and Technology Beijing in 1982, master degree at Kobe University in 1987. and Ph. D. degree at Nagoya Institute of Technology, Japan in 1990. She is currently a Professor at the Department of Computer Science and Technology, Tsinghua University, Beijing, China. Her research interests include intelligent information processing, machine learning, natural language processing, quanry and answering system and Bioinformatics. She has authored more than 100 peer-reviewed articles in leading international conferences (SIGKDD, IJCAI, AAAI, ACL) and journals (TOIS, Bioinformatics, Genome Biology)
\end{IEEEbiography}
% You can push biographies down or up by placing
% a \vfill before or after them. The appropriate
% use of \vfill depends on what kind of text is
% on the last page and whether or not the columns
% are being equalized.
%\vfill
% Can be used to pull up biographies so that the bottom of the last one
% is flush with the other column.
%\enlargethispage{-5in}
\fi
% that's all folks
\end{document}
\begin{thebibliography}{10}
\bibitem{docqa}
Christopher Clark and Matt Gardner.
\newblock Simple and effective multi-paragraph reading comprehension.
\newblock {\em meeting of the association for computational linguistics},
1:845--855, 2018.
\bibitem{devlin2018bert:}
Jacob Devlin, Mingwei Chang, Kenton Lee, and Kristina Toutanova.
\newblock Bert: Pre-training of deep bidirectional transformers for language
understanding.
\newblock 2018.
\bibitem{pathologies}
Shi Feng, Eric Wallace, Alvin Grissom~II, Mohit Iyyer, Pedro Rodriguez, and
Jordan Boyd-Graber.
\newblock Pathologies of neural models make interpretations difficult.
\newblock In {\em Proceedings of the 2018 Conference on Empirical Methods in
Natural Language Processing}, pages 3719--3728, 2018.
\bibitem{ganchev2013cross-lingual}
Kuzman Ganchev and Dipanjan Das.
\newblock Cross-lingual discriminative learning of sequence models with
posterior regularization.
\newblock {\em EMNLP}, pages 1996--2006, 2013.
\bibitem{pr}
Kuzman Ganchev, Jennifer Gillenwater, Ben Taskar, et~al.
\newblock Posterior regularization for structured latent variable models.
\newblock {\em Journal of Machine Learning Research}, 11(Jul):2001--2049, 2010.
\bibitem{distractors}
Yifan Gao, Lidong Bing, Piji Li, Irwin King, and Michael~R Lyu.
\newblock Generating distractors for reading comprehension questions from real
examinations.
\newblock {\em AAAI}, 2019.
\bibitem{advexp}
Ian~J Goodfellow, Jonathon Shlens, and Christian Szegedy.
\newblock Explaining and harnessing adversarial examples.
\newblock {\em international conference on learning representations}, 2015.
\bibitem{calibration}
Chuan Guo, Geoff Pleiss, Yu~Sun, and Kilian~Q Weinberger.
\newblock On calibration of modern neural networks.
\newblock {\em ICML}, 2017.
\bibitem{CBT}
Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston.
\newblock The goldilocks principle: Reading children's books with explicit
memory representations.
\newblock {\em ICLR}, 2016.
\bibitem{hu2018reinforced}
Minghao Hu, Yuxing Peng, Zhen Huang, Xipeng Qiu, Furu Wei, and Ming Zhou.
\newblock Reinforced mnemonic reader for machine reading comprehension.
\newblock {\em international joint conference on artificial intelligence},
pages 4099--4106, 2018.
\bibitem{hu2019read}
Minghao Hu, Furu Wei, Yuxing Peng, Zhen Huang, Nan Yang, and Dongsheng Li.
\newblock Read + verify: Machine reading comprehension with unanswerable
questions.
\newblock {\em national conference on artificial intelligence}, 2019.
\bibitem{logicnn}
Zhiting Hu, Xuezhe Ma, Zhengzhong Liu, Eduard~H Hovy, and Eric~P Xing.
\newblock Harnessing deep neural networks with logic rules.
\newblock {\em meeting of the association for computational linguistics},
1:2410--2420, 2016.
\bibitem{learnedlogicnn}
Zhiting Hu, Zichao Yang, Ruslan Salakhutdinov, and Eric Xing.
\newblock Deep neural networks with massive learned knowledge.
\newblock In {\em Proceedings of the 2016 Conference on Empirical Methods in
Natural Language Processing}, pages 1670--1679, 2016.
\bibitem{adversarialparaphrase}
Mohit Iyyer, John Wieting, Kevin Gimpel, and Luke~S Zettlemoyer.
\newblock Adversarial example generation with syntactically controlled
paraphrase networks.
\newblock {\em north american chapter of the association for computational
linguistics}, 1:1875--1885, 2018.
\bibitem{squadadv}
Robin Jia and Percy Liang.
\newblock Adversarial examples for evaluating reading comprehension systems.
\newblock In {\em Proceedings of the 2017 Conference on Empirical Methods in
Natural Language Processing}, pages 2021--2031. Association for Computational
Linguistics, 2017.
\bibitem{squad2.0}
Robin Jia, Pranav Rajpurkar, and Percy Liang.
\newblock Know what you don’t know: Unanswerable questions for squad.
\newblock {\em meeting of the association for computational linguistics},
2:784--789, 2018.
\bibitem{kaushik2018much}
Divyansh Kaushik and Zachary~C. Lipton.
\newblock How much reading does reading comprehension require? a critical
investigation of popular benchmarks.
\newblock In {\em Proceedings of the 2018 Conference on Empirical Methods in
Natural Language Processing}, pages 5010--5015. Association for Computational
Linguistics, 2018.
\bibitem{Adam}
Diederik Kingma and Jimmy Ba.
\newblock Adam: A method for stochastic optimization.
\newblock {\em ICLR}, 2015.
\bibitem{NarrativeQA}
Tomas Kocisky, Jonathan Schwarz, Phil Blunsom, Chris Dyer, Karl~Moritz Hermann,
Gabor Melis, and Edward Grefenstette.
\newblock The narrativeqa reading comprehension challenge.
\newblock {\em Transactions of the Association for Computational Linguistics},
6:317--328, 2018.
\bibitem{levy2017zero-shot}
Omer Levy, Minjoon Seo, Eunsol Choi, and Luke~S Zettlemoyer.
\newblock Zero-shot relation extraction via reading comprehension.
\newblock {\em conference on computational natural language learning}, pages
333--342, 2017.
\bibitem{pmlr-v32-mei14}
Shike Mei, Jun Zhu, and Jerry Zhu.
\newblock Robust regbayes: Selectively incorporating first-order logic domain
knowledge into bayesian models.
\newblock In Eric~P. Xing and Tony Jebara, editors, {\em Proceedings of the
31st International Conference on Machine Learning}, volume~32 of {\em
Proceedings of Machine Learning Research}, pages 253--261, Bejing, China,
22--24 Jun 2014. PMLR.
\bibitem{sentenceselector}
Sewon Min, Victor Zhong, Caiming Xiong, and Richard Socher.
\newblock Efficient and robust question answering from minimal context over
documents.
\newblock {\em meeting of the association for computational linguistics},
1:1725--1735, 2018.
\bibitem{mudrakarta2018did}
Pramod~Kaushik Mudrakarta, Ankur Taly, Mukund Sundararajan, and Kedar
Dhamdhere.
\newblock Did the model understand the question.
\newblock {\em meeting of the association for computational linguistics},
1:1896--1906, 2018.
\bibitem{pennington2014glove:}
Jeffrey Pennington, Richard Socher, and Christopher Manning.
\newblock Glove: Global vectors for word representation.
\newblock In {\em EMNLP}, pages 1532--1543, 2014.
\bibitem{entropyreg}
Gabriel Pereyra, George Tucker, Jan Chorowski, Lukasz Kaiser, and Geoffrey~E
Hinton.
\newblock Regularizing neural networks by penalizing confident output
distributions.
\newblock {\em ICLR}, 2017.
\bibitem{squad}
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang.
\newblock Squad: 100,000+ questions for machine comprehension of text.
\newblock In {\em EMNLP}, pages 2383--2392, Austin, Texas, November 2016.
Association for Computational Linguistics.
\bibitem{smtnmt}
Shuo Ren, Zhirui Zhang, Shujie Liu, Ming Zhou, and Shuai Ma.
\newblock Unsupervised neural machine translation with smt as posterior
regularization.
\newblock {\em national conference on artificial intelligence}, 2019.
\bibitem{sear}
Marco Tulio De~Freitas Ribeiro, Sameer Singh, and Carlos Guestrin.
\newblock Semantically equivalent adversarial rules for debugging nlp models.
\newblock {\em ACL}, 1:856--865, 2018.
\bibitem{sun2018u-net:}
Fu~Sun, Linyang Li, Xipeng Qiu, and Yang Liu.
\newblock U-net: Machine reading comprehension with unanswerable questions.
\newblock 2018.
\bibitem{labelsmoothing}
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and
Zbigniew Wojna.
\newblock Rethinking the inception architecture for computer vision.
\newblock {\em computer vision and pattern recognition}, pages 2818--2826,
2016.
\bibitem{nonlinear}
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan,
Ian~J Goodfellow, and Rob Fergus.
\newblock Intriguing properties of neural networks.
\newblock {\em international conference on learning representations}, 2014.
\bibitem{mixdata}
Zaremba Wojciech Sutskever Ilya Bruna Joan Erhan Dumitru Goodfellow Ian~J.
Szegedy, Christian and Rob Fergus.
\newblock Intriguing properties of neural networks.
\newblock {\em ICLR}, 2014.
\bibitem{a3net}
Jiuniu Wang, Xingyu Fu, Guangluan Xu, Yirong Wu, Ziyan Chen, Yang Wei, and
Li~Jin.
\newblock A3net:adversarial-and-attention network for machine reading
comprehension.
\newblock {\em international conference natural language processing}, pages
64--75, 2018.
\bibitem{rnet}
Wenhui Wang, Nan Yang, Furu Wei, Baobao Chang, and Ming Zhou.
\newblock Gated self-matching networks for reading comprehension and question
answering.
\newblock 1:189--198, 2017.
\bibitem{wang2018robust}
Yicheng Wang and Mohit Bansal.
\newblock Robust machine comprehension models via adversarial training.
\newblock In {\em Proceedings of the 2018 Conference of the North American
Chapter of the Association for Computational Linguistics: Human Language
Technologies, Volume 2 (Short Papers)}, pages 575--581. Association for
Computational Linguistics, 2018.
\bibitem{wordpiece}
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc~V. Le, Mohammad Norouzi, Wolfgang
Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner,
Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws,
Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian,
Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick,
Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean.
\newblock Google’s neural machine translation system: Bridging the gap
between human and machine translation.
\newblock sep 2016.
\bibitem{Yang2014Context}
Bishan Yang and Claire Cardie.
\newblock Context-aware learning for sentence-level sentiment analysis with
posterior regularization.
\newblock In {\em Meeting of the Association for Computational Linguistics},
2014.
\bibitem{Zhang2018Priormt}
Jiacheng Zhang, Yang Liu, Huanbo Luan, Jingfang Xu, and Maosong Sun.
\newblock Prior knowledge integration for neural machine translation using
posterior regularization.
\newblock 2018.
\bibitem{zhao2016semi}
Li~Zhao, Minlie Huang, Ziyu Yao, Rongwei Su, Yingying Jiang, and Xiaoyan Zhu.
\newblock Semi-supervised multinomial naive bayes for text classification by
leveraging word-level statistical constraint.
\newblock In {\em AAAI}, pages 2877--2884, 2016.
\end{thebibliography}