FAME : Flexible, Scalable Analogy Mappings Engine (2023)

Abstract: Analogy is one of the core capacities of human cognition; when faced with new situations, we often transfer prior experience from other domains. Most work on computational analogy relies heavily on complex, manually crafted input. In this work, we relax the input requirements, requiring only names of entities to be mapped. We automatically extract commonsense representations and use them to identify a mapping between the entities. Unlike previous works, our framework can handle partial analogies and suggest new entities to be added. Moreover, our method’s output is easily interpretable, allowing for users to understand why a specific mapping was chosen. Experiments show that our model correctly maps 81.2% of classical 2x2 analogy problems (guess level=50%). On larger problems, it achieves 77.8% accuracy (mean guess level=13.1%). In another experiment, we show our algorithm outperforms human performance, and the automatic suggestions of new entities resemble those suggested by humans. We hope this work will advance computational analogy by paving the way to more flexible, realistic input requirements, with broader applicability.

## introduction one of the pinnacles of human cognition is the ability to find parallels across distant domains and transfer ideas between them. this analogous reasoning process enables us to learn new information faster and solve problems based on prior experience @xcite @xcite . the most seminal work in computational analogy is gentner's structure mapping theory (smt) @xcite and its implementation, structure mapping engine (sme) @xcite . in a nutshell, smt assumes input from two domains: base and target. it maps between objects in a base domain and objects in a target domain according to common relational structure, rather than on object attributes. for example, consider the rutherford model of the hydrogen atom, where the atom was explained in terms of the (better-understood) solar system @xcite : a planet revolving around the sun is mapped to an electron revolving around the nucleus. the mapping is due to shared relations between objects (revolving around, being attracted to), not object attributes (round, small). one of the main criticisms brought against sme and its follow-up work is their need for extensive hand-coded input -structured representations of both the entities and their relations (see figure 1 for the input to the atom/solar system mapping). chalmers et al. @xcite argued that too much human creativity is required to construct this input, and the analogy is already effectively given in the representations: "a brief examination @xcite shows that the discovery of the similar structure in these representations is not a difficult task. the representations have been set up in such a way that the common structure is immediately apparent. even for a computer program, the extraction of such common structure is relatively straightforward." some follow-up works avoid hand-coding lisplike representations, generating them from sketches @xcite , qualitative simulators (dehghani @xcite , etc. however, they still require much knowledge engineering, and thus are hard to scale. nowadays, when the web is full of information about potential domains to transfer ideas from @xcite , such representations do not tap into the potential of web-scale analogies for augmenting human creativity. the method with the simplest input we are aware of is latent relation mapping engine (lrme) @xcite , which requires only two lists of entities to be mapped. given two entities, they search for phrases containing both in a large corpus and use them to generate simple patterns. for example, "a sun-centered solar system illustrates" gives rise to patterns such as "a x * y illustrates". however, such patterns are extremely simple and brittle, and lrme requires exact string matches between the domains (so "revolve around" is different from "rotate around"). in this work, we develop fame, a flexible analogy mapping engine. fame's input requirements are minimal, requiring only two sets of entities. we apply state-of-the-art nlp and ir techniques to automatically infer commonsense relations between the entities using a variety of data sources, and construct a mapping between the domains. importantly, we do not require identical phrasings of relations. moreover, our output is interpretable, showing how the mapping was chosen. unlike previous works, we drop the strong bijectivity assumption and let the algorithm decide which entities to include in the mapping. meaning, we allow for entities to remain unmapped. our algorithm can also generate new suggestions for the non-mapped entities. this paves the road to algorithms that can handle even more limited input -for example, using domain names (solar system, atom) as input, or just a single mapped entity pairs (e.g., turn white blood cells into policemen and see how the analogy unfolds). our contributions are: ## problem definition an analogy is a mapping from a base domain b into a target domain t . the mapping is based on relations, and not object attributes. base objects are not mapped into objects that resemble them; rather, there is a common relational structure, and they are mapped to objects that play similar roles. we follow the formulation of @xcite , brought here for completeness: entities and relations. let @xmath0, ..., b n } and @xmath1, ..., t m } be two sets of entities. for example: @xmath2, earth, gravity, solar system, newton}, @xmath3, electrons, electricity, atom, faraday}. let r be a set of relations. a relation is a set of ordered entity pairs with some meaning. the exact representation is purposely vague, as we do not restrict ourselves to strings, embeddings, etc. intuitively, relations should capture notions like "revolve around". in our example, relations between b and t include the earth revolve around the sun, like electrons orbit the nucleus; the earth creates a force field of gravity, similar to electrons creating electric force fields; the sun and the earth are part of b mapping t @xmath4: illustration of a relational analogy between the solar system and the atom. the solar system, as the nucleus and electrons are part of the atom; newton discovered gravity, as faraday is credited with discovering electric force. note that relation is an asymmetric function, as the pairs are ordered; e.g., newton discovered gravity, but gravity did not discover newton. slightly abusing notation, we denote the set of relations that hold between two entities e 1 , e 2 as r(e 1 , e 2 ) ⊆ 2 r . for example, r(earth, sun) contains {revolve around, attracted to}, etc. for clarity, we sometimes use r b , r t to emphasize that the entities belong to the b, t domain. similarity. let sim be a similarity metric between two sets of relations, sim : 2 r × 2 @xmath5, ∞). intuitively, when applied to singletons, we want our similarity metric to capture how relations are like each other. for example, "revolve around" is similar to "orbit" and (to a lesser degree) "spiral". when applied to sets of relations, we want sim to be higher if the two sets share many distinct relations. for example, {revolve around, attracted to} should be more similar to {orbit, drawn into} than to {revolve around, orbit} (as the last set does not include any relation similar to attraction). in section 3.2 we present our sim implementation. given one pair from b and one from t , we define similarity in terms of their relations. since r is asymmetric, we consider both directions: objective. our goal is to output a mapping m : @xmath6. mapping into ⊥ means the entity was not mapped to any entity in the t domain. we look for the mapping m * that captures the best inter-domain analogical structure similarity by maximizing the relational similarity: note: if b i or b j maps to ⊥, sim * is defined to be 0. ## analogous matching algorithm we wish to find the best mapping from b to t . we first extract relations between entity pairs from the same domain (section 3.1). then, we compute similarity between entity pairs that could be mapped (section 3.2). finally, we build the mapping (section 3.3). ## entity suggestion one of the main limitations of previous analogical mapping algorithms is their inability to automatically expand analogies. this is especially interesting in our case, as we allow for unmapped entities; thus, suggesting new entities could identify potential mapping candidates for the unmapped entities. for example, let @xmath7, earth, gravity, new-ton} and @xmath8, electron, electricity}. the correct mapping is @xmath9, @xmath10, @xmath11, leaving newton with no mapping. our goal is to suggest candidate entities that preserve the relational structure. intuitively, we look at the relations newton shares with other b entities (e.g., discovered gravity), and try to see which t entity plays a corresponding role (i.e., who discovered electricity?). more formally, suppose we wish to find candidates t * for mapping to b n . we first extract the relations of r b (b i , b n ), ∀@xmath12. we then iterate over all relations @xmath13, r} to extract suggestions for t * . we use open information extraction, quasimodo, and quasimodo++. while our method was previously used to extract relations given a pair of two entities, we now use it to extract entities given a pair of {entity, relation}. this entails filtering on the predicate field in our commonsense datasets and changing the queries in quasimodo++. as suggestions tend to be noisy, we cluster all extracted entities (similarly to the clustering from section 3.2). we remove clusters of @xmath14. for each suggestion cluster, we rerun our analogous matching algorithm with a representative entity from that cluster (the closest to the cluster's center of mass). we pick the cluster whose representative resulted in the mapping with the highest score. as the commonsense datasets we work with operate mostly on string matching, small changes (e.g., benjamin franklin/ben franklin) could sometimes result in slightly different results. thus, we perform one final round, with all entities from our chosen cluster, and pick the highest score mapping. ## evaluation in this section, we evaluate fame. we test its ability to identify the correct mapping (section 5.1), and compared it to both related works (section 5.2) and human performance (section 5.3). ## related work computational analogy-making dates back to the 1960s @xcite . analogymaking approaches are broadly categorized as symbolic, connectionist, and hybrid @xcite @xcite . symbolic approaches usually represent input as structured sets of logic statements. our work falls under this branch, as well as sme @xcite and its follow-up work. lrme @xcite is the closest to our work, as it automatically extracts the relations. unlike fame, lrme requires exact matches of relations across different domains. we also focus on nouns only, making the problem harder, and relax the bijection assumption, allowing for automatically extending analogies. nlp. analogy-making received relatively little attention in nlp. the best-known task is word analogies, often used to measure embeddings' quality (inspired by word2vec's "king -man + @xmath15. follow-up work explored embeddings' linear algebraic structure @xcite @xcite or compositional nature @xcite , neglecting relational similarity. a recent work on analogies between procedural texts @xcite did study relational similarity, but extracted the relations from the input texts, with no commonsense augmentations. recently, there have been efforts to study lms' analogical capabilities @xcite . findings indicate they struggle with abstract and complex relations and results depend strongly on lm's architecture and parameters. @xcite combined nlp and crowds for product analogies without explicitly modeling entities and relations, but instead automatically extracting schemas of the product. ## conclusions and future work detecting deep structural similarity across distant domains and transferring ideas between them is central to human thinking. we presented fame, a novel method for analogy making. compared to previous works, fame is more expressive, scal-able, robust and interpretable. it also allows partial matches and automatic entity suggestions to extend the analogies. fame correctly maps 81.2% of classical 2x2 analogy problems. on larger problems, it achieves 77.8% perfect mappings (mean guess @xmath16.1%). fame also outperforms humans in solving analogy mapping problems (90% vs. 70.2%). interestingly, our automatic suggestions of new entities resemble those suggested by humans. in future work, we plan to improve coverage and extend our framework to more than just binary relations, as sometimes the key to an analogy is a relation involving more than two objects. in addition, we plan to improve our similarity measure, to address both context (to solve ambiguity) and the difference between active and passive relations. we plan to explore different forms of input, such as algorithms that take as input very partial domains, perhaps even just domain names (e.g., solar system, atom) and populate the domains with entities, or algorithms incorporating user feedback. to conclude, we hope fame will pave the way for analogy-making algorithms that require lessrestrictive inputs and can scale up and tap into the vast amount of potential inspiration the web offers, augmenting human creativity.