24 Jun 2024 | Ying Mo, Jiahao Liu, Jian Yang, Qifan Wang, Shun Zhang, Jinggang Wang, Zhoujun Li
C-ICL: Contrastive In-context Learning for Information Extraction
This paper introduces C-ICL, a novel few-shot learning method for information extraction (IE) that leverages both correct (positive) and incorrect (negative) examples to enhance the learning process of large language models (LLMs). Unlike previous methods that focus only on positive examples, C-ICL incorporates negative examples to improve the model's ability to extract entities and relations by exposing it to a broader range of scenarios, including typical mistakes. The method uses contrastive samples, which include both correct and incorrect examples, to create in-context learning demonstrations. These demonstrations are designed to help the model identify and correct potential interface errors. The approach involves selecting hard negative samples based on semantic similarity and using self-consistency to rank them. The method is tested on various datasets and shows significant improvements in performance compared to previous few-shot in-context learning methods. The experiments demonstrate that C-ICL outperforms existing methods in tasks such as named entity recognition (NER) and relation extraction (RE), achieving higher accuracy and F1 scores. The method also incorporates type instructions and code-style prompts to enhance the model's ability to extract information. The results show that C-ICL is effective in a variety of scenarios and can be applied to different domains. The paper also discusses the limitations of the method, including the need for further research on other IE tasks and the potential for alternative strategies in sample selection. Overall, C-ICL provides a new approach to few-shot information extraction that improves the performance of LLMs in extracting entities and relations.C-ICL: Contrastive In-context Learning for Information Extraction
This paper introduces C-ICL, a novel few-shot learning method for information extraction (IE) that leverages both correct (positive) and incorrect (negative) examples to enhance the learning process of large language models (LLMs). Unlike previous methods that focus only on positive examples, C-ICL incorporates negative examples to improve the model's ability to extract entities and relations by exposing it to a broader range of scenarios, including typical mistakes. The method uses contrastive samples, which include both correct and incorrect examples, to create in-context learning demonstrations. These demonstrations are designed to help the model identify and correct potential interface errors. The approach involves selecting hard negative samples based on semantic similarity and using self-consistency to rank them. The method is tested on various datasets and shows significant improvements in performance compared to previous few-shot in-context learning methods. The experiments demonstrate that C-ICL outperforms existing methods in tasks such as named entity recognition (NER) and relation extraction (RE), achieving higher accuracy and F1 scores. The method also incorporates type instructions and code-style prompts to enhance the model's ability to extract information. The results show that C-ICL is effective in a variety of scenarios and can be applied to different domains. The paper also discusses the limitations of the method, including the need for further research on other IE tasks and the potential for alternative strategies in sample selection. Overall, C-ICL provides a new approach to few-shot information extraction that improves the performance of LLMs in extracting entities and relations.