AMR - RE : A bstract M eaning R epresentations for Retrieval-Based In-Context Learning in Relation Extraction (2025)

Abstract: Existing in-context learning (ICL) methods for relation extraction (RE) often prioritize language similarity over structural similarity, which may result in overlooking entity relationships. We propose an AMR-enhanced retrieval-based ICL method for RE to address this issue. Our model retrieves in-context examples based on semantic structure similarity between task inputs and training samples. We conducted experiments in the supervised setting on four standard English RE datasets. The results show that our method achieves state-of-the-art performance on three datasets and competitive results on the fourth. Furthermore, our method outperforms baselines by a large margin across all datasets in the more demanding unsupervised setting.

## introduction large language models (llms) exhibit strong incontext learning (icl) abilities across various nlp tasks simply by being given a few examples of the task. however, the quality of few-shot demonstrations can substantially impact the performance of icl, and tasks requiring high precision, such as relation extraction, remain challenging. relation extraction (re) is a task to identify a predefined semantic relation between entity pairs mentioned in the context. relations between entity pairs are often implicitly expressed, which can lead to suboptimal icl performance. existing icl methods for re often overlook the semantic associations between entity pairs, relying primarily on entity mentions or overall sentence semantics for representation @xcite @xcite @xcite . abstract meaning representation (amr) @xcite provides a detailed semantic graph structure that represents semantics through nodes and edges, where nodes correspond to semantic elements such as events, entities and argu-ments, and edges indicate the relationships between them. amr graphs offer precise descriptions of entities by incorporating their arguments and semantic roles, making them well suited for the re task @xcite @xcite . as shown in figure 1 , the input sentence, "... get great joy from eating ...", is parsed into a semantic graph, where the node "source" connects to two entity nodes ("joy" and "eat-01"). this structure explicitly represents the cause-effect relation between these two arguments, illustrating how semantic graphs can capture underlying relational meanings beyond surface text. to bridge the contextual gap caused by missing semantic structure, we propose amr-re, an amrenhanced retrieval-based icl method that leverages amr graphs to select in-context examples based on semantic structure similarity. evaluations on four english re datasets show that our method surpasses state-of-the-art methods on three datasets with the supervised amr-based retriever (section 4.1). to comprehensively assess our approach, we further evaluate amr-re in the more challenging unsupervised setting. our simple yet effective architecture (section 4.2) consistently achieves higher f1 scores compared to sentence embeddingbased icl baselines. ## the amr-re model this section gives an overview of our amr-re method (figure 1 ). given an input text, amr-re first generates its amr graph using an off-theshelf amr parser. a self-supervised graph model then encodes this graph to obtain the graph embeddings. these embeddings are then used to retrieve knn examples from the training set for icl @xcite . our method leverages the shortest path between two entities for retrieving re demonstrations, as it aligns with the core objective (supplying semantic structure) of the re task. ## amr-based demonstration retrieval in this section, we introduce two settings for incorporating amr graph information to retrieve icl demonstrations. first, we present the supervised setting, where amr-re benefits from both graph and sentence re representations (section 4.1). to further evaluate the effectiveness of our method, we assess amr-re under the more challenging unsupervised setting (section 4.2). amr-re retrieves in-context examples by knn retrieval from the training set using the relation representation r rel (section 4.3). ## ablation study ## case study to demonstrate how semantic structure similarity enables the retrieval of highly relevant demonstrations and surpasses sentence-based baselines on re icl, we present two representative case studies in the unsupervised setting. figure 3 illustrates that our proposed amr enhanced retrieval method effectively captures both the similarity of event structure and the semantics of the entities. this shows that demonstrations with high semantic structure similarity serve as more suitable and informative re demonstrations for icl. figure 4 highlights the effectiveness of amr-re. our proposed method successfully retrieves few-shot re demonstrations with semantically equivalent entities (e.g., "protocol"-"contract", "negotiations"-"talks"), while also capturing implicit relational connections. it demonstrates amr-re's ability to align both explicit and implicit semantic information for improved relation extraction. in contrast, the sentence-based retrieval method fails to model such information. ## conclusions we proposed amr-re, an amr-enhanced retrieval-based icl method that uses amr graphs to select demonstrations based on semantic structure similarity. evaluations on four english re datasets show that amr-re outperforms the baselines. this underscores the effectiveness of combining graph learning with llms for relation extraction. our experiments further demonstrate that amr graph information can lead to more accurate and robust relation extraction, even in unsupervised settings.