Life is a Circus and We are the Clowns: Automatically Finding Analogies between Situations and Processes (2022)

Abstract: Analogy-making gives rise to reasoning, abstraction, flexible categorization and counterfactual inference – abilities lacking in even the best AI systems today. Much research has suggested that analogies are key to non-brittle systems that can adapt to new domains. Despite their importance, analogies received little attention in the NLP community, with most research focusing on simple word analogies. Work that tackled more complex analogies relied heavily on manually constructed, hard-to-scale input representations.In this work, we explore a more realistic, challenging setup: our input is a pair of natural language procedural texts, describing a situation or a process (e.g., how the heart works/how a pump works). Our goal is to automatically extract entities and their relations from the text and find a mapping between the different domains based on relational similarity (e.g., blood is mapped to water). We develop an interpretable, scalable algorithm and demonstrate that it identifies the correct mappings 87% of the time for procedural texts and 94% for stories from cognitive-psychology literature. We show it can extract analogies from a large dataset of procedural texts, achieving 79% precision (analogy prevalence in data: 3%). Lastly, we demonstrate that our algorithm is robust to paraphrasing the input texts

## introduction the ability to find parallels across diverse domains and transfer ideas across them is one of the pinnacles of human cognition. the analogous reasoning process allows us to abstract information, form flexible concepts and solve problems based on our previous experience @xcite @xcite -abilities that current ai systems still lack. many researchers have suggested that analogy-making is essential for engineering non-brittle ai that can robustly generalize and adapt to diverse domains @xcite . surprisingly, despite analogy's important role in the way humans understand language, the problem of recognizing analogies has received relatively little attention in nlp. most works have focused on sat-type of analogies ("a to b is like c to d"), with recent works @xcite @xcite showing that models still struggle with abstract, loosely defined relations. in this work, we focus on a different type of analogies: analogies between situations or processes. here the input is two domains (e.g., heart and pump) and the goal is to map objects from the base domain to objects from the target domain. importantly, the mapping should rely on a common relational structure rather than object attributes, making it challenging for nlp methods. the most influential work in this line of research is structure mapping theory (smt) @xcite . in smt and much of its follow-up work @xcite @xcite , domain descriptions are sets of statements in a highly structured language, e.g., @xcite ,cause(greater(pressure(water), pressure(pipe)),flow(water,pipe))) many have argued that too much human creativity is required to construct these inputs, and the analogy is already expressed in them @xcite . they are also brittle and hard-to-scale. in our work, we explore a more realistic, challenging setup. our input is a pair of two procedural texts, describing a situation or a process, expressed in natural language. we develop an algorithm to automatically extract entities and their relations from the text and find a mapping between the different domains based on relational similarity. for example, the two texts in figure 1 explain the animal cell to students through an analogy to a fac-figure 1 : a+b: example input -two analogous texts, describing the animal cell (base) and factory (target), adapted from @xcite . c: our algorithm's output. the nodes are entities (clusters of text spans; for the sake of presentation, we show up to two spans per cluster). edge width represents similarity between entities in terms of the roles they play in the text. for example, the boxes on the left illustrate the similar roles associated with the red and the pink entities. all the mappings our algorithm found are correct, but two are missing (ribosomes/machines and endoplasmic reticulum/hallways). showing the mapping along with its justification (the similar roles) renders our output easy to interpret. figure 1c shows our algorithm's output. nodes are entities (clusters of text spans -mostly correct, except for "factory activities"), and edge width represents similarity in terms of roles entities play. for example, the boxes on the left illustrate the similar roles associated with the red and the pink entities (represented as questions), showing that "plasma membrane" and "security guards" share one role (control something), and "cell" and "factory" share three. importantly, including the justification as part of the output renders our algorithm interpretable. we note that all the mappings our algorithm found are correct, but two are missing (ribosomes/machines and endoplasmic reticulum/hallways). our contributions are: ## problem formulation our framework is based on gentner's structure mapping theory (smt) @xcite . the central idea of smt is that an analogy is a mapping of 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 @xmath0, ..., b n } and @xmath1, ..., t m } be the entities in the base and the target, respectively. in our setting, entities are noun phrases. for example, 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(e 1 , e 2 ) ⊆ 2 r be the set of relations between e 1 and e 2 . for example, r(cell, proteins) contains {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 : 2 r × 2 @xmath2, ∞). intuitively, we want similarity to be high if the two sets share many distinct relations. for example, {provide, destroy}, should be more similar to {supply, ruin} than to {destroy, ruin} as the last set does not include any relation similar to provide. given a pair of entities b i , b @xmath3, t @xmath4, we define a similarity function measuring how similar these pairs are, in terms of the relations between them. since sim is asymmetric, we consider both possible orderings: objective. our goal is to find a mapping function m : @xmath5. mapping into ⊥ means the entity was not mapped. the mapping should be consistentno two base entities can be mapped to the same entity. we look for a mapping that maximizes the relational similarity between mapped pairs: if b i or b j maps to ⊥, sim * is defined to be 0. ## analogous matching algorithm our goal in this section is to find the best mapping 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 b and 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. ## experiments our research questions are as follows: we chose to test our ideas on the propara dataset @xcite of crowdsourced paragraphs describing processes. prompts (e.g., "what happens during photosynthesis?") were given to 1-6 workers each. we used the propara training set (390 paragraphs). see appendix d.1 for two example paragraphs and our algorithm's mapping. experiments run from a laptop. runtime is few seconds for a pair of paragraphs on average. ## conclusions and future work analogies can facilitate learning and problemsolving, helping people apply their prior experience to new situations. much research has suggested that analogy-making is necessary for ai systems to robustly generalize and adapt to new contexts. in this work we explored a complex, challenging analogy-finding setting: our input is a pair of natural language procedural texts, describing a situation or a process. we presented a novel, scalable and interpretable method to extract entities and relations from the text and find a mapping between entities across the domains. we show that our method successfully identifies the correct mappings between the domains for both procedural texts from propara, and stories from cognitive-psychology literature. we demonstrate our method can be used to mine analogies from propara, including far, non-trivial analogies. lastly, we show that our method is robust to paraphrases the input texts. in the future, we plan to improve our relation extraction and augment the text with commonsense knowledge to account for relations that do not appear explicitly in the text. we also plan to extend our algorithm to take the order of actions into account, and to apply our method to new domains, such as legal texts and recipes. two particularly interesting applications are (1) education, where analogies can help a teacher explain a complex concept, and (2) computer-assisted creativity, where engineers and designers could find inspiration in distant domains.