Yan Li , Yao Wang , Zhaojie Wang , Wei Wang , Bailing Wang , Guodong Xin
{"title":"基于交互注意和对比学习的小镜头关系提取","authors":"Yan Li , Yao Wang , Zhaojie Wang , Wei Wang , Bailing Wang , Guodong Xin","doi":"10.1016/j.neucom.2025.131551","DOIUrl":null,"url":null,"abstract":"<div><div>Relation extraction is a critical task in natural language processing, often challenged by the problem of insufficient samples in real world scenarios. Therefore, studying few-shot relation extraction is of great significance. Currently, prototype networks and meta-learning-based parameter optimization are the mainstream methods to study this kind of problem. However, these methods still face sample confusion during classification, and the trained models are prone to overfitting. To solve these problems, this paper proposes a few-shot relation extraction method based on interactive attention. During the model training stage, we introduce two contrastive learning approaches to better capture sample features and reduce sample confusion. Contrastive learning strengthens the connections between instances and their corresponding relationship descriptions, thus improving relation extraction. In the testing phase, the model employs an attention mechanism to calculate the attention scores between the query set and the support set and employs a new classification layer to mitigate overfitting. We conducted experiments on two real-world few-shot relation extraction datasets, and the results demonstrate that our method achieved superior performance on both in-domain and cross-domain datasets, proving the effectiveness of the proposed approach. The code is available at <span><span>https://github.com/xyzew/IACL.git</span><svg><path></path></svg></span>.</div></div>","PeriodicalId":19268,"journal":{"name":"Neurocomputing","volume":"658 ","pages":"Article 131551"},"PeriodicalIF":6.5000,"publicationDate":"2025-09-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Interactive attention and contrastive learning for few-shot relation extraction\",\"authors\":\"Yan Li , Yao Wang , Zhaojie Wang , Wei Wang , Bailing Wang , Guodong Xin\",\"doi\":\"10.1016/j.neucom.2025.131551\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Relation extraction is a critical task in natural language processing, often challenged by the problem of insufficient samples in real world scenarios. Therefore, studying few-shot relation extraction is of great significance. Currently, prototype networks and meta-learning-based parameter optimization are the mainstream methods to study this kind of problem. However, these methods still face sample confusion during classification, and the trained models are prone to overfitting. To solve these problems, this paper proposes a few-shot relation extraction method based on interactive attention. During the model training stage, we introduce two contrastive learning approaches to better capture sample features and reduce sample confusion. Contrastive learning strengthens the connections between instances and their corresponding relationship descriptions, thus improving relation extraction. In the testing phase, the model employs an attention mechanism to calculate the attention scores between the query set and the support set and employs a new classification layer to mitigate overfitting. We conducted experiments on two real-world few-shot relation extraction datasets, and the results demonstrate that our method achieved superior performance on both in-domain and cross-domain datasets, proving the effectiveness of the proposed approach. The code is available at <span><span>https://github.com/xyzew/IACL.git</span><svg><path></path></svg></span>.</div></div>\",\"PeriodicalId\":19268,\"journal\":{\"name\":\"Neurocomputing\",\"volume\":\"658 \",\"pages\":\"Article 131551\"},\"PeriodicalIF\":6.5000,\"publicationDate\":\"2025-09-26\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Neurocomputing\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0925231225022234\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Neurocomputing","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0925231225022234","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
Interactive attention and contrastive learning for few-shot relation extraction
Relation extraction is a critical task in natural language processing, often challenged by the problem of insufficient samples in real world scenarios. Therefore, studying few-shot relation extraction is of great significance. Currently, prototype networks and meta-learning-based parameter optimization are the mainstream methods to study this kind of problem. However, these methods still face sample confusion during classification, and the trained models are prone to overfitting. To solve these problems, this paper proposes a few-shot relation extraction method based on interactive attention. During the model training stage, we introduce two contrastive learning approaches to better capture sample features and reduce sample confusion. Contrastive learning strengthens the connections between instances and their corresponding relationship descriptions, thus improving relation extraction. In the testing phase, the model employs an attention mechanism to calculate the attention scores between the query set and the support set and employs a new classification layer to mitigate overfitting. We conducted experiments on two real-world few-shot relation extraction datasets, and the results demonstrate that our method achieved superior performance on both in-domain and cross-domain datasets, proving the effectiveness of the proposed approach. The code is available at https://github.com/xyzew/IACL.git.
期刊介绍:
Neurocomputing publishes articles describing recent fundamental contributions in the field of neurocomputing. Neurocomputing theory, practice and applications are the essential topics being covered.