objects from a base domain
B
into a target domain
T
that is based on a common relational structure,
rather than object attributes. In our setup, the input
is two procedural texts describing a situation or a
process, expressed in natural language.
Entities.
First, we need to extract entities from the
texts. Let
B
=
{b1, ..., bn}
and
T
=
{t1, ..., tm}
be
the entities in the base and the target, respectively.
In our setting, entities are noun phrases. For ex-
ample, in the animal cell (Figure 1), some entities
include plasma membrane, animal cell, nucleus,
energy, mitochondria, proteins, ribosomes.
Relations.
Let
R
be a set of relations. A relation is
a set of ordered entity pairs. In this work, we focus
on verbs from the input text, but other formulations
are possible. Intuitively, relations should capture
that the mitochondria provides energy to the cell
(in
B
), just like electrical generators provide energy
to the factory (in
T
). Slightly abusing notation,
let
R(e1, e2)⊆2R
be the set of relations between
e1
and
e2
. For example,
R(cell, proteins)
con-
tains {synthesize, use, move}. Note that
R
is an
asymmetric function, as the order matters.
Similarity.
Let sim be a similarity metric between
two sets of relations,
sim : 2R×2R→[0,∞)
.
Intuitively, we want similarity to be high if the two
sets share many distinct relations. For example,
{provide, destroy}, should be more similar to {sup-
ply, ruin} than to {destroy, ruin} as the last set does
not include any relation similar to provide. Given
a pair of entities
bi, bj∈ B
and a pair of entities
tk, tl∈ T
, we define a similarity function mea-
suring how similar these pairs are, in terms of the
relations between them. Since sim is asymmetric,
we consider both possible orderings:
sim∗(bi, bj, tk,tl) = sim(R(bi, bj),R(tk, tl))
+sim(R(bj, bi),R(tl, tk)) (1)
Objective.
Our goal is to find a mapping function
M:B → T ∪ ⊥
that maps entities from base
to target. Mapping into
⊥
means the entity was
not mapped. The mapping should be consistent –
no two base entities can be mapped to the same
entity. We look for a mapping that maximizes the
relational similarity between mapped pairs:
M∗= arg max
MX
j∈[1,n−1]
i∈[j+1,n]
sim∗(bj, bi,M(bj),M(bi))
If bior bjmaps to ⊥,sim∗is defined to be 0.
3 Analogous Matching Algorithm
Our goal in this section is to find the best map-
ping between
B
and
T
. Our algorithm consists of
four phases: we begin with a basic
text processing
(Section 3.1). Then, we
extract potential entities
and relations
(Section 3.2). Since entities can be
referred to in multiple ways, we next
cluster
the
entities (Section 3.3). Finally, we find a
mapping
between clusters from Band T(Section 3.4).
We note that our goal in this paper is to present a
new task and find a reasonable model for it; many
other architectures and design choices are possible
and could be explored in future work.
3.1 Text Processing
We begin by chunking the sentences in the input.
As our next step is structure extraction, we first
want to resolve pronouns. We apply a lightweight
co-reference model (Kirstain et al.,2021) which
generates clusters of strings (e.g, the plasma mem-
brane,plasma membrane,it) and replace all pro-
nouns by a representative from their cluster – the
shortest string which is not a pronoun or a verb.
3.2 Structure Extraction
Analogy is based on relational similarity; thus, we
now extract relations from the text. This naturally
falls under Semantic Role Labeling (SRL) (Gildea
and Jurafsky,2002) – identifying the underlying
relationship that words have with the main verb in
a clause. In particular, we chose to use QA-SRL
(FitzGerald et al.,2018). This model receives a
sentence as input and outputs questions and an-
swers about the sentence. See Table 1for example
questions and answers. Intuitively, the spans identi-
fied by QA-SRL as answers form the entities, and
similar questions that appear in both domains (e.g.,
“what provides something?”) indicate that the two
entities (mitochondria, generators) may play simi-
lar roles.
We chose to use QA-SRL since it allows the
questions themselves to define the set of roles, with
no predefined frame or thematic role ontologies.
Recent studies show that QA-SRL achieves 90%
coverage of PropBank arguments, while capturing
much implicit information that is often missed by
traditional SRL schemes (Roit et al.,2020).
We focus on questions likely to capture useful
relations for our task. We filter out “When” and
“Why” questions, “Be” verbs, and questions and
answers with a low probability (see Appendix A).