Add Batch e8293c91-40f2-4141-9ac0-083187d444cb data
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+64
- 2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/8f2be83c-c991-4aeb-b4e8-d2d6a4885bb5_content_list.jsonAdded
- 2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/8f2be83c-c991-4aeb-b4e8-d2d6a4885bb5_model.jsonAdded
- 2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/8f2be83c-c991-4aeb-b4e8-d2d6a4885bb5_origin.pdfAdded+3
- 2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/full.mdAdded+410
- 2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/images.zipAdded+3
- 2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/layout.jsonAdded
- 2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/fd3a3093-f557-4f9f-877d-992d530d936a_content_list.jsonAdded
- 2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/fd3a3093-f557-4f9f-877d-992d530d936a_model.jsonAdded
- 2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/fd3a3093-f557-4f9f-877d-992d530d936a_origin.pdfAdded+3
- 2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/full.mdAdded+453
- 2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/images.zipAdded+3
- 2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/layout.jsonAdded
- 2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/4bb1c3b0-3441-440a-9e1c-420184fa8534_content_list.jsonAdded+1955
- 2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/4bb1c3b0-3441-440a-9e1c-420184fa8534_model.jsonAdded
- 2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/4bb1c3b0-3441-440a-9e1c-420184fa8534_origin.pdfAdded+3
- 2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/full.mdAdded+391
- 2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/images.zipAdded+3
- 2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/layout.jsonAdded
- 2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/8fe5ec46-a8c7-45c7-9b3a-9ca837af6512_content_list.jsonAdded
- 2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/8fe5ec46-a8c7-45c7-9b3a-9ca837af6512_model.jsonAdded
- 2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/8fe5ec46-a8c7-45c7-9b3a-9ca837af6512_origin.pdfAdded+3
- 2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/full.mdAdded+375
- 2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/images.zipAdded+3
- 2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/layout.jsonAdded
- 2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/f71242d7-9a99-4f09-b793-23aee922cb0b_content_list.jsonAdded
- 2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/f71242d7-9a99-4f09-b793-23aee922cb0b_model.jsonAdded
- 2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/f71242d7-9a99-4f09-b793-23aee922cb0b_origin.pdfAdded+3
- 2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/full.mdAdded+611
- 2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/images.zipAdded+3
- 2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/layout.jsonAdded
- 2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/5800e7fc-a103-47f8-8fcc-b1f9c3f7b6dc_content_list.jsonAdded+1455
- 2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/5800e7fc-a103-47f8-8fcc-b1f9c3f7b6dc_model.jsonAdded+1855
- 2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/5800e7fc-a103-47f8-8fcc-b1f9c3f7b6dc_origin.pdfAdded+3
- 2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/full.mdAdded+257
- 2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/images.zipAdded+3
- 2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/layout.jsonAdded
- 2024/Incremental Sequence Labeling_ A Tale of Two Shifts/b2594102-07d5-4222-acc6-de51314519c7_content_list.jsonAdded
- 2024/Incremental Sequence Labeling_ A Tale of Two Shifts/b2594102-07d5-4222-acc6-de51314519c7_model.jsonAdded
- 2024/Incremental Sequence Labeling_ A Tale of Two Shifts/b2594102-07d5-4222-acc6-de51314519c7_origin.pdfAdded+3
- 2024/Incremental Sequence Labeling_ A Tale of Two Shifts/full.mdAdded+418
- 2024/Incremental Sequence Labeling_ A Tale of Two Shifts/images.zipAdded+3
- 2024/Incremental Sequence Labeling_ A Tale of Two Shifts/layout.jsonAdded
- 2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/145a5135-4cb6-4e6f-ab32-7a35b3c6f8e3_content_list.jsonAdded
- 2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/145a5135-4cb6-4e6f-ab32-7a35b3c6f8e3_model.jsonAdded
- 2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/145a5135-4cb6-4e6f-ab32-7a35b3c6f8e3_origin.pdfAdded+3
- 2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/full.mdAdded
- 2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/images.zipAdded+3
- 2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/layout.jsonAdded
- 2024/InfiMM_ Advancing Multimodal Understanding with an Open-Sourced Visual Language Model/35489b6e-e8fe-4ad4-bced-211f90ee04a6_content_list.jsonAdded+1017
3518 unmodified lines3519352035213518 unmodified lines2024/Improving[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Fine-grained[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Minimum[[:space:]]Editing[[:space:]]Constraint/ffe818ec-ee9d-4965-b90b-4f768f3196c9_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]Low-Resource[[:space:]]Machine[[:space:]]Translation[[:space:]]for[[:space:]]Formosan[[:space:]]Languages[[:space:]]Using[[:space:]]Bilingual[[:space:]]Lexical[[:space:]]Resources/51177445-c60e-47eb-af6d-4420aa544004_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]Machine[[:space:]]Translation[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]A[[:space:]]Preliminary[[:space:]]Study[[:space:]]with[[:space:]]Cooperative[[:space:]]Decoding/2ee61f2c-4efd-4f97-b3f5-888d93adac75_origin.pdf filter=lfs diff=lfs merge=lfs -text3518 unmodified lines35193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853518 unmodified lines2024/Improving[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Fine-grained[[:space:]]Reinforcement[[:space:]]Learning[[:space:]]with[[:space:]]Minimum[[:space:]]Editing[[:space:]]Constraint/ffe818ec-ee9d-4965-b90b-4f768f3196c9_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]Low-Resource[[:space:]]Machine[[:space:]]Translation[[:space:]]for[[:space:]]Formosan[[:space:]]Languages[[:space:]]Using[[:space:]]Bilingual[[:space:]]Lexical[[:space:]]Resources/51177445-c60e-47eb-af6d-4420aa544004_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]Machine[[:space:]]Translation[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]A[[:space:]]Preliminary[[:space:]]Study[[:space:]]with[[:space:]]Cooperative[[:space:]]Decoding/2ee61f2c-4efd-4f97-b3f5-888d93adac75_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]Multi-hop[[:space:]]Logical[[:space:]]Reasoning[[:space:]]in[[:space:]]Knowledge[[:space:]]Graphs[[:space:]]with[[:space:]]Context-Aware[[:space:]]Query[[:space:]]Representation[[:space:]]Learning/8f2be83c-c991-4aeb-b4e8-d2d6a4885bb5_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]Multilingual[[:space:]]Neural[[:space:]]Machine[[:space:]]Translation[[:space:]]by[[:space:]]Utilizing[[:space:]]Semantic[[:space:]]and[[:space:]]Linguistic[[:space:]]Features/fd3a3093-f557-4f9f-877d-992d530d936a_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]Retrieval[[:space:]]Augmented[[:space:]]Open-Domain[[:space:]]Question-Answering[[:space:]]with[[:space:]]Vectorized[[:space:]]Contexts/4bb1c3b0-3441-440a-9e1c-420184fa8534_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Improving[[:space:]]the[[:space:]]Robustness[[:space:]]of[[:space:]]Distantly-Supervised[[:space:]]Named[[:space:]]Entity[[:space:]]Recognition[[:space:]]via[[:space:]]Uncertainty-Aware[[:space:]]Teacher[[:space:]]Learning[[:space:]]and[[:space:]]Student-Student[[:space:]]Collaborative[[:space:]]Learning/8fe5ec46-a8c7-45c7-9b3a-9ca837af6512_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/InFoBench_[[:space:]]Evaluating[[:space:]]Instruction[[:space:]]Following[[:space:]]Ability[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/f71242d7-9a99-4f09-b793-23aee922cb0b_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Incorporating[[:space:]]Syntax[[:space:]]and[[:space:]]Lexical[[:space:]]Knowledge[[:space:]]to[[:space:]]Multilingual[[:space:]]Sentiment[[:space:]]Classification[[:space:]]on[[:space:]]Large[[:space:]]Language[[:space:]]Models/5800e7fc-a103-47f8-8fcc-b1f9c3f7b6dc_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Incremental[[:space:]]Sequence[[:space:]]Labeling_[[:space:]]A[[:space:]]Tale[[:space:]]of[[:space:]]Two[[:space:]]Shifts/b2594102-07d5-4222-acc6-de51314519c7_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/IndicVoices_[[:space:]]Towards[[:space:]]building[[:space:]]an[[:space:]]Inclusive[[:space:]]Multilingual[[:space:]]Speech[[:space:]]Dataset[[:space:]]for[[:space:]]Indian[[:space:]]Languages/145a5135-4cb6-4e6f-ab32-7a35b3c6f8e3_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/InfiMM_[[:space:]]Advancing[[:space:]]Multimodal[[:space:]]Understanding[[:space:]]with[[:space:]]an[[:space:]]Open-Sourced[[:space:]]Visual[[:space:]]Language[[:space:]]Model/35489b6e-e8fe-4ad4-bced-211f90ee04a6_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/InjecAgent_[[:space:]]Benchmarking[[:space:]]Indirect[[:space:]]Prompt[[:space:]]Injections[[:space:]]in[[:space:]]Tool-Integrated[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Agents/a287ff7f-a214-470b-afab-a22f3e45f2ad_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Injecting[[:space:]]Salesperson’s[[:space:]]Dialogue[[:space:]]Strategies[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]with[[:space:]]Chain-of-Thought[[:space:]]Reasoning/1519147e-c120-46f0-ba3c-b7913d9aacea_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Instances[[:space:]]Need[[:space:]]More[[:space:]]Care_[[:space:]]Rewriting[[:space:]]Prompts[[:space:]]for[[:space:]]Instances[[:space:]]with[[:space:]]LLMs[[:space:]]in[[:space:]]the[[:space:]]Loop[[:space:]]Yields[[:space:]]Better[[:space:]]Zero-Shot[[:space:]]Performance/2602dab0-ba3c-40ba-a30e-3e21c3d93851_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/InstructCMP_[[:space:]]Length[[:space:]]Control[[:space:]]in[[:space:]]Sentence[[:space:]]Compression[[:space:]]through[[:space:]]Instruction-based[[:space:]]Large[[:space:]]Language[[:space:]]Models/d708e822-b140-44c8-aa61-150a311f1e61_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/InstructEd_[[:space:]]Soft-Instruction[[:space:]]Tuning[[:space:]]for[[:space:]]Model[[:space:]]Editing[[:space:]]with[[:space:]]Hops/e421b8be-7594-4714-ae38-57bced6cf83f_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/InstructEval_[[:space:]]Instruction-Tuned[[:space:]]Text[[:space:]]Evaluator[[:space:]]from[[:space:]]Human[[:space:]]Preference/525c568f-144c-4697-9685-9f69496d9b9d_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/InstructGraph_[[:space:]]Boosting[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Graph-centric[[:space:]]Instruction[[:space:]]Tuning[[:space:]]and[[:space:]]Preference[[:space:]]Alignment/b4f69e52-1652-45de-8ae4-fc8e12433dbb_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Instruction[[:space:]]Position[[:space:]]Matters[[:space:]]in[[:space:]]Sequence[[:space:]]Generation[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/7b5b6e19-cefb-4d8a-bfd0-797c5d30713b_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Instruction[[:space:]]Tuning[[:space:]]with[[:space:]]Retrieval-based[[:space:]]Examples[[:space:]]Ranking[[:space:]]for[[:space:]]Aspect-based[[:space:]]Sentiment[[:space:]]Analysis/bf082ed0-6a1d-436c-a488-158d2300c8f1_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/IntactKV_[[:space:]]Improving[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Quantization[[:space:]]by[[:space:]]Keeping[[:space:]]Pivot[[:space:]]Tokens[[:space:]]Intact/662e08eb-8654-4406-bd94-fa0b9a374f53_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Integrating[[:space:]]Multi-scale[[:space:]]Contextualized[[:space:]]Information[[:space:]]for[[:space:]]Byte-based[[:space:]]Neural[[:space:]]Machine[[:space:]]Translation/628551f5-c0f3-4199-96b9-caaee9625c8e_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Integrating[[:space:]]Physician[[:space:]]Diagnostic[[:space:]]Logic[[:space:]]into[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]Preference[[:space:]]Learning[[:space:]]from[[:space:]]Process[[:space:]]Feedback/762e5ba0-a802-4e60-835d-5f5dc06ad1e7_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Integrating[[:space:]]Pre-Trained[[:space:]]Speech[[:space:]]and[[:space:]]Language[[:space:]]Models[[:space:]]for[[:space:]]End-to-End[[:space:]]Speech[[:space:]]Recognition/fc3b426d-9e8b-4b97-9b7c-511406cd270a_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Into[[:space:]]the[[:space:]]Unknown_[[:space:]]Generating[[:space:]]Geospatial[[:space:]]Descriptions[[:space:]]for[[:space:]]New[[:space:]]Environments/13aa5d61-154b-463d-a8d9-e4f2f04b7dbb_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Investigating[[:space:]]Subtler[[:space:]]Biases[[:space:]]in[[:space:]]LLMs_[[:space:]]Ageism,[[:space:]]Beauty,[[:space:]]Institutional,[[:space:]]and[[:space:]]Nationality[[:space:]]Bias[[:space:]]in[[:space:]]Generative[[:space:]]Models/8d98d229-155c-4c4e-921a-5e1df3ec1442_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Investigating[[:space:]]the[[:space:]]Impact[[:space:]]of[[:space:]]Data[[:space:]]Contamination[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]in[[:space:]]Text-to-SQL[[:space:]]translation/f8b2fdf8-d26b-43d5-8e36-50b7af456921_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Investigating[[:space:]]the[[:space:]]Impact[[:space:]]of[[:space:]]Model[[:space:]]Instability[[:space:]]on[[:space:]]Explanations[[:space:]]and[[:space:]]Uncertainty/d6ef25fc-ea85-4b44-ba52-b348cd0ecd50_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/It[[:space:]]Is[[:space:]]Not[[:space:]]About[[:space:]]What[[:space:]]You[[:space:]]Say,[[:space:]]It[[:space:]]Is[[:space:]]About[[:space:]]How[[:space:]]You[[:space:]]Say[[:space:]]It_[[:space:]]A[[:space:]]Surprisingly[[:space:]]Simple[[:space:]]Approach[[:space:]]for[[:space:]]Improving[[:space:]]Reading[[:space:]]Comprehension/4a11d24e-b934-4369-91b5-e414f04f7133_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/It[[:space:]]is[[:space:]]Simple[[:space:]]Sometimes_[[:space:]]A[[:space:]]Study[[:space:]]On[[:space:]]Improving[[:space:]]Aspect-Based[[:space:]]Sentiment[[:space:]]Analysis[[:space:]]Performance/6d22ff71-a2d2-47a4-8c6b-8958f61a68a5_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/It[[:space:]]takes[[:space:]]two[[:space:]]to[[:space:]]borrow_[[:space:]]a[[:space:]]donor[[:space:]]and[[:space:]]a[[:space:]]recipient.[[:space:]]Who’s[[:space:]]who_/66a74eee-fa46-49d2-ac8e-2b789475c43c_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Iterative[[:space:]]Refinement[[:space:]]of[[:space:]]Project-Level[[:space:]]Code[[:space:]]Context[[:space:]]for[[:space:]]Precise[[:space:]]Code[[:space:]]Generation[[:space:]]with[[:space:]]Compiler[[:space:]]Feedback/13f2142d-9b81-45a4-8fef-1bbbb0e6e706_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/It’s[[:space:]]Not[[:space:]]Easy[[:space:]]Being[[:space:]]Wrong_[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Struggle[[:space:]]with[[:space:]]Process[[:space:]]of[[:space:]]Elimination[[:space:]]Reasoning/51ea4503-2999-4067-bc82-42a466392e71_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Just[[:space:]]Ask[[:space:]]One[[:space:]]More[[:space:]]Time![[:space:]]Self-Agreement[[:space:]]Improves[[:space:]]Reasoning[[:space:]]of[[:space:]]Language[[:space:]]Models[[:space:]]in[[:space:]](Almost)[[:space:]]All[[:space:]]Scenarios/636cf3ad-0aa1-4f8a-b7e6-1f0128d292a3_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/KEEP[[:space:]]CHATTING![[:space:]]An[[:space:]]Attractive[[:space:]]Dataset[[:space:]]for[[:space:]]Continuous[[:space:]]Conversation[[:space:]]Agents/5c60e0c6-78b3-4ad8-9916-63e44ca79631_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/KG-Adapter_[[:space:]]Enabling[[:space:]]Knowledge[[:space:]]Graph[[:space:]]Integration[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]through[[:space:]]Parameter-Efficient[[:space:]]Fine-Tuning/16ec0396-5e5b-4f0b-b03b-dce46fd1a2ee_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/KIWI_[[:space:]]A[[:space:]]Dataset[[:space:]]of[[:space:]]Knowledge-Intensive[[:space:]]Writing[[:space:]]Instructions[[:space:]]for[[:space:]]Answering[[:space:]]Research[[:space:]]Questions/1de954b1-2e0c-4951-912c-6fe4a64efafc_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/KOMBO_[[:space:]]Korean[[:space:]]Character[[:space:]]Representations[[:space:]]Based[[:space:]]on[[:space:]]the[[:space:]]Combination[[:space:]]Rules[[:space:]]of[[:space:]]Subcharacters/3a147929-d541-4292-9f46-24968706879c_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/KPEval_[[:space:]]Towards[[:space:]]Fine-Grained[[:space:]]Semantic-Based[[:space:]]Keyphrase[[:space:]]Evaluation/85dc3982-456f-4814-8be3-df979b3e7b33_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge[[:space:]]Context[[:space:]]Modeling[[:space:]]with[[:space:]]Pre-trained[[:space:]]Language[[:space:]]Models[[:space:]]for[[:space:]]Contrastive[[:space:]]Knowledge[[:space:]]Graph[[:space:]]Completion/598f7842-a693-4f0d-9316-c9651568c256_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge[[:space:]]Crosswords_[[:space:]]Geometric[[:space:]]Knowledge[[:space:]]Reasoning[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/7d258731-16d7-46d2-94ca-89c07ceefe62_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge[[:space:]]Fusion[[:space:]]By[[:space:]]Evolving[[:space:]]Weights[[:space:]]of[[:space:]]Language[[:space:]]Models/e1687362-8b78-4d45-a7f4-903ae0fccb8e_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge[[:space:]]Graph-Enhanced[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Path[[:space:]]Selection/0d139aa6-062c-4dd5-85d1-bbf596ff19a2_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge[[:space:]]of[[:space:]]Knowledge_[[:space:]]Exploring[[:space:]]Known-Unknowns[[:space:]]Uncertainty[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/0172d51d-5bbf-4050-b6fe-017d24341e9b_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge-Driven[[:space:]]Cross-Document[[:space:]]Relation[[:space:]]Extraction/2d2aa72a-02a1-4e60-9675-e1e566648bb7_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge-Infused[[:space:]]Legal[[:space:]]Wisdom_[[:space:]]Navigating[[:space:]]LLM[[:space:]]Consultation[[:space:]]through[[:space:]]the[[:space:]]Lens[[:space:]]of[[:space:]]Diagnostics[[:space:]]and[[:space:]]Positive-Unlabeled[[:space:]]Reinforcement[[:space:]]Learning/ec6c99e6-00eb-47cd-9858-ed4dc4c1c1c5_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge-Infused[[:space:]]Prompting_[[:space:]]Assessing[[:space:]]and[[:space:]]Advancing[[:space:]]Clinical[[:space:]]Text[[:space:]]Data[[:space:]]Generation[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/16566d62-3254-4296-a774-01af69579648_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledge-to-SQL_[[:space:]]Enhancing[[:space:]]SQL[[:space:]]Generation[[:space:]]with[[:space:]]Data[[:space:]]Expert[[:space:]]LLM/fdd66d1c-cb01-48bd-aa90-9028a4fb9517_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/Knowledgeable[[:space:]]Preference[[:space:]]Alignment[[:space:]]for[[:space:]]LLMs[[:space:]]in[[:space:]]Domain-specific[[:space:]]Question[[:space:]]Answering/0da4c6a0-6246-4c6d-a489-dd233a9f1383_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/KoCommonGEN[[:space:]]v2_[[:space:]]A[[:space:]]Benchmark[[:space:]]for[[:space:]]Navigating[[:space:]]Korean[[:space:]]Commonsense[[:space:]]Reasoning[[:space:]]Challenges[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models/2e6806b7-f085-4da5-88b4-698492e48954_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/KorNAT_[[:space:]]LLM[[:space:]]Alignment[[:space:]]Benchmark[[:space:]]for[[:space:]]Korean[[:space:]]Social[[:space:]]Values[[:space:]]and[[:space:]]Common[[:space:]]Knowledge/244c7324-de77-432c-9573-a57302bf35ee_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LANS_[[:space:]]A[[:space:]]Layout-Aware[[:space:]]Neural[[:space:]]Solver[[:space:]]for[[:space:]]Plane[[:space:]]Geometry[[:space:]]Problem/7f90571f-0a10-458b-b65c-1d2ccbb482ef_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LC4EE_[[:space:]]LLMs[[:space:]]as[[:space:]]Good[[:space:]]Corrector[[:space:]]for[[:space:]]Event[[:space:]]Extraction/f826b1b8-7ab4-4e90-afd6-876d0eca759a_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LCS_[[:space:]]A[[:space:]]Language[[:space:]]Converter[[:space:]]Strategy[[:space:]]for[[:space:]]Zero-Shot[[:space:]]Neural[[:space:]]Machine[[:space:]]Translation/428ab358-a2ad-43bc-b7e8-6ba34bdaad5e_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LEIA_[[:space:]]Facilitating[[:space:]]Cross-lingual[[:space:]]Knowledge[[:space:]]Transfer[[:space:]]in[[:space:]]Language[[:space:]]Models[[:space:]]with[[:space:]]Entity-based[[:space:]]Data[[:space:]]Augmentation/95e8f2d2-5d00-4b4c-8f23-3bcf62c7181a_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LIRE_[[:space:]]listwise[[:space:]]reward[[:space:]]enhancement[[:space:]]for[[:space:]]preference[[:space:]]alignment/16a429e9-557c-4c95-91fa-baa8585914c1_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LJPCheck_[[:space:]]Functional[[:space:]]Tests[[:space:]]for[[:space:]]Legal[[:space:]]Judgment[[:space:]]Prediction/765f07ac-6577-48da-9c37-650c7bc3c721_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLM[[:space:]]Factoscope_[[:space:]]Uncovering[[:space:]]LLMs’[[:space:]]Factual[[:space:]]Discernment[[:space:]]through[[:space:]]Measuring[[:space:]]Inner[[:space:]]States/763187b8-717e-401d-a3fd-b0c9de484cb1_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLM[[:space:]]Performance[[:space:]]Predictors[[:space:]]are[[:space:]]good[[:space:]]initializers[[:space:]]for[[:space:]]Architecture[[:space:]]Search/c530301b-bd23-4cab-8cb1-a49cc8fb3052_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLM[[:space:]]as[[:space:]]Prompter_[[:space:]]Low-resource[[:space:]]Inductive[[:space:]]Reasoning[[:space:]]on[[:space:]]Arbitrary[[:space:]]Knowledge[[:space:]]Graphs/51d01a41-f3c0-4ade-851e-851427dd71e5_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLM[[:space:]]can[[:space:]]Achieve[[:space:]]Self-Regulation[[:space:]]via[[:space:]]Hyperparameter[[:space:]]Aware[[:space:]]Generation/fbc2e9b7-88ce-40c8-8f16-672c49104d7b_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLM-QAT_[[:space:]]Data-Free[[:space:]]Quantization[[:space:]]Aware[[:space:]]Training[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/180badff-4d09-4aa0-bc15-a241dfd7f044_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLM-REDIAL_[[:space:]]A[[:space:]]Large-Scale[[:space:]]Dataset[[:space:]]for[[:space:]]Conversational[[:space:]]Recommender[[:space:]]Systems[[:space:]]Created[[:space:]]from[[:space:]]User[[:space:]]Behaviors[[:space:]]with[[:space:]]LLMs/877e9e2f-24cb-4f95-a43d-3c1965a125c2_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLM2LLM_[[:space:]]Boosting[[:space:]]LLMs[[:space:]]with[[:space:]]Novel[[:space:]]Iterative[[:space:]]Data[[:space:]]Enhancement/fb32c524-c09a-4126-9ca2-23f8303b8b30_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLMCrit_[[:space:]]Teaching[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]to[[:space:]]Use[[:space:]]Criteria/d270583d-5a12-4d03-923b-563fac5fe924_origin.pdf filter=lfs diff=lfs merge=lfs -text2024/LLMFactor_[[:space:]]Extracting[[:space:]]Profitable[[:space:]]Factors[[:space:]]through[[:space:]]Prompts[[:space:]]for[[:space:]]Explainable[[:space:]]Stock[[:space:]]Movement[[:space:]]Prediction/a58603f4-5dcc-412d-b6c6-5573a1dd546d_origin.pdf filter=lfs diff=lfs merge=lfs -text
123version https://git-lfs.github.com/spec/v1oid sha256:9ebc69695f3578073a69f4051e442c090df04ec439dfb3241f7df540f3f9083esize 1401056123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410# Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning
Jeonghoon Kim $^{1}$ , Heesoo Jung $^{1}$ , Hyeju Jang $^{2}$ , and Hogun Park $^{*1}$
$^{1}$ Sungkyunkwan University, Republic of Korea
2Indiana University Indianapolis, USA
{kjh9503, steve305}@skku.edu, hyejuj@iu.edu, hogunpark@skku.edu
# Abstract
Multi-hop logical reasoning on knowledge graphs is a pivotal task in natural language processing, with numerous approaches aiming to answer First-Order Logic (FOL) queries. Recent geometry (e.g., box, cone) and probability (e.g., beta distribution)-based methodologies have effectively addressed complex FOL queries. However, a common challenge across these methods lies in determining accurate geometric bounds or probability parameters for these queries. The challenge arises because existing methods rely on linear sequential operations within their computation graphs, overlooking the logical structure of the query and the relation-induced information that can be gleaned from the relations of the query, which we call the context of the query. To address the problem, we propose a model-agnostic methodology that enhances the effectiveness of existing multi-hop logical reasoning approaches by fully integrating the context of the FOL query graph. Our approach distinctively discerns (1) the structural context inherent to the query structure and (2) the relation-induced context unique to each node in the query graph as delineated in the corresponding knowledge graph. This dual-context paradigm helps nodes within a query graph attain refined internal representations throughout the multi-hop reasoning steps. Through experiments on two datasets, our method consistently enhances the three multi-hop reasoning foundation models, achieving performance improvements of up to $19.5\%$ . Our code is available at https://github.com/kjh9503/caqr.
# 1 Introduction
Multi-hop logical reasoning on Knowledge Graphs (KGs) is a crucial task in natural language processing. KGs, which map real-world knowledge as interconnected entities and relationships (Sinha et al., 2015; Vrandecic and Krötzsch, 2014), help
 Q: What are the names of the teams playing the team sports featured in the 1980 Olympics?
 Figure 1: The existing methods may include wrong answers such as, Sprint, Marathon, Triathlon, and Figure because the candidates held by the variable node (V) in the inference process are only influenced by the 1980 Olympic and $\text{FeaturedAt}^{-1}$ . However, our approach uses structural and relation-induced contexts to find a more accurate embedding of V, which helps us to predict answers that are close to the ground truth.
answer complex questions expressed as First-Order Logic (FOL) queries. A FOL query can be converted into a computation graph, using variables, conjunctions, and existential quantification operators to represent a natural language question. For example, the computation graph of the query representing "What are the names of the teams playing the team sports featured in the 1980 Olympics?" can be constructed with two conjunction relations: 1) finding the sports featured in the 1980 Olympics, and 2) finding the sports teams that play that sports (see Figure 1 for illustration).
Recent advancements in multi-hop reasoning leverage the power of embedding-based models such as Q2B (Ren et al., 2020), BetaE (Ren and
Leskovec, 2020), and ConE (Zhang et al., 2021). These models embed both a given query and entities (answer candidates) in a KG into a latent space. In this space, entities relevant to the query are positioned closer to the query's embedding. This allows the model to predict the answer to the query by identifying these nearby entities.
Despite their success, these embedding-based models still face a major hurdle: learning more accurate geometric bounds or probability parameters for complex queries. Prior models handle all queries in the same way, building the embedding for each relationship (e.g., $\text{FeaturedAt}^{-1}$ or $\text{TeamsPlay}^{-1}$ in Figure 1) one after another. This approach overlooks the structural context and relation-induced context within each question. Therefore, entities like Sprint, Marathon, Triathlon, and Figure are treated as answers by the existing models (Ren et al., 2020; Ren and Leskovec, 2020; Zhang et al., 2021) based on the given query in Figure 1.
To address this limitation, we propose a novel query embedding technique, named CaQR (Context-aware Query Representation learning), that incorporates both structural context and relation-induced context. The structural context encodes the positional or role-like information of a node within the query computation graph. For example, in Figure 1, the structural context of node V could include the number of incoming and outgoing edges, the canonical position of V within the query graph, and the length of the query graph containing node V. Based on this, Figure can be excluded as a V candidate because it is unlikely to be derived through the one-hop reasoning from the 1980 Olympics in KG. The relation-induced context, on the other hand, leverages KG entities linked to each node's relations. For instance, in the query graph shown in Figure 1, the relation-induced context—acquired by identifying nodes in the KG associated with TeamsPlay $^{-1}$ —suggests that Sprint, Marathon, and Triathlon are not suitable candidates for V by accentuating the entities which linked to the TeamsPlay $^{-1}$ relations (Soccer, Volleyball, and Basketball). By incorporating structural and relation-induced contexts into the existing query embedding methods, our approach mitigates the cascading errors that can arise from the step-by-step computation characteristic of these methods.
Our contributions are threefold: (1) We propose a novel query representation learning method
that leverages two types of context within a query computation graph: structural context and relation-induced context, which are often overlooked in previous methods. (2) Our proposed technique is applicable to any existing query embedding-based method, as it utilizes structural and relation-induced context acquired from the input query graph, irrespective of the models. (3) Our experiments show that our method leads to performance improvements for various models (Q2B (Ren et al., 2020), BetaE (Ren and Leskovec, 2020), and ConE (Zhang et al., 2021)), which have received considerable attention in various FOL tasks as foundation models. Specifically, our experiments on two benchmark datasets demonstrate that our method consistently improves these models, achieving up to a $19.5\%$ enhancement in query reasoning tasks compared to their baselines.
# 2 Related Work
Geometry-based. These approaches represent each query as a geometric shape in the embedding space. They then identify entities located close to that shape as answers to the query. For instance, GQE (Hamilton et al., 2018) maps entities to points and employs neural networks to model logical operators. Q2B (Ren et al., 2020) and its extension (Liu et al., 2021) use hyper-rectangles, or boxes, to represent queries. These boxes are defined by a center and offset, and entities positioned closer to them are considered potential answers. ConE (Zhang et al., 2021) represents queries using multiple two-dimensional cones characterized by their axis and aperture angle. Similar to Q2B, entities lying closer to the cone representing the query are considered potential answers. However, these geometry-based models fail to harness both structural and relation-induced context information.
Probability-based. In contrast to geometry-based approaches, probability-based methods represent queries as probability distributions. For example, BetaE (Ren and Leskovec, 2020) uses multiple beta distributions to represent a query, entities, and relations. Similar approaches include GammaE (Yang et al., 2022) with gamma distributions and PERM (Choudhary et al., 2021) with multivariate Gaussian distributions. These methods measure the distance between the query embedding and candidate entities using KL-divergence. FuzzQE (Chen et al., 2022b) takes a different approach, mapping queries and entities to a fuzzy
space. It represents the answer set as a fuzzy vector and calculates the probability of an entity being an answer using a score function. Similarly, GNN-QE (Zhu et al., 2022) adopts fuzzy logic to represent queries and entities but uses graph neural networks for projection in an incomplete KG. On the other hand, WFRE (Wang et al., 2023a) models queries and entities as discretized mass vectors that satisfy fuzzy logic. It models logical operators through t-norm or t-conorm functions and measures the distance between mass vectors using the optimal transport theory (Peyre and Cuturi, 2019). While each method has its advantages and disadvantages and is selectively utilized in various FOL-based applications (Tang et al., 2023; Liang et al., 2023; Xiong et al., 2023), the potential of query-based context encoding to enhance multiple multi-hop reasoning approaches and yield robust performance improvements has not received sufficient attention.
Query Encoder-based. There are auxiliary transformation encoders for representing the FOL queries for multi-hop reasoning. These include Q2T (Xu et al., 2023) and LMPNN (Wang et al., 2023b), which take distinct approaches to tackling complex queries. Q2T transforms the complex query into a single virtual triple of head, relation, and tail components. It computes the score of this virtual triple with a pre-trained KG embedding model to predict the answer to the query. LMPNN (Wang et al., 2023b), on the other hand, decomposes the complex multi-hop query into multiple simpler triples. It generates a message using the entity embedding to maximize the score for each triple, utilizing a pre-trained KG embedding model. However, these approaches require initial KG embeddings from extensive pre-training and are not applicable to various multi-hop reasoning approaches.
# 3 Preliminaries
Given an entity set $\mathcal{V}$ and a relation set $\mathcal{R}$ , the KG $G = (h, r, t) \subset \mathcal{V} \times \mathcal{R} \times \mathcal{V}$ represents a collection of triples that encapsulate factual information in the real world. Here, $h, t \in \mathcal{V}$ , and $r \in \mathcal{R}$ . When considering each relation as a binary function, such as $r(h, t)$ , following the structure of predicate logic, the triples observed from the KG hold a value of True.
# 3.1 First-Order Logic (FOL) Queries
The First-Order Logic (FOL) queries take predicate logic, allowing the use of quantified variables. A FOL query is composed of a non-variable anchor entity set $\mathcal{V}_a \subseteq \mathcal{V}$ , an existential quantified set $\{V_1, \ldots, V_k\}$ of size $k$ , and a target variable $V$ ? which is an answer to a certain query. For example, in Figure 1, $\mathcal{V}_a$ is $\{1980 \text{ Olmypic}\}$ , the existential quantified set is $\{V\}$ , and the target variable is $A$ . Generally, FOL queries include four logical operators: the existential quantifier $(\exists)$ , conjunction $(\land)$ , disjunction $(\lor)$ , and negation $(\neg)$ . We can formulate a FOL query $q$ as follows:
$$q = V _ {?}. \exists V _ {1}, \dots , V _ {k}: c _ {1} \vee c _ {2} \vee \dots \vee c _ {n}. \tag {1}$$
$$c _ {i} = a _ {i _ {1}} \wedge a _ {i _ {2}} \wedge \dots \wedge a _ {i _ {m}}. \tag {2}$$
Each atomic formula $a_{i_j}$ is in the form of predicate logic which has the form of $r(v_a, V)$ or $\neg r(v_a, V)$ or $r(V', V)$ or $\neg r(V', V)$ consisting of conjunction $c_i$ of $m$ predicates. $v_a$ is an element of $\mathcal{V}_a$ . $V$ and $V'$ are elements of $\{V?, V_1, ..., V_k\}$ and $\{V_1, ..., V_k\}$ , respectively ( $V' \neq V$ ). Note that we call this atomic formula $a_{i_j}$ a branch of a query graph.
# 3.2 Query Graph
In BetaE (Ren and Leskovec, 2020), FOL query answering tasks are categorized into pre-defined multi-hop reasoning tasks using 14 different query types. Each query type can be represented by a corresponding query graph and all queries can be interpreted as corresponding natural language questions. For instance, a FOL query for "What are the names of the teams playing the team sports featured in the 1980 Olympics?" can be represented by the query graph shown in Figure 1. A query graph consists of anchor nodes, variable nodes, and answer nodes. Variable nodes signify entities fulfilling individual sub-conditions within the query, while the answer node represents the entity satisfying the entire query. In Figure 2, you can observe five types of query graphs, and all query types can be found in Appendix A.2.
# 3.3 Computation Graph
The computation graph details the computation procedure to obtain the embedding of each node in the query graph. In a computation graph, each node represents an embedding of an entity (or a set of entities) in the KG, and each edge signifies a logical
 Figure 2: Five types of query graph
transformation (e.g., relational projection, intersection/union/negation operators) of this distribution. The computation graph for a FOL query resembles a tree. The root node of the computation graph represents the answer (or target) variable, with one or more anchor nodes provided by the FOL. Embeddings of entities and transformation operators are initialized; embeddings of anchor nodes are then fed into the neural network of logical operators in a serial manner to obtain the final embeddings for the answer variable, thereby creating a query embedding. During training, models ensure the proximity of query embeddings to the ground truth. In the prediction stage, entities close to the query embedding are utilized for prediction. Further details on the logical operators are included in the Appendix B.
# 4 Methodology
In this section, we explain CaQR, our method that leverages context information from the query graph to create more accurate and nuanced entity embeddings. By incorporating context, CaQR can make fine-grained adjustments within the embedding space, capturing the complexities of real-world queries.
CaQR concentrates on two key types of context: structural context and relation-induced context. The structural context combines positional cues (where nodes appear in the query) and functional roles (the specific role a node plays) to comprehend the overall structure and relationships within the query. Furthermore, the relation-induced context focuses on the specific relationships and interactions between entities within the query. CaQR combines these structural and relation-induced contexts to create a more comprehensive query embedding.
# 4.1 Learning Structural Context
To capture structural context, we propose using position embeddings, role embeddings, and type embeddings for differentiating between different query types. Note that position, role, and type embeddings are generated even for query types not in training data.
# 4.1.1 Position Embedding
Previous studies (Dwivedi et al., 2022; You et al., 2019) have shown the advantages of incorporating canonical positioning information within message-passing frameworks to present nodes in arbitrary graphs. Inspired by this, we propose incorporating the canonical positioning information in the representation of each node within the query graph, aiming to lead to a more expressive and informative representation.
To capture the relative order of nodes within a query graph, we introduce the concept of canonical node positions. These positions represent the order in which nodes would appear if the graph were listed from left to right, as illustrated in Figure 3 (the first number in each tuple). Importantly, the maximum canonical position number remains consistent across all queries of the same type and equals the maximum query length. For example, consider the $3p$ query graph in Figure 2. When listing nodes from left to right (starting with the anchor node), the maximum position is 4. Therefore, we initialize position embeddings for canonical positions 0 to 3 as follows:
$$\mathbf {P} _ {p o s} = \left[ \begin{array}{l l l l} \mathbf {p} _ {0} & \mathbf {p} _ {1} & \mathbf {p} _ {2} & \mathbf {p} _ {3} \end{array} \right] \in \mathbb {R} ^ {4 \times d _ {p o s}}, \tag {3}$$
where $d_{pos}$ denotes the dimension of the position embedding, and $\mathbf{p}_i$ represents the position embedding of a node at the $i$ -th canonical position on the query graph. The lookup table $\mathbf{P}_{pos}$ maps each potential canonical position $i$ to its corresponding embedding vector $\mathbf{p}_i$ . Then, $\mathbf{p}_i$ is integrated into the embedding of the node located at the $i$ -th position on the query graph. The integration of this position embedding aims to compensate for the lack of explicit structural information arising from the sequential nature of existing embedding models.
# 4.1.2 Role Embedding
Query graphs reveal important structural information through distinct node roles. Regardless of the type of query, anchor nodes never have incoming edges, as shown in Figure 2. In contrast, variable nodes are connected to other nodes from both incoming and outgoing edges. Finally, answer nodes serve as leaf nodes, with no outgoing edges. These distinct node roles, observed across various query graph types, offer valuable insights into the query's structure, enriching the information available for the embedding model.
 Figure 3: The figure of the structural context and relation-induced context and its application example on ip query. Each node in the query graph can be assigned a position number and a role number, which is represented as a tuple in the Structural Context box (green box). The first number of the tuple in each node of the query graph represents the position number, and the second number indicates the role number. Type embedding is derived from the query-type table containing the position and role information of the corresponding query graph. The Relation-induced Context box illustrates constructing relation-induced embedding of node $V$ and $A$ from KG. The Integration box describes integrating query embedding, position embedding, role embedding, type embedding, and relation-induced embedding into updated query embedding. Best viewed in color.
To take advantage of this information, we assign a canonical number to each role of the query graph (i.e., 0 for the anchor node, 1 for the variable node, 2 for the answer node) and initialize the role embedding for each role as:
$$\mathbf {R} _ {r o l} = \left[ \begin{array}{l l l} \mathbf {r} _ {a n c h} & \mathbf {r} _ {v a r} & \mathbf {r} _ {a n s} \end{array} \right] \in \mathbb {R} ^ {3 \times d _ {r o l}}, \tag {4}$$
where $d_{rol}$ represents the dimension of the role embedding. $\mathbf{R}_{rol}$ is a lookup table containing role embeddings. $\mathbf{r}_{anch}$ , $\mathbf{r}_{var}$ , and $\mathbf{r}_{ans}$ are role embeddings for anchor, variable, and answer nodes, respectively. The role embedding is incorporated into the query embeddings of the corresponding node to provide information about the node's role within the query graph.
# 4.1.3 Type Embedding
While position and role embeddings provide valuable information about each node within a query graph, they don't necessarily reveal the complete picture of how these nodes interact and contribute to the distinct query structures. For instance, they
may struggle to represent unique query types like $2i$ and $3i$ in Figure 2. The answer entities in both $2i$ query and $3i$ query have position 1 with respect to the anchor entity (position 0) and have the same role embedding (answer). Therefore, position embedding and role embedding are not enough to reflect the different structure information of $2i$ and $3i$ query graphs.
To address this limitation, we propose a method to capture the structural context of a given query type. This approach extends beyond individual node properties to understand the broader relationships and dependencies between them. To capture this crucial structural context, we introduce the query-type table. Illustrated in the Structural Context box of Figure 3, this table encodes the complete structural information of the query by representing each node as a combination of its position and role. Flattening this table results in a vector, where each element corresponds to a specific position-role combination. Consequently, this
vector uniquely identifies the query's structure (i.e., query type). Because the range of values in the query type table is different for each query type, we normalize the vector by dividing by 4, which is the maximum sum of the values in the vector. Finally, we use a linear transformation to map this normalized vector into a continuous embedding space, creating the type embedding. For a query graph $\mathcal{G}$ , the type embedding of any node in the query graph $\mathcal{G}$ is presented as follows:
$$\mathbf {g} _ {\mathcal {G}} = \mathbf {W} _ {g} \cdot \text {f l a t t e n} (\operatorname {C o u n t} (\mathcal {G})). \tag {5}$$
Count returns a query-type table $(\text{Count}(\mathcal{G}) \in \mathbb{R}^{3 \times 4})$ , constructed by counting the occurrence of each combination of position number and role number for the nodes in the graph $\mathcal{G}$ . The flatten function transforms this two-dimensional query-type table into a vector. $\mathbf{W}_g$ represents a linear transformation matrix. The type embedding is then incorporated into the query embedding of each node within a query graph. All nodes within a query graph share the same query table, resulting in identical type embedding. It's worth noting that we collectively refer to the position, role, and type embeddings as structure embeddings.
# 4.2 Learning Relation-induced Context
Several approaches have been proposed for leveraging neighboring relations around entities to enhance reasoning in KGs (Sheng et al., 2020; Chen et al., 2022a). However, computing attention scores, as in (Sheng et al., 2020), requires a high computational cost, making it more expensive to apply these approaches concurrently with computing the query embedding. Additionally, it is challenging to represent an entity solely based on relations' embedding as in (Chen et al., 2022a) due to the distinct distributions of entities and relations. To extract relation-induced context associated with the nodes, we first define $\mathcal{N}_r^{in}(v_i)$ as the set of incoming relations of the node $v_i$ in the query graph. $\mathcal{N}_r^{out}(v_i)$ represents the set of outgoing relations of the node $v_i$ in the query graph. We then utilize the connection of the relation in the KG to acquire the information possessed by the relation associated with node $v_i$ on the query graph. To achieve this, we define the entities serving as the tail of relation $r$ in the KG as $\mathcal{E}_{tail}(r)$ , and the entities serving as the head as $\mathcal{E}_{head}(r)$ . We then aggregate the embeddings of these entities to construct the relation-induced context of the node, referred to
as the relation-induced embedding. This can be formulated as follows:
$$\mathbf {1} _ {v} ^ {i n} = A g g \{E m b (e) \mid e \in \mathcal {E} _ {\text {t a i l}} (r), r \in \mathcal {N} _ {r} ^ {i n} (v) \}, \tag {6}$$
$$\mathbf {l} _ {v} ^ {\text {o u t}} = \operatorname {A g g} \left\{\operatorname {E m b} (e) \mid e \in \mathcal {E} _ {\text {h e a d}} (r), r \in \mathcal {N} _ {r} ^ {\text {o u t}} (v) \right\}, \tag {7}$$
$$\mathbf {l} _ {v} = \left(\mathbf {l} _ {v} ^ {i n} + \mathbf {l} _ {v} ^ {o u t}\right) / 2, \tag {8}$$
where we use the mean operation as the $Agg$ function, and $\mathbf{l}_v$ indicates the relation-induced embedding of node $v$ . Note that in Equation (6) and (7), considering computational efficiency, we sample up to $K$ number of entities from $\mathcal{E}_{tail}(r)$ and $\mathcal{E}_{head}(r)$ , respectively.
# 4.3 Integrating Two Contextual Embeddings
We incorporate the structural embedding (Sec 4.1) and the relation-induced embedding (Sec 4.2) into the embeddings of each node in the query graph using a neural network architecture. Different embeddings are passed through the neural network, concatenated, and then mapped into the same low-dimensional embedding space as the original query embedding. The node embedding of the arbitrary query graph $\mathcal{G}$ , which incorporates the obtained information from above, can be formulated as follows:
$$\mathbf {p} _ {v} = \mathbf {P} _ {\text {p o s}} [ \text {p o s i t i o n} _ {v} ], \tag {9}$$
$$\mathbf {r} _ {v} = \mathbf {R} _ {r o l} [ \text {r o l e} _ {v} ], \tag {10}$$
$$\mathbf {q} _ {v} ^ {\prime} = \mathbf {W} ^ {\prime} \cdot \left(\mathbf {M L P} _ {q} \cdot \mathbf {q} _ {v} \mid \mathbf {M L P} _ {I} \left(\left\{\mathbf {p} _ {v}, \mathbf {r} _ {v}, \mathbf {g} _ {\mathcal {G}}, \mathbf {l} _ {v} \right\}\right), \right. \tag {11}$$
where $[\cdot ]$ is a lookup operation. Note that the node $v$ can be either a variable node or an answer node in $\mathcal{G}$ . position denotes the canonical position of node $v$ in the query graph $\mathcal{G}$ . role represents the number corresponding to the role of node $v$ in the query graph $\mathcal{G}$ . $\mathbf{p}_v$ , $\mathbf{r}_v$ , $\mathbf{g}_{\mathcal{G}}$ , and $\mathbf{l}_v$ represent the position embedding, role embedding, type embedding, and the relation-induced embedding of node $v$ , respectively. $\mathbf{MLP}_q$ and $\mathbf{MLP}_I$ signify multi-layer perceptrons, respectively. $(\cdot |\cdot)$ is a concatenation. $\mathbf{q}_v$ represents the embedding of the branch toward node $v$ in the query graph resulting from projection operators of the base query embedding model (e.g., Q2B, BetaE, or ConE). $\mathbf{q}_v'$ represents the updated representation obtained by integrating structural and relation-induced context into $\mathbf{q}_v$ .
The query embedding models sequentially compute embeddings of nodes in the query graph, ultimately deriving the embedding for the answer
node. The integration occurs at each instance of a projection operation. The position, role, type, and relation-induced embeddings are precomputed for each variable node and answer node. During the execution of projection operation, these context embeddings are integrated into the embedding of the corresponding node in the query graph, resulting in an enhanced representation.
# 4.4 Training
The structure embeddings, relation-induced embedding and parameters consisting of neural networks of Equation (11) for integration are updated through backward propagation from the loss function of each query embedding model. The loss function defined in the query embedding model is common as follows:
$$\begin{array}{l} L _ {q e} = - \log \sigma (\gamma - \mathrm {D i s t} (\mathbf {v}, \mathbf {q} _ {A} ^ {\prime})) \\ - \sum_ {j = 1} ^ {k} \frac {1}{k} \log \sigma \left(\operatorname {D i s t} \left(\mathbf {v} _ {\mathbf {j}} ^ {\prime}, \mathbf {q} _ {A} ^ {\prime}\right) - \gamma\right). \tag {12} \\ \end{array}$$
Here, $\mathbf{q}_A^\prime$ indicates the modified query embedding of the answer node by Equation (11). $\mathbf{v}$ and $\mathbf{v_j}'$ denote the positive (i.e., answer entity) and negative entity for each query. $k$ represents the number of negative samples (Mikolov et al., 2013), and Dist is the model-specific function that measures the distance between query embedding and entity embedding.
In the case of BetaE, utilizing entities' embeddings as parameters for beta distributions can lead to significant variance shifts, hindering the convergence of the model's learning. Therefore, for BetaE, we introduce an additional loss to mitigate the variance shifts. The details about the variance loss are provided in Appendix D.
# 4.5 Time Complexity Analysis
Acquiring the relation-induced embedding costs $\mathcal{O}(NKD)$ , where $N$ is the number of nodes in the query graph, $K$ is the size of sample entities for constructing the relation-induced embedding, and $D$ is the dimension of the embedding. When integrating all embeddings, $\mathcal{O}(PMD^2 + NKD) \approx \mathcal{O}(1 \cdot D^2)$ is required. Here, $P$ is the number of projection operations in the given query, and $M$ is the number of contextual information embeddings used (4 in case when using all embeddings). In addition to the analysis, we compare the inference times of the query embedding model and that with our methodology in Table 4 of Appendix.
# 5 Experiments
# 5.1 Datasets and Base Reasoning Models
For evaluation, we use two datasets: FB15k-237 (Toutanova and Chen, 2015) and NELL (Xiong et al., 2017). We evaluate the effectiveness of our approach on the Q2B (Ren et al., 2020), BetaE (Ren and Leskovec, 2020), and ConE (Zhang et al., 2021) models, which have received considerable attention in various FOL tasks as foundation models. For more detailed information on the datasets and query structures, please refer to Appendix A.
# 5.2 Main Results
Table 1 demonstrates that applying our method results in performance gains for all compared models, with Q2B showing a particularly notable $19.5\%$ increase on the NELL dataset. This significant improvement could stem from the unique alignment between Q2B's hyper-rectangular embedding space and the space where our position, role, and type embeddings are mapped.
The lower performance of $\mathrm{BetaE + CaQR(R)}$ compared to $\mathrm{BetaE + CaQR(S)}$ can be attributed to the parameters of BetaE. BetaE utilizes two d-dimensional embedding vectors, $\alpha$ and $\beta$ , as the parameters of beta distributions, to represent entities. The relation-induced embedding is constructed for each query node by computing the average values across multiple entities. However, since the parameter of averaged multiple beta distributions is not the same as the average of parameters of beta distributions, the resulting relation-induced embedding can deviate from the actual values.
While not as pronounced as with Q2B and BetaE, our method still delivers performance gains for ConE across 1p, 2p, and 3p queries. This suggests that our methodology benefits even simpler query structures, indicating its broad applicability and effectiveness. Table 1 demonstrates a consistent performance improvement with the application of CaQR(S). Furthermore, in the context of complex queries (e.g., $2i$ , $3i$ , $pi$ , and $ip$ ), a synergistic effect is evident when both S and R are employed.
Table 2 presents the experimental results for queries with negation. While there is an overall positive effect, it is smaller compared to previous query types. This could be attributed to the late application of our method, which operates after the projection step.
<table><tr><td>Dataset</td><td>Model</td><td>1p</td><td>2p</td><td>3p</td><td>2i</td><td>3i</td><td>pi</td><td>ip</td><td>2u</td><td>up</td><td>Avg</td><td>Imp(%)</td></tr><tr><td rowspan="12">FB15k-237</td><td>Q2B</td><td>40.35</td><td>9.27</td><td>6.87</td><td>28.57</td><td>40.88</td><td>20.71</td><td>12.75</td><td>10.96</td><td>7.48</td><td>19.76</td><td>-</td></tr><tr><td>Q2B+CaQR(S)</td><td>42.49</td><td>10.82</td><td>8.92</td><td>32.55</td><td>45.92</td><td>23.44</td><td>13.29</td><td>14.27</td><td>8.67</td><td>22.26</td><td>12.7</td></tr><tr><td>Q2B+CaQR(R)</td><td>42.66</td><td>10.94</td><td>9.18</td><td>32.53</td><td>45.98</td><td>22.00</td><td>13.47</td><td>14.46</td><td>8.45</td><td>22.18</td><td>12.2</td></tr><tr><td>Q2B+CaQR</td><td>42.65</td><td>10.82</td><td>9.00</td><td>32.43</td><td>46.42</td><td>21.70</td><td>13.39</td><td>14.53</td><td>8.75</td><td>22.19</td><td>12.3</td></tr><tr><td>BetaE</td><td>39.20</td><td>10.69</td><td>10.15</td><td>29.16</td><td>42.59</td><td>22.53</td><td>12.28</td><td>12.52</td><td>9.73</td><td>20.98</td><td>-</td></tr><tr><td>BetaE+CaQR(S)</td><td>40.82</td><td>12.16</td><td>10.78</td><td>32.04</td><td>45.80</td><td>24.66</td><td>13.71</td><td>13.94</td><td>10.59</td><td>22.72</td><td>8.3</td></tr><tr><td>BetaE+CaQR(R)</td><td>41.08</td><td>12.31</td><td>10.70</td><td>31.64</td><td>45.21</td><td>24.49</td><td>14.22</td><td>13.94</td><td>10.46</td><td>22.67</td><td>8.1</td></tr><tr><td>BetaE+CaQR</td><td>41.35</td><td>12.75</td><td>10.79</td><td>31.89</td><td>45.55</td><td>24.70</td><td>14.69</td><td>14.24</td><td>10.67</td><td>22.96</td><td>9.4</td></tr><tr><td>ConE</td><td>42.33</td><td>12.78</td><td>10.97</td><td>32.59</td><td>47.13</td><td>25.45</td><td>13.71</td><td>14.35</td><td>10.50</td><td>23.31</td><td>-</td></tr><tr><td>ConE+CaQR(S)</td><td>42.89</td><td>13.13</td><td>11.16</td><td>33.07</td><td>47.56</td><td>24.75</td><td>11.97</td><td>15.49</td><td>10.90</td><td>23.44</td><td>0.5</td></tr><tr><td>ConE+CaQR(R)</td><td>42.92</td><td>12.98</td><td>11.16</td><td>32.32</td><td>46.99</td><td>24.31</td><td>14.36</td><td>15.18</td><td>10.67</td><td>23.43</td><td>0.5</td></tr><tr><td>ConE+CaQR</td><td>41.81</td><td>12.84</td><td>10.90</td><td>33.78</td><td>48.24</td><td>25.65</td><td>14.41</td><td>14.48</td><td>10.95</td><td>23.67</td><td>1.5</td></tr><tr><td rowspan="12">NELL</td><td>Q2B</td><td>41.48</td><td>13.80</td><td>11.17</td><td>32.01</td><td>44.71</td><td>21.90</td><td>16.80</td><td>11.19</td><td>10.12</td><td>22.57</td><td>-</td></tr><tr><td>Q2B+CaQR(S)</td><td>57.12</td><td>16.15</td><td>13.54</td><td>37.81</td><td>50.92</td><td>23.45</td><td>17.47</td><td>14.60</td><td>10.37</td><td>26.83</td><td>18.9</td></tr><tr><td>Q2B+CaQR(R)</td><td>57.15</td><td>16.08</td><td>13.75</td><td>37.84</td><td>50.68</td><td>22.82</td><td>18.03</td><td>14.80</td><td>10.36</td><td>26.83</td><td>18.9</td></tr><tr><td>Q2B+CaQR</td><td>57.15</td><td>15.99</td><td>13.42</td><td>37.95</td><td>51.25</td><td>24.24</td><td>17.57</td><td>14.80</td><td>10.42</td><td>26.97</td><td>19.5</td></tr><tr><td>BetaE</td><td>53.09</td><td>13.10</td><td>11.56</td><td>37.62</td><td>47.87</td><td>24.40</td><td>14.89</td><td>12.05</td><td>8.63</td><td>24.80</td><td>-</td></tr><tr><td>BetaE+CaQR(S)</td><td>54.72</td><td>14.83</td><td>12.58</td><td>37.49</td><td>48.34</td><td>24.06</td><td>15.00</td><td>12.50</td><td>9.76</td><td>25.47</td><td>2.7</td></tr><tr><td>BetaE+CaQR(R)</td><td>54.42</td><td>14.44</td><td>12.53</td><td>37.03</td><td>47.76</td><td>24.01</td><td>15.64</td><td>12.08</td><td>9.48</td><td>25.26</td><td>1.9</td></tr><tr><td>BetaE+CaQR</td><td>55.20</td><td>15.44</td><td>13.52</td><td>37.99</td><td>48.47</td><td>25.45</td><td>16.59</td><td>13.06</td><td>10.26</td><td>26.22</td><td>5.7</td></tr><tr><td>ConE</td><td>53.19</td><td>16.08</td><td>14.04</td><td>39.88</td><td>51.08</td><td>26.04</td><td>17.58</td><td>15.41</td><td>11.24</td><td>27.17</td><td>-</td></tr><tr><td>ConE+CaQR(S)</td><td>55.86</td><td>17.27</td><td>14.95</td><td>39.84</td><td>50.91</td><td>24.77</td><td>17.76</td><td>14.86</td><td>11.95</td><td>27.58</td><td>1.5</td></tr><tr><td>ConE+CaQR(R)</td><td>55.28</td><td>16.94</td><td>14.77</td><td>39.95</td><td>50.98</td><td>24.31</td><td>16.42</td><td>15.02</td><td>11.41</td><td>27.23</td><td>0.2</td></tr><tr><td>ConE+CaQR</td><td>56.05</td><td>17.49</td><td>14.57</td><td>40.46</td><td>51.08</td><td>22.99</td><td>16.50</td><td>15.06</td><td>11.99</td><td>27.35</td><td>0.7</td></tr></table>
Table 1: MRR results $(\%)$ for answering conjunctive queries without negation $(\exists, \land, \lor)$ on FB15k-237 and NELL. $Imp$ denotes the percentage of improvement in average MRR compared to the base reasoning models. $+CaQR(S)$ denotes the model utilizing structure embedding. $+CaQR(R)$ indicates the model using relation-induced embedding. $+CaQR$ represents the model using both structure and relation-induced embeddings. The bold text highlights the best result for each type of query.
<table><tr><td>Dataset</td><td>Model</td><td>2in</td><td>3in</td><td>inp</td><td>pni</td><td>pin</td><td>Avg</td></tr><tr><td rowspan="8">FB15k-237</td><td>BetaE</td><td>5.19</td><td>7.94</td><td>7.44</td><td>3.60</td><td>3.55</td><td>5.54</td></tr><tr><td>BetaE+CaQR(S)</td><td>5.29</td><td>8.35</td><td>7.77</td><td>3.51</td><td>3.90</td><td>5.76</td></tr><tr><td>BetaE+CaQR(R)</td><td>5.42</td><td>8.30</td><td>7.83</td><td>3.60</td><td>3.89</td><td>5.81</td></tr><tr><td>BetaE+CaQR</td><td>5.49</td><td>8.24</td><td>8.01</td><td>3.77</td><td>3.91</td><td>5.88</td></tr><tr><td>ConE</td><td>5.78</td><td>9.57</td><td>7.95</td><td>3.85</td><td>4.41</td><td>6.31</td></tr><tr><td>ConE+CaQR(S)</td><td>6.25</td><td>9.62</td><td>7.60</td><td>3.97</td><td>4.03</td><td>6.30</td></tr><tr><td>ConE+CaQR(R)</td><td>6.84</td><td>10.44</td><td>7.66</td><td>4.49</td><td>4.79</td><td>6.85</td></tr><tr><td>ConE+CaQR</td><td>5.24</td><td>8.91</td><td>8.07</td><td>3.51</td><td>3.90</td><td>5.93</td></tr><tr><td rowspan="8">NELL</td><td>BetaE</td><td>5.23</td><td>7.64</td><td>10.12</td><td>3.27</td><td>3.09</td><td>5.87</td></tr><tr><td>BetaE+CaQR(S)</td><td>5.37</td><td>7.96</td><td>10.43</td><td>3.46</td><td>3.29</td><td>6.10</td></tr><tr><td>BetaE+CaQR(R)</td><td>4.91</td><td>7.63</td><td>10.06</td><td>3.17</td><td>3.02</td><td>5.76</td></tr><tr><td>BetaE+CaQR</td><td>5.50</td><td>7.62</td><td>10.87</td><td>3.70</td><td>3.30</td><td>6.20</td></tr><tr><td>ConE</td><td>5.70</td><td>8.01</td><td>10.96</td><td>3.83</td><td>3.58</td><td>6.40</td></tr><tr><td>ConE+CaQR(S)</td><td>6.02</td><td>8.11</td><td>11.54</td><td>4.01</td><td>3.72</td><td>6.88</td></tr><tr><td>ConE+CaQR(R)</td><td>6.10</td><td>8.35</td><td>11.02</td><td>4.07</td><td>3.65</td><td>6.64</td></tr><tr><td>ConE+CaQR</td><td>5.77</td><td>8.01</td><td>11.12</td><td>3.87</td><td>3.66</td><td>6.49</td></tr></table>
Table 2: MRR results (%) for answering conjunctive queries with negation.
# 5.3 Ablation Study
We conduct an ablation experiment on Q2B, BetaE, and ConE to dissect the roles of position, role, and type embeddings in building the structural context of the query graph, as shown in Figure 4. Interestingly, the results reveal that using any single embedding (position, role, or type) achieves performance comparable to using the combination of all three, demonstrating the effectiveness of each embedding option.
# 5.4 Hyper-parameter Sensitivity Study
Two considerations arise when applying our methodology, CaQR, to a query embedding-based model: the number of entities sampled to construct the relation-induced embedding and the dimension of the structure embedding.
Size of Entity Samples. We evaluate the effect of entity samples per relation when constructing relation-induced embedding from KG on $\mathrm{Q2B + CaQR(R)}$ . The number of entity samples varies to 60, 120, 240, and 480. The results are depicted in Figure 5 (a). For FB15k-237, we observe an improvement in performance on Q2B as the sample size increases, along with a notable variation in performance based on sample size. However, in the case of NELL, it is evident that the model's performance is relatively insensitive to the number of samples. The number of entities on the NELL dataset could be the factor of this result because the FB15k-237 dataset has a smaller number of entities than the NELL dataset.
Dimension of Structure Embeddings. Furthermore, we conduct a hyper-parameter sensitivity study on Q2B+CaQR(S), specifically focusing on
 (a) Q2B
 (b) BetaE
 (c) ConE
 (a) $\mathrm{Q2B + CaQR(R)}$ Figure 5: Effect of Hyper-parameters on Q2B+{CaQR(S), CaQR(R)}.
 Figure 4: Ablation study on the existence of Position, Role, and Type embedding. FB237 denotes the FB15k-237 dataset. +P, +Rol, +T and +S indicates the model with position embedding, role embedding, type embedding, and all the structure embeddings, respectively. (b) Q2B+CaQR(S)
the effect of position embedding, role embedding, and type embedding (i.e., structure embedding) dimensions. The dimensions are varied to 108, 200, 400, and 800, respectively. The results are presented in Figure 5 (b). For FB15k-237, the most optimal performance was observed with a dimension of 108 while significant performance degradation was evident with other dimensions. In the case of NELL, it is evident that the model's performance is relatively insensitive to changes in dimension.
# 6 Conclusion
In this paper, we introduced CaQR, a model-agnostic approach that leverages structural and relation-induced context within the query graph. By seamlessly fusing position, role, type, and relation-induced embeddings into the query representation, CaQR substantially improves the performance of query embedding-based multi-hop reasoning models across diverse query types.
# 7 Ethics Statement
Our model proposes a methodology that enhances the effectiveness of multi-hop logical reasoning by fully integrating the context of the FOL query graph. We do not additionally leverage any ex
ternal knowledge or information that might bias the evaluation of our model. However, while this approach can improve model performance, it may also inadvertently reinforce existing harmful biases in the knowledge graphs.
# 8 Limitation
With the two context modeling approaches, we have observed an increase in performance. Although these approaches are model-agnostic, they may offer relatively smaller improvements, similar to those seen in ConE. Moreover, they introduce additional hyperparameters, such as the dimensions of structure and relation-induced embeddings, which can result in $1 - 2\%$ fluctuation in Mean Reciprocal Rank (MRR).
# 9 Acknowledgement
This work was supported by the Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT): (No. 2019-0-00421, Artificial Intelligence Graduate School Program (Sungkyunkwan University)) and (No. RS-2023-00225441, Knowledge Information Structure Technology for the Multiple Variations of Digital Assets). This research was also supported by the Culture, Sports, and Tourism R&D Program through the Korea Creative Content Agency grant funded by the Ministry of Culture, Sports and Tourism in 2024 (Project Name: Research on neural watermark technology for copyright protection of generative AI 3D content, RS-2024-00348469, $25\%$
# References
Mingyang Chen, Wen Zhang, Yushan Zhu, Hongting Zhou, Zonggang Yuan, Changliang Xu, and Huajun Chen. 2022a. Meta-knowledge transfer for inductive knowledge graph embedding. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2022, Madrid, Spain, July 11 - 15, 2022, pages 927-937. Xuelu Chen, Ziniu Hu, and Yizhou Sun. 2022b. Fuzzy logic based logical query answering on knowledge graphs. In Proceedings of the 36th Association for the Advancement of Artificial Intelligence, AAAI 2022, Virtual Event, February 22 - March 1, 2022, pages 3939-3948. Nurendra Choudhary, Nikhil Rao, Sumeet Katariya, Karthik Subbian, and Chandan K. Reddy. 2021. Probabilistic entity representation model for reasoning over knowledge graphs. In Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, Virtual Event, pages 23440-23451. Vijay Prakash Dwivedi, Anh Tuan Luu, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. 2022. Graph neural networks with learnable structural and positional representations. In The 10th International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022. William L. Hamilton, Payal Bajaj, Marinka Zitnik, Dan Jurafsky, and Jure Leskovec. 2018. Embedding logical queries on knowledge graphs. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems, NeurIPS 2018, December 3-8, 2018, Montreal, Canada, pages 2030-2041. Tingting Liang, Yuanqing Zhang, Qianhui Di, Congying Xia, Youhuizi Li, and Yuyu Yin. 2023. Contrastive box embedding for collaborative reasoning. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2023, Taipei, Taiwan, July 23-27, 2023, pages 38-47. Lihui Liu, Boxin Du, Heng Ji, ChengXiang Zhai, and Hanghang Tong. 2021. Neural-answering logical queries on knowledge graphs. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD 2021, Virtual Event, Singapore, August 14-18, 2021, pages 1087-1097. Tomás Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. In *The 1st International Conference on Learning Representations*, ICLR 2013, Scottsdale, Arizona, USA, May 2-4, 2013, Workshop Track Proceedings. Gabriel Peyre and Marco Cuturi. 2019. Computational optimal transport: With applications to data science.
Foundations and Trends® in Machine Learning, 11(5-6):355-607. Hongyu Ren, Weihua Hu, and Jure Leskovec. 2020. Query2box: Reasoning over knowledge graphs in vector space using box embeddings. In The 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. Hongyu Ren and Jure Leskovec. 2020. Beta embeddings for multi-hop logical reasoning in knowledge graphs. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, Virtual Event, volume 33, pages 19716-19726. Jiawei Sheng, Shu Guo, Zhenyu Chen, Juwei Yue, Li-hong Wang, Tingwen Liu, and Hongbo Xu. 2020. Adaptive Attentional Network for Few-Shot Knowledge Graph Completion. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, pages 1681-1691. Arnab Sinha, Zhihong Shen, Yang Song, Hao Ma, Darrin Eide, Bo-June Paul Hsu, and Kuansan Wang. 2015. An overview of microsoft academic service (MAS) and applications. In Proceedings of the 24th International Conference on World Wide Web Companion, WWW 2015, Florence, Italy, May 18-22, 2015 - Companion Volume, pages 243-246. Zhenwei Tang, Griffin Floto, Armin Toroghi, Shichao Pei, Xiangliang Zhang, and Scott Sanner. 2023. Logicrec: Recommendation with users' logical requirements. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2023, Taipei, Taiwan, July 23-27, 2023, pages 2129-2133. Kristina Toutanova and Danqi Chen. 2015. Observed versus latent features for knowledge base and text inference. In Proceedings of the 3rd Workshop on Continuous Vector Space Models and their Compositionality, pages 57-66, Beijing, China. Denny Vrandecic and Markus Krötzsch. 2014. Wiki-data: a free collaborative knowledgebase. Commun. ACM, 57(10):78-85. Zihao Wang, Weizhi Fei, Hang Yin, Yangqiu Song, Ginny Y. Wong, and Simon See. 2023a. Wasserstein-fisher-rao embedding: Logical query embeddings with local comparison and global transport. In Findings of the Association for Computational Linguistics, ACL 2023, Toronto, Canada, July 9-14, 2023, pages 13679-13696. Zihao Wang, Yangqiu Song, Ginny Y. Wong, and Simon See. 2023b. Logical message passing networks with one-hop inference on atomic formulas. In The 11th International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023.
Bo Xiong, Mojtaba Nayyeri, Ming Jin, Yunjie He, Michael Cochez, Shirui Pan, and Steffen Staab. 2023. Geometric relational embeddings: A survey. CoRR, abs/2304.11949. Wenhan Xiong, Thien Hoang, and William Yang Wang. 2017. Deeppath: A reinforcement learning method for knowledge graph reasoning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pages 564-573. Yao Xu, Shizhu He, Cunguang Wang, Li Cai, Kang Liu, and Jun Zhao. 2023. Query2triple: Unified query encoding for answering diverse complex queries over knowledge graphs. In *Findings of the Association for Computational Linguistics*, EMNLP 2023, Singapore, December 6-10, 2023, pages 11369-11382. Dong Yang, Peijun Qing, Yang Li, Haonan Lu, and Xiaodong Lin. 2022. Gamae: Gamma embeddings for logical queries on knowledge graphs. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 745-760. Jiaxuan You, Rex Ying, and Jure Leskovec. 2019. Position-aware graph neural networks. In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 7134-7143. Zhanqiu Zhang, Jie Wang, Jiajun Chen, Shuiwang Ji, and Feng Wu. 2021. Cone: Cone embeddings for multi-hop reasoning over knowledge graphs. In Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, Virtual Event, pages 19172-19183. Zhaocheng Zhu, Mikhail Galkin, Zuobai Zhang, and Jian Tang. 2022. Neural-symbolic models for logical queries on knowledge graphs. In International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pages 27454-27478.
# A Experimental Details
We use the default parameters from the existing baseline. The hyperparameter search was conducted for the number of entity samples \{60, 120, 240, 480\} and for the dimension of the structure embedding \{108, 200, 400, 800\}. We use 120 for the entity sample size, 800 for structure embedding for ConE (Zhang et al., 2021), and 108 for the other baselines.
# A.1 Datasets
We use two datasets to study CaQR:
- FB15k-237 (Toutanova and Chen, 2015) consists of 14,505 entities, 237 relations, and 272,115 triplets when not considering the inverse of relations. In the process of obtaining relation-induced context information from the query graph, we utilize 544,230 triplets considering the inverse of relations. - NELL (Xiong et al., 2017) comprises 63,361 entities, 400 relations, and 114,213 edges without considering the inverse of relations. We utilize 228,426 triplets considering the inverses when obtaining relation-induced context information from the query graph.
# A.2 Query Dataset
The query data employed for the experiment comprises 14 types as illustrated in Figure 6 with 4 of them (i.e., $ip, pi, 2u$ , and $up$ ) exclusively utilized for evaluation purposes. The statistics of the query data are provided in Table 3.
 Figure 6: Query types used in experiments.
# A.3 Base Reasoning Models
Since our approach is model-agnostic, it can be applied to any query embedding-based multi-hop
Table 3: The Statistics of Query Datasets. Neg. means queries with negation operators.
<table><tr><td rowspan="2">Dataset</td><td colspan="2">Training</td><td colspan="2">Validation</td><td colspan="2">Test</td></tr><tr><td>w/o Neg.</td><td>Neg.</td><td>1p</td><td>others</td><td>1p</td><td>others</td></tr><tr><td>FB15k-237</td><td>273,710</td><td>27,371</td><td>59,078</td><td>8,000</td><td>66,990</td><td>8,000</td></tr><tr><td>NELL</td><td>149,689</td><td>14,968</td><td>20,094</td><td>5,000</td><td>22,804</td><td>5,000</td></tr></table>
reasoning model. Therefore, we evaluate the effectiveness of our approach on the Q2B (Ren et al., 2020), BetaE (Ren and Leskovec, 2020), and ConE (Zhang et al., 2021) models for conjunctive query types with path lengths 1, 2, and 3 (1p, 2p, 3p, 2i, 3i, 2in, 3in, inp, pni, pin, ip, pi, 2u, and up). Note that evaluations involving negations (2in, 3in, inp, pni, and pin) are excluded on Q2B due to their limitations of the inability to address negations.
# B Computation Graph
The computation graph shows a computationally feasible form of query graph using logical operators. Each query graph can be mapped into its corresponding computation graph (Ren et al., 2020), where each atomic formula is represented with relation projection, merged by intersection, and transformed negation by complement. The computation graph effectively demonstrates the computational procedure to resolve the query. In a computation graph, each node represents an embedding or a distribution over a set of entities in the KG, and each edge signifies a logical transformation (e.g., relational projection, intersection/union/negation operators) of this distribution. The computation graph for a FOL query resembles a tree. The root node of the computation graph represents the answer (or target) variable, with one or more anchor nodes provided by the FOL. Embeddings of entities and transformation operators are initialized; embeddings of anchor nodes are then input into the connected neural network of logical operators in a serial manner to obtain the final embeddings for the answer variable, thereby creating a query embedding. During training, models ensure the proximity of query embeddings to the ground truth. In the prediction stage, entities close to the query embedding are utilized for prediction. We follow the original implementations of the base reasoning models, such as Q2B, BetaE, and ConE. Four logical operators are used to express the first-order logic queries: relation projection operator, intersection operator, union operator, and negation operator.
- Relation projection operator. For a set of
entities $S\subseteq \mathcal{V}$ , and a relation type $r\in \mathcal{R}$ the relation projection operator produces all the neighboring entities $\cup_{v\in S}N(v,r)$ , where $N(v,r)\equiv \{v^{\prime}\in \mathcal{V}\mid r(v,v^{\prime}) = True\}$
- Intersection operator. For a set of entity sets, $\{S_1,S_2,\dots,S_n\}$ of size $n$ , the intersection operator outputs $\cap_{i = 1}^{n}S_{i}$ . - Union operator. Given a set of entity sets, $\{S_1,S_2,\dots,S_n\}$ of size $n$ , the union operator produces $\cup_{i = 1}^{n}S_{i}$ . - Negation operator. The negation operator outputs a complement set, $\overline{S} \equiv \mathcal{V} \backslash S$ , of a set of entities $S \subseteq \mathcal{V}$ .
# C Case Study
 Figure 7: 1p query and 2i query.
To investigate whether our model reflects the context of the query graph in its embeddings, we conduct a case study using the 1p query $\text{Contains}^{-1}(\text{Europe}, A)$ and the 2i query $\text{Contains}^{-1}(\text{Europe}, A) \land \text{Tenure}(\text{Enrico}, A)$ (Figure 7). When employing the conventional query embedding (Q2B) approach, it is not possible to capture the overall context of the query graph, thus resulting in the same query embedding for the $\text{Contains}^{-1}(\text{Europe}, A)$ in 1p and 2i queries. On the contrary, when applying our model, we observe the difference between $\text{Contains}^{-1}(\text{Europe}, A)$ embedding of 1p and 2i query indicating the incorporation of the query graph's context into the embeddings.
As shown in Figure 8a, through Q2B, it is impossible to obtain embedding that reflects the query graph context. Consequently, around the embedding of the $\text{Contains}^{-1}(\text{Europe}, A)$ branch (black), entities unrelated to the branch $\text{Tenure}(\text{EnricoFermi}, A)$ , which are not in the domain of University are mapped in close proximity. Conversely, upon applying our model, as depicted in Figure 8b, an adaptation based on the context of the query graph becomes apparent. The embedding of the
 Figure 8: The embedding results of two models for a branch $Contains^{-1}(Europe, A)$ in the $2i$ query.
Contains $^{-1}$ (Europe, A) branch (black) is influenced by the Tenure(EnricoFermi, A) branch, leading to entities associated with University close to the query embedding. This case shows the capacity to obtain refined representations by incorporating query context, yielding more accurate answers.
# D Variance Loss
Our approach ensures that the centers of query embedding, whether they are central points within the coordinate system, the averages of probability distributions, or the central axis of a cone in a polar coordinate, experience nuanced adjustments based on the contextual information inherent to the query. This leads to an enhanced representation by integrating both the overall structural and the relation-induced context within the query graph. However, the probability-based query embedding approach, such as BetaE (Ren and Leskovec, 2020), employs parameters $(\alpha, \beta)$ of multiple beta distributions as query embeddings. In this method, when the embedding changes, it not only affects the centers but also alters the variances. Consequently, to mitigate unintended shifts in variance hindering the convergence of a model, we introduce a variance loss to BetaE. The adjusted embedding, $\mathbf{q}_A'$ , does not deviate significantly from the offset of the query embedding composed of the parameters learned by
the BetaE, $\mathbf{q}_A$ , as follows:
$$\mathcal {L} _ {v a r} = \left| \left| V a r \left(\mathbf {q} _ {A}\right) - V a r \left(\mathbf {q} _ {A} ^ {\prime}\right) \right| \right| _ {2}, \tag {13}$$
where $Var(\cdot)$ returns a vector of variances of beta distributions consisting of Beta embedding. The loss considering Equation (13) is as follows:
$$\mathcal {L} = \mathcal {L} _ {q e} + \lambda \mathcal {L} _ {v a r}, \tag {14}$$
where the $\lambda$ is a hyper-parameter that determines the weighting of the variance loss. Details about Equation (13) are provided in Appendix A. Detailed formula of Equation (13) can be written as follow:
$$\mathbf {q} _ {A} = \left[ \left(\alpha_ {1}, \beta_ {1}\right), \dots , \left(\alpha_ {d}, \beta_ {d}\right) \right], \tag {15}$$
$$\mathbf {q} _ {A} ^ {\prime} = \left[ \left(\alpha_ {1} ^ {\prime}, \beta_ {1} ^ {\prime}\right), \dots , \left(\alpha_ {d} ^ {\prime}, \beta_ {d} ^ {\prime}\right) \right]. \tag {16}$$
Here, $\mathbf{q}_A$ and $\mathbf{q}_A^\prime$ are embedding learned by the BetaE, and adjust query embedding of answer node A of query graph, as described in Section 4.4 of the main text. $d$ is the dimension of BetaE, the number of beta distributions representing the query. When $\text{Beta}_i$ is an alpha distribution parameterized by $\alpha_{i}$ and $\beta_{i}$ , variance of $\mathbf{q}_A$ and $\mathbf{q}_A^\prime$ are as follow:
$$\operatorname {V a r} \left(\mathbf {q} _ {A}\right) = \left[ \sigma \left(\text {B e t a} _ {1}\right), \dots , \sigma \left(\text {B e t a} _ {d}\right) \right] \tag {17}$$
$$V a r \left(\mathbf {q} _ {A} ^ {\prime}\right) = \left[ \sigma \left(B e t a _ {1} ^ {\prime}\right), \dots , \sigma \left(B e t a _ {d} ^ {\prime}\right) \right], \tag {18}$$
where $\sigma (\cdot)$ is a variance of a probability distribution, and
$$\sigma \left(\operatorname {B e t a} _ {i}\right) = \frac {\alpha_ {i} \beta_ {i}}{\left(\alpha_ {i} + \beta_ {i}\right) ^ {2} \left(\alpha_ {i} + \beta_ {i} + 1\right)}, \tag {19}$$
$$\sigma \left(\operatorname {B e t a} _ {i} ^ {\prime}\right) = \frac {\alpha_ {i} ^ {\prime} \beta_ {i} ^ {\prime}}{\left(\alpha_ {i} ^ {\prime} + \beta_ {i} ^ {\prime}\right) ^ {2} \left(\alpha_ {i} ^ {\prime} + \beta_ {i} ^ {\prime} + 1\right)}. \tag {20}$$
Then, we add the L2 norm of variance difference between the query embedding constructed with pretrained BetaE and the adjusted query embedding to the query-answering loss as described in Equation (14) with coefficient $\lambda$ .
# E Inference Time Comparison
We evaluate the inference times of both the baseline and the baseline with our methodology applied, showcasing the outcomes in Table 4.
# F Further Experiment
In addition to experiments conducted on Q2B, BetaE, and ConE, we further performed experiments applying our CaQR to the FuzzQE (Chen et al., 2022b) using the FB15k-237 dataset. The experimental results are on the Table 5. We observe performance improvements even for FuzzQE.
<table><tr><td rowspan="2">Model</td><td colspan="3">Inference Time (ms)</td></tr><tr><td>3p</td><td>3i</td><td>ip</td></tr><tr><td>Q2B</td><td>2.0 (± 1.6)</td><td>2.3 (± 1.3)</td><td>2.6 (± 1.9)</td></tr><tr><td>Q2B + CaQR(S)</td><td>3.3 (± 2.3)</td><td>2.9 (± 2.5)</td><td>3.8 (± 2.7)</td></tr><tr><td>Q2B + CaQR(R)</td><td>5.4 (± 4.3)</td><td>3.4 (± 2.4)</td><td>3.6 (± 1.5)</td></tr><tr><td>Q2B + CaQR</td><td>9.6 (± 6.9)</td><td>4.6 (± 3.2)</td><td>6.5 (± 4.7)</td></tr></table>
Table 4: Averages and standard deviations of inference time on 1,000 queries involving complex query types $(3p, 3i, ip)$ . CaQR(S) denotes the model with position, role, and type embedding. CaQR(R) indicates the model with relation-induced embedding. Table 5: MRR results $(\%)$ of applying CaQR to FuzzQE on FB15k-237 dataset. Avg_P, Avg_N, and Avg represent the average results for query types without negation, query types with negation, and all query types, respectively.
<table><tr><td>Model</td><td>Avg_P</td><td>Avg_N</td><td>Avg</td><td>Imp(%)</td></tr><tr><td>FuzzQE</td><td>21.19</td><td>6.91</td><td>16.09</td><td>-</td></tr><tr><td>FuzzQE+CaQR</td><td>23.10</td><td>7.13</td><td>17.39</td><td>8.1</td></tr></table>123version https://git-lfs.github.com/spec/v1oid sha256:ebf4e058d59e64c202ba3ef931617262d4d8c96228d29f277fc570344cc95e7dsize 742292123version https://git-lfs.github.com/spec/v1oid sha256:0f467a6d3b444f5079cf8547ade66dc46f538b5edf0c418d9bd8b8def519cf7fsize 1226771123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453# Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features
Mengyu Bu $^{1,3}$ , Shuhao Gu $^{1,3\dagger}$ , Yang Feng $^{1,2,3*}$
<sup>1</sup>Key Laboratory of Intelligent Information Processing,
Institute of Computing Technology, Chinese Academy of Sciences (ICT/CAS)
$^{2}$ Key Laboratory of AI Safety, Chinese Academy of Sciences <sup>3</sup> University of Chinese Academy of Sciences, Beijing, China
[bumengyu23z, fengyang]@ict.ac.cn, shuhaog515@gmail.com
# Abstract
The many-to-many multilingual neural machine translation can be regarded as the process of integrating semantic features from the source sentences and linguistic features from the target sentences. To enhance zero-shot translation, models need to share knowledge across languages, which can be achieved through auxiliary tasks for learning a universal representation or cross-lingual mapping. To this end, we propose to exploit both semantic and linguistic features between multiple languages to enhance multilingual translation. On the encoder side, we introduce a disentangling learning task that aligns encoder representations by disentangling semantic and linguistic features, thus facilitating knowledge transfer while preserving complete information. On the decoder side, we leverage a linguistic encoder to integrate low-level linguistic features to assist in the target language generation. Experimental results on multilingual datasets demonstrate significant improvement in zero-shot translation compared to the baseline system, while maintaining performance in supervised translation. Further analysis validates the effectiveness of our method in leveraging both semantic and linguistic features. $^{1}$
# 1 Introduction
The many-to-many multilingual neural machine translation (NMT) enables translation across multiple languages in a single model (Firat et al., 2016; Fan et al., 2021; Siddhant et al., 2020). This process involves integrating the semantic information from the source sentence and the linguistic features from the target sentence. Specifically, the encoder captures the semantic information of the source sentence and maps it to the representation space, when
the decoder integrates this representation with the inherent features of the target language to generate the target language sentences. By sharing parameters, multilingual NMT models enable knowledge transfer across languages, which significantly benefits low-resource machine translation (Aharoni et al., 2019), especially zero-shot translation. However, previous multilingual NMT models do not explicitly differentiate between semantic and linguistic features, resulting in the entanglement of knowledge and linguistics within the model. This entanglement negatively affects the performance of zero-shot translation in two main aspects. Firstly, the linguistic features of the source language interfere with the encoder's ability to learn shared semantic information, causing the encoder to encode different languages into different representation subspaces (Kudugunta et al., 2019), which hinders knowledge transfer across multiple languages. Secondly, during the generation of the target language, the decoder is influenced by spurious correlations due to insufficient target language features, leading to off-target issues (Zhang et al., 2020).
Numerous methods have been proposed to address these challenges. Some methods focus on learning a universal cross-lingual representation space at the encoder (Arivazhagan et al., 2019; Pan et al., 2021; Pham et al., 2019; Gu and Feng, 2022), while others aim to facilitate target language generation at the decoder (Yang et al., 2021a; Gao et al., 2023). For example, Pan et al. (2021) employ contrastive learning to minimize the distance between parallel sentence pairs and maximize the distance between irrelevant sentence pairs. Gu and Feng (2022) leverage optimal transport theory to learn a universal representation and introduce an agreement-based training approach to make consistent predictions. Gao et al. (2023) promote consistent cross-lingual representation by cross-lingual consistency regularization. However, these methods primarily concentrate on learning
 Figure 1: The framework of our method. We propose a disentangler to learn a universal semantic representation via disentangling and utilize a linguistic encoder to fuse low-level linguistic features.
language-agnostic semantic features while neglecting the language-specific linguistic features. Such incompleteness of information can lead to less accurate semantic mapping and alignment degradation, which can harm the supervised and zero-shot translation performance.
In this paper, we propose to utilize both semantic and linguistic features for multilingual NMT. Our insight is to learn a semantic representation space non-destructively and utilize linguistic features to guide target language generation, thereby improving the performance of zero-shot translation and maintaining supervised translation performance lossless. Specifically, at the encoder, we introduce a disentangler and disentangling learning task to facilitate harmless cross-lingual semantic alignment. At the decoder, we utilize a linguistic encoder to integrate low-level linguistic features from lower layers and high-level semantic features from higher layers. This fusion provides implicit guidance for the target language generation.
Experiments on multilingual datasets show that our method brings an average of $0.18+$ BLEU in the supervised translation direction and an average of $3.74+$ BLEU in the zero-shot translation direction compared with the baseline system. Furthermore, the analysis demonstrates that our method can alleviate the problems caused by the entanglement of semantic and linguistic features, obtain a better semantic representation, and reduce the off-target rate in zero-shot translation.
# 2 Background
In this section, we will give a brief introduction to the Transformer (Vaswani et al., 2017) model for NMT and many-to-many multilingual NMT.
# 2.1 Transformer for NMT
Define the set $\mathcal{D}$ of parallel corpus with input sentence $\mathbf{x}_i^u$ and reference $\mathbf{y}_i^v$ , where $u$ and $v$ denote language type and $i$ denotes the sentence id, which is the same for a sentence pair. The model first maps the source sentence $\mathbf{x}_i^u$ from the token representation to the token vector representation $\text{embed}(\mathbf{x}_i^u)$ . After that, the encoder encodes the token vector sequence into the hidden state representation $\mathbf{h}(\mathbf{x}_i^u)$ . Similarly, the model maps the predicted $k - 1$ target words into a sequence of token vectors, and the decoder decodes the $k$ th target word based on the sequence of hidden states $\mathbf{h}(\mathbf{x}_i^u)$ from the encoder and the predicted sequence of $k - 1$ target words. The model repeats this process until the $\langle eos\rangle$ token is predicted. The model is optimized by minimizing the cross-entropy (CE) loss between the predicted sentence and the reference as follows:
$$\mathcal {L} _ {c e} = - \sum_ {\mathbf {x} _ {i} ^ {u}, \mathbf {y} _ {i} ^ {v} \in \mathcal {D}} \log \left(P _ {\theta} \left(\mathbf {y} _ {i} ^ {v} \mid \mathbf {x} _ {i} ^ {u}\right)\right) \tag {1}$$
where $\theta$ denotes the model parameters.
# 2.2 Many-to-Many Multilingual NMT
The many-to-many multilingual NMT model supports translation between multiple languages. For
 Figure 2: The architecture of disentangler. $\oplus$ denotes the summation of the feature dimensions.
mally, we define the set of languages $L = \{L_1, \dots, L_M\}$ , where $M$ is the number of languages. We prepend a language token at the beginning of the source sentence and the target sentence to indicate the language type respectively. For example, the following sentence pair translated from English to French: "Hello world! → Bonjour le monde!" is transformed into "⟨en⟩ Hello world! → ⟨fr⟩ Bonjour le monde!".
# 3 Method
The core idea of our approach is to improve multilingual NMT by exploiting semantic and linguistic features at the same time. To achieve this, we disentangle semantic and linguistic features for the encoder and utilize low-level linguistic features for the decoder. Specifically, we propose a disentangler at the encoder to facilitate lossless semantic alignment. Meanwhile, we introduce a linguistic encoder at the decoder to fuse low-level features to guide target language generation. Figure 1 illustrates the framework of our approach.
# 3.1 Disentangling Semantic and Linguistic Features
Empirically, sentences possess both semantic and linguistic properties, which can be expressed as "sentence = semantics + linguistics". Semantic features encompass the meanings of language units that are shared across languages, while linguistic features comprise the rules for constructing sentences, such as lexical labels and morphological information. By disentangling linguistic features from sentences, we can obtain a universal semantic representation shared by different languages. Referring to the design of Tiyajamorn et al. (2021) on multilingual language understanding tasks, we
extract semantic and linguistic features separately and implement interactive decomposition using reconstruction constraints.
The structure of our disentangler is shown in Figure 2. The disentangler consists of two feed-forward networks (FFN), a semantic FFN and a language FFN, respectively. For the encoder representations, the former extracts language-agnostic semantic information, and the latter extracts language-specific linguistic features. Then, the two outputs are summed to reconstruct the original encoder representations. The extracted semantic features are fed into the decoder.
We define disentangling loss $\mathcal{L}_{det}$ to optimize disentangler by multi-task learning:
$$\mathcal {L} _ {d e t} = \mathcal {L} _ {s e m} + \mathcal {L} _ {l a n g} + \lambda_ {1} \mathcal {L} _ {r e c o n s} \tag {2}$$
where $\mathcal{L}_{sem}$ assists the semantic FFN to extract semantic information, $\mathcal{L}_{lang}$ assists the language FFN to extract linguistic features, $\mathcal{L}_{recons}$ is the reconstruction constraint, and $\lambda_{1}$ is the hyperparameter to balance the losses.
Semantic Learning To learn a universal representation space across multiple languages, we explicitly minimize the distance of parallel sentence pairs and maximize the distance of irrelevant sentence pairs. For the multilingual parallel dataset $\mathcal{D}$ , we make the parallel sentence pair $(\mathbf{x}_i^u,\mathbf{y}_i^v)\in \mathcal{D}$ a positive example and randomly choose a sentence $\mathbf{y}_j^w$ from language $L_{w}$ as a negative example $(\mathbf{x}_i^u,\mathbf{y}_j^w)$ , where $L_{u}$ can be the same as $L_{w}$ . We optimize by minimizing the following loss function:
$$\begin{array}{l} \mathcal {L} _ {s e m} = \mathbb {E} _ {\mathbf {x} _ {i} ^ {u}, \mathbf {y} _ {i} ^ {v} \in \mathcal {D}} (1 - s i m ^ {+} (\mathcal {R} (\mathbf {x} _ {i} ^ {u}), \mathcal {R} (\mathbf {y} _ {i} ^ {v})) + \\ \lambda_ {2} \mathbb {E} _ {\mathbf {x} _ {i} ^ {u}, \mathbf {y} _ {j} ^ {w} \in \mathcal {D}} (1 + s i m ^ {-} (\mathcal {R} (\mathbf {x} _ {i} ^ {u}), \mathcal {R} (\mathbf {y} _ {j} ^ {w}))) \tag {3} \\ \end{array}$$
where $sim(\cdot)$ calculates the similarity of different sentences, and we use cosine similarity to evaluate the similarity. + and - denote positive and negative samples, respectively. $\mathcal{R}(\cdot)$ calculates the average-pooled hidden state representation. $\lambda_{2}$ is the hyperparameter that balances positive and negative samples. To simplify the implementation in the training, we sample the positive and negative samples within every training batch.
Language Learning Empirically, different languages have different linguistic features, such as lexical and syntactic patterns. Compared with sentences in different languages, the linguistic features are more similar between sentences in the same
language. To extract linguistic features of multiple languages, we design the training objective similar to semantic learning. We minimize the distance of sentences in the same language and maximize the distance of sentences in different languages. We make the same language sentence pair $(\mathbf{x}_i^u,\mathbf{y}_j^u)\in \mathcal{D}$ a positive example and choose a random sentence $\mathbf{y}_k^v$ from any other language $L_{k}$ as a negative example $(\mathbf{x}_i^u,\mathbf{y}_k^v)$ . We optimize by minimizing the following loss function:
$$\begin{array}{l} \mathcal {L} _ {l a n g} = \mathbb {E} _ {\mathbf {x} _ {i} ^ {u}, \mathbf {y} _ {j} ^ {u} \in \mathcal {D}} (1 - s i m ^ {+} (\mathcal {R} (\mathbf {x} _ {i} ^ {u}), \mathcal {R} (\mathbf {y} _ {j} ^ {u})) + \\ \lambda_ {2} \mathbb {E} _ {\mathbf {x} _ {i} ^ {u}, \mathbf {y} _ {k} ^ {v} \in \mathcal {D}} (1 + s i m ^ {-} (\mathcal {R} (\mathbf {x} _ {i} ^ {u}), \mathcal {R} (\mathbf {y} _ {k} ^ {v}))) \tag {4} \\ \end{array}$$
Where $sim(\cdot), +, -$ and $\mathcal{R}(\cdot)$ are defined the same as semantic learning. $\lambda_{2}$ is a shared hyperparameter. We sample the positive and negative samples within every training batch.
Reconstruction Constraint To make the semantic and linguistic features fully interact and learn a more reasonable semantic representation, we design the reconstruction constraint to utilize the linguistic features. We input the encoded hidden state $\mathbf{h}(x_i^u)$ from the encoder into the disentangler, extract the semantic information $\mathbf{h}_{sem}(x_i^u)$ and the language features $\mathbf{h}_{lang}(x_i^u)$ respectively, and reconstruct the original encoder representation by summation. We perform optimization by minimizing the following loss function:
$$\mathcal {L} _ {\text {r e c o n s}} = \mathbb {E} _ {\mathbf {x} _ {i} ^ {u} \in \mathcal {D}} \left(\frac {1}{d} \| \mathbf {h} \left(\mathbf {x} _ {i} ^ {u}\right)\right) - \tag {5}$$
$$\mathbf {h} _ {s e m} \left(\mathbf {x} _ {i} ^ {u}\right) - \mathbf {h} _ {l a n g} \left(\mathbf {x} _ {i} ^ {u}\right) | | _ {2})$$
Where $d$ denotes the average sequence length.
# 3.2 Integrating Linguistic Features
In multilingual NMT models, decoders need to map the semantic representation to the target language representation. For zero-shot translation, since the model has not seen the translation direction during training, it is difficult to model the mapping relationships well, leading to the off-target phenomenon (Gu et al., 2019). Previous works show that the off-target rate is strongly correlated with the zero-shot translation performance (Zhang et al., 2020; Wu et al., 2021; Wang et al., 2022). Therefore, we hope to reduce the off-target rate by fusing additional information to guide the decoder to generate the target language.
Zhang et al. (2021) show that the lower encoder layers will focus more on linguistic information,
which is crucial to distinguishing different languages. Therefore, we introduce a linguistic encoder with two encoder layers, which has the same input as the decoder. We utilize a fusion layer to integrate the low-level representations containing more linguistic features and the high-level representations containing more semantic features. We denote the linguistic encoder output as $\mathbf{h}_{\text {lingEnc }}$ and the decoder output as $\mathbf{h}_{\text {dec }}$ . We concatenate these features in the feature dimension and utilize a two-layer FFN for fusion:
$$\mathbf {h} = \mathrm {W} _ {1} \left(\operatorname {R e L U} \left(\mathrm {W} _ {2} \left(\left[ \mathbf {h} _ {\text {d e c}}; \mathbf {h} _ {\text {l i n g E n c}} \right]\right)\right)\right) \tag {6}$$
Where $\mathbf{W}_1\in \mathbb{R}^{d\times d_h}$ and $\mathbf{W}_2\in \mathbb{R}^{2d_h\times d}$ are two feed-forward layers.
# 3.3 Joint Training Strategy
We optimize the final loss function using a joint training strategy, including cross-entropy loss and disentangling loss:
$$\mathcal {L} = \mathcal {L} _ {c e} + \lambda d \mathcal {L} _ {d e t} \tag {7}$$
where $\lambda$ is the hyperparameter that controls the contribution of $\mathcal{L}_{det}$ . Since $\mathcal{L}_{ce}$ is calculated at the token level and $\mathcal{L}_{det}$ is calculated at the sentence level, we multiply $\mathcal{L}_{det}$ by the average sequence length $d$ .
# 4 Experiment
We evaluate the performance of our model on the multilingual benchmarks, including supervised and zero-shot translation performance.
# 4.1 Dataset Description
We conduct experiments on the IWSLT2017, OPUS-7, and PC-6 datasets. The brief information about these datasets is shown in Appendix A.
IWSLT2017 The IWSLT2017 benchmark (Cettolo et al., 2017) contains five languages: German (De), English (En), Dutch (Nl), Romanian (Ro), and Italian (It). We experiment on the English-centric dataset consisting of eight supervised translation directions and twelve zero-shot translation directions. The training set contains $0.22\mathrm{M}\sim 0.26\mathrm{M}$ parallel sentence pairs per language direction. We use the official validation set and test set.
OPUS-7 The OPUS-7 dataset is a subset of the OPUS-100 dataset (Pan et al., 2021). The OPUS-7 dataset is English-centric and contains seven languages: Arabic (Ar), German (De), English (En),
French (Fr), Dutch (Nl), Russian (Ru), and Chinese (Zh). This dataset contains twelve supervised translation directions and thirty zero-shot translation directions. The training set contains 1M parallel sentence pairs per language direction. We use the official validation set and test set.
PC-6 We construct the PC-6 dataset following (Gu and Feng, 2022). PC-6 is a dataset of six languages extracted from PC32 (Pan et al., 2021), including Czech (Cs), Kazakh (Kk), Romanian (Ro), Russian (Ru), and Turkish (Tr). The PC-6 dataset contains ten supervised translation directions and twenty zero-shot translation directions. The amount of data in each language direction varies in size from 0.12M to 1.84M sentence pairs. For the supervised translation, we use the official WMT2016~2019 validation set and test set. For the zero-shot translation, we extract from WikiMatrix (Schwenk et al., 2021) to obtain the test set.
We directly apply the Unigram Model algorithm to preprocess the original multilingual corpus using Sentencepiece toolkit (Kudo and Richardson, 2018). We build a shared dictionary across multiple languages, which contains 32K tokens.
# 4.2 Model Configuration
We use the base Transformer configuration (Vaswani et al., 2017) for both the encoder and decoder. For the disentangler and the fusion layer, we set $f \, fn\_dim = 2048$ . For the linguistic encoder, we apply two encoder layers of the base Transformer configuration. We use the Adam optimizer and set $\beta = (0.9, 0.98)$ . We set $\text{warmup} = 4000$ and use the inverse square root learning scheduler with the learning rate set to $7e^{-4}$ . We apply label-smoothed cross-entropy loss with a smoothing rate of 0.1. We set dropout $= 0.3$ for the IWSLT2017 dataset and dropout $= 0.1$ for the OPUS-7 and PC-6. We set $\lambda = 0.05$ , $\lambda_1 = 0.2$ and $\lambda_2 = 0.2$ for our system. We train the models on 4 RTX3090 GPUs.
In the inference stage, we use beam search with beam size 5 and set the length penalty to 1. We report the BLEU (Papineni et al., 2002), ChrF (Popovic, 2015) and COMET (Rei et al., 2022) scores for comprehensive evaluation. The BLEU and ChrF scores are computed using the SacreBLEU toolkit (Post, 2018). We select the best-performing three checkpoints on the validation set.
tion sets from the last six checkpoints and report the average scores on the test sets.
# 4.3 Contrast Systems
We compare our model with the following multilingual NMT systems. We prepend a language token at the beginning of the sentences for NMT systems.
m-Transformer (Johnson et al., 2017) This method utilizes cross-entropy loss to train a Transformer model on multilingual datasets.
Pivot Translation (Cheng et al., 2017) This method transforms zero-shot translation into English-centric two-stage translation. The translation model is m-Transformer.
Contrastive Learning (mRASP2 w/o AA) (Pan et al., 2021) This method introduces contrastive learning to learn a universal representation space for the encoder. For a fair comparison, we do not use the aligned augmentation (AA).
Target Language Prediction (TLP) (Yang et al., 2021a) This method leverages a target language prediction task to help the decoder retain information about the target language.
Denoising Training (DT) (Wang et al., 2021) This method introduces a denoising auto-encoder task during training. Specifically, they utilize all English sentences to construct the denoising corpus via text infilling operation.
CrossConST (Gao et al., 2023) This approach adds KL divergence loss to the Softmax layer to promote consistent cross-lingual representation:
$$\mathcal {L} _ {k l} = \gamma \mathbf {K L} \left(P _ {\theta} (\mathbf {x}, \mathbf {y}) \| P _ {\theta} (\mathbf {y}, \mathbf {y})\right) \tag {8}$$
Where $\gamma$ is the hyperparameter controlling the proportion of $\mathcal{L}_{kl}$ . We set $\gamma = 0.25$ on IWSLT2017, $\gamma = 0.06$ on OPUS-7 and $\gamma = 0.1$ on PC-6. We jointly train $\mathcal{L}_{ce}$ and $\mathcal{L}_{kl}$ .
Alpaca (Taori et al., 2023) Alpaca is fine-tuned by Stanford from LLaMA-7B (Touvron et al., 2023) with 52k instruction data. We reproduce Alpaca using the LoRA (Hu et al., 2022) setting.
ChatGPT We use the GPT-3.5-Turbo API<sup>3</sup> for translation experiments. Our translation prompt for Alpaca and ChatGPT is reported in Appendix B.
<table><tr><td>IWSLT2017</td><td>De ↔ It</td><td>De ↔ Nl</td><td>De ↔ Ro</td><td>It ↔ Nl</td><td>It ↔ Ro</td><td>Nl ↔ Ro</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>16.94</td><td>20.89</td><td>17.02</td><td>17.58</td><td>17.32</td><td>17.83</td><td>17.93</td><td>34.32</td></tr><tr><td>mRASP2 w/o AA</td><td>21.39</td><td>24.67</td><td>21.40</td><td>22.43</td><td>22.70</td><td>21.87</td><td>22.41</td><td>34.06</td></tr><tr><td>TLP</td><td>19.52</td><td>23.41</td><td>19.08</td><td>20.75</td><td>20.34</td><td>20.29</td><td>20.56</td><td>34.29</td></tr><tr><td>DT</td><td>18.76</td><td>22.05</td><td>18.65</td><td>20.04</td><td>20.31</td><td>19.83</td><td>19.94</td><td>34.17</td></tr><tr><td>CrossConST</td><td>20.93</td><td>24.10</td><td>20.65</td><td>21.98</td><td>21.68</td><td>21.40</td><td>21.73</td><td>34.10</td></tr><tr><td>Pivot</td><td>21.80</td><td>24.14</td><td>21.23</td><td>22.63</td><td>22.19</td><td>22.27</td><td>22.37</td><td>-</td></tr><tr><td>Alpaca</td><td>14.50</td><td>17.94</td><td>12.88</td><td>14.46</td><td>13.44</td><td>12.18</td><td>14.23</td><td>27.37</td></tr><tr><td>ChatGPT</td><td>23.85</td><td>27.01</td><td>23.21</td><td>25.17</td><td>24.72</td><td>24.83</td><td>24.79</td><td>35.26</td></tr><tr><td>Ours</td><td>21.55</td><td>25.18</td><td>21.50</td><td>22.84</td><td>22.66</td><td>22.46</td><td>22.70</td><td>34.25</td></tr><tr><td>OPUS-7</td><td>x → Ar</td><td>x → De</td><td>x → Fr</td><td>x → Nl</td><td>x → Ru</td><td>x → Zh</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>12.73</td><td>14.58</td><td>23.11</td><td>15.82</td><td>17.24</td><td>16.44</td><td>16.65</td><td>31.91</td></tr><tr><td>mRASP2 w/o AA</td><td>14.20</td><td>16.54</td><td>25.67</td><td>17.46</td><td>19.29</td><td>17.72</td><td>18.48</td><td>31.48</td></tr><tr><td>TLP</td><td>13.10</td><td>14.32</td><td>22.71</td><td>15.82</td><td>17.29</td><td>16.29</td><td>16.59</td><td>31.90</td></tr><tr><td>DT</td><td>13.84</td><td>15.06</td><td>23.95</td><td>16.24</td><td>18.29</td><td>17.85</td><td>17.54</td><td>31.96</td></tr><tr><td>CrossConST</td><td>13.68</td><td>15.04</td><td>23.67</td><td>16.50</td><td>17.67</td><td>16.03</td><td>17.10</td><td>32.12</td></tr><tr><td>Pivot</td><td>15.79</td><td>17.48</td><td>27.81</td><td>18.50</td><td>20.98</td><td>15.71</td><td>19.38</td><td>-</td></tr><tr><td>Ours</td><td>14.79</td><td>16.64</td><td>26.20</td><td>17.42</td><td>20.11</td><td>17.40</td><td>18.76</td><td>32.13</td></tr><tr><td>PC-6</td><td>x → Cs</td><td>x → Kk</td><td>x → Ro</td><td>x → Ru</td><td>x → Tr</td><td>Zero-shot Average</td><td>Supervised Average</td><td></td></tr><tr><td>m-Transformer</td><td>8.05</td><td>4.27</td><td>11.05</td><td>10.91</td><td>5.45</td><td>7.94</td><td>20.38</td><td></td></tr><tr><td>mRASP2 w/o AA</td><td>14.27</td><td>2.85</td><td>15.67</td><td>16.12</td><td>8.22</td><td>11.42</td><td>19.93</td><td></td></tr><tr><td>TLP</td><td>9.67</td><td>4.27</td><td>11.35</td><td>10.79</td><td>6.17</td><td>8.45</td><td>20.68</td><td></td></tr><tr><td>DT</td><td>12.57</td><td>4.85</td><td>14.32</td><td>15.63</td><td>7.78</td><td>11.03</td><td>20.22</td><td></td></tr><tr><td>CrossConST</td><td>13.03</td><td>2.29</td><td>14.56</td><td>13.41</td><td>7.41</td><td>10.14</td><td>20.50</td><td></td></tr><tr><td>Pivot</td><td>13.73</td><td>2.13</td><td>15.91</td><td>15.20</td><td>8.30</td><td>11.05</td><td>-</td><td></td></tr><tr><td>Ours</td><td>14.13</td><td>4.20</td><td>16.92</td><td>16.72</td><td>9.44</td><td>12.28</td><td>20.77</td><td></td></tr></table>
Table 1: Overall performance on the multilingual test sets. We report the BLEU scores. "Zero-shot Average" and "Supervised Average" denote the average BLEU scores on the zero-shot and supervised directions. The "x" in the last two tables denotes all languages except for the target language. We bold the highest BLEU scores except for Alpaca, ChatGPT and Pivot.
# 4.4 Main Results
The results of the main experiment are shown in Table 1. For OPUS-7 and PC-6, we report the average BLEU scores for the same target language for convenience, and detailed results for the zero-shot translation directions are shown in Appendix C. The ChrF and COMET results are presented in Appendix D.
The results show that our system significantly improves zero-shot translation performance and maintains supervised translation performance. Specifically, in the supervised translation direction, the performance of our system is comparable to that of m-Transformer, which suggests that our disentangling approach mitigates alignment degradation and maintains the supervised translation perfor
mance. In the zero-shot translation direction, our system significantly outperforms all the contrast models, indicating that our additional modeling of linguistic features can assist the model in learning better semantic representation and language generation. Moreover, our method even outperforms the Pivot system on IWSLT2017 and PC-6, which we believe is probably because Pivot accumulates too many errors on these two datasets.
The results of large language models (LLMs) indicate that our task-specific model still has advantages in the era of LLMs. Our model significantly outperforms Alpaca-7B in supervised and zero-shot translation. Compared to the ChatGPT, our model achieves more than $90\%$ performance with just about $0.1\%$ of the parameters. Furthermore, our model employs significantly less data
<table><tr><td>Model</td><td>Disentangler</td><td>Disentangling Objective</td><td>Linguistic Encoder</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>X</td><td>X</td><td>X</td><td>17.93</td><td>34.32</td></tr><tr><td>m-Transformer†</td><td>X</td><td>X</td><td>X</td><td>17.03</td><td>34.33</td></tr><tr><td>①</td><td>✓</td><td>X</td><td>X</td><td>19.88</td><td>34.39</td></tr><tr><td>②</td><td>✓</td><td>✓</td><td>X</td><td>21.86</td><td>34.45</td></tr><tr><td>③</td><td>X</td><td>X</td><td>✓</td><td>21.27</td><td>34.34</td></tr><tr><td>④</td><td>✓</td><td>X</td><td>✓</td><td>21.92</td><td>34.23</td></tr><tr><td>⑤</td><td>✓</td><td>✓</td><td>✓</td><td>22.70</td><td>34.25</td></tr></table>
and inference is much faster.
# 5 Analysis
In this section, we will analyze what contributes to the performance. We first analyze the effects of each module via an ablation study. Then, we evaluate the off-target rate and visualize the encoder and decoder sentence representations, demonstrating that our approach learns universal representations and generates target language more accurately. Finally, we examine some translation cases to show the usefulness of our approach.
# 5.1 Ablation Study
To further analyze the effectiveness of our approach, we conducted experiments on different variants of our system on the IWSLT2017. We briefly report the experimental results in Table 2.
Compared with the m-Transformer, ③ can significantly improve the zero-shot translation. The gap in zero-shot translation performance remains even when scaling up the m-Transformer (m-Transformer†). This indicates that it is effective to leverage the linguistic encoder to learn low-level linguistic features and integrate different levels of representations. We present detailed results and analysis of the scaling experiments in Appendix E for parameter comparisons.
Compared with ①, ② provides a significant improvement in zero-shot translation while maintaining supervised translation performance. This indicates that the disentangling learning task is effective. Disentangling learning can significantly improve the performance of zero-shot translation while mitigating the performance loss in supervised translation caused by semantic alignment. The analysis between ④ and ⑤ similarly supports this view.
Compared with ② and ③, ⑤ shows that the dis
Table 2: The results of the ablation study. The markers $\checkmark$ and $\times$ indicate the component is involved or not involved, respectively. The m-Transformer† has eight encoder layers and eight decoder layers, similar to our model size.
<table><tr><td></td><td>IWSLT2017</td><td>OPUS-7</td><td>PC-6</td></tr><tr><td>m-Transformer</td><td>6.76%</td><td>11.58%</td><td>21.02%</td></tr><tr><td>mRASP2 w/o AA</td><td>2.84%</td><td>8.91%</td><td>8.68%</td></tr><tr><td>CrossConST</td><td>3.07%</td><td>11.71%</td><td>7.94%</td></tr><tr><td>Ours</td><td>2.46%</td><td>8.64%</td><td>7.25%</td></tr></table>
Table 3: The average off-target rate for the test sets.
<table><tr><td></td><td>IWSLT2017</td><td>OPUS-7</td><td>PC-6</td></tr><tr><td>m-Transformer</td><td>18.39</td><td>15.76</td><td>7.91</td></tr><tr><td>mRASP2 w/o AA</td><td>22.42</td><td>17.31</td><td>11.48</td></tr><tr><td>Ours</td><td>22.69</td><td>17.57</td><td>11.82</td></tr></table>
Table 4: The average in-target BLEU scores for the test sets.
entangler and the linguistic encoder can collaborate to improve the zero-shot translation performance.
# 5.2 Off-target Issue
The many-to-many multilingual NMT models face the off-target issue (Gu et al., 2019) in zero-shot translation, which seriously impacts the zero-shot translation performance. The off-target issue refers to the problem that the model simply copies the source sentences or generates incorrect target sentences. Related work shows that multilingual NMT models have difficulty establishing mapping relations for the zero-shot translation directions, which may be overfitted to other language directions. To test whether our approach can alleviate the off-target issue, we use langid toolkit (Lui and Baldwin, 2012) to identify the target language and define the off-target rate as the proportion of off-target sentences. We conduct experiments on the contrast systems and our method. Table 3 shows that our method can effectively reduce the off-target rate compared to other systems, proving that our method can provide an effective guide for target language generation.
 (a) m-Transformer Encoder
 (b) mRASP2 w/o AA Encoder
 (c) Semantic FFN
 (d) Language FFN
 (e) Decoder Embedding
 (f) Linguistic Encoder
 (g) m-Transformer Decoder
 (h) Fusion Layer Figure 3: Visualization of the m-Transformer, mRASP2 w/o AA and our system after dimension reduction. The subfigure captions describe the model modules, and we do dimension reduction on the outputs of these modules. The blue line denotes German (De), the orange line denotes Italian (It), the green line denotes Dutch (Nl), and the purple line denotes Romanian (Ro).
Furthermore, we test the performance of in-target sentences to demonstrate that our approach improves the in-target translation quality. Considering that there is no comparability between the BLEU scores of different test sets, we extract the part where all model outputs are in-target for testing. Table 4 presents the results. Compared with Table 1, the performance gap between different models in the in-target part is smaller, which indicates the importance of mitigating the off-target issue. Meanwhile, the zero-shot performance of our models in the in-target part still significantly outperforms m-Transformer, which implies that our approach achieves better knowledge transfer and improves the zero-shot translation quality.
# 5.3 Visualization
We visualize the sentence representations of the encoder and decoder to verify, respectively, that our disentangler aids semantic alignment and our linguistic encoder achieves more accurate target language generation. We conduct experiments on a subset of IWSLT2017 test sets. We use t-SNE (Van der Maaten and Hinton, 2008) to reduce the 512-dim representations to 2-dim.
Figures 3(a) - 3(d): The m-Transformer cannot
align different languages well, which is caused by the entanglement of semantic and linguistic features at the representation level. For semantic features, our semantic FFN pulls the semantic representation closer, achieving a similar effect as mRASP2 w/o AA. For linguistic features, our language FFN pushes the different language representations apart, which proves that the language FFN can extract linguistic features.
Figures 3(e) - 3(h): The representation after decoder embedding is language-mixed, while the linguistic encoder can encode different languages into different subspaces, even though no explicit task is designed to guide this. By introducing low-level linguistic features, our system can better distinguish the target language and thus generate the target sentences more accurately.
# 5.4 Case Study
To further demonstrate the usefulness of our system, we analyze some translation cases and compare the outputs of our model with that of the m-Transformer in Figure 4. While the m-Transformer translates whole or partial sentences to the wrong language, our model can translate accurately, proving the advantages of our method.
<table><tr><td>Direction: Ro-ItInput: Discut de despê ea, işi imagineazeç cum va arăt, se lupti pentru putere, apoi și petrec ceva timp planificánd, organizand.Reference: Ne parlano, si immaginano che aspetto potrebbe avere, competono per il potere, poi passano il tempo pianificando, organizzando.Output (m-Transformer): Discussionate, immaginate what it's going to look like, combattimento per il potere, e poi spend some time pianificating, organizzando. (Mid-range off-target)Output (Ours): Parlando di.This, immagina come sare, lotta per il potere, e poi trascorrondo un po'di tempo pianificando, organizzando.</td></tr><tr><td>Direction: Ro-NIInput: Vă multumesc foarte mult.Reference: Hartelijk bedank.Output (m-Transformer): Thank you very much. (All off-target)Output (Ours): Heel erg bedank.</td></tr><tr><td>Direction: Ni-RoInput: Ongelooflifik. Je ziet het team en denkt: "die gaan赢得."Reference: E increbid. Vedet, vă uitiut in jur 's spunete: "Asta e echicha căstigataore."Output (m-Transformer): Umitior. You see echicha si你想, "They're going to win." (Final off-target)Output (Ours): Incredibid. Vezi echicha si te gândești, "Acsteia vor căstiga."Direction: It-NIInput: e costruiso protoptipi, uno dupo l'altro,Reference: Ze bouwen prototypes, en nieuwe prototypes...Output (m-Transformer): Ze bouwen prototypes, one by one. (Final off-target)Output (Ours): Ze bouwen prototypes, és an de andere.</td></tr><tr><td>Direction: Fr-ZhInput: Beth, sîlțe plait. Tu nâras pas à faireça.Reference: Be丝 求你了 你没必要这么做Output (m-Transformer): Beth, please, you don't have to. (All off-target)Output (Ours): Be丝,拜托 你不必这么做</td></tr></table>
Figure 4: Case study of zero-shot translation. We identify three off-target types which are categorized by off-target position and ratio.
# 6 Related Work
# 6.1 Zero-shot Machine Translation
To improve the zero-shot translation capability of multilingual NMT, researchers have proposed a series of auxiliary training objectives. These works can be divided into two categories. The first category is designed directly at the encoder so that the encoder outputs language-agnostic representations (Pham et al., 2019; Wei et al., 2021). These works are motivated by the hypothesis that a universal semantic representation can realize better knowledge transfer. Pan et al. (2021) propose a contrastive learning task to encourage the model to learn a universal representation space. Gu and Feng (2022) use optimal transport theory to close the representation of sentence pairs. However, these works focus only on semantic features and neglect linguistic features, which leads to performance degradation in the supervised translation direction. By integrating both semantic and linguistic features, our approach significantly improves the performance of zero-shot translation while effectively maintaining the supervised direction performance.
The second category is designed at the decoder to provide explicit guidance for target language generation. These works are motivated to improve multilingual representation. Yang et al. (2021a) propose the target language prediction task at the sequence level and the target gradient regularization at the gradient level. Gao et al. (2023) introduce the KL regularization term for the Softmax layer to promote cross-lingual consistent representation. In contrast to these approaches, we do not explicitly design auxiliary tasks, but utilize a lin
guistic encoder to fuse low-level representations containing more linguistic features and high-level representations containing more semantic features.
# 6.2 Disentangling for Cross-lingual Alignment
Cross-lingual alignment is a classic problem in multilingual tasks. Although the "pretraining-finetuning" paradigm can improve the cross-lingual ability of the model (Liu et al., 2020; Xue et al., 2021), the entangling of semantics and linguistics can impair the model performance. To address this problem, many researchers have improved it from the perspective of disentangling. Tiyajamorn et al. (2021) design auto-encoder to disentangle semantic and linguistic representation for natural language understanding tasks. Yang et al. (2021b) remove language identity information from pre-trained multilingual representations by singular value decomposition (SVD) and orthogonal projection. Zhao et al. (2021) explore three settings for removing language identity signals from multilingual representations, including vector space re-alignment, vector space normalization and input normalization. Wu et al. (2022) use SVD to extract linguistic features, use language-agnostic semantic information for task-specific training, and re-entangle semantic and linguistic features in the generation phase. We refer to this disentangling idea and utilize disentangling to achieve lossless semantic alignment for multilingual NMT.
# 7 Conclusion
In this paper, we propose to exploit both semantic and linguistic features to improve multilingual NMT. We design a disentangler and disentangling learning task at the encoder side to achieve lossless semantic alignment. Meanwhile, we introduce a linguistic encoder at the decoder side to fuse the low-level representation containing more linguistic features and the high-level representation containing more semantic features to improve the target language generation. Experiments on multilingual datasets indicate that our approach can significantly improve the performance of zero-shot translation while effectively maintaining the supervised translation performance. The analysis further demonstrates that utilizing both semantic and linguistic features can help the model learn semantic representation non-destructively and achieve more accurate target language generation.
# Limitations
Although our approach can significantly improve zero-shot translation performance while maintaining supervised translation performance, the performance improvement in the supervised direction is limited. On the one hand, the datasets of our experiments contain only several languages, and the baseline model can already model the supervised translation well. On the other hand, our approach to modeling linguistic features is still preliminary and implicit. Future work could consider using larger multilingual datasets as well as designing better methods to model linguistic features.
# Acknowledgments
We thank all the anonymous reviewers for their insightful and valuable comments. This work was supported by a grant from the National Natural Science Foundation of China (No. 62376260).
# References
Roee Aharoni, Melvin Johnson, and Orhan First. 2019. Massively multilingual neural machine translation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 3874-3884, Minneapolis, Minnesota. Association for Computational Linguistics. Naveen Arivazhagan, Ankur Bapna, Orhan First, Roee Aharoni, Melvin Johnson, and Wolfgang Macherey. 2019. The missing ingredient in zero-shot neural machine translation. arXiv preprint arXiv:1903.07091. Mauro Cettolo, Marcello Federico, Luisa Bentivogli, Niehues Jan, Stüker Sebastian, Sudoh Katsuitho, Yoshino Koichiro, and Federmann Christian. 2017. Overview of the iwslt 2017 evaluation campaign. In Proceedings of the 14th International Workshop on Spoken Language Translation, pages 2-14. Yong Cheng, Qian Yang, Yang Liu, Maosong Sun, and Wei Xu. 2017. Joint training for pivot-based neural machine translation. In Proceedings of the 26th International Joint Conference on Artificial Intelligence, IJCAI'17, page 3974-3980. AAAI Press. Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, et al. 2021. Beyond english-centric multilingual machine translation. The Journal of Machine Learning Research, 22(1):4839-4886. Orhan First, Kyunghyun Cho, and Yoshua Bengio. 2016. Multi-way, multilingual neural machine translation with a shared attention mechanism. In Proceedings
of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 866-875, San Diego, California. Association for Computational Linguistics. Pengzhi Gao, Liwen Zhang, Zhongjun He, Hua Wu, and Haifeng Wang. 2023. Improving zero-shot multilingual neural machine translation by leveraging crosslingual consistency regularization. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 12103-12119, Toronto, Canada. Association for Computational Linguistics. Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor O.K. Li. 2019. Improved zero-shot neural machine translation via ignoring spurious correlations. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1258-1268, Florence, Italy. Association for Computational Linguistics. Shuhao Gu and Yang Feng. 2022. Improving zero-shot multilingual translation with universal representations and cross-mapping. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 6492-6504, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations. Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda B. Viégas, Martin Wattenberg, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2017. Google's multilingual neural machine translation system: Enabling zero-shot translation. Trans. Assoc. Comput. Linguistics, 5:339-351. Taku Kudo and John Richardson. 2018. Sentencepiece: A simple and language independent subword tokenizer and tokenizer for neural text processing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018: System Demonstrations, Brussels, Belgium, October 31 - November 4, 2018, pages 66-71. Sneha Kudugunta, Ankur Bapna, Isaac Caswell, and Orhan First. 2019. Investigating multilingual NMT representations at scale. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1565-1575, Hong Kong, China. Association for Computational Linguistics. Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. 2020. Multilingual denoising pretraining for neural machine translation. Transactions of the Association for Computational Linguistics, 8:726-742.
Marco Lui and Timothy Baldwin. 2012. langid.py: An off-the-shelf language identification tool. In Proceedings of the ACL 2012 System Demonstrations, pages 25-30, Jeju Island, Korea. Association for Computational Linguistics. Xiao Pan, Mingxuan Wang, Liwei Wu, and Lei Li. 2021. Contrastive learning for many-to-many multilingual neural machine translation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 244-258, Online. Association for Computational Linguistics. Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, July 6-12, 2002, Philadelphia, PA, USA, pages 311-318. Ngoc-Quan Pham, Jan Niehues, Thanh-Le Ha, and Alexander Waibel. 2019. Improving zero-shot translation with language-independent constraints. In Proceedings of the Fourth Conference on Machine Translation (Volume 1: Research Papers), pages 13-23, Florence, Italy. Association for Computational Linguistics. Maja Popovic. 2015. *chrF: character n-gram F-score for automatic MT evaluation*. In *Proceedings of the Tenth Workshop on Statistical Machine Translation*, pages 392–395, Lisbon, Portugal. Association for Computational Linguistics. Matt Post. 2018. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 186-191, Brussels, Belgium. Association for Computational Linguistics. Ricardo Rei, José G. C. de Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022. COMET-22: Unbabel-IST 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics. Holger Schwenk, Vishrav Chaudhary, Shuo Sun, Hongyu Gong, and Francisco Guzmán. 2021. WikiMatrix: Mining 135M parallel sentences in 1620 language pairs from Wikipedia. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1351-1361, Online. Association for Computational Linguistics. Aditya Siddhant, Ankur Bapna, Yuan Cao, Orhan First, Mia Chen, Sneha Kudugunta, Naveen Arivazhagan, and Yonghui Wu. 2020. Leveraging monolingual data with self-supervision for multilingual neural machine translation. In Proceedings of the 58th Annual
Meeting of the Association for Computational Linguistics, pages 2827-2835, Online. Association for Computational Linguistics. Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca. Nattapong Tiyajamorn, Tomoyuki Kajiwara, Yuki Arase, and Makoto Onizuka. 2021. Language-agnostic representation from multilingual sentence encoders for cross-lingual similarity estimation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7764-7774, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models. Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of machine learning research, 9(11). Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30. Weizhi Wang, Zhirui Zhang, Yichao Du, Boxing Chen, Jun Xie, and Weihua Luo. 2021. Rethinking zero-shot neural machine translation: From a perspective of latent variables. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 4321-4327, Punta Cana, Dominican Republic. Association for Computational Linguistics. Wenxuan Wang, Wenxiang Jiao, Shuo Wang, Zhaopeng Tu, and Michael R Lyu. 2022. Understanding and mitigating the uncertainty in zero-shot translation. arXiv preprint arXiv:2205.10068. Xiangpeng Wei, Rongxiang Weng, Yue Hu, Luxi Xing, Heng Yu, and Weihua Luo. 2021. On learning universal representations across languages. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net. Liwei Wu, Shanbo Cheng, Mingxuan Wang, and Lei Li. 2021. Language tags matter for zero-shot neural machine translation. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 3001-3007, Online. Association for Computational Linguistics. Xianze Wu, Zaixiang Zheng, Hao Zhou, and Yong Yu. 2022. Laft: Cross-lingual transfer for text generation by language-agnostic finetuning. In Proceedings of
the 15th International Conference on Natural Language Generation, pages 260-266.
Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. 2021. mT5: A massively multilingual pre-trained text-to-text transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 483-498, Online. Association for Computational Linguistics.
Yilin Yang, Akiko Eriguchi, Alexandre Muzio, Prasad Tadepalli, Stefan Lee, and Hany Hassan. 2021a. Improving multilingual translation by representation and gradient regularization. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7266-7279, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
Ziyi Yang, Yinfei Yang, Daniel Cer, and Eric Darve. 2021b. A simple and effective method to eliminate the self language bias in multilingual representations. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 5825-5832, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
Biao Zhang, Ankur Bapna, Rico Sennrich, and Orhan Firat. 2021. Share or not? learning to schedule language-specific capacity for multilingual translation. In Ninth International Conference on Learning Representations 2021.
Biao Zhang, Philip Williams, Ivan Titov, and Rico Senrich. 2020. Improving massively multilingual neural machine translation and zero-shot translation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1628-1639, Online. Association for Computational Linguistics.
Wei Zhao, Steffen Eger, Johannes Bjerva, and Isabelle Augenstein. 2021. Inducing language-agnostic multilingual representations. In Proceedings of *SEM 2021: The Tenth Joint Conference on Lexical and Computational Semantics*, pages 229–240, Online. Association for Computational Linguistics.
# A Statistics of the Datasets
Table 5 summarizes information about the multilingual training datasets.
<table><tr><td>Dataset</td><td>Language Pairs</td><td>Size</td></tr><tr><td>IWSLT2017</td><td>En ↔ {De, It, Nl, Ro}</td><td>1.8M</td></tr><tr><td>OPUS-7</td><td>En ↔ {Ar, De, Fr, Nl, Ru, Zh}</td><td>12.0M</td></tr><tr><td>PC-6</td><td>En ↔ {Cs, Kk, Ro, Ru, Tr}</td><td>7.9M</td></tr></table>
Table 5: A brief description of the datasets.
# B Translation Prompt for Alpaca and ChatGPT
For Alpaca, we follow the official template. We set Instruction to "Translate input from <src> to <tgt)." and set Input to the source sentence. For ChatGPT, we use the following format to structure the inputs: "Translate the sentences from <src> to <tgt>: <input)." <src> denotes the source language, <tgt> denotes the target language and <input> denotes the source sentence.
# C Detailed Results on the OPUS-7 and PC-6 Test Sets
The detailed results on the OPUS-7 and PC-6 test sets are shown in Table 6 and Table 7 respectively.
# D ChrF and COMET Metrics
For the ChrF and COMET metrics, we evaluate the m-Transformer, mRASP2 w/o AA and our model. The results are presented in Table 8 and Table 9 respectively.
# E Scaling Experiments on the IWSLT2017 Test Set
Considering that our approach introduces additional parameters, we scale the model sizes of the m-Transformer and mRASP2 w/o AA for a fair comparison. As shown in Table 10, our model outperforms these variant models. We note a significant performance degradation of the m-Transformer when the model size reaches 100.4M. We attribute this to the limited size of the IWSLT2017 training set, thus the model performance largely depends on the method, rather than the model size. This further demonstrates the effectiveness of our method.
<table><tr><td>m-Transformer</td><td>Ar</td><td>De</td><td>Fr</td><td>Nl</td><td>Ru</td><td>Zh</td><td>x (avg)</td></tr><tr><td>Ar</td><td>-</td><td>12.13</td><td>24.96</td><td>14.33</td><td>21.31</td><td>27.12</td><td>19.97</td></tr><tr><td>De</td><td>5.74</td><td>-</td><td>19.42</td><td>21.15</td><td>13.26</td><td>5.55</td><td>13.02</td></tr><tr><td>Fr</td><td>16.80</td><td>17.97</td><td>-</td><td>21.57</td><td>21.77</td><td>22.46</td><td>20.11</td></tr><tr><td>Nl</td><td>4.88</td><td>20.02</td><td>22.60</td><td>-</td><td>10.69</td><td>2.78</td><td>12.19</td></tr><tr><td>Ru</td><td>18.72</td><td>13.58</td><td>25.36</td><td>13.52</td><td>-</td><td>24.30</td><td>19.09</td></tr><tr><td>Zh</td><td>17.50</td><td>9.23</td><td>23.22</td><td>8.51</td><td>19.18</td><td>-</td><td>15.53</td></tr><tr><td>x (avg)</td><td>12.73</td><td>14.58</td><td>23.11</td><td>15.82</td><td>17.24</td><td>16.44</td><td>16.65</td></tr></table>
<table><tr><td>Pivot</td><td>Ar</td><td>De</td><td>Fr</td><td>Nl</td><td>Ru</td><td>Zh</td><td>x (avg)</td></tr><tr><td>Ar</td><td>-</td><td>15.67</td><td>29.81</td><td>18.16</td><td>26.00</td><td>22.67</td><td>22.46</td></tr><tr><td>De</td><td>7.30</td><td>-</td><td>23.07</td><td>23.16</td><td>16.02</td><td>5.13</td><td>14.94</td></tr><tr><td>Fr</td><td>20.32</td><td>20.90</td><td>-</td><td>23.80</td><td>25.01</td><td>25.20</td><td>23.05</td></tr><tr><td>Nl</td><td>6.55</td><td>21.40</td><td>25.47</td><td>-</td><td>13.40</td><td>3.34</td><td>14.03</td></tr><tr><td>Ru</td><td>22.56</td><td>16.72</td><td>30.56</td><td>16.27</td><td>-</td><td>22.21</td><td>21.66</td></tr><tr><td>Zh</td><td>22.23</td><td>12.70</td><td>30.13</td><td>11.10</td><td>24.47</td><td>-</td><td>20.13</td></tr><tr><td>x (avg)</td><td>15.79</td><td>17.48</td><td>27.81</td><td>18.50</td><td>20.98</td><td>15.71</td><td>19.38</td></tr></table>
<table><tr><td>mRASP2 w/o AA</td><td>Ar</td><td>De</td><td>Fr</td><td>Ni</td><td>Ru</td><td>Zh</td><td>x (avg)</td></tr><tr><td>Ar</td><td>-</td><td>14.74</td><td>27.06</td><td>15.71</td><td>22.86</td><td>26.05</td><td>21.28</td></tr><tr><td>De</td><td>6.48</td><td>-</td><td>22.09</td><td>23.06</td><td>14.91</td><td>6.82</td><td>14.67</td></tr><tr><td>Fr</td><td>19.00</td><td>20.01</td><td>-</td><td>23.85</td><td>23.89</td><td>26.30</td><td>22.61</td></tr><tr><td>Ni</td><td>6.08</td><td>21.75</td><td>24.86</td><td>-</td><td>12.83</td><td>3.90</td><td>13.89</td></tr><tr><td>Ru</td><td>20.02</td><td>15.51</td><td>28.10</td><td>14.84</td><td>-</td><td>25.52</td><td>20.80</td></tr><tr><td>Zh</td><td>19.43</td><td>10.67</td><td>26.22</td><td>9.82</td><td>21.97</td><td>-</td><td>17.62</td></tr><tr><td>x (avg)</td><td>14.20</td><td>16.54</td><td>25.67</td><td>17.46</td><td>19.29</td><td>17.72</td><td>18.48</td></tr></table>
<table><tr><td>TLP</td><td>Ar</td><td>De</td><td>Fr</td><td>Nl</td><td>Ru</td><td>Zh</td><td>x (avg)</td></tr><tr><td>Ar</td><td>-</td><td>11.59</td><td>23.91</td><td>13.91</td><td>20.91</td><td>25.03</td><td>19.07</td></tr><tr><td>De</td><td>6.24</td><td>-</td><td>19.72</td><td>21.40</td><td>13.29</td><td>4.60</td><td>13.05</td></tr><tr><td>Fr</td><td>17.52</td><td>17.47</td><td>-</td><td>21.64</td><td>22.22</td><td>24.81</td><td>20.73</td></tr><tr><td>Nl</td><td>4.93</td><td>19.87</td><td>22.47</td><td>-</td><td>10.53</td><td>2.96</td><td>12.15</td></tr><tr><td>Ru</td><td>19.18</td><td>13.60</td><td>24.90</td><td>13.52</td><td>-</td><td>24.05</td><td>19.05</td></tr><tr><td>Zh</td><td>17.65</td><td>9.08</td><td>22.56</td><td>8.65</td><td>19.52</td><td>-</td><td>15.49</td></tr><tr><td>x (avg)</td><td>13.10</td><td>14.32</td><td>22.71</td><td>15.82</td><td>17.29</td><td>16.29</td><td>16.59</td></tr></table>
<table><tr><td>DT</td><td>Ar</td><td>De</td><td>Fr</td><td>Nl</td><td>Ru</td><td>Zh</td><td>x (avg)</td></tr><tr><td>Ar</td><td>-</td><td>12.80</td><td>25.81</td><td>14.77</td><td>22.27</td><td>28.52</td><td>20.83</td></tr><tr><td>De</td><td>6.76</td><td>-</td><td>20.62</td><td>22.01</td><td>13.88</td><td>6.01</td><td>13.85</td></tr><tr><td>Fr</td><td>18.08</td><td>18.11</td><td>-</td><td>21.98</td><td>23.08</td><td>25.47</td><td>21.34</td></tr><tr><td>Nl</td><td>5.22</td><td>20.83</td><td>23.31</td><td>-</td><td>11.52</td><td>3.33</td><td>12.84</td></tr><tr><td>Ru</td><td>20.13</td><td>14.06</td><td>26.21</td><td>13.78</td><td>-</td><td>25.93</td><td>20.02</td></tr><tr><td>Zh</td><td>19.00</td><td>9.47</td><td>23.79</td><td>8.68</td><td>20.71</td><td>-</td><td>16.33</td></tr><tr><td>x (avg)</td><td>13.84</td><td>15.06</td><td>23.95</td><td>16.24</td><td>18.29</td><td>17.85</td><td>17.54</td></tr></table>
<table><tr><td>CrossConST</td><td>Ar</td><td>De</td><td>Fr</td><td>Nl</td><td>Ru</td><td>Zh</td><td>x (avg)</td></tr><tr><td>Ar</td><td>-</td><td>13.02</td><td>25.88</td><td>14.95</td><td>21.70</td><td>25.48</td><td>20.21</td></tr><tr><td>De</td><td>6.30</td><td>-</td><td>19.68</td><td>21.94</td><td>13.74</td><td>5.09</td><td>13.35</td></tr><tr><td>Fr</td><td>18.09</td><td>18.22</td><td>-</td><td>22.56</td><td>21.91</td><td>23.17</td><td>20.79</td></tr><tr><td>Nl</td><td>5.26</td><td>20.45</td><td>22.96</td><td>-</td><td>11.28</td><td>2.51</td><td>12.49</td></tr><tr><td>Ru</td><td>19.76</td><td>14.18</td><td>26.17</td><td>14.12</td><td>-</td><td>23.89</td><td>19.62</td></tr><tr><td>Zh</td><td>19.01</td><td>9.35</td><td>23.67</td><td>8.92</td><td>19.70</td><td>-</td><td>16.13</td></tr><tr><td>x (avg)</td><td>13.68</td><td>15.04</td><td>23.67</td><td>16.50</td><td>17.67</td><td>16.03</td><td>17.10</td></tr></table>
<table><tr><td>Ours</td><td>Ar</td><td>De</td><td>Fr</td><td>Nl</td><td>Ru</td><td>Zh</td><td>x (avg)</td></tr><tr><td>Ar</td><td>-</td><td>14.60</td><td>27.78</td><td>15.41</td><td>24.50</td><td>26.49</td><td>21.75</td></tr><tr><td>De</td><td>7.04</td><td>-</td><td>22.31</td><td>23.04</td><td>14.84</td><td>6.37</td><td>14.72</td></tr><tr><td>Fr</td><td>19.89</td><td>20.00</td><td>-</td><td>23.90</td><td>24.92</td><td>25.10</td><td>22.76</td></tr><tr><td>Nl</td><td>6.06</td><td>21.61</td><td>24.87</td><td>-</td><td>12.81</td><td>3.58</td><td>13.79</td></tr><tr><td>Ru</td><td>20.84</td><td>15.85</td><td>28.66</td><td>14.91</td><td>-</td><td>25.46</td><td>21.15</td></tr><tr><td>Zh</td><td>20.11</td><td>11.14</td><td>27.38</td><td>9.83</td><td>23.48</td><td>-</td><td>18.39</td></tr><tr><td>x (avg)</td><td>14.79</td><td>16.64</td><td>26.20</td><td>17.42</td><td>20.11</td><td>17.40</td><td>18.76</td></tr></table>
Table 6: The performance of the contrast models and our model on the OPUS-7 dataset.
<table><tr><td>m-Transformer</td><td>Cs</td><td>Kk</td><td>Ro</td><td>Ru</td><td>Tr</td><td>x (avg)</td></tr><tr><td>Cs</td><td>-</td><td>1.54</td><td>14.63</td><td>12.93</td><td>6.16</td><td>8.81</td></tr><tr><td>Kk</td><td>1.73</td><td>-</td><td>2.61</td><td>10.24</td><td>2.99</td><td>4.40</td></tr><tr><td>Ro</td><td>11.11</td><td>1.87</td><td>-</td><td>12.98</td><td>7.25</td><td>8.31</td></tr><tr><td>Ru</td><td>10.53</td><td>11.10</td><td>14.76</td><td>-</td><td>5.40</td><td>10.45</td></tr><tr><td>Tr</td><td>8.80</td><td>2.57</td><td>12.21</td><td>7.47</td><td>-</td><td>7.76</td></tr><tr><td>x (avg)</td><td>8.05</td><td>4.27</td><td>11.05</td><td>10.91</td><td>5.45</td><td>7.94</td></tr></table>
<table><tr><td>Pivot</td><td>Cs</td><td>Kk</td><td>Ro</td><td>Ru</td><td>Tr</td><td>x (avg)</td></tr><tr><td>Cs</td><td>-</td><td>1.01</td><td>21.4</td><td>20.08</td><td>10.19</td><td>13.17</td></tr><tr><td>Kk</td><td>1.49</td><td>-</td><td>2.09</td><td>5.07</td><td>2.29</td><td>2.74</td></tr><tr><td>Ro</td><td>21.1</td><td>1.32</td><td>-</td><td>24.1</td><td>11.43</td><td>14.49</td></tr><tr><td>Ru</td><td>19.08</td><td>4.99</td><td>23.42</td><td>-</td><td>9.27</td><td>14.19</td></tr><tr><td>Tr</td><td>13.23</td><td>1.19</td><td>16.74</td><td>11.54</td><td>-</td><td>10.68</td></tr><tr><td>x (avg)</td><td>13.73</td><td>2.13</td><td>15.91</td><td>15.20</td><td>8.30</td><td>11.05</td></tr></table>
<table><tr><td>mRASP2 w/o AA</td><td>Cs</td><td>Kk</td><td>Ro</td><td>Ru</td><td>Tr</td><td>x (avg)</td></tr><tr><td>Cs</td><td>-</td><td>1.11</td><td>20.70</td><td>22.09</td><td>9.94</td><td>13.46</td></tr><tr><td>Kk</td><td>2.01</td><td>-</td><td>2.35</td><td>7.65</td><td>2.33</td><td>3.59</td></tr><tr><td>Ro</td><td>20.32</td><td>1.60</td><td>-</td><td>24.42</td><td>11.94</td><td>14.57</td></tr><tr><td>Ru</td><td>21.88</td><td>6.53</td><td>23.51</td><td>-</td><td>8.65</td><td>15.15</td></tr><tr><td>Tr</td><td>12.86</td><td>2.16</td><td>16.09</td><td>10.31</td><td>-</td><td>10.36</td></tr><tr><td>x (avg)</td><td>14.27</td><td>2.85</td><td>15.67</td><td>16.12</td><td>8.22</td><td>11.42</td></tr></table>
<table><tr><td>TLP</td><td>Cs</td><td>Kk</td><td>Ro</td><td>Ru</td><td>Tr</td><td>x (avg)</td></tr><tr><td>Cs</td><td>-</td><td>1.37</td><td>14.50</td><td>12.75</td><td>7.14</td><td>8.94</td></tr><tr><td>Kk</td><td>1.96</td><td>-</td><td>2.53</td><td>10.92</td><td>3.06</td><td>4.62</td></tr><tr><td>Ro</td><td>13.36</td><td>2.07</td><td>-</td><td>12.25</td><td>7.88</td><td>8.89</td></tr><tr><td>Ru</td><td>13.71</td><td>10.83</td><td>15.96</td><td>-</td><td>6.58</td><td>11.77</td></tr><tr><td>Tr</td><td>9.66</td><td>2.82</td><td>12.41</td><td>7.25</td><td>-</td><td>8.03</td></tr><tr><td>x (avg)</td><td>9.67</td><td>4.27</td><td>11.35</td><td>10.79</td><td>6.17</td><td>8.45</td></tr></table>
<table><tr><td>DT</td><td>Cs</td><td>Kk</td><td>Ro</td><td>Ru</td><td>Tr</td><td>x (avg)</td></tr><tr><td>Cs</td><td>-</td><td>1.53</td><td>19.03</td><td>18.83</td><td>8.21</td><td>11.90</td></tr><tr><td>Kk</td><td>2.13</td><td>-</td><td>2.81</td><td>12.43</td><td>3.58</td><td>5.24</td></tr><tr><td>Ro</td><td>17.34</td><td>2.27</td><td>-</td><td>20.63</td><td>10.99</td><td>12.81</td></tr><tr><td>Ru</td><td>18.75</td><td>12.23</td><td>19.51</td><td>-</td><td>8.35</td><td>14.71</td></tr><tr><td>Tr</td><td>12.06</td><td>3.35</td><td>15.95</td><td>10.64</td><td>-</td><td>10.50</td></tr><tr><td>x (avg)</td><td>12.57</td><td>4.85</td><td>14.32</td><td>15.63</td><td>7.78</td><td>11.03</td></tr></table>
<table><tr><td>CrossConST</td><td>Cs</td><td>Kk</td><td>Ro</td><td>Ru</td><td>Tr</td><td>x (avg)</td></tr><tr><td>Cs</td><td>-</td><td>0.89</td><td>20.44</td><td>18.13</td><td>9.50</td><td>12.24</td></tr><tr><td>Kk</td><td>1.75</td><td>-</td><td>1.93</td><td>5.20</td><td>1.82</td><td>2.68</td></tr><tr><td>Ro</td><td>19.96</td><td>1.19</td><td>-</td><td>20.98</td><td>10.48</td><td>13.15</td></tr><tr><td>Ru</td><td>18.45</td><td>5.23</td><td>21.08</td><td>-</td><td>7.84</td><td>13.15</td></tr><tr><td>Tr</td><td>11.95</td><td>1.86</td><td>14.80</td><td>9.34</td><td>-</td><td>9.49</td></tr><tr><td>x (avg)</td><td>13.03</td><td>2.29</td><td>14.56</td><td>13.41</td><td>7.41</td><td>10.14</td></tr></table>
<table><tr><td>Ours</td><td>Cs</td><td>Kk</td><td>Ro</td><td>Ru</td><td>Tr</td><td>x (avg)</td></tr><tr><td>Cs</td><td>-</td><td>1.37</td><td>22.11</td><td>21.63</td><td>10.93</td><td>14.01</td></tr><tr><td>Kk</td><td>1.87</td><td>-</td><td>2.45</td><td>9.48</td><td>2.73</td><td>4.13</td></tr><tr><td>Ro</td><td>20.22</td><td>1.91</td><td>-</td><td>24.05</td><td>13.94</td><td>15.03</td></tr><tr><td>Ru</td><td>20.66</td><td>11.03</td><td>23.94</td><td>-</td><td>10.15</td><td>16.45</td></tr><tr><td>Tr</td><td>13.76</td><td>2.50</td><td>19.18</td><td>11.70</td><td>-</td><td>11.79</td></tr><tr><td>x (avg)</td><td>14.13</td><td>4.20</td><td>16.92</td><td>16.72</td><td>9.44</td><td>12.28</td></tr></table>
Table 7: The performance of the contrast models and our model on the PC-6 dataset.
<table><tr><td>IWSLT2017</td><td>De ↔ It</td><td>De ↔ Nl</td><td>De ↔ Ro</td><td>It ↔ Nl</td><td>It ↔ Ro</td><td>Nl ↔ Ro</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>43.09</td><td>46.50</td><td>42.65</td><td>43.63</td><td>43.72</td><td>43.53</td><td>43.85</td><td>58.39</td></tr><tr><td>mRASP2 w/o AA</td><td>48.36</td><td>50.93</td><td>47.59</td><td>49.42</td><td>49.54</td><td>48.86</td><td>49.11</td><td>58.47</td></tr><tr><td>Ours</td><td>48.83</td><td>51.12</td><td>47.97</td><td>49.63</td><td>49.90</td><td>49.11</td><td>49.43</td><td>58.46</td></tr></table>
<table><tr><td>OPUS-7</td><td>x → Ar</td><td>x → De</td><td>x → Fr</td><td>x → Ni</td><td>x → Ru</td><td>x → Zh</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>37.69</td><td>37.08</td><td>48.16</td><td>37.60</td><td>41.00</td><td>25.22</td><td>37.79</td><td>53.77</td></tr><tr><td>mRASP2 w/o AA</td><td>39.76</td><td>40.55</td><td>50.83</td><td>39.68</td><td>43.78</td><td>26.03</td><td>40.10</td><td>53.28</td></tr><tr><td>Ours</td><td>40.40</td><td>40.67</td><td>51.34</td><td>39.55</td><td>44.53</td><td>26.95</td><td>40.57</td><td>53.86</td></tr></table>
<table><tr><td>PC-6</td><td>x → Cs</td><td>x → Kk</td><td>x → Ro</td><td>x → Ru</td><td>x → Tr</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>30.82</td><td>16.66</td><td>36.03</td><td>30.38</td><td>28.07</td><td>28.39</td><td>49.66</td></tr><tr><td>mRASP2 w/o AA</td><td>38.71</td><td>17.25</td><td>42.02</td><td>41.69</td><td>35.65</td><td>35.06</td><td>49.64</td></tr><tr><td>Ours</td><td>38.84</td><td>19.44</td><td>43.41</td><td>43.17</td><td>37.17</td><td>36.40</td><td>49.80</td></tr></table>
Table 8: The ChrF scores on the IWSLT2017, OPUS-7 and PC-6 test sets.
<table><tr><td>IWSLT2017</td><td>De ↔ It</td><td>De ↔ Nl</td><td>De ↔ Ro</td><td>It ↔ Nl</td><td>It ↔ Ro</td><td>Nl ↔ Ro</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>70.14</td><td>74.01</td><td>71.54</td><td>71.73</td><td>74.07</td><td>73.59</td><td>72.51</td><td>83.82</td></tr><tr><td>mRASP2 w/o AA</td><td>77.01</td><td>79.27</td><td>78.14</td><td>78.49</td><td>81.24</td><td>80.16</td><td>79.05</td><td>83.80</td></tr><tr><td>Ours</td><td>77.21</td><td>79.45</td><td>78.19</td><td>78.60</td><td>81.33</td><td>80.11</td><td>79.15</td><td>83.83</td></tr></table>
<table><tr><td>OPUS-7</td><td>x → Ar</td><td>x → De</td><td>x → Fr</td><td>x → Nl</td><td>x → Ru</td><td>x → Zh</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>72.33</td><td>65.77</td><td>70.67</td><td>68.97</td><td>73.48</td><td>71.52</td><td>70.46</td><td>79.45</td></tr><tr><td>mRASP2 w/o AA</td><td>74.36</td><td>68.41</td><td>72.77</td><td>70.89</td><td>76.15</td><td>74.02</td><td>72.77</td><td>79.25</td></tr><tr><td>Ours</td><td>74.64</td><td>68.74</td><td>73.33</td><td>71.02</td><td>76.65</td><td>74.18</td><td>73.09</td><td>79.66</td></tr></table>
<table><tr><td>PC-6</td><td>x → Cs</td><td>x → Kk</td><td>x → Ro</td><td>x → Ru</td><td>x → Tr</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>58.10</td><td>46.51</td><td>62.63</td><td>62.25</td><td>54.84</td><td>56.86</td><td>76.36</td></tr><tr><td>mRASP2 w/o AA</td><td>68.98</td><td>50.74</td><td>69.19</td><td>70.95</td><td>64.85</td><td>64.94</td><td>76.32</td></tr><tr><td>Ours</td><td>70.13</td><td>52.99</td><td>72.32</td><td>72.98</td><td>66.86</td><td>67.05</td><td>77.31</td></tr></table>
Table 9: The COMET scores on the IWSLT2017, OPUS-7 and PC-6 test sets.
<table><tr><td>Models</td><td>lenc</td><td>ldec</td><td>Model Size</td><td>Zero-shot Average</td><td>Supervised Average</td></tr><tr><td>m-Transformer</td><td>6</td><td>6</td><td>79.4M</td><td>17.93</td><td>34.32</td></tr><tr><td>m-Transformer†</td><td>6</td><td>8</td><td>87.8M</td><td>18.10</td><td>34.23</td></tr><tr><td>m-Transformer‡</td><td>8</td><td>8</td><td>100.4M</td><td>16.84</td><td>34.21</td></tr><tr><td>mRASP2 w/o AA</td><td>6</td><td>6</td><td>79.4M</td><td>22.41</td><td>34.06</td></tr><tr><td>mRASP2 w/o AA†</td><td>8</td><td>8</td><td>100.4M</td><td>22.46</td><td>34.19</td></tr><tr><td>Ours</td><td>6</td><td>6</td><td>99.4M</td><td>22.70</td><td>34.25</td></tr></table>
Table 10: The scaling experiments on the IWSLT2017 test set. $l_{enc}$ and $l_{dec}$ denote layers of encoder and decoder respectively. The m-Transformer†, m-Transformer‡ and mRASP2 w/o AA† denote scaled variants of the original model.123version https://git-lfs.github.com/spec/v1oid sha256:19e308b581b7c0144ffef683918735638c5450a64f719622cb99e164661c27cfsize 118741912345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955[ { "type": "text", "text": "Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts", "text_level": 1, "bbox": [ 117, 82, 878, 120 ], "page_idx": 0 }, { "type": "text", "text": "Zhuo Chen $^{1}$ , Xinyu Wang $^{2*}$ , Yong Jiang $^{2*}$ , Pengjun Xie $^{2}$ , Fei Huang $^{2}$ , Kewei Tu $^{1*}$", "bbox": [ 154, 129, 845, 147 ], "page_idx": 0 }, { "type": "text", "text": "<sup>1</sup>School of Information Science and Technology, ShanghaiTech University", "bbox": [ 201, 148, 803, 164 ], "page_idx": 0 }, { "type": "text", "text": "$^{1}$ Shanghai Engineering Research Center of Intelligent Vision and Imaging", "bbox": [ 201, 164, 801, 181 ], "page_idx": 0 }, { "type": "text", "text": "$^{2}$ Institute for Intelligent Computing, Alibaba Group", "bbox": [ 290, 181, 712, 198 ], "page_idx": 0 }, { "type": "text", "text": "{chenzhuo,tukw}@shanghaitech.edu.cn", "bbox": [ 324, 199, 678, 212 ], "page_idx": 0 }, { "type": "text", "text": "{tomas.wxy,yongjiang.jy,chengchen.xpj}@alibaba-inc.com", "bbox": [ 226, 215, 774, 231 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 260, 252, 341, 266 ], "page_idx": 0 }, { "type": "text", "text": "In the era of large language models, applying techniques such as Retrieval Augmented Generation can better address Open-Domain Question-Answering problems. Due to constraints including model sizes and computing resources, the length of context is often limited, and it becomes challenging to empower the model to cover overlong contexts while answering questions from open domains. This paper proposes a general and convenient method to cover longer contexts in Open-Domain Question-Answering tasks. It leverages a small encoder and cross-attention mechanism and effectively encodes contexts. With our method, the original language models can cover several times longer contexts while keeping the computing requirements close to the baseline. Our experiments demonstrate that after fine-tuning, there is improved performance across two held-in datasets, four held-out datasets, and also in two In Context Learning settings. Our code will be released at https://github.com/Alibaba-NLP/Vec-RA-ODQA.", "bbox": [ 141, 278, 460, 604 ], "page_idx": 0 }, { "type": "text", "text": "1 Introduction", "text_level": 1, "bbox": [ 114, 615, 260, 630 ], "page_idx": 0 }, { "type": "text", "text": "Transformer-based (Vaswani et al., 2017) architectures with pre-training on large corpus have become popular in recent Natural Language Processing research (Brown et al., 2020; Workshop et al., 2022; Chowdhery et al., 2023). An increasing number of Natural Language Processing (NLP) tasks need to process long contexts such as Open-Domain Question Answering (ODQA) with Retrieval Augmented Generation (RAG) (Lewis et al., 2020; Izacard and Grave, 2020; Gu et al., 2018). However, the fine-tuning and inference stages in downstream tasks are still constrained by the input length, e.g., 2048 tokens for Bloomz (Muennighoff et al., 2022) and Llama-1 (Touvron et al., 2023).", "bbox": [ 112, 640, 489, 865 ], "page_idx": 0 }, { "type": "text", "text": "With RAG, the input can easily surpass the maximum length the model can handle and it becomes", "bbox": [ 112, 866, 489, 898 ], "page_idx": 0 }, { "type": "image", "img_path": "images/06b8da5edd9f8a3c849813fc0128a6f403d05efdfea9ce3e95b3c2dcdf6a11db.jpg", "image_caption": [ "Figure 1: A comparison of our method (lower) and retrieval augmented ODQA without vectorization (upper). In the upper part, limited retrieved contexts are processed by the task model to finish the task. The lower part illustrates our method in which an encoder is incorporated to encode overlong retrieved contexts." ], "image_footnote": [], "bbox": [ 515, 253, 878, 470 ], "page_idx": 0 }, { "type": "text", "text": "challenging for the model to perform both finetuning and inference on overlong contexts. Moreover, in the in-context learning (ICL) (Dong et al., 2022; Kim et al., 2022) setting, the context will be much longer together with retrieved contexts. In such cases, the demand for the model to handle longer input text significantly increases.", "bbox": [ 507, 596, 884, 708 ], "page_idx": 0 }, { "type": "text", "text": "To enable the model to cover longer context during both fine-tuning and inference stages, this paper proposes a method that leverages a 100 million-level encoder model in downstream ODQA tasks with a 1 billion-level language model as illustrated in the lower part of Fig. 1. With our method, the length of context that the model can cover increases from $2\\mathrm{k}$ (in text form) to a maximum of $10\\mathrm{k}$ (in dense form, which is condensed by the encoder). Experiments are designed under three settings to validate the effectiveness of our method. In the experiments, we first fine-tune the model, optionally including the encoder, on two popular ODQA", "bbox": [ 507, 709, 885, 919 ], "page_idx": 0 }, { "type": "page_footnote", "text": "*Corresponding author", "bbox": [ 141, 904, 287, 917 ], "page_idx": 0 }, { "type": "page_number", "text": "7683", "bbox": [ 480, 927, 519, 940 ], "page_idx": 0 }, { "type": "footer", "text": "Findings of the Association for Computational Linguistics: ACL 2024, pages 7683-7694 August 11-16, 2024 ©2024 Association for Computational Linguistics", "bbox": [ 228, 945, 768, 972 ], "page_idx": 0 }, { "type": "image", "img_path": "images/52e730b5dcbe1488196ffe69583eed3b01e85332ca411b028cc6565dcb864280.jpg", "image_caption": [ "Figure 2: Speed illustration. Run time is measured on a single A100 GPU and the batch size is set to 1 for all curves. \"2k\" on the horizontal axis represents the baseline model's run time to train or infer on data of length 2k. \"5k\" and \"10k\" correspond to two variants of our method that can cover at most 5k and 10k tokens when training and inferring. Training time measures the average over five consecutive training steps. Inference time measures the average over five consecutive generation steps. Specifically, we measure the execution duration of functions Trainer.train_step and modelgenerate based on huggingface." ], "image_footnote": [], "bbox": [ 117, 83, 480, 227 ], "page_idx": 1 }, { "type": "text", "text": "datasets with retrieved contexts and evaluate our method in held-in, held-out, and ICL settings. Experimental results show that our method outperforms the baseline, which is fine-tuned on data of length 2k, in all three settings.", "bbox": [ 112, 466, 489, 546 ], "page_idx": 1 }, { "type": "text", "text": "Regarding the speed of our method, we measure the run time of each training and inference step. Compared with work that compresses the contexts with the original task model (Chevalier et al., 2023), which requires techniques to reduce the computation graph during backpropagation, we employ a $10\\mathrm{x}$ smaller model to perform the encoding of excessive texts, so a complete gradient descent procedure can be kept. To sum up, our contributions are as follows:", "bbox": [ 112, 564, 489, 722 ], "page_idx": 1 }, { "type": "list", "sub_type": "text", "list_items": [ "1. We propose a method that incorporates a small encoder model for excessively long context encoding by applying cross-attention mechanism with the original task model.", "2. We evaluate our method in two held-in, four held-out, and two ICL settings after being finetuned on two ODQA datasets and obtain improved performance.", "3. The computing resource requirements of our method are consistent with those of the baseline and the run time remains competitive." ], "bbox": [ 114, 741, 487, 917 ], "page_idx": 1 }, { "type": "image", "img_path": "images/9adcf47ac1efe5695c853473cbca32d20de2b020388919590347a1fbe66102c3.jpg", "image_caption": [ "Figure 3: Method illustration of model architecture (purple blocks) and data flows (along black/purple arrows). The purple dashed arrows mean that the output of MLP module will be the \"query\" to the next layer of Cross-attn module. $\\times N$ means that the modules with dotted backgrounds are repeated with multiple layers in the task model." ], "image_footnote": [], "bbox": [ 579, 87, 826, 384 ], "page_idx": 1 }, { "type": "text", "text": "2 Method", "text_level": 1, "bbox": [ 509, 521, 613, 536 ], "page_idx": 1 }, { "type": "text", "text": "2.1 Background", "text_level": 1, "bbox": [ 509, 546, 653, 563 ], "page_idx": 1 }, { "type": "text", "text": "Consider an example query $\\pmb{q}$ with gold answer $\\pmb{a}$ and independent $C$ pieces of corresponding context information $\\pmb{k} = \\{\\pmb{k}_1, \\pmb{k}_2, \\dots, \\pmb{k}_C\\}$ , with each being a sequence of tokens, where $\\pmb{k}$ is retrieved by some retriever from a given corpus<sup>1</sup>", "bbox": [ 507, 568, 882, 648 ], "page_idx": 1 }, { "type": "equation", "text": "\n$$\n\\boldsymbol {k} = \\operatorname {R e t r i e v e r} (\\boldsymbol {q}, \\text {c o r p u s})\n$$\n", "text_format": "latex", "bbox": [ 600, 657, 791, 674 ], "page_idx": 1 }, { "type": "text", "text": "Ideally, the $C$ retrieved contexts contain the knowledge needed to answer $\\pmb{q}$ correctly, but there may also be noise. Given a decoder model Dec parameterized by $\\theta$ , the output sequence $\\pmb{y}$ is usually modeled by", "bbox": [ 507, 682, 884, 762 ], "page_idx": 1 }, { "type": "equation", "text": "\n$$\nP _ {\\theta} (\\boldsymbol {y} | \\boldsymbol {q}, \\boldsymbol {k} _ {\\max }, \\boldsymbol {P}) = D e c (\\boldsymbol {y} | \\boldsymbol {q}, \\boldsymbol {k} _ {\\max }, \\boldsymbol {P})\n$$\n", "text_format": "latex", "bbox": [ 534, 772, 853, 790 ], "page_idx": 1 }, { "type": "text", "text": "where $\\pmb{k}_{max} = \\{k_1, k_2, \\dots, k_m\\} \\in \\pmb{k}, m < C$ . $m$ refers to the number of contexts that reach the model's throughput. $P$ stands for the prompts that connect related content<sup>2</sup>. Given the model,", "bbox": [ 507, 797, 882, 862 ], "page_idx": 1 }, { "type": "page_footnote", "text": "<sup>1</sup>Refer to Sec. 3.1 for detailed definition of corpus and retriever in our experiments.", "bbox": [ 507, 868, 882, 892 ], "page_idx": 1 }, { "type": "page_footnote", "text": "2The forms of $P$ vary with different settings, and there will be detailed definitions in Sec. 3.1.", "bbox": [ 507, 892, 882, 917 ], "page_idx": 1 }, { "type": "page_number", "text": "7684", "bbox": [ 480, 928, 519, 940 ], "page_idx": 1 }, { "type": "text", "text": "$k_{max}$ is usually a subset of $k$ because the maximum length of contexts is often constrained by the model's throughput or computing resources, and", "bbox": [ 112, 84, 487, 131 ], "page_idx": 2 }, { "type": "text", "text": "During training, we aim to maximize the term $P_{\\theta}(\\pmb{a}|\\pmb{q}, \\pmb{k}_{max}, \\pmb{P})$ , and formalize the ODQA problem as a language modeling task. Specifically, for a query $\\pmb{q}$ , its gold answer $\\pmb{a}$ and contexts $\\pmb{k}_{max}$ , they are connected linguistically with proper prompts $\\pmb{P}$ , together denoted as an input sequence $\\pmb{x}(\\pmb{q}, \\pmb{a}, \\pmb{k}_{max}, \\pmb{P}) = \\{x_1, x_2, \\ldots\\}$ . Then we aim to minimize the language modeling loss over the set $\\mathcal{D}$ of all training examples:", "bbox": [ 112, 133, 487, 277 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\nL _ {\\theta} (\\mathcal {D}) = - \\sum_ {\\boldsymbol {x} (\\boldsymbol {q}, \\boldsymbol {a}, \\boldsymbol {k} _ {\\max }, \\boldsymbol {P}) \\in \\mathcal {D}} \\sum_ {i} \\tag {1}\n$$\n", "text_format": "latex", "bbox": [ 169, 299, 487, 338 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\log \\left(P _ {\\theta} \\left(x _ {i} \\mid x _ {< i}\\right)\\right)\n$$\n", "text_format": "latex", "bbox": [ 305, 343, 431, 360 ], "page_idx": 2 }, { "type": "text", "text": "2.2 Encoding and Cross-Attention", "text_level": 1, "bbox": [ 112, 369, 400, 384 ], "page_idx": 2 }, { "type": "text", "text": "We propose a method that can utilize additional contexts $k_{add} = \\{k_{m+1}, k_{m+2}, \\ldots \\}$ several times longer than $k_{max}$ . First, we introduce an encoder parameterized by $\\phi$ . Then we apply cross-attention with the original task model and introduce a projector, a cross-attention module and a Multi-Layer Perceptron (MLP) in each layer, together denoted the parameters as $\\pi$ . Denote $\\omega = \\{\\phi, \\pi, \\theta\\}$ as all the parameters in our model. On the whole, our method models the output $y$ by an encoder-decoder model Enc-Dec", "bbox": [ 112, 388, 489, 565 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\begin{array}{l} Q _ {\\omega} (\\boldsymbol {y} | \\boldsymbol {q}, \\boldsymbol {k} _ {\\max }, \\boldsymbol {P}, \\boldsymbol {k} _ {\\text {a d d}}) \\\\ = E n c - D e c (\\boldsymbol {y} | \\boldsymbol {q}, \\boldsymbol {k} _ {\\max }, \\boldsymbol {P}, \\boldsymbol {k} _ {\\text {a d d}}) \\\\ \\end{array}\n$$\n", "text_format": "latex", "bbox": [ 161, 580, 421, 619 ], "page_idx": 2 }, { "type": "text", "text": "During training, inputs $\\boldsymbol{x}(\\boldsymbol{q},\\boldsymbol{a},\\boldsymbol{k}_{max},\\boldsymbol{P})$ are embedded by the original task model's embedding layer Emb", "bbox": [ 112, 630, 487, 677 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\boldsymbol {h} _ {\\boldsymbol {q}} = \\operatorname {E m b} (\\boldsymbol {x} (\\boldsymbol {q}, \\boldsymbol {a}, \\boldsymbol {k} _ {\\max }, \\boldsymbol {P}))\n$$\n", "text_format": "latex", "bbox": [ 179, 690, 418, 707 ], "page_idx": 2 }, { "type": "text", "text": "and each of the additional contexts $\\pmb{k_i}$ in $k_{add}$ is encoded by the encoder Enc", "bbox": [ 112, 715, 485, 747 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\boldsymbol {h} _ {\\boldsymbol {a d d}} ^ {(i)} = E n c (\\boldsymbol {k} _ {i})\n$$\n", "text_format": "latex", "bbox": [ 231, 759, 366, 780 ], "page_idx": 2 }, { "type": "text", "text": "Note that the length of encoding from the encoder is flexible practically and we compress each $k_{i}$ into one vector. Following the output of the encoder, a projector Proj is used to align the high-dimensional hidden spaces between the encoder and task model in each layer", "bbox": [ 112, 789, 487, 885 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\boldsymbol {h} _ {\\boldsymbol {k v}} = \\operatorname {P r o j} \\left(\\boldsymbol {h} _ {\\boldsymbol {a d d}}\\right)\n$$\n", "text_format": "latex", "bbox": [ 221, 898, 376, 915 ], "page_idx": 2 }, { "type": "text", "text": "where $h_{add}$ is concatenated of all $h_{add}^{(i)}$ calculated from last step. Each layer of the task model is assigned to an independent projector as different layers may learn different representations.", "bbox": [ 507, 82, 880, 149 ], "page_idx": 2 }, { "type": "text", "text": "In each layer, to incorporate the information stored in $k_{add}$ we add a cross-attention module, where representations of additional contexts $h_{kv}$ serve as \"key\" and \"value\", followed by an MLP. In the first layer, the embeddings of original input $h_q$ act as \"query\", and in the rest of the layers output $h_q'$ from the previous layer act as \"query\" ( $h_q'$ will be defined later).", "bbox": [ 507, 151, 882, 279 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\boldsymbol {h} _ {c} = C r o s s - a t t n (\\boldsymbol {h} _ {q} / h _ {q} ^ {\\prime}, \\boldsymbol {h} _ {k v})\n$$\n", "text_format": "latex", "bbox": [ 578, 296, 820, 316 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\boldsymbol {h} _ {\\boldsymbol {m}} = M L P \\left(\\boldsymbol {h} _ {\\boldsymbol {c}}\\right)\n$$\n", "text_format": "latex", "bbox": [ 571, 321, 707, 336 ], "page_idx": 2 }, { "type": "text", "text": "Cross-attn $(h_q, h_{kv})$ is calculated as follows", "bbox": [ 507, 353, 853, 370 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\nQ = W ^ {Q} h _ {q}\n$$\n", "text_format": "latex", "bbox": [ 615, 386, 709, 404 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\nK, V = W ^ {K} \\boldsymbol {h} _ {\\boldsymbol {k v}}, W ^ {V} \\boldsymbol {h} _ {\\boldsymbol {k v}}\n$$\n", "text_format": "latex", "bbox": [ 589, 412, 789, 429 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\no = s o f t m a x (\\frac {Q K ^ {T}}{\\sqrt {d _ {k}}}) V\n$$\n", "text_format": "latex", "bbox": [ 618, 438, 803, 472 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\boldsymbol {h} _ {c} = W ^ {O} o\n$$\n", "text_format": "latex", "bbox": [ 608, 480, 697, 495 ], "page_idx": 2 }, { "type": "text", "text": "where $W^{Q}, W^{K}, W^{V}, W^{O}$ refer to weight matrices and $d_{k}$ refers to the dimension of each attention head. Then the output of cross-attention and MLP is normally processed by a self-attention and another MLP module. The output acts as \"query\" input to the cross-attention module in the next layer.", "bbox": [ 507, 513, 884, 609 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\pmb {h} _ {\\pmb {q}} ^ {\\prime} = M L P (S e l f - a t t n (\\pmb {h} _ {\\pmb {m}}))\n$$\n", "text_format": "latex", "bbox": [ 578, 626, 811, 646 ], "page_idx": 2 }, { "type": "text", "text": "At last, the output of the last layer is expanded to the vocabulary-size dimension to predict the next token (not shown in Fig. 3 for simplicity), and we aim to maximize the probability", "bbox": [ 507, 663, 880, 727 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\nQ _ {\\omega} (\\boldsymbol {a} | \\boldsymbol {q}, \\boldsymbol {k} _ {\\text {m a x}}, \\boldsymbol {P}, \\boldsymbol {k} _ {\\text {a d d}})\n$$\n", "text_format": "latex", "bbox": [ 596, 744, 793, 760 ], "page_idx": 2 }, { "type": "text", "text": "Consistent with the setup mentioned before, to maximize term $Q_{\\omega}(a|q, k_{max}, P, k_{add})$ , we turn it into minimizing the language modeling loss", "bbox": [ 507, 778, 880, 827 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\begin{array}{l} J _ {\\omega} (\\mathcal {D}) = - \\sum_ {\\boldsymbol {x} (\\boldsymbol {q}, \\boldsymbol {a}, \\boldsymbol {k} _ {\\max }, \\boldsymbol {P}), \\boldsymbol {k} _ {\\text {a d d}} \\in \\mathcal {D}} \\sum_ {i} \\\\ \\log \\left(Q _ {\\omega} \\left(x _ {i} \\mid x _ {< i}, \\boldsymbol {k} _ {\\boldsymbol {a d d}}\\right)\\right) \\tag {2} \\\\ \\end{array}\n$$\n", "text_format": "latex", "bbox": [ 521, 843, 880, 920 ], "page_idx": 2 }, { "type": "page_number", "text": "7685", "bbox": [ 480, 927, 519, 940 ], "page_idx": 2 }, { "type": "text", "text": "2.3 ICL Setting", "text_level": 1, "bbox": [ 112, 84, 253, 99 ], "page_idx": 3 }, { "type": "text", "text": "Our method can also be applied to ICL settings. Based on the aforementioned setup, we denoted ICL samples as $l_{max} = \\{l_1, l_2, \\dots, l_m\\}$ , with each $l_i$ composed of another pair of query and answer. We optimize objective 3 below on data where each $l_i(q', a')$ refers to only query-answer ICL samples (without context) and $q' a'$ refer to another query-answer pair:", "bbox": [ 112, 105, 489, 233 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\begin{array}{l} J _ {\\omega} ^ {\\prime} (\\mathcal {D}) = - \\sum_ {s (q, a, l _ {m a x}, P), k _ {a d d} \\in \\mathcal {D}} \\sum_ {i} \\\\ \\log \\left(Q _ {\\omega} ^ {\\prime} \\left(s _ {i} \\mid s _ {< i}, \\boldsymbol {k} _ {\\boldsymbol {a d d}}\\right)\\right) \\tag {3} \\\\ \\end{array}\n$$\n", "text_format": "latex", "bbox": [ 129, 244, 487, 324 ], "page_idx": 3 }, { "type": "text", "text": "$s = \\{s_1,s_2,\\ldots \\}$ refers to the inputs composed of $(q,a,l_{max},P)$ and $Q^{\\prime}$ shares a similar definition to $Q$ in objective 2. Additional contexts $k_{add}$ are utilized in the same way as in Sec. 2.2 by performing encoding, cross-attention, etc.", "bbox": [ 112, 336, 489, 417 ], "page_idx": 3 }, { "type": "text", "text": "2.4 Training", "text_level": 1, "bbox": [ 112, 428, 231, 444 ], "page_idx": 3 }, { "type": "text", "text": "Theoretically, training processes stated in Sec. 2.2 all remain differentiable and thus all the parameters can be optimized via normal gradient descent w.r.t. objective 2. Note that the parameters $\\phi$ of the encoder can be initialized from a well-pretrained model on a large scale corpus and the pretrained parameters possess good performance in many downstream tasks based on text encoding. However, the parameters in the projector module are randomly initialized. Thus at the start of the training, according to the chain rule, the gradients to the whole encoder will be random as well, which poses a risk of breaking the encoding utility of the encoder. This intuition proves to be true in our experiments.", "bbox": [ 112, 449, 489, 688 ], "page_idx": 3 }, { "type": "text", "text": "Therefore, we design two strategies of training:", "bbox": [ 131, 690, 485, 706 ], "page_idx": 3 }, { "type": "list", "sub_type": "text", "list_items": [ "1. Directly freeze parameters $\\phi$ and make parameters $(\\pi, \\theta)$ trainable during the whole training process.", "2. In the first few training steps (e.g., one epoch), $\\phi$ is kept frozen to prevent random gradients from breaking its well-pre-trained parameters. After that, $\\phi$ is optimized w.r.t. objective 2 together with the other modules $(\\pi, \\theta)$ ." ], "bbox": [ 127, 718, 489, 858 ], "page_idx": 3 }, { "type": "text", "text": "3 Experiment", "text_level": 1, "bbox": [ 112, 870, 250, 885 ], "page_idx": 3 }, { "type": "text", "text": "3.1 Experiment settings", "text_level": 1, "bbox": [ 112, 895, 317, 912 ], "page_idx": 3 }, { "type": "table", "img_path": "images/07376abb0f4fa501ed1758a88d5a9b3730c1ec840404e87ee6585ec705e01f3c.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Settings</td><td>Data format</td></tr><tr><td>Held-in Held-out</td><td>Answer the question: Knowledge:{context k1} ...{context km}. Q: Who got the first Nobel prize in physics A:</td></tr><tr><td>ICL format w/ contexts</td><td>Answer the following questions based on the Knowledge: Knowledge:{context k1'} Q: Who developed the first printing press in 1430s A: Johannes Gutenberg ...(Knowledge: ... Q: ... A: ...) Knowledge:{context k1"} Q: Who got the first Nobel prize in physics A:</td></tr><tr><td>ICL format w/o contexts (Sec. 2.3)</td><td>Answer the following questions: Q: Who developed the first printing press in 1430s A: Johannes Gutenberg (Q: ... A: ...)... Q: Who got the first Nobel prize in physics A:</td></tr><tr><td>Additional Contexts</td><td>{context km+1}; {context km+2}; ...</td></tr></table>", "bbox": [ 515, 82, 882, 467 ], "page_idx": 3 }, { "type": "text", "text": "Table 1: Examples of data format. Gray tokens refer to prompts $P$ mentioned in Sec. 2 and the context is omitted here.", "bbox": [ 507, 476, 882, 519 ], "page_idx": 3 }, { "type": "text", "text": "Data To evaluate our method, we first fine-tune our model on two ODQA datasets separately, TriviaQA (Joshi et al., 2017) and Natural Questions (NQ) (Kwiatkowski et al., 2019). Besides evaluating our method on the held-in data, we also evaluate four held-out data, namely CommonsenseQA (Talmor et al., 2019), SQuAD2.0 (Rajpurkar et al., 2016), Webquestions (Berant et al., 2013) and ComplexWebQuestions (Talmor and Berant, 2018). Specifically, samples in CommonsenseQA dataset are formulated as multi-choice problems, and we evaluate the performance in both multi-choice and sequence-to-sequence formats. Refer to App. A.1 for the detailed format.", "bbox": [ 505, 546, 884, 771 ], "page_idx": 3 }, { "type": "text", "text": "Format of input $\\mathbf{x}$ in Sec. 2.2 is formulated as \"Held-in Held-out\" format in Table 1, and we evaluate the model's performance on samples of ICL format with context. Format of input $s$ in Sec. 2.3 is formulated as \"ICL format w/o contexts\" in Table 1.", "bbox": [ 507, 772, 884, 866 ], "page_idx": 3 }, { "type": "text", "text": "Additional contexts $k_{m+1}, k_{m+2}$ are encoded by the encoder separately and independently without prompts. The forms of prompts $P$ defined", "bbox": [ 507, 871, 882, 919 ], "page_idx": 3 }, { "type": "page_number", "text": "7686", "bbox": [ 480, 928, 521, 940 ], "page_idx": 3 }, { "type": "text", "text": "previously are shown in gray tokens in Table 1.", "bbox": [ 112, 84, 463, 99 ], "page_idx": 4 }, { "type": "text", "text": "Retriever For contexts of the datasets TriviaQA and NQ, we utilize those collected by Karpukhin et al. (2020), which are collected with BM25 (Robertson et al., 2009) and Dense Passage Retrieval techniques. For contexts of the four held-out datasets, we follow Izacard et al. (2022) and Shi et al. (2023) and use Contriver (Izacard et al., 2021) as our retriever. Contexts $k$ are retrieved from Wikipedia dump dated December 20, 2018, the version released by Karpukhin et al. (2020).", "bbox": [ 112, 109, 489, 269 ], "page_idx": 4 }, { "type": "text", "text": "Baseline Recent decoder-only models like Bloomz (Muennighoff et al., 2022) and GPTs (Radford et al., 2019; Achiam et al., 2023) have shown good performance in generation-like tasks, and we use $Bloomz - 1b7^3$ for the task model $\\theta$ . When fine-tuning the baseline model, inputs are constructed according to the \"Held-in Held-out\" setting as stated in Table 1. The length of the input is extended to utilize as many contexts as possible, consistent with the maximum input length (2k) of the model while doing pre-training (Workshop et al., 2022).", "bbox": [ 112, 280, 487, 470 ], "page_idx": 4 }, { "type": "text", "text": "Additionally, note that the context information $k_{max}$ provided in the inputs is ranked from best to worst based on Dense Retrieval (Karpukhin et al., 2020), which means the baseline we adopt is rather stronger than randomly providing as many contexts as possible without considering the quality. The baseline can be seen as a model fine-tuned on the most relevant contexts incorporating reranking techniques (Karpukhin et al., 2020; Khalifa et al., 2023).", "bbox": [ 112, 473, 489, 633 ], "page_idx": 4 }, { "type": "text", "text": "Initialization and Training Settings Weights of popular pre-trained encoder models like BERT (Devlin et al., 2018) should be good initialization for the encoder $\\phi$ and thus we adopt BERT-base-uncased for initialization of $\\phi$ . Parameters of attention and MLP modules are also adapted from Bloomz-1b7. To keep the encoding process efficient, we use a simple Linear module as the projector that is randomly initialized and fine-tuned to align the hidden dimension of 768 (BERT-base-uncased) to 2048 (Bloomz-1b7).", "bbox": [ 112, 644, 489, 819 ], "page_idx": 4 }, { "type": "text", "text": "In our experiment, we use BERT to independently encode additional contexts on 10 or 20 contexts, which can cover approximately 5k to 10k additional context tokens. Then the hidden states of", "bbox": [ 112, 821, 489, 883 ], "page_idx": 4 }, { "type": "table", "img_path": "images/51793ab5b8025ba935fc8ff4dde51119f405d5e6fa10179f2250bb08ee382a7f.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Learning Rate</td><td>2e-5</td></tr><tr><td>Optimizer</td><td>AdamW</td></tr><tr><td>Lr scheduler</td><td>cosine</td></tr><tr><td>Warmup ratio</td><td>0.03</td></tr><tr><td>FP 16</td><td>True</td></tr><tr><td>FP 16 eval</td><td>True</td></tr><tr><td>Globa batch size</td><td>8</td></tr><tr><td>Save steps</td><td>4000</td></tr><tr><td>Eval steps</td><td>4000</td></tr><tr><td>Max epochs</td><td>4</td></tr><tr><td>GPU name</td><td>NVIDIA A100-SXM 80G</td></tr></table>", "bbox": [ 544, 80, 848, 291 ], "page_idx": 4 }, { "type": "text", "text": "Table 3: Hyperparameters", "bbox": [ 605, 300, 784, 313 ], "page_idx": 4 }, { "type": "text", "text": "the [CLS] token are concatenated and fed-forward to subsequent modules as illustrated in Fig. 3. For both the baseline and our method, we evaluate the model checkpoint with the lowest language modeling loss on the development set and report the Exact Match (EM) metric.", "bbox": [ 507, 341, 882, 436 ], "page_idx": 4 }, { "type": "text", "text": "As discussed in Sec. 2.4, there are mainly two choices of training strategies of which parts of our proposed model are optimized. We experiment with both strategies and report the results of the \"frozen encoder\" setting in Sec. 3.2 and the \"training encoder\" setting in Sec. 4.1 respectively.", "bbox": [ 507, 438, 882, 533 ], "page_idx": 4 }, { "type": "text", "text": "Hyperparameters We list important hyperparameters in our experiments in Table 3.", "bbox": [ 507, 545, 882, 577 ], "page_idx": 4 }, { "type": "text", "text": "3.2 Main Results", "text_level": 1, "bbox": [ 507, 590, 660, 604 ], "page_idx": 4 }, { "type": "text", "text": "We present our main result of the first training strategy discussed in Sec. 2.4 in Table 4. Upon fine-tuning on two datasets and evaluating on three (held-in, held-out and ICL) settings, our method achieves performance superior to that of the baseline in five out of six settings, except for one setting on one dataset.", "bbox": [ 507, 612, 882, 722 ], "page_idx": 4 }, { "type": "text", "text": "In held-in settings (training on TriviaQA/NQ and evaluating on TriviaQA/NQ), our model consistently demonstrates superior performance relative to the baseline. Moreover, it demonstrates stable improved performance as more contexts are encoded by our method, showing the potential of our model to encode even longer contexts.", "bbox": [ 507, 725, 882, 837 ], "page_idx": 4 }, { "type": "text", "text": "In held-out settings, our method outperforms the baseline in all the datasets after being fine-tuned on TriviaQA and outperforms three of four datasets after being fine-tuned on NQ, suggesting the general applicability of our method. From the \"Com.QA", "bbox": [ 507, 839, 882, 917 ], "page_idx": 4 }, { "type": "page_footnote", "text": "<sup>3</sup>https://huggingface.co/bigscience/bloomz-1b7", "bbox": [ 134, 890, 478, 904 ], "page_idx": 4 }, { "type": "page_footnote", "text": "<sup>4</sup>https://huggingface.co/bert-base-uncased", "bbox": [ 136, 904, 448, 917 ], "page_idx": 4 }, { "type": "page_number", "text": "7687", "bbox": [ 480, 928, 519, 940 ], "page_idx": 4 }, { "type": "table", "img_path": "images/0cba99e8d2ae33db7ee5dc638f030edc516056fef6f3a04be024a2c6f03c4e54.jpg", "table_caption": [], "table_footnote": [ "Table 4: Main results of performance with frozen encoder on held-in, held-out and ICL settings. **Boldface** marks the best results in each setting. Com.QA refers to CommonsenseQA. Web.Q refers to WebQuestions. Comp.Q refers to ComplexWebQuestions. TriviaQA (ICL) and NQ (ICL) show the results evaluated on ICL setting where the data is formed as illustrated in Table 1 ICL." ], "table_body": "<table><tr><td rowspan=\"2\" colspan=\"2\">Train\\Evaluate</td><td colspan=\"2\">TriviaQA</td><td colspan=\"2\">NQ</td><td colspan=\"2\">Com.QA test</td><td>SQuAD</td><td>Web.Q</td><td>Comp.Q</td><td colspan=\"2\">Triviaqa (ICL)</td><td colspan=\"2\">NQ (ICL)</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td><td>choice</td><td>seq2seq</td><td>test</td><td>test</td><td>test</td><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td rowspan=\"3\">TriviaQA</td><td>baseline</td><td>45.740</td><td>46.203</td><td>14.868</td><td>16.288</td><td>17.199</td><td>2.785</td><td>10.191</td><td>9.524</td><td>4.490</td><td>31.764</td><td>31.857</td><td>8.999</td><td>9.058</td></tr><tr><td>+ 5k</td><td>47.686</td><td>47.742</td><td>17.506</td><td>19.307</td><td>19.328</td><td>3.194</td><td>12.684</td><td>10.053</td><td>5.513</td><td>32.341</td><td>32.034</td><td>10.677</td><td>11.136</td></tr><tr><td>+ 10k</td><td>47.901</td><td>48.245</td><td>18.465</td><td>19.529</td><td>17.363</td><td>2.539</td><td>12.667</td><td>11.111</td><td>6.024</td><td>34.027</td><td>34.235</td><td>11.671</td><td>11.801</td></tr><tr><td rowspan=\"3\">NQ</td><td>baseline</td><td>42.809</td><td>43.976</td><td>37.159</td><td>37.978</td><td>19.410</td><td>4.095</td><td>21.199</td><td>14.815</td><td>13.498</td><td>35.521</td><td>35.967</td><td>19.242</td><td>21.136</td></tr><tr><td>+ 5k</td><td>43.669</td><td>44.657</td><td>37.01</td><td>38.698</td><td>19.656</td><td>4.095</td><td>22.724</td><td>15.344</td><td>13.214</td><td>35.883</td><td>35.985</td><td>19.265</td><td>21.413</td></tr><tr><td>+ 10k</td><td>44.189</td><td>45.107</td><td>37.581</td><td>39.114</td><td>21.294</td><td>4.423</td><td>22.918</td><td>15.873</td><td>13.413</td><td>36.381</td><td>36.569</td><td>19.447</td><td>21.662</td></tr></table>", "bbox": [ 122, 82, 878, 235 ], "page_idx": 5 }, { "type": "text", "text": "choice\" setting we can see that though our model is not trained to answer multi-choice questions, it performs better in selecting choices than baseline.", "bbox": [ 112, 328, 487, 375 ], "page_idx": 5 }, { "type": "text", "text": "In the last two columns TriviaQA (ICL) and NQ (ICL), we evaluate whether the optimized model can generalize to a similar ICL setting. Specifically, with optimized parameter $\\omega^{*}$ after fine-tuning objective 2 we evaluate how well we can model $Q_{\\omega^{*}}(a|q,l_{max},P,k_{add})$ where each $l_{i}(q^{\\prime},a^{\\prime},k^{\\prime})$ is an ICL sample composed of another query, context and answer. Surprisingly, we obtain a similar improved performance to the held-in setting. Steadily improved performance indicates that the training method we adopt is robust, maintaining both the encoder and decoder's efficacy in retrieving useful information while the evaluation data format diverges from the training data.", "bbox": [ 115, 376, 489, 602 ], "page_idx": 5 }, { "type": "text", "text": "In summary, from the results presented in Table 4, it is observable that in comparison with the baseline, employing our method to encode a greater volume of retrieval information offers a predominantly positive enhancement to the model's performance across various settings, including held-in, held-out, and ICL.", "bbox": [ 112, 604, 489, 715 ], "page_idx": 5 }, { "type": "text", "text": "4 Analysis", "text_level": 1, "bbox": [ 112, 728, 223, 745 ], "page_idx": 5 }, { "type": "text", "text": "In this section, we present the results of three analytical experiments. The first one shows the result of the other training strategy discussed in Sec. 2.4. The second shows the evaluation results of optimizing objective 3. The third shows the effectiveness of our method in a more challenging setting.", "bbox": [ 112, 756, 489, 853 ], "page_idx": 5 }, { "type": "text", "text": "4.1 Encoder Training", "text_level": 1, "bbox": [ 112, 865, 302, 881 ], "page_idx": 5 }, { "type": "text", "text": "In our experiments, we first try optimizing the encoder $\\phi$ with the other parameters $(\\pi ,\\theta)$ from the", "bbox": [ 112, 887, 489, 917 ], "page_idx": 5 }, { "type": "text", "text": "very beginning of the training process. Results turn out to verify our anticipation: newly introduced random parameters (the projector) easily mess up with the parameters in the encoder, consequently undermining its capability to encode information and resulting in worse performance than baseline.", "bbox": [ 507, 328, 884, 426 ], "page_idx": 5 }, { "type": "text", "text": "Here we evaluate the training strategy we proposed in Sec. 2.4 that aims to fix this problem. The encoder is optimized after several training steps, and in our experiment, we set it to one epoch. Besides, the parameters in the cross-attention module are initialized by those in the pre-trained self-attention module to minimize the amount of randomly initialized parameters.", "bbox": [ 507, 438, 885, 568 ], "page_idx": 5 }, { "type": "text", "text": "Evaluations are done in the same settings as in Table 4. By applying this two-step training method, we succeed in obtaining better performance than the baseline in most of the settings. It can be inferred that compared with the setting of a frozen encoder (i.e., $\\phi$ is not optimized), further introducing trainable encoder parameters did not further enhance the model's performance as anticipated. Although we can achieve better results in most settings than baseline, performance in held-in and held-out settings seems to be less stable compared to the \"frozen encoder\" setting. Particularly, we find that optimizing the encoder results in degraded performance in the ICL setting, especially after being fine-tuned on TriviaQA datasets. We attribute this to the fact that million-scale parameter models, after fine-tuning on certain data, cannot guarantee to generalize the encoding capability to a broader range of scenarios, e.g. the ICL setting, as defined in Table 1. We present the results of the second training strategy discussed in Sec. 2.4 in Table 5.", "bbox": [ 507, 581, 885, 919 ], "page_idx": 5 }, { "type": "page_number", "text": "7688", "bbox": [ 480, 928, 519, 940 ], "page_idx": 5 }, { "type": "table", "img_path": "images/4a3352410f59a64133bf1d2b49d3c42cd62c184e0bd183dc756d97e389d9931a.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\" colspan=\"2\">Train\\Evaluate</td><td colspan=\"2\">TriviaQA</td><td colspan=\"2\">NQ</td><td colspan=\"2\">Com.QA test</td><td>SQuAD</td><td>Web.Q</td><td>Comp.Q</td><td colspan=\"2\">Triviaqa (ICL)</td><td colspan=\"2\">NQ (ICL)</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td><td>choice</td><td>seq2seq</td><td>test</td><td>test</td><td>test</td><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td rowspan=\"3\">TriviaQA</td><td>baseline</td><td>45.740</td><td>46.203</td><td>14.868</td><td>16.288</td><td>17.199</td><td>2.785</td><td>10.191</td><td>9.524</td><td>4.490</td><td>31.764</td><td>31.857</td><td>8.999</td><td>9.058</td></tr><tr><td>+ 5k</td><td>48.082</td><td>47.803</td><td>15.896</td><td>16.898</td><td>14.333</td><td>3.112</td><td>10.755</td><td>11.640</td><td>4.945</td><td>16.646</td><td>16.645</td><td>6.178</td><td>6.676</td></tr><tr><td>+ 10k</td><td>47.980</td><td>47.750</td><td>16.079</td><td>17.008</td><td>15.807</td><td>2.867</td><td>10.823</td><td>11.111</td><td>5.058</td><td>16.103</td><td>16.300</td><td>6.383</td><td>7.008</td></tr><tr><td rowspan=\"3\">NQ</td><td>baseline</td><td>42.809</td><td>43.976</td><td>37.159</td><td>37.978</td><td>19.410</td><td>4.095</td><td>21.199</td><td>14.815</td><td>13.498</td><td>35.521</td><td>35.967</td><td>19.242</td><td>21.136</td></tr><tr><td>+ 5k</td><td>43.397</td><td>44.524</td><td>37.387</td><td>39.03</td><td>15.889</td><td>4.095</td><td>22.092</td><td>14.286</td><td>12.958</td><td>33.993</td><td>34.341</td><td>17.951</td><td>19.640</td></tr><tr><td>+ 10k</td><td>43.284</td><td>44.047</td><td>37.205</td><td>39.28</td><td>16.790</td><td>3.931</td><td>22.143</td><td>16.402</td><td>12.788</td><td>33.122</td><td>33.404</td><td>18.933</td><td>20.914</td></tr></table>", "bbox": [ 122, 82, 880, 236 ], "page_idx": 6 }, { "type": "table", "img_path": "images/8a303de17d285ba202c57c9118b49e4921ac7964ca4925f29e2336bc4a2b79de.jpg", "table_caption": [ "Table 5: Analysis of training encoder along with the task model when fine-tuning. Experiments are conducted under the same setting to Sec. 3.2" ], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\">ICL samples w/o contexts</td><td colspan=\"2\">TriviaQA</td><td colspan=\"2\">NQ</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td>baseline</td><td>20.052</td><td>20.083</td><td>19.242</td><td>19.529</td></tr><tr><td>+ 10 vec</td><td>19.939</td><td>20.233</td><td>19.539</td><td>19.668</td></tr><tr><td>+ 20 vec</td><td>20.358</td><td>20.578</td><td>19.333</td><td>19.501</td></tr></table>", "bbox": [ 147, 297, 458, 395 ], "page_idx": 6 }, { "type": "text", "text": "4.2 ICL Setting w/o Contexts", "text_level": 1, "bbox": [ 112, 475, 359, 491 ], "page_idx": 6 }, { "type": "text", "text": "We also experiment with optimizing objective 3 defined in Sec. 2.3 where only query-answer pairs are provided in the ICL format input. The detailed data format is shown in Table 1 \"ICL format w/o contexts\" and the query-answer pair is sampled as many as possible from the held-in dataset. The utility of the encoder remains the same as it encodes $10(+10\\mathrm{vec})$ or $20(+20\\mathrm{vec})$ pieces of context and is kept frozen during the training.", "bbox": [ 112, 498, 485, 642 ], "page_idx": 6 }, { "type": "text", "text": "The model is fine-tuned on TriviaQA and NQ and evaluated in held-in settings. We report the result in Table 6. First, we see that our method can still enhance the model in this setting but the improvements seem to be not consistent or prominent. Second, notice that the improvement on each dataset is not as remarkable as that in the ICL setting in Table 4, where each ICL sample is provided along with one piece of context.", "bbox": [ 112, 644, 485, 788 ], "page_idx": 6 }, { "type": "text", "text": "To summarize the findings here, our method for encoding context exhibits a more pronounced performance enhancement in ICL settings that incorporate context information. We posit that the underlying reason for this is that the cross-attention mechanism, which facilitates information interchange between inputs (embedded by the task model) and dense context information (coded by the en", "bbox": [ 112, 790, 487, 917 ], "page_idx": 6 }, { "type": "table", "img_path": "images/a76679464d813a510d0eee4495095929a2a4613389f25bd3493c0a9d38075350.jpg", "table_caption": [ "Table 6: Result of fine-tuning on data with ICL samples (without context information) and evaluating on held-in setting." ], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\">kmax = {}</td><td colspan=\"2\">TriviaQA</td><td colspan=\"2\">NQ</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td>baseline</td><td>20.391</td><td>20.472</td><td>18.968</td><td>19.889</td></tr><tr><td>+1 vec</td><td>21.636</td><td>21.533</td><td>20.041</td><td>20.637</td></tr><tr><td>+5 vec</td><td>21.942</td><td>22.010</td><td>20.258</td><td>20.942</td></tr><tr><td>+10 vec</td><td>21.964</td><td>22.072</td><td>22.268</td><td>22.632</td></tr></table>", "bbox": [ 546, 297, 850, 411 ], "page_idx": 6 }, { "type": "text", "text": "Table 7: Effectiveness of our method on encoding when we remove the influence on text form context information in $\\mathbf{x}$ .", "bbox": [ 507, 419, 882, 462 ], "page_idx": 6 }, { "type": "text", "text": "coder), is particularly effective when context interacts with context, instead of context with ICL samples with only query-answer pairs.", "bbox": [ 507, 491, 882, 539 ], "page_idx": 6 }, { "type": "text", "text": "4.3 A More Challenging Setting", "text_level": 1, "bbox": [ 507, 555, 774, 570 ], "page_idx": 6 }, { "type": "text", "text": "In our method presented in Sec. 2.2, we adopt a projector module that is applied to align the high-dimensional hidden spaces and adopt cross-attention mechanism to incorporate the dense context information in each layer. In this section, we evaluate the effectiveness of our method in a more challenging setting.", "bbox": [ 505, 577, 882, 690 ], "page_idx": 6 }, { "type": "text", "text": "Specifically, compared to the data format stated in the \"Held-in Held-out\" setting in Table 1, we remove the contexts in input $\\pmb{x}$ and keep only questions and answers in the training data, i.e., $\\pmb{x}$ in objective 2 becomes $(q, a, \\{\\}, P)$ . Only several contexts are supplied as \"Additional Contexts\" encoded by the encoder. Note that though supplying text-form contexts can greatly enhance models in ODQA tasks, here we remove them to test the effectiveness of the encoder and cross-attention mechanism in a more challenging setting.", "bbox": [ 505, 692, 882, 869 ], "page_idx": 6 }, { "type": "text", "text": "Results are shown in Table. 7. \" $+1 / 5 / 10$ vec\" means we utilize $1 / 5 / 10$ pieces of contexts and encode them into $1 / 5 / 10$ vectors by taking the [CLS]", "bbox": [ 507, 870, 882, 917 ], "page_idx": 6 }, { "type": "page_number", "text": "7689", "bbox": [ 480, 928, 519, 940 ], "page_idx": 6 }, { "type": "text", "text": "tokens' hidden states. It can be inferred that, firstly, with only one encoded vector, our method can enhance the model. Secondly, we observe consistent improvement across two datasets and three variants of our method that incorporating more contexts leads to better performance.", "bbox": [ 112, 84, 489, 181 ], "page_idx": 7 }, { "type": "text", "text": "5 Related Work", "text_level": 1, "bbox": [ 112, 193, 270, 209 ], "page_idx": 7 }, { "type": "text", "text": "5.1 Retrieval Augmentation", "text_level": 1, "bbox": [ 112, 219, 349, 235 ], "page_idx": 7 }, { "type": "text", "text": "Recently, retrieval augmentation has been utilized to improve a large amount of Natural Language Processing downstream tasks such as question-answering (Chen et al., 2017; Lewis et al., 2020; Kwiatkowski et al., 2019; Fan et al., 2019), dialogue (Moghe et al., 2018), language modeling (Khandelwal et al., 2020), NER (Wang et al., 2022, 2021) and machine translation (Gu et al., 2018; Xu et al., 2022). In the aforementioned work, the utilization of retrieval information has been fundamentally capable of enhancing model performance across all dimensions.", "bbox": [ 112, 241, 490, 434 ], "page_idx": 7 }, { "type": "text", "text": "5.2 Related Model Architectures", "text_level": 1, "bbox": [ 112, 445, 386, 460 ], "page_idx": 7 }, { "type": "text", "text": "Referring to the base model, there has been increasing interest in using models of encoder-decoder or decoder-only architectures in solving downstream tasks with retrieval augmentation recently.", "bbox": [ 112, 467, 489, 531 ], "page_idx": 7 }, { "type": "text", "text": "Allaouzi et al. (2019) and Zhou et al. (2023) employ models of encoder-decoder architectures to solve visual question answering task in the medical domain. In their work, the encoder model is responsible for extracting prominent features from a medical image and the decoder part generates the answer. Li et al. (2023) utilizes an encoder-decoder model with constrained decoding to solve extractive question answering task.", "bbox": [ 112, 532, 489, 676 ], "page_idx": 7 }, { "type": "text", "text": "Decoder-only models, e.g., ChatGPT and GPT-4 (Achiam et al., 2023), are more famous for their surprisingly great performance on tasks like question answering (Ali et al., 2022) and there is abundant work that tries to improve the performance based on GPTs (Pereira et al., 2023). Kim and Min (2024) introduce a chatbot model that utilizes generative AI and the Retrieval Augmented Generation method to address the issue that achieving regulatory compliance necessitates the intricate navigation of exceptionally complex and voluminous guidelines in the pharmaceutical industry.", "bbox": [ 112, 677, 489, 869 ], "page_idx": 7 }, { "type": "text", "text": "In our work, we also incorporate an encoder for context encoding. However, compared to the traditional encoder-decoder models, the encoder part", "bbox": [ 112, 871, 489, 919 ], "page_idx": 7 }, { "type": "text", "text": "in our method is several times smaller than the decoder part. Although our method does not alter the quadratic complexity of the attention mechanism, it instead processes the long contexts in a much lower dimension, thus being able to quintuple the capacity to cover context information without the need to utilize additional computing resources.", "bbox": [ 507, 84, 884, 197 ], "page_idx": 7 }, { "type": "text", "text": "5.3 Utilizing Long Contexts", "text_level": 1, "bbox": [ 507, 210, 742, 225 ], "page_idx": 7 }, { "type": "text", "text": "To handle contexts with excessive length, recently proposed techniques such as context compression are increasingly investigated in NLP research.", "bbox": [ 507, 231, 882, 280 ], "page_idx": 7 }, { "type": "text", "text": "Chevalier et al. (2023) proposes \"AutoCompressors\" that uses OPT (Zhang et al., 2022) and Llama-2 (Touvron et al., 2023) to compress texts into summary vectors and show that utilizing long contexts can improve perplexity. In their method, the compression is done by the billion-level language model, and in one of their experiments, they train on sequence with 30720 tokens with 20 compression steps. However, the complete computation graph cannot be fully kept in such settings, and the optimizing process has to rely on stopping gradients, which poses potential risks to the mathematical principle behind gradient descent. Similarly in Zhang et al. (2024)'s work, the long context is first partitioned into multiple intervals, and then a sliding window is employed to sequentially process one interval at a time and the compressed token embeddings are kept for the next token prediction. It is implemented by introducing additional trainable parameters to the origin language model to finish the task of \"Activation Condensing\", and original parameters are frozen throughout the training process.", "bbox": [ 507, 282, 884, 651 ], "page_idx": 7 }, { "type": "text", "text": "6 Conclusion", "text_level": 1, "bbox": [ 507, 665, 640, 682 ], "page_idx": 7 }, { "type": "text", "text": "In this paper, we propose a method that incorporates a small encoder model for excessively long context encoding by applying cross-attention mechanism with the original task model. The method is simple and general for transformer-based language models. In our experiments, after fine-tuning on ODQA dataset, we find improved performance across two held-in, four held-out and two ICL settings, compared to a baseline that incorporates the reranking technique on training data, showing the effectiveness of our method in utilizing long contexts. We note that the intuitive explanations for the performance improvement are as follows: 1) the encoder model provides the ability to encode", "bbox": [ 507, 694, 884, 919 ], "page_idx": 7 }, { "type": "page_number", "text": "7690", "bbox": [ 480, 928, 521, 940 ], "page_idx": 7 }, { "type": "text", "text": "longer contexts; 2) the cross-attention mechanism is useful in selectively attending the correct parts of the inputs. Regarding the efficiency, the need for GPU quantity remains unchanged and the run time remains competitive to the baseline.", "bbox": [ 112, 84, 487, 164 ], "page_idx": 8 }, { "type": "text", "text": "7 Limitations", "text_level": 1, "bbox": [ 112, 177, 250, 192 ], "page_idx": 8 }, { "type": "text", "text": "First, we have only tested our method in 1B7 models with a 110M encoder, and yet we have not tested the effectiveness of our method on larger language models, e.g., 7B and 70B, due to limited computing resources.", "bbox": [ 112, 203, 487, 282 ], "page_idx": 8 }, { "type": "text", "text": "Second, we observe that our method exhibits relatively modest performance under setting 4.2, with only a slight improvement compared to the baseline. We attribute the potential reasons for this to the cross-attention mechanism being unsuitable for modeling the relationship between context and ICL samples (without contexts).", "bbox": [ 112, 284, 487, 395 ], "page_idx": 8 }, { "type": "text", "text": "Acknowledgement", "text_level": 1, "bbox": [ 114, 409, 278, 426 ], "page_idx": 8 }, { "type": "text", "text": "This work was supported by Alibaba Group through Alibaba Innovative Research Program.", "bbox": [ 112, 435, 485, 467 ], "page_idx": 8 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 114, 495, 213, 510 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774.", "Rohaid Ali, Oliver Y Tang, Ian D Connolly, Jared S Fridley, John H Shin, Patricia L Zadnik Sullivan, Deus Cielo, Adetokunbo A Oyelese, Curtis E Doberstein, Albert E Telfeian, et al. 2022. Performance of chatgpt, gpt-4, and google bard on a neurosurgery oral boards preparation question bank. Neurosurgery, pages 10-1227.", "Imane Allaouzi, Mohamed Ben Ahmed, and Badr Benamrou. 2019. An encoder-decoder model for visual question answering in the medical domain. In CLEF (working notes).", "Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013. Semantic parsing on Freebase from question-answer pairs. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1533-1544, Seattle, Washington, USA. Association for Computational Linguistics.", "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot" ], "bbox": [ 115, 518, 489, 917 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "learners. Advances in neural information processing systems, 33:1877-1901.", "Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading Wikipedia to answer open-domain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1870-1879, Vancouver, Canada. Association for Computational Linguistics.", "Alexis Chevalier, Alexander Wettig, Anirudh Ajith, and Danqi Chen. 2023. Adapting language models to compress contexts. arXiv preprint 2305.14788.", "Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. 2023. Palm: Scaling language modeling with pathways. Journal of Machine Learning Research, 24(240):1-113.", "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.", "Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, and Zhifang Sui. 2022. A survey for in-context learning. arXiv preprint arXiv:2301.00234.", "Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. 2019. ELI5: Long form question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3558-3567, Florence, Italy. Association for Computational Linguistics.", "Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor OK Li. 2018. Search engine guided neural machine translation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32.", "Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave. 2021. Unsupervised dense information retrieval with contrastive learning. arXiv preprint arXiv:2112.09118.", "Gautier Izacard and Edouard Grave. 2020. Leveraging passage retrieval with generative models for open domain question answering. arXiv preprint arXiv:2007.01282.", "Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. 2022. Few-shot learning with retrieval augmented language models. arXiv preprint arXiv:2208.03299.", "Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of" ], "bbox": [ 510, 85, 884, 917 ], "page_idx": 8 }, { "type": "page_number", "text": "7691", "bbox": [ 480, 928, 517, 940 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601-1611, Vancouver, Canada. Association for Computational Linguistics.", "Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics.", "Muhammad Khalifa, Lajanugen Logeswaran, Moontae Lee, Honglak Lee, and Lu Wang. 2023. Few-shot reranking for multi-hop QA via language model prompting. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15882-15897, Toronto, Canada. Association for Computational Linguistics.", "Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2020. Generalization through memorization: Nearest neighbor language models.", "Hyuhng Joon Kim, Hyunsoo Cho, Junyeob Kim, Taeuk Kim, Kang Min Yoo, and Sang-goo Lee. 2022. Self-generated in-context learning: Leveraging auto-regressive language models as a demonstration generator. arXiv preprint arXiv:2206.08082.", "Jaewoong Kim and Moohong Min. 2024. From rag to qa-rag: Integrating generative ai for pharmaceutical regulatory compliance process. arXiv preprint arXiv:2402.01717.", "Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466.", "Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459-9474.", "Shaobo Li, Chengjie Sun, Bingquan Liu, Yuanchao Liu, and Zhenzhou Ji. 2023. Modeling extractive question answering using encoder-decoder models with constrained decoding and evaluation-based reinforcement learning. Mathematics, 11(7).", "Nikita Moghe, Siddhartha Arora, Suman Banerjee, and Mitesh M. Khapra. 2018. Towards exploiting background knowledge for building conversation systems. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages" ], "bbox": [ 115, 85, 489, 917 ], "page_idx": 9 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "2322-2332, Brussels, Belgium. Association for Computational Linguistics.", "Niklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, et al. 2022. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786.", "Jayr Pereira, Robson Fidalgo, Roberto Lotufo, and Rodrigo Nogueira. 2023. Visconde: Multi-document qa with gpt-3 and neural reranking. In European Conference on Information Retrieval, pages 534-543. Springer.", "Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.", "Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383-2392.", "Stephen Robertson, Hugo Zaragoza, et al. 2009. The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends® in Information Retrieval, 3(4):333-389.", "Weijia Shi, Sewon Min, Michihiro Yasunaga, Minjoon Seo, Rich James, Mike Lewis, Luke Zettlemoyer, and Wen-tau Yih. 2023. Replug: Retrievalaugmented black-box language models. arXiv preprint arXiv:2301.12652.", "Alon Talmor and Jonathan Berant. 2018. The web as a knowledge-base for answering complex questions.", "Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019. Commonsenseqa: A question answering challenge targeting commonsense knowledge. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4149-4158.", "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.", "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30.", "Xinyu Wang, Yong Jiang, Nguyen Bach, Tao Wang, Zhongqiang Huang, Fei Huang, and Kewei Tu. 2021. Improving Named Entity Recognition by External" ], "bbox": [ 510, 85, 882, 917 ], "page_idx": 9 }, { "type": "page_number", "text": "7692", "bbox": [ 480, 928, 519, 940 ], "page_idx": 9 }, { "type": "text", "text": "Context Retrieving and Cooperative Learning. In the Joint Conference of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJCNLP 2021). Association for Computational Linguistics.", "bbox": [ 132, 85, 489, 165 ], "page_idx": 10 }, { "type": "text", "text": "Xinyu Wang, Yongliang Shen, Jiong Cai, Tao Wang, Xiaobin Wang, Pengjun Xie, Fei Huang, Weiming Lu, Yueting Zhuang, Kewei Tu, Wei Lu, and Yong Jiang. 2022. DAMO-NLP at SemEval-2022 task 11: A knowledge-based system for multilingual named entity recognition. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval2022), pages 1457-1468, Seattle, United States. Association for Computational Linguistics.", "bbox": [ 115, 174, 489, 292 ], "page_idx": 10 }, { "type": "text", "text": "BigScience Workshop, Teven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ilic, Daniel Hesslow, Roman Castagné, Alexandra Sasha Luccioni, François Yvon, et al. 2022. Bloom: A 176b-parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100.", "bbox": [ 115, 302, 489, 381 ], "page_idx": 10 }, { "type": "text", "text": "Jitao Xu, Josep Crego, and Jean Senellart. 2022. Boosting neural machine translation with similar translations. In Proceedings of the 15th Biennial Conference of the Association for Machine Translation in the Americas (Volume 2: Users and Providers Track and Government Track), pages 282-292, Orlando, USA. Association for Machine Translation in the Americas.", "bbox": [ 115, 390, 489, 495 ], "page_idx": 10 }, { "type": "text", "text": "Peitian Zhang, Zheng Liu, Shitao Xiao, Ninglu Shao, Qiwei Ye, and Zhicheng Dou. 2024. Soaring from 4k to 400k: Extending llm's context with activation beacon. arXiv preprint arXiv:2401.03462.", "bbox": [ 115, 505, 487, 558 ], "page_idx": 10 }, { "type": "text", "text": "Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer. 2022. Opt: Open pretrained transformer language models.", "bbox": [ 115, 568, 489, 659 ], "page_idx": 10 }, { "type": "text", "text": "Yuan Zhou, Jing Mei, Yiqin Yu, and Tanveer Syeda-Mahmood. 2023. Medical visual question answering using joint self-supervised learning. arXiv preprint arXiv:2302.13069.", "bbox": [ 115, 670, 489, 722 ], "page_idx": 10 }, { "type": "text", "text": "A Appendix", "text_level": 1, "bbox": [ 115, 734, 236, 752 ], "page_idx": 10 }, { "type": "text", "text": "A.1 CommonsenseQA Format", "text_level": 1, "bbox": [ 114, 762, 369, 777 ], "page_idx": 10 }, { "type": "text", "text": "We show how we reformat data from CommonsenseQA in Table 8. Reformed choice turn A/B/C/D/E into $1/2/3/4/5$ to avoid causing ambiguity with \"A:\" in prompts $P$ . The choices are removed in seq2seq format and the problem becomes more challenging.", "bbox": [ 112, 782, 489, 878 ], "page_idx": 10 }, { "type": "page_number", "text": "7693", "bbox": [ 480, 928, 519, 940 ], "page_idx": 10 }, { "type": "table", "img_path": "images/b15a200e97c7d4be5ad3a13b1680db35c4b2b7d4147142de742ba56dd0e0da72.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Setting</td><td>Format</td></tr><tr><td>Origin Format</td><td>A revolving door is convenient for two direction travel, but it also serves as a security measure at a what? \nA: bank \nB: library \nC: department store \nD: mall \nE: new york \nAnswer: A</td></tr><tr><td>Reformatted choice</td><td>Q: A revolving door is convenient for two direction travel, but it also serves as a security measure at a what? Choose from 1-5 given below. \n1: bank \n2: library \n3: department store \n4: mall \n5: new york \nA: \nAnswer: 1 or bank</td></tr><tr><td>Reformatted seq2seq</td><td>Q: A revolving door is convenient for two direction travel, but it also serves as a security measure at a what? \nA: \nAnswer: bank</td></tr></table>", "bbox": [ 144, 206, 858, 765 ], "page_idx": 11 }, { "type": "text", "text": "Table 8", "bbox": [ 470, 774, 524, 787 ], "page_idx": 11 }, { "type": "page_number", "text": "7694", "bbox": [ 480, 928, 519, 940 ], "page_idx": 11 }]123version https://git-lfs.github.com/spec/v1oid sha256:f57112c9f5454f5022dd214688d5ea75f7c5f59f3b0c1df667129a2c9bc44fefsize 3428722123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391# Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts
Zhuo Chen $^{1}$ , Xinyu Wang $^{2*}$ , Yong Jiang $^{2*}$ , Pengjun Xie $^{2}$ , Fei Huang $^{2}$ , Kewei Tu $^{1*}$
<sup>1</sup>School of Information Science and Technology, ShanghaiTech University
$^{1}$ Shanghai Engineering Research Center of Intelligent Vision and Imaging
$^{2}$ Institute for Intelligent Computing, Alibaba Group
{chenzhuo,tukw}@shanghaitech.edu.cn
{tomas.wxy,yongjiang.jy,chengchen.xpj}@alibaba-inc.com
# Abstract
In the era of large language models, applying techniques such as Retrieval Augmented Generation can better address Open-Domain Question-Answering problems. Due to constraints including model sizes and computing resources, the length of context is often limited, and it becomes challenging to empower the model to cover overlong contexts while answering questions from open domains. This paper proposes a general and convenient method to cover longer contexts in Open-Domain Question-Answering tasks. It leverages a small encoder and cross-attention mechanism and effectively encodes contexts. With our method, the original language models can cover several times longer contexts while keeping the computing requirements close to the baseline. Our experiments demonstrate that after fine-tuning, there is improved performance across two held-in datasets, four held-out datasets, and also in two In Context Learning settings. Our code will be released at https://github.com/Alibaba-NLP/Vec-RA-ODQA.
# 1 Introduction
Transformer-based (Vaswani et al., 2017) architectures with pre-training on large corpus have become popular in recent Natural Language Processing research (Brown et al., 2020; Workshop et al., 2022; Chowdhery et al., 2023). An increasing number of Natural Language Processing (NLP) tasks need to process long contexts such as Open-Domain Question Answering (ODQA) with Retrieval Augmented Generation (RAG) (Lewis et al., 2020; Izacard and Grave, 2020; Gu et al., 2018). However, the fine-tuning and inference stages in downstream tasks are still constrained by the input length, e.g., 2048 tokens for Bloomz (Muennighoff et al., 2022) and Llama-1 (Touvron et al., 2023).
With RAG, the input can easily surpass the maximum length the model can handle and it becomes
 Figure 1: A comparison of our method (lower) and retrieval augmented ODQA without vectorization (upper). In the upper part, limited retrieved contexts are processed by the task model to finish the task. The lower part illustrates our method in which an encoder is incorporated to encode overlong retrieved contexts.
challenging for the model to perform both finetuning and inference on overlong contexts. Moreover, in the in-context learning (ICL) (Dong et al., 2022; Kim et al., 2022) setting, the context will be much longer together with retrieved contexts. In such cases, the demand for the model to handle longer input text significantly increases.
To enable the model to cover longer context during both fine-tuning and inference stages, this paper proposes a method that leverages a 100 million-level encoder model in downstream ODQA tasks with a 1 billion-level language model as illustrated in the lower part of Fig. 1. With our method, the length of context that the model can cover increases from $2\mathrm{k}$ (in text form) to a maximum of $10\mathrm{k}$ (in dense form, which is condensed by the encoder). Experiments are designed under three settings to validate the effectiveness of our method. In the experiments, we first fine-tune the model, optionally including the encoder, on two popular ODQA
 Figure 2: Speed illustration. Run time is measured on a single A100 GPU and the batch size is set to 1 for all curves. "2k" on the horizontal axis represents the baseline model's run time to train or infer on data of length 2k. "5k" and "10k" correspond to two variants of our method that can cover at most 5k and 10k tokens when training and inferring. Training time measures the average over five consecutive training steps. Inference time measures the average over five consecutive generation steps. Specifically, we measure the execution duration of functions Trainer.train_step and modelgenerate based on huggingface.
datasets with retrieved contexts and evaluate our method in held-in, held-out, and ICL settings. Experimental results show that our method outperforms the baseline, which is fine-tuned on data of length 2k, in all three settings.
Regarding the speed of our method, we measure the run time of each training and inference step. Compared with work that compresses the contexts with the original task model (Chevalier et al., 2023), which requires techniques to reduce the computation graph during backpropagation, we employ a $10\mathrm{x}$ smaller model to perform the encoding of excessive texts, so a complete gradient descent procedure can be kept. To sum up, our contributions are as follows:
1. We propose a method that incorporates a small encoder model for excessively long context encoding by applying cross-attention mechanism with the original task model. 2. We evaluate our method in two held-in, four held-out, and two ICL settings after being finetuned on two ODQA datasets and obtain improved performance. 3. The computing resource requirements of our method are consistent with those of the baseline and the run time remains competitive.
 Figure 3: Method illustration of model architecture (purple blocks) and data flows (along black/purple arrows). The purple dashed arrows mean that the output of MLP module will be the "query" to the next layer of Cross-attn module. $\times N$ means that the modules with dotted backgrounds are repeated with multiple layers in the task model.
# 2 Method
# 2.1 Background
Consider an example query $\pmb{q}$ with gold answer $\pmb{a}$ and independent $C$ pieces of corresponding context information $\pmb{k} = \{\pmb{k}_1, \pmb{k}_2, \dots, \pmb{k}_C\}$ , with each being a sequence of tokens, where $\pmb{k}$ is retrieved by some retriever from a given corpus<sup>1</sup>
$$\boldsymbol {k} = \operatorname {R e t r i e v e r} (\boldsymbol {q}, \text {c o r p u s})$$
Ideally, the $C$ retrieved contexts contain the knowledge needed to answer $\pmb{q}$ correctly, but there may also be noise. Given a decoder model Dec parameterized by $\theta$ , the output sequence $\pmb{y}$ is usually modeled by
$$P _ {\theta} (\boldsymbol {y} | \boldsymbol {q}, \boldsymbol {k} _ {\max }, \boldsymbol {P}) = D e c (\boldsymbol {y} | \boldsymbol {q}, \boldsymbol {k} _ {\max }, \boldsymbol {P})$$
where $\pmb{k}_{max} = \{k_1, k_2, \dots, k_m\} \in \pmb{k}, m < C$ . $m$ refers to the number of contexts that reach the model's throughput. $P$ stands for the prompts that connect related content<sup>2</sup>. Given the model,
$k_{max}$ is usually a subset of $k$ because the maximum length of contexts is often constrained by the model's throughput or computing resources, and
During training, we aim to maximize the term $P_{\theta}(\pmb{a}|\pmb{q}, \pmb{k}_{max}, \pmb{P})$ , and formalize the ODQA problem as a language modeling task. Specifically, for a query $\pmb{q}$ , its gold answer $\pmb{a}$ and contexts $\pmb{k}_{max}$ , they are connected linguistically with proper prompts $\pmb{P}$ , together denoted as an input sequence $\pmb{x}(\pmb{q}, \pmb{a}, \pmb{k}_{max}, \pmb{P}) = \{x_1, x_2, \ldots\}$ . Then we aim to minimize the language modeling loss over the set $\mathcal{D}$ of all training examples:
$$L _ {\theta} (\mathcal {D}) = - \sum_ {\boldsymbol {x} (\boldsymbol {q}, \boldsymbol {a}, \boldsymbol {k} _ {\max }, \boldsymbol {P}) \in \mathcal {D}} \sum_ {i} \tag {1}$$
$$\log \left(P _ {\theta} \left(x _ {i} \mid x _ {< i}\right)\right)$$
# 2.2 Encoding and Cross-Attention
We propose a method that can utilize additional contexts $k_{add} = \{k_{m+1}, k_{m+2}, \ldots \}$ several times longer than $k_{max}$ . First, we introduce an encoder parameterized by $\phi$ . Then we apply cross-attention with the original task model and introduce a projector, a cross-attention module and a Multi-Layer Perceptron (MLP) in each layer, together denoted the parameters as $\pi$ . Denote $\omega = \{\phi, \pi, \theta\}$ as all the parameters in our model. On the whole, our method models the output $y$ by an encoder-decoder model Enc-Dec
$$\begin{array}{l} Q _ {\omega} (\boldsymbol {y} | \boldsymbol {q}, \boldsymbol {k} _ {\max }, \boldsymbol {P}, \boldsymbol {k} _ {\text {a d d}}) \\ = E n c - D e c (\boldsymbol {y} | \boldsymbol {q}, \boldsymbol {k} _ {\max }, \boldsymbol {P}, \boldsymbol {k} _ {\text {a d d}}) \\ \end{array}$$
During training, inputs $\boldsymbol{x}(\boldsymbol{q},\boldsymbol{a},\boldsymbol{k}_{max},\boldsymbol{P})$ are embedded by the original task model's embedding layer Emb
$$\boldsymbol {h} _ {\boldsymbol {q}} = \operatorname {E m b} (\boldsymbol {x} (\boldsymbol {q}, \boldsymbol {a}, \boldsymbol {k} _ {\max }, \boldsymbol {P}))$$
and each of the additional contexts $\pmb{k_i}$ in $k_{add}$ is encoded by the encoder Enc
$$\boldsymbol {h} _ {\boldsymbol {a d d}} ^ {(i)} = E n c (\boldsymbol {k} _ {i})$$
Note that the length of encoding from the encoder is flexible practically and we compress each $k_{i}$ into one vector. Following the output of the encoder, a projector Proj is used to align the high-dimensional hidden spaces between the encoder and task model in each layer
$$\boldsymbol {h} _ {\boldsymbol {k v}} = \operatorname {P r o j} \left(\boldsymbol {h} _ {\boldsymbol {a d d}}\right)$$
where $h_{add}$ is concatenated of all $h_{add}^{(i)}$ calculated from last step. Each layer of the task model is assigned to an independent projector as different layers may learn different representations.
In each layer, to incorporate the information stored in $k_{add}$ we add a cross-attention module, where representations of additional contexts $h_{kv}$ serve as "key" and "value", followed by an MLP. In the first layer, the embeddings of original input $h_q$ act as "query", and in the rest of the layers output $h_q'$ from the previous layer act as "query" ( $h_q'$ will be defined later).
$$\boldsymbol {h} _ {c} = C r o s s - a t t n (\boldsymbol {h} _ {q} / h _ {q} ^ {\prime}, \boldsymbol {h} _ {k v})$$
$$\boldsymbol {h} _ {\boldsymbol {m}} = M L P \left(\boldsymbol {h} _ {\boldsymbol {c}}\right)$$
Cross-attn $(h_q, h_{kv})$ is calculated as follows
$$Q = W ^ {Q} h _ {q}$$
$$K, V = W ^ {K} \boldsymbol {h} _ {\boldsymbol {k v}}, W ^ {V} \boldsymbol {h} _ {\boldsymbol {k v}}$$
$$o = s o f t m a x (\frac {Q K ^ {T}}{\sqrt {d _ {k}}}) V$$
$$\boldsymbol {h} _ {c} = W ^ {O} o$$
where $W^{Q}, W^{K}, W^{V}, W^{O}$ refer to weight matrices and $d_{k}$ refers to the dimension of each attention head. Then the output of cross-attention and MLP is normally processed by a self-attention and another MLP module. The output acts as "query" input to the cross-attention module in the next layer.
$$\pmb {h} _ {\pmb {q}} ^ {\prime} = M L P (S e l f - a t t n (\pmb {h} _ {\pmb {m}}))$$
At last, the output of the last layer is expanded to the vocabulary-size dimension to predict the next token (not shown in Fig. 3 for simplicity), and we aim to maximize the probability
$$Q _ {\omega} (\boldsymbol {a} | \boldsymbol {q}, \boldsymbol {k} _ {\text {m a x}}, \boldsymbol {P}, \boldsymbol {k} _ {\text {a d d}})$$
Consistent with the setup mentioned before, to maximize term $Q_{\omega}(a|q, k_{max}, P, k_{add})$ , we turn it into minimizing the language modeling loss
$$\begin{array}{l} J _ {\omega} (\mathcal {D}) = - \sum_ {\boldsymbol {x} (\boldsymbol {q}, \boldsymbol {a}, \boldsymbol {k} _ {\max }, \boldsymbol {P}), \boldsymbol {k} _ {\text {a d d}} \in \mathcal {D}} \sum_ {i} \\ \log \left(Q _ {\omega} \left(x _ {i} \mid x _ {< i}, \boldsymbol {k} _ {\boldsymbol {a d d}}\right)\right) \tag {2} \\ \end{array}$$
# 2.3 ICL Setting
Our method can also be applied to ICL settings. Based on the aforementioned setup, we denoted ICL samples as $l_{max} = \{l_1, l_2, \dots, l_m\}$ , with each $l_i$ composed of another pair of query and answer. We optimize objective 3 below on data where each $l_i(q', a')$ refers to only query-answer ICL samples (without context) and $q' a'$ refer to another query-answer pair:
$$\begin{array}{l} J _ {\omega} ^ {\prime} (\mathcal {D}) = - \sum_ {s (q, a, l _ {m a x}, P), k _ {a d d} \in \mathcal {D}} \sum_ {i} \\ \log \left(Q _ {\omega} ^ {\prime} \left(s _ {i} \mid s _ {< i}, \boldsymbol {k} _ {\boldsymbol {a d d}}\right)\right) \tag {3} \\ \end{array}$$
$s = \{s_1,s_2,\ldots \}$ refers to the inputs composed of $(q,a,l_{max},P)$ and $Q^{\prime}$ shares a similar definition to $Q$ in objective 2. Additional contexts $k_{add}$ are utilized in the same way as in Sec. 2.2 by performing encoding, cross-attention, etc.
# 2.4 Training
Theoretically, training processes stated in Sec. 2.2 all remain differentiable and thus all the parameters can be optimized via normal gradient descent w.r.t. objective 2. Note that the parameters $\phi$ of the encoder can be initialized from a well-pretrained model on a large scale corpus and the pretrained parameters possess good performance in many downstream tasks based on text encoding. However, the parameters in the projector module are randomly initialized. Thus at the start of the training, according to the chain rule, the gradients to the whole encoder will be random as well, which poses a risk of breaking the encoding utility of the encoder. This intuition proves to be true in our experiments.
Therefore, we design two strategies of training:
1. Directly freeze parameters $\phi$ and make parameters $(\pi, \theta)$ trainable during the whole training process. 2. In the first few training steps (e.g., one epoch), $\phi$ is kept frozen to prevent random gradients from breaking its well-pre-trained parameters. After that, $\phi$ is optimized w.r.t. objective 2 together with the other modules $(\pi, \theta)$ .
# 3 Experiment
# 3.1 Experiment settings
<table><tr><td>Settings</td><td>Data format</td></tr><tr><td>Held-in Held-out</td><td>Answer the question: Knowledge:{context k1} ...{context km}. Q: Who got the first Nobel prize in physics A:</td></tr><tr><td>ICL format w/ contexts</td><td>Answer the following questions based on the Knowledge: Knowledge:{context k1'} Q: Who developed the first printing press in 1430s A: Johannes Gutenberg ...(Knowledge: ... Q: ... A: ...) Knowledge:{context k1"} Q: Who got the first Nobel prize in physics A:</td></tr><tr><td>ICL format w/o contexts (Sec. 2.3)</td><td>Answer the following questions: Q: Who developed the first printing press in 1430s A: Johannes Gutenberg (Q: ... A: ...)... Q: Who got the first Nobel prize in physics A:</td></tr><tr><td>Additional Contexts</td><td>{context km+1}; {context km+2}; ...</td></tr></table>
Table 1: Examples of data format. Gray tokens refer to prompts $P$ mentioned in Sec. 2 and the context is omitted here.
Data To evaluate our method, we first fine-tune our model on two ODQA datasets separately, TriviaQA (Joshi et al., 2017) and Natural Questions (NQ) (Kwiatkowski et al., 2019). Besides evaluating our method on the held-in data, we also evaluate four held-out data, namely CommonsenseQA (Talmor et al., 2019), SQuAD2.0 (Rajpurkar et al., 2016), Webquestions (Berant et al., 2013) and ComplexWebQuestions (Talmor and Berant, 2018). Specifically, samples in CommonsenseQA dataset are formulated as multi-choice problems, and we evaluate the performance in both multi-choice and sequence-to-sequence formats. Refer to App. A.1 for the detailed format.
Format of input $\mathbf{x}$ in Sec. 2.2 is formulated as "Held-in Held-out" format in Table 1, and we evaluate the model's performance on samples of ICL format with context. Format of input $s$ in Sec. 2.3 is formulated as "ICL format w/o contexts" in Table 1.
Additional contexts $k_{m+1}, k_{m+2}$ are encoded by the encoder separately and independently without prompts. The forms of prompts $P$ defined
previously are shown in gray tokens in Table 1.
Retriever For contexts of the datasets TriviaQA and NQ, we utilize those collected by Karpukhin et al. (2020), which are collected with BM25 (Robertson et al., 2009) and Dense Passage Retrieval techniques. For contexts of the four held-out datasets, we follow Izacard et al. (2022) and Shi et al. (2023) and use Contriver (Izacard et al., 2021) as our retriever. Contexts $k$ are retrieved from Wikipedia dump dated December 20, 2018, the version released by Karpukhin et al. (2020).
Baseline Recent decoder-only models like Bloomz (Muennighoff et al., 2022) and GPTs (Radford et al., 2019; Achiam et al., 2023) have shown good performance in generation-like tasks, and we use $Bloomz - 1b7^3$ for the task model $\theta$ . When fine-tuning the baseline model, inputs are constructed according to the "Held-in Held-out" setting as stated in Table 1. The length of the input is extended to utilize as many contexts as possible, consistent with the maximum input length (2k) of the model while doing pre-training (Workshop et al., 2022).
Additionally, note that the context information $k_{max}$ provided in the inputs is ranked from best to worst based on Dense Retrieval (Karpukhin et al., 2020), which means the baseline we adopt is rather stronger than randomly providing as many contexts as possible without considering the quality. The baseline can be seen as a model fine-tuned on the most relevant contexts incorporating reranking techniques (Karpukhin et al., 2020; Khalifa et al., 2023).
Initialization and Training Settings Weights of popular pre-trained encoder models like BERT (Devlin et al., 2018) should be good initialization for the encoder $\phi$ and thus we adopt BERT-base-uncased for initialization of $\phi$ . Parameters of attention and MLP modules are also adapted from Bloomz-1b7. To keep the encoding process efficient, we use a simple Linear module as the projector that is randomly initialized and fine-tuned to align the hidden dimension of 768 (BERT-base-uncased) to 2048 (Bloomz-1b7).
In our experiment, we use BERT to independently encode additional contexts on 10 or 20 contexts, which can cover approximately 5k to 10k additional context tokens. Then the hidden states of
<table><tr><td>Learning Rate</td><td>2e-5</td></tr><tr><td>Optimizer</td><td>AdamW</td></tr><tr><td>Lr scheduler</td><td>cosine</td></tr><tr><td>Warmup ratio</td><td>0.03</td></tr><tr><td>FP 16</td><td>True</td></tr><tr><td>FP 16 eval</td><td>True</td></tr><tr><td>Globa batch size</td><td>8</td></tr><tr><td>Save steps</td><td>4000</td></tr><tr><td>Eval steps</td><td>4000</td></tr><tr><td>Max epochs</td><td>4</td></tr><tr><td>GPU name</td><td>NVIDIA A100-SXM 80G</td></tr></table>
Table 3: Hyperparameters
the [CLS] token are concatenated and fed-forward to subsequent modules as illustrated in Fig. 3. For both the baseline and our method, we evaluate the model checkpoint with the lowest language modeling loss on the development set and report the Exact Match (EM) metric.
As discussed in Sec. 2.4, there are mainly two choices of training strategies of which parts of our proposed model are optimized. We experiment with both strategies and report the results of the "frozen encoder" setting in Sec. 3.2 and the "training encoder" setting in Sec. 4.1 respectively.
Hyperparameters We list important hyperparameters in our experiments in Table 3.
# 3.2 Main Results
We present our main result of the first training strategy discussed in Sec. 2.4 in Table 4. Upon fine-tuning on two datasets and evaluating on three (held-in, held-out and ICL) settings, our method achieves performance superior to that of the baseline in five out of six settings, except for one setting on one dataset.
In held-in settings (training on TriviaQA/NQ and evaluating on TriviaQA/NQ), our model consistently demonstrates superior performance relative to the baseline. Moreover, it demonstrates stable improved performance as more contexts are encoded by our method, showing the potential of our model to encode even longer contexts.
In held-out settings, our method outperforms the baseline in all the datasets after being fine-tuned on TriviaQA and outperforms three of four datasets after being fine-tuned on NQ, suggesting the general applicability of our method. From the "Com.QA
<table><tr><td rowspan="2" colspan="2">Train\Evaluate</td><td colspan="2">TriviaQA</td><td colspan="2">NQ</td><td colspan="2">Com.QA test</td><td>SQuAD</td><td>Web.Q</td><td>Comp.Q</td><td colspan="2">Triviaqa (ICL)</td><td colspan="2">NQ (ICL)</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td><td>choice</td><td>seq2seq</td><td>test</td><td>test</td><td>test</td><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td rowspan="3">TriviaQA</td><td>baseline</td><td>45.740</td><td>46.203</td><td>14.868</td><td>16.288</td><td>17.199</td><td>2.785</td><td>10.191</td><td>9.524</td><td>4.490</td><td>31.764</td><td>31.857</td><td>8.999</td><td>9.058</td></tr><tr><td>+ 5k</td><td>47.686</td><td>47.742</td><td>17.506</td><td>19.307</td><td>19.328</td><td>3.194</td><td>12.684</td><td>10.053</td><td>5.513</td><td>32.341</td><td>32.034</td><td>10.677</td><td>11.136</td></tr><tr><td>+ 10k</td><td>47.901</td><td>48.245</td><td>18.465</td><td>19.529</td><td>17.363</td><td>2.539</td><td>12.667</td><td>11.111</td><td>6.024</td><td>34.027</td><td>34.235</td><td>11.671</td><td>11.801</td></tr><tr><td rowspan="3">NQ</td><td>baseline</td><td>42.809</td><td>43.976</td><td>37.159</td><td>37.978</td><td>19.410</td><td>4.095</td><td>21.199</td><td>14.815</td><td>13.498</td><td>35.521</td><td>35.967</td><td>19.242</td><td>21.136</td></tr><tr><td>+ 5k</td><td>43.669</td><td>44.657</td><td>37.01</td><td>38.698</td><td>19.656</td><td>4.095</td><td>22.724</td><td>15.344</td><td>13.214</td><td>35.883</td><td>35.985</td><td>19.265</td><td>21.413</td></tr><tr><td>+ 10k</td><td>44.189</td><td>45.107</td><td>37.581</td><td>39.114</td><td>21.294</td><td>4.423</td><td>22.918</td><td>15.873</td><td>13.413</td><td>36.381</td><td>36.569</td><td>19.447</td><td>21.662</td></tr></table>
Table 4: Main results of performance with frozen encoder on held-in, held-out and ICL settings. **Boldface** marks the best results in each setting. Com.QA refers to CommonsenseQA. Web.Q refers to WebQuestions. Comp.Q refers to ComplexWebQuestions. TriviaQA (ICL) and NQ (ICL) show the results evaluated on ICL setting where the data is formed as illustrated in Table 1 ICL.
choice" setting we can see that though our model is not trained to answer multi-choice questions, it performs better in selecting choices than baseline.
In the last two columns TriviaQA (ICL) and NQ (ICL), we evaluate whether the optimized model can generalize to a similar ICL setting. Specifically, with optimized parameter $\omega^{*}$ after fine-tuning objective 2 we evaluate how well we can model $Q_{\omega^{*}}(a|q,l_{max},P,k_{add})$ where each $l_{i}(q^{\prime},a^{\prime},k^{\prime})$ is an ICL sample composed of another query, context and answer. Surprisingly, we obtain a similar improved performance to the held-in setting. Steadily improved performance indicates that the training method we adopt is robust, maintaining both the encoder and decoder's efficacy in retrieving useful information while the evaluation data format diverges from the training data.
In summary, from the results presented in Table 4, it is observable that in comparison with the baseline, employing our method to encode a greater volume of retrieval information offers a predominantly positive enhancement to the model's performance across various settings, including held-in, held-out, and ICL.
# 4 Analysis
In this section, we present the results of three analytical experiments. The first one shows the result of the other training strategy discussed in Sec. 2.4. The second shows the evaluation results of optimizing objective 3. The third shows the effectiveness of our method in a more challenging setting.
# 4.1 Encoder Training
In our experiments, we first try optimizing the encoder $\phi$ with the other parameters $(\pi ,\theta)$ from the
very beginning of the training process. Results turn out to verify our anticipation: newly introduced random parameters (the projector) easily mess up with the parameters in the encoder, consequently undermining its capability to encode information and resulting in worse performance than baseline.
Here we evaluate the training strategy we proposed in Sec. 2.4 that aims to fix this problem. The encoder is optimized after several training steps, and in our experiment, we set it to one epoch. Besides, the parameters in the cross-attention module are initialized by those in the pre-trained self-attention module to minimize the amount of randomly initialized parameters.
Evaluations are done in the same settings as in Table 4. By applying this two-step training method, we succeed in obtaining better performance than the baseline in most of the settings. It can be inferred that compared with the setting of a frozen encoder (i.e., $\phi$ is not optimized), further introducing trainable encoder parameters did not further enhance the model's performance as anticipated. Although we can achieve better results in most settings than baseline, performance in held-in and held-out settings seems to be less stable compared to the "frozen encoder" setting. Particularly, we find that optimizing the encoder results in degraded performance in the ICL setting, especially after being fine-tuned on TriviaQA datasets. We attribute this to the fact that million-scale parameter models, after fine-tuning on certain data, cannot guarantee to generalize the encoding capability to a broader range of scenarios, e.g. the ICL setting, as defined in Table 1. We present the results of the second training strategy discussed in Sec. 2.4 in Table 5.
<table><tr><td rowspan="2" colspan="2">Train\Evaluate</td><td colspan="2">TriviaQA</td><td colspan="2">NQ</td><td colspan="2">Com.QA test</td><td>SQuAD</td><td>Web.Q</td><td>Comp.Q</td><td colspan="2">Triviaqa (ICL)</td><td colspan="2">NQ (ICL)</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td><td>choice</td><td>seq2seq</td><td>test</td><td>test</td><td>test</td><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td rowspan="3">TriviaQA</td><td>baseline</td><td>45.740</td><td>46.203</td><td>14.868</td><td>16.288</td><td>17.199</td><td>2.785</td><td>10.191</td><td>9.524</td><td>4.490</td><td>31.764</td><td>31.857</td><td>8.999</td><td>9.058</td></tr><tr><td>+ 5k</td><td>48.082</td><td>47.803</td><td>15.896</td><td>16.898</td><td>14.333</td><td>3.112</td><td>10.755</td><td>11.640</td><td>4.945</td><td>16.646</td><td>16.645</td><td>6.178</td><td>6.676</td></tr><tr><td>+ 10k</td><td>47.980</td><td>47.750</td><td>16.079</td><td>17.008</td><td>15.807</td><td>2.867</td><td>10.823</td><td>11.111</td><td>5.058</td><td>16.103</td><td>16.300</td><td>6.383</td><td>7.008</td></tr><tr><td rowspan="3">NQ</td><td>baseline</td><td>42.809</td><td>43.976</td><td>37.159</td><td>37.978</td><td>19.410</td><td>4.095</td><td>21.199</td><td>14.815</td><td>13.498</td><td>35.521</td><td>35.967</td><td>19.242</td><td>21.136</td></tr><tr><td>+ 5k</td><td>43.397</td><td>44.524</td><td>37.387</td><td>39.03</td><td>15.889</td><td>4.095</td><td>22.092</td><td>14.286</td><td>12.958</td><td>33.993</td><td>34.341</td><td>17.951</td><td>19.640</td></tr><tr><td>+ 10k</td><td>43.284</td><td>44.047</td><td>37.205</td><td>39.28</td><td>16.790</td><td>3.931</td><td>22.143</td><td>16.402</td><td>12.788</td><td>33.122</td><td>33.404</td><td>18.933</td><td>20.914</td></tr></table>
Table 5: Analysis of training encoder along with the task model when fine-tuning. Experiments are conducted under the same setting to Sec. 3.2
<table><tr><td rowspan="2">ICL samples w/o contexts</td><td colspan="2">TriviaQA</td><td colspan="2">NQ</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td>baseline</td><td>20.052</td><td>20.083</td><td>19.242</td><td>19.529</td></tr><tr><td>+ 10 vec</td><td>19.939</td><td>20.233</td><td>19.539</td><td>19.668</td></tr><tr><td>+ 20 vec</td><td>20.358</td><td>20.578</td><td>19.333</td><td>19.501</td></tr></table>
# 4.2 ICL Setting w/o Contexts
We also experiment with optimizing objective 3 defined in Sec. 2.3 where only query-answer pairs are provided in the ICL format input. The detailed data format is shown in Table 1 "ICL format w/o contexts" and the query-answer pair is sampled as many as possible from the held-in dataset. The utility of the encoder remains the same as it encodes $10(+10\mathrm{vec})$ or $20(+20\mathrm{vec})$ pieces of context and is kept frozen during the training.
The model is fine-tuned on TriviaQA and NQ and evaluated in held-in settings. We report the result in Table 6. First, we see that our method can still enhance the model in this setting but the improvements seem to be not consistent or prominent. Second, notice that the improvement on each dataset is not as remarkable as that in the ICL setting in Table 4, where each ICL sample is provided along with one piece of context.
To summarize the findings here, our method for encoding context exhibits a more pronounced performance enhancement in ICL settings that incorporate context information. We posit that the underlying reason for this is that the cross-attention mechanism, which facilitates information interchange between inputs (embedded by the task model) and dense context information (coded by the en
Table 6: Result of fine-tuning on data with ICL samples (without context information) and evaluating on held-in setting.
<table><tr><td rowspan="2">kmax = {}</td><td colspan="2">TriviaQA</td><td colspan="2">NQ</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td>baseline</td><td>20.391</td><td>20.472</td><td>18.968</td><td>19.889</td></tr><tr><td>+1 vec</td><td>21.636</td><td>21.533</td><td>20.041</td><td>20.637</td></tr><tr><td>+5 vec</td><td>21.942</td><td>22.010</td><td>20.258</td><td>20.942</td></tr><tr><td>+10 vec</td><td>21.964</td><td>22.072</td><td>22.268</td><td>22.632</td></tr></table>
Table 7: Effectiveness of our method on encoding when we remove the influence on text form context information in $\mathbf{x}$ .
coder), is particularly effective when context interacts with context, instead of context with ICL samples with only query-answer pairs.
# 4.3 A More Challenging Setting
In our method presented in Sec. 2.2, we adopt a projector module that is applied to align the high-dimensional hidden spaces and adopt cross-attention mechanism to incorporate the dense context information in each layer. In this section, we evaluate the effectiveness of our method in a more challenging setting.
Specifically, compared to the data format stated in the "Held-in Held-out" setting in Table 1, we remove the contexts in input $\pmb{x}$ and keep only questions and answers in the training data, i.e., $\pmb{x}$ in objective 2 becomes $(q, a, \{\}, P)$ . Only several contexts are supplied as "Additional Contexts" encoded by the encoder. Note that though supplying text-form contexts can greatly enhance models in ODQA tasks, here we remove them to test the effectiveness of the encoder and cross-attention mechanism in a more challenging setting.
Results are shown in Table. 7. " $+1 / 5 / 10$ vec" means we utilize $1 / 5 / 10$ pieces of contexts and encode them into $1 / 5 / 10$ vectors by taking the [CLS]
tokens' hidden states. It can be inferred that, firstly, with only one encoded vector, our method can enhance the model. Secondly, we observe consistent improvement across two datasets and three variants of our method that incorporating more contexts leads to better performance.
# 5 Related Work
# 5.1 Retrieval Augmentation
Recently, retrieval augmentation has been utilized to improve a large amount of Natural Language Processing downstream tasks such as question-answering (Chen et al., 2017; Lewis et al., 2020; Kwiatkowski et al., 2019; Fan et al., 2019), dialogue (Moghe et al., 2018), language modeling (Khandelwal et al., 2020), NER (Wang et al., 2022, 2021) and machine translation (Gu et al., 2018; Xu et al., 2022). In the aforementioned work, the utilization of retrieval information has been fundamentally capable of enhancing model performance across all dimensions.
# 5.2 Related Model Architectures
Referring to the base model, there has been increasing interest in using models of encoder-decoder or decoder-only architectures in solving downstream tasks with retrieval augmentation recently.
Allaouzi et al. (2019) and Zhou et al. (2023) employ models of encoder-decoder architectures to solve visual question answering task in the medical domain. In their work, the encoder model is responsible for extracting prominent features from a medical image and the decoder part generates the answer. Li et al. (2023) utilizes an encoder-decoder model with constrained decoding to solve extractive question answering task.
Decoder-only models, e.g., ChatGPT and GPT-4 (Achiam et al., 2023), are more famous for their surprisingly great performance on tasks like question answering (Ali et al., 2022) and there is abundant work that tries to improve the performance based on GPTs (Pereira et al., 2023). Kim and Min (2024) introduce a chatbot model that utilizes generative AI and the Retrieval Augmented Generation method to address the issue that achieving regulatory compliance necessitates the intricate navigation of exceptionally complex and voluminous guidelines in the pharmaceutical industry.
In our work, we also incorporate an encoder for context encoding. However, compared to the traditional encoder-decoder models, the encoder part
in our method is several times smaller than the decoder part. Although our method does not alter the quadratic complexity of the attention mechanism, it instead processes the long contexts in a much lower dimension, thus being able to quintuple the capacity to cover context information without the need to utilize additional computing resources.
# 5.3 Utilizing Long Contexts
To handle contexts with excessive length, recently proposed techniques such as context compression are increasingly investigated in NLP research.
Chevalier et al. (2023) proposes "AutoCompressors" that uses OPT (Zhang et al., 2022) and Llama-2 (Touvron et al., 2023) to compress texts into summary vectors and show that utilizing long contexts can improve perplexity. In their method, the compression is done by the billion-level language model, and in one of their experiments, they train on sequence with 30720 tokens with 20 compression steps. However, the complete computation graph cannot be fully kept in such settings, and the optimizing process has to rely on stopping gradients, which poses potential risks to the mathematical principle behind gradient descent. Similarly in Zhang et al. (2024)'s work, the long context is first partitioned into multiple intervals, and then a sliding window is employed to sequentially process one interval at a time and the compressed token embeddings are kept for the next token prediction. It is implemented by introducing additional trainable parameters to the origin language model to finish the task of "Activation Condensing", and original parameters are frozen throughout the training process.
# 6 Conclusion
In this paper, we propose a method that incorporates a small encoder model for excessively long context encoding by applying cross-attention mechanism with the original task model. The method is simple and general for transformer-based language models. In our experiments, after fine-tuning on ODQA dataset, we find improved performance across two held-in, four held-out and two ICL settings, compared to a baseline that incorporates the reranking technique on training data, showing the effectiveness of our method in utilizing long contexts. We note that the intuitive explanations for the performance improvement are as follows: 1) the encoder model provides the ability to encode
longer contexts; 2) the cross-attention mechanism is useful in selectively attending the correct parts of the inputs. Regarding the efficiency, the need for GPU quantity remains unchanged and the run time remains competitive to the baseline.
# 7 Limitations
First, we have only tested our method in 1B7 models with a 110M encoder, and yet we have not tested the effectiveness of our method on larger language models, e.g., 7B and 70B, due to limited computing resources.
Second, we observe that our method exhibits relatively modest performance under setting 4.2, with only a slight improvement compared to the baseline. We attribute the potential reasons for this to the cross-attention mechanism being unsuitable for modeling the relationship between context and ICL samples (without contexts).
# Acknowledgement
This work was supported by Alibaba Group through Alibaba Innovative Research Program.
# References
Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774. Rohaid Ali, Oliver Y Tang, Ian D Connolly, Jared S Fridley, John H Shin, Patricia L Zadnik Sullivan, Deus Cielo, Adetokunbo A Oyelese, Curtis E Doberstein, Albert E Telfeian, et al. 2022. Performance of chatgpt, gpt-4, and google bard on a neurosurgery oral boards preparation question bank. Neurosurgery, pages 10-1227. Imane Allaouzi, Mohamed Ben Ahmed, and Badr Benamrou. 2019. An encoder-decoder model for visual question answering in the medical domain. In CLEF (working notes). Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013. Semantic parsing on Freebase from question-answer pairs. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1533-1544, Seattle, Washington, USA. Association for Computational Linguistics. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot
learners. Advances in neural information processing systems, 33:1877-1901. Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading Wikipedia to answer open-domain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1870-1879, Vancouver, Canada. Association for Computational Linguistics. Alexis Chevalier, Alexander Wettig, Anirudh Ajith, and Danqi Chen. 2023. Adapting language models to compress contexts. arXiv preprint 2305.14788. Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. 2023. Palm: Scaling language modeling with pathways. Journal of Machine Learning Research, 24(240):1-113. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, and Zhifang Sui. 2022. A survey for in-context learning. arXiv preprint arXiv:2301.00234. Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. 2019. ELI5: Long form question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3558-3567, Florence, Italy. Association for Computational Linguistics. Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor OK Li. 2018. Search engine guided neural machine translation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32. Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave. 2021. Unsupervised dense information retrieval with contrastive learning. arXiv preprint arXiv:2112.09118. Gautier Izacard and Edouard Grave. 2020. Leveraging passage retrieval with generative models for open domain question answering. arXiv preprint arXiv:2007.01282. Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. 2022. Few-shot learning with retrieval augmented language models. arXiv preprint arXiv:2208.03299. Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of
the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601-1611, Vancouver, Canada. Association for Computational Linguistics. Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics. Muhammad Khalifa, Lajanugen Logeswaran, Moontae Lee, Honglak Lee, and Lu Wang. 2023. Few-shot reranking for multi-hop QA via language model prompting. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15882-15897, Toronto, Canada. Association for Computational Linguistics. Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2020. Generalization through memorization: Nearest neighbor language models. Hyuhng Joon Kim, Hyunsoo Cho, Junyeob Kim, Taeuk Kim, Kang Min Yoo, and Sang-goo Lee. 2022. Self-generated in-context learning: Leveraging auto-regressive language models as a demonstration generator. arXiv preprint arXiv:2206.08082. Jaewoong Kim and Moohong Min. 2024. From rag to qa-rag: Integrating generative ai for pharmaceutical regulatory compliance process. arXiv preprint arXiv:2402.01717. Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466. Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459-9474. Shaobo Li, Chengjie Sun, Bingquan Liu, Yuanchao Liu, and Zhenzhou Ji. 2023. Modeling extractive question answering using encoder-decoder models with constrained decoding and evaluation-based reinforcement learning. Mathematics, 11(7). Nikita Moghe, Siddhartha Arora, Suman Banerjee, and Mitesh M. Khapra. 2018. Towards exploiting background knowledge for building conversation systems. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages
2322-2332, Brussels, Belgium. Association for Computational Linguistics. Niklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, et al. 2022. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786. Jayr Pereira, Robson Fidalgo, Roberto Lotufo, and Rodrigo Nogueira. 2023. Visconde: Multi-document qa with gpt-3 and neural reranking. In European Conference on Information Retrieval, pages 534-543. Springer. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383-2392. Stephen Robertson, Hugo Zaragoza, et al. 2009. The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends® in Information Retrieval, 3(4):333-389. Weijia Shi, Sewon Min, Michihiro Yasunaga, Minjoon Seo, Rich James, Mike Lewis, Luke Zettlemoyer, and Wen-tau Yih. 2023. Replug: Retrievalaugmented black-box language models. arXiv preprint arXiv:2301.12652. Alon Talmor and Jonathan Berant. 2018. The web as a knowledge-base for answering complex questions. Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019. Commonsenseqa: A question answering challenge targeting commonsense knowledge. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4149-4158. Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30. Xinyu Wang, Yong Jiang, Nguyen Bach, Tao Wang, Zhongqiang Huang, Fei Huang, and Kewei Tu. 2021. Improving Named Entity Recognition by External
Context Retrieving and Cooperative Learning. In the Joint Conference of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJCNLP 2021). Association for Computational Linguistics.
Xinyu Wang, Yongliang Shen, Jiong Cai, Tao Wang, Xiaobin Wang, Pengjun Xie, Fei Huang, Weiming Lu, Yueting Zhuang, Kewei Tu, Wei Lu, and Yong Jiang. 2022. DAMO-NLP at SemEval-2022 task 11: A knowledge-based system for multilingual named entity recognition. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval2022), pages 1457-1468, Seattle, United States. Association for Computational Linguistics.
BigScience Workshop, Teven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ilic, Daniel Hesslow, Roman Castagné, Alexandra Sasha Luccioni, François Yvon, et al. 2022. Bloom: A 176b-parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100.
Jitao Xu, Josep Crego, and Jean Senellart. 2022. Boosting neural machine translation with similar translations. In Proceedings of the 15th Biennial Conference of the Association for Machine Translation in the Americas (Volume 2: Users and Providers Track and Government Track), pages 282-292, Orlando, USA. Association for Machine Translation in the Americas.
Peitian Zhang, Zheng Liu, Shitao Xiao, Ninglu Shao, Qiwei Ye, and Zhicheng Dou. 2024. Soaring from 4k to 400k: Extending llm's context with activation beacon. arXiv preprint arXiv:2401.03462.
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer. 2022. Opt: Open pretrained transformer language models.
Yuan Zhou, Jing Mei, Yiqin Yu, and Tanveer Syeda-Mahmood. 2023. Medical visual question answering using joint self-supervised learning. arXiv preprint arXiv:2302.13069.
# A Appendix
# A.1 CommonsenseQA Format
We show how we reformat data from CommonsenseQA in Table 8. Reformed choice turn A/B/C/D/E into $1/2/3/4/5$ to avoid causing ambiguity with "A:" in prompts $P$ . The choices are removed in seq2seq format and the problem becomes more challenging.
<table><tr><td>Setting</td><td>Format</td></tr><tr><td>Origin Format</td><td>A revolving door is convenient for two direction travel, but it also serves as a security measure at a what? A: bank B: library C: department store D: mall E: new york Answer: A</td></tr><tr><td>Reformatted choice</td><td>Q: A revolving door is convenient for two direction travel, but it also serves as a security measure at a what? Choose from 1-5 given below. 1: bank 2: library 3: department store 4: mall 5: new york A: Answer: 1 or bank</td></tr><tr><td>Reformatted seq2seq</td><td>Q: A revolving door is convenient for two direction travel, but it also serves as a security measure at a what? A: Answer: bank</td></tr></table>
Table 8123version https://git-lfs.github.com/spec/v1oid sha256:1ff20fb1442107fd17baa3cbe2d1d3c39dc2806d2ceee2a30b723ab610229dccsize 529861123version https://git-lfs.github.com/spec/v1oid sha256:73feaa7690a19ca67616dc6af37b2da77f71801aad4691bd22e8461c25874c9asize 676551123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375# Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning
Helan $\mathbf{H}\mathbf{u}^{1,2*}$ , Shuzheng $\mathbf{S}\mathbf{i}^{1,2*}$ , Haozhe Zhao $^{1,2*}$
Shuang Zeng<sup>3</sup>, Kaikai An<sup>1,2</sup>, Zefan Cai<sup>1,2</sup> and Baobao Chang<sup>1,4†</sup>
$^{1}$ National Key Laboratory for Multimedia Information Processing, Peking University
$^{2}$ School of Software and Microelectronics, Peking University $^{3}$ Tencent Inc.
$^{4}$ Jiangsu Collaborative Innovation Center for Language Ability, Jiangsu Normal University, Xuzhou, China
# Abstract
Distantly-Supervised Named Entity Recognition (DS-NER) effectively alleviates the burden of annotation, but meanwhile suffers from the label noise. Recent works attempt to adopt the teacher-student framework to gradually refine the training labels and improve the overall robustness. However, we argue that these teacher-student methods achieve limited performance because the poor calibration of the teacher network produces incorrectly pseudo-labeled samples, leading to error propagation. Therefore, we attempt to mitigate this issue by proposing: (1) Uncertainty-Aware Teacher Learning that leverages the prediction uncertainty to reduce the number of incorrect pseudo labels in the self-training stage; (2) Student-Student Collaborative Learning that allows the transfer of reliable labels between two student networks instead of indiscriminately relying on all pseudo labels from its teacher, and further enables a full exploration of mislabeled samples rather than simply filtering unreliable pseudo-labeled samples. We evaluate our proposed method on five DS-NER datasets, demonstrating that our method is superior to the state-of-the-art DS-NER denoising methods.
# 1 Introduction
Named Entity Recognition (NER) aims to detect entity spans in text and then classify them into predefined categories, which plays an important role in many applications such as dialogue systems (Li and Zhao, 2023; Liu et al., 2023; Si et al., 2022a, 2024). However, deep learning-based NER methods usually require a substantial quantity of high-quality annotation for training models, which is not only exceedingly costly but also time-consuming.
To alleviate the burden of annotation, Distantly-Supervised Named Entity Recognition (DS-NER)
*Equal contribution, ordered alphabetically by the last name. Email: sishuzheng@stu.pku.edu.cn
† Corresponding author.
 Figure 1: A sample generated by DS-NER. "Amazon" and "Washington" are inaccurate annotations. "Arafat" and "rainforest" are the incomplete annotations.
is widely used in real-world scenarios. It can automatically generate massive labeled training data by matching entities in existing knowledge bases with snippets in text. However, DS-NER suffers from two inherent issues: (1) Inaccurate Annotation: due to the context-free matching, the entity with multiple types in the knowledge bases may be labeled as an inaccurate type, and (2) Incomplete Annotation: due to the limited coverage of knowledge bases, many entity mentions in text cannot be matched and are wrongly labeled as non-entity. As shown in Figure 1, the entity types of "Washington" and "Amazon" are wrongly labeled owing to context-free matching, and "Arafat" is not recognized due to the limited coverage of resources.
Therefore, many works attempt to address these issues (Peng et al., 2019; Zhou et al., 2022; Li et al., 2021; Si et al., 2022b, 2023). Recently, the self-training teacher-student framework in DS-NER has attracted increasing attention (Liang et al., 2020; Zhang et al., 2021a; Qu et al., 2023), as it can handle inaccurate and incomplete labels simultaneously, and use generated pseudo labels to make full use of the unlabeled samples from DS-NER dataset. This self-training framework firstly uses generated reliable pseudo labels from the teacher network to train the student network, and then updates a new teacher by shifting the weights of the trained student. Through this self-training loop, the
training labels are gradually refined and model generalization can be improved. Specifically, BOND (Liang et al., 2020) designs a teacher-student network and selects high-confidence pseudo labels as reliable labels to get a more robust model. SCDL (Zhang et al., 2021b) further improves the performance by jointly training two teacher-student networks, then selects consistent and high-confidence pseudo labels between two teachers as reliable labels. ATSEN (Qu et al., 2023) designs two teacher-student networks by considering both consistent and inconsistent high-confidence pseudo labels between two teachers and also proposes fine-grained teacher updating to achieve advanced performance.
The above teacher-student methods highly rely on using the high-confidence pseudo labels (e.g., pseudo labels with confidence values greater than 0.7) as reliable labels, as they assume that the teacher model's predictions with high confidence tend to be correct. However, this assumption may be far from reality. Neural networks are usually poorly calibrated (Guo et al., 2017; Rizve et al., 2021), i.e., the probability associated with the predicted label usually reflects the bias of the teacher network and does not reflect the likelihood of its ground truth correctness. Therefore, a poorly calibrated teacher network can easily generate incorrect pseudo labels with high confidence. We argue that previous teacher-student methods achieve limited performance because poor network calibration produces incorrect pseudo-labeled samples, leading to error propagation.
We aim to reduce the effect of incorrect pseudo labels within the teacher-student framework by unCertainty-aware tEacher aNd Student-Student cOllaborative leaRning (CENSOR). Specifically, we apply two teacher-student networks to provide multi-view predictions on training samples. We propose Uncertainty-aware Teacher Learning that leverages the prediction uncertainty to guide the selection procedure of pseudo labels. Then, we use both uncertainty and confidence as indicators to select pseudo labels, reducing the number of incorrect pseudo labels selected by confidence scores from poorly calibrated teacher networks. We only select the pseudo labels with high confidence and low uncertainty as reliable labels, since these selected labels are more likely to contain less noise. Subsequently, to further reduce the risk of learning incorrect pseudo labels and make a full exploration of mislabeled samples, we introduce Student-Student Collaborative Learning that allows the transfer of
reliable labels between two student networks. In each batch of data, each student network views its small-loss pseudo labels (e.g., pseudo labels of $10\%$ samples with the smallest loss) as reliable labels and then teaches such reliable labels to the other student network for updating the parameters. In this way, a student network does not completely rely on all the pseudo labels from its poorly calibrated teacher network. Meanwhile, different from just filtering unreliable pseudo-labeled samples, this component provides the opportunity for the incorrect pseudo-labeled samples to be correctly labeled by the other teacher-student network, allowing the full exploration of training data. Experiments demonstrate that our method significantly outperforms previous methods, e.g., improving the F1 score by an average of $1.87\%$ on five DS-NER datasets.
# 2 Related Work
To alleviate the burden of annotation, previous studies attempted to annotate NER datasets via distant supervision, which suffers from noisy annotation.
To address these issues, various methods have been proposed. Several studies (Shang et al., 2018; Yang et al., 2018; Jie et al., 2019) modify CRF to get better performance under the noise. Peng et al. (2019); Zhou et al. (2022) try to employ PU learning to obtain the unbiased estimation of loss value. Li et al. (2021, 2022) introduce negative sampling to mitigate the misguidance from unlabeled entities. Liang et al. (2020); Zhang et al. (2021b); Qu et al. (2023) adopt the teacher-student framework to handle both inaccurate and incomplete labels simultaneously. In this paper, we attempt to reduce the effect of incorrect pseudo labels and error propagation in the teacher-student framework to achieve better performance.
Teacher-Student Framework Teacher-student framework is a popular architecture in many semisupervised tasks (Huo et al., 2021). Recently, the teacher-student framework has attracted increasing attention in DS-NER task. BOND (Liang et al., 2020) firstly attempts to apply self-training with a teacher-student network in DS-NER. SCDL (Zhang et al., 2021b) further improves the performance by jointly training two teacher-student networks. ATSEN (Qu et al., 2023) considers both consistent and inconsistent predictions between two teachers and proposes fine-grained teacher updating to achieve more robustness. We improve the teacher-student
 Figure 2: General architecture of CENSOR, which consists of two teacher-student networks. [①] means the teacher network first generates pseudo labels. [②] means estimating the confidence and uncertainty of generated pseudo labels. [③] means selecting reliable pseudo labels according to confidence and uncertainty, where masked pseudo labels will not be used to update the student network. [④] means using Student-Student Collaborative Learning to transfer the reliable pseudo labels. [⑤] means using selected reliable pseudo labels to update the corresponding student network. [⑥] means updating a new teacher by shifting the weights of the trained student.
framework by Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning, jointly reducing the effect of incorrect pseudo labels. In this way, our method can avoid error propagation and achieve better overall performance.
# 3 Task Definition
Given the training corpus $D_{ds}$ where each sample $(x_i, y_i)$ , $x_i$ represents $i$ -th token, and $y_i$ is the label. Each entity is a span of the text, associated with an entity type. We use the BIO scheme for sequence labeling. The beginning token of an entity is labeled as $B$ -type, and others are $I$ -type. The non-entity tokens are labeled as $O$ . Traditional NER is a supervised learning task based on a clean dataset. We focus on the practical scenario where the training labels are noisy due to distant supervision, i.e., the revealed tag $y_i$ may not correspond to the underlying correct one. Thus, the challenge of DS-NER is to reduce the negative effect of noisy annotations.
# 4 Methodology
As shown in Figure 2, CENSOR consists of two teacher-student networks to handle the noisy label. To avoid overfitting the incorrect pseudo labels generated by poorly calibrated teacher networks, we introduce Uncertainty-Aware Teacher Learning that leverages the prediction uncertainty to guide the label selection. We also propose Student-Student Collaborative Learning that allows reliable label
transfer between two student networks, further reducing the risk of learning incorrect pseudo labels and making a full use of mislabeled samples.
# 4.1 Teacher-student Framework
Neural networks excel at memorization (Arpit et al., 2017). However, when noisy labels become prominent, deep-learning-based NER models inevitably overfit noisy labeled data, resulting in poor performance. The purpose of the teacher-student methods is to select reliable labels (i.e., pseudo labels that are more likely to be labeled correctly), to reduce the negative effect of label noise. Self-training involves the teacher-student network, where the teacher network first generates pseudo labels to participate in label selection. Then the student is optimized via back-propagation based on selected reliable labels, and the teacher is updated by gradually shifting the weights of the student with an exponential moving average (EMA). Following Qu et al. (2023), we train two sets of teacher-student networks using two different NER models to provide multi-view predictions on training samples.
# 4.2 Uncertainty-Aware Teacher Learning
In the DS-NER task, one of the main challenges of the teacher-student framework is to evaluate the correctness of the generated pseudo labels of the teacher model. Previous methods (Liang et al., 2020; Zhang et al., 2021a; Qu et al., 2023) generally assume that high-confidence predictions tend
to be correct. Therefore, they select the samples with high-confidence pseudo labels (e.g., pseudo labels with confidence values greater than 0.7) as training data. However, the teacher network is prone to generating high-confidence yet incorrect pseudo labels due to the poor calibration (Guo et al., 2017). This overconfidence is indicative of model bias rather than the true likelihood of correctness. Therefore, relying solely on the teacher network's confidence as the indicator may not efficiently evaluate the correctness of the pseudo labels.
Meanwhile, we observe that when the NER model performs supervised learning on a mislabeled token, it receives two types of supervision from the incorrect label of the mislabeled token and the labels of semantically similar but correctly labeled tokens. For example, "Washington" in Figure 1 is mislabeled as "LOC" (location), and the model trained with it tends to predict "Washington" as "LOC" instead of "PER" (person). The model is also exposed to semantically similar but correctly labeled tokens, such as the token "James" labeled as "PER" in the training sentence "U.S. President will meet James at the White House", thus the model may also learn to generalize "Washington" as a "PER". The knowledge in both types of supervision is eventually learned and saved to the network neurons. However, as the training continues, the deep-learning-based model inevitably overfits the noisy labels due to its memorization capability (Arpit et al., 2017), rather than utilizing the correct knowledge learned from the labels of semantically similar but correctly labeled tokens.
Uncertainty Estimation Based on our observation, we find that randomly deactivating neurons introduces variability in predicted confidence of the incorrect pseudo label, which can be attributed to varying subsets of active neurons influencing each prediction. Specifically, the randomness of deactivation of the network neurons makes the remaining network neurons sometimes retain more knowledge learned from the incorrect label of the mistrailed token, and sometimes retain more knowledge learned from the labels of semantically similar but correctly labeled tokens. Consequently, such discrepancies can lead to inconsistencies in multiple predictions. For the correctly labeled tokens, since their labels are the same as those of semantically similar tokens, the two types of knowledge stored in the network neurons are more consistent, so the predictions from the different subsets of active neu
rons tend to be more consistent. Thus, we define the inconsistency of predictions from sampled teacher network neurons as uncertainty and evaluate the correctness of the generated pseudo labels.
Specifically, given the new input token $x^{*}$ and the pseudo label $\hat{y}^{*}$ generated by the teacher network $W$ , we perform $K$ forward passes with Dropouts (Krizhevsky et al., 2012) through our teacher networks at inference time. In each pass, pre-defined parts of network neurons are randomly deactivated. Then, we could yield $K$ subsets of active neurons $\{\hat{W}_1, \hat{W}_2, \dots, \hat{W}_K\}$ . To estimate the uncertainty for each token in the sequence labeling task, we leverage the variance of the model outputs for each token from multiple forward passes:
$$s _ {u n} \left(y ^ {*} = \hat {y} ^ {*} \mid W, x ^ {*}\right) = \operatorname {V a r} \left[ p \left(y ^ {*} = \hat {y} ^ {*} \mid \tilde {W} _ {k}, x ^ {*}\right) \right] _ {k = 1} ^ {K}, \tag {1}$$
where $Var[.]$ is the variance of distribution over the $K$ passes through the teacher network. The lower uncertainty indicates the predictions from sampled teacher network neurons and the learned knowledge are more consistent, thus the pseudo label is more likely to be correct.
Uncertainty-Aware Label Selection Different from previous teacher-student methods only using confidence as the indicator to select reliable pseudo labels, we jointly consider the confidence and uncertainty in label selection. For the confidence of the pseudo label $\hat{y}^*$ , as follows:
$$\hat {y} ^ {*} = \operatorname {a r g m a x} \left(p \left(y ^ {*} \mid W, x ^ {*}\right)\right)$$
$$s _ {c o} \left(y ^ {*} = \hat {y} ^ {*} \mid W, x ^ {*}\right) = p \left(y ^ {*} = \hat {y} ^ {*} \mid W, x ^ {*}\right) \tag {2}$$
A higher confidence value $s_{co}$ means the model is more confident for the pseudo label $\hat{y}^*$ . However, many of these selected pseudo labels with high confidence are also incorrect due to the poorly calibrated teacher network (Guo et al., 2017), leading to error propagation in the self-training. To reduce the effect of incorrect pseudo labels, we additionally use uncertainty score $s_{un}$ as the indicator. Specifically, we select a subset of pseudo labels which are both high-confidence and low-uncertainty as reliable labels, since jointly considering confidence and uncertainty can further filter the incorrect pseudo labels with high confidence. Thus, we define a masked matrix, i.e.,
$$M _ {x ^ {*}} = \left\{ \begin{array}{c c} 1 & s _ {u n} < \sigma_ {u a} \quad a n d \quad s _ {c o} > \sigma_ {c o}; \\ 0 & \text {O t h e r w i s e}; \end{array} \right. \tag {3}$$
When $M = 0$ , it means the pseudo-label may be incorrect and the sample should be masked in the self-training. $\sigma_{co}$ and $\sigma_{ua}$ are hyperparameters.
# 4.3 Student-Student Collaborative Learning
Based on Uncertainty-Aware Teacher Learning, the teacher network can utilize the correctly pseudo-labeled samples to alleviate the negative effect of label noise. However, simply masking unreliable pseudo-labeled samples can lead to underutilization of the training set, as there is no chance for the incorrect pseudo-labeled samples to be corrected and further learned. Intuitively, if we can correct the incorrect pseudo label with the correct one, it will become a useful training sample. Therefore, to address these shortcomings and incorporate Uncertainty-Aware Teacher Learning to make the teacher-student network more effective, we propose Student-Student Collaborative Learning.
The idea of Student-Student Collaborative Learning is to utilize two different student networks and let them learn from each other. We regard small-loss samples as clean samples for training, in each batch of data, each student network views its small-loss pseudo labels (e.g., pseudo labels of $10\%$ samples with the smallest loss) as the reliable labels, and transfers such reliable labels to another student network for updating the parameters. These small-loss samples are far from the decision boundaries of the two models and thus are more likely to be true positives and true negatives (Feng et al., 2019). In this way, a student network is able to not completely rely on all pseudo labels from the teacher network, further reducing the risk of learning incorrect pseudo labels generated by the poorly calibrated teacher network. Moreover, the two different student networks may have different decision boundaries and thus are good at recognizing different patterns in data. Different from simply masking unreliable pseudo-labeled samples, this component also provides the opportunity for the incorrect pseudo-labeled samples to be correctly labeled by the other teacher-student network to make full use of the training data.
Specifically, for two student networks $s_1, s_2$ and their parameters $W_{s_1}, W_{s_2}$ , we first let $s_1$ (resp. $s_2$ ) select a small ratio of samples in this batch of data $\hat{D}$ that have small training loss. For these selected samples $\hat{D}_{s_1}$ (resp. $\hat{D}_{s_2}$ ) from $s_1$ (resp. $s_2$ ), we use the corresponding generated pseudo labels $\hat{Y}_{s_1}$ (resp. $\hat{Y}_{s_2}$ ) as reliable labels and transfer such reliable labels to the other student network $s_2$ (resp. $s_1$ ) for updating the parameters $W_2$ (resp. $W_1$ ). The ratio of transferred labels is controlled by hyperparameter $\delta$ . In this way, two student
networks can learn from each other's reliable labels, reducing the risk of learning from incorrect pseudo labels and making full use of the training data.
# 4.4 Training and Inference
Algorithm 1 in Appendix A.3 gives the pseudocode. The process can be divided into three stages: the pre-training, the self-training, and the inference.
Pre-Training Stage We warm up two different NER models $W_{A}$ and $W_{B}$ on the noisy DS-NER dataset to obtain a better initialization, and then duplicate the parameters $W$ for both the teacher $W_{t}$ and the student $W_{s}$ (i.e., $W_{t_{1}} = W_{s_{1}} = W_{A}$ , $W_{t_{2}} = W_{s_{2}} = W_{B}$ ). The training objective function is the cross entropy loss with the following form:
$$\mathcal {L} = - \frac {1}{N} \sum_ {D _ {d s}} y _ {i} \log \left(p \left(y _ {i} \mid W _ {s}, x _ {i}\right)\right) \tag {4}$$
where $y_{i}$ means the $i$ -th token label of the $i$ -th token $x_{i}$ in the DS-NER corpus $D_{ds}$ and $p(y_{i}|W_{s}, x_{i})$ denotes its probability produced by student network $W_{s}$ . $N$ is the size of the training corpus.
Self-Training Stage In this stage, we select reliable pseudo-labeled tokens to train the two teacher-student networks respectively. Specifically, we select reliable labels generated by teachers $W_{t}$ and supervise the students $W_{s}$ with cross-entropy loss. During the label selection, we use the proposed Uncertainty-Aware Label Selection to jointly consider the confidence and uncertainty as shown in Eq. 3 to reduce the effect of incorrect pseudolabeled samples. Meanwhile, we use Student-Student Collaborative Learning to allow student networks can learn from each other's reliable labels by selecting the pseudo labels from small-loss samples. Therefore, the training objective function of student networks $W_{s}$ in this stage is the cross entropy loss with the following form:
$$\mathcal {L} = - \frac {1}{N} \sum_ {D _ {d s}} M _ {i} \hat {y} _ {i} \log \left(p \left(\hat {y} _ {i} \mid W _ {s}, x _ {i}\right)\right) \tag {5}$$
where $\hat{y}_i$ means the $i$ -th pseudo-label generated by Student-Student Collaborative Learning and its teacher $W_t$ . $p(\hat{y}_i|W_s, x_i)$ denotes its probability produced by student network $W_s$ on generated pseudo-label. $M_i$ is indicator where the $i$ -th token $x_i$ should be masked according to Eq. 3. Meanwhile, if $\hat{y}_i$ is the transferred pseudo-label from the other student, $M_i$ will be automatically set to 1 (unmasked). That is, we are more inclined to
<table><tr><td rowspan="2">Method</td><td colspan="3">CoNLL03</td><td colspan="3">OntoNotes5.0</td><td colspan="3">Webpage</td><td colspan="3">Wikigold</td><td colspan="3">Twitter</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>KB-Matching</td><td>81.13</td><td>63.75</td><td>71.40</td><td>63.86</td><td>55.71</td><td>59.51</td><td>62.59</td><td>45.14</td><td>52.45</td><td>47.90</td><td>47.63</td><td>47.76</td><td>40.34</td><td>32.22</td><td>35.83</td></tr><tr><td>BiLSTM-CRF</td><td>75.50</td><td>49.10</td><td>59.50</td><td>68.44</td><td>64.50</td><td>66.41</td><td>58.05</td><td>34.59</td><td>43.34</td><td>47.55</td><td>39.11</td><td>42.92</td><td>46.91</td><td>14.18</td><td>21.77</td></tr><tr><td>DistilRoBERTa</td><td>77.87</td><td>69.91</td><td>73.68</td><td>66.83</td><td>68.81</td><td>67.80</td><td>56.05</td><td>59.46</td><td>57.70</td><td>48.85</td><td>52.05</td><td>50.40</td><td>45.72</td><td>43.85</td><td>44.77</td></tr><tr><td>RoBERTa</td><td>82.29</td><td>70.47</td><td>75.93</td><td>66.99</td><td>69.51</td><td>68.23</td><td>59.24</td><td>62.84</td><td>60.98</td><td>47.67</td><td>58.59</td><td>52.57</td><td>50.97</td><td>42.66</td><td>46.45</td></tr><tr><td>AutoNER</td><td>75.21</td><td>60.40</td><td>67.00</td><td>64.63</td><td>69.95</td><td>67.18</td><td>48.82</td><td>54.23</td><td>51.39</td><td>43.54</td><td>52.35</td><td>47.54</td><td>43.26</td><td>18.69</td><td>26.10</td></tr><tr><td>LRNT</td><td>79.91</td><td>61.87</td><td>69.74</td><td>67.36</td><td>68.02</td><td>67.69</td><td>46.70</td><td>48.83</td><td>47.74</td><td>45.60</td><td>46.84</td><td>46.21</td><td>46.94</td><td>15.98</td><td>23.84</td></tr><tr><td>Co-teaching+</td><td>86.04</td><td>68.74</td><td>76.42</td><td>66.63</td><td>69.32</td><td>67.95</td><td>61.65</td><td>55.41</td><td>58.36</td><td>55.23</td><td>49.26</td><td>52.08</td><td>51.67</td><td>42.66</td><td>46.73</td></tr><tr><td>JoCoR</td><td>83.65</td><td>69.69</td><td>76.04</td><td>66.74</td><td>68.74</td><td>67.73</td><td>62.14</td><td>58.78</td><td>60.42</td><td>51.48</td><td>51.23</td><td>51.35</td><td>49.40</td><td>45.59</td><td>47.42</td></tr><tr><td>NegSampling</td><td>80.17</td><td>77.72</td><td>78.93</td><td>64.59</td><td>72.39</td><td>68.26</td><td>70.16</td><td>58.78</td><td>63.97</td><td>49.49</td><td>55.35</td><td>52.26</td><td>50.25</td><td>44.95</td><td>47.45</td></tr><tr><td>BOND</td><td>82.05</td><td>80.92</td><td>81.48</td><td>67.14</td><td>69.61</td><td>68.35</td><td>67.37</td><td>64.19</td><td>65.74</td><td>53.44</td><td>68.58</td><td>60.07</td><td>53.16</td><td>43.76</td><td>48.01</td></tr><tr><td>SCDL</td><td>87.96</td><td>79.82</td><td>83.69</td><td>67.49</td><td>69.77</td><td>68.61</td><td>68.71</td><td>68.24</td><td>68.47</td><td>62.25</td><td>66.12</td><td>64.13</td><td>59.87</td><td>44.57</td><td>51.09</td></tr><tr><td>ATSEN</td><td>85.75</td><td>83.86</td><td>84.79</td><td>65.69</td><td>70.71</td><td>68.11</td><td>71.08</td><td>70.03</td><td>70.55</td><td>57.67</td><td>54.71</td><td>56.15</td><td>59.31</td><td>45.83</td><td>51.71</td></tr><tr><td>CENSOR</td><td>87.33</td><td>85.90</td><td>86.61</td><td>67.11</td><td>71.01</td><td>69.01</td><td>75.89</td><td>72.30</td><td>74.05</td><td>66.01</td><td>68.10</td><td>67.05</td><td>58.63</td><td>47.38</td><td>52.41</td></tr></table>
Table 1: Main results on five DS-NER datasets. We report the baseline results from Liang et al. (2020); Zhang et al. (2021a) and our experimental results with their official implementation in our devices.
trust judgments from the student model because the student network is updated earlier and more frequently than the teacher network, and therefore better able to capture the changes of pseudo labels. $N$ is the size of the training corpus.
Different from the optimization of the student network, we apply EMA as Zhang et al. (2021a) to gradually update the parameters of the teacher:
$$W _ {t} \leftarrow \alpha W _ {t} + (1 - \alpha) W _ {s} \tag {6}$$
where $\alpha$ denotes the smoothing coefficient. With the conservative and ensemble properties, the usage of EMA has largely mitigated the bias. As a result, the teacher tends to generate more reliable pseudo labels, which can be used as new supervision signals in the denoising self-training stage.
Inference Stage In the inference stage, only the best model $W_{best} \in \{W_{t_1}, W_{s_1}, W_{t_2}, W_{s_2}\}$ on the dev set is adopted for predicting the test data.
# 5 Experiment
# 5.1 Dataset
We conduct experiments on five DS-NER datasets, including CoNLL03 (Tjong Kim Sang and De Meulder, 2003), Webpage (Ratinov and Roth, 2009), Wikigold (Balasuriya et al., 2009), Twitter (Godin et al., 2015) and OntoNotes5.0 (Weischedel et al., 2013). For the fair comparison, we follow the same knowledge bases and settings as Liang et al. (2020), re-announce the training set by distant supervision, and use the original dev and test set. Statistics of datasets are shown in Appendix A.1.
# 5.2 Evaluation Metrics and Baselines
We use Precision (P), Recall (R), and F1 score as our evaluation metrics. We compare CENSOR with various baseline methods, including supervised methods and DS-NER methods. We also present the results of KB-Matching, which directly uses knowledge bases to annotate the test sets.
Supervised Methods We select BiLSTM-CRF (Ma and Hovy, 2016), RoBERTa (Liu et al., 2019) and DistilRoBERTa (Sanh et al., 2019) as original supervised methods. As trained on noisy DS-NER datasets, these methods achieve poor performance.
DS-NER Methods We compare several DS-NER baselines. AutoNER (Shang et al., 2018) modifies the standard CRF to get better performance under the noise. LRNT (Cao et al., 2019) leaves training data unexplored fully to reduce the negative effect of noisy labels. Co-teaching+ (Yu et al., 2019) and JoCoR (Wei et al., 2020) are two classical collaborative learning methods to handle noisy labels in computer vision area. NegSampling (Li et al., 2021) uses down-sampling in non-entities to relief the misleading from incomplete annotation.
Teacher-Student Methods for DS-NER Specifically, BOND (Liang et al., 2020) designs a teacher-student network and selects high-confidence predictions as pseudo labels to get a robust model. SCDL (Zhang et al., 2021b) improves the performance by training two teacher-student networks and selecting consistent high-confidence predictions between two teachers as pseudo labels. ATSEN (Qu
<table><tr><td>Method</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>CENSOR</td><td>87.33</td><td>85.90</td><td>86.61</td></tr><tr><td>-w/o UTL</td><td>86.56 (-0.77)</td><td>84.37 (-1.53)</td><td>85.45 (-1.16)</td></tr><tr><td>-w/o SCL</td><td>86.44 (-0.89)</td><td>83.98 (-1.92)</td><td>85.19 (-1.42)</td></tr></table>
Table 2: Ablation study on CoNLL03. UTL means Uncertainty-Aware Teacher Learning and SCL means Student-Student Collaborative Learning.
et al., 2023) considers both consistent and inconsistent predictions with high confidence between two teachers and further proposes a fine-grained teacher updating method. We report the results of ATSEN with official implementation in our devices.
# 5.3 Experimental Settings
Following Qu et al. (2023), we adopt RoBERTa-base and DistilRoBERTa-base as two NER models for two teacher-student networks. We use Adam (Kingma and Ba, 2015) as our optimizer. We list detailed hyperparameters in the Appendix A.2.
# 5.4 Main Results
Table 1 presents the performance of different methods measured by precision, recall, and F1 score. Specifically, (1) CENSOR achieves new SOTA performance, showing superiority in the DS-NER task; (2) Compared to original supervised methods, including BiLSTM-CRF, RoBERTa, and DistilRoBERTa, CENSOR improves the F1 score with an average increase of $23.04\%$ , $10.96\%$ , and $8.99\%$ , respectively, which demonstrates the necessity of DS-NER models and the effectiveness; (3) Compared to classical de-noising methods in the computer vision area (e.g., Co-teaching+), simply using these methods can not achieve strong performance, since these methods were not initially designed for sequence labeling tasks and ignore the characteristics of the DS-NER task. (4) Compared with teacher-student methods such as BOND, SCDL, and ATSEN, CENSOR achieves advanced performance, confirming that these teacher-student methods achieve limited performance because of the incorrect pseudo-labeled samples.
# 5.5 Analysis
Ablation Study Shown in Table 2, it is clear that Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning are both important to the model performance. Removing each component can lead to a simultaneous decrease in preci

Figure 3: F1 on CoNLL03 with different noise ratios.
<table><tr><td>Method</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>BOND</td><td>80.87 (-13.49)</td><td>78.04 (-7.09)</td><td>79.43 (-10.08)</td></tr><tr><td>SCDL</td><td>94.18 (-0.18)</td><td>77.11 (-8.02)</td><td>84.80 (-4.71)</td></tr><tr><td>ATSEN</td><td>93.01 (-1.35)</td><td>82.96 (-2.17)</td><td>87.70 (-1.87)</td></tr><tr><td>CENSOR</td><td>94.36</td><td>85.13</td><td>89.51</td></tr></table>
Table 3: Comparison of the effectiveness of reducing label noise on CoNLL03.
sion and recall at the same time, showing that proposed components indeed improve performance.
Robustness to Different Noise Ratios To investigate the robustness of the CENSOR in different noise ratios, we randomly replace $k\%$ entity labels in the clean version (instead of the distantly-supervised version) of CoNLL03 training set with other entity types or non-entity. In this way, we can construct different noise ratios of label noise and we further report the test F1 score on CoNLL03. As shown in Figure 3, CENSOR achieves consistent advanced performance in different noise ratios, showing its satisfactory de-noising ability and strong robustness. Meanwhile, when the noise ratio is above $50\%$ , CENSOR achieves more significant robustness, since CENSOR can select and generate more reliable labels due to the Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning from highly noisy data. More detailed data can be found in Table 9 in the Appendix.
Effectiveness of Reducing Learned Noise To confirm previous teacher-student methods achieve limited performance because of incorrectly pseudolabeled samples, we try to explore the effectiveness of reducing label noise from different teacher-student methods, including CENSOR, BOND, SCDL, ATSEN. Specifically, we report the average F1 score of all selected (unmasked) pseudo labels for training during the self-training stage, using the labels from the clean version of the CoNLL03 train
<table><tr><td>Method</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>BOND</td><td>80.42 (-9.44)</td><td>76.46 (-8.69)</td><td>78.39 (-9.05)</td></tr><tr><td>SCDL</td><td>87.42 (-2.44)</td><td>75.85 (-9.30)</td><td>81.22 (-6.22)</td></tr><tr><td>ATSEN</td><td>87.84 (-2.02)</td><td>82.83 (-2.32)</td><td>85.26 (-2.18)</td></tr><tr><td>CENSOR</td><td>89.86</td><td>85.15</td><td>87.44</td></tr></table>
Table 4: Comparison of teacher pseudo-labeling ability of different teacher-student methods on CoNLL03.
 Figure 4: F1 on CoNLL03 with different threshold $\sigma_{ua}$ in Uncertainty-Aware Label Selection.
ing set as ground truth labels. As shown in Table 3, CENSOR achieves a consistent advanced F1 score, which indicates CENSOR can select more correct labels based on Uncertainty-Aware Label Selection and Student-Student Collaborative Learning. Thus, CENSOR can use more correct pseudo labels to update the parameters of student networks and further avoid error propagation, leading to outstanding overall performance on the test set.
Effectiveness of Teacher Pseudo-labeling After confirming the effectiveness of reducing label noise, we attempt to further explore whether the teacher network could use more reliable labels to avoid error propagation, thus generating more correct pseudo labels. As shown in Table 4, we report the best F1 score of teacher networks from different teacher-student methods on the clean version of CoNLL03 training set. In detail, the teacher network from CENSOR correctly labels $87.44\%$ samples, achieving the most advanced precision, recall, and F1 score. Compared to other teacher-student methods, including BOND, SCDL, and ATSEN, CENSOR improves the F1 score with an average increase of $9.05\%$ , $6.22\%$ , and $2.18\%$ , respectively, which demonstrates using more correct labels can avoid error propagation and make the teacher network generate more reliable labels. In this way, the teacher network can make full use of the noisy samples in the DS-NER training set and help the teacher-student framework achieve
 Figure 5: F1 on CoNLL03 with different ratio $\delta$ of selected labels in Student-student Collaborative Learning.
outstanding performance on the test set.
Parameter Study As shown in Figure 4 and Figure 5, we conduct experiments to explore the impact of important hyperparameters to further understand Uncertainty-Aware Label Selection and Student-Student Collaborative Learning. Overall, although the choice of different hyperparameters will have some impact on the model performance, as long as the hyperparameters are chosen wisely rather than at extreme values (e.g., wrongly setting the threshold $\sigma_{ua}$ in Uncertainty-Aware Label Selection to 0), the performance of the model will always be improved over what it would have been without using the components. More detailed analysis are shown in the Appendix A.5.
Case Study We also conduct the case study to understand the advantage CENSOR with two examples in Table 5 and Table 6. We show the prediction of BOND, SCDL, ATSEN and CENSOR on a training sequence with label noise and a test sequence with ground truth. As shown in Table 5, BOND and SCDL can slightly generalize to unseen mentions and relieve partial incomplete annotation, e.g., they can successfully recognize the "John McNamara" and "New York". However, these methods still suffer from label noise. For comparison, for hard labels "California Angels", CENSOR and ATSEN are able to detect them with advanced teacher-student design (e.g., Adaptive Teacher Learning in ATSEN and Student-Student Collaborative Learning in CENSOR) instead of relying purely on distant labels. However, as shown in Table 6, ATSEN still struggles to distinguish between easily confused samples and achieves inadequate generalization. In contrast, as CENSOR can use fewer incorrect pseudo-labeled samples due to Uncertainty-Aware Teacher Learning and Student
Distant Match: [Johnson]PER is the second manager to be hospitalized after California [Angels]PER skipper [John]PER McNamara was admitted to New [York]PER 's [Columbia]PER Presby Hospital. Ground Truth: [Johnson]PER is the second manager to be hospitalized after [California Angels]ORG skipper [John McNamara]PER was admitted to [New York]LOC 's [Columbia Presby Hospital]ORG . BOND: [Johnson]PER is the second manager to be hospitalized after [California]LOC [Angels]PER skipper [John McNamara]PER was admitted to [New York]LOC 's [Columbia]PER Presby Hospital. SCDL: [Johnson]PER is the second manager to be hospitalized after [California]LOC [Angels]PER skipper [John McNamara]PER was admitted to [New York]LOC 's [Columbia Presby Hospital]ORG . ATSEN: [Johnson]PER is the second manager to be hospitalized after [California Angels]ORG skipper [John McNamara]PER was admitted to [New York]LOC 's [Columbia Presby Hospital]ORG .
CENSOR: [Johnson]PER is the second manager to be hospitalized after [California Angels]ORG skipper [John McNamara]PER was admitted to [New York]LOC 's [Columbia Presby Hospital]ORG.
Table 5: Case study with CENSOR and previous teacher-student methods for DS-NER. The sentence is from the CoNLL03 training set.
<table><tr><td>Ground Truth: All-conquering [Juventus]ORG field their most recent signing, [Portuguese]MISC defender [Dimas]PER, while [Alessandro Del Piero]PER and [Croat]MISC [Alen Boksic]PER lead the attack.</td></tr><tr><td>BOND: All-conquering [Juventus]ORG field their most recent signing, [Portuguese]ORG defender [Dimas]PER, while [Alessandro Del Piero]PER and [Croat Alen Boksic]PER lead the attack.</td></tr><tr><td>SCDL: All-conquering [Juventus]ORG field their most recent signing, [Portuguese]MISC defender [Dimas]PER, while [Alessandro Del Piero]PER and [Croat Alen Boksic]PER lead the attack.</td></tr><tr><td>ATSEN: All-conquering [Juventus]ORG field their most recent signing, [Portuguese]MISC defender [Dimas]PER, while [Alessandro Del Piero]PER and [Croat]MISC [Alen Boksic]PER lead the attack.</td></tr><tr><td>CENSOR: All-conquering [Juventus]ORG field their most recent signing, [Portuguese]MISC defender [Dimas]PER, while [Alessandro Del Piero]PER and [Croat]MISC [Alen Boksic]PER lead the attack.</td></tr></table>
Table 6: Case study with CENSOR and previous teacher-student methods for DS-NER. The sentence is from the CoNLL03 test set.
Student Collaborative Learning, a higher degree of robustness and generalization can be achieved.
# 6 Conclusion
We introduce CENSOR, a novel teacher-student framework designed for DS-NER task. CENSOR incorporates Uncertainty-Aware Teacher Learning, utilizing prediction uncertainty to guide the pseudolabel selection. It mitigates the usage of incorrect pseudo labels by avoiding reliance on confidence scores from poorly calibrated teacher networks. We also introduce Student-Student Collaborative Learning to enable a student network not to completely rely on pseudo labels from its teacher network, minimizing the risk of learning incorrect ones. Meanwhile, this component allows the training set can be fully explored. Our experimental results demonstrate CENSOR's superior performance compared to previous methods.
# Limitations
Our proposed CENSOR has two tiny limitations, specifically: (1) CENSOR focuses on addressing the label noise in the DS-NER task, and all our analyses are specific to this task. As a result, our
model may not be robust enough compared to other models if it is not specific to the DS-NER task. (2) Due to introducing the proposed Uncertainty-Aware Teacher Learning, our model will perform multiple forward passes in the uncertainty estimation phase, increasing the self-training time. Compared to ATSEN, the self-training of our model takes about 4 times as long as that of ATSEN.
# Acknowledgements
This work is supported by the National Science Foundation of China under Grant No.61936012 and 61876004. Meanwhile, we would like to thank the anonymous reviewers for their thoughtful and constructive comments. Our code will be available at https://github.com/PKUnlp-icler/CENSOR.
# References
Devansh Arpit, Stanislaw Jastrzebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S. Kanwal, Tegan Maharaj, Asja Fischer, Aaron C. Courville, Yoshua Bengio, and Simon Lacoste-Julien. 2017. A closer look at memorization in deep networks. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney,
NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 233-242. PMLR. Dominic Balasuriya, Nicky Ringland, Joel Nothman, Tara Murphy, and James R. Curran. 2009. Named entity recognition in wikipedia. In Proceedings of the 1st 2009 Workshop on The People's Web Meets NLP: Collaboratively Constructed Semantic Resources@IJCNLP 2009, Suntec, Singapore, August 7, 2009, pages 10-18. Association for Computational Linguistics. Yixin Cao, Zikun Hu, Tat-Seng Chua, Zhiyuan Liu, and Heng Ji. 2019. Low-resource name tagging learned with weakly labeled data. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 261-270. Association for Computational Linguistics. Jiazhan Feng, Chongyang Tao, Wei Wu, Yansong Feng, Dongyan Zhao, and Rui Yan. 2019. Learning a matching model with co-teaching for multi-turn response selection in retrieval-based dialogue systems. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3805-3815, Florence, Italy. Association for Computational Linguistics. Frédéric Godin, Baptist Vandersmissen, Wesley De Neve, and Rik Van de Walle. 2015. Multimedia lab $\$ @$ ACL WNUT NER shared task: Named entity recognition for twitter microposts using distributed word representations. In Proceedings of the Workshop on Noisy User-generated Text, NUT@IJCNLP 2015, Beijing, China, July 31, 2015, pages 146-153. Association for Computational Linguistics. Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. 2017. On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 1321-1330. PMLR. Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor W. Tsang, and Masashi Sugiyama. 2018. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montreal, Canada, pages 8536-8546. Xinyue Huo, Lingxi Xie, Jianzhong He, Zijie Yang, Wengang Zhou, Houqiang Li, and Qi Tian. 2021. ATSO: asynchronous teacher-student optimization for semi-supervised image segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 1235-1244. Computer Vision Foundation / IEEE.
Zhanming Jie, Pengjun Xie, Wei Lu, Ruixue Ding, and Linlin Li. 2019. Better modeling of incomplete annotations for named entity recognition. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 729-734, Minneapolis, Minnesota. Association for Computational Linguistics. Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. 2012. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States, pages 1106-1114. Yangming Li, Lemao Liu, and Shuming Shi. 2021. Empirical analysis of unlabeled entity problem in named entity recognition. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net. Yangming Li, Lemao Liu, and Shuming Shi. 2022. Rethinking negative sampling for handling missing entity annotations. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7188-7197, Dublin, Ireland. Association for Computational Linguistics. Yiyang Li and Hai Zhao. 2023. EM pre-training for multi-party dialogue response generation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 92-103, Toronto, Canada. Association for Computational Linguistics. Chen Liang, Yue Yu, Haoming Jiang, Siawpeng Er, Ruijia Wang, Tuo Zhao, and Chao Zhang. 2020. BOND: bert-assisted open-domain named entity recognition with distant supervision. In KDD '20: The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual Event, CA, USA, August 23-27, 2020, pages 1054-1064. ACM. Yajiao Liu, Xin Jiang, Yichun Yin, Yasheng Wang, Fei Mi, Qun Liu, Xiang Wan, and Benyou Wang. 2023. One cannot stand for everyone! leveraging multiple user simulators to train task-oriented dialogue systems. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1-21, Toronto, Canada. Association for Computational Linguistics. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019.
Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692. Xuezhe Ma and Eduard Hovy. 2016. End-to-end sequence labeling via bi-directional LSTM-CNNs-CRF. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1064-1074, Berlin, Germany. Association for Computational Linguistics. Minlong Peng, Xiaoyu Xing, Qi Zhang, Jinlan Fu, and Xuanjing Huang. 2019. Distantly supervised named entity recognition using positive-unlabeled learning. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28-August 2, 2019, Volume 1: Long Papers, pages 2409-2419. Association for Computational Linguistics. Xiaoye Qu, Jun Zeng, Daizong Liu, Zhefeng Wang, Baoxing Huai, and Pan Zhou. 2023. Distantly-supervised named entity recognition with adaptive teacher learning and fine-grained student ensemble. In Thirty-Seventh AAAI Conference on Artificial Intelligence, AAAI 2023, Thirty-Fifth Conference on Innovative Applications of Artificial Intelligence, IAAI 2023, Thirteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2023, Washington, DC, USA, February 7-14, 2023, pages 13501-13509. AAAI Press. Lev Ratinov and Dan Roth. 2009. Design challenges and misconceptions in named entity recognition. In Proceedings of the Thirteenth Conference on Computational Natural Language Learning (CoNLL-2009), pages 147-155, Boulder, Colorado. Association for Computational Linguistics. Mamshad Nayeem Rizve, Kevin Duarte, Yogesh S. Rawat, and Mubarak Shah. 2021. In defense of pseudo-labeling: An uncertainty-aware pseudo-label selection framework for semi-supervised learning. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net. Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. ArXiv, abs/1910.01108. Jingbo Shang, Liyuan Liu, Xiaotao Gu, Xiang Ren, Teng Ren, and Jiawei Han. 2018. Learning named entity tagger using domain-specific dictionary. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2054-2064, Brussels, Belgium. Association for Computational Linguistics. Shuzheng Si, Zefan Cai, Shuang Zeng, Guoqiang Feng, Jiaxing Lin, and Baobao Chang. 2023. SANTA: Separate strategies for inaccurate and incomplete annotation noise in distantly-supervised named entity recognition. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 3883-3896,
Toronto, Canada. Association for Computational Linguistics. Shuzheng Si, Wentao Ma, Haoyu Gao, Yuchuan Wu, Ting-En Lin, Yinpei Dai, Hangyu Li, Rui Yan, Fei Huang, and Yongbin Li. 2024. Spokenwoz: A large-scale speech-text benchmark for spoken task-oriented dialogue agents. Advances in Neural Information Processing Systems, 36. Shuzheng Si, Shuang Zeng, and Baobao Chang. 2022a. Mining clues from incomplete utterance: A query-enhanced network for incomplete utterance rewriting. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4839-4847, Seattle, United States. Association for Computational Linguistics. Shuzheng Si, Shuang Zeng, Jiaxing Lin, and Baobao Chang. 2022b. SCL-RAI: Span-based contrastive learning with retrieval augmented inference for unlabeled entity problem in NER. In Proceedings of the 29th International Conference on Computational Linguistics, pages 2313-2318, Gyeongju, Republic of Korea. International Committee on Computational Linguistics. Erik F. Tjong Kim Sang and Fien De Meulder. 2003. Introduction to the CoNLL-2003 shared task: Language-independent named entity recognition. In Proceedings of the Seventh Conference on Natural Language Learning at HLT-NAACL 2003, pages 142-147. Hongxin Wei, Lei Feng, Xiangyu Chen, and Bo An. 2020. Combating noisy labels by agreement: A joint training method with co-regularization. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 13723-13732. Computer Vision Foundation / IEEE. Ralph Weischedel, Martha Palmer, Mitchell Marcus, Edward Hovy, Sameer Pradhan, Lance Ramshaw, Nianwen Xue, Ann Taylor, Jeff Kaufman, Michelle Franchini, et al. 2013. Ontonotes release 5.0 ldc2013t19. Linguistic Data Consortium, Philadelphia, PA, 23. YaoSheng Yang, Wenliang Chen, Zhenghua Li, Zhengqiu He, and Min Zhang. 2018. Distantly supervised NER with partial annotation learning and reinforcement learning. In Proceedings of the 27th International Conference on Computational Linguistics, COLING 2018, Santa Fe, New Mexico, USA, August 20-26, 2018, pages 2159-2169. Association for Computational Linguistics. Xingrui Yu, Bo Han, Jiangchao Yao, Gang Niu, Ivor W. Tsang, and Masashi Sugiyama. 2019. How does disagreement help generalization against label corruption? In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 7164-7173. PMLR.
Xinghua Zhang, Bowen Yu, Tingwen Liu, Zhenyu Zhang, Jiawei Sheng, Xue Mengge, and Hongbo Xu. 2021a. Improving distantly-supervised named entity recognition with self-collaborative denoising learning. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 1518-1529, Punta Cana, Dominican Republic. Association for Computational Linguistics.
Zhenyu Zhang, Bowen Yu, Xiaobo Shu, Xue Mengge, Tingwen Liu, and Li Guo. 2021b. From what to why: Improving relation extraction with rationale graph. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 86-95, Online. Association for Computational Linguistics.
Kang Zhou, Yuepei Li, and Qi Li. 2022. Distantly supervised named entity recognition via confidence-based multi-class positive and unlabeled learning. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7198-7211, Dublin, Ireland. Association for Computational Linguistics.
# A Appendix
# A.1 DS-NER Datasets
Statistics of five datasets are shown in Table 7.
<table><tr><td colspan="2">Dataset</td><td>Train</td><td>Dev</td><td>Test</td><td>Types</td></tr><tr><td rowspan="2">CoNLL03</td><td>Sentence</td><td>14041</td><td>3250</td><td>3453</td><td rowspan="2">4</td></tr><tr><td>Token</td><td>203621</td><td>51362</td><td>46435</td></tr><tr><td rowspan="2">OntoNotes5.0</td><td>Sentence</td><td>115812</td><td>15680</td><td>12217</td><td rowspan="2">18</td></tr><tr><td>Token</td><td>2200865</td><td>304701</td><td>230118</td></tr><tr><td rowspan="2">Webpage</td><td>Sentence</td><td>385</td><td>99</td><td>135</td><td rowspan="2">4</td></tr><tr><td>Token</td><td>5293</td><td>1121</td><td>1131</td></tr><tr><td rowspan="2">Wikigold</td><td>Sentence</td><td>1142</td><td>280</td><td>274</td><td rowspan="2">4</td></tr><tr><td>Token</td><td>25819</td><td>6650</td><td>6538</td></tr><tr><td rowspan="2">Twitter</td><td>Sentence</td><td>2393</td><td>999</td><td>3844</td><td rowspan="2">10</td></tr><tr><td>Token</td><td>44076</td><td>15262</td><td>58064</td></tr></table>
Table 7: The statistics of five DS-NER datasets.
# A.2 Hyperparameters
Detailed hyperparameters are shown in Table 8. Experiments are run on a single NVIDIA A40.
# A.3 Pseudocode
Algorithm 1 gives the pseudocode of our method.
# A.4 Robustness to Different Noise Ratios
Detailed data in Figure 3 can be found in Table 9.
# A.5 Parameter Study
In Figure 4 and Table 10, we analyze the impact of $\sigma_{ua}$ in Eq.3 within Uncertainty-Aware Label Selection. Notably, for minimal values of $\sigma_{ua}$ , such as 0 and 0.001, the Uncertainty-Aware Label Selection phase filters and masks all samples. Consequently,
Algorithm 1 Training Procedure of CENSOR. Input: DS-NER dataset $D_{ds} = \{(X_i,Y_i)\}_{i = 1}^N$ Parameter: Two teacher-student network parameters, including $W_{t_1},W_{s_1}$ $W_{t_2}$ , and $W_{s_2}$ Output: The best model 1: Pre-training two models $W_{A},W_{B}$ with $D_{ds}$ .Pre-Training. 2: Initialize two teacher-student networks: $W_{t_1}\gets W_A,W_{s_1}\gets W_A$ $W_{t_2}\gets W_B,W_{s_2}\gets W_B$ 3: Initialize training step: step $\leftarrow 0$ 4: Initialize noisy labels: $Y_{I}\gets Y,Y_{II}\gets Y$ 5: while not reach max training epochs do 6: Get a batch $\hat{D} = (X^{(b)},Y^{(b)},Y^{(b)}_{I})$ from $D_{ds}$ step $\leftarrow$ step + 1. Self-Training. 7: Get pseudo labels via the teacher $W_{t_1},W_{t_2}$ .. $\hat{Y}_I^{(b)}\gets f(X^{(b)};W_{t_1}),$ $\hat{Y}_{II}^{(b)}\gets f(X^{(b)};W_{t_2}).$ 8: Select reliable labels via Uncertainty-Aware Teacher Learning: Estimate Confidence and Uncertainty by Eq.3 and Eq.4, separately $\mathcal{T}_I^{(b)}\gets$ Uncertainty-Aware Label Selection $(Y_I^{(b)},\tilde{Y}_I^{(b)})$ $\mathcal{T}_{II}^{(b)}\gets$ Uncertainty-Aware Label Selection $(Y_{II}^{(b)},\tilde{Y}_{II}^{(b)})$ 9: Select reliable labels via Student-Student Collaborative Learning: $\hat{D}_{s_1}^* = \arg \min_{\hat{D}:|\hat{D} |\geq \delta \% |\hat{D}|}$ Loss(s1, $\hat{D})$ //sample $\delta \%$ small-loss instances $\hat{D}_{s_2}^* = \arg \min_{\hat{D}:|\hat{D} |\geq \delta \% |\hat{D}|}$ Loss(s2, $\hat{D})$ //sample $\delta \%$ small-loss instances Transfer the pseudo labels between $\hat{D}_{s_1}^*$ and $\hat{D}_{s_2}^*$ . 10: Update the student $W_{s_1}$ and $W_{s_2}$ by Eq. 7. 11: Update the teacher $W_{t_1}$ and $W_{t_2}$ by Eq. 8. 12: end while 13: Evaluate models $W_{t_1},W_{s_1},W_{t_2},W_{s_2}$ on Dev set. 14: return The best model $W\in \{W_{t_1},W_{s_1},W_{t_2},W_{s_2}\}$
the student network becomes incapable of parameter updates, rendering the entire teacher-student framework non-trainable. When the parameter $\sigma_{ua}$ is in a reasonable interval, the effectiveness of the model is always improved due to the inclusion of filtered reliable labels in the self-training stage. Ultimately, when $\sigma_{ua}$ reaches an excessive magnitude, the filtering capacity of the Uncertainty-Aware Label Selection stage is nullified, rendering the outcome akin to Uncertainty-Aware Teacher Learning omission. Therefore, while using different values of $\sigma_{ua}$ tends to improve the performance, choosing $\sigma_{ua}$ wisely and rationally is crucial for optimizing Uncertainty-Aware Teacher Learning. In Figure 5 and Table 11, we also explore the impact of the ratio $\delta$ of selected labels in Student-Student Collaborative Learning. A small $\delta$ enables the student network to partially leverage reliable labels from its counterpart, resulting in improved outcomes compared to scenarios without such collaborative learning. As $\delta$ increases, the transfer of these reliable labels diminishes the likelihood of learning incorrect labels from teacher-generated pseudo labels, thereby enhancing overall performance. Conversely, an excessively large $\delta$ adversely affects performance. This is attributed to the pseudo labels of selected samples, which, with a high transfer proportion (e.g., $\delta = 0.8$ ), cease to qualify as small
<table><tr><td>Name</td><td>CoNLL03</td><td>Ont5.0</td><td>Webpage</td><td>Wikigold</td><td>Twitter</td></tr><tr><td>Learning Rate</td><td>1e-5</td><td>2e-5</td><td>1e-5</td><td>1e-5</td><td>2e-5</td></tr><tr><td>Batch Size</td><td>8</td><td>16</td><td>16</td><td>16</td><td>8</td></tr><tr><td>EMA α</td><td>0.995</td><td>0.995</td><td>0.99</td><td>0.99</td><td>0.995</td></tr><tr><td>Sche. Warmup</td><td>200</td><td>500</td><td>100</td><td>200</td><td>200</td></tr><tr><td>Total Epoch</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td></tr><tr><td>Pre-training Epoch</td><td>1</td><td>2</td><td>12</td><td>5</td><td>6</td></tr><tr><td>σco in Eq.5 of UTL</td><td>0.9</td><td>0.9</td><td>0.9</td><td>0.9</td><td>0.9</td></tr><tr><td>σua in Eq.5 of UTL</td><td>0.01</td><td>0.05</td><td>0.1</td><td>0.2</td><td>0.2</td></tr><tr><td>K in Eq.2 of UTL</td><td>8</td><td>8</td><td>8</td><td>8</td><td>8</td></tr><tr><td>Dropout Rate</td><td>0.5</td><td>0.5</td><td>0.5</td><td>0.5</td><td>0.5</td></tr><tr><td>ratio δ of SCL</td><td>0.3</td><td>0.4</td><td>0.3</td><td>0.1</td><td>0.1</td></tr><tr><td>Update Cycle (iterations)</td><td>6000</td><td>7240</td><td>300</td><td>2000</td><td>3200</td></tr></table>
Table 8: Hyperparameters on five DS-NER datasets. UTL means Uncertainty-Aware Teacher Learning and SCL means Student-Student Collaborative Learning.
<table><tr><td>Ratio</td><td>ATSEN</td><td>SCDL</td><td>BOND</td><td>Ours</td></tr><tr><td>10%</td><td>90.19</td><td>90.15</td><td>87.63</td><td>90.38</td></tr><tr><td>20%</td><td>90.03</td><td>89.85</td><td>88.03</td><td>90.22</td></tr><tr><td>30%</td><td>89.79</td><td>89.48</td><td>86.80</td><td>89.88</td></tr><tr><td>40%</td><td>88.97</td><td>88.49</td><td>84.42</td><td>89.11</td></tr><tr><td>50%</td><td>84.77</td><td>83.66</td><td>82.56</td><td>86.27</td></tr><tr><td>60%</td><td>82.55</td><td>82.64</td><td>80.94</td><td>84.96</td></tr><tr><td>70%</td><td>75.75</td><td>76.88</td><td>77.38</td><td>80.66</td></tr><tr><td>80%</td><td>56.61</td><td>55.26</td><td>50.49</td><td>59.80</td></tr><tr><td>90%</td><td>19.59</td><td>17.09</td><td>14.85</td><td>22.26</td></tr></table>
loss samples and are more prone to containing noise. Hence, proportion selection of $\delta$ proves critical for optimizing the efficacy of Student-Student Collaborative Learning.
# A.6 Difference between Previous Methods
We will carefully compare previous methods to explain our motivation and the differences between previous methods and our proposed components.
Uncertainty-Aware Teacher Learning Most research on uncertainty estimation focuses on computer vision because it provides visual validation on uncertainty quality. For example, Rizve et al. (2021) first introduces uncertainty to filter the low-quality labels in the semi-supervised image classification task. However, very little research about uncertainty has been presented in the natural language process domain. As far as we know, we are the first to introduce the uncertainty in the DS-NER task. Meanwhile, different from the instance-level image classification task, the DS-NER task is based on token-level classification, which requires
Table 9: F1 on CoNLL03 with different noise ratios.
<table><tr><td>θua</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>-w/o UTL</td><td>86.56</td><td>84.37</td><td>85.45</td></tr><tr><td>0.000</td><td>00.00</td><td>00.00</td><td>00.00</td></tr><tr><td>0.001</td><td>00.00</td><td>00.00</td><td>00.00</td></tr><tr><td>0.005</td><td>85.65</td><td>82.68</td><td>84.14</td></tr><tr><td>0.010</td><td>87.33</td><td>85.90</td><td>86.61</td></tr><tr><td>0.500</td><td>87.22</td><td>84.71</td><td>85.95</td></tr><tr><td>0.800</td><td>87.60</td><td>85.06</td><td>86.32</td></tr><tr><td>1.000</td><td>87.27</td><td>85.56</td><td>86.41</td></tr><tr><td>10.00</td><td>87.27</td><td>85.56</td><td>86.41</td></tr><tr><td>100.0</td><td>86.56</td><td>84.37</td><td>85.45</td></tr><tr><td>1,000</td><td>86.56</td><td>84.37</td><td>85.45</td></tr></table>
Table 10: F1 on CoNLL03 with different threshold $\sigma_{ua}$ in Uncertainty-Aware Label Selection. UTL means Uncertainty-Aware Teacher Learning.
<table><tr><td>K</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>-w/o SCL</td><td>86.44</td><td>83.98</td><td>85.19</td></tr><tr><td>0.1</td><td>86.81</td><td>84.92</td><td>85.85</td></tr><tr><td>0.2</td><td>87.35</td><td>84.33</td><td>85.82</td></tr><tr><td>0.3</td><td>87.33</td><td>85.90</td><td>86.61</td></tr><tr><td>0.4</td><td>86.95</td><td>84.58</td><td>85.75</td></tr><tr><td>0.5</td><td>86.28</td><td>84.41</td><td>85.33</td></tr><tr><td>0.8</td><td>86.27</td><td>84.01</td><td>85.13</td></tr><tr><td>1.0</td><td>85.70</td><td>83.68</td><td>84.68</td></tr></table>
Table 11: F1 on CoNLL03 with different ratio $\delta$ of selected labels in Student-Student Collaborative Learning. SCL means Student-Student Collaborative Learning.
the model to capture the inherent token-wise label dependency. So different from estimating uncertainty at the instance level, we analyze the unique characteristics of the DS-NER task in the paper and design Uncertainty-Aware Teacher Learning to measure uncertainty at the token level. On the other hand, we are the first to find that previous teacher-student methods achieved limited performance because poor network calibration produces incorrect pseudo-labeled samples in the DS-NER task. Thus, we attempt to use uncertainty as the indicator to reduce the effect of incorrect pseudo labels within the teacher-student framework.
Student-Student Collaborative Learning Collaborative Learning (Han et al., 2018; Yu et al., 2019; Wei et al., 2020) is a popular method to handle label noise, which attempts to use two different networks to provide multi-view knowledge and let them learn from each other. Co-teaching (Han et al., 2018) first attempts to completely exchange reliable samples of two different networks and then update the networks by the exchanged multi-view information. Co-teaching+ (Yu et al., 2019) further proposes to use disagreement strategy to update two networks, i.e., only using prediction
disagreement data from two networks to update two networks. JoCoR (Wei et al., 2020) aims to use a designed joint loss to reduce the diversity of two networks during training and further improve the robustness of two networks. However, these methods are designed for tasks in the computer vision area (especially image classification), and as shown in Table 1, these methods often achieve limited performance in the DS-NER task. SCDL designs the teacher-student framework and adopts collaborative learning in the DS-NER task. Similar to Co-teaching, all of the pseudo labels predicted by the teacher are applied to update the noisy labels of the peer teacher-student network periodically since two teacher-student networks have different learning abilities based on different network structures. Different from SCDL, we aim to utilize two different student networks and let them learn from each other to reduce the negative effect of incorrect pseudo labels. Specifically, instead of completely exchanging pseudo labels between two teachers, we allow students to transfer reliable pseudo labels and at the same time allow students to learn on their own pseudo labels generated by their teacher network. In this way, we not only ensure that the transferred pseudo labels contain multi-view information but also ensure that the pseudo labels we transfer are high-quality by selective transfer. Meanwhile, as the student network is updated earlier and more frequently than the teacher network, the student network is better able to capture the changes of pseudo labels than the teacher network.
Relation between Two Components Designs on Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning are not independent. The two components can collaborate and achieve better results. Specifically, (1) Uncertainty-Aware Teacher Learning can help the teacher network to generate more reliable pseudo labels and further reduce the risk of the student network updating parameters on the incorrect pseudo label. At the same time, a more efficient student network can be achieved by learning to pseudo-label with fewer errors, which will further improve the efficiency of the Student-Student Collaborative Learning component; (2) Based on Uncertainty-Aware Teacher Learning, the teacher network can utilize the correctly pseudo-labeled samples to alleviate the negative effect of label noise. However, simply masking unreliable pseudo-labeled samples can lead to underutilization of the training set, as there
is no chance for the incorrect pseudo-labeled samples to be corrected and further learned. Student-Student Collaborative Learning can allow the student network to learn from transferred reliable labels from the other student network. Therefore, this component further enables a full exploration of mislabeled samples rather than simply filtering unreliable pseudo-labeled samples. Through the collaboration of the two components, as shown in Table 1, CENSOR achieves the best performance among 12 baselines.123version https://git-lfs.github.com/spec/v1oid sha256:cc21f9c48c26f73cd39ce70e85efc08ef817e990ec6c17819d10da3a321a1665size 645859123version https://git-lfs.github.com/spec/v1oid sha256:27ab5cd7c677de706b8b7b40a759045c0cb69af6dcd19242f2ec0fc83b2826dasize 865878123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611# INFOBENCH: Evaluating Instruction Following Ability in Large Language Models
Yiwei Qin $^{1*}$ Kaiqiang Song $^{1}$ Yebowen Hu $^{1,2*}$ Wenlin Yao $^{1}$ Sangwoo Cho $^{1}$ Xiaoyang Wang $^{1}$ Xuansheng Wu $^{1,4*}$ Fei Liu $^{3}$ Pengfei Liu $^{5}$ Dong Yu $^{1}$
$^{1}$ Tencent AI Lab, Seattle; $^{2}$ University of Central Florida; $^{3}$ Emory University; $^{4}$ University of Georgia; $^{5}$ Shanghai Jiao Tong University qinyiwei07@outlook.com; {riversong, wenlinyao, swcho, shawnxywang, dyu}@global.tencent.com yebowen.hu@ucf.edu; xw54582@uga.edu; fei.liu@emory.edu; pengfei@sjtu.edu.cn
# Abstract
This paper introduces the Decomposed Requirements Following Ratio (DRFR), a new metric for evaluating Large Language Models' (LLMs) ability to follow instructions. Addressing a gap in current methodologies, DRFR breaks down complex instructions into simpler criteria, facilitating a detailed analysis of LLMs' compliance with various aspects of tasks. Alongside this metric, we present INFOBENCH, a benchmark comprising 500 diverse instructions and 2,250 decomposed questions across multiple constraint categories. Our experiments compare DRFR with traditional scoring methods and explore annotation sources, including human experts, crowdsourced workers, and GPT-4. The findings demonstrate DRFR's higher reliability and the effectiveness of using GPT-4 as a cost-efficient annotator. The evaluation of several advanced LLMs using this framework reveals their strengths and areas needing improvement, particularly in complex instruction-following. This study contributes a novel metric and benchmark, offering insights for future LLM development and evaluation.
# 1 Introduction
The rapidly evolving domain of Natural Language Processing (NLP) has witnessed the advent and rise of Large Language Models (LLMs) (Ouyang et al., 2022; Brown et al., 2020; OpenAI, 2023b; Touvron et al., 2023; Bai et al., 2022; Chowdhery et al., 2022; Zhang et al., 2022), which exhibit remarkable prowess in simulating human-like text generation. Their ability to follow instructions is of utmost importance for their practical application, as it customizes the outputs according to specific user needs. Despite this, evaluation of these models frequently emphasizes general natural language tasks (Wang et al., 2018, 2019; Hendrycks et al., 2020; Srivastava et al., 2022; Liang et al., 2022), or specific downstream tasks (Qin et al., 2023; Bang et al.,
2023), while the critical element of instruction-following—the model's capacity to accurately understand and execute user instructions—has not been thoroughly explored. This evident gap in research and the absence of systematic evaluation methods dedicated to this crucial aspect serve as the impetus for our present study. We aim to establish a reliable protocol and benchmark for appraising the instruction-following aptitude of LLMs.
Current research tends to utilize evaluation methodologies such as A/B Testing (Askell et al., 2021; Taori et al., 2023; Chiang et al., 2023; Li et al., 2023b; Wang et al., 2023c), overall scoring (Wang et al., 2022), and Elo rating (Zheng et al., 2023; Bai et al., 2022; Glaese et al., 2022)—a derivative of A/B testing. While these strategies have proven somewhat effective, they suffer from considerable drawbacks, including scalability issues and a lack of interpretability. A/B testing, for instance, necessitates $N^2$ comparisons for N systems. Moreover, the overall scoring system is opaque and difficult to interpret, failing to elucidate the reasoning behind the assignment of specific scores to particular instructions.
In this study, we propose a novel metric for assessing the instruction-following capability of LLMs, namely the Decomposed Requirements Following Ratio (DRFR). Unlike traditional metrics, DRFR decomposes each instruction into simpler, distinct criteria, allowing for a more detailed and precise assessment of an LLM's ability to follow specific aspects of a given task. This decomposition enables a granular evaluation, where the compliance of the LLM is measured against each individual requirement within an instruction, offering a clearer picture of the model's performance in complex instruction-following scenarios. In addition, We constructed a benchmark composed of 500 distinct instructions and provided 2,250 decomposed questions for the assessment of instruction-following. To facilitate a more fine-grained analysis, we classified the constraints present in each instruction into five categories: Content, Linguis
tic, Style, Format, and Number. We also manually curated constraint labels for each decomposed question to identify and analyze potential areas of deficiency in each model.
We conducted two key experiments: firstly, we compared the DRFR metric with traditional Direct Scoring (DS) for evaluating responses from various Large Language Models (LLMs). The results showed a higher consensus among annotators with DRFR, particularly in Hard Set, suggesting its greater reliability over Direct Scoring (DS). Secondly, we explored more cost-efficient annotation sources by comparing human experts, crowd-sourced workers from Amazon Mechanical Turk (AMT), and GPT-4. The findings revealed that while human experts were the most accurate, they were also costly and time-consuming. AMT workers presented a balance but with lower accuracy. Significantly, GPT-4 emerged as a highly accurate, cost-effective, and time-efficient alternative, especially when employing a structured, multi-turn prompt approach, making it a viable option for large-scale annotations.
We thus employ GPT-4 as an annotator to evaluate the entire INFOBENCH. The comprehensive evaluation of these advanced LLMs reveals that while progress has been significant, there is still a notable gap in their ability to follow instructions perfectly, particularly in more complex scenarios represented by the "Hard Set". The closed-source models are currently leading, possibly due to better data or more sophisticated algorithms. However, the performance across different constraint types and domains suggests that the challenges in instruction-following are more nuanced and may require focused improvements in areas like numerical and linguistic understanding. As LLMs continue to evolve, addressing these specific areas could lead to more robust and versatile Large Language models capable of handling a broader range of real-world tasks and instructions.
Our study presents four key contributions to the field of evaluating Large Language Models (LLM) in their ability to follow instructions. Firstly, we introduce a novel and scalable metric, the Decomposed Requirements Following Ratio (DRFR), which provides a reliable, detailed, and interpretable framework for assessing LLMs. This metric decomposes complex instructions into simpler, specific criteria, allowing for a granular analysis of a model's performance. Secondly, we have developed INFOBENCH, a comprehensive benchmark dataset. It includes 500 diverse instructions paired with 2,250 decomposed questions, designed to test
and analyze the instruction-following capabilities of LLMs systematically. Thirdly, through extensive experimentation, we established the efficacy of DRFR and INFOBENCH. Our findings highlight the potential of using GPT-4 as an evaluator for its accuracy and cost-effectiveness, particularly when employing structured, multi-turn prompts. Finally, we utilized our automatic evaluation toolkit to conduct a thorough analysis of six advanced LLMs. This evaluation not only underscores the current capabilities of these models but also sheds light on specific areas that require improvement for more nuanced and effective instruction-following, especially in complex scenarios. These contributions pave the way for future advancements in LLM development and evaluation.
# 2 INFOBENCH
Both evaluation metrics and benchmark datasets play an integral role in the objective assessment of Large Language Models' (LLM) ability to follow instructions. These tools are essential for enabling consistent comparisons, pinpointing areas for improvement, and ensuring the practicality, fairness, and effectiveness of these models in real-world applications. In Section 2.1, we introduce a novel evaluation metric, termed the Decomposed Requirements Following Ratio (DRFR). This metric is specifically designed to measure the proficiency of LLMs in adhering to complex instructions in a detailed and structured manner. Furthermore, Section 2.2 discusses the development of a corresponding benchmark dataset, INFOBENCH, which has been meticulously curated to rigorously test and evaluate the instruction-following capabilities of LLMs. This dataset presents a diverse range of scenarios and challenges, offering a comprehensive tool for benchmarking and refining the performance of these models.
# 2.1 DRFR
To evaluate the ability of advanced language models to accurately follow instructions, one common method is to consult evaluators for insights into whether and how the models' responses align with the given directives. However, this approach often encounters difficulties in practice, as reaching a consensus among evaluators can be challenging, especially in scenarios where the models partially meet some aspects of the instructions. A viable strategy for evaluating the compliance of advanced language models with complex instructions is to segment each instruction into distinct, simpler criteria that are more straightforward for evaluators to
<table><tr><td>Instruction</td><td>Decomposed YES/NO Questions</td></tr><tr><td>Make a questionnaire to help hotel guests write hotel reviews.</td><td>1. Is the generated text a questionnaire?2. Is the generated questionnaire designed for hotel guests?3. Is the generated questionnaire helpful for hotel guests to write hotel reviews?</td></tr><tr><td>Please generate 10 one-sentence hotel reviews from ten different customers, ensuring that 5 of the reviews are positive and 5 are negative. Begin each review with "CUS-TOMER" and the customer's number. After completing the 10 reviews, provide a two-sentence summarization that captures the overall sentiment and key points from the reviews.</td><td>1. Does the generated text include hotel reviews?2. Does the generated text include exactly 10 hotel reviews from 10 different customers?3. Is each of the generated hotel reviews just one sentence long?4. Are 5 of the reviews in the generated text positive and 5 negative?5. Does each review in the generated text begin with the prefix "CUSTOMER" followed by the customer's number?6. Does the generated text include a summarization after completing the 10 reviews?7. Is the summarization in the generated text composed of two sentences?8. Does the summarization in the generated text capture the overall sentiment and key points from the reviews?</td></tr></table>
Table 1: Representative examples from the INFOBENCH. The first row illustrates an instance from the Easy Set, while the second row presents a sample from the Hard Set.
judge. Consider a benchmark dataset comprised of $N$ instructions. Each of these instructions can be decomposed into $m_{i} \in \mathbb{N}^{+}$ unique requirements. The variable $r_{i,j} \in [0,1]$ denotes whether the $j$ -th criterion within the $i$ -th instruction is met. In this context, we can define the Decomposed Requirements Following Ratio (DRFR) as follows:
$$\mathrm {D R F R} = \frac {\sum_ {i , j} r _ {i , j}}{\sum_ {i} m _ {i}} \tag {1}$$
This metric quantifies the model's adherence to the decomposed criteria across the dataset, offering a nuanced understanding of its instruction-following capabilities. Table 1 provides two illustrative examples of instructions, each accompanied by their respective decomposed criteria. These criteria are framed as binary questions, necessitating a YES or NO response. A YES answer indicates that the output of the Large Language Model (LLM) successfully meets the specific criterion outlined in the question, corresponding to a value of 1 for $r_{i,j}$ . It is important to highlight that even minor deviations from the requirement result in a negative (NO) response, as precise adherence is mandatory. For example, in the third question of the second example in Table 1, the occurrence of even a single hotel review exceeding one sentence in length will necessitate a NO response. On the other hand, a NO indicates that the LLM's output either does not satisfy the requirement or fails to provide relevant information pertinent to the specified criterion.
# 2.2 INFOBENCH Dataset
To effectively benchmark instruction-following abilities, it's crucial to develop a dataset with a broad spectrum of diverse instructions. This approach ensures thorough coverage and enables a more precise evaluation of proficiency in follow-
ing instructions. The INFOBENCH addresses this need with two distinct sets: the Easy Set and the Hard Set. The Easy Set, based on the research in (Wang et al., 2022), is designed for a broad range of applications. In contrast, the Hard Set is our original contribution, consisting of a manually curated dataset inspired by various subject areas. Table 1 showcases examples from both sets in the context of hospital reviews. While the Easy Set has been widely used in evaluations ((Wang et al., 2022; Li et al., 2023b; Taori et al., 2023; Peng et al., 2023; Anand et al., 2023; Wang et al., 2023c)), our work led to the creation of the Hard Set, addressing the Easy Set's limitations: 1) Its instructions are relatively simple, limiting the ability to differentiate between modern LLMs' performance; 2) It features a limited variety of constraint types, typically with only about three per instruction, lacking in overall diversity; 3) The Easy Set often includes ambiguous and subjective requirements, as exemplified by the difficulty in universally defining terms like 'helpful' in its instructions. For instance, in Table 1, an instruction from the Easy Set requires the questionnaire to be 'helpful', but establishing a consensus on the definition of 'helpful' proves to be difficult. To guarantee the quality of the instructions and the clarity of the requirements, each instruction and its decomposed requirements are meticulously crafted by a subject matter expert and subsequently validated by another expert. The process of collecting instances continues until both experts concur on the naturalness of the instruction and the atomicity and lucidity of the decomposed requirements.
# 2.2.1 Instruction Development
Our objective is to formulate instructions with extensive coverage that effectively distinguish between superior and inferior models. We have de
 Figure 1: Instruction category of the Hard Set. Categories include Engineering and Technology (Engineering), Arts (Arts), Business and Economics (Economics), Lifestyle and Leisure (Lifestyle), Natural Sciences (Natural), Office and Work (Office), Social Sciences (Social), Computer Science (CS), Software Engineering (SW.), Electrical Engineering (EE), Artificial Intelligence (AI), Literature (Lit.), Painting (Pnt.), Music (Mus.), Marketing (Mktg.), Business Administration (Bus.), Real Estate (R.E.), Human Resources (HR), Family and Relationships (Family), Travel and Tourism (Travel), Riddle and Puzzle (Riddle), Personal Development (Pers.), Mathematics (Math), Statistics (StatS.), Biology (Biol.), Physics (Phys.), Job Recruitment (Job), Event Planning (Plng.), Document Formatting (Doc.), Calendar Management (Agd.), Education and Pedagogy (Educ.), Linguistics (Ling.), News and Media (Media), Law and Criminology (Law).
veloped the Hard Set encompassing 72 domains, spanning areas such as Natural Sciences, Social Sciences, Engineering, Economics, Arts, various occupational tasks, and aspects of daily life, illustrated in Figure 1. We also incorporate specific response constraints in these instructions: 1) Content Constraints: These define the specific topics or details to be addressed in the LLM's response, such as discussing "climate change impacts" or mentioning "the main characters in Harry Potter"; 2) Linguistic Guidelines: These dictate the use of particular language structures and terms, including grammatical styles, syntax, and specific dialects, like "Victorian English" or "technical jargon"; 3) Style Rules: These direct the overall tone and audience of the text, varying from formal to persuasive or sophisticated, as in writing with a "respectful tone" or for "a young audience"; 4) Format Specifications: These instruct the LLM on the structural presentation of its response, such as "crafting a sonnet" or "list ideas bullet-wise"; 5) Number Limitations: These involve numeric-related instructions, like producing "a 500-word essay" or presenting "three arguments for renewable energy".
# 2.2.2 Instruction Decomposition
In the process of instruction development, we meticulously devised detailed requirements and associated binary questions for each instruction, each
question reflecting a specific constraint that can be answered with "YES" or "NO". Utilizing our established ontology of constraint types, we manually classified each question with appropriate constraint labels, noting that a single requirement could embody multiple constraint types. For example, the question "Does the generated text provide a critique of Vincent van Gogh's Starry Night?" falls under the content constraint due to its focus on "Starry Night", while also fitting the format constraint as a critique represents a distinct writing style. Therefore, we assigned one or more constraint types to each question, with each constraint in our dataset being labeled with up to three types.
2.2.3 Benchmark Statistics
<table><tr><td></td><td>#Inst.</td><td>Len.</td><td>#Req.</td><td>#R/I</td><td>#Dom.</td></tr><tr><td>Easy</td><td>252</td><td>17.77</td><td>690</td><td>2.74</td><td>71</td></tr><tr><td>Hard</td><td>248</td><td>59.26</td><td>1560</td><td>6.29</td><td>72</td></tr><tr><td>Overall</td><td>500</td><td>38.35</td><td>2250</td><td>4.50</td><td>143</td></tr></table>
Table 2: Statistics of INFOBENCH Dataset: This table provides key statistics including the number of instructions (#Inst.), the average length of instructions (Len.), the total number of decomposed questions in the dataset (#Req.), number of requirements per instruction (#R/I), and the number of instruction domain (#Dom.).
Table 2 offers statistical insights into the INFOBENCH, highlighting significant differences between the two sets. The Hard Set is characterized by more elaborate instructions and a greater number of requirements, indicating a higher level of complexity compared to the Easy Set. Moreover, the table emphasizes the dataset's diversity, evident in the broad range of domains it encompasses.
 Figure 2: Constraint types of the Easy and the Hard Set.
Figure 2 illustrates a comparative analysis of the constraint type distribution between the Easy Set and the Hard Set. Approximately two-thirds of the constraints in the Easy Set are classified as content constraints. In contrast, the Hard Set demonstrates a more heterogeneous distribution of varied constraint types. More detailed statistics are elaborated in Appendix A.1.
# 3 Experiments
# 3.1 DRFR v.s. Direct Scoring
In our study, we aim to assess the reliability of the DRFR metric by contrasting it with a conventional direct scoring approach. In the Direct Scoring (DS), human evaluators assign a score ranging from 1 (indicating the lowest quality) to 5 (representing the highest quality) for each response generated by the model. The criteria for each rating are elaborated as follows: Rating-1 (Very Bad): The model's response is entirely irrelevant to the query posed. It demonstrates no understanding of the requested task. Rating-2 (Bad): While there is a minimal degree of relevance to the original instruction, the response is predominantly incorrect, confusing, or both. Rating-3 (Okay): The response shows some relation to the posed question but lacks critical details or includes inaccuracies. Rating-4 (Good): This rating is given when the response is mostly accurate and comprehensive. However, it might include slight errors or omit minor details. Rating-5 (Excellent): A response receiving this rating is entirely accurate, detailed, and aligns perfectly with the requirements of the query.
In our evaluation, we incorporate five widely recognized Large Language Models (LLM), each distinguished by its unique characteristics and training methodologies: GPT-3.5-turbo (Ouyang et al., 2022): A 175 billion parameter extension of GPT-3 (Brown et al., 2020) by OpenAI, enhanced for alignment with user intentions through human feedback-based reinforcement learning. GPT-4 (OpenAI, 2023b): This model is an advanced, large-scale successor to GPT-3.5-turbo. Claude-v1 (Bai et al., 2022): Anthropic's 52 billion parameter AI assistant, Claude-v1, is trained to be helpful, honest, and harmless using reinforced learning from human feedback. Alpaca7B (Taori et al., 2023): Alpaca-7B is an open-source model, derived from a 7 billion parameter LLaMA base (Touvron et al., 2023), and finetuned with a dataset (Wang et al., 2022) focused on instruction-following capabilities. Vicuna13B (Chiang et al., 2023): Vicuna-13B is a 13 billion parameter, open-source model fine-tuned from LLaMA, incorporating diverse real-world interactions from the ShareGPT platform $^{2}$ .
Additionally, We aggregate responses generated by the models on INFOBENCH and engage three NLP experts to independently assess them, utilizing two distinct methods. Initially, they apply the Direct Scoring (DS), followed by an evaluation
using the DRFR metric. This order is designed to mitigate any potential bias: by conducting the DRFR assessment after the DS evaluation, we aim to prevent the evaluators' impressions formed during the DRFR assessment from influencing their DS evaluations. This ensures a more objective and unbiased evaluation process.
Moreover, to facilitate an equitable comparison between the two evaluation metrics, we standardize both into instruction-level scores. This enables a direct, side-by-side comparison of response pairs from two distinct models, referred to as Model-A and Model-B. For each instructional prompt, the paired responses are categorized into three distinct classifications: 1) Model-A outperforms Model-B, 2) Model-A and Model-B are equally effective, and 3) Model-B outperforms Model-A. Finally, a Fleiss' Kappa Agreement (Fleiss, 1971) is employed to measure the agreements among three evaluators concerning the pairwise categorization. This Pairwise Kappa Agreement approach ensures clarity and precision in our comparative analysis of the evaluation metrics.
<table><tr><td rowspan="2">Metric</td><td colspan="3">Pairwise Kappa Agreement</td></tr><tr><td>Easy(25)</td><td>Hard(25)</td><td>Overall(50)</td></tr><tr><td>DS</td><td>0.241</td><td>0.302</td><td>0.284</td></tr><tr><td>DRFR</td><td>0.537</td><td>0.493</td><td>0.532</td></tr></table>
Table 3: Pairwise Kappa Agreement of DS and DRFR on 50 instructions from INFOBENCH. A score below 0.2 suggests a slight agreement A score of 0.21 to 0.40 suggests a fair agreement. A score of 0.41 to 0.60 suggests a moderate agreement. A score of 0.61 to 0.80 suggests a substantial agreement. And a score of 0.81 to 1.00 suggest an almost perfect agreement.
Table 3 displays the Pairwise Kappa Agreement for both metrics across 50 selected instances from the INFOBENCH, comprising an equal mix of 25 instances each from the Easy and Hard subsets. The observed gap exceeding 0.19 between the DRFR and Direct Scoring (DS) suggests that DRFR yields a notably higher annotator consensus, thereby implying its enhanced reliability for human annotations.
# 3.2 Experiment of Annotation Sources
In our quest to identify a more cost-effective source for annotations, we conducted a comparative study utilizing annotations from various sources, including human experts, crowd-sourced workers from Amazon Mechanical Turk (AMT), and advanced Large Language Models like GPT-4. The details of this comparison are as follows:
Human Expert Annotations: Annotations from three experts, previously discussed in Section 3.1, were utilized. Given the wide range of topics covered by the instruction set, it is improbable for a single expert to possess comprehensive proficiency across all subjects. Therefore, we implemented a majority voting system, supplemented by the use of online research tools, to enhance the accuracy of these expert annotations.
Crowd-Sourced Annotations: We engaged annotators from the Amazon Mechanical Turk (AMT) platform<sup>4</sup>, selecting those with a HIT Approval Rate above $90\%$ and a minimum of 500 Approved HITs. Each task, comprising an instruction and its corresponding responses, was assigned to three distinct annotators. We adopted a majority voting approach for each discrete query and an aggregate scoring method for instructions. The specifics of this evaluation methodology are elaborated in Appendix A.3.
GPT-4 Based Annotation: We employed the GPT-4 model for automatic evaluation. The approach involved issuing a series of multi-turn prompts, sequentially presenting GPT-4 with decomposed questions, while accounting for the context provided by previous answers. The specifics of this prompt structure are detailed in Appendix A.2.
In Table 4, we present a comparative analysis of various annotation sources, emphasizing their cost, time efficiency, and annotation robustness. We calculated the cost of expert annotations by aggregating the total hours worked by three NLP experts. The hourly rate was set at $59, based on salary data from ZipRecruiter.\(^{6}$ The expenditure on AMT workers was computed based on the total payment made on the platform. Each annotation task, comprising one instruction and five model responses, was assigned to three annotators. The compensation was \)1 per annotator, with an additional 25% platform fee. The total time for AMT annotations was obtained from AMT platform statistics. The cost of using the GPT-4-0314 model is determined by its token-based pricing structure $^{7}$ , which is $0.03 per 1,000 prompt tokens and $0.06 per 1,000 completion tokens. Operational constraints of GPT-4 include a limit of 200 requests per minute and a maximum of 40,000 tokens per minute. $^{8}$ The total cost and time expen
diture for using GPT-4 were calculated based on the cumulative count of prompt and completion tokens used during the execution of the tasks. To evaluate the robustness of the annotation source, we inherit the pairwise comparison mentioned in Section 3.1. The three categories are labeled with $\{-1,0,1\}$ for 1) Model-A outperforms Model-B, 2) Model-A and Model-B are equally effective, and 3) Model-B outperforms Model-A. Pairwise Label Distance(PLD) is introduced to measure the agreement between the annotations and the ground truth labels. A PLD value of 0 indicates that the annotations accurately reflect the relative performance order of the models for a given pair of responses. A PLD of 1 suggests a potential misclassification in scenarios where models perform equally ('tie' scenario), possibly attributing superiority to one model over the other, or vice versa. A PLD of 2 signifies that the annotations incorrectly represent the order of model performances. A Weighted Pairwise Label Distance (WPLD) is defined as below:
$$\mathbf {W P L D} = \sum_ {i = 0} ^ {2} i * \mathbf {P} (\mathbf {P L D} = i) \tag {2}$$
Our analysis yields two important findings: 1) Annotations generated by GPT-4 exhibit superior cost-effectiveness and time efficiency compared to those produced by AMT (Amazon Mechanical Turk) crowd workers. Additionally, GPT-4 demonstrates enhanced overall performance in annotation tasks. 2) When employing decomposed questions, GPT-4's performance is particularly noteworthy. It achieves an accuracy rate of $89\%$ and a weighted pairwise label distance of 0.44, in alignment with the gold standard. These results suggest that GPT-4, used in conjunction with the decomposed questions, emerges as a feasible and efficient alternative to traditional expert-based annotation, especially when considering the balance between cost and time efficiency. In light of these findings, we emphasize the use of the GPT-4 model for annotation tasks in our evaluation of models on INFOBENCH, considering its advantageous balance of cost, time efficiency, and accuracy.
# 4 Automatic Evaluation
In light of the findings from our previous experiments, it has become evident that GPT-4 represents a superior alternative for expert annotations. This approach not only offers a high degree of accuracy but also ensures time efficiency and cost-effectiveness in annotation processes. Building on this insight, we integrate the gpt-4-0314 with
<table><tr><td rowspan="2"></td><td rowspan="2">Source</td><td rowspan="2">Cost($)</td><td rowspan="2">Time(min)</td><td colspan="5">Robustness</td></tr><tr><td>ACC(%)</td><td>PLD0(%)</td><td>PLD1(%)</td><td>PLD2(%)</td><td>WPLD</td></tr><tr><td rowspan="3">Easy Set(25)</td><td>Expert</td><td>472.00</td><td>480</td><td>100.0</td><td>100.0</td><td>0.0</td><td>0.0</td><td>0</td></tr><tr><td>AMT</td><td>93.75</td><td>960</td><td>90.0</td><td>51.8</td><td>37.6</td><td>10.6</td><td>0.588</td></tr><tr><td>GPT-4</td><td>5.40</td><td>20</td><td>93.0</td><td>65.6</td><td>34.4</td><td>0.0</td><td>0.344</td></tr><tr><td rowspan="3">Hard Set(25)</td><td>Expert</td><td>944.00</td><td>960</td><td>100.0</td><td>100.0</td><td>0.0</td><td>0.0</td><td>0</td></tr><tr><td>AMT</td><td>93.75</td><td>1,200</td><td>81.0</td><td>51.4</td><td>31.6</td><td>17.0</td><td>0.656</td></tr><tr><td>GPT-4</td><td>14.20</td><td>40</td><td>87.0</td><td>52.4</td><td>41.6</td><td>6.0</td><td>0.536</td></tr><tr><td rowspan="3">Overall(50)</td><td>Expert</td><td>1,416.00</td><td>1,440</td><td>100.0</td><td>100.0</td><td>0.0</td><td>0.0</td><td>0</td></tr><tr><td>AMT</td><td>187.50</td><td>2,160</td><td>84.0</td><td>51.6</td><td>34.7</td><td>13.7</td><td>0.621</td></tr><tr><td>GPT-4</td><td>19.40</td><td>60</td><td>89.0</td><td>59.0</td><td>38.0</td><td>3.0</td><td>0.440</td></tr></table>
Table 4: Comparative Analysis of Annotation Sources for 50 Instructions in INFOBENCH across five models: Cost, Time, and Robustness Evaluation. AMT stands for Amazon Mechanical Turk. All the annotations are aggregated by a majority vote of three annotators except the GPT-4. ACC compares the accuracy of the annotations against a benchmark 'ground truth' label, which is derived from an aggregated human expert label. PLD(Pairwise Label Distance) is a critical measure reflecting the level of agreement in annotations on an instruction level. WPLD is the weighted average of PLD for all instructions.
the multi-turn prompt for scaling up the evaluation across the entire INFOBENCH with six of the most cutting-edge LLMs. These include: gpt-3.5-turbo-1106 (Brown et al., 2020) and gpt4-1106-preview (OpenAI, 2023a) released by OpenAI, Claude-2.1 (Anthropic, 2023) by Anthropic, Gemini-Pro (Team, 2023) by Google, Llama-2-70b-chat (Hugo et al., 2023) by Meta and Vicuna-13b-v1.5 (Zheng et al., 2023) by LMSYS. To avoid randomness during the decoding process, we use greedy decoding<sup>9</sup> for all the models.
<table><tr><td>Model Name</td><td>Easy Set</td><td>Hard Set</td><td>Overall</td></tr><tr><td>gpt-4-1106-preview</td><td>90.1</td><td>89.1</td><td>89.4</td></tr><tr><td>gpt-3.5-turbo-1106</td><td>90.4</td><td>85.1</td><td>86.7</td></tr><tr><td>claude-2.1</td><td>82.9</td><td>87.9</td><td>86.4</td></tr><tr><td>gemini-pro</td><td>87.3</td><td>84.9</td><td>85.6</td></tr><tr><td>Llama-2-70b-chat</td><td>89.6</td><td>82.1</td><td>84.4</td></tr><tr><td>Vicuna-13b-v1.5</td><td>86.1</td><td>75.0</td><td>78.4</td></tr></table>
Table 5: Automated DRFR assigned by gpt-4-0314 for six selected LLMs on the INFOBENCH.
Overall: Table 5 presents the automated DRFR scores powered by gpt-4-0314 for the selected models on INFOBENCH. Upon analysis of the data presented in the table, three key observations can be made: (1) GPT-4 exhibits superior performance over the other LLMs, scoring the highest amongst all. However, even with this state-of-the-art model, more than $10\%$ of the requirements remain unfulfilled, indicating a critical need for further enhancement within the aspect of instruction following. (2) All models except Claude-2.1 display better performance on the Easy Set as compared to the Hard Set, implying that the Hard Set poses a more formidable challenge. (3) The closed-sourced models (e.g. gpt-4-1106-preview, gpt3.5-turbo-1106, claude-2.1, gemini-pro) have better performance on Hard Set than those open-sourced models (e.g. Llama-2-70b-chat, Vicuna-13b-v1.5), which may
indicate they have better data instruction coverage on more advanced instructions or they have better model generalization capabilities.
 Figure 3: Radar plot comparing the performance of LLMs on different constraint types powered by gpt-4-0314
Constraint Type: To assess the influence of constraint type on adherence to instructions, we calculate the evaluation scores for each constraint type individually, as presented in Figure 3. The radar plot reveals a discernible pattern in performance across different constraint types: performance is highest on Content and Style, intermediate on Format, and lowest on Number and Linguistic constraints. This general trend is observed across all six language models.
Domain: To investigate the influence of the instruction domains on the behavior of instruction-following, we restrict our analysis to the seven principal subject categories within the Hard Set, and independently calculate the evaluation scores for each instruction category, as depicted in Figure 4. Contrary to the pattern discernible in the preceding section, the resulting shape of the evaluation scores on the radar plot approximates a circle (except for vicuna). This indicates that the domain of instruction does not serve as the principal factor affecting
 Figure 4: Radar plot comparing the performance of LLMs on different domains powered by gpt-4-0314
the instruction-following or most of the models have a good data coverage for such domains.
# 5 Related Work
The adaptation of LLMs for enhanced usability has garnered significant attention. Two prevalent approaches for this adaptation are instruction tuning and alignment tuning (Zhao et al., 2023). Instruction tuning (Wang et al., 2022; Lou et al., 2023) aims to unlock the capabilities of LLMs by fine-tuning them on annotated "instructional" data. This involves datasets with natural language instructions and their corresponding desired outcomes. Several LLM adaptations have embraced this method for effective refinement(Taori et al., 2023; Wei et al., 2021; Chung et al., 2022; Iyer et al., 2022; Ouyang et al., 2022). Alignment tuning (Ziegler et al., 2019; Christiano et al., 2017; Ouyang et al., 2022; Bai et al., 2022) differs from instruction tuning by emphasizing human feedback to ensure LLMs align with human values and preferences. This addresses LLMs' tendencies to exhibit unintended behaviors like fabricating information or producing biased expressions(Ouyang et al., 2022; Kenton et al., 2021), steering them more in line with human expectations. A natural extension of this line of inquiry is the assessment of LLMs' ability to follow natural language instructions and align with human preferences accurately. In terms of evaluation, using LLMs for Natural Language Generation evaluation has shown promise in numerous tasks (Zheng et al., 2023; Liu et al., 2023; Wang et al., 2023a; Fu et al., 2023; Kocmi and Federmann, 2023; Xu et al., 2023; Chiang et al., 2023; Eldan and Li, 2023). Given this context, in our proposed work, we employ LLMs as evaluators to assess their aptitude for instruction-following. Several works have concurrently assessed LLMs from various perspectives: Wang et al. (2023b) explore the reasoning capabilities
of LLMs for complex scientific problem solving; Wang et al. (2023c) present a judge LLM trained to distinguish the performance of various LLMs; Li et al. (2023a) introduce an instruction-following evaluation protocol named verbalizer manipulation on classification tasks; Li et al. (2023b) develop an LLM-based automatic evaluation method to calculate win-rate of the given model's output favored over that of a reference model on an 805-instruction dataset (Dubois et al., 2023); Xu et al. (2023) propose an automatic method to compose complex instructions for instruction-tuning; Chia et al. (2023) introduce an evaluation suite designed for the assessment of instruction-tuned LLMs' ability on problem-solving, writing proficiency, and alignment with human values; Jiang et al. (2023) adopts a distinct approach by sequentially adding fine-grained constraints to construct multi-level instructions; Zhou et al. (2023) emphasizes objective evaluations with 25 verifiable instructions, contrasting with our work's broader coverage yet similar focus on objectivity.
# 6 Conclusion
This study introduces a significant breakthrough in evaluating Large Language Models (LLMs) through the Decomposed Requirements Following Ratio (DRFR), a novel metric that dissects complex instructions into simpler criteria for a more nuanced analysis. This approach, coupled with the creation of INFOBENCH, a comprehensive benchmark dataset, enables a detailed assessment of LLMs' instruction-following capabilities. Our findings reveal the superiority of DRFR over traditional evaluation methods, offering clearer insights into model performance, especially in complex scenarios. The use of GPT-4 as an annotator emerged as a cost-effective, accurate, and efficient alternative for large-scale evaluations, highlighting its potential to automate and enhance the assessment process. The comprehensive evaluation of various LLMs using our methods uncovered their strengths and areas needing improvement. While significant progress is evident, especially in closed-source models, challenges remain in handling complex instructions, signaling a need for advancements in areas like numerical reasoning and linguistic comprehension. Our contributions provide a foundation for future research and development, guiding the enhancement of LLMs for more accurate and reliable performance in real-world applications. This study not only underscores the current capabilities of LLMs but also paves the way for the next generation of more robust and versatile AI models.
# Limitations
This study is not without its limitations, which must be acknowledged:
1. The cost and resources required for human annotation have restricted us to providing these annotations for only a fraction of our instruction set. Specifically, a mere $10\%$ of the instruction set, equating to 50 instructions, were annotated by humans. The reliability of our decomposed protocol, comparisons with the baseline protocol, and comparisons among different annotations are, therefore, based solely on this subset. 2. The size of our dataset presents another limitation. It comprises 500 instructions and 2,250 decomposed questions, representing a somewhat limited benchmark. The manual nature of our instruction writing process limits our capacity to scale this dataset significantly. Future work could explore the development of automated methods for instruction writing and question decomposition, potentially allowing for the creation of more scalable datasets. 3. Finally, the evaluation of our model is predominantly centered on the explicit intentions contained within the provided instructions. Several crucial factors, such as truthfulness and harmlessness (Askell et al., 2021), were not considered in this study. These elements, although not addressed in our current work, represent promising avenues for subsequent research endeavors.
# References
Yuvanesh Anand, Zach Nussbaum, Brandon Duderstadt, Benjamin Schmidt, and Andriy Mulyar. 2023. Gpt4all: Training an assistant-style chatbot with large scale data distillation from gpt-3.5-turbo. GitHub. Anthropic. 2023. Introducing Claude 2.1. https://www.anthropic.com/index/claude-2-1. Accessed on: Nov 21, 2023. Amanda Askell, Yuntao Bai, Anna Chen, Dawn Drain, Deep Ganguli, Tom Henighan, Andy Jones, Nicholas Joseph, Ben Mann, Nova DasSarma, et al. 2021. A general language assistant as a laboratory for alignment. arXiv preprint arXiv:2112.00861. Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. 2022. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862. Yejin Bang, Samuel Cahyawijaya, Nayeon Lee, Wenliang Dai, Dan Su, Bryan Wilie, Holy Lovenia, Ziwei Ji, Tiezheng Yu, Willy Chung, et al. 2023. A multitask, multilingual, multimodal evaluation of chatgpt
on reasoning, hallucination, and interactivity. arXiv preprint arXiv:2302.04023. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901. Yew Ken Chia, Pengfei Hong, Lidong Bing, and Soujanya Poria. 2023. Instructeval: Towards holistic evaluation of instruction-tuned large language models. arXiv preprint arXiv:2306.04757. Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. 2023. Vicuna: An opensource chatbot impressing gpt-4 with $90\%$ * chatgpt quality. Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. 2022. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311. Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. 2017. Deep reinforcement learning from human preferences. Advances in neural information processing systems, 30. Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. 2022. Scaling instruction-finetuned language models. arXiv preprint arXiv:2210.11416. Yann Dubois, Xuechen Li, Rohan Taori, Tianyi Zhang, Ishaan Gulrajani, Jimmy Ba, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Alpaca-farm: A simulation framework for methods that learn from human feedback. Ronen Eldan and Yuanzhi Li. 2023. Tinystories: How small can language models be and still speak coherent english? Joseph L Fleiss. 1971. Measuring nominal scale agreement among many raters. *Psychological bulletin*, 76(5):378. Jinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. 2023. Gptscore: Evaluate as you desire. Amelia Glaese, Nat McAleese, Maja Trebacz, John Aslanides, Vlad Firoiu, Timo Ewalds, Maribeth Rauh, Laura Weidinger, Martin Chadwick, Phoebe Thacker, et al. 2022. Improving alignment of dialogue agents via targeted human judgements. arXiv preprint arXiv:2209.14375.
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2020. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300. Touvron Hugo, Martin Louis, Stone Kevin, Albert Peter, Almahairi Amjad, Babaei Yasmine, Bashlykov Nikolay, Batra Soumya, Bhargava Prajjwal, Bhosale Shruti, Bikel Dan, Blecher Lukas, Canton Ferrer Cristian, Chen Moya, Cucurull Guillem, Esiobu David, Fernandes Jude, Fu Jeremy, and Wenyin Fu. 2023. Llama 2: Open foundation and fine-tuned chat models. Srinivasan Iyer, Xi Victoria Lin, Ramakanth Pasunuru, Todor Mihaylov, Daniel Simig, Ping Yu, Kurt Shuster, Tianlu Wang, Qing Liu, Punit Singh Koura, et al. 2022. Opt-iml: Scaling language model instruction meta learning through the lens of generalization. arXiv preprint arXiv:2212.12017. Yuxin Jiang, Yufei Wang, Xingshan Zeng, Wanjun Zhong, Liangyou Li, Fei Mi, Lifeng Shang, Xin Jiang, Qun Liu, and Wei Wang. 2023. Follow-bench: A multi-level fine-grained constraints following benchmark for large language models. Zachary Kenton, Tom Everitt, Laura Weidinger, Jason Gabriel, Vladimir Mikulik, and Geoffrey Irving. 2021. Alignment of language agents. arXiv preprint arXiv:2103.14659. Tom Kocmi and Christian Federmann. 2023. Large language models are state-of-the-art evaluators of translation quality. Shiyang Li, Jun Yan, Hai Wang, Zheng Tang, Xiang Ren, Vijay Srinivasan, and Hongxia Jin. 2023a. Instruction-following evaluation through verbalizer manipulation. Xuechen Li, Tianyi Zhang, Yann Dubois, Rohan Taori, Ishaan Gulrajani, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023b. Alpacaeval: An automatic evaluator of instruction-following models. https://github.com/tatsu-lab/alpaca_eval. Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, Deepak Narayanan, Yuhuai Wu, Ananya Kumar, et al. 2022. Holistic evaluation of language models. arXiv preprint arXiv:2211.09110. Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. 2023. G-eval: Nlg evaluation using gpt-4 with better human alignment. Renze Lou, Kai Zhang, and Wenpeng Yin. 2023. Is prompt all you need? no. a comprehensive and broader view of instruction learning. arXiv preprint arXiv:2303.10475. OpenAI. 2023a. Gpt-4. https://openai.com/research/gpt-4.
OpenAI. 2023b. Gpt-4 technical report. Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022. Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155. Baolin Peng, Chunyuan Li, Pengcheng He, Michel Galley, and Jianfeng Gao. 2023. Instruction tuning with gpt-4. Chengwei Qin, Aston Zhang, Zhuosheng Zhang, Jiao Chen, Michihiro Yasunaga, and Diyi Yang. 2023. Is chatgpt a general-purpose natural language processing task solver? arXiv preprint arXiv:2302.06476. Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R Brown, Adam Santoro, Aditya Gupta, Adrià Garriga-Alonso, et al. 2022. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. arXiv preprint arXiv:2206.04615. Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca. Gemini Team. 2023. Gemini: A family of highly capable multimodal models. Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971. Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2019. Superglue: A stickier benchmark for general-purpose language understanding systems. Advances in neural information processing systems, 32. Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2018. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461. Jiaan Wang, Yunlong Liang, Fandong Meng, Zengkui Sun, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023a. Is chatgpt a good nlg evaluator? a preliminary study. Xiaoxuan Wang, Ziniu Hu, Pan Lu, Yanqiao Zhu, Jieyu Zhang, Satyen Subramaniam, Arjun R. Loomba, Shichang Zhang, Yizhou Sun, and Wei Wang. 2023b. Scibench: Evaluating college-level scientific problem-solving abilities of large language models.
Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, and Yue Zhang. 2023c. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization.
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi. 2022. Self-instruct: Aligning language model with self generated instructions. arXiv preprint arXiv:2212.10560.
Jason Wei, Maarten Bosma, Vincent Y Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. 2021. Finetuned language models are zero-shot learners. arXiv preprint arXiv:2109.01652.
Can Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng, Pu Zhao, Jiazhan Feng, Chongyang Tao, and Daxin Jiang. 2023. Wizardlm: Empowering large language models to follow complex instructions.
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. 2022. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068.
Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. 2023. A survey of large language models. arXiv preprint arXiv:2303.18223.
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric. P Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena.
Jeffrey Zhou, Tianjian Lu, Swaroop Mishra, Siddhartha Brahma, Sujoy Basu, Yi Luan, Denny Zhou, and Le Hou. 2023. Instruction-following evaluation for large language models.
Daniel M Ziegler, Nisan Stiannon, Jeffrey Wu, Tom B Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. 2019. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593.
# A Appendix
# A.1 Instruction Dataset Statistics
Figure 5 illustrates the distributions pertaining to the instruction length for both the Easy Set and Hard Set, as well as the average number of questions per instruction for these sets. The graph indicates that the instruction length for the Easy Set predominantly ranges between 10-20 words, while
for the Hard Set it averages around 50 words. Similarly, the average number of questions per instruction for the Easy Set center is approximately 2-3, whereas, for the Hard Set, this number lies within the range of 5-7. These statistical variations elucidate the enhanced complexity associated with the Hard Set as compared to the Easy Set.
Table 6 presents a quantitative analysis related to Figure 2, depicting the categorization of questions according to their constraint type within the Easy Set and Hard Set. This tabulated data underscores the distribution of questions among different constraint types, providing an empirical perspective on the complexity gradation inherent in each set.
# A.2 Prompt Design for GPT-4 Automatic Evaluation
In this section, we provide a detailed overview of the prompt design used in our study. The purpose of these prompts is to guide GPT-4 in evaluating text outputs generated by other LLMs.
Our dataset encompasses two types of instructions: with and without an accompanying input. For instance, a summarization task might have "Summarize the document" as an "Actual Instruction", and the document content as "Input". In cases where there is no direct input, the instruction itself guides the LLM, e.g., "Please give me 5 words to describe flowers." The "Total Instruction" sent to an LLM comprises the concatenation of "Actual Instruction" and "Input" (if present).
The prompt instructs GPT-4 to respond with a simple 'YES' or 'NO' to individually decomposed questions about the LLM's generated text. This prompt includes the "Input" (if any), the LLM's generated text, and a decomposed question. Notably, the "Actual Instruction" is not included in the Decomposed Protocol's prompt, as we hypothesize that the decomposed questions encompass the instruction's requirements. An example is shown in Table 7. As for multiple decomposed questions, We engage in a multi-turn dialogue with GPT-4. Each instruction and generation is followed by several questions, asked sequentially. GPT-4's response to each question is used as context for the subsequent question. We also explored different methods, including asking all questions simultaneously and asking each question independently, but found the sequential multi-turn dialogue to yield more effective results.
We also experimented with incorporating a few-shot learning approach by providing examples in the prompt. However, the results indicated no significant improvement, possibly due to the varied
 (a)
 (b)
 (c)
 (d) Figure 5: Distribution of instruction lengths for the Easy Set (a) and Hard Set (b) with the x-axis representing the number of words and the y-axis indicating the percentage of instructions. Likewise, the distribution of average questions per instruction for Easy Set (c) and Hard Set (d) is shown with the x-axis enumerating the number of questions and the y-axis detailing the percentage of instructions.
<table><tr><td></td><td>Content</td><td>Format</td><td>Number</td><td>Style</td><td>Linguistic</td><td>#Labels</td></tr><tr><td>Easy Set</td><td>517</td><td>167</td><td>8</td><td>52</td><td>48</td><td>792</td></tr><tr><td>Hard Set</td><td>878</td><td>627</td><td>411</td><td>138</td><td>120</td><td>2174</td></tr><tr><td>Overall</td><td>1395</td><td>794</td><td>419</td><td>190</td><td>168</td><td>2966</td></tr></table>
Table 6: Distribution of Questions Across Different Constraint Types. The '#Labels' column represents the total count of question labels associated with each dataset. The quantity exceeds the total number of questions listed in Table 2, as individual questions can potentially be classified under multiple constraint types.
nature of the instructions and questions, and the simplicity of the answer format.
# A.3 Human Annotation Guidance
The guideline for crowd-sourced workers and interface used in the Amazon Mechanical Turk is demonstrated in Figure 6. Annotators are asked to read the guidelines before starting the annotation. We provide one extra option "UNKNOWN" for annotators if they find it hard enough to answer the questions with their knowledge. Such options will not be counted during the experiment and the evaluation. Systems are randomly shuffled in each instance to prevent the potential of memorizing which system is better.
# A.4 GPT-4-1106 Evaluation Results
In Table 8, we expand our evaluation to incorporate the latest iteration of the GPT-4 model (gpt-4-1106-preview). The findings largely mirror the trends observed in Section 4. Notably, the scores attributed by gpt-4-1106-preview are marginally lower than those given by its predecessor, gpt-4-0314. This discrepancy warrants further investigation to understand the underlying factors influencing this variation in scoring.
Figures 7 and 8 present a detailed breakdown of the evaluation results, categorizing performance according to various constraint types and domains. These results are consistent with the findings discussed in Section 4.
The comprehensive analysis conducted with the gpt-4-1106-preview model reinforces our understanding of the capabilities and limitations of current LLMs. Moreover, the consistency in performance trends across different model versions underscores the reliability of GPT-4 as a valuable tool in annotation tasks.
# A.5 GPT-4 Annotation Error Analysis
This section examines the discrepancies between GPT-4's annotations and those made by humans. We hypothesize two primary reasons for the differences: 1) Inherent ambiguities or subjectivities in the questions that challenge human consensus (e.g., "a letter around 250 words?" where "around" is vague, or "generate an appealing title" where "appealing" is subjective); 2) Actual errors in GPT-4's annotations.
To explore the difficulty in achieving consensus on certain questions, we introduce the concept of a "Disagreement Level" which quantifies the discrepancy between single expert annotation and the gold standard, defined as the majority vote, for
each question. This metric serves to illustrate the degree to which human annotators differ in their assessments for each question. Specifically, for a given question and a single LLM's output, we incorporate the binary 'YES' or 'NO' evaluations from three independent annotators, from which the majority vote is designated as the gold standard. Consequently, for a single LLM's output, the Disagreement Level may be as low as 0 (indicating consensus among all three annotators) or as high as 1 (signifying that one annotator diverged from the decision of the other two). Given that our experimental framework deploys five LMs for each question, the Disagreement Level possesses a potential range of 0 to 5.
The distribution of Disagreement Levels, as shown in Figure 9, reveals that around $30\%$ to $40\%$ of questions exhibit a medium to high degree of human disagreement (Disagreement Levels at least 2). In assessing instances where GPT-4's annotations deviates from human consensus, we disregard these questions. This approach stems from the rationale that a lack of human consensus undermines the legitimacy of labeling GPT-4's differing response as erroneous.
We then focus on the remaining $60\%$ to $70\%$ of the questions that manifest high agreement among human evaluators, yet GPT-4's annotations do not align. In these cases, we can more confidently identify GPT-4's annotations as errors. Our investigation uncovered several recurring reasons for GPT-4's missteps:
1) The LLMs generations incorporate misleading content. For example:
Instruction: Generate an eviction notice for a tenant named John Smith, residing at 123 Main Street, Cityville, NY, 87562, for nonpayment of rent for the past two months. The notice should give the tenant 30 days to vacate the property.
Question: Does the generated eviction notice include the tenant's name: John Smith?
Generation: Generated an eviction notice for tenant John Smith, residing at 123 Main Street, Cityville, NY, 87562, for nonpayment of rent for the past two months. The notice should give the tenant 30 days to vacate the property.
Correct Answer: NO.
GPT-4 Answer: YES.
# <User>:
Based on the provided Input (if any) and Generated Text, answer the ensuing Questions with either a YES or NO choice. Your selection should be based on your judgment as well as the following rules:
- YES: Select 'YES' if the generated text entirely fulfills the condition specified in the question. However, note that even minor inaccuracies exclude the text from receiving a 'YES' rating. As an illustration, consider a question that asks, "Does each sentence in the generated text use a second person?" If even one sentence does not use the second person, the answer should NOT be 'YES'. To qualify for a 'YES' rating, the generated text must be entirely accurate and relevant to the question.
- NO: Opt for 'NO' if the generated text fails to meet the question's requirements or provides no information that could be utilized to answer the question. For instance, if the question asks, "Is the second sentence in the generated text a compound sentence?" and the generated text only has one sentence, it offers no relevant information to answer the question. Consequently, the answer should be 'NO'."
# Input:
"The typical avocado is over 300 calories from the oil in it. That's the amount of calories in a large candy bar. If you get enough exercise to eat a large candy bar every day without gaining weight, it wouldn't be a problem to eat an avocado every day. Other wise you should probably eat them sparingly."
# Generated Text:
"Avocados: A Calorie-Dense Treat to Enjoy in Moderation"
# Question:
Is the generated text a post title?
# <Assistant>:
# YES
# <User>:
# Question:
Is the generated text appealing as a post tile?
# <Assistant>:
# YES
# <User>:
# Question:
Is the generated post title suitable for the post in the given input?
# <Assistant>:
# YES
Table 7: Example of the multi-turn prompt for automatic evaluation with GPT-4. The "Generated Text" is from Gemini-Pro.
Guideline
Thank you for participating in this study!
You will be reviewing a set of text examples. Each example consists of two parts: Input (a command given to a computer system) and Generated Text (the system's response). Five different systems, named A, B, C, D, and E, have produced these responses. After reviewing each example, you'll be asked to answer a few questions about it. The answers will be either YES, NO or UNKNOWN, based on your evaluation and the following guidelines:
- YES: Select 'YES' if the system's response entirely fulfills the condition specified in the question. Even tiny mistakes mean you cannot select 'YES'. - NO: Choose 'NO' if the system's response does not meet the question's requirements, or if it doesn't provide the necessary information to answer the question. - UNKNOWN: Choose 'UNKNOWN' if you lack the knowledge to accurately determine whether the system's response meets the question's requirements. Feel free to use the internet for additional help in making your decision.
Hint: Here are a few examples of how to answer the questions:
# Input:
Write a list of 5 adjectives, at least three of which should come from Latin.
# Generated Text (System's Response):
1.Precious 2.Delightful 3.Playful 4. Flower 5.Vivacious
Question 1: Does the generated text contain exactly 5 words?
$\odot$ YES $\bigcirc$ NO $\bigcirc$ UNKNOWN
Question 2: Are all the words in the generated text adjectives?
YES NO UNKNOWN
Question 3: Do at least 3 words in the generated text come from Latin?
YES NO UNKNOWN
 Figure 6: Interface used in Amazon Mechanical Turk
Input:

Generated Text A (System's Response A):
${outputA}
Question 1: ${Questions}
$\bigcirc$ YES $\bigcirc$ NO $\bigcirc$ UNKNOWN
<table><tr><td>Model</td><td>Easy Set</td><td>Hard Set</td><td>Overall</td></tr><tr><td>gpt-4-1106-preview</td><td>85.7</td><td>85.4</td><td>85.5</td></tr><tr><td>gpt-3.5-turbo-1106</td><td>82.5</td><td>81.2</td><td>81.6</td></tr><tr><td>claude-2.1</td><td>77.5</td><td>81.9</td><td>80.5</td></tr><tr><td>gemini-pro</td><td>79.7</td><td>80.2</td><td>80.1</td></tr><tr><td>Llama-2-70b-chat</td><td>84.5</td><td>77.6</td><td>79.7</td></tr><tr><td>Vicuna-13b-v1.5</td><td>79.1</td><td>69.5</td><td>72.4</td></tr></table>
Table 8: Automated DRFR powered by gpt-4-1106-preview for six selected LLMs on the INFOBENCH.
 Figure 7: Radar plot illustrating the comparative efficacy of various Large Language Models (LLMs) across different constraint types, evaluated using gpt-4-1106-preview.
 Figure 8: Radar plot demonstrating the performance of LLMs in diverse domains, as assessed by gpt-4-1106-preview.
 Figure 9: Distribution of disagreement levels among annotators. The x-axis represents the level of disagreement among three annotators, while the y-axis indicates the distribution of questions corresponding to each disagreement level.
In this case, the LLM's generation simply reiterates the instruction and does not produce an actual eviction notice. Despite this, the inclusion of the phrase 'tenant's name: John Smith' can mislead GPT-4 into assuming that it has correctly completed the task.
2) Requirements necessitating numerical computation or counting. Consider the following instances:
Instruction: Generate a random alphanumeric string with exactly 20 characters.
Question: Does the generated string exactly include 20 characters?
Generation: Here is a 20 character random alphanumeric string:
a3k92j7h6r5t1c4b8
Correct Answer: NO.
GPT-4 Answer: YES.
In the illustrated case, GPT-4 is unsuccessful in accurately counting a sequence of 20 characters.
Instruction: Describe a landscape painting from three distinct layers: foreground, middle ground, and background. Include at least two types of trees, a body of water, and a mountain range. Use a limited color palette of no more than four colors to create harmony, and specify which natural elements correspond to each color. Additionally, provide a description of the textures and brushstrokes used to represent the different natural elements.
Question: Does the painting described by the generated text include at least two types of trees, a body of water, and a mountain range?
Generation: A landscape painting with a foreground of trees and shrubs, a middle ground of rolling hills and a lake, and a background of mountains and trees. The colors used are blues, greens, and oranges to represent the different elements. Soft brushstrokes are used to create a realistic texture of the landscape, while a more bold brushstroke is used to create the mountains.
Correct Answer: NO.
GPT-4 Answer: YES.
Similarly, when tasked with identifying and enumerating two distinct types of trees, GPT-4 may incorrectly categorize repeated references to trees as unique types.
3) The prerequisite for a specific requirement is not met. For instance,
Instruction: Please provide five unique first date night ideas, with each catering to different interests and budgets. Include an estimated cost for each idea, along with a brief description of the activity and why it might be appealing to different types of people.
Question: Does each idea in the generated text stand out as unique, each one catering to different budget ranges?
Generation: 1. A picnic in the park - This is a classic first date idea that is sure to impress. It's budget-friendly and can be customized to fit your interests, whether you want to pack a basket with gourmet snacks or bring a Frisbee to play catch. The cost of a picnic in the park can vary depending on what you bring, but it's generally a very affordable option.
2. Art museum visit - If you and your date are into art, a visit to a local museum can be a great first date idea. Many museums have free admission days, so it won't break the bank. This activity can lead to interesting conversations and can be a great way to get to know each other better.
3. Hiking or biking - If you and your date are outdoorsy, a hike or bike ride
can be a fun and unique first date idea. Depending on the location, this activity can range from moderate to intense, so it's important to choose a route that is suitable for both of you. The cost of this activity will depend on the equipment you need to rent, if any.
4. Cooking class - If you and your date love to cook or want to learn, a cooking class can be a great first date idea. Many cooking classes are held in the evening, so it can be a fun and unique way to spend an evening together. The cost of a cooking class can vary depending on the location and the class, but it's generally a more expensive option. 5. Board game cafe - If you and your date are looking for a low-key, indoor activity, a visit to a board game cafe can be a fun and unique first date idea. Many board game cafes have a wide selection of games to choose from, so you can find something that suits your interests. The cost of this activity will depend on how much you spend on food and drinks, but it's generally a more affordable option than a traditional dinner date.
Correct Answer: NO.
GPT-4 Answer: YES.
In this illustration, the generated output fails to satisfy the requirement set forth in the instructions to 'include an estimated cost for each idea'. As a result, the generated output does not provide sufficient information to address the question with the requirement 'each one catering to different budget ranges'.
4) Requisite Spatial Reasoning Constraints. For illustration, consider the following:
Instruction: The objective of the Item Elimination Game is to eliminate items in a 6x6 grid by aligning 3 or more of the same item consecutively in a row or column.
Here are the rules:
1. The grid consists of 6 rows and 6 columns, with each cell containing one of three different items represented by $A$ , $B$ , or $C$ . 2. In each step, you may remove items in several cells, provided that they form a
consecutive sequence of 3 or more of the same item in the same row or column.
3. Once the item in a cell is removed, it leaves a blank cell, represented by "#".
Based on the rules, you should generate a 6x6 grid filled with 3 different kinds of items (A, B, and C) as the initial setup and play the game for one step: If you can identify items that form a sequence of 3 or more of the same item in a row or column, leaving blank cells ("#") in their place and generating the resulting grid; if you cannot find such a sequence, explain it.
Question: Does the generated text include a 6x6 grid as the initial step?
Generation: Here is the initial 6x6 grid filled with 3 different kinds of items (A, B, and C):
"diff
ABC
ABC
ABC
ABC
ABC
ABC
“
After one step of the game, the grid should look like this:
"diff
ABC
ABC
ABC
ABC
ABC
ABC
#
“
The sequence of 3 or more of the same item that was eliminated is not possible in this case, as there are no consecutive sequences of 3 or more of the same item in the same row or column.
Correct Answer: NO.
GPT-4 Answer: YES.
Within this exemplar, the instruction necessitates the generation of a '6x6 grid'. The generation proclaims 'Here is the initial 6x6 grid', yet the rendered grid does not correspond to the stipulated 6x6 dimensions. This instance thus necessitates spatial reasoning proficiency to accurately evaluate whether the produced grid adheres to the 6x6 specification, rather than relying solely on textual interpretation. Being a language model, GPT-4 might demonstrate limitations in spatial reasoning capabilities.
5) The requisite condition remains partially unfulfilled. For instance, consider the following example:
Instruction: Design a 7-day challenge for individuals looking to explore a new hobby: painting. Each day should include a specific task and a difficulty level. The activities should progress in difficulty. Include a brief description (20-30 words) for each day's task.
Question: Does every single day of the challenge in the generated text incorporate a particular task along with a corresponding level of difficulty?
Generation: Day 1: Start with a blank canvas and a painting medium of your choice. Begin with a simple painting task, such as tracing a design or painting a color wheel.
Day 2: Paint a landscape or other outdoor scene using light brushstrokes.
Day 3: Paint a portrait or figure using a photo as reference.
Day 4: Experiment with abstract art by painting with different materials or using mixed media.
Day 5: Create a pattern or design by painting repeating shapes or lines.
Day 6: Paint a still life or indoor scene using shadow and light.
Day 7: Create a composition using multiple colors and textures.
Correct Answer: NO.
GPT-4 Answer: YES.
In the given scenario, the question necessitates a response containing 'a specific task along with a corresponding degree of difficulty'. The generated output successfully encapsulates 'a specific task', albeit fails to adhere to the secondary part of the
requirement, that is to incorporate 'a corresponding degree of difficulty'.
# A.6 Case Study
As highlighted in section 4, all models exhibit their lowest performance on Number and Linguistic constraints. Consequently, we selected two specific instructions embodying these constraints for a detailed case study. This section presents the instructions, the related decomposed questions, the responses generated by six chosen models, and the annotation results from GPT-4-0314, GPT-4-1106, as well as expert assessments for the Yes/No responses to all decomposed questions. This analysis aims to provide an intuitive understanding of how each model struggles with the given instructions. For an exhaustive dataset and the complete outputs for all instructions from the six models, please consult our GitHub repository.
Tables 9 to 11 focus primarily on the number constraint. These tables reveal that none of the models fully satisfied the 4th and 5th constraints regarding numbers. This underperformance in the Number category highlights the inherent challenges in numerical reasoning across all LLMs. Specifically, generating a DNA sequence while maintaining the proportion of purines and pyrimidines is complex. Moreover, ensuring equal representation of the four nucleotide types while maintaining this proportion is particularly challenging due to their somewhat contradictory nature.
Tables 12 to 13 are dedicated to the linguistic constraint. In this case, none of the models completely satisfied the 3rd and 4th Linguistic constraints. Notably, GPT-4-1106 demonstrated a commendable attempt to adhere to the "begin with the last letter of the previous word" rule, successfully applying it to most words, albeit compromising the clarity of the plot description (yet still aligning broadly with the Star Wars theme). In contrast, the other models did not seem to attempt this complex task. The suboptimal results in the Linguistic category likely stem from the unique design of our constraints. While LLMs excel in generating grammatically correct and coherent text, they were not optimized for the atypical linguistic patterns introduced by our constraints, like requiring each word to begin with the last letter of the preceding word in this example. Given that most LLMs are trained to predict subsequent words or characters based on conventional linguistic patterns, they struggle when asked to produce content that deviates markedly from these norms.
<table><tr><td colspan="5">ID: domain-oriented_task_31; Category: Natural Sciences: Biology</td></tr><tr><td colspan="5">Instruction: Generate a double-stranded DNA consisting of 24 nucleotides in each strand, with an equal number of adenine (A), thymine (T), cytosine (C), and guanine (G) nucleotides. For every 6 nucleotides in the first strand, the first 3 should have a higher proportion of purines (A and G), while the last 3 should have a higher proportion of pyrimidines (C and T). The second strand should be complementary to the first strand, following the base pairing rules (A pairs with T, and C pairs with G).</td></tr><tr><td colspan="5">Decomposed Questions:1. Is the generated sequence a double-stranded DNA? (Format)2. Does each strand of the generated double-stranded DNA consist of 24 nucleotides? (Number)3. In the generated double-stranded DNA, is there an equal number of adenine (A), thymine (T), cytosine (C), and guanine (G) nucleotides? (Number)4. For every set of 6 nucleotides in the first strand of the generated double-stranded DNA, do the first 3 have a higher proportion of purines (A and G)? (Number)5. For every set of 6 nucleotides in the first strand of the generated double-stranded DNA, do the last 3 have a higher proportion of pyrimidines (C and T)? (Number)6. Is the second strand of the generated double-stranded DNA complementary to the first strand, adhering to the base pairing rules where adenine (A) pairs with thymine (T), and cytosine (C) pairs with guanine (G)? (Format)</td></tr><tr><td>Model-Name</td><td>Model-Generation</td><td>GPT-4-0314Annotation</td><td>GPT-4-1106-Annotation</td><td>Expert-Annotation</td></tr><tr><td>GPT-4-1106</td><td colspan="2">To create a double-stranded DNA with the specified conditions, we need to ensure that the first strand has an equal number of each nucleotide (A, T, C, G) and that every 6-nucleotide segment starts with a purine-rich triplet followed by a pyrimidine-rich triplet. The second strand will be complementary to the first.Here's an example of such a DNA sequence:First strand (5' to 3'):AGCCTAGTCGACTAGCTAGCCGATSecond strand (3' to 5', complementary to the first strand): TCGGATCAGCTGATCGATCGGCTABreaking down the first strand into 6-nucleotide segments, we have:- AGCCTA (purine-rich: AG, pyrimidine-rich: CTA)- GTCGAC (purine-rich: GT, pyrimidine-rich: CGA)- TAGCTA (purine-rich: TA, pyrimidine-rich: GCT)- GCCGAT (purine-rich: GC, pyrimidine-rich: GAT)Each segment starts with a higher proportion of purines (A and G) and ends with a higher proportion of pyrimidines (C and T). The second strand is the perfect complement to the first, following the base pairing rules (A with T and C with G).</td><td>[Yes, Yes, No, Yes, Yes]</td><td>[Yes, Yes, No, Yes, No, Yes]</td></tr><tr><td>gpt-3.5-turbo-1106</td><td>First strand:5'- AAGCTTCCGGAATTCCGGAAGCTT -3'Second strand:3'- TTCGAAGGCCTTAAGGCCTTCGAA -5'</td><td>[Yes, Yes, No, Yes, No, Yes]</td><td>[Yes, Yes, False, No, No, Yes]</td><td>[Yes, Yes, Yes, No, No, Yes]</td></tr></table>
Table 9: Model Generation Example 1.
<table><tr><td>claude-2.1</td><td>Here is a randomly generated 24 nucleotide double-stranded DNA sequence with the requested properties: Strand 1: AGGCTA CTTAGC GGAATC TTCGCA Strand 2: TCCGAT GAATCG CCTTAG AAGCGT</td><td>[Yes, Yes, No, Yes, Yes, Yes]</td><td>[Yes, Yes, No, Yes, No, Yes]</td><td>[Yes, Yes, Yes, No, No, Yes]</td></tr><tr><td>gemini-pro</td><td>"Strand 1 (5' to 3'):**Purine-rich region:** - AGTACG**Pyrimidine-rich region:** - TCGAAT**Purine-rich region:** - AGCTAC**Pyrimidine-rich region:** - TCGATT Strand 2 (3' to 5'):**Pyrimidine-rich region:** - TCGAAT**Purine-rich region:** - AGCTAC**Pyrimidine-rich region:** - TCGATT**Purine-rich region:** - AGTACG"</td><td>[Yes, No, No, Yes, Yes, No]</td><td>[Yes, No, No, Yes, No, No]</td><td>[Yes, Yes, No, No, No, No]</td></tr></table>
Table 10: Model Generation Example 1. (continued)
<table><tr><td>vicuna-13b-v1.5</td><td>Here is a possible double-stranded DNA sequence that meets the given criteria: First strand: ATCGGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCAGTCTCTCTG Strand 1: ATCGGCTCTGCAGAGTCTCTG Strand 2: TGCAGGCTCTAGCTCTGCAGT In Strand 1, the first 3 nucleotides (ATC) have a higher proportion of purines, while the last 3 nucleotides (GCT) have a higher proportion of pyrimidines. This pattern is repeated every 6 nucleotides. Strand 2 is complementary to Strand 1, following the base pairing rules. The first 3 nucleotides (TGC) pair with the last 3 nucleotides of Strand 1 (GCT), while the last 3 nucleotides (AGT) pair with the first 3 nucleotides of Strand 1 (ATC). I hope this helps! Let me know if you have any further questions.</td><td>[Yes, No, No, Yes, Yes, No]</td><td>[Yes, No, No, No, No]</td><td>[No, No, No, No, No]</td></tr></table>
Table 11: Model Generation Example 1. (continued)
<table><tr><td colspan="5">ID: domain_oriented_task_0; Category: Arts: Film</td></tr><tr><td colspan="5">Instruction: Generate a sentence that describes the plot of Star Wars, where each word begins with the end letter of the previous word, and the set of beginning letters of all words in the sentence covers every letter in the alphabet from A to Z.</td></tr><tr><td colspan="5">Decomposed Questions:1. Is the generated text a sentence? (Format, Number)2. Does the generated text describe the plot of Star Wars? (Content)3. In the generated sentence, does each word begin with the last letter of the pre-vious word? (Linguistic)4. In the generated sentence, do the be-ginning letters of all words collectively cover every letter in the English alphabet from A to Z? (Linguistic)</td></tr><tr><td>Model-Name</td><td>Model-Generation</td><td>GPT-4-0314Annotation</td><td>GPT-4-1106-Annotation</td><td>Expert-Annotation</td></tr><tr><td>GPT-4-1106</td><td>Anakin's saga advances, securing galactic control, leaving legions stormtrooping, gaining ground, destroying galaxies, securing Sith's supremacy, yet triumphing, gaining new wisdom, mastering galactic conflicts, saving generations, securing eternal equilibrium.</td><td>[Yes, Yes, Yes, No]</td><td>[No, No, Yes, No]</td><td>[Yes, Yes, No, No]</td></tr><tr><td>gpt-3.5-turbo-1106</td><td>A long time ago, in a galaxy far, far away, Yoda and Anakin navigated through the stars, searching for Sith, hoping to overthrow the evil empire, eventually leading to the destruction of the Death Star, bringing peace to the galaxy.</td><td>[Yes, Yes, No, No]</td><td>[Yes, Yes, No, No]</td><td>[Yes, Yes, No, No]</td></tr><tr><td>claude-2.1</td><td>Here is an attempt at a 26-word sentence for the plot of Star Wars with each word chaining on the previous word's last letter:A long time ago in a galaxy far, far away, rebels battle an evil empire's death star space station. Quietly, a young man named Luke trains to become a Jedi knight under Obi-Wan's guidance. X-wings attack the station, which explodes spectacularly. Luke and friends triumph glo-riously, though Darth Vader escapes narrowly. Victory comes at a cost for the alliance bravely fighting imperial oppression zealously.</td><td>[No, Yes, No, No]</td><td>[No, Yes, No, No]</td><td>[No, Yes, No, No]</td></tr><tr><td>gemini-pro</td><td>Zealous Jedi Knights battle menacing Sith Lords, causing galactic unrest.</td><td>[Yes, Yes, No, No]</td><td>[Yes, Yes, No, No]</td><td>[Yes, Yes, No, No]</td></tr><tr><td>vicuna-13b-v1.5</td><td>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z: A young farm boy, Luke Skywalker, joins forces with a rogue smuggler, Han Solo, and a strong-willed princess, Leia Organa, to destroy a powerful space station, the Death Star, and save the galaxy from the evil Empire's clutches, ultimately leading to a climactic battle between good and evil.</td><td>[Yes, Yes, No, No]</td><td>[Yes, Yes, No, No]</td><td>[Yes, Yes, No, No]</td></tr></table>
Table 12: Model Generation Example 2.
<table><tr><td>Llama-2-70b-chat-hf</td><td>Sure! Here's a sentence that describes the plot of Star Wars using your criteria:</td><td>[No, Yes, No, No]</td><td>[No, Yes, No, No]</td><td>[Yes, Yes, No, No]</td></tr><tr><td></td><td>A long time ago, in a galaxy far, far away, a brave Alliance pilot named Luke Skywalker, skilled in the ways of the Force, embarked on a daring mission to rescue Princess Leia from the evil Empire's dreaded Death Star, fighting off fierce stormtroopers and dodging laser blasts along the way.</td><td></td><td></td><td></td></tr><tr><td></td><td>Here's how the sentence covers every letter of the alphabet from A to Z:</td><td></td><td></td><td></td></tr><tr><td></td><td>A - A</td><td></td><td></td><td></td></tr><tr><td></td><td>B - Brave</td><td></td><td></td><td></td></tr><tr><td></td><td>C - Cunning</td><td></td><td></td><td></td></tr><tr><td></td><td>D - Daring</td><td></td><td></td><td></td></tr><tr><td></td><td>E - Empire's</td><td></td><td></td><td></td></tr><tr><td></td><td>F - Fierce</td><td></td><td></td><td></td></tr><tr><td></td><td>G - Galaxy</td><td></td><td></td><td></td></tr><tr><td></td><td>H - Heroic</td><td></td><td></td><td></td></tr><tr><td></td><td>I - In</td><td></td><td></td><td></td></tr><tr><td></td><td>J - Jedi</td><td></td><td></td><td></td></tr><tr><td></td><td>K - Killer</td><td></td><td></td><td></td></tr><tr><td></td><td>L - Laser</td><td></td><td></td><td></td></tr><tr><td></td><td>M - Mission</td><td></td><td></td><td></td></tr><tr><td></td><td>N - Nimble</td><td></td><td></td><td></td></tr><tr><td></td><td>O - Offensive</td><td></td><td></td><td></td></tr><tr><td></td><td>P - Pilot</td><td></td><td></td><td></td></tr><tr><td></td><td>Q - Quest</td><td></td><td></td><td></td></tr><tr><td></td><td>R - Rescue</td><td></td><td></td><td></td></tr><tr><td></td><td>S - Skilled</td><td></td><td></td><td></td></tr><tr><td></td><td>T - Threatening</td><td></td><td></td><td></td></tr><tr><td></td><td>U - Universe</td><td></td><td></td><td></td></tr><tr><td></td><td>V - Valiant</td><td></td><td></td><td></td></tr><tr><td></td><td>W - Ways</td><td></td><td></td><td></td></tr><tr><td></td><td>X - X-wing</td><td></td><td></td><td></td></tr><tr><td></td><td>Y - Yoda</td><td></td><td></td><td></td></tr><tr><td></td><td>Z - Zealous</td><td></td><td></td><td></td></tr><tr><td></td><td>I hope that helps!</td><td></td><td></td><td></td></tr></table>
Table 13: Model Generation Example 2. (continued)123version https://git-lfs.github.com/spec/v1oid sha256:8a28c5a780abd7aa8e955e10826163d9b1f5b658705dd382395208ac09a2dd55size 1455136123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455[ { "type": "text", "text": "Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models", "text_level": 1, "bbox": [ 147, 90, 850, 130 ], "page_idx": 0 }, { "type": "text", "text": "Hiroshi Kanayama, Yang Zhao, Ran Iwamoto, Takuya Ohko", "bbox": [ 233, 156, 763, 174 ], "page_idx": 0 }, { "type": "text", "text": "IBM Research", "bbox": [ 438, 175, 559, 189 ], "page_idx": 0 }, { "type": "text", "text": "{hkana@jp., YangZhao@, ran.iwamoto1@, ohkot@jp.}ibm.com", "bbox": [ 220, 191, 776, 209 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 260, 260, 341, 275 ], "page_idx": 0 }, { "type": "text", "text": "This paper exploits a sentiment extractor supported by syntactic and lexical resources to enhance multilingual sentiment classification solved through the generative approach, without retraining LLMs. By adding external information of words and phrases that have positive/negative polarities, the multilingual sentiment classification error was reduced by up to 33 points, and the combination of two approaches performed best especially in high-performing pairs of LLMs and languages.", "bbox": [ 141, 290, 460, 447 ], "page_idx": 0 }, { "type": "text", "text": "1 Introduction", "text_level": 1, "bbox": [ 114, 460, 260, 475 ], "page_idx": 0 }, { "type": "text", "text": "The generative approach using Large Language Models (LLMs) performs very well even for nongenerative tasks such as topic classification (Brown et al., 2020) and sentiment polarity judgment (Zhao et al., 2023). LLMs have garnered attention, particularly for their capability to generalize languages in addressing those tasks without the need for task-specific training using ground truth. Many tasks can be solved in a zero-shot manner by providing appropriate prompts. However, the language coverage highly depends on LLMs, and the accuracy can be quite low if the model received insufficient training or tuning on specific languages. Retraining LLMs requires a high cost to cover additional languages, and it tends to cause catastrophic forgetting in languages that have already been covered (Winata et al., 2023). In recent attempts at knowledge editing, difficulties such as knowledge conflicts have been pointed out (Li et al., 2023), and it is not easy to apply to many languages.", "bbox": [ 112, 486, 489, 808 ], "page_idx": 0 }, { "type": "text", "text": "Thus, we attempt to enhance multilingual sentiment classification based on the generative approach without computationally intensive processes for retraining and tuning LLMs. As depicted in Figure 1, our approach obtains lexical and syntactic information from an external sentiment extractor and inserts it into the prompt. This approach", "bbox": [ 112, 809, 489, 921 ], "page_idx": 0 }, { "type": "image", "img_path": "images/611df3fce3c7ece415e14d3471eb2ec6c4cbe4874ff66c19e2fa378baa5f843b.jpg", "image_caption": [ "Figure 1: Concept of sentiment extraction using the prompt supported by an external sentiment extractor." ], "image_footnote": [], "bbox": [ 512, 244, 870, 355 ], "page_idx": 0 }, { "type": "text", "text": "requires knowledge specific to tasks and languages but has advantages such as stability of outputs and controllability to add arbitrary knowledge to adapt to new languages or domains.", "bbox": [ 507, 413, 882, 476 ], "page_idx": 0 }, { "type": "text", "text": "The contributions of this paper are threefold: (1) to integrate syntactic and lexical knowledge with prompts for LLMs, (2) to evaluate sentiment classification using six publicly available LLMs and parallel data in 15 languages, and (3) to demonstrate the positive impacts by integrating two components without any retraining.", "bbox": [ 507, 478, 884, 590 ], "page_idx": 0 }, { "type": "text", "text": "2 Related Work", "text_level": 1, "bbox": [ 507, 601, 665, 615 ], "page_idx": 0 }, { "type": "text", "text": "2.1 Multilingual Sentiment Extraction", "text_level": 1, "bbox": [ 507, 626, 826, 642 ], "page_idx": 0 }, { "type": "text", "text": "This paper exploits a multilingual sentiment extraction method based on syntactic analysis and lexicon (Kanayama and Iwamoto, 2020). The extractor applies grammatical rules and a lexical dictionary to the common syntactic structure across languages defined by Universal Dependencies (UD) (Zeman and et al., 2017), and it extracts positive and negative phrases for many languages with high precision (although recall tends to be low for lower-resource languages), taking valence shifting such as negation into consideration.", "bbox": [ 505, 646, 884, 822 ], "page_idx": 0 }, { "type": "text", "text": "Note that the sentiment extractor may detect one or more polar expressions from a single sentence or may not output anything when there is no explicit expression detected, and thus it does not directly solve the task of sentence-level sentiment classification discussed in Section 3.", "bbox": [ 507, 825, 885, 920 ], "page_idx": 0 }, { "type": "page_number", "text": "4810", "bbox": [ 480, 927, 521, 940 ], "page_idx": 0 }, { "type": "footer", "text": "Findings of the Association for Computational Linguistics: ACL 2024, pages 4810-4817", "bbox": [ 228, 945, 768, 957 ], "page_idx": 0 }, { "type": "footer", "text": "August 11-16, 2024 ©2024 Association for Computational Linguistics", "bbox": [ 284, 958, 712, 971 ], "page_idx": 0 }, { "type": "text", "text": "2.2 Text Classification via Reasoning", "text_level": 1, "bbox": [ 112, 84, 418, 99 ], "page_idx": 1 }, { "type": "text", "text": "Sun et al. (2023) proposed a prompting method, CARP, that enhances text classification by encouraging models to conduct reasoning. In CARP, a command to list words with polarity is added to the prompt, and it asks the model to describe the reason for classification. This strategy increased the accuracy of sentiment classification in most datasets.", "bbox": [ 112, 105, 487, 233 ], "page_idx": 1 }, { "type": "text", "text": "In this paper, as shown in Figure 1, external knowledge is integrated into the prompt given to LLMs instead of relying solely on the knowledge embedded in LLMs. This approach enables us to broaden the language coverage and observe the characteristics of each LLM and the capability of knowledge extension using external components.", "bbox": [ 112, 236, 485, 348 ], "page_idx": 1 }, { "type": "text", "text": "3 Sentiment Classification using Generative Model", "text_level": 1, "bbox": [ 112, 363, 408, 395 ], "page_idx": 1 }, { "type": "text", "text": "This section describes the method to predict sentence polarity using an LLM and our proposal to integrate the output of an external sentiment extractor with a prompt.", "bbox": [ 112, 407, 489, 472 ], "page_idx": 1 }, { "type": "text", "text": "3.1 Prompting", "text_level": 1, "bbox": [ 112, 486, 245, 501 ], "page_idx": 1 }, { "type": "text", "text": "The task is binary classification of an input sentence into POSITIVE or NEGATIVE. Here we provide the following English prompt<sup>1</sup> to an LLM, in a zero-shot manner without providing labeled examples.", "bbox": [ 112, 508, 487, 571 ], "page_idx": 1 }, { "type": "text", "text": "Classify the next [lang] sentence into POSITIVE or NEGATIVE. Please just answer the label. input: [input sentence] output:", "bbox": [ 119, 587, 495, 650 ], "page_idx": 1 }, { "type": "text", "text": "[lang] is filled with the language name such as \"Arabic\" and \"Japanese\". Then we expect the model generates either POSITIVE or NEGATIVE after \"output:\".", "bbox": [ 112, 670, 487, 733 ], "page_idx": 1 }, { "type": "text", "text": "3.2 Integration with Sentiment Extractor", "text_level": 1, "bbox": [ 112, 747, 453, 762 ], "page_idx": 1 }, { "type": "text", "text": "To enhance the LLM's decision, when the sentiment extractor detects a polar expression, we insert a hint into the prompt between the 'input' and 'output' lines<sup>2</sup>.", "bbox": [ 112, 770, 487, 833 ], "page_idx": 1 }, { "type": "text", "text": "hint: \"[word]\" is a(n) [lang] word which has a [polarity] meaning.", "bbox": [ 519, 83, 870, 115 ], "page_idx": 1 }, { "type": "text", "text": "[word] is the surface form of the word that was detected to have a polarity, and [polarity] is \"positive\" or \"negative\". For example, from a Chinese sentence \"我們很失望,...\", the sentiment extractor detects the negative verb \"失望\" ('be disappointed') through syntactic parsing and dictionary lookup, then the line", "bbox": [ 507, 122, 882, 235 ], "page_idx": 1 }, { "type": "text", "text": "hint: “失望” is a Chinese word which has a negative meaning.", "bbox": [ 534, 239, 848, 271 ], "page_idx": 1 }, { "type": "text", "text": "is inserted in the prompt. If multiple polar expressions are detected, multiple lines are added. When a polar expression consists of multiple words (e.g. negation), a “phrase” is added as a hint. Refer to Appendix A.1 for its prompt.", "bbox": [ 507, 275, 882, 357 ], "page_idx": 1 }, { "type": "text", "text": "4 Experimental Settings", "text_level": 1, "bbox": [ 507, 368, 734, 384 ], "page_idx": 1 }, { "type": "text", "text": "4.1 Data Set", "text_level": 1, "bbox": [ 507, 393, 623, 407 ], "page_idx": 1 }, { "type": "text", "text": "For evaluation of multilingual sentiment classification, we use Parallel Sentiment<sup>3</sup>. It consists of 106 parallel sentences (a subset of 1,000 sentences in the Parallel UD (PUD) corpora) for 19 languages annotated with positive or negative labels common for all languages, enabling us to evaluate the multilingual task with equal difficulty. We test in 15 languages that the sentiment extractor supports.", "bbox": [ 507, 414, 882, 542 ], "page_idx": 1 }, { "type": "text", "text": "4.2 Language Models", "text_level": 1, "bbox": [ 507, 552, 695, 569 ], "page_idx": 1 }, { "type": "text", "text": "We compare six LLMs that have diverse encoder-decoder architectures, language coverage in fine tuning, and model sizes.", "bbox": [ 507, 573, 882, 621 ], "page_idx": 1 }, { "type": "list", "sub_type": "text", "list_items": [ "- T5 (google/flan-t5-xxl) (Chung et al., 2024): The encoder-decoder model T5 with instruction tuning on 1,800 tasks that covers 60 languages (11 billion parameters).", "- UL2 (google/flan-ul2) (Wei et al.): The encoder-decoder model UL2 with instruction tuning (20b).", "- MT0 (bigscience/mt0-xxl) (Muennighoff et al., 2022): Multilingual T5 model with instruction tuning on 46 languages (13b).", "- Llama2 (meta-llama/llama-2-70b-chat) (Touvron et al., 2023): Decoder model Llama tuned for chat (70b). 90 percent of the pretraining data was English." ], "bbox": [ 531, 631, 882, 885 ], "page_idx": 1 }, { "type": "page_footnote", "text": "${}^{3}$ Distributed at https://1rec2020.lrec-conf.org/en/ shared-lrs/.", "bbox": [ 509, 894, 882, 919 ], "page_idx": 1 }, { "type": "page_footnote", "text": "1 Prompts in the target language may work better, but in this paper, we always use English prompts to fairly compare the languages without concerning about the prompt quality in each language.", "bbox": [ 112, 846, 485, 894 ], "page_idx": 1 }, { "type": "page_footnote", "text": "2 Empirically this place is better than inserting 'hint' line before 'input' line.", "bbox": [ 112, 894, 485, 920 ], "page_idx": 1 }, { "type": "page_number", "text": "4811", "bbox": [ 480, 928, 517, 940 ], "page_idx": 1 }, { "type": "table", "img_path": "images/0e3acdd866095c6afa1ad4c441eb312e3b0ad304f1097756cbe9ac5dcd8a5c8f.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Model</td><td>Base</td><td>Hints</td><td>Override</td></tr><tr><td>No LLM</td><td>35.4</td><td></td><td>69.4</td></tr><tr><td>T5</td><td>68.5</td><td>78.6</td><td>78.6</td></tr><tr><td>UL2</td><td>73.9</td><td>75.2</td><td>80.2</td></tr><tr><td>MT0</td><td>68.8</td><td>79.2</td><td>80.7</td></tr><tr><td>Llama2</td><td>92.6</td><td>93.7</td><td>93.3</td></tr><tr><td>Mixtral</td><td>91.1</td><td>93.6</td><td>93.1</td></tr><tr><td>Llama3</td><td>95.7</td><td>96.6</td><td>95.9</td></tr></table>", "bbox": [ 154, 80, 448, 218 ], "page_idx": 2 }, { "type": "text", "text": "Table 1: Macro F1 scores of sentiment classification averaged in 15 languages. Bold letters show the highest score in each row and the underlined number is the highest in all cases.", "bbox": [ 112, 225, 489, 285 ], "page_idx": 2 }, { "type": "list", "sub_type": "text", "list_items": [ "- Mixtral (mistralai/mixtral-8x7b-instruct-v01) (Jiang et al., 2024): The model composed from mixture of multiple expert models and tested on multiple European languages (45b).", "- Llama3 (meta-llama/llama-3-70b-instruct) (AI@Meta, 2024): The latest Llama model with instruction tuning. Though English accounts for 95 percent of the pretraining data, the bigger data and the larger vocabulary size support multilinguality (70b)." ], "bbox": [ 136, 306, 489, 492 ], "page_idx": 2 }, { "type": "text", "text": "For all models, the answer is generated in a greedy decoding setting with the minimum and maximum token numbers set to 1 and 10, respectively. The MTO model tends to output POSITIVE in most cases, so we adjusted the prompt as shown in Appendix A.2 to balance the prediction.", "bbox": [ 112, 500, 489, 596 ], "page_idx": 2 }, { "type": "text", "text": "4.3 Sentiment Extractor", "text_level": 1, "bbox": [ 112, 606, 322, 621 ], "page_idx": 2 }, { "type": "text", "text": "We used the sentiment extractor's outputs for the Parallel Sentiment data set obtained from Kanayama and Iwamoto (2020) on request, and distribute them as supplemental material so that the entire experiments are reproducible. The detected sentiment words and phrases are associated with detailed syntax structures in CoNLL-U format processed by StanfordNLP (Qi et al., 2018), which helped improve the sentiment extraction process even beyond the gold annotations in PUD<sup>4</sup>.", "bbox": [ 112, 627, 489, 788 ], "page_idx": 2 }, { "type": "text", "text": "5 Experimental Results", "text_level": 1, "bbox": [ 112, 799, 334, 815 ], "page_idx": 2 }, { "type": "text", "text": "5.1 Overall Quality", "text_level": 1, "bbox": [ 112, 822, 284, 839 ], "page_idx": 2 }, { "type": "text", "text": "Table 1 shows the overall results averaged across 15 languages. All numbers represent the macro F1", "bbox": [ 112, 844, 487, 876 ], "page_idx": 2 }, { "type": "text", "text": "score of the binary sentiment classification. The weakest baseline, 35.4, corresponds to always predicting NEGATIVE<sup>5</sup> without utilizing the LLM or the sentiment extractor. A score of 69.4 was obtained by using only the sentiment extractor: answering the polarity of the sentiment expression closest to the main clause in the sentence when one or more sentiment expressions are detected<sup>6</sup>.", "bbox": [ 507, 84, 884, 212 ], "page_idx": 2 }, { "type": "text", "text": "Next, the six models are compared. The column labeled 'Base' shows the scores of classification using the prompt outlined in Section 3.1. The smaller models, T5, UL2, and MT0, achieve scores around 70, while the larger models show much higher scores over 90, such as 95.7 in Llama3.", "bbox": [ 507, 212, 884, 307 ], "page_idx": 2 }, { "type": "text", "text": "The column labeled 'Hints' shows the results when the additional hints described in Section 3.2 are incorporated. By adding this information, scores increased by more than 10 points in the T5 and MT0 models, and that means $33\\%$ of errors were reduced in MT0. The absolute differences were smaller in some other models, but it is notable that $21\\%$ of errors were reduced even from the very high score in the 'Base' of Llama3.", "bbox": [ 507, 310, 884, 454 ], "page_idx": 2 }, { "type": "text", "text": "The column labeled 'Override' reports the scores when the polarity of sentiment expression detected by the sentiment extractor replaces the LLM's decision. When multiple sentiment expressions were detected the closest one to the root node was used, and when no expression was detected the LLM's decision was used. Therefore, this score estimates the upper bound of our approach with desirable prompts to inform the external knowledge to the LLM, assuming the polarities of expressions detected by the sentiment extractor are always correct. In UL2 and MT0, 'Override' exceeds 'Hints.' This implies that the hints in the prompt were not perfectly recognized by these models. On the other hand, in the high performing models (Llama2, Mixtral and Llama3), 'Hints' achieved the highest score through the integration of LLMs and the sentiment extractor.", "bbox": [ 507, 455, 885, 743 ], "page_idx": 2 }, { "type": "text", "text": "5.2 Evaluation per Language", "text_level": 1, "bbox": [ 507, 756, 756, 772 ], "page_idx": 2 }, { "type": "text", "text": "Figures 2 to 7 show the detailed results for 15 languages. The T5 model in Figure 2 shows high 'Base' scores for Romance and Germanic lan", "bbox": [ 507, 777, 882, 825 ], "page_idx": 2 }, { "type": "page_footnote", "text": "4This is due to different annotation policies between PUD and other UD corpora used to train the parser, or the lack of lemma information in 7 out of 15 PUD corpora.", "bbox": [ 112, 882, 487, 921 ], "page_idx": 2 }, { "type": "page_footnote", "text": "5NEGATIVE is the majority $(54.7\\%)$ label in the data set, and predicting always NEGATIVE results in the accuracy 54.7 and the macro F1 score 35.4.", "bbox": [ 507, 834, 882, 870 ], "page_idx": 2 }, { "type": "page_footnote", "text": "<sup>6</sup>When the sentiment extractor does not detect anything, the majority label NEGATIVE is used for prediction. It often happens, due to the design to prioritize precision over recall, and low dictionary coverage in some languages.", "bbox": [ 507, 870, 884, 921 ], "page_idx": 2 }, { "type": "page_number", "text": "4812", "bbox": [ 480, 927, 521, 940 ], "page_idx": 2 }, { "type": "image", "img_path": "images/6e567f2be1b89d9a8c0771dc9affc832da4c3b71d8d5dfa8dd0e56b6fff0746d.jpg", "image_caption": [ "Figure 2: Macro F1 scores of each language on T5, shown with the sentiment extractor's scores in 'No LLM'." ], "image_footnote": [], "bbox": [ 129, 91, 870, 192 ], "page_idx": 3 }, { "type": "image", "img_path": "images/3a0c705ea0b73211f18a5b1bc177fb0a72ce35f97bd0d5e6420d50d8f01b9927.jpg", "image_caption": [ "Figure 3: Scores of UL2 model." ], "image_footnote": [], "bbox": [ 129, 233, 870, 335 ], "page_idx": 3 }, { "type": "image", "img_path": "images/1557d888a0ee8b0d0b1d82c9312169b7f908d3c0a4988f5ddd76cfab3f0dc5ad.jpg", "image_caption": [ "Figure 4: Scores of MT0 model." ], "image_footnote": [], "bbox": [ 131, 370, 870, 458 ], "page_idx": 3 }, { "type": "text", "text": "guages, but for Arabic, Japanese, Korean and Chinese, the scores are close to the baseline, because the model almost always answers NEGATIVE due to the model's ignorance of words, even characters. The 'Hints' bars show the improvements in 13 languages by incorporating the output of the sentiment extractor, and it was drastic in Czech, Finnish, and Japanese. This was achieved even by the sentiment extractor that is far from perfect for classification, as shown in \"No LLM\" bars in Figure 2 and their average, 69.4 in Table 1.", "bbox": [ 112, 502, 489, 680 ], "page_idx": 3 }, { "type": "text", "text": "Figure 3 shows a similar trend in the UL2 model, but the scores of 'Hints' tend to be lower than 'Override'. This suggests that the model does not recognize the hints added in the method described in Section 3.2 as effectively.", "bbox": [ 112, 684, 489, 766 ], "page_idx": 3 }, { "type": "text", "text": "The MTO model, trained on multilingual data, performs stably for many languages as in Figure 4. Our method was the most effective for MTO among the six LLMs, especially in French and Japanese, and $33\\%$ of errors were reduced in average.", "bbox": [ 112, 771, 489, 851 ], "page_idx": 3 }, { "type": "text", "text": "Figures 5 to 7 show that the larger models, Llama2, Mixtral and Llama3 exhibit high multilingual capability in this task, with 'Base' scores of 87 or higher in all languages except for Arabic with", "bbox": [ 112, 857, 489, 921 ], "page_idx": 3 }, { "type": "text", "text": "Llama2. Even from these high baseline scores, our proposed method improved the scores in 9 languages on Llama2, 12 languages on Mixtral and 7 languages on Llama3. Especially, French with Llama2 and Finnish with Llama3 were improved to near-perfect. Unlike the smaller models, 'Hints' outperformed 'Override' with few exceptions such as Russian with Llama2 and Finnish with Mixtral. This suggests that when the LLM has sufficient knowledge of the language, the best approach is to integrate the LLM and external knowledge, since there is still missing information in the model, and the hints from the external component are appropriately recognized through the prompt.", "bbox": [ 507, 502, 884, 728 ], "page_idx": 3 }, { "type": "text", "text": "Indonesian is an outlier that tends to reduce scores from the baseline. It is because the original corpus UD_Indonesian-PUD has significant errors in white-spacing that cause failure of word detection, thus it is difficult for syntax-based component to detect sentiment expressions.", "bbox": [ 507, 728, 884, 825 ], "page_idx": 3 }, { "type": "text", "text": "5.3 Error Analysis", "text_level": 1, "bbox": [ 507, 835, 672, 851 ], "page_idx": 3 }, { "type": "text", "text": "Errors occurring only in 'Override' showcase the LLM's capability to appropriately ignore hints from external knowledge. Here is an example in German: in \"... so gut wie unmöglich geworden\"", "bbox": [ 507, 857, 884, 921 ], "page_idx": 3 }, { "type": "page_number", "text": "4813", "bbox": [ 480, 928, 519, 940 ], "page_idx": 3 }, { "type": "image", "img_path": "images/29d9664bfc17ef2382ce6cb828de78267b683b9f5bce5c0262bb68407e6b5da4.jpg", "image_caption": [ "Figure 5: Scores of Llama2 model. Note that Figures 5 to 7 are shown in a different scale from Figures 2 to 4." ], "image_footnote": [], "bbox": [ 131, 85, 868, 191 ], "page_idx": 4 }, { "type": "image", "img_path": "images/9506dcbc9e8524cc4394051b81a2fa5bb5ad4effabadf2341d96f4a2e18d4f81.jpg", "image_caption": [ "Figure 6: Scores of Mixtral model." ], "image_footnote": [], "bbox": [ 131, 227, 868, 317 ], "page_idx": 4 }, { "type": "image", "img_path": "images/74abe10ca3145503ff4d8ab74b1638f0339c6c0ce053aa6aac157e026af4c7e2.jpg", "image_caption": [ "Figure 7: Scores of Llama3 model." ], "image_footnote": [], "bbox": [ 132, 349, 868, 439 ], "page_idx": 4 }, { "type": "text", "text": "(‘become almost impossible’), the sentiment extractor detected “gut” (‘good’) as a positive word but it is not true in this context. MTO was influenced by the hint and wrongly judged as POSITIVE, but other models recognized this idiom and they answered NEGATIVE even when an incorrect hint was provided.", "bbox": [ 112, 483, 487, 596 ], "page_idx": 4 }, { "type": "text", "text": "On the other hand, errors occurring only in 'Hints' reveal a need for improvement in the hints provided in prompts. MT0 tends to be confused with negation. For example, even with the hint 'hint: \"no claro\" is a Spanish phrase that has a negative meaning.', the model answered POSITIVE. This suggests the model likely misunderstood that \"claro\" ('clear') was a negative word and interpreted it as negated.", "bbox": [ 110, 599, 487, 743 ], "page_idx": 4 }, { "type": "text", "text": "6 Conclusion", "text_level": 1, "bbox": [ 112, 762, 245, 778 ], "page_idx": 4 }, { "type": "text", "text": "This paper exploited external knowledge for the multilingual sentiment classification task on LLMs and achieved promising results. It demonstrated that the sentiment extractor can compensate the lack of linguistic knowledge in LLMs in several languages. Additionally, even when incorrect information was provided, the LLMs were able to handle apparent mistakes, suggesting that the com", "bbox": [ 112, 791, 487, 921 ], "page_idx": 4 }, { "type": "text", "text": "bination of the two approaches works best. However, several models did not recognize all the hints, indicating further enhancement of this combination is possible with better prompting techniques.", "bbox": [ 507, 483, 882, 550 ], "page_idx": 4 }, { "type": "text", "text": "7 Limitations", "text_level": 1, "bbox": [ 509, 567, 643, 582 ], "page_idx": 4 }, { "type": "text", "text": "This paper aims to explore the capability to incorporate external lexical and syntactic knowledge even when an LLM does not perform adequately for certain languages and domains, rather than solely pursuing state-of-the-art scores in a specific classification task. Therefore, there may be better systems (e.g. GPT-4) to solve this task more accurately. Nonetheless, this work is meaningful as it aims to improve the task even when large models are not applicable due to computational or legal reasons. Additionally, there is another advantage for users to control the resources without needing to retrain or fine-tune LLMs.", "bbox": [ 505, 596, 882, 804 ], "page_idx": 4 }, { "type": "text", "text": "The sentiment extractor utilized in this paper does not always extract correct sentiment expressions and indeed, the recall is low for languages such as Korean and Chinese. Such an external component cannot be perfect but it is possible to enhance the syntactic rules and lexical resources when a new language is needed, and the updated", "bbox": [ 507, 808, 882, 921 ], "page_idx": 4 }, { "type": "page_number", "text": "4814", "bbox": [ 480, 928, 519, 940 ], "page_idx": 4 }, { "type": "text", "text": "components can naturally be applied to our technique.", "bbox": [ 112, 84, 490, 116 ], "page_idx": 5 }, { "type": "text", "text": "Since we are using small parallel data sets and not providing any machine learning model, the prompts and parameters were not fully optimized for this task and data set, except for the additional line for the prompt for the MTO model described in Section 4.2. Thus there can be better-performing prompts and parameters that could potentially improve the results further. Also, the evaluation datasets with limited number of instances cannot support the results with statistical significance for each language, thus we provide qualitative discussion with interpretable instances with outputs by the sentiment extractor.", "bbox": [ 112, 117, 489, 325 ], "page_idx": 5 }, { "type": "text", "text": "8 Ethical Statement", "text_level": 1, "bbox": [ 112, 337, 305, 353 ], "page_idx": 5 }, { "type": "text", "text": "Since we are using an existing dataset and LLMs for evaluation and we don't release new text data, there is no ethical concerns in this paper.", "bbox": [ 112, 363, 490, 413 ], "page_idx": 5 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 114, 438, 213, 454 ], "page_idx": 5 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "AI@Meta. 2024. Llama 3 model card.", "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901.", "Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. 2024. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1-53.", "Albert Q. Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2024. Mixtral of experts. arXiv preprint arXiv:2401.04088.", "Hiroshi Kanayama and Ran Iwamoto. 2020. How Universal are Universal Dependencies? Exploiting Syntax for Multilingual Clause-level Sentiment Detection. In Proceedings of the 12th Language Resources and Evaluation Conference (LREC 2020), pages 4063-4073.", "Zhoubo Li, Ningyu Zhang, Yunzhi Yao, Mengru Wang, Xi Chen, and Huajun Chen. 2023. Unveiling the pit" ], "bbox": [ 114, 460, 489, 921 ], "page_idx": 5 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "falls of knowledge editing for large language models. arXiv preprint arXiv:2310.02129.", "Niklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, et al. 2022. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786.", "Peng Qi, Timothy Dozat, Yuhao Zhang, and Christopher D. Manning. 2018. Universal dependency parsing from scratch. In Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 160-170, Brussels, Belgium.", "Xiaofei Sun, Xiaoya Li, Jiwei Li, Fei Wu, Shangwei Guo, Tianwei Zhang, and Guoyin Wang. 2023. Text classification via large language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 8990-9005, Singapore.", "Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.", "Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In International Conference on Learning Representations (ICLR).", "Genta Winata, Lingjue Xie, Karthik Radhakrishnan, Shijie Wu, Xisen Jin, Pengxiang Cheng, Mayank Kulkarni, and Daniel Preotiac-Pietro. 2023. Overcoming catastrophic forgetting in massively multilingual continual learning. In Findings of the Association for Computational Linguistics: ACL 2023, pages 768-777, Toronto, Canada. Association for Computational Linguistics.", "Daniel Zeman and et al. 2017. CoNLL 2017 shared task: Multilingual parsing from raw text to Universal Dependencies. In Proceedings of the CoNLL 2017 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 1-19, Vancouver, Canada.", "Yang Zhao, Tetsuya Nasukawa, Masayasu Muraoka, and Bishwaranjan Bhattacharjee. 2023. A simple yet strong domain-agnostic de-bias method for zero-shot sentiment classification. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 3923-3931." ], "bbox": [ 510, 85, 884, 822 ], "page_idx": 5 }, { "type": "page_number", "text": "4815", "bbox": [ 480, 928, 519, 940 ], "page_idx": 5 }, { "type": "list", "sub_type": "text", "list_items": [ "ar: pabia n a y no a y y y y jil dill jil la yy jil lki elldi jll", "cs:Zakladacilistina umoznila vtyvoenkupeckeho spolku ovladaneho mestskym zastupitel, ktermyohl ybirat da nd tch, co timto samosprvnm mestem projizdeli.", "de: Die Grundungsurkunde eremogliche die Schaffung einer Handlerinnung, die von den Burgern der Stadt gefuhrt wurde, um Steuern von durch die Gemeinde reisenden Menschen zu erheiten.", "en: The charter allowed for the creation of a merchants' guild, run by the town's burgesses to tax people passing through the borough.", "es: La carta permía la creación del gremio de los mercaderes y se gestionaba por los burgueses de la Ciudad para cobrar impuestos a las personas agravés del municipio.", "fi: Peruskirjassa sallitlin kaupungin porvareiden johtaman kauppiaiden killan luominen, Jonka tarkoituksena oli verottaa ihmisä, jotka kulkivat kauppalan lapi.", "fr: La charte permit la creation d'une guilde de marchands, dirigée par la bourgeoisie de la ville, qui faisait payer un impôt aux personnes traversant le quartier.", "id: Piagam ini mengizinkanpembentukanserikat pedagang, yang dijalananoleh perwakilankota untuk menarik pajak dari orang yang melintasiborough.", "it: Il trattato permise la creazione di una corporazione dei mercanti, gestita dai deputati della città per tassare coloro che attraversavano la zona,", "ja: ごの憲章は、都市の選出代議士が商人向けの組合を設立するとを認わた。", "ko: 皇人章的会用在通他之法,有", "pt: A carta permitiu acriao de uma guila de commerciantes, administra de los burgueses da vila, para tributar as pessoas que passavam belrro.", "ru: 30t yctab no3b0nll co3daTb opranH3aunTOropoBueB, pykoBDmmy jKHTenJIMr ropoJaIbn6noKeHHaNoIor mIooJeHn HanoIeH, npoxOaIxN CheepoRdoK.", "tr: Tüzuk, kasabadan setzen kisilerin vergilendirilmesi icin kasaba sakinleri tarafindan yonetilen bir tüccar locasi olusturulmasini sagladi.", "zh: 惠章曾允許創立由城鎮市民管理的商人行會,以向途經城鎮的人士徵收稅費。" ], "bbox": [ 124, 93, 878, 258 ], "page_idx": 6 }, { "type": "text", "text": "Figure 8: Example from Parallel Sentiment and extraction results by the sentiment extractor. POSITIVE label was commonly given for the parallel sentences in 15 languages. Highlighted words in blue are the positive words detected by the sentient extractor, and the underlined words are the targets of the positive sentiment (targets are not cared in prompting in this work).", "bbox": [ 112, 271, 884, 330 ], "page_idx": 6 }, { "type": "table", "img_path": "images/04bb82e1472b37b024c4d8d69a02cae7e97dbf68417ff58691bb1aa9bfca6484.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">hints</td><td colspan=\"2\">T5</td><td colspan=\"2\">UL2</td><td colspan=\"2\">MT0</td><td colspan=\"2\">Llama2</td><td colspan=\"2\">Mixtral</td><td colspan=\"2\">Llama3</td></tr><tr><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td></tr><tr><td>ar</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>cs</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>de</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>en</td><td></td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>es</td><td>p</td><td>N</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>fi</td><td>p</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td></tr><tr><td>fr</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>id</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>it</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ja</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ko</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td></tr><tr><td>pt</td><td>p</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ru</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td></tr><tr><td>tr</td><td></td><td>N</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>zh</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr></table>", "bbox": [ 257, 338, 744, 546 ], "page_idx": 6 }, { "type": "text", "text": "Table 2: Hints generated by the sentiment extractor, and sentiment classification results without and with hints for the sentences in Figure 8 on the four models. Highlighted cells indicate the correct predictions.", "bbox": [ 112, 555, 882, 586 ], "page_idx": 6 }, { "type": "text", "text": "A Appendix", "text_level": 1, "bbox": [ 114, 609, 238, 626 ], "page_idx": 6 }, { "type": "text", "text": "A.1 Prompt for Phrase", "text_level": 1, "bbox": [ 114, 634, 310, 650 ], "page_idx": 6 }, { "type": "text", "text": "The hint prompt shown in Section 3.2 is for a sentiment expression consisting of a single word with a polarity. When multiple words form a positive or negative expression, the hint is generated in the following format:", "bbox": [ 112, 655, 487, 734 ], "page_idx": 6 }, { "type": "text", "text": "hint: \"[phrase]\" is a(n) [lang] phrase which has a [polarity] meaning.", "bbox": [ 124, 738, 477, 771 ], "page_idx": 6 }, { "type": "text", "text": "For example, a sentence 'we never like it' has a negative expression, though \"like\" is a positive verb<sup>7</sup>. The hint in this case is:", "bbox": [ 112, 777, 487, 825 ], "page_idx": 6 }, { "type": "text", "text": "hint: “never like” is an English phrase which has a negative meaning.", "bbox": [ 122, 841, 487, 873 ], "page_idx": 6 }, { "type": "text", "text": "The sentiment annotator cares about the parts-of-speech, thus \"like\" used as a preposition is not regarded as a positive word.", "bbox": [ 112, 882, 487, 920 ], "page_idx": 6 }, { "type": "text", "text": "Similarly \"have merit\" (positive) and \"too short\" (negative) are given as phrasal hints.", "bbox": [ 507, 609, 884, 642 ], "page_idx": 6 }, { "type": "text", "text": "A.2 Prompt Adjustment", "text_level": 1, "bbox": [ 509, 652, 717, 668 ], "page_idx": 6 }, { "type": "text", "text": "As mentioned in Section 4.2, the MTO model tends to output POSITIVE. Therefore, we replace \"Please just answer the label.\" in the prompt in Section 3.1 with the following sentence. This increases the MTO's base scores by $20\\%$ on average.", "bbox": [ 507, 673, 882, 753 ], "page_idx": 6 }, { "type": "text", "text": "In this case all input is either of them, and do not hesitate to select NEGATIVE when you think the input is relatively negative things in some way.", "bbox": [ 517, 772, 870, 837 ], "page_idx": 6 }, { "type": "text", "text": "A.3 Multilingual Examples", "text_level": 1, "bbox": [ 509, 852, 739, 868 ], "page_idx": 6 }, { "type": "text", "text": "Figures 8 and 9 show the examples in Parallel Sentiment. As shown in the result of automatic sentiment extraction, the extractor does not always", "bbox": [ 507, 873, 884, 921 ], "page_idx": 6 }, { "type": "page_number", "text": "4816", "bbox": [ 480, 928, 521, 940 ], "page_idx": 6 }, { "type": "code", "sub_type": "code", "code_caption": [], "code_body": "ar: .s. \ncs: Tiberius podle dostupnych pramenu svheo odjezdu litoval a nekolkrat zadal, ay se smel do Rima vratit, ale Augustus jeho zdosti pokaedz de zamlt. \nde: Berichten zufolge bereute Tiberius seine Abreise und bat mehrfach um Erlaubnis, nach Rom zuruckzukehren, noch Augustus verweigerte him gedes Mal seineitte. \nen: Tiberius reportedly regretted his departure and requested to return to Rome several times, but each time Augustus refused his requests. \nes: Supuestamente, Tiberio se arrepintó de haberse marchado y solicitó varias vezes regresar a Roma, pero Augusto rechazo todas sus solicititudes. fi: Tiberiuksen kerrotaan katuneen lahtoaan ja pyytaeneen monta kerta saada palata Roomaan, mutta joka kerran Augustus hylkasiHanen pyntonsa. fr: Tiberere aurit regretion son depart et demande a retourer a Rome plusieurs fois, mais Auguste aurit refusechacune de ses demands. id: Tiberius dilaporkanmeniesaleberangkatanya dan meminta untuk umbalike Roma beberapa kalu, namun Augustus menolak permintaanya setiap kalii. it: Presumilmente, Tiberio si penti della sua partenza e richiese di tornare a Roma molte voltte, ma Augusto rifiutlo le sue richieste ogni volta. ja: TeiaVUSK is本身就 gai o-maru cei-foe che lveo. 10A MauHuaUstS TUsNtOgthn AuaGustsTosKg thou mao HuaUusStuNtS NcHto faglHoi. \nko: TotheRus was the saini duon that dore haoohayor eru moa rorlallrgo and Ongmou no daa As uWusS TUsNtS THeBriLus Uus's Ongmou t gafahd o. \npt: Tiberio supostamente lamentou a sua parte e pediu para regressar a Roma varias vezes, mas Augusto sempre recusou seu pedidos. ru: Tmbepin, no IMeIOUIMCBA CBeDINHM, IOKaJIEN O CBOeM IO PNOCSI NcCKOBKO pa3 BepHyTbCa B PIM, HO ABYCT KAKDbI PA3 OTKaBbIaN erO npoc6aM. tr: Aktarilarana gore Tiberius, gadisinden pisman oldu ve birkac kez Roma'ya donnek imedi ancak Augustus taleplerini her seferinde reddetti. zh: Dscnqptie iuei kndr hoe frrn. 2", "guess_lang": "txt", "bbox": [ 122, 93, 801, 260 ], "page_idx": 7 }, { "type": "text", "text": "Figure 9: Another example with NEGATIVE annotation. The words highlighted in pink are negative words detected by the system. In Spanish, a preterite form of \"solicitar\" ('to request') was wrongly detected as positive due to a wrong parsing result in a coordination structure.", "bbox": [ 112, 271, 882, 317 ], "page_idx": 7 }, { "type": "table", "img_path": "images/93e34fad72f517011075a7fe19edead8f7dbbdba19850c6c0690a249ee1a828f.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">hints</td><td colspan=\"2\">T5</td><td colspan=\"2\">UL2</td><td colspan=\"2\">MT0</td><td colspan=\"2\">Llama2</td><td colspan=\"2\">Mixtral</td><td colspan=\"2\">Llama3</td></tr><tr><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td></tr><tr><td>ar</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>cs</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>de</td><td></td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>en</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>es</td><td>n,p</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>fi</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>fr</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>id</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>it</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ja</td><td>n,n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ko</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>pt</td><td>n,n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ru</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>tr</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>zh</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr></table>", "bbox": [ 255, 326, 742, 533 ], "page_idx": 7 }, { "type": "text", "text": "Table 3: Results for sentences in Figure 9. Highlighted cells indicate the correct predictions.", "bbox": [ 184, 542, 808, 557 ], "page_idx": 7 }, { "type": "text", "text": "extract sentiment expressions, and the recall is low in some languages such as Arabic, Korean and Chinese. It causes the low scores shown in \"No LLM\" bars in Figure 2.", "bbox": [ 112, 582, 487, 645 ], "page_idx": 7 }, { "type": "text", "text": "Table 2 shows the sentiment classification results for the sentences in Figure 8. The column labeled 'hints' shows positive $(p)$ or negative $(n)$ words provided as hints, which correspond to highlighted words in Figure 8. The right part shows the classification results by six models, without $(\\text{一} )$ or with $(\\text{十} )$ hints. $^\\circ \\mathrm{P}$ and $\\mathbf{\\ddot{N}}$ denote POSITIVE and NEGATIVE respectively. $^\\circ \\mathrm{P}^{\\prime}$ is the correct label for all the languages, so we can see the classification by all models was changed to the correct one in one or more languages, and when no hint was given, the result was unchanged, with an exception due to nondeterministic behavior of the UL2 model.", "bbox": [ 112, 646, 487, 854 ], "page_idx": 7 }, { "type": "text", "text": "Table 3 shows the results for another example in Figure 9. The correct label is 'N'. MTO tends to select POSITIVE but the hints successfully invert the decision in 6 languages. The sentiment extractor", "bbox": [ 112, 857, 489, 921 ], "page_idx": 7 }, { "type": "text", "text": "outputs both positive and negative expressions in Spanish and both were added as hints, but it did not have detrimental results. This was the easy case for other models so prediction was NEGATIVE even without hints.", "bbox": [ 507, 582, 882, 659 ], "page_idx": 7 }, { "type": "page_number", "text": "4817", "bbox": [ 480, 928, 519, 940 ], "page_idx": 7 }]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855[ [ { "type": "title", "bbox": [ 0.148, 0.091, 0.852, 0.131 ], "angle": 0, "content": "Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models" }, { "type": "text", "bbox": [ 0.235, 0.158, 0.764, 0.175 ], "angle": 0, "content": "Hiroshi Kanayama, Yang Zhao, Ran Iwamoto, Takuya Ohko" }, { "type": "text", "bbox": [ 0.439, 0.176, 0.56, 0.19 ], "angle": 0, "content": "IBM Research" }, { "type": "text", "bbox": [ 0.221, 0.192, 0.778, 0.21 ], "angle": 0, "content": "{hkana@jp., YangZhao@, ran.iwamoto1@, ohkot@jp.}ibm.com" }, { "type": "title", "bbox": [ 0.261, 0.261, 0.342, 0.277 ], "angle": 0, "content": "Abstract" }, { "type": "text", "bbox": [ 0.142, 0.291, 0.462, 0.448 ], "angle": 0, "content": "This paper exploits a sentiment extractor supported by syntactic and lexical resources to enhance multilingual sentiment classification solved through the generative approach, without retraining LLMs. By adding external information of words and phrases that have positive/negative polarities, the multilingual sentiment classification error was reduced by up to 33 points, and the combination of two approaches performed best especially in high-performing pairs of LLMs and languages." }, { "type": "title", "bbox": [ 0.115, 0.461, 0.262, 0.476 ], "angle": 0, "content": "1 Introduction" }, { "type": "text", "bbox": [ 0.113, 0.487, 0.49, 0.809 ], "angle": 0, "content": "The generative approach using Large Language Models (LLMs) performs very well even for nongenerative tasks such as topic classification (Brown et al., 2020) and sentiment polarity judgment (Zhao et al., 2023). LLMs have garnered attention, particularly for their capability to generalize languages in addressing those tasks without the need for task-specific training using ground truth. Many tasks can be solved in a zero-shot manner by providing appropriate prompts. However, the language coverage highly depends on LLMs, and the accuracy can be quite low if the model received insufficient training or tuning on specific languages. Retraining LLMs requires a high cost to cover additional languages, and it tends to cause catastrophic forgetting in languages that have already been covered (Winata et al., 2023). In recent attempts at knowledge editing, difficulties such as knowledge conflicts have been pointed out (Li et al., 2023), and it is not easy to apply to many languages." }, { "type": "text", "bbox": [ 0.113, 0.81, 0.49, 0.922 ], "angle": 0, "content": "Thus, we attempt to enhance multilingual sentiment classification based on the generative approach without computationally intensive processes for retraining and tuning LLMs. As depicted in Figure 1, our approach obtains lexical and syntactic information from an external sentiment extractor and inserts it into the prompt. This approach" }, { "type": "image", "bbox": [ 0.513, 0.245, 0.871, 0.356 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.509, 0.36, 0.883, 0.391 ], "angle": 0, "content": "Figure 1: Concept of sentiment extraction using the prompt supported by an external sentiment extractor." }, { "type": "text", "bbox": [ 0.508, 0.414, 0.884, 0.478 ], "angle": 0, "content": "requires knowledge specific to tasks and languages but has advantages such as stability of outputs and controllability to add arbitrary knowledge to adapt to new languages or domains." }, { "type": "text", "bbox": [ 0.508, 0.479, 0.885, 0.591 ], "angle": 0, "content": "The contributions of this paper are threefold: (1) to integrate syntactic and lexical knowledge with prompts for LLMs, (2) to evaluate sentiment classification using six publicly available LLMs and parallel data in 15 languages, and (3) to demonstrate the positive impacts by integrating two components without any retraining." }, { "type": "title", "bbox": [ 0.509, 0.602, 0.667, 0.617 ], "angle": 0, "content": "2 Related Work" }, { "type": "title", "bbox": [ 0.509, 0.627, 0.827, 0.643 ], "angle": 0, "content": "2.1 Multilingual Sentiment Extraction" }, { "type": "text", "bbox": [ 0.507, 0.648, 0.885, 0.824 ], "angle": 0, "content": "This paper exploits a multilingual sentiment extraction method based on syntactic analysis and lexicon (Kanayama and Iwamoto, 2020). The extractor applies grammatical rules and a lexical dictionary to the common syntactic structure across languages defined by Universal Dependencies (UD) (Zeman and et al., 2017), and it extracts positive and negative phrases for many languages with high precision (although recall tends to be low for lower-resource languages), taking valence shifting such as negation into consideration." }, { "type": "text", "bbox": [ 0.508, 0.826, 0.887, 0.921 ], "angle": 0, "content": "Note that the sentiment extractor may detect one or more polar expressions from a single sentence or may not output anything when there is no explicit expression detected, and thus it does not directly solve the task of sentence-level sentiment classification discussed in Section 3." }, { "type": "page_number", "bbox": [ 0.481, 0.928, 0.522, 0.941 ], "angle": 0, "content": "4810" }, { "type": "footer", "bbox": [ 0.229, 0.946, 0.769, 0.958 ], "angle": 0, "content": "Findings of the Association for Computational Linguistics: ACL 2024, pages 4810-4817" }, { "type": "footer", "bbox": [ 0.285, 0.959, 0.714, 0.972 ], "angle": 0, "content": "August 11-16, 2024 ©2024 Association for Computational Linguistics" } ], [ { "type": "title", "bbox": [ 0.114, 0.085, 0.42, 0.101 ], "angle": 0, "content": "2.2 Text Classification via Reasoning" }, { "type": "text", "bbox": [ 0.113, 0.107, 0.488, 0.234 ], "angle": 0, "content": "Sun et al. (2023) proposed a prompting method, CARP, that enhances text classification by encouraging models to conduct reasoning. In CARP, a command to list words with polarity is added to the prompt, and it asks the model to describe the reason for classification. This strategy increased the accuracy of sentiment classification in most datasets." }, { "type": "text", "bbox": [ 0.113, 0.237, 0.487, 0.349 ], "angle": 0, "content": "In this paper, as shown in Figure 1, external knowledge is integrated into the prompt given to LLMs instead of relying solely on the knowledge embedded in LLMs. This approach enables us to broaden the language coverage and observe the characteristics of each LLM and the capability of knowledge extension using external components." }, { "type": "title", "bbox": [ 0.114, 0.364, 0.409, 0.396 ], "angle": 0, "content": "3 Sentiment Classification using Generative Model" }, { "type": "text", "bbox": [ 0.113, 0.409, 0.49, 0.473 ], "angle": 0, "content": "This section describes the method to predict sentence polarity using an LLM and our proposal to integrate the output of an external sentiment extractor with a prompt." }, { "type": "title", "bbox": [ 0.114, 0.487, 0.247, 0.502 ], "angle": 0, "content": "3.1 Prompting" }, { "type": "text", "bbox": [ 0.113, 0.509, 0.489, 0.573 ], "angle": 0, "content": "The task is binary classification of an input sentence into POSITIVE or NEGATIVE. Here we provide the following English prompt<sup>1</sup> to an LLM, in a zero-shot manner without providing labeled examples." }, { "type": "text", "bbox": [ 0.12, 0.588, 0.496, 0.651 ], "angle": 0, "content": "Classify the next [lang] sentence into POSITIVE or NEGATIVE. Please just answer the label. input: [input sentence] output:" }, { "type": "text", "bbox": [ 0.114, 0.671, 0.489, 0.734 ], "angle": 0, "content": "[lang] is filled with the language name such as \"Arabic\" and \"Japanese\". Then we expect the model generates either POSITIVE or NEGATIVE after \"output:\"." }, { "type": "title", "bbox": [ 0.114, 0.749, 0.455, 0.763 ], "angle": 0, "content": "3.2 Integration with Sentiment Extractor" }, { "type": "text", "bbox": [ 0.113, 0.771, 0.489, 0.834 ], "angle": 0, "content": "To enhance the LLM's decision, when the sentiment extractor detects a polar expression, we insert a hint into the prompt between the 'input' and 'output' lines<sup>2</sup>." }, { "type": "text", "bbox": [ 0.52, 0.084, 0.871, 0.116 ], "angle": 0, "content": "hint: \"[word]\" is a(n) [lang] word which has a [polarity] meaning." }, { "type": "text", "bbox": [ 0.508, 0.123, 0.884, 0.236 ], "angle": 0, "content": "[word] is the surface form of the word that was detected to have a polarity, and [polarity] is \"positive\" or \"negative\". For example, from a Chinese sentence \"我們很失望,...\", the sentiment extractor detects the negative verb \"失望\" ('be disappointed') through syntactic parsing and dictionary lookup, then the line" }, { "type": "text", "bbox": [ 0.536, 0.24, 0.85, 0.272 ], "angle": 0, "content": "hint: “失望” is a Chinese word which has a negative meaning." }, { "type": "text", "bbox": [ 0.508, 0.277, 0.884, 0.358 ], "angle": 0, "content": "is inserted in the prompt. If multiple polar expressions are detected, multiple lines are added. When a polar expression consists of multiple words (e.g. negation), a “phrase” is added as a hint. Refer to Appendix A.1 for its prompt." }, { "type": "title", "bbox": [ 0.509, 0.369, 0.735, 0.385 ], "angle": 0, "content": "4 Experimental Settings" }, { "type": "title", "bbox": [ 0.509, 0.394, 0.624, 0.408 ], "angle": 0, "content": "4.1 Data Set" }, { "type": "text", "bbox": [ 0.508, 0.415, 0.884, 0.543 ], "angle": 0, "content": "For evaluation of multilingual sentiment classification, we use Parallel Sentiment<sup>3</sup>. It consists of 106 parallel sentences (a subset of 1,000 sentences in the Parallel UD (PUD) corpora) for 19 languages annotated with positive or negative labels common for all languages, enabling us to evaluate the multilingual task with equal difficulty. We test in 15 languages that the sentiment extractor supports." }, { "type": "title", "bbox": [ 0.509, 0.554, 0.696, 0.57 ], "angle": 0, "content": "4.2 Language Models" }, { "type": "text", "bbox": [ 0.508, 0.574, 0.884, 0.622 ], "angle": 0, "content": "We compare six LLMs that have diverse encoder-decoder architectures, language coverage in fine tuning, and model sizes." }, { "type": "text", "bbox": [ 0.532, 0.632, 0.884, 0.696 ], "angle": 0, "content": "- T5 (google/flan-t5-xxl) (Chung et al., 2024): The encoder-decoder model T5 with instruction tuning on 1,800 tasks that covers 60 languages (11 billion parameters)." }, { "type": "text", "bbox": [ 0.532, 0.706, 0.881, 0.755 ], "angle": 0, "content": "- UL2 (google/flan-ul2) (Wei et al.): The encoder-decoder model UL2 with instruction tuning (20b)." }, { "type": "text", "bbox": [ 0.532, 0.765, 0.883, 0.813 ], "angle": 0, "content": "- MT0 (bigscience/mt0-xxl) (Muennighoff et al., 2022): Multilingual T5 model with instruction tuning on 46 languages (13b)." }, { "type": "text", "bbox": [ 0.532, 0.823, 0.881, 0.887 ], "angle": 0, "content": "- Llama2 (meta-llama/llama-2-70b-chat) (Touvron et al., 2023): Decoder model Llama tuned for chat (70b). 90 percent of the pretraining data was English." }, { "type": "list", "bbox": [ 0.532, 0.632, 0.884, 0.887 ], "angle": 0, "content": null }, { "type": "page_footnote", "bbox": [ 0.51, 0.895, 0.883, 0.92 ], "angle": 0, "content": "\\( {}^{3} \\) Distributed at https://1rec2020.lrec-conf.org/en/ shared-lrs/." }, { "type": "page_footnote", "bbox": [ 0.113, 0.847, 0.486, 0.895 ], "angle": 0, "content": "1 Prompts in the target language may work better, but in this paper, we always use English prompts to fairly compare the languages without concerning about the prompt quality in each language." }, { "type": "page_footnote", "bbox": [ 0.114, 0.895, 0.486, 0.921 ], "angle": 0, "content": "2 Empirically this place is better than inserting 'hint' line before 'input' line." }, { "type": "list", "bbox": [ 0.113, 0.847, 0.486, 0.921 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.929, 0.519, 0.941 ], "angle": 0, "content": "4811" } ], [ { "type": "table", "bbox": [ 0.156, 0.082, 0.449, 0.219 ], "angle": 0, "content": "<table><tr><td>Model</td><td>Base</td><td>Hints</td><td>Override</td></tr><tr><td>No LLM</td><td>35.4</td><td></td><td>69.4</td></tr><tr><td>T5</td><td>68.5</td><td>78.6</td><td>78.6</td></tr><tr><td>UL2</td><td>73.9</td><td>75.2</td><td>80.2</td></tr><tr><td>MT0</td><td>68.8</td><td>79.2</td><td>80.7</td></tr><tr><td>Llama2</td><td>92.6</td><td>93.7</td><td>93.3</td></tr><tr><td>Mixtral</td><td>91.1</td><td>93.6</td><td>93.1</td></tr><tr><td>Llama3</td><td>95.7</td><td>96.6</td><td>95.9</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.113, 0.227, 0.49, 0.286 ], "angle": 0, "content": "Table 1: Macro F1 scores of sentiment classification averaged in 15 languages. Bold letters show the highest score in each row and the underlined number is the highest in all cases." }, { "type": "text", "bbox": [ 0.137, 0.307, 0.489, 0.388 ], "angle": 0, "content": "- Mixtral (mistralai/mixtral-8x7b-instruct-v01) (Jiang et al., 2024): The model composed from mixture of multiple expert models and tested on multiple European languages (45b)." }, { "type": "text", "bbox": [ 0.137, 0.396, 0.49, 0.493 ], "angle": 0, "content": "- Llama3 (meta-llama/llama-3-70b-instruct) (AI@Meta, 2024): The latest Llama model with instruction tuning. Though English accounts for 95 percent of the pretraining data, the bigger data and the larger vocabulary size support multilinguality (70b)." }, { "type": "list", "bbox": [ 0.137, 0.307, 0.49, 0.493 ], "angle": 0, "content": null }, { "type": "text", "bbox": [ 0.113, 0.501, 0.49, 0.598 ], "angle": 0, "content": "For all models, the answer is generated in a greedy decoding setting with the minimum and maximum token numbers set to 1 and 10, respectively. The MTO model tends to output POSITIVE in most cases, so we adjusted the prompt as shown in Appendix A.2 to balance the prediction." }, { "type": "title", "bbox": [ 0.114, 0.607, 0.323, 0.622 ], "angle": 0, "content": "4.3 Sentiment Extractor" }, { "type": "text", "bbox": [ 0.113, 0.628, 0.49, 0.789 ], "angle": 0, "content": "We used the sentiment extractor's outputs for the Parallel Sentiment data set obtained from Kanayama and Iwamoto (2020) on request, and distribute them as supplemental material so that the entire experiments are reproducible. The detected sentiment words and phrases are associated with detailed syntax structures in CoNLL-U format processed by StanfordNLP (Qi et al., 2018), which helped improve the sentiment extraction process even beyond the gold annotations in PUD<sup>4</sup>." }, { "type": "title", "bbox": [ 0.114, 0.8, 0.336, 0.816 ], "angle": 0, "content": "5 Experimental Results" }, { "type": "title", "bbox": [ 0.114, 0.824, 0.285, 0.84 ], "angle": 0, "content": "5.1 Overall Quality" }, { "type": "text", "bbox": [ 0.114, 0.845, 0.488, 0.877 ], "angle": 0, "content": "Table 1 shows the overall results averaged across 15 languages. All numbers represent the macro F1" }, { "type": "page_footnote", "bbox": [ 0.114, 0.883, 0.489, 0.922 ], "angle": 0, "content": "4This is due to different annotation policies between PUD and other UD corpora used to train the parser, or the lack of lemma information in 7 out of 15 PUD corpora." }, { "type": "text", "bbox": [ 0.508, 0.085, 0.885, 0.213 ], "angle": 0, "content": "score of the binary sentiment classification. The weakest baseline, 35.4, corresponds to always predicting NEGATIVE<sup>5</sup> without utilizing the LLM or the sentiment extractor. A score of 69.4 was obtained by using only the sentiment extractor: answering the polarity of the sentiment expression closest to the main clause in the sentence when one or more sentiment expressions are detected<sup>6</sup>." }, { "type": "text", "bbox": [ 0.508, 0.214, 0.885, 0.309 ], "angle": 0, "content": "Next, the six models are compared. The column labeled 'Base' shows the scores of classification using the prompt outlined in Section 3.1. The smaller models, T5, UL2, and MT0, achieve scores around 70, while the larger models show much higher scores over 90, such as 95.7 in Llama3." }, { "type": "text", "bbox": [ 0.508, 0.311, 0.885, 0.455 ], "angle": 0, "content": "The column labeled 'Hints' shows the results when the additional hints described in Section 3.2 are incorporated. By adding this information, scores increased by more than 10 points in the T5 and MT0 models, and that means \\(33\\%\\) of errors were reduced in MT0. The absolute differences were smaller in some other models, but it is notable that \\(21\\%\\) of errors were reduced even from the very high score in the 'Base' of Llama3." }, { "type": "text", "bbox": [ 0.508, 0.456, 0.886, 0.744 ], "angle": 0, "content": "The column labeled 'Override' reports the scores when the polarity of sentiment expression detected by the sentiment extractor replaces the LLM's decision. When multiple sentiment expressions were detected the closest one to the root node was used, and when no expression was detected the LLM's decision was used. Therefore, this score estimates the upper bound of our approach with desirable prompts to inform the external knowledge to the LLM, assuming the polarities of expressions detected by the sentiment extractor are always correct. In UL2 and MT0, 'Override' exceeds 'Hints.' This implies that the hints in the prompt were not perfectly recognized by these models. On the other hand, in the high performing models (Llama2, Mixtral and Llama3), 'Hints' achieved the highest score through the integration of LLMs and the sentiment extractor." }, { "type": "title", "bbox": [ 0.509, 0.757, 0.757, 0.773 ], "angle": 0, "content": "5.2 Evaluation per Language" }, { "type": "text", "bbox": [ 0.508, 0.778, 0.884, 0.826 ], "angle": 0, "content": "Figures 2 to 7 show the detailed results for 15 languages. The T5 model in Figure 2 shows high 'Base' scores for Romance and Germanic lan" }, { "type": "page_footnote", "bbox": [ 0.508, 0.835, 0.884, 0.871 ], "angle": 0, "content": "5NEGATIVE is the majority \\((54.7\\%)\\) label in the data set, and predicting always NEGATIVE results in the accuracy 54.7 and the macro F1 score 35.4." }, { "type": "page_footnote", "bbox": [ 0.508, 0.871, 0.885, 0.922 ], "angle": 0, "content": "<sup>6</sup>When the sentiment extractor does not detect anything, the majority label NEGATIVE is used for prediction. It often happens, due to the design to prioritize precision over recall, and low dictionary coverage in some languages." }, { "type": "list", "bbox": [ 0.508, 0.835, 0.885, 0.922 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.928, 0.522, 0.941 ], "angle": 0, "content": "4812" } ], [ { "type": "image", "bbox": [ 0.13, 0.092, 0.872, 0.193 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.127, 0.195, 0.87, 0.21 ], "angle": 0, "content": "Figure 2: Macro F1 scores of each language on T5, shown with the sentiment extractor's scores in 'No LLM'." }, { "type": "image", "bbox": [ 0.13, 0.234, 0.872, 0.336 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.389, 0.341, 0.608, 0.355 ], "angle": 0, "content": "Figure 3: Scores of UL2 model." }, { "type": "image", "bbox": [ 0.132, 0.372, 0.871, 0.459 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.387, 0.463, 0.608, 0.478 ], "angle": 0, "content": "Figure 4: Scores of MT0 model." }, { "type": "text", "bbox": [ 0.113, 0.504, 0.49, 0.681 ], "angle": 0, "content": "guages, but for Arabic, Japanese, Korean and Chinese, the scores are close to the baseline, because the model almost always answers NEGATIVE due to the model's ignorance of words, even characters. The 'Hints' bars show the improvements in 13 languages by incorporating the output of the sentiment extractor, and it was drastic in Czech, Finnish, and Japanese. This was achieved even by the sentiment extractor that is far from perfect for classification, as shown in \"No LLM\" bars in Figure 2 and their average, 69.4 in Table 1." }, { "type": "text", "bbox": [ 0.113, 0.686, 0.49, 0.767 ], "angle": 0, "content": "Figure 3 shows a similar trend in the UL2 model, but the scores of 'Hints' tend to be lower than 'Override'. This suggests that the model does not recognize the hints added in the method described in Section 3.2 as effectively." }, { "type": "text", "bbox": [ 0.113, 0.772, 0.49, 0.852 ], "angle": 0, "content": "The MTO model, trained on multilingual data, performs stably for many languages as in Figure 4. Our method was the most effective for MTO among the six LLMs, especially in French and Japanese, and \\(33\\%\\) of errors were reduced in average." }, { "type": "text", "bbox": [ 0.113, 0.858, 0.49, 0.922 ], "angle": 0, "content": "Figures 5 to 7 show that the larger models, Llama2, Mixtral and Llama3 exhibit high multilingual capability in this task, with 'Base' scores of 87 or higher in all languages except for Arabic with" }, { "type": "text", "bbox": [ 0.508, 0.504, 0.885, 0.729 ], "angle": 0, "content": "Llama2. Even from these high baseline scores, our proposed method improved the scores in 9 languages on Llama2, 12 languages on Mixtral and 7 languages on Llama3. Especially, French with Llama2 and Finnish with Llama3 were improved to near-perfect. Unlike the smaller models, 'Hints' outperformed 'Override' with few exceptions such as Russian with Llama2 and Finnish with Mixtral. This suggests that when the LLM has sufficient knowledge of the language, the best approach is to integrate the LLM and external knowledge, since there is still missing information in the model, and the hints from the external component are appropriately recognized through the prompt." }, { "type": "text", "bbox": [ 0.508, 0.73, 0.885, 0.826 ], "angle": 0, "content": "Indonesian is an outlier that tends to reduce scores from the baseline. It is because the original corpus UD_Indonesian-PUD has significant errors in white-spacing that cause failure of word detection, thus it is difficult for syntax-based component to detect sentiment expressions." }, { "type": "title", "bbox": [ 0.509, 0.837, 0.673, 0.852 ], "angle": 0, "content": "5.3 Error Analysis" }, { "type": "text", "bbox": [ 0.508, 0.858, 0.885, 0.922 ], "angle": 0, "content": "Errors occurring only in 'Override' showcase the LLM's capability to appropriately ignore hints from external knowledge. Here is an example in German: in \"... so gut wie unmöglich geworden\"" }, { "type": "page_number", "bbox": [ 0.481, 0.929, 0.521, 0.941 ], "angle": 0, "content": "4813" } ], [ { "type": "image", "bbox": [ 0.132, 0.086, 0.87, 0.192 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.126, 0.201, 0.87, 0.216 ], "angle": 0, "content": "Figure 5: Scores of Llama2 model. Note that Figures 5 to 7 are shown in a different scale from Figures 2 to 4." }, { "type": "image", "bbox": [ 0.132, 0.228, 0.87, 0.318 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.38, 0.323, 0.615, 0.337 ], "angle": 0, "content": "Figure 6: Scores of Mixtral model." }, { "type": "image", "bbox": [ 0.133, 0.35, 0.87, 0.44 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.376, 0.445, 0.618, 0.459 ], "angle": 0, "content": "Figure 7: Scores of Llama3 model." }, { "type": "text", "bbox": [ 0.113, 0.485, 0.489, 0.597 ], "angle": 0, "content": "(‘become almost impossible’), the sentiment extractor detected “gut” (‘good’) as a positive word but it is not true in this context. MTO was influenced by the hint and wrongly judged as POSITIVE, but other models recognized this idiom and they answered NEGATIVE even when an incorrect hint was provided." }, { "type": "text", "bbox": [ 0.112, 0.6, 0.489, 0.744 ], "angle": 0, "content": "On the other hand, errors occurring only in 'Hints' reveal a need for improvement in the hints provided in prompts. MT0 tends to be confused with negation. For example, even with the hint 'hint: \"no claro\" is a Spanish phrase that has a negative meaning.', the model answered POSITIVE. This suggests the model likely misunderstood that \"claro\" ('clear') was a negative word and interpreted it as negated." }, { "type": "title", "bbox": [ 0.114, 0.763, 0.246, 0.779 ], "angle": 0, "content": "6 Conclusion" }, { "type": "text", "bbox": [ 0.113, 0.793, 0.489, 0.922 ], "angle": 0, "content": "This paper exploited external knowledge for the multilingual sentiment classification task on LLMs and achieved promising results. It demonstrated that the sentiment extractor can compensate the lack of linguistic knowledge in LLMs in several languages. Additionally, even when incorrect information was provided, the LLMs were able to handle apparent mistakes, suggesting that the com" }, { "type": "text", "bbox": [ 0.508, 0.485, 0.883, 0.551 ], "angle": 0, "content": "bination of the two approaches works best. However, several models did not recognize all the hints, indicating further enhancement of this combination is possible with better prompting techniques." }, { "type": "title", "bbox": [ 0.51, 0.568, 0.644, 0.583 ], "angle": 0, "content": "7 Limitations" }, { "type": "text", "bbox": [ 0.507, 0.598, 0.884, 0.806 ], "angle": 0, "content": "This paper aims to explore the capability to incorporate external lexical and syntactic knowledge even when an LLM does not perform adequately for certain languages and domains, rather than solely pursuing state-of-the-art scores in a specific classification task. Therefore, there may be better systems (e.g. GPT-4) to solve this task more accurately. Nonetheless, this work is meaningful as it aims to improve the task even when large models are not applicable due to computational or legal reasons. Additionally, there is another advantage for users to control the resources without needing to retrain or fine-tune LLMs." }, { "type": "text", "bbox": [ 0.508, 0.809, 0.884, 0.922 ], "angle": 0, "content": "The sentiment extractor utilized in this paper does not always extract correct sentiment expressions and indeed, the recall is low for languages such as Korean and Chinese. Such an external component cannot be perfect but it is possible to enhance the syntactic rules and lexical resources when a new language is needed, and the updated" }, { "type": "page_number", "bbox": [ 0.481, 0.929, 0.521, 0.941 ], "angle": 0, "content": "4814" } ], [ { "type": "text", "bbox": [ 0.113, 0.085, 0.492, 0.117 ], "angle": 0, "content": "components can naturally be applied to our technique." }, { "type": "text", "bbox": [ 0.113, 0.118, 0.49, 0.326 ], "angle": 0, "content": "Since we are using small parallel data sets and not providing any machine learning model, the prompts and parameters were not fully optimized for this task and data set, except for the additional line for the prompt for the MTO model described in Section 4.2. Thus there can be better-performing prompts and parameters that could potentially improve the results further. Also, the evaluation datasets with limited number of instances cannot support the results with statistical significance for each language, thus we provide qualitative discussion with interpretable instances with outputs by the sentiment extractor." }, { "type": "title", "bbox": [ 0.114, 0.338, 0.307, 0.354 ], "angle": 0, "content": "8 Ethical Statement" }, { "type": "text", "bbox": [ 0.113, 0.364, 0.491, 0.414 ], "angle": 0, "content": "Since we are using an existing dataset and LLMs for evaluation and we don't release new text data, there is no ethical concerns in this paper." }, { "type": "title", "bbox": [ 0.115, 0.439, 0.215, 0.455 ], "angle": 0, "content": "References" }, { "type": "ref_text", "bbox": [ 0.115, 0.461, 0.378, 0.476 ], "angle": 0, "content": "AI@Meta. 2024. Llama 3 model card." }, { "type": "ref_text", "bbox": [ 0.117, 0.485, 0.489, 0.565 ], "angle": 0, "content": "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901." }, { "type": "ref_text", "bbox": [ 0.117, 0.575, 0.49, 0.643 ], "angle": 0, "content": "Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. 2024. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1-53." }, { "type": "ref_text", "bbox": [ 0.117, 0.65, 0.49, 0.796 ], "angle": 0, "content": "Albert Q. Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2024. Mixtral of experts. arXiv preprint arXiv:2401.04088." }, { "type": "ref_text", "bbox": [ 0.117, 0.805, 0.49, 0.884 ], "angle": 0, "content": "Hiroshi Kanayama and Ran Iwamoto. 2020. How Universal are Universal Dependencies? Exploiting Syntax for Multilingual Clause-level Sentiment Detection. In Proceedings of the 12th Language Resources and Evaluation Conference (LREC 2020), pages 4063-4073." }, { "type": "ref_text", "bbox": [ 0.117, 0.894, 0.49, 0.922 ], "angle": 0, "content": "Zhoubo Li, Ningyu Zhang, Yunzhi Yao, Mengru Wang, Xi Chen, and Huajun Chen. 2023. Unveiling the pit" }, { "type": "list", "bbox": [ 0.115, 0.461, 0.49, 0.922 ], "angle": 0, "content": null }, { "type": "ref_text", "bbox": [ 0.529, 0.086, 0.884, 0.114 ], "angle": 0, "content": "falls of knowledge editing for large language models. arXiv preprint arXiv:2310.02129." }, { "type": "ref_text", "bbox": [ 0.512, 0.122, 0.885, 0.201 ], "angle": 0, "content": "Niklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, et al. 2022. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786." }, { "type": "ref_text", "bbox": [ 0.512, 0.212, 0.885, 0.291 ], "angle": 0, "content": "Peng Qi, Timothy Dozat, Yuhao Zhang, and Christopher D. Manning. 2018. Universal dependency parsing from scratch. In Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 160-170, Brussels, Belgium." }, { "type": "ref_text", "bbox": [ 0.512, 0.3, 0.885, 0.367 ], "angle": 0, "content": "Xiaofei Sun, Xiaoya Li, Jiwei Li, Fei Wu, Shangwei Guo, Tianwei Zhang, and Guoyin Wang. 2023. Text classification via large language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 8990-9005, Singapore." }, { "type": "ref_text", "bbox": [ 0.512, 0.376, 0.885, 0.455 ], "angle": 0, "content": "Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288." }, { "type": "ref_text", "bbox": [ 0.512, 0.465, 0.884, 0.531 ], "angle": 0, "content": "Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In International Conference on Learning Representations (ICLR)." }, { "type": "ref_text", "bbox": [ 0.512, 0.54, 0.885, 0.646 ], "angle": 0, "content": "Genta Winata, Lingjue Xie, Karthik Radhakrishnan, Shijie Wu, Xisen Jin, Pengxiang Cheng, Mayank Kulkarni, and Daniel Preotiac-Pietro. 2023. Overcoming catastrophic forgetting in massively multilingual continual learning. In Findings of the Association for Computational Linguistics: ACL 2023, pages 768-777, Toronto, Canada. Association for Computational Linguistics." }, { "type": "ref_text", "bbox": [ 0.512, 0.655, 0.884, 0.734 ], "angle": 0, "content": "Daniel Zeman and et al. 2017. CoNLL 2017 shared task: Multilingual parsing from raw text to Universal Dependencies. In Proceedings of the CoNLL 2017 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 1-19, Vancouver, Canada." }, { "type": "ref_text", "bbox": [ 0.512, 0.744, 0.884, 0.823 ], "angle": 0, "content": "Yang Zhao, Tetsuya Nasukawa, Masayasu Muraoka, and Bishwaranjan Bhattacharjee. 2023. A simple yet strong domain-agnostic de-bias method for zero-shot sentiment classification. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 3923-3931." }, { "type": "list", "bbox": [ 0.512, 0.086, 0.885, 0.823 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.929, 0.521, 0.941 ], "angle": 0, "content": "4815" } ], [ { "type": "text", "bbox": [ 0.123, 0.094, 0.408, 0.104 ], "angle": 0, "content": "ar: pabia n a y no a y y y y jil dill jil la yy jil lki elldi jll" }, { "type": "text", "bbox": [ 0.126, 0.106, 0.783, 0.115 ], "angle": 0, "content": "cs:Zakladacilistina umoznila vtyvoenkupeckeho spolku ovladaneho mestskym zastupitel, ktermyohl ybirat da nd tch, co timto samosprvnm mestem projizdeli." }, { "type": "text", "bbox": [ 0.126, 0.117, 0.879, 0.126 ], "angle": 0, "content": "de: Die Grundungsurkunde eremogliche die Schaffung einer Handlerinnung, die von den Burgern der Stadt gefuhrt wurde, um Steuern von durch die Gemeinde reisenden Menschen zu erheiten." }, { "type": "text", "bbox": [ 0.126, 0.128, 0.649, 0.138 ], "angle": 0, "content": "en: The charter allowed for the creation of a merchants' guild, run by the town's burgesses to tax people passing through the borough." }, { "type": "text", "bbox": [ 0.126, 0.14, 0.797, 0.149 ], "angle": 0, "content": "es: La carta permía la creación del gremio de los mercaderes y se gestionaba por los burgueses de la Ciudad para cobrar impuestos a las personas agravés del municipio." }, { "type": "text", "bbox": [ 0.128, 0.151, 0.74, 0.159 ], "angle": 0, "content": "fi: Peruskirjassa sallitlin kaupungin porvareiden johtaman kauppiaiden killan luominen, Jonka tarkoituksena oli verottaa ihmisä, jotka kulkivat kauppalan lapi." }, { "type": "text", "bbox": [ 0.128, 0.161, 0.747, 0.17 ], "angle": 0, "content": "fr: La charte permit la creation d'une guilde de marchands, dirigée par la bourgeoisie de la ville, qui faisait payer un impôt aux personnes traversant le quartier." }, { "type": "text", "bbox": [ 0.128, 0.172, 0.716, 0.182 ], "angle": 0, "content": "id: Piagam ini mengizinkanpembentukanserikat pedagang, yang dijalananoleh perwakilankota untuk menarik pajak dari orang yang melintasiborough." }, { "type": "text", "bbox": [ 0.128, 0.184, 0.692, 0.193 ], "angle": 0, "content": "it: Il trattato permise la creazione di una corporazione dei mercanti, gestita dai deputati della città per tassare coloro che attraversavano la zona," }, { "type": "text", "bbox": [ 0.128, 0.195, 0.454, 0.203 ], "angle": 0, "content": "ja: ごの憲章は、都市の選出代議士が商人向けの組合を設立するとを認わた。" }, { "type": "text", "bbox": [ 0.126, 0.206, 0.64, 0.214 ], "angle": 0, "content": "ko: 皇人章的会用在通他之法,有" }, { "type": "text", "bbox": [ 0.126, 0.217, 0.721, 0.226 ], "angle": 0, "content": "pt: A carta permitiu acriao de uma guila de commerciantes, administra de los burgueses da vila, para tributar as pessoas que passavam belrro." }, { "type": "text", "bbox": [ 0.126, 0.228, 0.737, 0.238 ], "angle": 0, "content": "ru: 30t yctab no3b0nll co3daTb opranH3aunTOropoBueB, pykoBDmmy jKHTenJIMr ropoJaIbn6noKeHHaNoIor mIooJeHn HanoIeH, npoxOaIxN CheepoRdoK." }, { "type": "text", "bbox": [ 0.127, 0.24, 0.658, 0.248 ], "angle": 0, "content": "tr: Tüzuk, kasabadan setzen kisilerin vergilendirilmesi icin kasaba sakinleri tarafindan yonetilen bir tüccar locasi olusturulmasini sagladi." }, { "type": "text", "bbox": [ 0.126, 0.251, 0.436, 0.259 ], "angle": 0, "content": "zh: 惠章曾允許創立由城鎮市民管理的商人行會,以向途經城鎮的人士徵收稅費。" }, { "type": "list", "bbox": [ 0.126, 0.094, 0.879, 0.259 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.113, 0.272, 0.885, 0.331 ], "angle": 0, "content": "Figure 8: Example from Parallel Sentiment and extraction results by the sentiment extractor. POSITIVE label was commonly given for the parallel sentences in 15 languages. Highlighted words in blue are the positive words detected by the sentient extractor, and the underlined words are the targets of the positive sentiment (targets are not cared in prompting in this work)." }, { "type": "table", "bbox": [ 0.258, 0.34, 0.745, 0.548 ], "angle": 0, "content": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">hints</td><td colspan=\"2\">T5</td><td colspan=\"2\">UL2</td><td colspan=\"2\">MT0</td><td colspan=\"2\">Llama2</td><td colspan=\"2\">Mixtral</td><td colspan=\"2\">Llama3</td></tr><tr><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td></tr><tr><td>ar</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>cs</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>de</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>en</td><td></td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>es</td><td>p</td><td>N</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>fi</td><td>p</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td></tr><tr><td>fr</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>id</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>it</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ja</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ko</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td></tr><tr><td>pt</td><td>p</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ru</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td></tr><tr><td>tr</td><td></td><td>N</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>zh</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.113, 0.556, 0.884, 0.587 ], "angle": 0, "content": "Table 2: Hints generated by the sentiment extractor, and sentiment classification results without and with hints for the sentences in Figure 8 on the four models. Highlighted cells indicate the correct predictions." }, { "type": "title", "bbox": [ 0.115, 0.61, 0.239, 0.627 ], "angle": 0, "content": "A Appendix" }, { "type": "title", "bbox": [ 0.115, 0.635, 0.312, 0.651 ], "angle": 0, "content": "A.1 Prompt for Phrase" }, { "type": "text", "bbox": [ 0.114, 0.656, 0.489, 0.736 ], "angle": 0, "content": "The hint prompt shown in Section 3.2 is for a sentiment expression consisting of a single word with a polarity. When multiple words form a positive or negative expression, the hint is generated in the following format:" }, { "type": "text", "bbox": [ 0.125, 0.739, 0.478, 0.772 ], "angle": 0, "content": "hint: \"[phrase]\" is a(n) [lang] phrase which has a [polarity] meaning." }, { "type": "text", "bbox": [ 0.114, 0.778, 0.489, 0.826 ], "angle": 0, "content": "For example, a sentence 'we never like it' has a negative expression, though \"like\" is a positive verb<sup>7</sup>. The hint in this case is:" }, { "type": "text", "bbox": [ 0.124, 0.843, 0.489, 0.875 ], "angle": 0, "content": "hint: “never like” is an English phrase which has a negative meaning." }, { "type": "text", "bbox": [ 0.114, 0.883, 0.489, 0.921 ], "angle": 0, "content": "The sentiment annotator cares about the parts-of-speech, thus \"like\" used as a preposition is not regarded as a positive word." }, { "type": "text", "bbox": [ 0.509, 0.611, 0.885, 0.643 ], "angle": 0, "content": "Similarly \"have merit\" (positive) and \"too short\" (negative) are given as phrasal hints." }, { "type": "title", "bbox": [ 0.51, 0.653, 0.719, 0.669 ], "angle": 0, "content": "A.2 Prompt Adjustment" }, { "type": "text", "bbox": [ 0.508, 0.674, 0.884, 0.755 ], "angle": 0, "content": "As mentioned in Section 4.2, the MTO model tends to output POSITIVE. Therefore, we replace \"Please just answer the label.\" in the prompt in Section 3.1 with the following sentence. This increases the MTO's base scores by \\(20\\%\\) on average." }, { "type": "text", "bbox": [ 0.518, 0.774, 0.871, 0.838 ], "angle": 0, "content": "In this case all input is either of them, and do not hesitate to select NEGATIVE when you think the input is relatively negative things in some way." }, { "type": "title", "bbox": [ 0.51, 0.853, 0.74, 0.869 ], "angle": 0, "content": "A.3 Multilingual Examples" }, { "type": "text", "bbox": [ 0.509, 0.874, 0.885, 0.922 ], "angle": 0, "content": "Figures 8 and 9 show the examples in Parallel Sentiment. As shown in the result of automatic sentiment extraction, the extractor does not always" }, { "type": "page_number", "bbox": [ 0.481, 0.929, 0.522, 0.941 ], "angle": 0, "content": "4816" } ], [ { "type": "code", "bbox": [ 0.123, 0.094, 0.802, 0.261 ], "angle": 0, "content": "ar: .s. \ncs: Tiberius podle dostupnych pramenu svheo odjezdu litoval a nekolkrat zadal, ay se smel do Rima vratit, ale Augustus jeho zdosti pokaedz de zamlt. \nde: Berichten zufolge bereute Tiberius seine Abreise und bat mehrfach um Erlaubnis, nach Rom zuruckzukehren, noch Augustus verweigerte him gedes Mal seineitte. \nen: Tiberius reportedly regretted his departure and requested to return to Rome several times, but each time Augustus refused his requests. \nes: Supuestamente, Tiberio se arrepintó de haberse marchado y solicitó varias vezes regresar a Roma, pero Augusto rechazo todas sus solicititudes. fi: Tiberiuksen kerrotaan katuneen lahtoaan ja pyytaeneen monta kerta saada palata Roomaan, mutta joka kerran Augustus hylkasiHanen pyntonsa. fr: Tiberere aurit regretion son depart et demande a retourer a Rome plusieurs fois, mais Auguste aurit refusechacune de ses demands. id: Tiberius dilaporkanmeniesaleberangkatanya dan meminta untuk umbalike Roma beberapa kalu, namun Augustus menolak permintaanya setiap kalii. it: Presumilmente, Tiberio si penti della sua partenza e richiese di tornare a Roma molte voltte, ma Augusto rifiutlo le sue richieste ogni volta. ja: TeiaVUSK is本身就 gai o-maru cei-foe che lveo. 10A MauHuaUstS TUsNtOgthn AuaGustsTosKg thou mao HuaUusStuNtS NcHto faglHoi. \nko: TotheRus was the saini duon that dore haoohayor eru moa rorlallrgo and Ongmou no daa As uWusS TUsNtS THeBriLus Uus's Ongmou t gafahd o. \npt: Tiberio supostamente lamentou a sua parte e pediu para regressar a Roma varias vezes, mas Augusto sempre recusou seu pedidos. ru: Tmbepin, no IMeIOUIMCBA CBeDINHM, IOKaJIEN O CBOeM IO PNOCSI NcCKOBKO pa3 BepHyTbCa B PIM, HO ABYCT KAKDbI PA3 OTKaBbIaN erO npoc6aM. tr: Aktarilarana gore Tiberius, gadisinden pisman oldu ve birkac kez Roma'ya donnek imedi ancak Augustus taleplerini her seferinde reddetti. zh: Dscnqptie iuei kndr hoe frrn. 2" }, { "type": "image_caption", "bbox": [ 0.113, 0.272, 0.884, 0.318 ], "angle": 0, "content": "Figure 9: Another example with NEGATIVE annotation. The words highlighted in pink are negative words detected by the system. In Spanish, a preterite form of \"solicitar\" ('to request') was wrongly detected as positive due to a wrong parsing result in a coordination structure." }, { "type": "table", "bbox": [ 0.256, 0.327, 0.744, 0.535 ], "angle": 0, "content": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">hints</td><td colspan=\"2\">T5</td><td colspan=\"2\">UL2</td><td colspan=\"2\">MT0</td><td colspan=\"2\">Llama2</td><td colspan=\"2\">Mixtral</td><td colspan=\"2\">Llama3</td></tr><tr><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td></tr><tr><td>ar</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>cs</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>de</td><td></td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>en</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>es</td><td>n,p</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>fi</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>fr</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>id</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>it</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ja</td><td>n,n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ko</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>pt</td><td>n,n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ru</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>tr</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>zh</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.186, 0.543, 0.809, 0.558 ], "angle": 0, "content": "Table 3: Results for sentences in Figure 9. Highlighted cells indicate the correct predictions." }, { "type": "text", "bbox": [ 0.113, 0.583, 0.489, 0.646 ], "angle": 0, "content": "extract sentiment expressions, and the recall is low in some languages such as Arabic, Korean and Chinese. It causes the low scores shown in \"No LLM\" bars in Figure 2." }, { "type": "text", "bbox": [ 0.113, 0.648, 0.489, 0.856 ], "angle": 0, "content": "Table 2 shows the sentiment classification results for the sentences in Figure 8. The column labeled 'hints' shows positive \\((p)\\) or negative \\((n)\\) words provided as hints, which correspond to highlighted words in Figure 8. The right part shows the classification results by six models, without \\((\\text{一} )\\) or with \\((\\text{十} )\\) hints. \\(^\\circ \\mathrm{P}\\) and \\(\\mathbf{\\ddot{N}}\\) denote POSITIVE and NEGATIVE respectively. \\(^\\circ \\mathrm{P}^{\\prime}\\) is the correct label for all the languages, so we can see the classification by all models was changed to the correct one in one or more languages, and when no hint was given, the result was unchanged, with an exception due to nondeterministic behavior of the UL2 model." }, { "type": "text", "bbox": [ 0.113, 0.858, 0.49, 0.922 ], "angle": 0, "content": "Table 3 shows the results for another example in Figure 9. The correct label is 'N'. MTO tends to select POSITIVE but the hints successfully invert the decision in 6 languages. The sentiment extractor" }, { "type": "text", "bbox": [ 0.509, 0.583, 0.883, 0.661 ], "angle": 0, "content": "outputs both positive and negative expressions in Spanish and both were added as hints, but it did not have detrimental results. This was the easy case for other models so prediction was NEGATIVE even without hints." }, { "type": "page_number", "bbox": [ 0.481, 0.929, 0.521, 0.941 ], "angle": 0, "content": "4817" } ]]123version https://git-lfs.github.com/spec/v1oid sha256:9896cabc46cdc3f1d84036ed986fbc12dd671f1243a4308ca56e22128fe7495csize 2168944123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257# Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models
Hiroshi Kanayama, Yang Zhao, Ran Iwamoto, Takuya Ohko
IBM Research
{hkana@jp., YangZhao@, ran.iwamoto1@, ohkot@jp.}ibm.com
# Abstract
This paper exploits a sentiment extractor supported by syntactic and lexical resources to enhance multilingual sentiment classification solved through the generative approach, without retraining LLMs. By adding external information of words and phrases that have positive/negative polarities, the multilingual sentiment classification error was reduced by up to 33 points, and the combination of two approaches performed best especially in high-performing pairs of LLMs and languages.
# 1 Introduction
The generative approach using Large Language Models (LLMs) performs very well even for nongenerative tasks such as topic classification (Brown et al., 2020) and sentiment polarity judgment (Zhao et al., 2023). LLMs have garnered attention, particularly for their capability to generalize languages in addressing those tasks without the need for task-specific training using ground truth. Many tasks can be solved in a zero-shot manner by providing appropriate prompts. However, the language coverage highly depends on LLMs, and the accuracy can be quite low if the model received insufficient training or tuning on specific languages. Retraining LLMs requires a high cost to cover additional languages, and it tends to cause catastrophic forgetting in languages that have already been covered (Winata et al., 2023). In recent attempts at knowledge editing, difficulties such as knowledge conflicts have been pointed out (Li et al., 2023), and it is not easy to apply to many languages.
Thus, we attempt to enhance multilingual sentiment classification based on the generative approach without computationally intensive processes for retraining and tuning LLMs. As depicted in Figure 1, our approach obtains lexical and syntactic information from an external sentiment extractor and inserts it into the prompt. This approach
 Figure 1: Concept of sentiment extraction using the prompt supported by an external sentiment extractor.
requires knowledge specific to tasks and languages but has advantages such as stability of outputs and controllability to add arbitrary knowledge to adapt to new languages or domains.
The contributions of this paper are threefold: (1) to integrate syntactic and lexical knowledge with prompts for LLMs, (2) to evaluate sentiment classification using six publicly available LLMs and parallel data in 15 languages, and (3) to demonstrate the positive impacts by integrating two components without any retraining.
# 2 Related Work
# 2.1 Multilingual Sentiment Extraction
This paper exploits a multilingual sentiment extraction method based on syntactic analysis and lexicon (Kanayama and Iwamoto, 2020). The extractor applies grammatical rules and a lexical dictionary to the common syntactic structure across languages defined by Universal Dependencies (UD) (Zeman and et al., 2017), and it extracts positive and negative phrases for many languages with high precision (although recall tends to be low for lower-resource languages), taking valence shifting such as negation into consideration.
Note that the sentiment extractor may detect one or more polar expressions from a single sentence or may not output anything when there is no explicit expression detected, and thus it does not directly solve the task of sentence-level sentiment classification discussed in Section 3.
# 2.2 Text Classification via Reasoning
Sun et al. (2023) proposed a prompting method, CARP, that enhances text classification by encouraging models to conduct reasoning. In CARP, a command to list words with polarity is added to the prompt, and it asks the model to describe the reason for classification. This strategy increased the accuracy of sentiment classification in most datasets.
In this paper, as shown in Figure 1, external knowledge is integrated into the prompt given to LLMs instead of relying solely on the knowledge embedded in LLMs. This approach enables us to broaden the language coverage and observe the characteristics of each LLM and the capability of knowledge extension using external components.
# 3 Sentiment Classification using Generative Model
This section describes the method to predict sentence polarity using an LLM and our proposal to integrate the output of an external sentiment extractor with a prompt.
# 3.1 Prompting
The task is binary classification of an input sentence into POSITIVE or NEGATIVE. Here we provide the following English prompt<sup>1</sup> to an LLM, in a zero-shot manner without providing labeled examples.
Classify the next [lang] sentence into POSITIVE or NEGATIVE. Please just answer the label. input: [input sentence] output:
[lang] is filled with the language name such as "Arabic" and "Japanese". Then we expect the model generates either POSITIVE or NEGATIVE after "output:".
# 3.2 Integration with Sentiment Extractor
To enhance the LLM's decision, when the sentiment extractor detects a polar expression, we insert a hint into the prompt between the 'input' and 'output' lines<sup>2</sup>.
hint: "[word]" is a(n) [lang] word which has a [polarity] meaning.
[word] is the surface form of the word that was detected to have a polarity, and [polarity] is "positive" or "negative". For example, from a Chinese sentence "我們很失望,...", the sentiment extractor detects the negative verb "失望" ('be disappointed') through syntactic parsing and dictionary lookup, then the line
hint: “失望” is a Chinese word which has a negative meaning.
is inserted in the prompt. If multiple polar expressions are detected, multiple lines are added. When a polar expression consists of multiple words (e.g. negation), a “phrase” is added as a hint. Refer to Appendix A.1 for its prompt.
# 4 Experimental Settings
# 4.1 Data Set
For evaluation of multilingual sentiment classification, we use Parallel Sentiment<sup>3</sup>. It consists of 106 parallel sentences (a subset of 1,000 sentences in the Parallel UD (PUD) corpora) for 19 languages annotated with positive or negative labels common for all languages, enabling us to evaluate the multilingual task with equal difficulty. We test in 15 languages that the sentiment extractor supports.
# 4.2 Language Models
We compare six LLMs that have diverse encoder-decoder architectures, language coverage in fine tuning, and model sizes.
- T5 (google/flan-t5-xxl) (Chung et al., 2024): The encoder-decoder model T5 with instruction tuning on 1,800 tasks that covers 60 languages (11 billion parameters). - UL2 (google/flan-ul2) (Wei et al.): The encoder-decoder model UL2 with instruction tuning (20b). - MT0 (bigscience/mt0-xxl) (Muennighoff et al., 2022): Multilingual T5 model with instruction tuning on 46 languages (13b). - Llama2 (meta-llama/llama-2-70b-chat) (Touvron et al., 2023): Decoder model Llama tuned for chat (70b). 90 percent of the pretraining data was English.
<table><tr><td>Model</td><td>Base</td><td>Hints</td><td>Override</td></tr><tr><td>No LLM</td><td>35.4</td><td></td><td>69.4</td></tr><tr><td>T5</td><td>68.5</td><td>78.6</td><td>78.6</td></tr><tr><td>UL2</td><td>73.9</td><td>75.2</td><td>80.2</td></tr><tr><td>MT0</td><td>68.8</td><td>79.2</td><td>80.7</td></tr><tr><td>Llama2</td><td>92.6</td><td>93.7</td><td>93.3</td></tr><tr><td>Mixtral</td><td>91.1</td><td>93.6</td><td>93.1</td></tr><tr><td>Llama3</td><td>95.7</td><td>96.6</td><td>95.9</td></tr></table>
Table 1: Macro F1 scores of sentiment classification averaged in 15 languages. Bold letters show the highest score in each row and the underlined number is the highest in all cases.
- Mixtral (mistralai/mixtral-8x7b-instruct-v01) (Jiang et al., 2024): The model composed from mixture of multiple expert models and tested on multiple European languages (45b). - Llama3 (meta-llama/llama-3-70b-instruct) (AI@Meta, 2024): The latest Llama model with instruction tuning. Though English accounts for 95 percent of the pretraining data, the bigger data and the larger vocabulary size support multilinguality (70b).
For all models, the answer is generated in a greedy decoding setting with the minimum and maximum token numbers set to 1 and 10, respectively. The MTO model tends to output POSITIVE in most cases, so we adjusted the prompt as shown in Appendix A.2 to balance the prediction.
# 4.3 Sentiment Extractor
We used the sentiment extractor's outputs for the Parallel Sentiment data set obtained from Kanayama and Iwamoto (2020) on request, and distribute them as supplemental material so that the entire experiments are reproducible. The detected sentiment words and phrases are associated with detailed syntax structures in CoNLL-U format processed by StanfordNLP (Qi et al., 2018), which helped improve the sentiment extraction process even beyond the gold annotations in PUD<sup>4</sup>.
# 5 Experimental Results
# 5.1 Overall Quality
Table 1 shows the overall results averaged across 15 languages. All numbers represent the macro F1
score of the binary sentiment classification. The weakest baseline, 35.4, corresponds to always predicting NEGATIVE<sup>5</sup> without utilizing the LLM or the sentiment extractor. A score of 69.4 was obtained by using only the sentiment extractor: answering the polarity of the sentiment expression closest to the main clause in the sentence when one or more sentiment expressions are detected<sup>6</sup>.
Next, the six models are compared. The column labeled 'Base' shows the scores of classification using the prompt outlined in Section 3.1. The smaller models, T5, UL2, and MT0, achieve scores around 70, while the larger models show much higher scores over 90, such as 95.7 in Llama3.
The column labeled 'Hints' shows the results when the additional hints described in Section 3.2 are incorporated. By adding this information, scores increased by more than 10 points in the T5 and MT0 models, and that means $33\%$ of errors were reduced in MT0. The absolute differences were smaller in some other models, but it is notable that $21\%$ of errors were reduced even from the very high score in the 'Base' of Llama3.
The column labeled 'Override' reports the scores when the polarity of sentiment expression detected by the sentiment extractor replaces the LLM's decision. When multiple sentiment expressions were detected the closest one to the root node was used, and when no expression was detected the LLM's decision was used. Therefore, this score estimates the upper bound of our approach with desirable prompts to inform the external knowledge to the LLM, assuming the polarities of expressions detected by the sentiment extractor are always correct. In UL2 and MT0, 'Override' exceeds 'Hints.' This implies that the hints in the prompt were not perfectly recognized by these models. On the other hand, in the high performing models (Llama2, Mixtral and Llama3), 'Hints' achieved the highest score through the integration of LLMs and the sentiment extractor.
# 5.2 Evaluation per Language
Figures 2 to 7 show the detailed results for 15 languages. The T5 model in Figure 2 shows high 'Base' scores for Romance and Germanic lan
 Figure 2: Macro F1 scores of each language on T5, shown with the sentiment extractor's scores in 'No LLM'.
 Figure 3: Scores of UL2 model.
 Figure 4: Scores of MT0 model.
guages, but for Arabic, Japanese, Korean and Chinese, the scores are close to the baseline, because the model almost always answers NEGATIVE due to the model's ignorance of words, even characters. The 'Hints' bars show the improvements in 13 languages by incorporating the output of the sentiment extractor, and it was drastic in Czech, Finnish, and Japanese. This was achieved even by the sentiment extractor that is far from perfect for classification, as shown in "No LLM" bars in Figure 2 and their average, 69.4 in Table 1.
Figure 3 shows a similar trend in the UL2 model, but the scores of 'Hints' tend to be lower than 'Override'. This suggests that the model does not recognize the hints added in the method described in Section 3.2 as effectively.
The MTO model, trained on multilingual data, performs stably for many languages as in Figure 4. Our method was the most effective for MTO among the six LLMs, especially in French and Japanese, and $33\%$ of errors were reduced in average.
Figures 5 to 7 show that the larger models, Llama2, Mixtral and Llama3 exhibit high multilingual capability in this task, with 'Base' scores of 87 or higher in all languages except for Arabic with
Llama2. Even from these high baseline scores, our proposed method improved the scores in 9 languages on Llama2, 12 languages on Mixtral and 7 languages on Llama3. Especially, French with Llama2 and Finnish with Llama3 were improved to near-perfect. Unlike the smaller models, 'Hints' outperformed 'Override' with few exceptions such as Russian with Llama2 and Finnish with Mixtral. This suggests that when the LLM has sufficient knowledge of the language, the best approach is to integrate the LLM and external knowledge, since there is still missing information in the model, and the hints from the external component are appropriately recognized through the prompt.
Indonesian is an outlier that tends to reduce scores from the baseline. It is because the original corpus UD_Indonesian-PUD has significant errors in white-spacing that cause failure of word detection, thus it is difficult for syntax-based component to detect sentiment expressions.
# 5.3 Error Analysis
Errors occurring only in 'Override' showcase the LLM's capability to appropriately ignore hints from external knowledge. Here is an example in German: in "... so gut wie unmöglich geworden"
 Figure 5: Scores of Llama2 model. Note that Figures 5 to 7 are shown in a different scale from Figures 2 to 4.
 Figure 6: Scores of Mixtral model.
 Figure 7: Scores of Llama3 model.
(‘become almost impossible’), the sentiment extractor detected “gut” (‘good’) as a positive word but it is not true in this context. MTO was influenced by the hint and wrongly judged as POSITIVE, but other models recognized this idiom and they answered NEGATIVE even when an incorrect hint was provided.
On the other hand, errors occurring only in 'Hints' reveal a need for improvement in the hints provided in prompts. MT0 tends to be confused with negation. For example, even with the hint 'hint: "no claro" is a Spanish phrase that has a negative meaning.', the model answered POSITIVE. This suggests the model likely misunderstood that "claro" ('clear') was a negative word and interpreted it as negated.
# 6 Conclusion
This paper exploited external knowledge for the multilingual sentiment classification task on LLMs and achieved promising results. It demonstrated that the sentiment extractor can compensate the lack of linguistic knowledge in LLMs in several languages. Additionally, even when incorrect information was provided, the LLMs were able to handle apparent mistakes, suggesting that the com
bination of the two approaches works best. However, several models did not recognize all the hints, indicating further enhancement of this combination is possible with better prompting techniques.
# 7 Limitations
This paper aims to explore the capability to incorporate external lexical and syntactic knowledge even when an LLM does not perform adequately for certain languages and domains, rather than solely pursuing state-of-the-art scores in a specific classification task. Therefore, there may be better systems (e.g. GPT-4) to solve this task more accurately. Nonetheless, this work is meaningful as it aims to improve the task even when large models are not applicable due to computational or legal reasons. Additionally, there is another advantage for users to control the resources without needing to retrain or fine-tune LLMs.
The sentiment extractor utilized in this paper does not always extract correct sentiment expressions and indeed, the recall is low for languages such as Korean and Chinese. Such an external component cannot be perfect but it is possible to enhance the syntactic rules and lexical resources when a new language is needed, and the updated
components can naturally be applied to our technique.
Since we are using small parallel data sets and not providing any machine learning model, the prompts and parameters were not fully optimized for this task and data set, except for the additional line for the prompt for the MTO model described in Section 4.2. Thus there can be better-performing prompts and parameters that could potentially improve the results further. Also, the evaluation datasets with limited number of instances cannot support the results with statistical significance for each language, thus we provide qualitative discussion with interpretable instances with outputs by the sentiment extractor.
# 8 Ethical Statement
Since we are using an existing dataset and LLMs for evaluation and we don't release new text data, there is no ethical concerns in this paper.
# References
AI@Meta. 2024. Llama 3 model card. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901. Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. 2024. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1-53. Albert Q. Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2024. Mixtral of experts. arXiv preprint arXiv:2401.04088. Hiroshi Kanayama and Ran Iwamoto. 2020. How Universal are Universal Dependencies? Exploiting Syntax for Multilingual Clause-level Sentiment Detection. In Proceedings of the 12th Language Resources and Evaluation Conference (LREC 2020), pages 4063-4073. Zhoubo Li, Ningyu Zhang, Yunzhi Yao, Mengru Wang, Xi Chen, and Huajun Chen. 2023. Unveiling the pit
falls of knowledge editing for large language models. arXiv preprint arXiv:2310.02129. Niklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, et al. 2022. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786. Peng Qi, Timothy Dozat, Yuhao Zhang, and Christopher D. Manning. 2018. Universal dependency parsing from scratch. In Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 160-170, Brussels, Belgium. Xiaofei Sun, Xiaoya Li, Jiwei Li, Fei Wu, Shangwei Guo, Tianwei Zhang, and Guoyin Wang. 2023. Text classification via large language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 8990-9005, Singapore. Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288. Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In International Conference on Learning Representations (ICLR). Genta Winata, Lingjue Xie, Karthik Radhakrishnan, Shijie Wu, Xisen Jin, Pengxiang Cheng, Mayank Kulkarni, and Daniel Preotiac-Pietro. 2023. Overcoming catastrophic forgetting in massively multilingual continual learning. In Findings of the Association for Computational Linguistics: ACL 2023, pages 768-777, Toronto, Canada. Association for Computational Linguistics. Daniel Zeman and et al. 2017. CoNLL 2017 shared task: Multilingual parsing from raw text to Universal Dependencies. In Proceedings of the CoNLL 2017 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 1-19, Vancouver, Canada. Yang Zhao, Tetsuya Nasukawa, Masayasu Muraoka, and Bishwaranjan Bhattacharjee. 2023. A simple yet strong domain-agnostic de-bias method for zero-shot sentiment classification. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 3923-3931.
ar: pabia n a y no a y y y y jil dill jil la yy jil lki elldi jll cs:Zakladacilistina umoznila vtyvoenkupeckeho spolku ovladaneho mestskym zastupitel, ktermyohl ybirat da nd tch, co timto samosprvnm mestem projizdeli. de: Die Grundungsurkunde eremogliche die Schaffung einer Handlerinnung, die von den Burgern der Stadt gefuhrt wurde, um Steuern von durch die Gemeinde reisenden Menschen zu erheiten. en: The charter allowed for the creation of a merchants' guild, run by the town's burgesses to tax people passing through the borough. es: La carta permía la creación del gremio de los mercaderes y se gestionaba por los burgueses de la Ciudad para cobrar impuestos a las personas agravés del municipio. fi: Peruskirjassa sallitlin kaupungin porvareiden johtaman kauppiaiden killan luominen, Jonka tarkoituksena oli verottaa ihmisä, jotka kulkivat kauppalan lapi. fr: La charte permit la creation d'une guilde de marchands, dirigée par la bourgeoisie de la ville, qui faisait payer un impôt aux personnes traversant le quartier. id: Piagam ini mengizinkanpembentukanserikat pedagang, yang dijalananoleh perwakilankota untuk menarik pajak dari orang yang melintasiborough. it: Il trattato permise la creazione di una corporazione dei mercanti, gestita dai deputati della città per tassare coloro che attraversavano la zona, ja: ごの憲章は、都市の選出代議士が商人向けの組合を設立するとを認わた。 ko: 皇人章的会用在通他之法,有 pt: A carta permitiu acriao de uma guila de commerciantes, administra de los burgueses da vila, para tributar as pessoas que passavam belrro. ru: 30t yctab no3b0nll co3daTb opranH3aunTOropoBueB, pykoBDmmy jKHTenJIMr ropoJaIbn6noKeHHaNoIor mIooJeHn HanoIeH, npoxOaIxN CheepoRdoK. tr: Tüzuk, kasabadan setzen kisilerin vergilendirilmesi icin kasaba sakinleri tarafindan yonetilen bir tüccar locasi olusturulmasini sagladi. zh: 惠章曾允許創立由城鎮市民管理的商人行會,以向途經城鎮的人士徵收稅費。
Figure 8: Example from Parallel Sentiment and extraction results by the sentiment extractor. POSITIVE label was commonly given for the parallel sentences in 15 languages. Highlighted words in blue are the positive words detected by the sentient extractor, and the underlined words are the targets of the positive sentiment (targets are not cared in prompting in this work).
<table><tr><td rowspan="2"></td><td rowspan="2">hints</td><td colspan="2">T5</td><td colspan="2">UL2</td><td colspan="2">MT0</td><td colspan="2">Llama2</td><td colspan="2">Mixtral</td><td colspan="2">Llama3</td></tr><tr><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td></tr><tr><td>ar</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>cs</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>de</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>en</td><td></td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>es</td><td>p</td><td>N</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>fi</td><td>p</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td></tr><tr><td>fr</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>id</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>it</td><td>p</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ja</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ko</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td></tr><tr><td>pt</td><td>p</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>ru</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td></tr><tr><td>tr</td><td></td><td>N</td><td>N</td><td>P</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td><td>P</td></tr><tr><td>zh</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>P</td></tr></table>
Table 2: Hints generated by the sentiment extractor, and sentiment classification results without and with hints for the sentences in Figure 8 on the four models. Highlighted cells indicate the correct predictions.
# A Appendix
# A.1 Prompt for Phrase
The hint prompt shown in Section 3.2 is for a sentiment expression consisting of a single word with a polarity. When multiple words form a positive or negative expression, the hint is generated in the following format:
hint: "[phrase]" is a(n) [lang] phrase which has a [polarity] meaning.
For example, a sentence 'we never like it' has a negative expression, though "like" is a positive verb<sup>7</sup>. The hint in this case is:
hint: “never like” is an English phrase which has a negative meaning.
The sentiment annotator cares about the parts-of-speech, thus "like" used as a preposition is not regarded as a positive word.
Similarly "have merit" (positive) and "too short" (negative) are given as phrasal hints.
# A.2 Prompt Adjustment
As mentioned in Section 4.2, the MTO model tends to output POSITIVE. Therefore, we replace "Please just answer the label." in the prompt in Section 3.1 with the following sentence. This increases the MTO's base scores by $20\%$ on average.
In this case all input is either of them, and do not hesitate to select NEGATIVE when you think the input is relatively negative things in some way.
# A.3 Multilingual Examples
Figures 8 and 9 show the examples in Parallel Sentiment. As shown in the result of automatic sentiment extraction, the extractor does not always
```txtar: .s. cs: Tiberius podle dostupnych pramenu svheo odjezdu litoval a nekolkrat zadal, ay se smel do Rima vratit, ale Augustus jeho zdosti pokaedz de zamlt. de: Berichten zufolge bereute Tiberius seine Abreise und bat mehrfach um Erlaubnis, nach Rom zuruckzukehren, noch Augustus verweigerte him gedes Mal seineitte. en: Tiberius reportedly regretted his departure and requested to return to Rome several times, but each time Augustus refused his requests. es: Supuestamente, Tiberio se arrepintó de haberse marchado y solicitó varias vezes regresar a Roma, pero Augusto rechazo todas sus solicititudes. fi: Tiberiuksen kerrotaan katuneen lahtoaan ja pyytaeneen monta kerta saada palata Roomaan, mutta joka kerran Augustus hylkasiHanen pyntonsa. fr: Tiberere aurit regretion son depart et demande a retourer a Rome plusieurs fois, mais Auguste aurit refusechacune de ses demands. id: Tiberius dilaporkanmeniesaleberangkatanya dan meminta untuk umbalike Roma beberapa kalu, namun Augustus menolak permintaanya setiap kalii. it: Presumilmente, Tiberio si penti della sua partenza e richiese di tornare a Roma molte voltte, ma Augusto rifiutlo le sue richieste ogni volta. ja: TeiaVUSK is本身就 gai o-maru cei-foe che lveo. 10A MauHuaUstS TUsNtOgthn AuaGustsTosKg thou mao HuaUusStuNtS NcHto faglHoi. ko: TotheRus was the saini duon that dore haoohayor eru moa rorlallrgo and Ongmou no daa As uWusS TUsNtS THeBriLus Uus's Ongmou t gafahd o. pt: Tiberio supostamente lamentou a sua parte e pediu para regressar a Roma varias vezes, mas Augusto sempre recusou seu pedidos. ru: Tmbepin, no IMeIOUIMCBA CBeDINHM, IOKaJIEN O CBOeM IO PNOCSI NcCKOBKO pa3 BepHyTbCa B PIM, HO ABYCT KAKDbI PA3 OTKaBbIaN erO npoc6aM. tr: Aktarilarana gore Tiberius, gadisinden pisman oldu ve birkac kez Roma'ya donnek imedi ancak Augustus taleplerini her seferinde reddetti. zh: Dscnqptie iuei kndr hoe frrn. 2```
Figure 9: Another example with NEGATIVE annotation. The words highlighted in pink are negative words detected by the system. In Spanish, a preterite form of "solicitar" ('to request') was wrongly detected as positive due to a wrong parsing result in a coordination structure.
<table><tr><td rowspan="2"></td><td rowspan="2">hints</td><td colspan="2">T5</td><td colspan="2">UL2</td><td colspan="2">MT0</td><td colspan="2">Llama2</td><td colspan="2">Mixtral</td><td colspan="2">Llama3</td></tr><tr><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td><td>-</td><td>+</td></tr><tr><td>ar</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>cs</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>de</td><td></td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>en</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>es</td><td>n,p</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>fi</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>fr</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>id</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>it</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ja</td><td>n,n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ko</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>pt</td><td>n,n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>ru</td><td>n</td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>tr</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr><tr><td>zh</td><td></td><td>N</td><td>N</td><td>N</td><td>N</td><td>P</td><td>P</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td><td>N</td></tr></table>
Table 3: Results for sentences in Figure 9. Highlighted cells indicate the correct predictions.
extract sentiment expressions, and the recall is low in some languages such as Arabic, Korean and Chinese. It causes the low scores shown in "No LLM" bars in Figure 2.
Table 2 shows the sentiment classification results for the sentences in Figure 8. The column labeled 'hints' shows positive $(p)$ or negative $(n)$ words provided as hints, which correspond to highlighted words in Figure 8. The right part shows the classification results by six models, without $(\text{一} )$ or with $(\text{十} )$ hints. $^\circ \mathrm{P}$ and $\mathbf{\ddot{N}}$ denote POSITIVE and NEGATIVE respectively. $^\circ \mathrm{P}^{\prime}$ is the correct label for all the languages, so we can see the classification by all models was changed to the correct one in one or more languages, and when no hint was given, the result was unchanged, with an exception due to nondeterministic behavior of the UL2 model.
Table 3 shows the results for another example in Figure 9. The correct label is 'N'. MTO tends to select POSITIVE but the hints successfully invert the decision in 6 languages. The sentiment extractor
outputs both positive and negative expressions in Spanish and both were added as hints, but it did not have detrimental results. This was the easy case for other models so prediction was NEGATIVE even without hints.123version https://git-lfs.github.com/spec/v1oid sha256:de3891a88a2d55d05b94d115e4b4d9a3ca183fc1626988309f096409a6b7cb96size 418480123version https://git-lfs.github.com/spec/v1oid sha256:76be73b6c6374b949212b6b7dd7f39ab771d68dc5b67f0b7cf48085f61e99b7fsize 1802164123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418# Incremental Sequence Labeling: A Tale of Two Shifts
Shengjie Qiu, Junhao Zheng, Zhen Liu, Yicheng Luo, Qianli Ma*
School of Computer Science and Engineering,
South China University of Technology, Guangzhou, China
shengjieqiu6@gmail.com, junhaozheng47@outlook.com,
{cszhenliu, csluoyicheng}@mail.scut.edu.cn, qianlima@scut.edu.cn*
# Abstract
The incremental sequence labeling task involves continuously learning new classes over time while retaining knowledge of the previous ones. Our investigation identifies two significant semantic shifts: E2O (where the model mislabels an old entity as a non-entity) and O2E (where the model labels a non-entity or old entity as a new entity). Previous research has predominantly focused on addressing the E2O problem, neglecting the O2E issue. This negligence results in a model bias towards classifying new data samples as belonging to the new class during the learning process. To address these challenges, we propose a novel framework, Incremental Sequential Labeling without Semantic Shifts (IS3). Motivated by the identified semantic shifts (E2O and O2E), IS3 aims to mitigate catastrophic forgetting in models. As for the E2O problem, we use knowledge distillation to maintain the model's discriminative ability for old entities. Simultaneously, to tackle the O2E problem, we alleviate the model's bias toward new entities through debiased loss and optimization levels. Our experimental evaluation, conducted on three datasets with various incremental settings, demonstrates the superior performance of IS3 compared to the previous state-of-the-art method by a significant margin. The data, code, and scripts are publicly available<sup>1</sup>.
# 1 Introduction
The conventional sequence labeling task typically involves categorizing data into a predetermined set of fixed categories (Lample et al., 2016). However, this approach may need to be revised in natural language processing scenarios, such as the named entity recognition task, where new types of entities continuously emerge. Adapting a fixed set of
 Figure 1: A sample shows two shifts in incremental sequence labeling. E2O denotes the semantic shift of an old entity (such as [PER]) to a non-entity ([O]), and O2E denotes the semantic shift of a non-entity ([O]) or an old entity(such as [GPE]) to a new entity (such as [DATE]). Inputs means input sentence. CL means current ground-truth label at step $t$ . FL means the full ground-truth label for all steps. Step $t - 1$ and Step $t$ means the predictions in step $t - 1$ and $t$ .
categories becomes challenging when faced with the dynamic nature of new entity classification requirements. Consequently, continuous model updates are essential to accommodating evolving entity types. Previous studies have advocated for adopting continual learning (Parisi et al., 2019; Monaikul et al., 2021), also known as lifelong learning or incremental learning. Continual learning is a paradigm designed to train models capable of adapting to the continual addition of new categories in real-world scenarios while ensuring that knowledge of old categories is retained. For instance, voice assistants like Siri frequently encounter new event types, such as pandemics, need to understand and provide health-protecting information based on the user's latest intent. (Monaikul et al., 2021).
Due to constraints imposed by storage limitations and privacy concerns, there exists a shortage of training data about the old categories (He and Zhu, 2022). Additionally, the manual relabeling of all categories within the new training dataset would incur substantial costs and time investment (De Lange et al., 2021; Bang et al., 2021). Conse
sequently, the model undergoes continuous updates using a freshly acquired dataset comprising the new categories. As depicted in Figure 1, the model undergoes training based on the current ground-truth label and undergoes testing using the full ground-truth label.
The incremental sequence labeling task faces a significant challenge known as the catastrophic forgetting problem, as extensively discussed in previous studies (McCloskey and Cohen, 1989; Robins, 1995; Goodfellow et al., 2013; Kirkpatrick et al., 2017; Zheng et al., 2024). This issue manifests as semantic shifts, leading to a decrease in the discriminative power of entity classes (Zhang et al., 2023b; Ma et al., 2023). In this paper, we decompose the problem into two primary semantic shifts in the incremental sequence task: E2O and O2E. The first semantic shift, E2O, arises from the presence of non-entities, potential old entities (mislabelled as non-entities), and new entities in the new dataset. Progress has been made in addressing E2O through methods falling into three categories: (1) Methods based on knowledge distillation: For instance, RDP proposes a knowledge distillation loss incorporating inter-task relations (Zhang et al., 2023b). At the same time, CFPD introduces a pooled feature distillation loss to alleviate catastrophic forgetting (Zhang et al., 2023a). (2) Methods based on pseudo-labels: OCILNER utilizes class prototypes to label new data (Ma et al., 2023), and CPFD employs old models to label predictions of new data. (3) Methods based on freezing models: Examples include ICE (Liu and Huang, 2023), which freezes the backbone model and old classifiers to maintain the stability of the old classes at the expense of learning new classes.
Existing methods primarily focus on addressing the E2O shift, neglecting the bias towards the emergence of new classes and the consequential second semantic shift, O2E. To address both semantic shifts, we propose a novel framework called Incremental Sequential Labeling without Semantic Shifts (IS3). IS3 consists of two key components: First, we apply the knowledge distillation method to tackle the E2O shift. Second, we address the O2E shift on two fronts. At the loss function level, we introduce a debiased cross-entropy loss function to mitigate the model's impact on old class distributions, reducing its inclination towards new entities. At the optimization level, we introduce a prototype-based approach to balance the imbalanced contributions of old and new entities during
batch updates, which aims to increase the involvement of old entities in the optimization process. Importantly, IS3 adopts a storage-efficient approach, maintaining only one prototype per class with minimal storage costs. Class feature centers serve as prototypes, ensuring no direct correspondence to actual sample information and mitigating privacy leakage concerns.
The contribution of our work can be summarized as follows:
- We propose a novel perspective on the semantic shift problem in incremental sequence labeling task by categorizing the catastrophic forgetting problem into E2O and O2E. - We propose a novel framework, Incremental Sequential Labeling without Semantic Shifts (IS3), to solve the two semantic shifts simultaneously. - We conduct experiments under nine CIL settings on three datasets, and our method outperforms the previous state-of-the-art methods.
# 2 Related Work
Incremental Learning The model continually acquires new tasks intending to achieve optimal performance on tasks previously learned (Gepperth and Hammer, 2016; Wu et al., 2019; van de Ven et al., 2022; Zheng et al., 2023b). There are three main categories of current incremental learning methods: regularization-based, rehearsal-based, and architecture-based. Regularization-based methods place constraints on model weights (Kirkpatrick et al., 2017; Zenke et al., 2017), representations of intermediate layer features (Hou et al., 2019; Douillard et al., 2020), and output probabilities (Li and Hoiem, 2017; Zheng et al., 2023a). Rehearsal-based methods overcome forgetting by saving some of the data containing the old classes for learning with the new classes (Lopez-Paz and Ranzato, 2017; Shin et al., 2017). Alternatively, architecture-based approaches involve dynamically expanding the network structure to allow for more data as new classes are added (Hou et al., 2018; Yan et al., 2021).
Incremental Sequence Labeling The traditional sequence labeling task is the task of labeling each token of a one-dimensional linear input sequence, which requires each token to be categorized according to its contextual content(Rei et al., 2016; Akbik et al., 2018). However, previous methods
 Figure 2: Illustration of E2O and O2E. When "Amy" encounters E2O problem, the label is biased from [PER] to [O]. When "California" encounters O2E problem, the label is shifted from [GPE] to [DATE].
can only recognize classes in a fixed set. Therefore, continuous learning paradigms are introduced in sequence labeling tasks, including incremental named entities (Monaikul et al., 2021; Zheng et al., 2022; Zhang et al., 2023a), incremental event detection (Cao et al., 2020; Yu et al., 2021), and so on.
Methods for incremental sequence labeling tasks can be categorized into distillation-based, rehearsal-based, and other approaches. Distillation-based methods encompass ExtendNER (Monaikul et al., 2021), which is the pioneer in applying knowledge distillation to incremental sequence labeling task, RDP (Zhang et al., 2023b) with a relational distillation approach, and CPFD (Zhang et al., 2023a) utilizing pooled features distillation loss. CFNER (Zheng et al., 2022) introduces a causal framework for extracting new causal effects in entities and nonentities. Rehearsal-based approaches include KCN (Cao et al., 2020) and $\mathrm{KD} + \mathrm{R} + \mathrm{K}$ (Yu et al., 2021), both employing rehearsal samples to address the class imbalance and catastrophic forgetting in incremental event detection. L&R (Xia et al., 2022) proposes a learn-and-review framework by training a new backbone model and a generative model simultaneously, generating synthetic samples of the old class to be trained with new samples. OCILNER (Ma et al., 2023) uses rehearsal samples to compute class feature centers as class prototypes, generates an entity-oriented feature space through comparative learning, and annotates new data with pseudo-labels using class prototypes. Other methods encompass span-based and freezing model-based approaches, among others.
The mentioned methodologies primarily focus on preserving the existing knowledge of the model and do not explicitly consider the implications of transitioning from non-entity to entity semantics. In contrast, our proposed method, IS3, provides a fresh perspective on model forgetting by addressing the model's inclination towards new classes during task adaptation. IS3 not only addresses issues related to model mislabeling, indirectly mitigating the problem of semantic migration from entity to non-entity, but also handles the challenge of semantic migration from non-entity to entity. By recognizing and addressing the model's bias towards new classes during adaptation, our approach offers a comprehensive solution to the dynamic challenges associated with transitioning between different semantic categories.
# 3 Problem Formulation
Formally, the objective of incremental sequence labeling is to acquire knowledge through a series of tasks $\mathcal{T} = \{\mathcal{T}_1,\mathcal{T}_2,\dots ,\mathcal{T}_N\}$ . Each task contains its dataset $\mathcal{D}_t = \{(x^i,y^i)|y^i\in \mathcal{V}_t\}$ where $(x^{i},y^{i})$ is a pair formed by the input token sentence and the label corresponding to each token in the sentence and $\mathcal{V}_t$ stands for the current label set. Notably, $y^{i}$ only labels the token corresponding to the current task $t$ , and the other tokens are labeled as O class (potential old entities $\mathcal{V}_{1:t}$ , and unseen entities $\mathcal{V}_{t + 1:N}$ ). At task $t$ ( $t > 1$ ), the new model $\mathcal{M}_t$ learns only from the new dataset and is expected to perform well on the learned classes $\bigcup_{i = 1}^{t}\mathcal{V}_{i}$ .
# 4 Method
In this section, we systematically address the catastrophic forgetting problem by decomposing it into two distinct semantic shift challenges (Section 4.1). Subsequently, we present a comprehensive framework designed to address these semantic shifts individually, focusing on E2O in Section 4.2 and O2E in Section 4.3. The overarching goal is to effectively mitigate the catastrophic forgetting problem, as illustrated in Figure 4.
# 4.1 Two semantic shift problems
In the incremental sequence labeling task, semantic shift can be decomposed into entity to non-entity semantic shift and non-entity to entity semantic shift, which are abbreviated as E2O and O2E.
E20 refers to the model incorrectly categorizing entities as non-entities during the learning process.
 Figure 3: Confusion Matrix of the ExtendNER method in Task 4. It indicates that the model predicts the old entities as new entities with high probability and predicts the old entity as non-entity, with severe O2E semantic shift and E2O semantic shift.
This misclassification stems from the incremental sequence labeling task, where only new entities are labeled in the new dataset, potentially causing old entities to be erroneously labeled as non-entities. For instance, in Figure 2, the name "Amy" is mistakenly labeled as a non-entity. This misclassification induces a gradual shift in the semantics of old entities towards non-entities, leading to a blurred boundary between the two classes. Several previous approaches have addressed this bias issue. Methods like RDP focus on designing improved distillation techniques to maintain the stability of the model's old entities. Similarly, OCILNER utilizes comparative learning to obtain a more discriminative feature space, clarifying the classification boundaries between entities and non-entities. These strategies aim to mitigate the impact of E2O, ensuring a more accurate preservation of entity semantics during incremental sequence labeling tasks.
O2E signifies the model incorrectly labeling nonentities or old entities as new entities during the learning process. As seen in Figure 2, our observations indicate that the model maintains good discrimination between old entities. However, Figure 3 shows a bias towards new entities in predictions during incremental learning. Our research identifies two key contributing factors to this bias.
The first factor is related to the classifier dimension's predisposition. When learning new entities, the ordinary cross-entropy function induces the
model to fit and converge faster on the distribution of new entities by excessively penalizing the classifier dimension associated with old entities. This over-penalization of old entities results in a pronounced bias in significant classification scores towards the new classes.
The second factor involves a tendency at the feature optimization level. The current dataset mainly contains samples of new entities with minimal representation from other entities, including potential old and future new entities, to facilitate effective learning of new entities. As a result, in the same batch, the probability of old entities participating in model optimization is much lower than the probability of new entities' participation. Consequently, there is a predisposition towards new categories at the feature optimization level. Addressing these aspects is crucial for mitigating the O2E semantic shift and achieving more balanced and accurate predictions during incremental sequence labeling tasks.
Notably, the E2O and O2E problems are interconnected. If the O2E problem occurs in the model during incremental sequence labeling, it can gradually blur the boundaries among entities. It can also indirectly contribute to the E2O problem, ultimately impacting the model's discriminative ability. We will address these two semantic biases separately to mitigate catastrophic forgetting during incremental sequence labeling.
# 4.2 Solving E2O problem via knowledge distillation
When learning the current task $t$ , the model $\mathcal{M}^t$ is trained on the training examples with the current entities, which often leads to catastrophic forgetting for the old entities. To alleviate the E2O problem, we use knowledge distillation (Hinton et al., 2015). This method preserves the prior knowledge by distilling the output probabilities from the old $\mathcal{M}^{t-1}$ to the current model $\mathcal{M}^t$ . Therefore, the objective function for solving the E2O problem can be expressed as:
$$\mathcal {L} _ {k d} = \frac {1}{| \mathcal {D} _ {t} |} \sum_ {i = 1} ^ {| \mathcal {D} _ {t} |} \hat {y} _ {i} ^ {t - 1} \log \hat {y} _ {i} ^ {t}, \tag {1}$$
where $\hat{y}_i^{t - 1}$ and $\hat{y}_i^t$ represent the output probabilities of the current model and the old model respectively.
Through Eq.1, "Amy" in Figure 4 corrects the current model's incorrect labeling via the output
 Figure 4: Overview of our framework IS3 for incremental sequence labeling. We solve the O2E problem by distillation loss $L_{kd}$ . Besides, we use two modules: debiased cross-entropy loss $L_{ce}^{Debias}$ and prototype learning to solve the E2O problem.
probabilities provided by the old model, thus maintaining discriminative properties between old entities.
# 4.3 Solving O2E problem
In this section, we address the O2E problem at the debiased loss and feature optimization levels.
# 4.3.1 Debiasing in Ordinary Cross Entropy
The overall model parameters are defined as $\Theta = \{\theta, \omega\}$ . The model's backbone $f_{\theta}: X \to \mathbb{R}^d$ extracts feature embeddings of dimension $d$ from the inputs. Following the backbone, a linear classifier produces logits $\Phi(\cdot) = \omega^T \cdot f_{\theta}(\cdot): X \to \mathbb{R}^{|\mathcal{Y}_t|}$ , where $\omega$ represents the classifier weights for the corresponding dimensions. As the number of classes of recognizable entities increases as well, the dimension of the classifier increases. The model is trained by a cross-entropy loss function, which is defined as:
$$\begin{array}{l} \mathcal {L} _ {c e} = - \frac {1}{| \mathcal {D} _ {t} |} \sum_ {i = 1} ^ {| \mathcal {D} _ {t} |} y _ {i} \log \left(\frac {e ^ {\Phi_ {y _ {i}} (x _ {i})}}{\sum_ {y ^ {\prime} \in \mathcal {Y} _ {t}} e ^ {\Phi_ {y ^ {\prime}} (x _ {i})}}\right) \\ = \frac {1}{\left| \mathcal {D} _ {t} \right|} \sum_ {i = 1} ^ {\left| \mathcal {D} _ {t} \right|} \log \left[ 1 + \sum_ {y ^ {\prime} \neq y _ {i}} e ^ {\Phi_ {y ^ {\prime}} \left(x _ {i}\right) - \Phi_ {y _ {i}} \left(x _ {i}\right)} \right], \tag {2} \\ \end{array}$$
where $y_{i}$ denotes the label of the new entity for the current incremental step $t$ and $y'$ denotes the labels
not equal to $y_{i}$ . Figure 3 shows that confusion matrix of previous method at incremental step 4. It clearly shows that most predictions are biased towards the recent entity (class 4). We find that such a bias can be found in the cross-entropy loss function. When learning new entities, the model's gradient update for old entities is defined as:
$$\frac {\partial \mathcal {L} _ {c e}}{\partial \omega_ {y ^ {\prime}}} \propto e ^ {\Phi_ {y ^ {\prime}} \left(x _ {i}\right)} \left(y ^ {\prime} \neq y _ {i}\right), \tag {3}$$
where the gradient update for old entities is proportional to the classification score for that entity. During the incremental sequence labeling process, this gradient update exhibits an overly penalizing effect on the old entity probability distributions. It shows up as an excessive reduction in the output probability score of the old entity. We provide a more detailed explanation and derivation in Appendix A.
We assume the old model has learned the optimal representation of old entities. Therefore, the new entities should have a smaller impact on the knowledge of old entities. Otherwise, because of the absence of rehearsal samples of the old entities, the model will face catastrophic forgetting of the old entities. In addition, the new entity was not in the predefined set, and a change from a non-entity to a new entity occurs during learning. Therefore,
it is reasonable to have a penalizing effect on nonentities, and the debiased cross-entropy loss function is defined as follows:
$$\mathcal {L} _ {c e} ^ {D e b i a s} = \frac {1}{| \mathcal {D} _ {t} |} \sum_ {i = 1} ^ {| \mathcal {D} _ {t} |} \log \left[ 1 + \sum_ {y ^ {\prime} \neq y _ {i}} e ^ {\delta \Phi_ {y ^ {\prime}} \left(x _ {i}\right) - \Phi_ {y _ {i}} \left(x _ {i}\right)} \right], \tag {4}$$
where $\delta$ is the correction factor for the gradient update of the old entity weights (excluding nonentity weights), $\delta \in [0,1]$ . When $\delta \rightarrow 0$ , the model will no longer penalize the learning of old entities. When $\delta \rightarrow 1$ , Eq.4 degenerates to the traditional cross-entropy loss function.
# 4.3.2 Learning with Prototypes
In Section 4.1, we elucidate the reasons behind the emergence of O2E at the feature optimization level. In this section, we introduce the utilization of class centers of old entities as class prototypes during the learning process of new entities. Following each task training, we compute prototypes using feature representations from the training set and store them. These prototypes then participate in training the model classifier for the subsequent task alongside the feature representations of new entities.
The class prototypes of old entities serve two essential purposes: firstly, they participate in optimization alongside new entities in each batch, ensuring a balanced optimization process among entities. Secondly, these class prototypes act as anchors in the feature space, mitigating the issue of over-labeling new entities. As depicted in Figure 4, the introduction of old prototypes reduces the potential over-labeling of new entities, enhancing the precision of new entity learning.
To this end, we defined the loss function of prototypes as follows:
$$\mathcal {L} _ {p r o} = - \sum_ {i = 1} ^ {t - 1} \widetilde {y _ {i}} \log \left(\frac {e ^ {\omega^ {T} \mathcal {P} _ {i}}}{\sum_ {j = 0} ^ {| \mathcal {Y} _ {t} |} e ^ {\omega^ {T} \mathcal {P} _ {j}}}\right), \tag {5}$$
where $\widetilde{y_i}$ stands for the label of the old prototype and $\mathcal{P}_i$ , $\mathcal{P}_j$ stand for old prototypes, defined as follows:
$$\mathcal {P} _ {t} = \frac {1}{| \mathcal {D} _ {t} |} \sum_ {i = 1} ^ {| \mathcal {D} _ {t} |} f _ {\theta} \left(x _ {i}\right). \tag {6}$$
Our approach differs from OCILNER's approach, which uses prototypes in two ways:(1) OCILNER's approach stores old samples for calculating prototypes. However, in this paper, we only use the training data in each incremental step for
calculating prototypes and do not introduce replay samples. (2) OCILNER uses prototypes to label new datasets and adopts a cosine similarity as the threshold for entity labeling. However, in this paper, we found that some of the real non-entities also have a high cosine similarity with entities, which can easily produce wrong labeling for real non-entities and exacerbate semantic migration from entities to non-entities. Therefore, to avoid incorrectly labeling non-entities, we use only class centers as prototypes and do not use prototypes for labeling existing entities.
In summary, the objective function of our method is defined as follows:
$$\mathcal {L} = \underbrace {\mathcal {L} _ {c e} ^ {D e b i a s} + \alpha \mathcal {L} _ {p r o}} _ {\mathcal {L} _ {O 2 E}} + \underbrace {\beta \mathcal {L} _ {k d}} _ {\mathcal {L} _ {E 2 O}}. \tag {7}$$
# 5 Experiments
# 5.1 Experimental Setup
Datasets We conducted experiments on three widely used datasets: i2b2 (Murphy et al., 2010), OntoNotes5 (Hovy et al., 2006), and MAVEN (Wang et al., 2020). We divide the dataset into disjoint slices according to categories. In each slice, we keep only the category labels visible to the current task, and the rest of the labels are labeled as non-entities.
Settings We sort the above slices according to initial letter and train them in a FG- $a$ -PG- $b$ manner. FG means that the pre-trained model is trained with $a$ entity types as the initial model, and PG means that the initial model is trained with $b$ entity types at each following incremental step.
Baselines We consider the following state-of-the-art methods for incremental sequence labeling: Self-Training (Rosenberg et al., 2005; De Lange et al., 2019), ExtendNER (Monaikul et al., 2021), CFNER (Zheng et al., 2022), DLD (Zhang et al., 2023c), RDP (Zhang et al., 2023b), OCILNER (Ma et al., 2023), ICE (Liu and Huang, 2023), CFPD (Zhang et al., 2023a). Detailed descriptions of the baselines and their experimental setup are provided in Appendix C.
Implementation Details We use bert-base-cased model from HuggingFace (Wolf et al., 2019) as backbone, with a hidden dimension of $d = 768$ . In addition to this, we have included supplemental experiments with the roberta-base model on the relevant datasets in Appendix E. We use the AdamW (Loshchilov and Hutter, 2018) optimizer,
Table 1: Comparisons with state-of-the-art methods on the i2b2 dataset using the bert-base-cased model. The best results are highlighted in bold and the second best results are underlined. The average of each incremental step is provided in Figure 5.
<table><tr><td rowspan="2">Methods</td><td colspan="2">FG-1-PG-1</td><td colspan="2">FG-2-PG-2</td><td colspan="2">FG-8-PG-1</td><td colspan="2">FG-8-PG-2</td></tr><tr><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td></tr><tr><td>FT</td><td>2.16 ± 0.18</td><td>14.98 ± 0.47</td><td>7.38 ± 1.10</td><td>25.00 ± 0.74</td><td>2.41 ± 0.17</td><td>16.14 ± 1.81</td><td>6.38 ± 1.23</td><td>25.82 ± 1.36</td></tr><tr><td>SelfTrain</td><td>17.76 ± 1.75</td><td>37.32 ± 2.28</td><td>36.63 ± 6.27</td><td>54.07 ± 3.12</td><td>7.01 ± 3.51</td><td>27.27 ± 3.47</td><td>24.05 ± 6.61</td><td>47.81 ± 2.81</td></tr><tr><td>ExtendNER</td><td>19.54 ± 1.59</td><td>39.10 ± 3.17</td><td>29.20 ± 5.86</td><td>48.26 ± 4.05</td><td>7.83 ± 1.42</td><td>29.03 ± 1.15</td><td>24.00 ± 6.40</td><td>42.53 ± 2.92</td></tr><tr><td>CFNER</td><td>34.15 ± 4.79</td><td>50.15 ± 2.18</td><td>47.21 ± 2.99</td><td>58.03 ± 2.28</td><td>21.50 ± 1.49</td><td>38.53 ± 1.01</td><td>23.91 ± 3.91</td><td>46.31 ± 3.39</td></tr><tr><td>DLD</td><td>23.03 ± 4.08</td><td>42.87 ± 4.35</td><td>41.05 ± 2.79</td><td>57.28 ± 1.37</td><td>13.10 ± 3.05</td><td>35.12 ± 2.24</td><td>32.01 ± 4.47</td><td>51.66 ± 1.71</td></tr><tr><td>RDP</td><td>28.05 ± 1.85</td><td>47.61 ± 2.03</td><td>44.53 ± 2.79</td><td>59.75 ± 1.25</td><td>26.83 ± 3.01</td><td>42.02 ± 1.57</td><td>41.43 ± 5.32</td><td>56.92 ± 4.07</td></tr><tr><td>OCILNER</td><td>9.30 ± 1.79</td><td>27.75 ± 2.82</td><td>18.45 ± 3.18</td><td>42.43 ± 1.90</td><td>19.76 ± 3.56</td><td>41.01 ± 2.77</td><td>24.86 ± 2.12</td><td>46.75 ± 2.14</td></tr><tr><td>ICE_PLO</td><td>35.45 ± 0.91</td><td>45.65 ± 1.32</td><td>40.32 ± 0.58</td><td>50.25 ± 0.93</td><td>44.79 ± 0.93</td><td>50.61 ± 0.72</td><td>44.23 ± 2.22</td><td>51.05 ± 1.83</td></tr><tr><td>ICE_O</td><td>36.96 ± 1.17</td><td>46.93 ± 1.07</td><td>43.29 ± 1.79</td><td>51.24 ± 1.70</td><td>46.24 ± 1.36</td><td>51.70 ± 0.85</td><td>49.10 ± 1.33</td><td>53.56 ± 1.22</td></tr><tr><td>CPFD</td><td>17.72 ± 3.95</td><td>46.11 ± 1.45</td><td>31.44 ± 5.19</td><td>53.84 ± 2.39</td><td>5.0 ± 3.97</td><td>32.86 ± 3.49</td><td>23.03 ± 7.47</td><td>50.26 ± 3.38</td></tr><tr><td>IS3 (Ours)</td><td>43.88 ± 2.05</td><td>56.87 ± 0.56</td><td>54.84 ± 1.35</td><td>61.83 ± 0.87</td><td>50.75 ± 1.28</td><td>58.38 ± 1.35</td><td>56.96 ± 0.68</td><td>63.03 ± 1.07</td></tr></table>




 (a) i2b2 (FG-1-PG-1) (e) OntoNotes5 (FG-1-PG-1) Figure 5: Comparison of the step-wise Macro F1 score on i2b2 and OntoNotes5.
 (b) i2b2 (FG-2-PG-2) (f) OntoNotes5 (FG-2-PG-2)
 (c) i2b2 (FG-8-PG-1) (g) OntoNotes5 (FG-8-PG-1)
 (d) i2b2 (FG-8-PG-2) (h) OntoNotes5 (FG-8-PG-2)
with learning rate $1e^{-6}$ and $1e^{-3}$ for backbone and classifier. We report the mean and standard deviation results over five runs.
Metrics Considering that each of the categories should have a comparable degree of contribution in the test, we use Macro F1 to evaluate the performance of the model. We use the last step Macro F1 result in $\mathcal{A}_T$ , and the average Macro F1 result in $\bar{\mathcal{A}}$ , on all incremental steps as evaluation metrics. $\mathcal{A}_T$ and $\bar{\mathcal{A}}$ are defined in Appendix D.
# 5.2 Results and Analysis
Comparisons with State-Of-The-Art To validate the effectiveness of our approach, we conducted exhaustive experiments on the i2b2, OntoNotes5, and MAVEN datasets. We used the
Finetune Only (FT) approach as a lower bound for comparison. Table 1 and Table 8 display the results of the experiments conducted on i2b2. Due to space limitations, we provide the results on MAVEN in Table 6 and OntoNotes5 in Table 7 and Table 9. In detail, we show the experimental results under nine incremental learning settings through Figure 6. Our method consistently outperforms the previous state-of-the-art method in multiple settings, from FG-1-PG-1 to FG-8-PG-2. The poor performance of the previous method may be attributed to the ignorance of O2E. As shown in Figure 7, during the learning process, the previous method, ExtendNER, incorrectly confuses new entities with non-entities due to O2E errors, and old entities with non-entities due to E2D errors. These issues together lead to
 Figure 6: The comparison between our method and previous state-of-the-art methods on nine incremental learning settings. We report the MacroF1 score after learning the final task. The detailed results are provided in Table 1 and Tables 6-9.
 (a) ExtendNER
 (b) IS3 (Ours) Figure 7: Visualization of prediction of previous method and IS3 approach in task 4. Our approach greatly mitigates the E2O and O2E shift problems and balances the old and new classes well on the model predictions.
poor prediction results for the model. We have effectively mitigated the above problems through our framework IS3, which strikes a good balance between maintaining old entities and learning new ones.
To further demonstrate the effectiveness of our method, we visualize the feature representation through T-SNE (Van der Maaten and Hinton, 2008). As shown in Figure 9, the ExtendNER method faces serious E2O and O2E problems, with new entities and non-entities overwriting old ones, leading to catastrophic forgetting. Our method successfully addresses the issue of semantic bias that arises when the model learns a new task.
Ablation Study We explored the validity of the components of our approach through ablation experiments, and the results are shown in Table 2. We removed the debiased cross-entropy loss $\mathcal{L}_{ce}^{Debias}$ and prototype loss $\mathcal{L}_{pro}$ modules, respectively. These results demonstrate the essential roles
Table 2: The ablation study of our method on i2b2 and OntoNotes5 under the setting FG-1-PG-1, MAVEN under the setting FG-18-PG-10. The ablation of each component resulted in a significant decrease in model performance, proving the effectiveness of all our components.
<table><tr><td rowspan="2">Methods</td><td colspan="2">i2b2</td><td colspan="2">OntoNotes5</td><td colspan="2">MAVEN</td></tr><tr><td>\( A_T \)</td><td>\( \bar{A} \)</td><td>\( A_T \)</td><td>\( \bar{A} \)</td><td>\( A_T \)</td><td>\( \bar{A} \)</td></tr><tr><td>IS3 (Ours)</td><td>43.88±2.05</td><td>56.87±0.56</td><td>50.23±0.94</td><td>54.65±0.84</td><td>40.15±0.38</td><td>48.16±0.16</td></tr><tr><td>w/o \( \mathcal{L}_{ce}^{Debias} \)</td><td>40.79±0.89</td><td>54.39±0.19</td><td>47.89±0.91</td><td>52.77±1.21</td><td>38.19±0.98</td><td>46.56±0.58</td></tr><tr><td>w/o \( \mathcal{L}_{pro} \)</td><td>25.88±2.78</td><td>45.95±2.53</td><td>44.26±1.33</td><td>50.07±1.08</td><td>34.64±0.78</td><td>45.15±0.39</td></tr><tr><td>w/o Both</td><td>23.22±2.12</td><td>37.81±3.81</td><td>42.77±0.22</td><td>49.11±0.49</td><td>31.03±0.34</td><td>42.61±0.87</td></tr></table>
played by both $\mathcal{L}_{ce}^{Debias}$ and $\mathcal{L}_{pro}$ modules. The $\mathcal{L}_{ce}^{Debias}$ reduces the penalizing effect of the new entity on the old entity and enhances the discrimination between the old and new entities by improving the prediction confidence of the old entity. The $\mathcal{L}_{pro}$ corrects the bias of modeling new entities by shrinking the scope of over-labeling new entities through old prototypes.
Hyper-Parameter Analysis Figure 10 shows the results of different hyper-parameter choices on OntoNotes5 with the setting FG-1-PG-1. We consider two hyper-parameters: the correction factor in the debiased cross-entropy loss $\delta$ and the weight of the prototype loss $\beta$ . The results show that $\delta$ around 0.5 reaches the best result, indicating that a moderate penalty effect reduction favors model performance. As $\beta$ keeps increasing, it makes the model overfit for the old prototype, leading to a decrease in model performance.
Case Study We provide an example in Figure 8 to demonstrate that the previous method suffers from an O2E offset when learning a new entity ORG, overwriting the old entity EVENT as a new entity. Simultaneously, the model inherits past O2E issues (labeling [O] as [DATE]). Additionally, it suffers from E2O, which fails to recognize the old entity accurately. Our method effectively balances these two offset problems and is more conducive to model learning.
# 6 Conclusion
In this paper, we introduce a novel perspective on the catastrophic forgetting problem in incremental sequence annotation, identifying and addressing both E2O and O2E semantic shifts. Bridging gaps in previous research, we propose the IS3 framework to tackle both issues. Comprehensive experiments on three datasets demonstrate that our IS3 method significantly outperforms previous state-of-the-art approaches. This work provides a fresh
 Figure 8: A sample from OntoNotes5. EVENT, DATE, GPE are old entities. ORG is a new entity. The previous method had the issue of mislabeling non-entities as old entities and overwriting old entities as new ones. In contrast, our method accurately labels old entities when learning the new entity, demonstrating its effectiveness and superiority.
 (a) ExtendNER
 (b) IS3 (Ours)
 Figure 9: The T-SNE visualization of the feature representations on ExtendNER and our method. Our approach IS3 greatly mitigates O2E and E2O, resulting in good discrimination between old and new entities. Figure 10: The results of different hyper-parameter choices on i2b2 with the setting FG-1-PG-1. We show the results are $\delta \in (0,1]$ and $\beta \in (0,1]$ .
outlook on the incremental sequence labeling task and offers effective solutions to mitigate the catastrophic forgetting problem.
# Limitations
While the proposed method effectively mitigates catastrophic forgetting to some extent, its reliance
on the predictions of old models for preserving existing knowledge can result in accumulated prediction errors, which may lead to poor model performance in more incremental steps. Moreover, the current method does not thoroughly explore the relationship between the penalty effect and the dataset, leaving potential avenues for future research.
# Acknowledgements
The work described in this paper was partially funded by the National Natural Science Foundation of China (Grant No. 62272173), the Natural Science Foundation of Guangdong Province (Grant Nos. 2024A1515010089, 2022A1515010179), the Science and Technology Planning Project of Guangdong Province (Grant No. 2023A0505050106), and the National Key R&D Program of China (Grant No. 2023YFA1011601).
# References
Alan Akbik, Duncan Blythe, and Roland Vollgraf. 2018. Contextual string embeddings for sequence labeling. In Proceedings of the 27th international conference on computational linguistics, pages 1638-1649.
Jihwan Bang, Heesu Kim, YoungJoon Yoo, Jung-Woo Ha, and Jonghyun Choi. 2021. Rainbow memory: Continual learning with a memory of diverse samples. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8218-8227. Pengfei Cao, Yubo Chen, Jun Zhao, and Taifeng Wang. 2020. Incremental event detection via knowledge consolidation networks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 707-717. Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory Slabaugh, and Tinne Tuytelaars. 2019. Continual learning: A comparative study on how to defy forgetting in classification tasks. arXiv preprint arXiv:1909.08383, 2(6):2. Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory Slabaugh, and Tinne Tuytelaars. 2021. A continual learning survey: Defying forgetting in classification tasks. IEEE transactions on pattern analysis and machine intelligence, 44(7):3366-3385. Arthur Douillard, Matthieu Cord, Charles Ollion, Thomas Robert, and Eduardo Valle. 2020. Podnet: Pooled outputs distillation for small-tasks incremental learning. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XX 16, pages 86-102. Springer. Alexander Gepperth and Barbara Hammer. 2016. Incremental learning algorithms and applications. In European symposium on artificial neural networks (ESANN). Ian J Goodfellow, Mehdi Mirza, Da Xiao, Aaron Courville, and Yoshua Bengio. 2013. An empirical investigation of catastrophic forgetting in gradient-based neural networks. arXiv preprint arXiv:1312.6211. Jiangpeng He and Fengqing Zhu. 2022. Exemplar-free online continual learning. In 2022 IEEE International Conference on Image Processing (ICIP), pages 541-545. IEEE. Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531. Saihui Hou, Xinyu Pan, Chen Change Loy, Zilei Wang, and Dahua Lin. 2018. Lifelong learning via progressive distillation and retrospection. In Proceedings of the European Conference on Computer Vision (ECCV), pages 437-452. Saihui Hou, Xinyu Pan, Chen Change Loy, Zilei Wang, and Dahua Lin. 2019. Learning a unified classifier incrementally via rebalancing. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 831-839.
Eduard Hovy, Mitch Marcus, Martha Palmer, Lance Ramshaw, and Ralph Weischedel. 2006. Ontonotes: the $90\%$ solution. In Proceedings of the human language technology conference of the NAACL, Companion Volume: Short Papers, pages 57-60. James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. 2017. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521-3526. Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, and Chris Dyer. 2016. Neural architectures for named entity recognition. arXiv preprint arXiv:1603.01360. Zhizhong Li and Derek Hoiem. 2017. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935-2947. Minqian Liu and Lifu Huang. 2023. Teamwork is not always good: An empirical study of classifier drift in class-incremental information extraction. In Findings of the Association for Computational Linguistics: ACL 2023, pages 2241-2257, Toronto, Canada. Association for Computational Linguistics. David Lopez-Paz and Marc'Aurelio Ranzato. 2017. Gradient episodic memory for continual learning. Advances in neural information processing systems, 30. Ilya Loshchilov and Frank Hutter. 2018. Decoupled weight decay regularization. In International Conference on Learning Representations. Ruotian Ma, Xuanting Chen, Zhang Lin, Xin Zhou, Junzhe Wang, Tao Gui, Qi Zhang, Xiang Gao, and Yun Wen Chen. 2023. Learning "O" helps for learning more: Handling the unlabeled entity problem for class-incremental NER. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5959-5979, Toronto, Canada. Association for Computational Linguistics. Michael McCloskey and Neal J Cohen. 1989. Catastrophic interference in connectionist networks: The sequential learning problem. In *Psychology of learning and motivation*, volume 24, pages 109-165. Elsevier. Natawut Monaikul, Giuseppe Castellucci, Simone Filice, and Oleg Rokhlenko. 2021. Continual learning for named entity recognition. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 13570-13577. Shawn N Murphy, Griffin Weber, Michael Mendis, Vivian Gainer, Henry C Chueh, Susanne Churchill, and Isaac Kohane. 2010. Serving the enterprise and beyond with informatics for integrating biology and the bedside (i2b2). Journal of the American Medical Informatics Association, 17(2):124-130.
German I Parisi, Ronald Kemker, Jose L Part, Christopher Kanan, and Stefan Wermter. 2019. Continual lifelong learning with neural networks: A review. Neural networks, 113:54-71. Marek Rei, Gamal KO Crichton, and Sampa Pyysalo. 2016. Attending to characters in neural sequence labeling models. arXiv preprint arXiv:1611.04361. Anthony Robins. 1995. Catastrophic forgetting, rehearsal and pseudorehearsal. Connection Science, 7(2):123-146. Chuck Rosenberg, Martial Hebert, and Henry Schneiderman. 2005. Semi-supervised self-training of object detection models. Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim. 2017. Continual learning with deep generative replay. Advances in neural information processing systems, 30. Gido M van de Ven, Tinne Tuytelaars, and Andreas S Tolias. 2022. Three types of incremental learning. Nature Machine Intelligence, 4(12):1185-1197. Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of machine learning research, 9(11). Xiaozhi Wang, Ziqi Wang, Xu Han, Wangyi Jiang, Rong Han, Zhiyuan Liu, Juanzi Li, Peng Li, Yankai Lin, and Jie Zhou. 2020. Maven: A massive general domain event detection dataset. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1652-1671. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. 2019. Huggingface's transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771. Yue Wu, Yinpeng Chen, Lijuan Wang, Yuancheng Ye, Zicheng Liu, Yandong Guo, and Yun Fu. 2019. Large scale incremental learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 374-382. Yu Xia, Quan Wang, Yajuan Lyu, Yong Zhu, Wenhao Wu, Sujian Li, and Dai Dai. 2022. Learn and review: Enhancing continual named entity recognition via reviewing synthetic samples. In *Findings of the Association for Computational Linguistics: ACL 2022*, pages 2291-2300. Shipeng Yan, Jiangwei Xie, and Xuming He. 2021. Der: Dynamically expandable representation for class incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3014-3023. Pengfei Yu, Heng Ji, and Prem Natarajan. 2021. Lifelong event detection with knowledge transfer. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 5278-5290.
Friedemann Zenke, Ben Poole, and Surya Ganguli. 2017. Continual learning through synaptic intelligence. In International conference on machine learning, pages 3987-3995. PMLR. Duzhen Zhang, Wei Cong, Jiahua Dong, Yahan Yu, Xiuyi Chen, Yonggang Zhang, and Zhen Fang. 2023a. Continual named entity recognition without catastrophic forgetting. arXiv preprint arXiv:2310.14541. Duzhen Zhang, Hongliu Li, Wei Cong, Rongtao Xu, Jiahua Dong, and Xiuyi Chen. 2023b. Task relation distillation and prototypical pseudo label for incremental named entity recognition. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management, pages 3319-3329. Duzhen Zhang, Yahan Yu, Feilong Chen, and Xiuyi Chen. 2023c. Decomposing logits distillation for incremental named entity recognition. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 1919-1923. Junhao Zheng, Zhanxian Liang, Haibin Chen, and Qianli Ma. 2022. Distilling causal effect from miscellaneous other-class for continual named entity recognition. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3602-3615, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. Junhao Zheng, Qianli Ma, Shengjie Qiu, Yue Wu, Peitian Ma, Junlong Liu, Huawen Feng, Xichen Shang, and Haibin Chen. 2023a. Preserving commonsense knowledge from pre-trained language models via causal inference. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 9155-9173, Toronto, Canada. Association for Computational Linguistics. Junhao Zheng, Shengjie Qiu, and Qianli Ma. 2023b. Learn or recall? revisiting incremental learning with pre-trained language models. arXiv preprint arXiv:2312.07887. Junhao Zheng, Shengjie Qiu, and Qianli Ma. 2024. Concept-1k: A novel benchmark for instance incremental learning. arXiv preprint arXiv:2402.08526.
# A Derivation of Debiased Cross-entropy Loss Function
The overall model parameters are defined as $\Theta = \{\theta, \omega\}$ . The model's backbone $f_{\theta}: X \to \mathbb{R}^d$ extracts feature embeddings of dimension $d$ from the inputs. Following the backbone, a linear classifier produces logits $\Phi(\cdot) = \omega^T \cdot f_{\theta}(\cdot): X \to \mathbb{R}^{|\mathcal{Y}_t|}$ , where $\omega$ represents the classifier weights for the corresponding dimensions and $\mathcal{Y}_t$ represents the current label set. The softmax probability of new entity is defined as: $p_{y_i} = \frac{e^{\Phi y_i(x_i)}}{\sum_{y' \in \mathcal{Y}_t} e^{\Phi y'(x_i)}}$ . The derivation of Debiased Cross-entropy Loss Function is proved as follows:
$$\begin{array}{l} \frac {\partial \mathcal {L} _ {c e}}{\partial \omega_ {y ^ {\prime}}} = \frac {\partial \mathcal {L} _ {c e}}{\partial p _ {y _ {i}}} \cdot \frac {\partial p _ {y _ {i}}}{\partial \Phi_ {y ^ {\prime}} (x _ {i})} \cdot \frac {\partial \Phi_ {y ^ {\prime}} (x _ {i})}{\partial \omega_ {y ^ {\prime}}} \\ = - \frac {1}{\ln 2 \cdot p _ {y _ {i}}} \cdot f _ {\theta} \left(x _ {i}\right) \cdot \frac {\partial p _ {y _ {i}}}{\partial \Phi_ {y ^ {\prime}} \left(x _ {i}\right)} \tag {8} \\ = \frac {f _ {\theta} \left(x _ {i}\right)}{\ln 2} \cdot p _ {y ^ {\prime}} \propto e ^ {\Phi_ {y ^ {\prime}} \left(x _ {i}\right)} \left(y ^ {\prime} \neq y _ {i}\right) \\ \end{array}$$
for the same input $x_{i}$ , $\frac{f_{\theta}(x_i)}{\ln 2}$ can be viewed as a constant. Therefore, the gradient penalty of the new entity over the old entity is proportional to the probability value of the old entity.
# B Datasets
Table 3 shows the detailed description of each dataset. Table 4 shows the format of inputs and outputs for Sequence labeling task. FL means the full ground-truth label for all steps. During the learning process, we will label unseen entities as non-entities [O].
# C Baselines
The introduction about the baselines in the experiment and their settings are as follows:
- SelfTrain (Rosenberg et al., 2005; De Lange et al., 2019): SelfTrain utilizes the labels generated by the predictions of the old model on the new dataset, combined with the labels of the new entities, to guide the training of the new model. - ExtendNER (Monaikul et al., 2021): ExtendNER introduces knowledge distillation to review the knowledge of old entities, aiming to align the outputs of the old and new models for old entities using KL divergence. In contrast to SelfTrain, ExtendNER retains specific
structural information through the probability distribution of the model output. The coefficient of the distillation loss $\lambda = 2$ .
- CFNER (Zheng et al., 2022): CFNER proposes a unified causal framework to extract causality from both new entity types and the Other-Class and employs curriculum learning to alleviate the impact of label noise and introduce a self-adaptive weight to balance the causal effects between new entity types and the Other-Class. The number of matched tokens $K = 3$ , the initial value of balancing weight $\lambda_{base} = 2$ and the initial value of confidence threshold $\delta_1 = 1$ . - DLD (Zhang et al., 2023c): DLD decomposes a prediction logit into two terms, measuring the probability of an input token belonging to a specific entity type or not. The coefficient of the distillation loss $\lambda = 2$ . - RDP (Zhang et al., 2023b): RDP introduces a task relation distillation scheme with two aims: ensuring inter-task semantic consistency by minimizing inter-task relation distillation loss and enhancing model prediction confidence by minimizing intra-task self-entropy loss. The coefficient of inter-task relation distillation loss $\lambda_{1} = 0.3$ and the coefficient of intra-task self-entropy loss $\lambda_{2} = 0.1$ . - OCILNER (Ma et al., 2023): OCILNER introduces a novel representation learning method aimed at acquiring discriminative representations for entities and non-entities, which can dynamically identify entity clusters within non-entities. The threshold for relabeling samples $\beta_{i} = 0.98 - 0.05 * (t - i)$ , where $t$ is the current step, and $i$ is the id of the old task. - ICE (Liu and Huang, 2023): ICE freezes the backbone model and the old entity classifiers, focusing solely on training new entity classifiers. This approach includes two methods: ICE_O and ICE_PLO. The former combines logits of non-entity with logits of new entities for output probability computation during training, while the latter combines all previous logits with new entity logits. CFPD (Zhang et al., 2023a): CPFD introduces a pooled feature distillation loss that
Table 3: Detailed description of each dataset.
<table><tr><td>Dataset</td><td>Entity Type</td><td>Sample</td><td>Entity Type Sequence (Alphabetical Order)</td></tr><tr><td>i2b2</td><td>16</td><td>141k</td><td>AGE, CITY, COUNTRY, DATE, DOCTOR, HOSPITAL, IDNUM, MEDICALRECORD, ORGANIZATION, PATIENT, PHONE, PROFESSION, STATE, STREET, USERNAME, ZIP</td></tr><tr><td>OntoNotes5</td><td>18</td><td>77k</td><td>CARDINAL, DATE, EVENT, FAC, GPE, LANGUAGE, LAW, LOC, MONEY, NORP, ORDINAL, ORG, PERCENT, PERSON, PRODUCT, QUANTITY, TIME, WORK_OF_ART</td></tr><tr><td>MAVEN</td><td>178</td><td>124k</td><td>ACTION, ARREST, BRANDING, CONTROL, EXPANSION, INCIDENT, INFLUENCE, VIOLENCE etc.</td></tr></table>
Table 4: Examples of inputs and outputs for each dataset.
<table><tr><td>InputsFL</td><td>Xinhua news agency, Beijing, August 31stB-ORG I-ORG I-ORG O B-GPE O B-DATE I-DATE</td></tr><tr><td>Inputs</td><td>There were no direct effects of the earthquake 's</td></tr><tr><td>FL</td><td>O O O O B-Influence O O B-Catastrophe O O shaking due to its low intensity.B-Motion O O O O O</td></tr></table>
adeptly balances the trade-off between retaining knowledge of old entity types and acquiring new ones and a confidence-based pseudolabeling method for the non-entity type. The balancing weight $\lambda = 2$ .
# D Metrics
The last step Macro F1 result $\mathcal{A}_T$ and the average Macro F1 result $\bar{\mathcal{A}}$ are defined as follows:
$$a _ {t} = \frac {1}{\left| \mathcal {D} _ {t} \right|} \sum_ {i = 1} ^ {\left| \mathcal {D} _ {t} \right|} \mathbb {1} \left(\underset {y ^ {\prime} \in \mathcal {Y} _ {i}} {\operatorname {a r g m a x}} \Phi_ {t, y ^ {\prime}} \left(x _ {i}\right) = y _ {i}\right), \tag {9}$$
where $a_{t}$ represents the F1 score of the $t^{th}$ entity, $|\mathcal{D}_t|$ represents the number of entities and $\mathbb{1}(\cdot)$ is the indicator for $\Phi_{t,y'}(x_i) = y_i$ .
$$\mathcal {A} _ {T} = \frac {1}{N} \sum_ {j = 1} ^ {N} a _ {j}, \tag {10}$$
where $\mathcal{A}_T$ stands for the MacroF1 score at incremental step $t$ .
$$\bar {\mathcal {A}} = \frac {1}{N} \sum_ {k = 1} ^ {N} A _ {T _ {k}}, \tag {11}$$
where $\bar{\mathcal{A}}$ stands for the average MacroF1 score for all incremental steps.
 Figure 11: The F1 score and probability distributions of class "DATE" in OntoNotes5 with incremental steps.
# E Additional Experimental Results
Table 6 highlights the superiority of our method IS3 over previous methods on MAVEN. However, due
to its larger number of classes, the performance of the model decreases in subsequent incremental steps. Table 7 shows the results of the experiments conducted on OntoNotes5. Our method IS3 achieves improvements over the previous SOTA ranging from $5.47\%$ to $10.52\%$ in MarcoF1 score, and $3.89\%$ to $6.53\%$ , under four settings (FG-1-PG-1, FG-2-PG-2, FG-8-PG-1, and FG-8-PG-2) of the OntoNotes5 dataset.
As shown in Figure 11, the previous method exhibits a rapid decrease in probability distribution with increasing incremental steps, coinciding with a decline in the F1 score. In contrast, our approach IS3 effectively mitigates the model's penalization of old entities, thereby maintaining good performance.
Table 5: The comparison of training time and trainable parameters for each task on OntoNotes5.
<table><tr><td></td><td># Time (Min)</td><td># Trainable Params each Task</td></tr><tr><td>SEQ</td><td>150</td><td>109M</td></tr><tr><td>SelfTrain</td><td>276</td><td>109M</td></tr><tr><td>ExtendNER</td><td>182</td><td>109M</td></tr><tr><td>CFNER</td><td>512</td><td>109M</td></tr><tr><td>DLD</td><td>158</td><td>109M</td></tr><tr><td>RDP</td><td>188</td><td>109M</td></tr><tr><td>OCILNER</td><td>420</td><td>109M</td></tr><tr><td>ICE</td><td>126</td><td>28K</td></tr><tr><td>CPFD</td><td>282</td><td>109M</td></tr><tr><td>IS3(Ours)</td><td>155</td><td>109M</td></tr></table>
Table 6: Comparisons with state-of-the-art methods on MAVEN. The best results are highlighted in bold and the second best results are underlined.
<table><tr><td rowspan="2">Methods</td><td colspan="2">MAVEN</td></tr><tr><td>AT</td><td>A</td></tr><tr><td>SEQ</td><td>3.69 ± 0.17</td><td>11.75 ± 0.13</td></tr><tr><td>SelfTrain</td><td>35.33 ± 0.41</td><td>45.42 ± 0.76</td></tr><tr><td>ExtendNER</td><td>13.81 ± 0.56</td><td>24.92 ± 0.74</td></tr><tr><td>CFNER</td><td>22.74 ± 1.52</td><td>34.77 ± 1.38</td></tr><tr><td>DLD</td><td>14.18 ± 0.37</td><td>24.98 ± 0.43</td></tr><tr><td>RDP</td><td>28.76 ± 2.44</td><td>38.01 ± 1.09</td></tr><tr><td>OCILNER</td><td>21.70 ± 1.77</td><td>30.13 ± 0.75</td></tr><tr><td>ICE_PLO</td><td>39.01 ± 0.51</td><td>44.02 ± 0.96</td></tr><tr><td>ICE_O</td><td>38.16 ± 1.26</td><td>43.43 ± 1.31</td></tr><tr><td>CPFD</td><td>27.28 ± 1.39</td><td>41.31 ± 1.31</td></tr><tr><td>IS3 (Ours)</td><td>40.15 ± 0.38</td><td>48.16 ± 0.16</td></tr></table>
We compare the runtime and the number of updated parameters in Table 5. The results indi
cate that the proposed IS3 requires less than $5\%$ more training time than SEQ and less training time than most previous methods, such as CFNER and CPFD.
Table 7: Comparisons with state-of-the-art methods on the OntoNotes5 dataset using the bert-base-cased model. The best results are highlighted in bold and the second best results are underlined.
<table><tr><td rowspan="2">Dataset</td><td rowspan="2">Methods</td><td colspan="2">FG-1-PG-1</td><td colspan="2">FG-2-PG-2</td><td colspan="2">FG-8-PG-1</td><td colspan="2">FG-8-PG-2</td></tr><tr><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td></tr><tr><td rowspan="10">OntoNotes5</td><td>FT</td><td>1.65 ± 0.11</td><td>12.91 ± 0.41</td><td>4.49 ± 0.44</td><td>20.69 ± 0.25</td><td>1.42 ± 0.08</td><td>12.41 ± 0.38</td><td>3.97 ± 0.37</td><td>21.45 ± 0.28</td></tr><tr><td>SelfTrain</td><td>38.32 ± 5.29</td><td>47.07 ± 1.67</td><td>52.23 ± 0.43</td><td>56.14 ± 0.88</td><td>38.26 ± 3.44</td><td>49.31 ± 2.92</td><td>51.71 ± 1.39</td><td>58.51 ± 1.04</td></tr><tr><td>ExtendNER</td><td>28.62 ± 2.42</td><td>42.20 ± 2.16</td><td>45.05 ± 0.61</td><td>52.30 ± 1.03</td><td>25.71 ± 5.67</td><td>40.34 ± 3.64</td><td>44.82 ± 2.42</td><td>55.25 ± 1.58</td></tr><tr><td>CFNER</td><td>44.76 ± 0.28</td><td>50.76 ± 1.61</td><td>49.29 ± 2.25</td><td>55.94 ± 1.37</td><td>46.81 ± 0.99</td><td>54.91 ± 0.69</td><td>51.41 ± 2.21</td><td>60.41 ± 0.43</td></tr><tr><td>DLD</td><td>22.22 ± 5.38</td><td>38.47 ± 4.73</td><td>44.88 ± 0.78</td><td>51.91 ± 1.15</td><td>25.25 ± 1.69</td><td>41.43 ± 1.01</td><td>44.53 ± 1.66</td><td>55.17 ± 1.18</td></tr><tr><td>RDP</td><td>38.25 ± 5.02</td><td>48.14 ± 2.60</td><td>48.55 ± 3.54</td><td>54.81 ± 2.57</td><td>39.31 ± 4.29</td><td>52.28 ± 3.11</td><td>50.34 ± 1.86</td><td>59.89 ± 0.83</td></tr><tr><td>OCILNER</td><td>14.91 ± 4.39</td><td>24.72 ± 3.21</td><td>26.31 ± 2.38</td><td>35.96 ± 1.76</td><td>19.39 ± 2.98</td><td>30.41 ± 2.98</td><td>23.28 ± 4.21</td><td>30.27 ± 4.46</td></tr><tr><td>ICE_PLO</td><td>39.69 ± 0.36</td><td>43.76 ± 0.16</td><td>43.81 ± 0.34</td><td>46.38 ± 0.36</td><td>42.69 ± 0.09</td><td>46.95 ± 0.21</td><td>44.66 ± 0.61</td><td>47.72 ± 0.61</td></tr><tr><td>ICE_O</td><td>38.87 ± 0.37</td><td>43.51 ± 0.23</td><td>40.82 ± 0.35</td><td>44.71 ± 0.28</td><td>45.98 ± 0.28</td><td>49.11 ± 0.49</td><td>48.01 ± 0.49</td><td>49.91 ± 0.57</td></tr><tr><td>CPFD</td><td>33.44 ± 1.18</td><td>44.73 ± 0.69</td><td>43.48 ± 0.72</td><td>50.79 ± 1.05</td><td>41.77 ± 2.79</td><td>52.46 ± 1.02</td><td>48.36 ± 2.35</td><td>58.60 ± 1.99</td></tr><tr><td></td><td>IS3 (Ours)</td><td>50.23 ± 0.94</td><td>54.65 ± 0.84</td><td>57.23 ± 1.19</td><td>58.25 ± 0.56</td><td>56.11 ± 1.15</td><td>61.44 ± 0.11</td><td>62.23 ± 0.10</td><td>66.01 ± 0.74</td></tr></table>
Table 8: Comparisons with state-of-the-art methods on the i2b2 dataset using the roberta-base model. The best results are highlighted in bold and the second best results are underlined. The average of each incremental step is provided in Figure 5.
<table><tr><td rowspan="2">Dataset</td><td>Methods</td><td colspan="2">FG-1-PG-1</td><td colspan="2">FG-2-PG-2</td><td colspan="2">FG-8-PG-1</td><td colspan="2">FG-8-PG-2</td></tr><tr><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td></td></tr><tr><td rowspan="10">i2b2</td><td>FT</td><td>2.68 ± 1.19</td><td>14.36 ± 0.81</td><td>7.39 ± 1.58</td><td>23.02 ± 0.42</td><td>1.91 ± 0.38</td><td>15.56 ± 1.77</td><td>6.00 ± 0.49</td><td>25.01 ± 0.73</td></tr><tr><td>SelfTrain</td><td>17.58 ± 1.60</td><td>37.95 ± 1.10</td><td>25.84 ± 3.26</td><td>43.80 ± 3.24</td><td>6.97 ± 1.15</td><td>28.73 ± 0.48</td><td>27.85 ± 3.72</td><td>45.80 ± 2.37</td></tr><tr><td>ExtendNER</td><td>17.68 ± 1.75</td><td>34.53 ± 2.58</td><td>26.84 ± 1.63</td><td>44.33 ± 3.21</td><td>9.49 ± 1.07</td><td>28.80 ± 0.72</td><td>22.27 ± 7.08</td><td>40.07 ± 5.62</td></tr><tr><td>CFNER</td><td>32.65 ± 1.87</td><td>47.06 ± 2.70</td><td>43.12 ± 2.84</td><td>54.61 ± 2.40</td><td>33.52 ± 0.78</td><td>38.61 ± 1.56</td><td>36.19 ± 7.72</td><td>49.46 ± 6.09</td></tr><tr><td>DLD</td><td>16.26 ± 4.79</td><td>34.02 ± 3.46</td><td>27.12 ± 7.30</td><td>45.81 ± 3.26</td><td>5.54 ± 1.68</td><td>27.80 ± 1.39</td><td>20.39 ± 4.46</td><td>38.43 ± 2.58</td></tr><tr><td>RDP</td><td>21.70 ± 0.88</td><td>40.71 ± 2.86</td><td>35.38 ± 2.79</td><td>53.81 ± 0.98</td><td>26.49 ± 6.16</td><td>39.54 ± 3.96</td><td>42.98 ± 4.06</td><td>56.25 ± 1.44</td></tr><tr><td>OCILNER</td><td>9.27 ± 4.60</td><td>27.98 ± 1.94</td><td>15.14 ± 9.85</td><td>34.44 ± 4.11</td><td>15.89 ± 8.39</td><td>35.54 ± 7.28</td><td>21.26 ± 8.70</td><td>39.21 ± 5.01</td></tr><tr><td>ICE_PLO</td><td>29.89 ± 0.23</td><td>36.65 ± 0.32</td><td>32.14 ± 0.36</td><td>37.34 ± 0.31</td><td>34.34 ± 0.84</td><td>41.07 ± 0.91</td><td>39.88 ± 0.71</td><td>44.34 ± 0.46</td></tr><tr><td>ICE_O</td><td>25.56 ± 0.94</td><td>35.57 ± 0.75</td><td>33.17 ± 0.27</td><td>38.16 ± 0.25</td><td>32.77 ± 1.16</td><td>40.58 ± 1.30</td><td>36.95 ± 1.41</td><td>41.95 ± 1.44</td></tr><tr><td>CPFD</td><td>13.65 ± 4.16</td><td>40.81 ± 3.10</td><td>26.38 ± 1.72</td><td>49.82 ± 1.41</td><td>4.59 ± 0.86</td><td>31.76 ± 2.39</td><td>25.23 ± 9.73</td><td>48.85 ± 3.37</td></tr><tr><td></td><td>IS3 (Ours)</td><td>34.14 ± 1.45</td><td>51.61 ± 1.60</td><td>47.91 ± 2.76</td><td>59.22 ± 1.01</td><td>42.99 ± 3.01</td><td>52.25 ± 1.96</td><td>52.36 ± 3.42</td><td>60.99 ± 1.49</td></tr></table>
Table 9: Comparisons with state-of-the-art methods on the OntoNotes5 dataset using the roberta-base model. The best results are highlighted in bold and the second best results are underlined.
<table><tr><td rowspan="2">Dataset</td><td rowspan="2">Methods</td><td colspan="2">FG-1-PG-1</td><td colspan="2">FG-2-PG-2</td><td colspan="2">FG-8-PG-1</td><td colspan="2">FG-8-PG-2</td></tr><tr><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td><td>\(A_T\)</td><td>\(\bar{A}\)</td></tr><tr><td rowspan="10">OntoNotes5</td><td>FT</td><td>1.75 ±0.11</td><td>12.43 ±0.11</td><td>5.07 ±0.32</td><td>20.85 ±0.27</td><td>1.32 ±0.26</td><td>12.03 ±0.20</td><td>4.97 ±0.33</td><td>20.82 ±0.14</td></tr><tr><td>SelfTrain</td><td>38.88 ±6.38</td><td>47.57 ±2.30</td><td>54.02 ±0.76</td><td>55.78 ±1.87</td><td>39.82 ±5.23</td><td>49.05 ±2.34</td><td>51.77 ±2.28</td><td>57.71 ±0.48</td></tr><tr><td>ExtendNER</td><td>23.29 ±5.15</td><td>36.77 ±6.26</td><td>44.00 ±2.82</td><td>50.06 ±1.44</td><td>24.12 ±1.85</td><td>40.39 ±3.00</td><td>44.48 ±5.62</td><td>53.50 ±2.86</td></tr><tr><td>CFNER</td><td>41.86 ±2.78</td><td>48.73 ±3.11</td><td>54.24 ±1.04</td><td>58.07 ±1.71</td><td>51.51 ±2.06</td><td>55.65 ±0.56</td><td>52.23 ±2.75</td><td>58.95 ±4.11</td></tr><tr><td>DLD</td><td>25.25 ±4.17</td><td>37.24 ±6.06</td><td>46.58 ±1.78</td><td>50.93 ±0.54</td><td>24.04 ±2.54</td><td>40.63 ±0.91</td><td>45.89 ±1.27</td><td>54.89 ±0.38</td></tr><tr><td>RDP</td><td>34.84 ±2.92</td><td>45.90 ±0.91</td><td>46.95 ±1.49</td><td>55.02 ±0.73</td><td>41.58 ±3.37</td><td>53.69 ±0.53</td><td>52.54 ±0.44</td><td>62.03 ±1.05</td></tr><tr><td>OCILNER</td><td>27.98 ±5.18</td><td>29.86 ±4.28</td><td>29.64 ±4.27</td><td>37.24 ±2.79</td><td>29.94 ±1.60</td><td>42.51 ±1.13</td><td>30.90 ±2.41</td><td>45.54 ±0.63</td></tr><tr><td>ICE_PLO</td><td>33.66 ±0.66</td><td>37.21 ±0.36</td><td>36.17 ±0.07</td><td>37.71 ±0.59</td><td>36.90 ±0.19</td><td>40.33 ±0.37</td><td>38.83 ±0.34</td><td>41.10 ±0.30</td></tr><tr><td>ICE_O</td><td>30.46 ±1.69</td><td>33.41 ±1.91</td><td>35.05 ±0.92</td><td>37.17 ±1.12</td><td>37.38 ±1.14</td><td>40.22 ±0.83</td><td>40.69 ±0.21</td><td>42.25 ±0.47</td></tr><tr><td>CPFD</td><td>29.50 ±1.47</td><td>43.12 ±2.18</td><td>41.01 ±2.92</td><td>51.56 ±0.52</td><td>40.58 ±2.50</td><td>51.64 ±2.52</td><td>50.70 ±3.65</td><td>61.14 ±1.57</td></tr><tr><td></td><td>IS3 (Ours)</td><td>48.87 ±1.72</td><td>54.88 ±0.41</td><td>55.93 ±0.55</td><td>58.48 ±0.36</td><td>52.14 ±1.48</td><td>59.33 ±0.32</td><td>61.64 ±1.58</td><td>66.61 ±0.74</td></tr></table>123version https://git-lfs.github.com/spec/v1oid sha256:a7ee6b208b1c082f3cd993e4450d9fe36af4ea4d89efc20f6ffd79adcaa6e816size 1257174123version https://git-lfs.github.com/spec/v1oid sha256:aff54234ed17821a35627d3d0ae4f39987220c6e55895d62e5f95c4151f29230size 26865336123version https://git-lfs.github.com/spec/v1oid sha256:129d0790759ad290de272710fdf6af498b872bfe71a375198f39851467ef0e07size 3765868123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017[ { "type": "text", "text": "InfiMM: Advancing Multimodal Understanding with an Open-Sourced Visual Language Model", "text_level": 1, "bbox": [ 129, 78, 867, 118 ], "page_idx": 0 }, { "type": "text", "text": "Haogeng Liu $^{1,2}$ , Quanzeng You $^{3}$ , Yiqi Wang $^{3}$ , Xiaotian Han $^{3}$ , Bohan Zhai $^{3}$ , Yongfei Liu $^{3}$ , Wentao Chen $^{3}$ , Yiren Jian $^{3}$ , Yunzhe Tao $^{3}$ , Jianbo Yuan $^{3}$ , Ran He $^{1,2}$ , Hongxia Yang $^{3*}$", "bbox": [ 119, 124, 877, 158 ], "page_idx": 0 }, { "type": "text", "text": "$^{1}$ New Laboratory of Pattern Recognition (NLPR), Institute of Automation,", "bbox": [ 196, 159, 801, 175 ], "page_idx": 0 }, { "type": "text", "text": "Chinese Academy of Sciences, Beijing 100190, China", "bbox": [ 272, 175, 712, 191 ], "page_idx": 0 }, { "type": "text", "text": "$^{2}$ University of Chinese Academy of Sciences, Beijing, China", "bbox": [ 252, 192, 744, 208 ], "page_idx": 0 }, { "type": "text", "text": "3ByteDance, Inc", "bbox": [ 431, 209, 566, 224 ], "page_idx": 0 }, { "type": "text", "text": "liuhaocheng2022@ia.ac.cn, rhe@nlpr.ia.ac.cn", "bbox": [ 285, 225, 710, 241 ], "page_idx": 0 }, { "type": "text", "text": "{quanzeng.you, xiaotian.han, hongxia.yang}@bytedance.com", "bbox": [ 216, 243, 781, 258 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 260, 261, 339, 275 ], "page_idx": 0 }, { "type": "text", "text": "In this work, we present InfiMM, an advanced Multimodal Large Language Model that adapts to intricate vision-language tasks. InfiMM, inspired by the Flamingo architecture, distinguishes itself through the utilization of large-scale training data, three-stage training strategies, and diverse large language models. This approach ensures the preservation of Flamingo's foundational strengths while simultaneously introducing augmented capabilities. Empirical evaluations across a variety of benchmarks underscore InfiMM's remarkable capability in multimodal understanding. The code and model can be found at: https://huggingface.co/Infi-MM.", "bbox": [ 141, 290, 460, 502 ], "page_idx": 0 }, { "type": "text", "text": "1 Introduction", "text_level": 1, "bbox": [ 114, 517, 258, 532 ], "page_idx": 0 }, { "type": "text", "text": "Recently, Multimodal Large Language Models (MLLMs) have shown a transformative evolution through the integration of pretrained vision encoders with Large Language Models (LLMs). Seminal contributions to this domain include Flamingo (Alayrac et al., 2022), LLaVA (Liu et al., 2023b), BLIP-2 (Li et al., 2023), and MiniGPT-4 (Zhu et al., 2023a). MLLMs demonstrate exceptional proficiency across a variety of tasks, including image captioning, visual question answering, and more complex activities such as generating code from images, converting image plots into Markdown format tables, and simulating web browsing.", "bbox": [ 112, 543, 489, 752 ], "page_idx": 0 }, { "type": "text", "text": "For effective integration of pretrained vision encoders with large language models, careful design of vision-language connector modules is essential. These modules play a critical role in transforming and aligning visual tokens to formats compatible with Large Language Models, as well as effectively leveraging these tokens. Models like Flamingo (Alayrac et al., 2022) and BLIP-2 (Li et al., 2023) utilize Perceiver Resampler/Q-Former techniques,", "bbox": [ 112, 753, 489, 898 ], "page_idx": 0 }, { "type": "text", "text": "offering flexibility and nuanced alignment with language counterparts. However, this approach can incur high computational costs and risk information loss (Cha et al., 2023). Conversely, models such as LLaVA and MiniGPT-v2 employ simpler Multi-Layer Perception (MLP) strategies, reducing computational complexity but potentially sacrificing nuanced representation of visual data.", "bbox": [ 507, 261, 884, 388 ], "page_idx": 0 }, { "type": "text", "text": "In the utilization of the transformed tokens, architectures akin to Flamingo employ cross-attention mechanisms, enabling nuanced interactions between token types without necessitating an expansion of the token sequence length. This method effectively manages computational load. Conversely, LLaVA-style models adopt a direct concatenation approach, which, while straightforward, leads to an augmentation in token sequence length and computational complexity.", "bbox": [ 507, 391, 884, 551 ], "page_idx": 0 }, { "type": "text", "text": "Though efficient in the inference stage, few works adopt the Flamingo-style architecture. OpenFlamingo (Awadalla et al., 2023) and IDEFICS (Laurençon et al., 2023a) are two reproductions of the Flamingo. However, as they use less capable language models and limited training data, their performance could be improved. Further we propose three-stage training strategies for vision-language alignment, vqa knowledge injection and unreshing conversation abality. We utilize a stronger vision encoder, language model, and higher-quality data to build a stronger model. We anticipate that this will foster development within the field.", "bbox": [ 507, 554, 882, 778 ], "page_idx": 0 }, { "type": "text", "text": "2 Related Work", "text_level": 1, "bbox": [ 509, 795, 663, 810 ], "page_idx": 0 }, { "type": "text", "text": "Large language models (LLMs) have made significant advancements (OpenAI, 2023; Chowdhery et al., 2022; Bai et al., 2022; Touvron et al., 2023; Tunstall et al., 2023). These models are powerful in chatting and can finish many tasks only with different instructions. Though impressive, these", "bbox": [ 507, 825, 884, 921 ], "page_idx": 0 }, { "type": "page_footnote", "text": "* Corresponding Authors", "bbox": [ 134, 906, 295, 920 ], "page_idx": 0 }, { "type": "page_number", "text": "485", "bbox": [ 485, 928, 515, 940 ], "page_idx": 0 }, { "type": "footer", "text": "Findings of the Association for Computational Linguistics: ACL 2024, pages 485-492 \nAugust 11-16, 2024 ©2024 Association for Computational Linguistics", "bbox": [ 236, 945, 759, 972 ], "page_idx": 0 }, { "type": "text", "text": "models are limited to only the language domain but not other modalities. They have subsequently been extensively utilized in multimodal tasks such as image-to-text generation and video-to-text generation (Zhang et al., 2023a; Xu et al., 2023; Huang et al., 2023; Alayrac et al., 2022; Wang et al., 2022; Li et al., 2023; Liu et al., 2023b), giving rise to a new class of models called multimodal large language model (MLLM).", "bbox": [ 112, 84, 489, 227 ], "page_idx": 1 }, { "type": "text", "text": "Flamingo (Alayrac et al., 2022) leverages pretrained language models within the MLLM framework, employing gated-cross attention to integrate visual information into textual sequences. In contrast, BLIP-2 (Li et al., 2023), MiniGPT4 (Zhu et al., 2023a), and LLaVA (Liu et al., 2023b) propose a novel approach by converting visual signals into soft tokens and directly integrating them into language models. Utilizing gated-cross attention as a modality connector introduces more trainable parameters but can potentially reduce inference cost as the visual signal will not be turned into soft tokens, thereby not increasing the sequence length of large language models.", "bbox": [ 115, 229, 489, 453 ], "page_idx": 1 }, { "type": "text", "text": "While numerous open-source projects have emerged following the architectures of LLaVA and BLIP-2, there needs to be more emphasis on the Flamingo-style architecture. OpenFlamingo (Awadalla et al., 2023) and IDEFICS (Laurençon et al., 2023a) represent two open-source models adopting the Flamingo-style approach. However, due to constraints imposed by their language model and vision encoder, their capabilities could be more remarkable.", "bbox": [ 112, 455, 489, 613 ], "page_idx": 1 }, { "type": "text", "text": "In this study, we adopt the Flamingo framework and harness a more potent combination of language model and vision encoder to construct a robust model. Additionally, we employ higher-quality data for training, aiming to enhance the model's strength. These efforts will likely result in a more formidable model and contribute to the advancement of research in MLLMs.", "bbox": [ 112, 615, 489, 743 ], "page_idx": 1 }, { "type": "text", "text": "3 Method", "text_level": 1, "bbox": [ 112, 755, 218, 769 ], "page_idx": 1 }, { "type": "text", "text": "3.1 Model Architecture", "text_level": 1, "bbox": [ 112, 780, 314, 793 ], "page_idx": 1 }, { "type": "text", "text": "We show our model architecture in Figure 1. InfiMM is inspired by Flamingo (Alayrac et al., 2022). The details of our model will be discussed in the following:", "bbox": [ 112, 800, 489, 865 ], "page_idx": 1 }, { "type": "text", "text": "Large Language Model: InfIMM reveals the impact of LLMs with different scales and architectures. For the 7B setting, InfIMM adapts pretrained", "bbox": [ 112, 873, 489, 921 ], "page_idx": 1 }, { "type": "text", "text": "Zephyr as a language model. For the 13B setting, InfIMM adapts either LLaMA2 (Touvron et al., 2023) or its finetuned version Vicuna (Chiang et al., 2023) as the language model.", "bbox": [ 507, 84, 884, 149 ], "page_idx": 1 }, { "type": "text", "text": "Vision Encoder: InfMM utilizes the EVA2-CLIP-G (Sun et al., 2023) as default vision enconder, which fixes the input resolution to $224 \\times 224$ .", "bbox": [ 507, 156, 884, 204 ], "page_idx": 1 }, { "type": "text", "text": "Connector: InfiMM adapts the Perceiver Resampler and Gated Cross-attention as the V-L connectors. Percevier Resampler consists of cross-attention layers and learnable queries. This could compress vision features to fixed 32 vision tokens. Meanwhile, Gated Cross-attention layers are used for vision-language interaction.", "bbox": [ 507, 212, 884, 325 ], "page_idx": 1 }, { "type": "image", "img_path": "images/d707ddc81d9c867a6cb670381df05745f60c873b7348f78e688b657ccacd9f3d.jpg", "image_caption": [ "Figure 1: The overview architecture of InfIMM. InfIMM consists of a vision encoder, a Perceiver Resampler, and a large language model with a Gated Cross-attention module." ], "image_footnote": [], "bbox": [ 547, 336, 845, 533 ], "page_idx": 1 }, { "type": "text", "text": "3.2 Training details", "text_level": 1, "bbox": [ 507, 627, 680, 642 ], "page_idx": 1 }, { "type": "text", "text": "We have established a three-stage training procedure for improving InfiMM's overall ability, as shown in Figure 2. These stages are denoted as Pretraining (PT), Multi-Task Training (MTT), and Instruction Finetuning (IFT). The PT stage aims to align vision-language modalities, MTT stage integrates vision-language question-answering knowledge, and IFT stage significantly improves the model's conversational abilities.", "bbox": [ 505, 646, 884, 790 ], "page_idx": 1 }, { "type": "text", "text": "Pretraining Stage: This stage focuses on the initial alignment of vision features and language features. During this stage, both the vision encoder and large language model are frozen, with only the Gated Cross-attention module and the Perceiver Resampler being learnable. The training dataset involves a diverse set of imagetext pairs (LAION (Schuhmann et al., 2022),", "bbox": [ 507, 793, 884, 921 ], "page_idx": 1 }, { "type": "page_number", "text": "486", "bbox": [ 485, 928, 515, 940 ], "page_idx": 1 }, { "type": "image", "img_path": "images/a96944f581c25c88f175df70308057724cb0bfcf6ce83fb8257588f785bfe57f.jpg", "image_caption": [ "Figure 2: The training pipeline of InfIMM. The language model is trainable only in the Instruction Finetuning Stage. And ViT is frozen during the entire training process." ], "image_footnote": [], "bbox": [ 122, 68, 868, 262 ], "page_idx": 2 }, { "type": "table", "img_path": "images/6168b96a76758dfc4d94360059d870d3044827d089b112aa7c02ac056fde25ee.jpg", "table_caption": [ "Table 1: Details on the training data of Pretraining Stage." ], "table_footnote": [], "table_body": "<table><tr><td>Dataset</td><td>Type of Data</td><td>Samples</td></tr><tr><td>OBELICS</td><td>Unstructured Web Docs</td><td>101M</td></tr><tr><td>MMC4</td><td>Unstructured Web Docs</td><td>53M</td></tr><tr><td>LAION</td><td>Image-Text Pairs</td><td>115M</td></tr><tr><td>COYO</td><td>Image-Text Pairs</td><td>238M</td></tr><tr><td>LAION-COCO</td><td>Image-Text Pairs</td><td>140M</td></tr><tr><td>PMD</td><td>Image-Text Pairs</td><td>20M</td></tr><tr><td>Total</td><td>-</td><td>667M</td></tr></table>", "bbox": [ 115, 379, 463, 507 ], "page_idx": 2 }, { "type": "text", "text": "COYO (Byeon et al., 2022), LAION-COCO, PMD (Singh et al., 2022)) and unstructured multimodal web documents(OBELICS (Laurençon et al., 2023a), MMC4 (Zhu et al., 2023b)), all sourced from public domains and PMD is only used in 13B LLMs. We have also filtered out low-quality data, resulting in the following dataset utilized:", "bbox": [ 112, 527, 487, 640 ], "page_idx": 2 }, { "type": "text", "text": "Multi-Task Training Stage (MTT) As the dataset used in pretraining is mainly instance-level alignment and has a lot of noise, we introduce Multi-Task Training for higher-quality knowledge injection. In this stage, we focus on supervised training on different tasks, including image captions and visual question-answering. Also include other domains, like scene-based datasets (Chen et al., 2015), (Hudson and Manning, 2019), and OCR based datasets (Sidorov et al., 2020), (Mishra et al., 2019), (Zhang et al., 2023b) etc. We keep the trainable parameters same with the first stage. Detailed information about training datasets is listed in Table 2.", "bbox": [ 112, 644, 487, 868 ], "page_idx": 2 }, { "type": "text", "text": "Instruction Finetuning Stage (IFT): In this final stage, our goal is to make the model better follow user instructions and develop the \"chat\" ver", "bbox": [ 112, 873, 489, 921 ], "page_idx": 2 }, { "type": "table", "img_path": "images/a70f7edcb6dc45972c9729dd1f260728acf54942832f0f27878ab238d8dd26bf.jpg", "table_caption": [ "Table 2: Details on the training data of Multi-Task Training Stage." ], "table_footnote": [], "table_body": "<table><tr><td>Task</td><td>Dataset</td><td>Samples</td></tr><tr><td rowspan=\"3\">Image Caption</td><td>COCO Caption (Chen et al., 2015)</td><td>410k</td></tr><tr><td>TextCaps (Sidorov et al., 2020)</td><td>110k</td></tr><tr><td>VizWiz Caption (Gurari et al., 2020)</td><td>110k</td></tr><tr><td rowspan=\"5\">General VQA</td><td>VQAV2 (Antol et al., 2015)</td><td>443k</td></tr><tr><td>OKVQA (Marino et al., 2019)</td><td>9k</td></tr><tr><td>VizWiz VQA (Gurari et al., 2018)</td><td>20k</td></tr><tr><td>GQA (Hudson and Manning, 2019)</td><td>471k</td></tr><tr><td>A-OKQA (Schwenk et al., 2022)</td><td>17k</td></tr><tr><td rowspan=\"5\">Text-oriented VQA</td><td>TextVQA (Singh et al., 2019)</td><td>34k</td></tr><tr><td>OCRVQA (Mishra et al., 2019)</td><td>166k</td></tr><tr><td>STVQA (Biten et al., 2019)</td><td>26k</td></tr><tr><td>DocVQA (Mathew et al., 2021)</td><td>63k</td></tr><tr><td>LLaVAR (Zhang et al., 2023b)</td><td>16k</td></tr><tr><td>Total</td><td>-</td><td>1.86M</td></tr></table>", "bbox": [ 510, 379, 858, 558 ], "page_idx": 2 }, { "type": "text", "text": "sion of InfiMM. We only keep the ViT frozen while all the other parameters are trainable. In this stage, we utilize the LLaVA-665k (Liu et al., 2023a) instruction finetuning dataset for training.", "bbox": [ 507, 575, 882, 640 ], "page_idx": 2 }, { "type": "text", "text": "4 Experiment", "text_level": 1, "bbox": [ 507, 653, 648, 670 ], "page_idx": 2 }, { "type": "text", "text": "We evaluate InfiMM across a diverse array of tasks. For image caption, we test our model with COCO and Flickr30k. For general VQA tasks, we leverage benchmarks such as OKVQA (Marino et al., 2019), VQAV2 (Antol et al., 2015) and TextVQA (Singh et al., 2019). On these dataset, we only evaluate the pretrained model in a zero-shot and few-shots manner. Results can be found in Table 4.", "bbox": [ 505, 678, 882, 806 ], "page_idx": 2 }, { "type": "text", "text": "We also assess the logical reasoning capabilities of our model by employing newly introduced benchmarks, including MM-VET (Yu et al., 2023), MME (Fu et al., 2023), MMbench (Liu et al., 2023c), InfiMM-Eval (Han et al., 2023), and MMMU (Yue et al., 2023). Notably, the MMMU (Yue et al., 2023) presents challenging tasks that de", "bbox": [ 507, 809, 884, 921 ], "page_idx": 2 }, { "type": "page_number", "text": "487", "bbox": [ 485, 928, 515, 940 ], "page_idx": 2 }, { "type": "table", "img_path": "images/0db178e08d47fe249b6cb9f071a130f4a3c68794250a272fd0f57eb47edfbc01.jpg", "table_caption": [ "Table 3: Results of InfiMM-Chat on general VQA task." ], "table_footnote": [], "table_body": "<table><tr><td>Model</td><td>ScienceQA-Img</td><td>MME</td><td>MMVet</td><td>InfiMM-Eval</td><td>MMbench</td><td>MMMU-Val</td><td>MMMU-test</td></tr><tr><td>Otter-9B</td><td>-</td><td>1292/306</td><td>24.6</td><td>32.2</td><td>-</td><td>22.69</td><td>-</td></tr><tr><td>IDEFICS-9B-Instruct</td><td>60.6</td><td>-/-</td><td>-</td><td>-</td><td>-</td><td>24.53</td><td>-</td></tr><tr><td>LLaVA-1.5</td><td>71.6</td><td>1531/295</td><td>35.4</td><td>32.6</td><td>67.7</td><td>36.4</td><td>33.6</td></tr><tr><td>QWen-VL-Chat</td><td>68.2</td><td>1488/361</td><td>-</td><td>37.4</td><td>60.6</td><td>35.9</td><td>32.9</td></tr><tr><td>InfiMM-Zephyr-7B-Chat</td><td>71.1</td><td>1406/327</td><td>32.8</td><td>36.0</td><td>59.7</td><td>39.4</td><td>35.5</td></tr><tr><td>InfiMM-Vicuna-13B-Chat</td><td>74.0</td><td>1461/324</td><td>36.0</td><td>40.0</td><td>66.7</td><td>37.6</td><td>34.6</td></tr><tr><td>InfiMM-Llama-13b-Chat</td><td>73.0</td><td>1445/338</td><td>39.2</td><td>41.4</td><td>66.4</td><td>39.1</td><td>35.2</td></tr></table>", "bbox": [ 115, 107, 882, 225 ], "page_idx": 3 }, { "type": "table", "img_path": "images/81853c5bab5f33270406fabed22bb7f519b1b66f82d872b4c75b54e0d55e66aa.jpg", "table_caption": [ "Table 4: Results on general VQA task. Here we report zero-shot and four-shots result of InfIMM." ], "table_footnote": [], "table_body": "<table><tr><td>Model</td><td>Shots</td><td>COCO</td><td>Flickr30k</td><td>OKVQA</td><td>VQAv2</td><td>TextVQA</td></tr><tr><td rowspan=\"2\">IDEFICS-9B</td><td>0</td><td>46</td><td>27.3</td><td>38.4</td><td>50.9</td><td>25.9</td></tr><tr><td>4</td><td>93</td><td>59.7</td><td>45.5</td><td>55.4</td><td>27.6</td></tr><tr><td rowspan=\"2\">IDEFICS-80B</td><td>0</td><td>91.8</td><td>53.7</td><td>45.2</td><td>60</td><td>30.9</td></tr><tr><td>4</td><td>110.3</td><td>73.7</td><td>52.4</td><td>64.6</td><td>34.4</td></tr><tr><td rowspan=\"2\">InfiMM-Zephyr-7B</td><td>0</td><td>78.8</td><td>60.7</td><td>17.1</td><td>33.7</td><td>15.2</td></tr><tr><td>4</td><td>108.6</td><td>71.9</td><td>50.5</td><td>59.1</td><td>34.3</td></tr><tr><td rowspan=\"2\">InfiMM-Vicuna13B</td><td>0</td><td>69.6</td><td>49.6</td><td>49.2</td><td>60.4</td><td>32.8</td></tr><tr><td>4</td><td>118.1</td><td>81.4</td><td>53.7</td><td>64.2</td><td>38.4</td></tr><tr><td rowspan=\"2\">InfiMM-Llama2-13B</td><td>0</td><td>85.4</td><td>54.6</td><td>26.4</td><td>51.6</td><td>24.2</td></tr><tr><td>4</td><td>125.2</td><td>87.1</td><td>55.5</td><td>66.1</td><td>38.2</td></tr></table>", "bbox": [ 127, 284, 475, 401 ], "page_idx": 3 }, { "type": "text", "text": "mand advanced subject knowledge and deliberate reasoning at a collegiate level. These tasks span diverse fields such as physics, chemistry, and biology. The MM-VET benchmark assesses the integrated capabilities of models.", "bbox": [ 112, 425, 489, 505 ], "page_idx": 3 }, { "type": "text", "text": "4.1 In-context Learning Ability", "text_level": 1, "bbox": [ 112, 516, 376, 532 ], "page_idx": 3 }, { "type": "text", "text": "We conduct a comparative analysis of InfiMM's capacity for in-context learning against that of IDEFICS (Laurençon et al., 2023b) in Table 4, which represents the original leading Flamingostyle architecture model under zero or four-shot conditions. Our findings reveal that InfiMM outperforms IDEFICS across all benchmark metrics. Notably, even our 13B model demonstrates superiority over IDEFICS' 80B model, underscoring the efficacy of our training methodology.", "bbox": [ 112, 537, 489, 697 ], "page_idx": 3 }, { "type": "text", "text": "4.2 General Logical Reasoning Benchmarks", "text_level": 1, "bbox": [ 112, 709, 477, 724 ], "page_idx": 3 }, { "type": "text", "text": "In Table 3, we compare our method with various methods. InfiMM shows competitive performance on both benchmarks, especially the MMMU benchmark, which needs complicated vision and language understanding capability. We are superior to most of the previous models in both the validation dataset and testing dataset.", "bbox": [ 112, 728, 489, 841 ], "page_idx": 3 }, { "type": "text", "text": "4.3 Influence of Training Stage", "text_level": 1, "bbox": [ 112, 852, 374, 868 ], "page_idx": 3 }, { "type": "text", "text": "Analysis of Table 5 reveals that the introduction of MTT significantly enhances the model's knowledge assimilation, which shows a significant im", "bbox": [ 112, 873, 489, 921 ], "page_idx": 3 }, { "type": "text", "text": "provement in VQA tasks like OKVQA, VQAv2, TextVQA, and GQA (Hudson and Manning, 2019). However, constrained by the limited response format inherent in MTT, the model exhibits subpar performance in open-ended tasks (as observed in InfIMM-Eval). Notably, following Instruction Finetuning, the model demonstrates improved proficiency in handling more diverse and flexible tasks.", "bbox": [ 507, 247, 884, 376 ], "page_idx": 3 }, { "type": "table", "img_path": "images/a0a16a53c470faabdced13a3b899ab054de43d85afb26087d606a7a51a2e4988.jpg", "table_caption": [ "Table 5: Ablation study on training stages. MTT and IFT mean Multi-Task Training and Instruction Finetuning Stage." ], "table_footnote": [], "table_body": "<table><tr><td>Model</td><td>MTT</td><td>IFT</td><td>OKVQA</td><td>VQAv2</td><td>TextVQA</td><td>GQA</td><td>MMMU</td><td>InfiMM-Eval</td></tr><tr><td>InfiMM-Llama13B</td><td>✓</td><td></td><td>61.2</td><td>75.0</td><td>41.3</td><td>57.9</td><td>37.1</td><td>36.3</td></tr><tr><td>InfiMM-Llama13B</td><td>✓</td><td></td><td>63.4</td><td>76.9</td><td>45.0</td><td>62.0</td><td>36.1</td><td>28.3</td></tr><tr><td>InfiMM-Llama13B-Chat</td><td>✓</td><td>✓</td><td>62.3</td><td>78.5</td><td>44.6</td><td>61.2</td><td>39.2</td><td>41.4</td></tr></table>", "bbox": [ 514, 458, 878, 497 ], "page_idx": 3 }, { "type": "text", "text": "5 Limitations", "text_level": 1, "bbox": [ 507, 536, 643, 551 ], "page_idx": 3 }, { "type": "text", "text": "Although InfiMM demonstrates robust performance in vision-language modeling while maintaining a balanced computational load for processing multiple images, its efficacy is hampered by the constraint of limited image size, thereby restricting its ability to address complex visual content effectively.", "bbox": [ 507, 565, 884, 678 ], "page_idx": 3 }, { "type": "text", "text": "6 Conclusion", "text_level": 1, "bbox": [ 507, 697, 640, 713 ], "page_idx": 3 }, { "type": "text", "text": "In this study, we introduce InfiMM, an advanced multimodal large language model that significantly advances the field of visual language understanding. InfiMM's architecture, inspired by Flamingo and enhanced by our methodological innovations, demonstrates a delicate balance between computational efficiency and the capacity to handle nuanced visual-language tasks. Evaluation on various benchmarks highlights InfiMM's remarkable ability to understand complex scenes and shows good reasoning ability. InfiMM represents a significant step forward in the multimodal understanding domain.", "bbox": [ 507, 728, 884, 921 ], "page_idx": 3 }, { "type": "page_number", "text": "488", "bbox": [ 485, 928, 515, 940 ], "page_idx": 3 }, { "type": "text", "text": "Ethics Statement", "text_level": 1, "bbox": [ 114, 84, 265, 99 ], "page_idx": 4 }, { "type": "text", "text": "Our MLLMs are constructed upon pre-trained LLMs. Consequently, our models inherit the potential risks associated with LLMs, such as the generation of biased, inappropriate, discriminatory, offensive, misleading, or even harmful contents.", "bbox": [ 112, 111, 487, 191 ], "page_idx": 4 }, { "type": "text", "text": "Additionally, our models undergo training on publicly accessible datasets including LAION, COYO, LAION-COCO, PMD, MMC4, and others. Despite the extensive usage of these datasets, the presence of discriminatory, biased, or sensitive content cannot be ruled out. Given that our models inherently assimilate such information during the training process, prudence is warranted in their application.", "bbox": [ 112, 193, 489, 336 ], "page_idx": 4 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 114, 366, 213, 382 ], "page_idx": 4 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, et al. 2022. Flamingo: a visual language model for few-shot learning. Advances in Neural Information Processing Systems, 35:23716-23736.", "Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C. Lawrence Zitnick, and Devi Parikh. 2015. Vqa: Visual question answering. In International Conference on Computer Vision (ICCV).", "Anas Awadalla, Irena Gao, Josh Gardner, Jack Hessel, Yusuf Hanafy, Wanrong Zhu, Kalyani Marathe, Yonatan Bitton, Samir Gadre, Shiori Sagawa, Jenia Jitsev, Simon Kornblith, Pang Wei Koh, Gabriel Ilharco, Mitchell Wortsman, and Ludwig Schmidt. 2023. Openflamingo: An open-source framework for training large autoregressive vision-language models.", "Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, et al. 2022. Constitutional ai: Harmlessness from ai feedback.", "Ali Furkan Biten, Ruben Tito, Andres Mafla, Lluis Gomez, Marçal Rusinol, Ernest Valveny, CV Jawahar, and Dimosthenis Karatzas. 2019. Scene text visual question answering. In Proceedings of the IEEE/CVF international conference on computer vision, pages 4291-4301.", "Minwoo Byeon, Beomhee Park, Haecheon Kim, Sungjun Lee, Woonhyuk Baek, and Saehoon Kim. 2022. Coyo-700m: Image-text pair dataset. https://github.com/kakaobrain/copeo-dataset.", "Junbum Cha, Wooyoung Kang, Jonghwan Mun, and Byungseok Roh. 2023. Honeybee: Locality-enhanced projector for multimodal llm." ], "bbox": [ 115, 391, 489, 920 ], "page_idx": 4 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dollar, and C. Lawrence Zitnick. 2015. Microsoft coco captions: Data collection and evaluation server.", "Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. 2023. Vicuna: An opensource chatbot impressing gpt-4 with $90\\%$ * chatgpt quality.", "Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, et al. 2022. Palm: Scaling language modeling with pathways.", "Chaoyou Fu, Peixian Chen, Yunhang Shen, Yulei Qin, Mengdan Zhang, Xu Lin, Jinrui Yang, Xiawu Zheng, Ke Li, Xing Sun, Yunsheng Wu, and Rongrong Ji. 2023. Mme: A comprehensive evaluation benchmark for multimodal large language models.", "Danna Gurari, Qing Li, Abigale J Stangl, Anhong Guo, Chi Lin, Kristen Grauman, Jiebo Luo, and Jeffrey P Bigham. 2018. Vizwiz grand challenge: Answering visual questions from blind people. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3608-3617.", "Danna Gurari, Yinan Zhao, Meng Zhang, and Nilavra Bhattacharya. 2020. Captioning images taken by people who are blind. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XVII 16, pages 417-434. Springer.", "Xiaotian Han, Quanzeng You, Yongfei Liu, Wentao Chen, Huangjie Zheng, Khalil Mrini, Xudong Lin, Yiqi Wang, Bohan Zhai, Jianbo Yuan, Heng Wang, and Hongxia Yang. 2023. Infimm-eval: Complex open-ended reasoning evaluation for multi-modal large language models.", "Shaohan Huang, Li Dong, Wenhui Wang, Yaru Hao, et al. 2023. Language is not all you need: Aligning perception with language models.", "Drew A Hudson and Christopher D Manning. 2019. Gqa: A new dataset for real-world visual reasoning and compositional question answering. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 6700-6709.", "Hugo Laurençon, Lucile Saulnier, Léo Tronchon, Stas Bekman, Amanpreet Singh, Anton Lozhkov, Thomas Wang, Siddharth Karamcheti, Alexander M. Rush, Douwe Kiela, Matthieu Cord, and Victor Sanh. 2023a. Obelics: An open web-scale filtered dataset of interleaved image-text documents.", "Hugo Laurençon, Lucile Saulnier, Léo Tronchon, Stas Bekman, Amanpreet Singh, Anton Lozhkov, Thomas Wang, Siddharth Karamcheti, Alexander M. Rush, Douwe Kiela, Matthieu Cord, and Victor Sanh. 2023b. Obelics: An open web-scale filtered dataset of interleaved image-text documents." ], "bbox": [ 510, 85, 884, 920 ], "page_idx": 4 }, { "type": "page_number", "text": "489", "bbox": [ 485, 928, 515, 940 ], "page_idx": 4 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. 2023. Blip-2: Bootstrapping language-image pretraining with frozen image encoders and large language models.", "Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. 2023a. Improved baselines with visual instruction tuning.", "Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. 2023b. Visual instruction tuning.", "Yuan Liu, Haodong Duan, Yuanhan Zhang, Bo Li, Songyang Zhang, Wangbo Zhao, Yike Yuan, Jiaqi Wang, Conghui He, Ziwei Liu, Kai Chen, and Dahua Lin. 2023c. Mmbench: Is your multi-modal model an all-around player?", "Kenneth Marino, Mohammad Rastegari, Ali Farhadi, and Roozbeh Mottaghi. 2019. Ok-vqa: A visual question answering benchmark requiring external knowledge. In Proceedings of the IEEE/cvf conference on computer vision and pattern recognition, pages 3195-3204.", "Minesh Mathew, Dimosthenis Karatzas, and CV Jawahar. 2021. Docvqa: A dataset for vqa on document images. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 2200-2209.", "Anand Mishra, Shashank Shekhar, Ajeet Kumar Singh, and Anirban Chakraborty. 2019. Ocr-vqa: Visual question answering by reading text in images. In 2019 international conference on document analysis and recognition (ICDAR), pages 947-952. IEEE.", "OpenAI. 2023. Gpt-4 technical report.", "Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, et al. 2022. Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in Neural Information Processing Systems, 35:25278-25294.", "Dustin Schwenk, Apoorv Khandelwal, Christopher Clark, Kenneth Marino, and Roozbeh Mottaghi. 2022. A-okvqa: A benchmark for visual question answering using world knowledge. In European Conference on Computer Vision, pages 146-162. Springer.", "Oleksii Sidorov, Ronghang Hu, Marcus Rohrbach, and Amanpreet Singh. 2020. Textcaps: a dataset for image captioning with reading comprehension. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part II 16, pages 742-758. Springer.", "Amanpreet Singh, Ronghang Hu, Vedanuj Goswami, Guillaume Couairon, Wojciech Galuba, Marcus Rohrbach, and Douwe Kiela. 2022. Flava: A foundational language and vision alignment model. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15638-15650." ], "bbox": [ 115, 85, 489, 919 ], "page_idx": 5 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "Amanpreet Singh, Vivek Natarajan, Meet Shah, Yu Jiang, Xinlei Chen, Dhruv Batra, Devi Parikh, and Marcus Rohrbach. 2019. Towards vqa models that can read. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8317-8326.", "Quan Sun, Yuxin Fang, Ledell Wu, Xinlong Wang, and Yue Cao. 2023. Eva-clip: Improved training techniques for clip at scale.", "Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. 2023. Llama 2: Open foundation and finetuned chat models.", "Lewis Tunstall, Edward Beeching, Nathan Lambert, Nazneen Rajani, Kashif Rasul, Younes Belkada, Shengyi Huang, Leandro von Werra, Clémentine Fourrier, Nathan Habib, Nathan Sarrazin, Omar Sanseviero, Alexander M. Rush, and Thomas Wolf. 2023. Zephyr: Direct distillation of lm alignment.", "Peng Wang, An Yang, Rui Men, Junyang Lin, et al. 2022. Ofa: Unifying architectures, tasks, and modalities through a simple sequence-to-sequence learning framework.", "Haiyang Xu, Qinghao Ye, Ming Yan, Yaya Shi, Jiabo Ye, Yuanhong Xu, Chenliang Li, Bin Bi, Qi Qian, Wei Wang, Guohai Xu, Ji Zhang, Songfang Huang, Fei Huang, and Jingren Zhou. 2023. mplug-2: A modularized multi-modal foundation model across text, image and video.", "Weihao Yu, Zhengyuan Yang, Linjie Li, Jianfeng Wang, Kevin Lin, Zicheng Liu, Xinchao Wang, and Lijuan Wang. 2023. Mm-vet: Evaluating large multimodal models for integrated capabilities.", "Xiang Yue, Yuansheng Ni, Kai Zhang, Tianyu Zheng, Ruoqi Liu, Ge Zhang, Samuel Stevens, Dongfu Jiang, Weiming Ren, Yuxuan Sun, Cong Wei, Botao Yu, Ruibin Yuan, Renliang Sun, Ming Yin, Boyuan Zheng, Zhenzhu Yang, Yibo Liu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. 2023. Mmmu:" ], "bbox": [ 510, 85, 880, 919 ], "page_idx": 5 }, { "type": "page_number", "text": "490", "bbox": [ 485, 928, 515, 939 ], "page_idx": 5 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "A massive multi-discipline multimodal understanding and reasoning benchmark for expert agi.", "Ao Zhang, Hao Fei, Yuan Yao, Wei Ji, Li Li, Zhiyuan Liu, and Tat-Seng Chua. 2023a. Transfer visual prompt generator across llms.", "Yanzhe Zhang, Ruiyi Zhang, Jiuxiang Gu, Yufan Zhou, Nedim Lipka, Diyi Yang, and Tong Sun. 2023b. Llavar: Enhanced visual instruction tuning for text-rich image understanding.", "Deyao Zhu, Jun Chen, Xiaoqian Shen, Xiang Li, and Mohamed Elhoseiny. 2023a. Minigpt-4: Enhancing vision-language understanding with advanced large language models.", "Wanrong Zhu, Jack Hessel, Anas Awadalla, Samir Yitzhak Gadre, Jesse Dodge, Alex Fang, Youngjae Yu, Ludwig Schmidt, William Yang Wang, and Yejin Choi. 2023b. Multimodal C4: An open, billion-scale corpus of images interleaved with text. arXiv preprint arXiv:2304.06939." ], "bbox": [ 115, 85, 489, 376 ], "page_idx": 6 }, { "type": "page_number", "text": "491", "bbox": [ 485, 928, 512, 940 ], "page_idx": 6 }, { "type": "text", "text": "A Summary of Evaluation Benchmarks", "text_level": 1, "bbox": [ 114, 84, 473, 99 ], "page_idx": 7 }, { "type": "text", "text": "We provided a detailed summary of evaluation benchmarks we used and their corresponding metrics in Table 6.", "bbox": [ 112, 109, 882, 140 ], "page_idx": 7 }, { "type": "table", "img_path": "images/98307f67137eb085d49dcc0965cc464611bf4d0d89751680575364ba80f5d826.jpg", "table_caption": [ "Table 6: Details on the test dataset." ], "table_footnote": [], "table_body": "<table><tr><td>Task</td><td>Dataset</td><td>Description</td><td>Split</td><td>Metric</td></tr><tr><td rowspan=\"4\">General VQA</td><td>VQAV2</td><td>VQA on natural images</td><td>test-dev</td><td>VQA Score(↑)</td></tr><tr><td>OKVQA</td><td>VQA on natural images but need world knowledge</td><td>val</td><td>VQA Score(↑)</td></tr><tr><td>GQA</td><td>VQA on scene understanding and reasoning</td><td>test-dev</td><td>EM(↑)</td></tr><tr><td>TextVQA</td><td>VQA about text in natural scene</td><td>val</td><td>VQA Score(↑)</td></tr><tr><td rowspan=\"5\">Other Benchmarks</td><td>MME</td><td>Evaluation for MLLM on perception and cognition</td><td>Perception and Cognition</td><td>Accuracy(↑)</td></tr><tr><td>MM-VET</td><td>Dialog style VQA on integrated ability</td><td>test</td><td>GPT-4 score(↑)</td></tr><tr><td>MMbench</td><td>Comprehensive evaluation with multi choice VQA</td><td>test</td><td>Accuracy(↑) score(↑)</td></tr><tr><td>InfiMM-Eval</td><td>Complex Open-ended Reasoning</td><td>test</td><td>GPT-4 score(↑)</td></tr><tr><td>MMMU</td><td>College-level multi choice VQA</td><td>val and test</td><td>Accuracy(↑)</td></tr></table>", "bbox": [ 115, 175, 884, 310 ], "page_idx": 7 }, { "type": "text", "text": "A.1 Training Configuration", "text_level": 1, "bbox": [ 114, 338, 347, 354 ], "page_idx": 7 }, { "type": "table", "img_path": "images/3e27de3a9d29d71fd1503c218763a3706855d39cda78d5a78afc91d571a85758.jpg", "table_caption": [ "Table 7: Details of the training Configuration." ], "table_footnote": [], "table_body": "<table><tr><td>Configuration</td><td>Pretraining</td><td>Multi-Task Training</td><td>Instruction Finetuning</td></tr><tr><td>ViT init.</td><td>EVA2-CLIP2-g</td><td>EVA2-CLIP2-g</td><td>EVA2-CLIP2-g</td></tr><tr><td>LLM init.</td><td>LLaMA2-13b</td><td>LLaMA2-13b</td><td>LLaMA2-13b</td></tr><tr><td>Gated Cross-attention init.</td><td>random</td><td>InfMM 1st stage</td><td>InfMM 2rd stage</td></tr><tr><td>Image resolution</td><td></td><td>224</td><td></td></tr><tr><td>ViT sequence length</td><td></td><td>257</td><td></td></tr><tr><td>Perceiver Resampler length</td><td></td><td>64</td><td></td></tr><tr><td>LLM sequence length</td><td>32 (IT);384 (IIT)</td><td>128</td><td>512</td></tr><tr><td>Optimizer</td><td></td><td>AdamW</td><td></td></tr><tr><td>Optimizer hyperparameter</td><td>β1=0.9, β2=0.95, eps=1e-8</td><td>β1=0.9, β2=0.999, eps=1e-5</td><td></td></tr><tr><td>Peak learning rate</td><td>1e-4</td><td>1e-5</td><td>5e-6</td></tr><tr><td>Minimum learning rate</td><td>1e-4</td><td>1e-6</td><td>5e-7</td></tr><tr><td>Learning rate schedule</td><td></td><td>cosine decay</td><td></td></tr><tr><td>Weight decay</td><td></td><td>0.1</td><td></td></tr><tr><td>Gradient clip</td><td></td><td>1.0</td><td></td></tr><tr><td>Training steps</td><td>285k</td><td>10k</td><td>6k</td></tr><tr><td>warm steps</td><td>6k</td><td>500</td><td>300</td></tr><tr><td>Global batch size</td><td>5120</td><td>256</td><td>64</td></tr><tr><td>Gradient accumulation steps</td><td>2</td><td>1</td><td>1</td></tr><tr><td>Gradient ACC.</td><td>2</td><td>1</td><td>2</td></tr><tr><td>Numerical precision</td><td></td><td>float16</td><td></td></tr><tr><td>Gradient checkpointing</td><td>×</td><td>✓</td><td>×</td></tr><tr><td>Deepspeed Zero Stage</td><td></td><td>2</td><td></td></tr><tr><td>Training resource</td><td>40 NVIDIA A100-SXM-80GB</td><td colspan=\"2\">32 NVIDIA A100-SXM-80GB</td></tr></table>", "bbox": [ 115, 395, 882, 763 ], "page_idx": 7 }, { "type": "page_number", "text": "492", "bbox": [ 485, 928, 515, 940 ], "page_idx": 7 }].gitattributes+64
2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/8f2be83c-c991-4aeb-b4e8-d2d6a4885bb5_content_list.jsonAdded
2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/8f2be83c-c991-4aeb-b4e8-d2d6a4885bb5_model.jsonAdded
2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/8f2be83c-c991-4aeb-b4e8-d2d6a4885bb5_origin.pdfAdded+3
2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/full.mdAdded+410
2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/images.zipAdded+3
2024/Improving Multi-hop Logical Reasoning in Knowledge Graphs with Context-Aware Query Representation Learning/layout.jsonAdded
2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/fd3a3093-f557-4f9f-877d-992d530d936a_content_list.jsonAdded
2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/fd3a3093-f557-4f9f-877d-992d530d936a_model.jsonAdded
2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/fd3a3093-f557-4f9f-877d-992d530d936a_origin.pdfAdded+3
2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/full.mdAdded+453
2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/images.zipAdded+3
2024/Improving Multilingual Neural Machine Translation by Utilizing Semantic and Linguistic Features/layout.jsonAdded
2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/4bb1c3b0-3441-440a-9e1c-420184fa8534_content_list.jsonAdded+1955
2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/4bb1c3b0-3441-440a-9e1c-420184fa8534_model.jsonAdded
2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/4bb1c3b0-3441-440a-9e1c-420184fa8534_origin.pdfAdded+3
2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/full.mdAdded+391
2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/images.zipAdded+3
2024/Improving Retrieval Augmented Open-Domain Question-Answering with Vectorized Contexts/layout.jsonAdded
2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/8fe5ec46-a8c7-45c7-9b3a-9ca837af6512_content_list.jsonAdded
2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/8fe5ec46-a8c7-45c7-9b3a-9ca837af6512_model.jsonAdded
2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/8fe5ec46-a8c7-45c7-9b3a-9ca837af6512_origin.pdfAdded+3
2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/full.mdAdded+375
2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/images.zipAdded+3
2024/Improving the Robustness of Distantly-Supervised Named Entity Recognition via Uncertainty-Aware Teacher Learning and Student-Student Collaborative Learning/layout.jsonAdded
2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/f71242d7-9a99-4f09-b793-23aee922cb0b_content_list.jsonAdded
2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/f71242d7-9a99-4f09-b793-23aee922cb0b_model.jsonAdded
2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/f71242d7-9a99-4f09-b793-23aee922cb0b_origin.pdfAdded+3
2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/full.mdAdded+611
2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/images.zipAdded+3
2024/InFoBench_ Evaluating Instruction Following Ability in Large Language Models/layout.jsonAdded
2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/5800e7fc-a103-47f8-8fcc-b1f9c3f7b6dc_content_list.jsonAdded+1455
2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/5800e7fc-a103-47f8-8fcc-b1f9c3f7b6dc_model.jsonAdded+1855
2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/5800e7fc-a103-47f8-8fcc-b1f9c3f7b6dc_origin.pdfAdded+3
2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/full.mdAdded+257
2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/images.zipAdded+3
2024/Incorporating Syntax and Lexical Knowledge to Multilingual Sentiment Classification on Large Language Models/layout.jsonAdded
2024/Incremental Sequence Labeling_ A Tale of Two Shifts/b2594102-07d5-4222-acc6-de51314519c7_content_list.jsonAdded
2024/Incremental Sequence Labeling_ A Tale of Two Shifts/b2594102-07d5-4222-acc6-de51314519c7_model.jsonAdded
2024/Incremental Sequence Labeling_ A Tale of Two Shifts/b2594102-07d5-4222-acc6-de51314519c7_origin.pdfAdded+3
2024/Incremental Sequence Labeling_ A Tale of Two Shifts/full.mdAdded+418
2024/Incremental Sequence Labeling_ A Tale of Two Shifts/images.zipAdded+3
2024/Incremental Sequence Labeling_ A Tale of Two Shifts/layout.jsonAdded
2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/145a5135-4cb6-4e6f-ab32-7a35b3c6f8e3_content_list.jsonAdded
2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/145a5135-4cb6-4e6f-ab32-7a35b3c6f8e3_model.jsonAdded
2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/145a5135-4cb6-4e6f-ab32-7a35b3c6f8e3_origin.pdfAdded+3
2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/full.mdAdded
2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/images.zipAdded+3
2024/IndicVoices_ Towards building an Inclusive Multilingual Speech Dataset for Indian Languages/layout.jsonAdded
2024/InfiMM_ Advancing Multimodal Understanding with an Open-Sourced Visual Language Model/35489b6e-e8fe-4ad4-bced-211f90ee04a6_content_list.jsonAdded+1017