# AdaLoGN: Adaptive Logic Graph Network for
Reasoning-Based Machine Reading Comprehension

Xiao Li  Gong Cheng  Ziheng Chen  Yawei Sun  Yuzhong Qu
State Key Laboratory for Novel Software Technology, Nanjing University,
Nanjing, China
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>
###### Abstract

Recent machine reading comprehension datasets such as ReClor and LogiQA
require performing logical reasoning over text. Conventional neural models are
insufficient for logical reasoning, while symbolic reasoners cannot directly
apply to text. To meet the challenge, we present a neural-symbolic approach
which, to predict an answer, passes messages over a graph representing logical
relations between text units. It incorporates an adaptive logic graph network
(AdaLoGN) which adaptively infers logical relations to extend the graph and,
essentially, realizes mutual and iterative reinforcement between neural and
symbolic reasoning. We also implement a novel subgraph-to-node message passing
mechanism to enhance context-option interaction for answering multiple-choice
questions. Our approach shows promising results on ReClor and LogiQA.

##  1 Introduction

Machine reading comprehension (MRC) has drawn much research attention. Early
MRC datasets are not difficult for state-of-the-art neural methods. Indeed,
BERT Devlin et al. (2019) has outperformed humans on SQuAD Rajpurkar et al.
(2016). Recent datasets become more challenging. For example, ReClor Yu et al.
(2020) and LogiQA Liu et al. (2020) require understanding and reasoning over
logical relations described in text, where neural methods showed
unsatisfactory performance.

For instance, consider the MRC task in Figure 1. The context consists of a set
of textual propositions describing logical relations between elementary
discourse units (EDUs) Mann and Thompson (1988). For example, the first
sentence describes an implication between two EDUs: “the company gets project
A” implies that “product B can be put on the market on schedule”. With the
help of propositional calculus, humans can formalize propositions and then
apply inference rules in propositional logic to prove the proposition in
option C. However, how can machines solve such a task?

Figure 1: An example MRC task (adapted from a task in LogiQA). Logical
connectives are highlighted in italics. ✓marks the correct answer.

##### Existing Methods and Limitations

To solve it, conventional neural models are insufficient for providing the
required reasoning capabilities, while symbolic reasoners cannot directly
apply to unstructured text. One promising direction is to consider a neural-
symbolic solution, such as the recent DAGN method Huang et al. (2021a). It
breaks down the context and each option into a set of EDUs and connects them
with discourse relations as a graph. Then it performs graph neural network
(GNN) based reasoning to predict an answer.

However, we identify two limitations in this method. L1: Despite the graph
representation, it is predominantly a neural method over discourse relations.
It is debatable whether the required symbolic reasoning over logical relations
(e.g., implication, negation) can be properly approximated. L2: The graph is
often loosely connected and composed of long paths. Node-to-node message
passing implemented in existing GNN models Kipf and Welling (2017);
Schlichtkrull et al. (2018); Velickovic et al. (2018) is prone to provide
insufficient interaction between the context and the option, which is critical
to answering a multiple-choice question.

##### Our Approach.

While we follow the general framework of DAGN, i.e., graph construction and
then graph-based reasoning, we overcome its two limitations with a novel
neural-symbolic approach.

(a) Raw TLG.

(b) Extended TLG. Dashed nodes and edges represent adaptively inferred EDUs
and logical relations, respectively. Double edges represent subgraph-to-node
message passing.

Figure 2: Two TLGs for exemplifying our approach. For readability, we omit rev
edges.

To address L1, Figure 3 sketches out our idea. Specifically, we propose to
construct a text logic graph (TLG) representing EDUs and their logical
relations as opposed to discourse relations, so we can _explicitly perform
symbolic reasoning_ to extend the TLG with inferred logical relations, as
illustrated in Figure 2. The inferred relations may provide crucial
connections to be used in the subsequent graph-based message passing, i.e.,
_symbolic reasoning reinforces neural reasoning_.

Further, while trivially computing and admitting the deductive closure may
extend the TLG with irrelevant connections which would mislead message
passing, we leverage signals from neural reasoning to adaptively admit
relevant extensions, i.e.,  _neural reasoning reinforces symbolic reasoning_.

Moreover, we _iterate the above mutual reinforcement_ by restarting inference
in each iteration with signals from the previous iteration to accommodate
corrections to the reasoning process and allow sufficient neural-symbolic
interaction.

To address L2, we aggregate the information in the context subgraph of TLG and
employ a novel subgraph-to-node message passing mechanism to _enhance the
interaction from the holistic context subgraph to each node in the option
subgraph, and vice versa_ , as illustrated in Figure 2(b).

Figure 3: Our main idea: mutual and iterative reinforcement between symbolic
and neural reasoning.

We incorporate the above two ideas into our new Adaptive Logic Graph Network
(AdaLoGN). To summarize, our technical contributions include

  * •

a novel neural-symbolic approach where neural and symbolic reasoning mutually
and iteratively reinforce each other, and

  * •

a novel aggregation-based enhancement of message passing in graph-based neural
reasoning.

##### Outline.

We elaborate our approach in Section 2, present experiments in Section 3,
discuss related work in Section 4, and conclude in Section 5.

Our code is available on GitHub: https://github.com/nju-websoft/AdaLoGN.

##  2 Approach

A MRC task $\langle c,q,O\rangle$ consists of a context $c$, a question $q$,
and a set of options $O$. Only one option in $O$ is the correct answer to $q$
given $c$. The goal of the task is to find this option.

Figure 4 outlines our implementation. For each option $o\in O$, we generate
the representations of $c,q,o$ (i.e.,
$\mathbf{g}_{c},\mathbf{g}_{q},\mathbf{g}_{o}$, respectively) by a pre-trained
language model (Section 2.1), and we construct a raw TLG where nodes (i.e.,
$u_{1},\ldots,u_{|V|}$) represent EDUs extracted from $c,q,o$ and edges
represent their logical relations (Section 2.2). With their initial
representations (i.e.,
$\mathbf{h}_{u_{1}}^{(0)},\ldots,\mathbf{h}_{u_{|V|}}^{(0)}$) obtained from
the pre-trained language model, in an iterative manner, we adaptively extend
the TLG (i.e., symbolic reasoning) and then pass messages (i.e., neural
reasoning) to update node representations (i.e.,
$\mathbf{h}_{u_{1}}^{(l+1)},\ldots,\mathbf{h}_{u_{|V|}}^{(l+1)}$) for
generating the representation of the TLG (i.e., $\mathbf{h}_{G}$) (Section
2.3). Finally, we predict the correctness of $o$ (i.e., $\mathit{score}_{o}$)
based on the above representations (Section 2.4).

Figure 4: Overview of our approach.

###  2.1 Text Encoding

We use RoBERTa Liu et al. (2019), a pre-trained language model, to encode
three token sequences $c=c_{1}\cdots c_{|c|}$, $q=q_{1}\cdots q_{|q|}$, and
$o=o_{1}\cdots o_{|o|}$ which are concatenated by the classifier token $<$s$>$
and the separator token $<$/s$>$:

$\begin{aligned}
&[\mathbf{g}_{\text{$<$s$>$}};\mathbf{g}_{c_{1}};\ldots;\mathbf{g}_{\text{$<$/s$>$}};\mathbf{g}_{q_{1}};\ldots;\mathbf{g}_{o_{1}};\ldots;\mathbf{g}_{\text{$<$/s$>$}}]\\\
=&~{}\text{RoBERTa}(\text{$<$s$>$ $c_{1}$ $\cdots$ $<$/s$>$ $q_{1}$ $\cdots$
$o_{1}$ $\cdots$ $<$/s$>$})\,.\end{aligned}$

(1)

The output vector representations are averaged to form the representations of
$c,q,o$:

$\mathbf{g}_{c}=\frac{1}{|c|}\sum\limits_{i=1}^{|c|}{\mathbf{g}_{c_{i}}}\,,\;\mathbf{g}_{q}=\frac{1}{|q|}\sum\limits_{i=1}^{|q|}{\mathbf{g}_{q_{i}}}\,,\;\mathbf{g}_{o}=\frac{1}{|o|}\sum\limits_{i=1}^{|o|}{\mathbf{g}_{o_{i}}}\,.$

(2)

###  2.2 Text Logic Graph (TLG)

Besides directly encoding text, we extract logical relations from text as a
graph called TLG.

####  2.2.1 Definition of TLG

For a piece of text, its TLG is a directed graph $G=\langle V,E\rangle$ where
$V$ is a set of nodes representing EDUs of the text Mann and Thompson (1988),
and $E\subseteq V\times R\times V$ is a set of labeled directed edges
representing _logical relations_ between EDUs described in the text. We
consider six types of common logical relations
$R=\\{\texttt{conj},\texttt{disj},\texttt{impl},\texttt{neg},\texttt{rev},\texttt{unk}\\}$:

  * •

conjunction (conj), disjunction (disj), implication (impl), and negation (neg)
are standard logical connectives in propositional logic;

  * •

reversed implication (rev) is introduced to represent the inverse relation of
impl;

  * •

unk represents an unknown relation.

Since conj, disj, neg, and unk are symmetric relations, edges labeled with
them are bidirectional.

Observe the difference between our TLG and the discourse-based logic graph
considered in DAGN Huang et al. (2021a): edges in the former represent logical
relations, while those in the latter represent discourse relations. Therefore,
we can explicitly perform symbolic reasoning on TLG.

Rhetorical Relation | Logical Relation
---|---
LIST, CONTRAST | conj
DISJUNCTION | disj
RESULT | impl
CAUSE, PURPOSE, CONDITION, BACKGROUND | rev
Table 1: Mapping from rhetorical relations in Graphene to logical relations in
TLG.

####  2.2.2 Construction of Raw TLG

We initialize a raw TLG from $c$ and $o$. Following Huang et al. (2021a), we
ignore $q$ as it is usually uninformative in existing datasets. Specifically,
we use Graphene Cetto et al. (2018) to extract EDUs and their rhetorical
relations Mann and Thompson (1988) from $c$ and $o$. Rhetorical relations are
converted to logical relations via the mapping in Table 1. Note that each impl
edge is always paired with an inverse rev edge, and vice versa.

We also define a small number of syntactic rules to identify EDUs that negate
each other and connect them with neg. The rules are based on part-of-speech
tags and dependencies. For example, one such rule checks whether two EDUs
differ from each other only by an antonym of an adverb.

In addition, for each pair of EDUs that are adjacent in the text (including
the last EDU of $c$ and the first EDU of $o$) but have none of the above
logical relations, we connect them with unk because Graphene may fail to
identify their relation.

###  2.3 Adaptive Logic Graph Network (AdaLoGN)

Since TLG consists of logical relations, we explicitly perform symbolic
reasoning by applying inference rules to extend the TLG with inferred logical
relations to benefit the subsequent neural reasoning. However, rather than
computing the deductive closure which may undesirably provide many relations
that are irrelevant to answering the question and mislead neural reasoning, we
perform adaptive extension by leveraging signals from neural reasoning to
identify and admit relevant extensions. For neural reasoning, we perform
message passing to update node representations, which finally are pooled into
the representation of the TLG to be used in the subsequent answer prediction.
We iterate the above process by restarting inference on the raw TLG in each
iteration with signals from the previous iteration to accommodate corrections
to the reasoning process and let symbolic and neural reasoning sufficiently
interact with each other. We transform the above idea into a new model named
AdaLoGN outlined in Figure 4 and detailed below.

(a) Hypothetical syllogism.

(b) Transposition.

(c) Adjacency-transmission.

Figure 5: Dashed nodes and edges are inferred by applying an inference rule.
$\star$ represents any logical relation in
$\\{\texttt{conj},\texttt{disj},\texttt{impl}\\}$. We omit rev edges.

####  2.3.1 Inference Rules

Let $G=\langle V,E\rangle$ be a raw TLG. For symbolic reasoning over the
logical relations in $G$, we apply two _inference rules about implication in
propositional logic_. Other rules are left for future work.

  * •

Hypothetical Syllogism:

$((u_{i}\rightarrow u_{j})\wedge(u_{j}\rightarrow
u_{k}))\vdash(u_{i}\rightarrow u_{k})\,.$ (3)

Specifically, if $E$ contains two edges $\langle
u_{i},\texttt{impl},u_{j}\rangle$ and $\langle
u_{j},\texttt{impl},u_{k}\rangle$, we can add two edges $\langle
u_{i},\texttt{impl},u_{k}\rangle$ and $\langle
u_{k},\texttt{rev},u_{i}\rangle$ to $E$, as illustrated in Figure 5(a).

  * •

Transposition:

$(u_{i}\rightarrow u_{j})\vdash(\neg u_{j}\rightarrow\neg u_{i})\,.$ (4)

Specifically, if $E$ contains an edge $\langle
u_{i},\texttt{impl},u_{j}\rangle$, we can add two edges $\langle\neg
u_{j},\texttt{impl},\neg u_{i}\rangle$ and $\langle\neg
u_{i},\texttt{rev},\neg u_{j}\rangle$ to $E$, as illustrated in Figure 5(b).
Note that if $u_{i}$ (resp. $u_{j}$) is not incident from/to any neg edge,
i.e., $\neg u_{i}$ (resp. $\neg u_{j}$) is not a node in $V$, we will add
$\neg u_{i}$ (resp. $\neg u_{j}$) to $V$ whose text negates that of $u_{i}$
(resp. $u_{j}$), and then add a bidirectional neg edge between $u_{i}$ and
$\neg u_{i}$ (resp. $u_{j}$ and $\neg u_{j}$) to $E$.

Besides, recall that unk represents a potential logical relation between EDUs
that are adjacent in text. Considering that an EDU often inherits logical
relations from its adjacent EDUs, we heuristically define and apply the
following inference rule.

  * •

Adjacency-Transmission:

$((u_{i}\star u_{j})\wedge(u_{i}\sim u_{k}))\vdash(u_{k}\star u_{j})\,,$ (5)

where $\star\in\\{\wedge,\vee,\rightarrow\\}$ and $\sim$ represents adjacency
in text. For example, if $E$ contains two edges $\langle
u_{i},\texttt{conj},u_{j}\rangle$ and $\langle
u_{i},\texttt{unk},u_{k}\rangle$, we can add a bidirectional conj edge between
$u_{k}$ and $u_{j}$ to $E$, as illustrated in Figure 5(c).

While this rule may generate false propositions, we expect our adaptive
reasoner to apply it properly. For example, it is useful for handling the
following sentence: “… only 1 person in the group knew 3 of the group
($u_{k}$), 3 people knew 2 of the group ($u_{i}$), and 4 people know 1 of the
group ($u_{j}$).” Graphene identifies $\langle
u_{i},\texttt{conj},u_{j}\rangle$ and $\langle
u_{i},\texttt{unk},u_{k}\rangle$ but misses $\langle
u_{k},\texttt{conj},u_{j}\rangle$, which can be generated by applying this
rule.

####  2.3.2 Adaptive Extension of TLG

Our symbolic reasoning is _adaptive_. We rely on signals from neural reasoning
to decide which inference steps are relevant to answering the questions and
hence are admitted to extend the TLG. Specifically, each candidate extension
$\epsilon$ applies an inference rule over a set of nodes
$V_{\epsilon}\subseteq V$. We average their vector representations (which will
be detailed later) to form the representation of $\epsilon$:

$\mathbf{h}_{\epsilon}=\frac{1}{|V_{\epsilon}|}\sum_{u_{i}\in
V_{\epsilon}}{\mathbf{h}_{u_{i}}}\,.$ (6)

Since $\epsilon$ is for predicting the correctness of $o$, we interact
$\mathbf{h}_{\epsilon}$ with the representation of $o$, i.e., $\mathbf{g}_{o}$
in Equation (2), to predict the relevance score of $\epsilon$:

$\mathit{rel}_{\epsilon}=\mathtt{sigmoid}(\mathtt{linear}(\mathbf{h}_{\epsilon}\parallel\mathbf{g}_{o}))\,,$
(7)

where $\parallel$ represents vector concatenation. We admit all possible
$\epsilon$ to extend $G$ such that $\mathit{rel}_{\epsilon}>\tau$ where $\tau$
is a predefined threshold.

Moreover, our neural-symbolic reasoning is _iterative_. In the $(l+1)$-th
iteration, we restart symbolic reasoning with the raw TLG and recompute
Equation (6) with node representations $\mathbf{h}_{u_{i}}^{(l)}$ from neural
reasoning in the $l$-th iteration (which will be detailed in Section 2.3.3).
The initial node representations $\mathbf{h}_{u_{i}}^{(0)}$ are obtained from
a pre-trained language model. Specifically, we flatten $V$ into a sequence of
nodes in the order they appear in the text. Recall that $V$ is divided into
$V_{c}=\\{u_{1},\ldots,u_{|V_{c}|}\\}$ and
$V_{o}=\\{u_{|V_{c}|+1},\ldots,u_{|V|}\\}$ representing the nodes extracted
from $c$ and $o$, respectively. Each node $u_{i}$ is a token sequence
$u_{i}=u_{i_{1}}\cdots u_{i_{|u_{i}|}}$. We use RoBERTa to encode $V_{c}$ and
$V_{o}$ which are concatenated by $<$s$>$ and $<$/s$>$, where nodes inside
$V_{c}$ and $V_{o}$ are separated by a special token “$\mid$”:

$\begin{aligned}
&[\mathbf{h}_{\text{$<$s$>$}};\mathbf{h}_{u_{1_{1}}};\ldots;\mathbf{h}_{\mid};\ldots;\mathbf{h}_{\text{$<$/s$>$}};\mathbf{h}_{u_{|V_{c}|+1_{1}}};\ldots;\mathbf{h}_{\mid};\ldots;\mathbf{h}_{\text{$<$/s$>$}}]\\\
=&~{}\text{RoBERTa}(\text{$<$s$>$ $u_{1_{1}}\cdots\mid\cdots$ $<$/s$>$
$u_{|V_{c}|+1_{1}}\cdots\mid\cdots$ $<$/s$>$})\,.\end{aligned}$

(8)

The output vector representations are averaged to form the initial
representation of each node $u_{i}\in V$:

$\mathbf{h}_{u_{i}}^{(0)}=\frac{1}{|u_{i}|}\sum_{j=1}^{|u_{i}|}{\mathbf{h}_{u_{i_{j}}}}\,.$
(9)

####  2.3.3 Message Passing

To let the nodes in TLG interact with each other and fuse their information,
our neural reasoning performs graph-based message passing Gilmer et al. (2017)
to update node representations in each iteration from
$\mathbf{h}_{u_{i}}^{(l)}$ to $\mathbf{h}_{u_{i}}^{(l+1)}$. Since TLG is a
heterogeneous graph containing multiple types of edges, we incorporate the
node-to-node message passing mechanism in R-GCN Schlichtkrull et al. (2018) as
a basis. Further, observe that TLG is usually loosely connected and prone to
cause insufficient interaction between $V_{c}$ and $V_{o}$ via long paths in
limited iterations, which cannot be alleviated by simply increasing the number
of iterations because it would raise other issues such as over-smoothing Li et
al. (2018); Chen et al. (2020). To enhance such interaction which is critical
to predicting the correctness of $o$, we incorporate a novel _subgraph-to-node
message passing mechanism_ to holistically pass the information aggregated
from a subgraph (e.g., $V_{c}$) to a node (e.g., each $u_{i}\in V_{o}$).

Specifically, without loss of generality, for each $u_{i}\in V_{o}$, we
compute the $u_{i}$-attended aggregate representation of $V_{c}$ by an
attention-weighted sum of node representations over $V_{c}$:

$\displaystyle\begin{split}\mathbf{h}_{V_{c},u_{i}}^{(l)}&=\sum_{u_{j}\in
V_{c}}{\alpha_{i,j}\mathbf{h}_{u_{j}}^{(l)}}\,,\text{ where}\\\
\alpha_{i,j}&=\mathtt{softmax}_{j}([a_{i,1};\ldots;a_{i,|V_{c}|}]^{\intercal})\,,\\\
a_{i,j}&=\mathtt{LeakyReLU}(\mathtt{linear}(\mathbf{h}_{u_{i}}^{(l)}\parallel\mathbf{h}_{u_{j}}^{(l)}))\,.\end{split}$
(10)

Let $N^{i}$ be the set of neighbors of $u_{i}$. Let $N_{r}^{i}\subseteq N^{i}$
be the subset under logical relation $r\in R$. We update the representation of
$u_{i}$ by passing messages to $u_{i}$ from its neighbors and from $V_{c}$:

$\begin{aligned} \mathbf{h}_{u_{i}}^{(l+1)}&=\mathtt{ReLU}(\sum\limits_{r\in
R}{\sum\limits_{u_{j}\in
N_{r}^{i}}{\frac{\alpha_{i,j}}{|N_{r}^{i}|}\mathbf{W}_{r}^{(l)}\mathbf{h}_{u_{j}}^{(l)}}}+\mathbf{W}_{0}^{(l)}\mathbf{h}_{u_{i}}^{(l)}\\\
&\qquad\qquad+\beta_{i}\mathbf{W}_{\text{subgraph}}^{(l)}\mathbf{h}_{V_{c},u_{i}}^{(l)})\,,\text{
where}\\\
\alpha_{i,j}&=\mathtt{softmax}_{\mathtt{idx}(a_{i,j})}([\ldots;a_{i,j};\ldots]^{\intercal})\text{
for all }u_{j}\in N^{i}\,,\\\
a_{i,j}&=\mathtt{LeakyReLU}(\mathtt{linear}(\mathbf{h}_{u_{i}}^{(l)}\parallel\mathbf{h}_{u_{j}}^{(l)}))\,,\\\
\beta_{i}&=\mathtt{sigmoid}(\mathtt{linear}(\mathbf{h}_{u_{i}}^{(l)}\parallel\mathbf{h}_{V_{c},u_{i}}^{(l)}))\,,\end{aligned}$

(11)

$\mathbf{W}_{r}^{(l)},\mathbf{W}_{0}^{(l)},\mathbf{W}_{\text{subgraph}}^{(l)}$
are matrices of learnable parameters, and $\mathtt{idx}(a_{i,j})$ returns the
index of $a_{i,j}$ in the $|N^{i}|$-dimensional vector
$[\ldots;a_{i,j};\ldots]^{\intercal}$.

In an analogous way, for each $u_{i}\in V_{c}$, we compute the
$u_{i}$-attended aggregate representation of $V_{o}$ denoted by
$\mathbf{h}_{V_{o},u_{i}}^{(l)}$ and update $\mathbf{h}_{u_{i}}^{(l+1)}$.

Observe two differences between Equation (11) and its counterpart in the
original R-GCN. First, we incorporate subgraph-to-node message passing and
control it by a gating mechanism (i.e., $\beta_{i}$). Second, we weight node-
to-node message passing by an attention mechanism (i.e., $\alpha_{i,j}$).

####  2.3.4 Graph Pooling

After $L$ iterations where $L$ is a hyperparameter, for each node $u_{i}\in
V$, we fuse its representations over all the iterations with a residual
connection:

$\mathbf{h}_{u_{i}}^{\text{fus}}=\mathbf{h}_{u_{i}}^{(0)}+\mathtt{linear}(\mathbf{h}_{u_{i}}^{(1)}\parallel\cdots\parallel\mathbf{h}_{u_{i}}^{(L)})\,.$
(12)

Inspired by Huang et al. (2021a), we feed all
$\mathbf{h}_{u_{i}}^{\text{fus}}$ into a bidirectional residual GRU layer Cho
et al. (2014) to finalize node representations:

$[\mathbf{h}_{u_{1}}^{\text{fnl}};\ldots;\mathbf{h}_{u_{|V|}}^{\text{fnl}}]=\mathtt{Res\text{-}BiGRU}([\mathbf{h}_{u_{1}}^{\text{fus}};\ldots;\mathbf{h}_{u_{|V|}}^{\text{fus}}])\,.$
(13)

We aggregate these node representations by computing an $o$-attended weighted
sum:

$\displaystyle\begin{split}\mathbf{h}_{V}&=\sum_{u_{i}\in
V}{\alpha_{i}\mathbf{h}_{u_{i}}^{\text{fnl}}}\,,\text{ where}\\\
\alpha_{i}&=\mathtt{softmax}_{i}([a_{1};\ldots;a_{|V|}]^{\intercal})\,,\\\
a_{i}&=\mathtt{LeakyReLU}(\mathtt{linear}(\mathbf{g}_{o}\parallel\mathbf{h}_{u_{i}}^{\text{fnl}}))\,,\end{split}$
(14)

and $\mathbf{g}_{o}$ is the representation of $o$ in Equation (2). We
concatenate $\mathbf{h}_{V}$ and the relevance scores to form the
representation of $G$:

$\displaystyle\begin{split}\mathbf{h}_{G}&=(\mathbf{h}_{V}\parallel\mathit{rel}_{\mathcal{E}^{(1)}}\parallel\cdots\parallel\mathit{rel}_{\mathcal{E}^{(L)}})\,,\text{
where}\\\
\mathit{rel}_{\mathcal{E}^{(l)}}&=\frac{1}{|\mathcal{E}^{(l)}|}\sum_{\epsilon\in\mathcal{E}^{(l)}}{\mathit{rel}_{\epsilon}}\,,\end{split}$
(15)

$\mathcal{E}^{(l)}$ is the set of candidate extensions in the $l$-th
iteration, and $\mathit{rel}_{\epsilon}$ is in Equation (7). In this way, we
are able to train the network in Equation (7).

###  2.4 Answer Prediction

We fuse the representations of $c,q,o$ and the TLG to predict the correctness
of $o$:

$\mathit{score}_{o}=\mathtt{linear}(\tanh(\mathtt{linear}(\mathbf{g}_{c}\parallel\mathbf{g}_{q}\parallel\mathbf{g}_{o}\parallel\mathbf{h}_{G})))\,,$

(16)

where $\mathbf{g}_{c},\mathbf{g}_{q},\mathbf{g}_{o}$ are in Equation (2).

###  2.5 Loss Function

Let $o_{\text{gold}}\in O$ be the correct answer. We optimize the cross-
entropy loss with label smoothing:

$\displaystyle\begin{split}\mathcal{L}&=-(1-\gamma)\mathit{score}^{\prime}_{o_{\text{gold}}}-\gamma\frac{1}{|O|}\sum_{o_{i}\in
O}{\mathit{score}^{\prime}_{o_{i}}}\,,\\\
\text{where}~{}&\mathit{score}^{\prime}_{o_{i}}=\log\frac{\exp(\mathit{score}_{o_{i}})}{\sum_{o_{j}\in
O}{\exp(\mathit{score}_{o_{j}})}}\,,\end{split}$ (17)

and $\gamma$ is a predefined smoothing factor.

##  3 Experiments

###  3.1 Datasets

We used two reasoning-based MRC datasets.

ReClor Yu et al. (2020) consists of 6,138 four-option multiple-choice
questions collected from standardized exams such as GMAT and LSAT. The
questions were divided into 4,638 for training, 500 for development, and 1,000
for testing. The test set was further divided into 440 easy questions (Test-E)
where each question could be correctly answered by some strong baseline method
using only the options and ignoring the context and the question, and the rest
560 hard questions (Test-H).

LogiQA Liu et al. (2020) consists of 8,768 four-option multiple-choice
questions collected from the National Civil Servants Examination of China,
which were translated into English. The questions were divided into 7,376 for
training, 651 for development, and 651 for testing.

###  3.2 Implementation Details

We experimented on NVIDIA V100 (32GB).

We tuned hyperparameters on the development set of each dataset. Specifically,
for text encoding, we used RoBERTa-large with $\text{hidden layer}=24$ and
$\text{hidden units}=1,024$ implemented by Hugging Face Wolf et al. (2020).
For message passing, our implementation was based on DGL Wang et al. (2019).
For both datasets, we used the Adam optimizer, and set $\text{attention
heads}=16$, $\text{dropout rate}=0.1$, $\text{epochs}=10$, $\text{batch
size}=16$ selected from $\\{8,16,24\\}$, number of iterations $L=2$ from
$\\{2,3\\}$, and $\text{maximum sequence length}=384$. For ReClor, we set
$\text{warm-up proportion}=0.1$ from $\\{0.1,0.2\\}$, $\text{learning
rate}=7e\text{--}6$ from
$\\{6e\text{--}6,7e\text{--}6,8e\text{--}6,1e\text{--}5\\}$, and
$\text{seed}=123$ from $\\{123,1234,42,43\\}$. For LogiQA, we set $\text{warm-
up proportion}=0.2$ from $\\{0.1,0.2\\}$, $\text{learning rate}=8e\text{--}6$
from $\\{6e\text{--}6,7e\text{--}6,8e\text{--}6,1e\text{--}5\\}$, and
$\text{seed}=42$ from $\\{123,1234,42,43\\}$.

For the relevance score threshold $\tau$ below Equation (7), we set $\tau=0.6$
from $\\{0.4,0.5,0.6,0.7\\}$ for both datasets. For the smoothing factor
$\gamma$ in Equation (17), we set $\gamma=0.25$ for both datasets.

To fit in our GPU’s memory, we restricted a raw TLG to contain at most 25
nodes and 50 edges by, if needed, randomly merging nodes connected by an unk
edge and/or deleting non-bridge edges while keeping the graph connected.

###  3.3 Baselines

We compared our approach, referred to as AdaLoGN, with popular pre-trained
language models and with other known methods in the literature.

Reasoning-based MRC, like other MRC tasks, can be solved by using a pre-
trained language model with a classification layer. Yu et al. (2020) reported
the results of BERT${}_{\texttt{LARGE}}$, RoBERTa${}_{\texttt{LARGE}}$, and
XLNet${}_{\texttt{LARGE}}$ on ReClor. Huang et al. (2021a) reported the
results of BERT${}_{\texttt{LARGE}}$ and RoBERTa${}_{\texttt{LARGE}}$ on
LogiQA.

In the literature, we found the results of DAGN Huang et al. (2021a), Focal
Reasoner Ouyang et al. (2021), and LReasoner Wang et al. (2021a, b) on both
datasets. For a fair comparison with our approach, we presented their results
on RoBERTa${}_{\texttt{LARGE}}$, while LReasoner achieved better results with
ALBERT. Between the two variants of LReasoner, one without data augmentation
(w/o DA) and the other with data augmentation (w/ DA), we presented both of
their results but mainly compared with the former because our approach and
other baseline methods would also benefit if data augmentation were
incorporated.

###  3.4 Evaluation Metric

Following the literature, we reported accuracy, i.e., the proportion of
correctly answered questions. For our approach we reported the max across 3
runs on the development set of each dataset.

Method | Dev | Test | Test-E | Test-H
---|---|---|---|---
BERT${}_{\texttt{LARGE}}$ | 53.80 | 49.80 | 72.00 | 32.30
RoBERTa${}_{\texttt{LARGE}}$ | 62.60 | 55.60 | 75.50 | 40.00
XLNet${}_{\texttt{LARGE}}$ | 62.00 | 56.00 | 75.70 | 40.50
DAGN | 65.80 | 58.30 | 75.91 | 44.46
Focal Reasoner | 66.80 | 58.90 | 77.05 | 44.64
LReasoner (w/o DA) | 65.20 | 58.30 | 78.60 | 42.30
LReasoner (w/ DA) | 66.20 | 62.40 | 81.40 | 47.50
AdaLoGN | 65.20 | 60.20 | 79.32 | 45.18
Human | – | 63.00 | 57.10 | 67.20
Table 2: Comparison with baselines on ReClor. Method | Dev | Test
---|---|---
BERT${}_{\texttt{LARGE}}$ | 34.10 | 31.03
RoBERTa${}_{\texttt{LARGE}}$ | 35.02 | 35.33
DAGN | 36.87 | 39.32
Focal Reasoner | 41.01 | 40.25
LReasoner (w/ DA) | 38.10 | 40.60
AdaLoGN | 39.94 | 40.71
Human | – | 86.00
Table 3: Comparison with baselines on LogiQA.

###  3.5 Comparison with Baselines

On ReClor, as shown in Table 2, AdaLoGN outperformed all the baseline methods
on the test set by at least 1.30%, except for LReasoner (w/ DA) which
performed data augmentation so that the comparison might be unfair. AdaLoGN
and LReasoner (w/ DA) both exceeded 60%, being comparable with human-level
performance (63%).

On LogiQA, as shown in Table 3, AdaLoGN outperformed all the baseline methods
on the test set, including LReasoner (w/ DA). Still, our result (40.71%) was
not comparable with human-level performance (86%).

In particular, on both ReClor and LogiQA, AdaLoGN exceeded DAGN on the test
set by 1.39%–1.90%, which demonstrated the effectiveness of our approach in
addressing the limitations of DAGN mentioned in Section 1.

Method | Dev | Test | Test-E | Test-H
---|---|---|---|---
AdaLoGN | 65.20 | 60.20 | 79.32 | 45.18
AdaLoGN${}_{\texttt{no-ext}}$ | 65.80 | 59.50 | 77.27 | 45.54
AdaLoGN${}_{\texttt{full-ext}}$ | 65.00 | 58.80 | 78.19 | 43.57
AdaLoGN${}_{\texttt{no-at}}$ | 64.80 | 59.40 | 79.77 | 43.39
AdaLoGN${}_{\texttt{n2n}}$ | 65.20 | 57.60 | 77.95 | 41.61
AdaLoGN${}_{\texttt{n2n+}}$ | 65.00 | 58.60 | 78.64 | 42.86
Table 4: Ablation study on ReClor. Method | Dev | Test
---|---|---
AdaLoGN | 39.94 | 40.71
AdaLoGN${}_{\texttt{no-ext}}$ | 37.94 | 39.02
AdaLoGN${}_{\texttt{full-ext}}$ | 39.63 | 39.02
AdaLoGN${}_{\texttt{no-at}}$ | 38.56 | 39.94
AdaLoGN${}_{\texttt{n2n}}$ | 38.40 | 39.02
AdaLoGN${}_{\texttt{n2n+}}$ | 38.40 | 38.86
Table 5: Ablation study on LogiQA.

###  3.6 Ablation Study

We conducted an ablation study to evaluate the effectiveness of the two main
technical contributions in our approach: adaptive extension of TLG and
subgraph-to-node message passing.

####  3.6.1 Effectiveness of Adaptive Extension

We compared the standard version of AdaLoGN with two variants removing
adaptive extension.

  * •

AdaLoGN${}_{\texttt{no-ext}}$ performs no extension.

  * •

AdaLoGN${}_{\texttt{full-ext}}$ performs full extension by computing and
admitting the deductive closure.

On ReClor, as shown in Table 4, both variants exhibited a fair decrease in
accuracy on the test set by 0.70%–1.40%. On LogiQA, as shown in Table 5, the
decreases were larger, 1.69% on the test set, possibly because the questions
in LogiQA were harder so that the effectiveness of our adaptive extension
became more noticeable. Interestingly, on both datasets,
AdaLoGN${}_{\texttt{full-ext}}$ was not better than AdaLoGN${}_{\texttt{no-
ext}}$ on the test set, indicating that a naive injection of logical reasoning
into neural reasoning might not have positive effects.

We analyzed the distributions of relevance scores of candidate extensions,
i.e., $\mathit{rel}_{\epsilon}$ in Equation (7). As shown in Figure 6, they
approximated a normal distribution on both datasets. By setting the threshold
$\tau=0.6$, we admitted 19.57% and 4.86% of the extensions on ReClor and
LogiQA, respectively.

Figure 6: Distributions of relevance scores of candidate extensions. Top: on
the development set of Reclor; Bottom: on the development set of LogiQA.

We also compared with a variant of AdaLoGN using a subset of inference rules.

  * •

AdaLoGN${}_{\texttt{no-at}}$ ignores the adjacency-transmission rule.

By ignoring the adjacency-transmission rule, AdaLoGN${}_{\texttt{no-at}}$
showed a decrease in accuracy on the test sets by 0.77%–0.80%, suggesting the
usefulness of this rule despite its heuristic nature.

####  3.6.2 Effectiveness of Subgraph-to-Node Message Passing

We compared the standard version of AdaLoGN with two variants removing
subgraph-to-node message passing or implementing it in a different way.

  * •

AdaLoGN${}_{\texttt{n2n}}$ only performs node-to-node message passing in a
standard way.

  * •

AdaLoGN${}_{\texttt{n2n+}}$ only performs node-to-node message passing but, as
an alternative to our holistic subgraph-to-node message passing, it adds a
bidirectional unk edge between each node in the context subgraph and each node
in the option subgraph to enhance context-option interaction.

On ReClor, as shown in Table 4, both variants exhibited a large decrease in
accuracy on the test set by 1.60%–2.60%. On LogiQA, as shown in Table 5, the
decreases were also large, 1.69%–1.85% on the test set. The results
demonstrated the effectiveness of our subgraph-to-node message passing.

Compared with AdaLoGN${}_{\texttt{n2n}}$, AdaLoGN${}_{\texttt{n2n+}}$ achieved
better results on ReClor but worse results on LogiQA on the test set,
indicating that a naive enhancement of context-option interaction could have
negative effects.

###  3.7 Error Analysis

From the development set of each dataset, we randomly sampled fifty questions
to which our approach outputted an incorrect answer. We analyzed the sources
of these errors. Note that an error could have a mixture of multiple sources.

As shown in Table 6, we mainly relied on Graphene to extract a raw TLG from
text based on syntactic analysis, which accounted for about one third of the
errors (36%–38%). Our adaptive extension of TLG constituted about one fifth of
the errors (18%–22%), e.g., some excessive extensions produced irrelevant
logical relations which might mislead message passing. One fifth of the errors
(18%–20%) were due to the limited expressivity of our symbolic reasoning,
i.e., a subset of propositional logic, while some questions required
quantifiers. Other errors might be related to neural reasoning such as message
passing or answer prediction (40%–46%).

Source of Error | ReClor | LogiQA
---|---|---
Construction of raw TLG | 38% | 36%
Adaptive extension of TLG | 18% | 22%
Expressivity of symbolic reasoning | 20% | 18%
Others (about neural reasoning) | 46% | 40%
Table 6: Error analysis of AdaLoGN.

###  3.8 Run Time

On both ReClor and LogiQA, our approach used about 0.8 second for answering a
question.

##  4 Related Work

###  4.1 Reasoning-Based MRC

While simple MRC tasks have been well studied, complex MRC tasks requiring
various reasoning capabilities are receiving increasing research attention.
Among others, multi-hop MRC tasks in HotpotQA Yang et al. (2018) and WikiHop
Welbl et al. (2018) require retrieving and reading multiple supporting
passages to answer a question. They can be solved by constructing and
reasoning over a graph connecting passages that overlap or co-occur with each
other Qiu et al. (2019); Tu et al. (2020), by implicitly supervising a
retriever via word weighting Huang et al. (2021b), or by iteratively applying
dense retrieval Xiong et al. (2021). MRC tasks in DROP Dua et al. (2019)
require discrete reasoning such as addition, counting, and sorting. Neural
networks have been extended to incorporate modules that can perform such
reasoning over numbers and dates mentioned in a given context Gupta et al.
(2020). For MRC tasks in CommonsenseQA Talmor et al. (2019) which are targeted
at commonsense knowledge and reasoning, recent methods fuse external
commonsense knowledge with pre-trained language models for reasoning Yan et
al. (2021); Xu et al. (2021). There are also studies on MRC tasks requiring
spatial/geographical reasoning Huang et al. (2019); Li et al. (2021) and
temporal/causal reasoning Sun et al. (2018).

Different from the above reasoning capabilities, the MRC tasks considered in
this paper require _logical reasoning_ , such as reasoning about sufficient
and necessary conditions, categorization, conjunctions and disjunctions. Pre-
trained language models alone struggled and were far behind human-level
performance on such tasks in ReClor Yu et al. (2020) and LogiQA Liu et al.
(2020) due to their weakness in logical reasoning.

Among existing methods for solving such tasks, DAGN Huang et al. (2021a) and
Focal Reasoner Ouyang et al. (2021) extract discourse or coreference relations
from text and represent as a graph of text units. Then they employ GNN to pass
messages and update representations for predicting an answer. Different from
their neural nature, our approach _symbolically performs logical reasoning_ as
required by such tasks, by applying inference rules over extracted logical
relations to extend the graph. This feature resembles LReasoner Wang et al.
(2021a, b) which extends the context with inferred logical relations to
benefit the subsequent neural reasoning. However, different from LReasoner
which computes the deductive closure and identifies relevant extensions by
text overlapping with the options in an unsupervised manner, our approach
predicts relevance based on signals from neural reasoning _in a supervised
manner_ , and our prediction _evolves over iterations_ after sufficient
interaction between symbolic and neural reasoning. All these features helped
our approach achieve better performance in the experiments.

###  4.2 Neural-Symbolic Reasoning

Our approach represents a novel implementation of neural-symbolic reasoning
Raedt et al. (2020), and it differs from the following existing methods.

One paradigm of neural-symbolic reasoning is logic-driven neural reasoning.
For example, logical constraints can be compiled into a neural network by
augmenting the loss function Xu et al. (2018) or the network structure Li and
Srikumar (2019). Logical connectives, quantifiers, and consistency checking
can also be approximated by neural networks Dong et al. (2019); Ren et al.
(2020); Gu et al. (2019). While these methods incorporate logical reasoning
into neural reasoning via emulation, our approach _explicitly performs logical
reasoning_ by applying inference rules over logical relations. Such exact
inference is more accurate than emulation-based approximation.

Another paradigm is neural-driven logical reasoning. For example, neural
networks have been employed to predict the truth of an atom in answering
first-order logic queries Arakelyan et al. (2021), and to implement predicates
in probabilistic logic programming Manhaeve et al. (2021). These methods and
our approach cope with different problems, thus using different techniques.
Specifically, while these methods complement logical reasoning with extra
facts generated by neural reasoning, our approach _filters inferred logical
relations_ based on signals from neural reasoning.

Moreover, observe that the neural-symbolic interaction in the above methods
are unidirectional, i.e., they leverage either symbolic or neural reasoning to
reinforce the other. By contrast, we allow _bidirectional neural-symbolic
interaction_ where neural and symbolic reasoning mutually and iteratively
reinforce each other for better performance.

##  5 Conclusion

To meet the challenge of reasoning-based MRC, we presented a neural-symbolic
approach where neural and symbolic reasoning mutually and iteratively
reinforce each other via our new AdaLoGN model. We also enhanced graph-based
neural reasoning with a novel subgraph-to-node message passing mechanism.
Since these ideas are quite general, we believe they have great potential for
a variety of applications beyond MRC, e.g., link prediction.

Error analysis has revealed some shortcomings of our approach. Currently we
rely on syntactic tools to extract a raw TLG from text. We will explore other
extraction methods to achieve a higher quality. We also plan to apply more
inference rules and incorporate quantifiers to improve the expressivity of our
symbolic reasoning.

## Acknowledgements

This work was supported in part by the NSFC (62072224) and in part by the
Beijing Academy of Artificial Intelligence (BAAI).

## References

  * Arakelyan et al. (2021) Erik Arakelyan, Daniel Daza, Pasquale Minervini, and Michael Cochez. 2021.  Complex query answering with neural link predictors.  In _ICLR 2021_.
  * Cetto et al. (2018) Matthias Cetto, Christina Niklaus, André Freitas, and Siegfried Handschuh. 2018.  Graphene: semantically-linked propositions in open information extraction.  In _COLING 2018_ , pages 2300–2311.
  * Chen et al. (2020) Deli Chen, Yankai Lin, Wei Li, Peng Li, Jie Zhou, and Xu Sun. 2020.  Measuring and relieving the over-smoothing problem for graph neural networks from the topological view.  In _AAAI-IAAI-EAAI 2020_ , pages 3438–3445.
  * Cho et al. (2014) Kyunghyun Cho, Bart van Merrienboer, Çaglar Gülçehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014.  Learning phrase representations using RNN encoder-decoder for statistical machine translation.  In _EMNLP 2014_ , pages 1724–1734.
  * 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 _NAACL-HLT 2019_ , pages 4171–4186.
  * Dong et al. (2019) Honghua Dong, Jiayuan Mao, Tian Lin, Chong Wang, Lihong Li, and Denny Zhou. 2019\.  Neural logic machines.  In _ICLR 2019_.
  * Dua et al. (2019) Dheeru Dua, Yizhong Wang, Pradeep Dasigi, Gabriel Stanovsky, Sameer Singh, and Matt Gardner. 2019.  DROP: A reading comprehension benchmark requiring discrete reasoning over paragraphs.  In _NAACL-HLT 2019_ , pages 2368–2378.
  * Gilmer et al. (2017) Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. 2017.  Neural message passing for quantum chemistry.  In _ICML 2017_ , pages 1263–1272.
  * Gu et al. (2019) Yu Gu, Jeff Z. Pan, Gong Cheng, Heiko Paulheim, and Giorgos Stoilos. 2019.  Local ABox consistency prediction with transparent TBoxes using gated graph neural networks.  In _NeSy 2019_.
  * Gupta et al. (2020) Nitish Gupta, Kevin Lin, Dan Roth, Sameer Singh, and Matt Gardner. 2020.  Neural module networks for reasoning over text.  In _ICLR 2020_.
  * Huang et al. (2021a) Yinya Huang, Meng Fang, Yu Cao, Liwei Wang, and Xiaodan Liang. 2021a.  DAGN: discourse-aware graph network for logical reasoning.  In _NAACL-HLT 2021_ , pages 5848–5855.
  * Huang et al. (2019) Zixian Huang, Yulin Shen, Xiao Li, Yuang Wei, Gong Cheng, Lin Zhou, Xinyu Dai, and Yuzhong Qu. 2019.  GeoSQA: A benchmark for scenario-based question answering in the geography domain at high school level.  In _EMNLP-IJCNLP 2019_ , pages 5865–5870.
  * Huang et al. (2021b) Zixian Huang, Ao Wu, Yulin Shen, Gong Cheng, and Yuzhong Qu. 2021b.  When retriever-reader meets scenario-based multiple-choice questions.  In _Findings of EMNLP 2021_ , pages 985–994.
  * Kipf and Welling (2017) Thomas N. Kipf and Max Welling. 2017.  Semi-supervised classification with graph convolutional networks.  In _ICLR 2017_.
  * Li et al. (2018) Qimai Li, Zhichao Han, and Xiao-Ming Wu. 2018.  Deeper insights into graph convolutional networks for semi-supervised learning.  In _AAAI-IAAI-EAAI 2018_ , pages 3538–3545.
  * Li and Srikumar (2019) Tao Li and Vivek Srikumar. 2019.  Augmenting neural networks with first-order logic.  In _ACL 2019_ , pages 292–302.
  * Li et al. (2021) Xiao Li, Yawei Sun, and Gong Cheng. 2021.  TSQA: tabular scenario based question answering.  In _AAAI-IAAI-EAAI 2021_ , pages 13297–13305.
  * Liu et al. (2020) Jian Liu, Leyang Cui, Hanmeng Liu, Dandan Huang, Yile Wang, and Yue Zhang. 2020\.  LogiQA: A challenge dataset for machine reading comprehension with logical reasoning.  In _IJCAI 2020_ , pages 3622–3628.
  * 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.
  * Manhaeve et al. (2021) Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, and Luc De Raedt. 2021.  Neural probabilistic logic programming in DeepProbLog.  _Artif. Intell._ , 298:103504.
  * Mann and Thompson (1988) William C. Mann and Sandra A. Thompson. 1988.  Rhetorical structure theory: Toward a functional theory of text organization.  _Text_ , 8(3):243–281.
  * Ouyang et al. (2021) Siru Ouyang, Zhuosheng Zhang, and Hai Zhao. 2021.  Fact-driven logical reasoning.  _CoRR_ , abs/2105.10334.
  * Qiu et al. (2019) Lin Qiu, Yunxuan Xiao, Yanru Qu, Hao Zhou, Lei Li, Weinan Zhang, and Yong Yu. 2019\.  Dynamically fused graph network for multi-hop reasoning.  In _ACL 2019_ , pages 6140–6150.
  * Raedt et al. (2020) Luc De Raedt, Sebastijan Dumancic, Robin Manhaeve, and Giuseppe Marra. 2020.  From statistical relational to neuro-symbolic artificial intelligence.  In _IJCAI 2020_ , pages 4943–4950.
  * Rajpurkar et al. (2016) Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016.  SQuAD: 100,000+ questions for machine comprehension of text.  In _EMNLP 2016_ , pages 2383–2392.
  * Ren et al. (2020) Hongyu Ren, Weihua Hu, and Jure Leskovec. 2020.  Query2box: reasoning over knowledge graphs in vector space using box embeddings.  In _ICLR 2020_.
  * Schlichtkrull et al. (2018) Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2018.  Modeling relational data with graph convolutional networks.  In _ESWC 2018_ , pages 593–607.
  * Sun et al. (2018) Yawei Sun, Gong Cheng, and Yuzhong Qu. 2018.  Reading comprehension with graph-based temporal-casual reasoning.  In _COLING 2018_ , pages 806–817.
  * Talmor et al. (2019) Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019.  CommonsenseQA: A question answering challenge targeting commonsense knowledge.  In _NAACL-HLT 2019_ , pages 4149–4158.
  * Tu et al. (2020) Ming Tu, Kevin Huang, Guangtao Wang, Jing Huang, Xiaodong He, and Bowen Zhou. 2020\.  Select, answer and explain: Interpretable multi-hop reading comprehension over multiple documents.  In _AAAI-IAAI-EAAI 2020_ , pages 9073–9080.
  * Velickovic et al. (2018) Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. 2018.  Graph attention networks.  In _ICLR 2018_.
  * Wang et al. (2019) Minjie Wang, Da Zheng, Zihao Ye, Quan Gan, Mufei Li, Xiang Song, Jinjing Zhou, Chao Ma, Lingfan Yu, Yu Gai, Tianjun Xiao, Tong He, George Karypis, Jinyang Li, and Zheng Zhang. 2019.  Deep Graph Library: a graph-centric, highly-performant package for graph neural networks.  _CoRR_ , abs/1909.01315.
  * Wang et al. (2021a) Siyuan Wang, Zhongkun Liu, Wanjun Zhong, Ming Zhou, Zhongyu Wei, Zhumin Chen, and Nan Duan. 2021a.  From LSAT: The progress and challenges of complex reasoning.  _arXiv preprint arXiv:2108.00648_.
  * Wang et al. (2021b) Siyuan Wang, Wanjun Zhong, Duyu Tang, Zhongyu Wei, Zhihao Fan, Daxin Jiang, Ming Zhou, and Nan Duan. 2021b.  Logic-driven context extension and data augmentation for logical reasoning of text.  _arXiv preprint arXiv:2105.03659_.
  * Welbl et al. (2018) Johannes Welbl, Pontus Stenetorp, and Sebastian Riedel. 2018.  Constructing datasets for multi-hop reading comprehension across documents.  _Trans. Assoc. Comput. Linguistics_ , 6:287–302.
  * Wolf et al. (2020) Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020.  Transformers: state-of-the-art natural language processing.  In _EMNLP 2020_ , pages 38–45.
  * Xiong et al. (2021) Wenhan Xiong, Xiang Lorraine Li, Srini Iyer, Jingfei Du, Patrick S. H. Lewis, William Yang Wang, Yashar Mehdad, Scott Yih, Sebastian Riedel, Douwe Kiela, and Barlas Oguz. 2021.  Answering complex open-domain questions with multi-hop dense retrieval.  In _ICLR 2021_.
  * Xu et al. (2018) Jingyi Xu, Zilu Zhang, Tal Friedman, Yitao Liang, and Guy Van den Broeck. 2018.  A semantic loss function for deep learning with symbolic knowledge.  In _ICML 2018_ , pages 5498–5507.
  * Xu et al. (2021) Yichong Xu, Chenguang Zhu, Ruochen Xu, Yang Liu, Michael Zeng, and Xuedong Huang. 2021.  Fusing context into knowledge graph for commonsense question answering.  In _Findings of ACL-IJCNLP 2021_ , pages 1201–1207.
  * Yan et al. (2021) Jun Yan, Mrigank Raman, Aaron Chan, Tianyu Zhang, Ryan A. Rossi, Handong Zhao, Sungchul Kim, Nedim Lipka, and Xiang Ren. 2021.  Learning contextualized knowledge structures for commonsense reasoning.  In _Findings of ACL-IJCNLP 2021_ , pages 4038–4051.
  * Yang et al. (2018) Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W. Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018.  HotpotQA: A dataset for diverse, explainable multi-hop question answering.  In _EMNLP 2018_ , pages 2369–2380.
  * Yu et al. (2020) Weihao Yu, Zihang Jiang, Yanfei Dong, and Jiashi Feng. 2020.  ReClor: A reading comprehension dataset requiring logical reasoning.  In _ICLR 2020_.


# Identity information based on human magnetocardiography signals

Pengju Zhang1,3, Chenxi Sun1, Jianwei Zhang2, Hong Guo1,∗

###### Abstract

We have developed an individual identification system based on
magnetocardiography (MCG) signals captured using optically pumped
magnetometers (OPMs). Our system utilizes pattern recognition to analyze the
signals obtained at different positions on the body, by scanning the matrices
composed of MCG signals with a $2\times 2$ window. In order to make use of the
spatial information of MCG signals, we transform the signals from adjacent
small areas into four channels of a dataset. We further transform the data
into time-frequency matrices using wavelet transforms and employ a
convolutional neural network (CNN) for classification. As a result, our system
achieves an accuracy rate of 97.04% in identifying individuals. This finding
indicates that the MCG signal holds potential for use in individual
identification systems, offering a valuable tool for personalized healthcare
management.

## Introduction

In contemporary society, identification (ID) systems have become critical
components in maintaining social order and ensuring security. The
effectiveness of such systems is largely dependent on their ability to
accurately and reliably identify individuals based on a secure and stable
physiological feature. While several features, including facial features,
fingerprints, iris patterns, and electrocardiogram (ECG) signals, have been
employed for identification purposes (Batool and Tariq 2011; Su et al. 2019),
each of these methods presents its own set of limitations and potential
security concerns. For instance, facial features and fingerprints can be
altered or obscured through various means, such as plastic surgery or wearing
gloves. Similarly, iris patterns, although unique to each individual, can be
challenging to capture accurately and reliably in certain situations, such as
in low light or with individuals who have visual impairments. Moreover, ECG
signals can be impacted by factors such as physical activity, medication, or
stress, leading to variability and potential inaccuracies in identification.
The identification of secure and stable physiological features for use in ID
systems remains an active area of research, as the limitations of current
methods continue to pose challenges for ensuring the accuracy and reliability
of these systems.

Recent studies have demonstrated that the electric and magnetic signals
generated by cardiac activity exhibit unique characteristics that hold promise
for individual identification (Kim, Kim, and Pan 2020). Among these signals,
the electrocardiogram (ECG) has been extensively investigated for its high
security and potential use in identification systems (Biel et al. 2001; Israel
et al. 2005). Typically, an ECG-based identification system involves two main
components: pre-processing and deep learning (ElRahman 2019). However, one of
the major challenges in using ECG signals for identification is the presence
of noise, including industrial frequency noise, baseline wander, and Gaussian
noise. Consequently, effective filtering techniques are essential to remove
noise from ECG signals.

In some studies, ECG signals are transformed into time-frequency matrices
using the wavelet transform or short-time Fourier transform to facilitate
their analysis and classification (Byeon, Pan, and Kwak 2020). Neural
networks, particularly convolutional neural networks (CNNs), are then trained
on the 2-D time-frequency maps to identify individuals based on their unique
ECG signals. Despite these promising developments, the practical application
of ECG-based identification systems remains limited by the difficulty in
collecting reliable ECG signals. This challenge is due in part to the fact
that ECG signals are sensitive to various factors, such as physical activity,
medication, and emotional states, which can impact the accuracy and
consistency of the signals. Therefore, continued research and development
efforts are needed to address these limitations and further enhance the
feasibility and effectiveness of ECG-based identification systems

Magnetocardiography (MCG) is a noninvasive technique measuring the magnetic
flux densities produced by electrical currents generated by the cardiomyocytes
in the heart and the possible induced medium. MCG has been applied in medical
diagnosis (Kwon et al. 2010), and further research is required to use MCG
signals for identification purposes. MCG signals, which can be measured
without contact or even through clothing (Tolstrup et al. 2006), present a
potential physiological feature for an ID system. MCG has several advantages,
including higher fraud resistance, weaker environmental dependence, and
contactless measurement (Fenici and Melillo 1993), making it a promising
candidate for individual identification. We collect MCG signals with our self-
manufactured OPMs. Our OPMs are based on an original Bell-Bloom configuration
(Sun et al. 2021), which enables them to work in a normal room temperature
environment and in the presence of the Earth’s magnetic field. This sets our
MCG system apart from traditional MCG systems, which often require a cryogenic
environment with liquid helium or a near-zero magnetic field environment with
magnetic shielding. These improvements are necessary to make the practical
MCG-based ID system.

However, since the MCG signals are much weaker than the environmental magnetic
flux density, IFN and other high-frequency noises are significantly stronger
than the MCG signals. There are three steps in denoising. Since the MCG
signals of adjacent sampling points have physical relationships, the MCG
signals of different sampling points are combined into three-dimensional
matrices according to their positions as the data set for machine learning.

We use CNNs to classify individual MCG signals, making it a potential
physiological feature for an ID system. The accuracy of individual
identification is up to 97.04% by training the MCG data of five subjects under
different environmental magnetic flux densities.

## Ethical Clearance

The collection and use of biological data in this paper was subject to ethical
review under approval number IRB00001052-20120.

## Method and Algorithm

### MCG System

Our system (shown in Appendices Figure 2) has two Bell-Bloom OPMs as a
gradiometer to sense the cardiac magnetic field. It works at room temperature
and in natural magnetic environments. The magnetometers are self-constructed
and mounted in a 3D-printed structure with non-magnetic components such as
mirrors, polarizers, wave plates, prisms, etc. A cesium vapor cell is coated
with paraffin to increase the relaxation time of the coherent state of the
cesium atoms, with a 7 Hz magnetic-resonance linewidth. A circularly-polarized
pump laser is modulated on and off at the Larmor frequency with a duty cycle
of 20%, and a continuous linearly-polarized probe laser is used to detect the
atomic magnetic moment. The frequencies of both the pump and probe lasers are
actively stabilized.

### Data Collection

We record the magnetic flux density perpendicular to the body plane (z-axis)
of human subjects under environmental magnetic flux densities of 8,000 nT,
20,000 nT, 40,000 nT, 47,000 nT, 60,000 nT, and 80,000 nT. This simulates the
influence of the angle between the sensitive direction of the OPMs and the
direction of the geomagnetic field on the magnetic field data.

To capture the differences in MCG signals at different positions, we measure
the MCG signals at 49 different locations above the thorax, as shown in Figure
1. The projections of the magnetic field vectors on the z-axis are
significantly different at different positions (Maslennikov et al. 2012).

To optimize the quality of magnetocardiography (MCG) signals, we collected
both electrocardiogram (ECG) and finger pulse signals simultaneously with the
MCG signals. By comparing our MCG signal with other traditional cardiac
signals, we confirmed that our MCG signal accurately reflects the true signal
of the subject’s heart.

Our approach of collecting multiple cardiac signals during MCG recordings is
particularly effective in addressing the challenges associated with noise that
can impact MCG signal quality. By comparing the MCG signal with the ECG and
finger pulse signals, we were able to confirm the accuracy and reliability of
our MCG signal, thus providing a strong foundation for future research and
clinical applications.

To minimize the influence of factors such as gender, age, body type, disease,
and others, we measure four healthy male subjects with similar body sizes,
aged 23, 21, 20, and 17, as well as a 60-year-old healthy male subject. The
data collected from these subjects are added to our dataset.

Figure 1: The coordinates of all the points for the measurement. From Y1 to Y7
is aligned along the spine with adjacent rows 5 cm apart and row Y1 aligned
with the clavicle. From X1 to X7 is arranged perpendicular to the spine with a
distance of 5 cm between adjacent columns. The midpoint of the interval
between X3 and X4 is aligned with the intersection of the two clavicles. MCG
signals at 49 positions are obtained based on the $7\times 7$ measurement
matrix. The denoised MCG diagrams are placed on the corresponding coordinates
to show the cardiac magnetic field in front of the chest cavity. The box
represents the position relationship between different data channels when MCG
signals are converted into deep learning data sets.

### Data Processing

#### Denoising

The raw data collected from the MCG measurement has an amplitude of 3,000 pT.
The main source of noise is the 50 Hz industrial frequency and its related
frequencies, which we try to remove. To minimize the impact on the MCG signal,
we apply a 75 Hz low-pass filter and reduce the residual noise to about 40 pT.
To further reduce the impact of the industrial frequency noise, we add a sine
wave with adjustable parameters to the filtered data. The parameters of the
sine wave are optimized every 5 seconds to account for the unstable amplitude
and frequency of the industrial frequency noise.

Appendices Figure 3 shows an MCG waveform measured at the point (X4, Y4) in an
environmental magnetic field of 47,000 nT as an example. The frequency is
displayed in Hz, and the power spectral density is displayed in pT per square
Hz.The MCG waveform, not only contains the intrinsic body activity signal
generated by the electrical activity of the heart and other organs, but also
the related noise and the influences of the environmental magnetic field. The
denoised data is displayed in Figure 3 (a). The magnetic induction intensity
is displayed in pT and the time elapsed since the start of the measurement is
displayed in seconds. A positive value indicates the magnetic induction
intensity is pointing upwards relative to the thoracic plane, and a negative
value indicates it’s pointing downwards. The peak of the R-wave is about 20
pT, and the valley of the S-wave is about -5 pT. The power spectral density of
the denoised data is presented in Figure 3 (b). Although some high-frequency
noise still exists due to the industrial frequency noise being larger than the
intrinsic body activity signal, the intrinsic body activity signal becomes the
dominant component.

#### Time-frequency matrix

We apply the wavelet transform to convert the MCG signal waveform into time-
frequency matrices, with the wavelet basis function Symlet6 (Daamouche et al.
2012). This method is appropriate for extracting frequency domain information
without losing the time domain information.

In the machine learning process, it is common to classify biological
information by training 2D images of the time-frequency signals with a network
structure designed for image recognition (Kim, Kim, and Pan 2020).
Nevertheless, this method may not be able to extract information about the
correlation between the vertical components of the MCG signal. To overcome
this issue, we arrange the time-frequency matrices generated by wavelet
transform according to their relative positions, and treat each set of four
adjacent time-frequency matrices as one channel of data, as shown in Figure 1.
This approach makes it possible in practice to use a $2\times 2$ sensor array
placed anywhere in front of the chest cavity for individual identification.

We randomly select 2601 out of 3276 sets of experimental data as the training
dataset, and the remaining 675 sets as the testing dataset. The CNN structure
we applied in this paper is shown in Table 1.

Layers | Output size |
---|---|---
Convolution | 224×224 |
SE Layer | 224×224 |
Dense Block (1) | 224×224 | 1×1 conv, 3×3 conv
Transition Layer (1) | 112×112 | 2×2 ave pool
Dense Block (2) | 112×112 | 1×1 conv, 3×3 conv
Transition Layer (2) | 56×56 | 2×2 ave pool
Dense Block (3) | 56×56 | 1×1 conv, 3×3 conv
SE Layer | 56×56 |
Linear Layer |  | fully-connected
Table 1: The CNN structure applied in this paper. The DenseBlock is beneficial
for extracting insignificant features, and the SE-module can improve the
accuracy when the connection between different channels is meaningful. This
network structure has some advantages in this task compared to the classical
network structures.

## Result and Discussion

### Testing accuracy

The important criteria to measure the quality of classification models are
accuracy, precision, recall, and F1-score.

Firstly, we train that network structure with a double-classification job. The
testing result is shown in TABLE 2.

Pr Ac | A | B | Prcsn%
---|---|---|---
A | 149 | 0 | 100.0
B | 2 | 140 | 98.6
Rcll% | 98.7 | 100.0 |
Table 2:  The precision and recall of double-classification. The
identification result of two subjects indicates that the individual
information can be found in MCG signal. Ac: Actual, Pr: Predicted, Rcll:
Recall, Prscn:Precision.

The F1-score is 99.31%. By adjusting the classification threshold, we
determine the performance of the ID system under different usage requirements.
In the double-classification system, when the sensitivity is reduced to 98.5%,
the specificity can reach 99.8%. When the specificity is reduced to 97.9%, the
sensitivity can reach 100.0%. At different classification thresholds, the
values of 1-sensitivity and 1-specificity are shown in Appendices Figure 4.

Then we apply the same method for a multi-classification. The testing result
is shown in TABLE 3.

Table 3: The precision and recall of multi-classification. The identification result of five subjects is not as good as the result of two subjects. Nevertheless, the result still indicate that the individual identification based on MCG is feasible. Ac: Actual, Pr: Predicted, Rcll: Recall, Prscn:Precision. | Actual A | Actual B | Actual C | Actual D | Actual E | Total Precision |
---|---|---|---|---|---|---|---
Precision A | 173 | 0 | 1 | 2 | 3 | 179 | 96.65%
Precision B | 1 | 138 | 0 | 3 | 1 | 143 | 96.50%
Precision C | 0 | 0 | 30 | 0 | 0 | 30 | 100.00%
Precision D | 0 | 1 | 0 | 163 | 1 | 165 | 98.79%
Precision E | 5 | 0 | 1 | 1 | 151 | 158 | 95.57%
Total Recall | 179 | 139 | 32 | 169 | 156 | 675 |

As a result, we compute the macro F1-score of multi-classification. The macro
F1-score is 97.04%, which means it can classify individuals effectively.

### Robust

The important criteria to measure the quality of classification models are
accuracy, precision, recall, and F1-score. Since the experimental data
selected for this paper are obtained in a stable magnetic field environment,
it is necessary to verify the robustness of the experimental results. We
retest the performance of the module utilizing noisy data. The random noise
and Gaussian noise are added to the MCG signals (Phukpattaranont 2014; Wright
et al. 2008).

#### Random Noise

To more accurately represent the magnetic field noise that can arise when the
detector is in a non-stationary state, random noise is incorporated into the
wavelet-transformed time-frequency matrices. By incorporating this type of
noise, the signal processing algorithm can be evaluated under conditions that
better represent the complex and dynamic nature of real-world scenarios. In
order to examine the impact of different levels of noise on the accuracy of
the algorithm, a range of random noise intensities spanning from 0 to 10
$dB^{-1}$ is introduced into the signal. This range of intensities has been
selected to enable a systematic exploration of the algorithm’s performance
across a broad spectrum of noise levels. It is important to note that all of
the random noise added to the signal possesses the same standard deviation,
which ensures consistency across all levels of noise intensity.

#### Gaussian Noise

In order to better simulate the natural noise present in the Earth’s
geomagnetic field, Gaussian noise is incorporated into the wavelet-transformed
time-frequency matrices. This approach is employed in recognition of the fact
that the natural noise present in such fields can often have Gaussian
distributions. To enable a systematic and thorough investigation of the
influence of different levels of noise on the performance of the signal
processing algorithm, a range of Gaussian noise intensities spanning from 0 to
10 $dB^{-1}$ is added to the signal. It is worth noting that all the noise
introduced into the signal possesses the same standard deviation, as this
ensures the noise characteristics are consistent across all levels of noise
intensity. This standardized approach helps to minimize the potential for
confounding factors to impact the accuracy of the findings.

#### Robustness of MCD-ID system

With the previously trained model, we test the dataset with noise. The
relationship between the test accuracy and the signal-to-noise ratio (SNR) of
the noise added is shown in Figure 5.

The results of the robustness test demonstrate that our proposed
identification method is capable of successful operation when the level of
noise is significantly weaker than the MCG signal. Specifically, our findings
suggest that the identification method performs well in scenarios where the
level of noise is less than 2 $dB^{-1}$ relative to the MCG signal. It is
worth noting that in such scenarios, the classification method is able to
function effectively and accurately identify the underlying signals. However,
as the intensity of the noise increases beyond this threshold, the accuracy of
the classification method is significantly compromised. At noise levels
exceeding 2 $dB^{-1}$, the classification method is unable to accurately
distinguish between the signal and the noise, leading to a decrease in
performance.

### Discussion

The feasibility of using MCG signals to create an identification system has
been demonstrated, using data collected from subjects lying down and measured
with a fixed probe under a stable magnetic field. There are still some
problems. The results of the test in healthy men indicate that the MCG signals
can be utilized for individual identification. However, since it has proved
that the CNN architecture can identify heart disease (Attia et al. 2019),
there is a potential issue with the training method used in this paper, as it
could result in MCG information related to heart disease being recorded as
individual identification information, potentially leading to others with the
same heart disease being incorrectly identified. This could lead to others
with the same heart disease being mistakenly identified as the subject due to
their shared pathological characteristics. Therefore, the effects of heart
disease on the ID system need to be studied. In addition, the MCG signals of
subjects with pneumoconiosis may be significantly different from normal
subjects(Freedman, Robinson, and Johnston 1980). There is concern that
individuals with pneumoconiosis who live in extreme environments may not be
accurately identified using this system.

We collect the MCG signal from multiple points to standardize our data
collection. However, relying solely on the MCG ID system does not guarantee
that the data is obtained from these points. To implement this system
successfully, we need to test various data collection matrices, such as a
triangular matrix or a more complex matrix. The robustness test proposed in
this paper is only a preliminary assessment. To validate the performance of
this model in real-world scenarios, we must test it against other types of
noise as well.

## Conclusion

Our self-built MCG system has enabled us to achieve individual identification
without the need for a magnetically shielded room, even when operated at room
temperature, demonstrating its successful implementation. We have demonstrated
that MCG signals captured on a grid matrix placed in front of the human chest
can be used to identify individuals. We collected MCG data from five subjects,
comprising 3,276 3-second-long recordings, which were converted into
$240\times 240$ time-frequency matrices using wavelet transforms. By adjusting
the classification threshold to balance sensitivity and specificity, we
achieved an F1-score of 97.04% on the training dataset. Testing the model on a
separate dataset of 675 recordings yielded an accuracy rate of 97.03%.
Moreover, we confirmed that this model has reliable classification performance
even in the presence of noise levels similar to or less than the signal. Our
work not only provides a potential new method for individual recognition, but
also advances the application of MCG in everyday life.

## References

  * Attia et al. (2019) Attia, Z.; Noseworthy, P.; Lopez-Jimenez, F.; Asirvatham, S.; Deshmukh, A.; Gersh, B.; and et al. 2019\.  An artificial intelligence-enabled ECG algorithm for the identification of patients with atrial fibrillation during sinus rhythm: a retrospective analysis of outcome prediction.  _Lancet_ , 394: 861.
  * Batool and Tariq (2011) Batool, A.; and Tariq, A. 2011.  Computerized system for fingerprint identification for biometric security.  In _Proc. Multi. Conf._ , 102. Piscataway, NJ: IEEE.
  * Biel et al. (2001) Biel, L.; Pettersson, O.; L.Philipson; and P.Wide. 2001.  ECG analysis: a new approach in human identification.  _IEEE Trans. Instrum. Meas._ , 50: 808.
  * Byeon, Pan, and Kwak (2020) Byeon, Y.; Pan, S.; and Kwak, K. 2020.  Ensemble deep learning models for ECG-based biometrics.  In _Proc. Cybern. Informat._ , 1. Piscataway, NJ: IEEE.
  * Daamouche et al. (2012) Daamouche, A.; Hamami, L.; Alajlan, N.; and Melgani, F. 2012.  A wavelet optimization approach for ECG signal classification.  _Biomed. Signal Proces._ , 7: 342.
  * ElRahman (2019) ElRahman, S. 2019.  Biometric human recognition system based on ECG.  _Multimed Tools Appl._ , 78: 17555.
  * Fenici and Melillo (1993) Fenici, R.; and Melillo, G. 1993.  Magnetocardiography: ventricular arrhythmias.  _Eur. Heart J._ , 14: 53.
  * Freedman, Robinson, and Johnston (1980) Freedman, A.; Robinson, S.; and Johnston, R. 1980.  Non-invasive magnetopneumographic estimation of lung dust loads and distribution in bituminous coal workers.  _J. Occup. Med._ , 22: 613.
  * Israel et al. (2005) Israel, S.; Irvine, J.; Cheng, A.; Wiederhold, M.; and Wiederhold, B. 2005.  ECG to identify individuals.  _Pattern Recognit._ , 38: 133.
  * Kim, Kim, and Pan (2020) Kim, J.; Kim, S.; and Pan, S. 2020.  Personal recognition using convolutional neural network with ECG coupling image.  _J. Amb. Intel. Hum. Comp._ , 11: 1923.
  * Kwon et al. (2010) Kwon, H.; Kim, K.; Lee, Y.; Kim, J.; Yu, K.; Chung, N.; and Ko, Y. 2010.  Non-invasive magnetocardiography for the early diagnosis of coronary artery disease in patients presenting with acute chest pain.  _Circ. J._ , 74: 1424.
  * Maslennikov et al. (2012) Maslennikov, Y.; Primin, M.; Slobodchikov, V.; Khanin, V.; Nedayvoda, I.; Krymov, V.; and et al. 2012\.  The DC-SQUID-based magnetocardiographic systems for clinical use.  _Phys. Procedia_ , 36: 88.
  * Phukpattaranont (2014) Phukpattaranont, P. 2014.  Improvement of signal to noise ratio (SNR) in ECG signals based on dual-band continuous wavelet transform.  In _Proc. of the IEEE Conference on Computer Vision and Pattern Recognition_ , 1. Piscataway, NJ: IEEE.
  * Su et al. (2019) Su, K.; Yang, G.; Wu, B.; Yang, L.; Li, D.; Su, P.; and Yin, Y. 2019.  Human identification using finger vein and ECG signals.  _Neurocomputing_ , 332: 111.
  * Sun et al. (2021) Sun, C.; Xiao, W.; Ding, Y.; Zhang, R.; Wu, T.; Peng, X.; and et al. 2021\.  Recording the Distribution of Cardiac Magnetic Fields in Unshielded Earth’s Field.  In _Joint Conference of the European Frequency and Time Forum and IEEE International Frequency Control Symposium_ , 1. Piscataway, NJ: IEEE.
  * Tolstrup et al. (2006) Tolstrup, K.; Madsen, B.; Ruiz, J.; Greenwood, S.; Camacho, J.; Siegel, R.; and et al. 2006\.  Non-invasive resting magnetocardiographic imaging for the rapid detection of ischemia in subjects presenting with chest pain.  _Cardiology_ , 106: 270.
  * Wright et al. (2008) Wright, J.; Yang, A.; Ganesh, A.; Sastry, S.; and Ma, Y. 2008.  Robust face recognition via sparse representation.  _IEEE T. Pattern Anal._ , 31: 210.

## Appendices

Figure 2: The photograph and schematic diagram of our MCG system. It consists
of two Bell-Bloom OPMs as a gradiometer and a set of two-layer 3D Helmholtz
coils. The gradiometer is applied to sense the cardiac magnetic field, at room
temperature and in natural magnetic environments. The coils adjusts the
direction and strength of the bias magnetic field and keeps the magnetic field
around the vapor cell to a setpoint. Figure 3:  MCG signal was measured at the
point (X4, Y4) in an environmental magnetic field of 47000 nT. Since the IFN
is significantly larger than the intrinsic body activity signal, some high-
frequency noise still exists in the MCG signal after filtering. (a) About 2
seconds of MCG signal after denoising. We present the magnetic induction
intensity obtained by the probe in pT, and the time elapsed since the
measurement began in second, respectively. A positive value and a negative
value indicate that the direction of the magnetic induction intensity is
perpendicular to the thoracic plane upward and downward, respectively. The
peak of the R-wave is about 20 pT, and the peak of the S-wave is about -5 pT.
(b) The power spectral density of MCG data after denoising, power spectral
density is frequency. IFN still has an effect, but the intrinsic body activity
signal is the major component. We present the frequency in Hz and the power
spectral density corresponding to the frequency in pT over square Hz,
respectively. Figure 4: The sensitivity curve in double-classification.
Changing the classification threshold resulted in a less difference in
accuracy, indicating that most of the test data sets are significantly
classified. Figure 5: The performance of the trained module in classification
when two types of noise are added simultaneously. We present the Gaussian
noise intensity and the random noise intensity, respectively. The intensity of
noise is defined as the bottom of the SNR. The real line and the dashed line
represent the maximum acceptable noise threshold when the requirement for
recognition accuracy is above 95% and 85%, respectively. The model is more
robust to the Gaussian noise following a normal distribution than the random
noise.