Add Batch bd3c0f65-96e7-4126-9da2-d2503c2e7240 data
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +64 -0
- 2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/b7e45643-75d8-414e-b9c3-55471416e6dd_content_list.json +0 -0
- 2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/b7e45643-75d8-414e-b9c3-55471416e6dd_model.json +0 -0
- 2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/b7e45643-75d8-414e-b9c3-55471416e6dd_origin.pdf +3 -0
- 2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/full.md +518 -0
- 2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/images.zip +3 -0
- 2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/layout.json +0 -0
- 2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/61d07bb8-84ea-4e77-ab73-fd59a87c73ab_content_list.json +1940 -0
- 2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/61d07bb8-84ea-4e77-ab73-fd59a87c73ab_model.json +0 -0
- 2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/61d07bb8-84ea-4e77-ab73-fd59a87c73ab_origin.pdf +3 -0
- 2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/full.md +363 -0
- 2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/images.zip +3 -0
- 2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/layout.json +0 -0
- 2024/On Efficiently Representing Regular Languages as RNNs/1ffd8d38-80f5-48a5-8ded-ff8f3cb80857_content_list.json +0 -0
- 2024/On Efficiently Representing Regular Languages as RNNs/1ffd8d38-80f5-48a5-8ded-ff8f3cb80857_model.json +0 -0
- 2024/On Efficiently Representing Regular Languages as RNNs/1ffd8d38-80f5-48a5-8ded-ff8f3cb80857_origin.pdf +3 -0
- 2024/On Efficiently Representing Regular Languages as RNNs/full.md +639 -0
- 2024/On Efficiently Representing Regular Languages as RNNs/images.zip +3 -0
- 2024/On Efficiently Representing Regular Languages as RNNs/layout.json +0 -0
- 2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/8a58a270-a9e5-437e-bb95-bae3964ebb76_content_list.json +0 -0
- 2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/8a58a270-a9e5-437e-bb95-bae3964ebb76_model.json +0 -0
- 2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/8a58a270-a9e5-437e-bb95-bae3964ebb76_origin.pdf +3 -0
- 2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/full.md +446 -0
- 2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/images.zip +3 -0
- 2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/layout.json +0 -0
- 2024/On The Persona-based Summarization of Domain-Specific Documents/651ad0c2-5db8-4cc6-9ae9-aba05e409e66_content_list.json +0 -0
- 2024/On The Persona-based Summarization of Domain-Specific Documents/651ad0c2-5db8-4cc6-9ae9-aba05e409e66_model.json +0 -0
- 2024/On The Persona-based Summarization of Domain-Specific Documents/651ad0c2-5db8-4cc6-9ae9-aba05e409e66_origin.pdf +3 -0
- 2024/On The Persona-based Summarization of Domain-Specific Documents/full.md +396 -0
- 2024/On The Persona-based Summarization of Domain-Specific Documents/images.zip +3 -0
- 2024/On The Persona-based Summarization of Domain-Specific Documents/layout.json +0 -0
- 2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/ec565f86-66f8-4233-a78d-67cf9262ff3b_content_list.json +0 -0
- 2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/ec565f86-66f8-4233-a78d-67cf9262ff3b_model.json +0 -0
- 2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/ec565f86-66f8-4233-a78d-67cf9262ff3b_origin.pdf +3 -0
- 2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/full.md +490 -0
- 2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/images.zip +3 -0
- 2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/layout.json +0 -0
- 2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/77cffe5a-33d9-4e6f-bafa-2f5c5a054738_content_list.json +0 -0
- 2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/77cffe5a-33d9-4e6f-bafa-2f5c5a054738_model.json +0 -0
- 2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/77cffe5a-33d9-4e6f-bafa-2f5c5a054738_origin.pdf +3 -0
- 2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/full.md +378 -0
- 2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/images.zip +3 -0
- 2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/layout.json +0 -0
- 2024/On the Language Encoder of Contrastive Cross-modal Models/e4b16f55-1c1a-4636-bc64-112dc7f05e0b_content_list.json +0 -0
- 2024/On the Language Encoder of Contrastive Cross-modal Models/e4b16f55-1c1a-4636-bc64-112dc7f05e0b_model.json +0 -0
- 2024/On the Language Encoder of Contrastive Cross-modal Models/e4b16f55-1c1a-4636-bc64-112dc7f05e0b_origin.pdf +3 -0
- 2024/On the Language Encoder of Contrastive Cross-modal Models/full.md +430 -0
- 2024/On the Language Encoder of Contrastive Cross-modal Models/images.zip +3 -0
- 2024/On the Language Encoder of Contrastive Cross-modal Models/layout.json +0 -0
- 2024/On the Relationship Between RNN Hidden-State Vectors and Semantic Structures/0b4ae23d-d054-4812-9362-fa28d54e737c_content_list.json +0 -0
.gitattributes
CHANGED
|
@@ -3711,3 +3711,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 3711 |
2024/NoteChat_[[:space:]]A[[:space:]]Dataset[[:space:]]of[[:space:]]Synthetic[[:space:]]Patient-Physician[[:space:]]Conversations[[:space:]]Conditioned[[:space:]]on[[:space:]]Clinical[[:space:]]Notes/0c91db4c-f76b-40b1-9eaa-c15428141868_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3712 |
2024/ODA_[[:space:]]Observation-Driven[[:space:]]Agent[[:space:]]for[[:space:]]integrating[[:space:]]LLMs[[:space:]]and[[:space:]]Knowledge[[:space:]]Graphs/e4d3f810-3a26-4b7c-a140-5b8c499dc7d6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3713 |
2024/ONSEP_[[:space:]]A[[:space:]]Novel[[:space:]]Online[[:space:]]Neural-Symbolic[[:space:]]Framework[[:space:]]for[[:space:]]Event[[:space:]]Prediction[[:space:]]Based[[:space:]]on[[:space:]]Large[[:space:]]Language[[:space:]]Model/9387176d-6ca2-4f68-b6ce-2106684b9797_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3711 |
2024/NoteChat_[[:space:]]A[[:space:]]Dataset[[:space:]]of[[:space:]]Synthetic[[:space:]]Patient-Physician[[:space:]]Conversations[[:space:]]Conditioned[[:space:]]on[[:space:]]Clinical[[:space:]]Notes/0c91db4c-f76b-40b1-9eaa-c15428141868_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3712 |
2024/ODA_[[:space:]]Observation-Driven[[:space:]]Agent[[:space:]]for[[:space:]]integrating[[:space:]]LLMs[[:space:]]and[[:space:]]Knowledge[[:space:]]Graphs/e4d3f810-3a26-4b7c-a140-5b8c499dc7d6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3713 |
2024/ONSEP_[[:space:]]A[[:space:]]Novel[[:space:]]Online[[:space:]]Neural-Symbolic[[:space:]]Framework[[:space:]]for[[:space:]]Event[[:space:]]Prediction[[:space:]]Based[[:space:]]on[[:space:]]Large[[:space:]]Language[[:space:]]Model/9387176d-6ca2-4f68-b6ce-2106684b9797_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3714 |
+
2024/OOP_[[:space:]]Object-Oriented[[:space:]]Programming[[:space:]]Evaluation[[:space:]]Benchmark[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/b7e45643-75d8-414e-b9c3-55471416e6dd_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3715 |
+
2024/OTTAWA_[[:space:]]Optimal[[:space:]]TransporT[[:space:]]Adaptive[[:space:]]Word[[:space:]]Aligner[[:space:]]for[[:space:]]Hallucination[[:space:]]and[[:space:]]Omission[[:space:]]Translation[[:space:]]Errors[[:space:]]Detection/61d07bb8-84ea-4e77-ab73-fd59a87c73ab_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3716 |
+
2024/On[[:space:]]Efficiently[[:space:]]Representing[[:space:]]Regular[[:space:]]Languages[[:space:]]as[[:space:]]RNNs/1ffd8d38-80f5-48a5-8ded-ff8f3cb80857_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3717 |
+
2024/On[[:space:]]LLMs-Driven[[:space:]]Synthetic[[:space:]]Data[[:space:]]Generation,[[:space:]]Curation,[[:space:]]and[[:space:]]Evaluation_[[:space:]]A[[:space:]]Survey/8a58a270-a9e5-437e-bb95-bae3964ebb76_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3718 |
+
2024/On[[:space:]]The[[:space:]]Persona-based[[:space:]]Summarization[[:space:]]of[[:space:]]Domain-Specific[[:space:]]Documents/651ad0c2-5db8-4cc6-9ae9-aba05e409e66_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3719 |
+
2024/On[[:space:]]the[[:space:]]Effect[[:space:]]of[[:space:]](Near)[[:space:]]Duplicate[[:space:]]Subwords[[:space:]]in[[:space:]]Language[[:space:]]Modelling/ec565f86-66f8-4233-a78d-67cf9262ff3b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3720 |
+
2024/On[[:space:]]the[[:space:]]Evaluation[[:space:]]of[[:space:]]Speech[[:space:]]Foundation[[:space:]]Models[[:space:]]for[[:space:]]Spoken[[:space:]]Language[[:space:]]Understanding/77cffe5a-33d9-4e6f-bafa-2f5c5a054738_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3721 |
+
2024/On[[:space:]]the[[:space:]]Language[[:space:]]Encoder[[:space:]]of[[:space:]]Contrastive[[:space:]]Cross-modal[[:space:]]Models/e4b16f55-1c1a-4636-bc64-112dc7f05e0b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3722 |
+
2024/On[[:space:]]the[[:space:]]Relationship[[:space:]]Between[[:space:]]RNN[[:space:]]Hidden-State[[:space:]]Vectors[[:space:]]and[[:space:]]Semantic[[:space:]]Structures/0b4ae23d-d054-4812-9362-fa28d54e737c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3723 |
+
2024/On[[:space:]]the[[:space:]]Robustness[[:space:]]of[[:space:]]Document-Level[[:space:]]Relation[[:space:]]Extraction[[:space:]]Models[[:space:]]to[[:space:]]Entity[[:space:]]Name[[:space:]]Variations/174ca3a5-8f90-4b67-befe-2fa2e7be31b5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3724 |
+
2024/On[[:space:]]the[[:space:]]Vulnerability[[:space:]]of[[:space:]]Safety[[:space:]]Alignment[[:space:]]in[[:space:]]Open-Access[[:space:]]LLMs/9e137eb0-a42d-4c63-b419-21d028a8dab7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3725 |
+
2024/OpenCodeInterpreter_[[:space:]]Integrating[[:space:]]Code[[:space:]]Generation[[:space:]]with[[:space:]]Execution[[:space:]]and[[:space:]]Refinement/0a81d006-af02-4382-b8d6-837f4909848c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3726 |
+
2024/Optimal[[:space:]]Transport[[:space:]]Guided[[:space:]]Correlation[[:space:]]Assignment[[:space:]]for[[:space:]]Multimodal[[:space:]]Entity[[:space:]]Linking/eb612465-497d-4fc8-abbe-decd6d9b294d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3727 |
+
2024/Outdated[[:space:]]Issue[[:space:]]Aware[[:space:]]Decoding[[:space:]]for[[:space:]]Factual[[:space:]]Knowledge[[:space:]]Editing/469b19d4-fb7a-4af5-8761-bec10737c852_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3728 |
+
2024/Overcoming[[:space:]]Catastrophic[[:space:]]Forgetting[[:space:]]by[[:space:]]Exemplar[[:space:]]Selection[[:space:]]in[[:space:]]Task-oriented[[:space:]]Dialogue[[:space:]]System/d9504a66-c6f1-464e-8137-83c935beee57_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3729 |
+
2024/P-TA_[[:space:]]Using[[:space:]]Proximal[[:space:]]Policy[[:space:]]Optimization[[:space:]]to[[:space:]]Enhance[[:space:]]Tabular[[:space:]]Data[[:space:]]Augmentation[[:space:]]via[[:space:]]Large[[:space:]]Language[[:space:]]Models/51d81758-147a-405f-a262-00ced0df2a32_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3730 |
+
2024/P4_[[:space:]]Plug-and-Play[[:space:]]Discrete[[:space:]]Prompting[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]Personalization/5ff1a05c-13f5-402b-8206-888929e52865_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3731 |
+
2024/PACE_[[:space:]]Improving[[:space:]]Prompt[[:space:]]with[[:space:]]Actor-Critic[[:space:]]Editing[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Model/2abd6b48-da5c-4209-a382-34bc52e30397_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3732 |
+
2024/PACIT_[[:space:]]Unlocking[[:space:]]the[[:space:]]Power[[:space:]]of[[:space:]]Examples[[:space:]]for[[:space:]]Better[[:space:]]In-Context[[:space:]]Instruction[[:space:]]Tuning/77734f3b-331e-43b1-b604-41465dd22280_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3733 |
+
2024/PANDA_[[:space:]]Preference[[:space:]]Adaptation[[:space:]]for[[:space:]]Enhancing[[:space:]]Domain-Specific[[:space:]]Abilities[[:space:]]of[[:space:]]LLMs/dfbf7c50-5e16-4d2a-bf27-db8ecdbf2cfb_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3734 |
+
2024/PARADISE_[[:space:]]Evaluating[[:space:]]Implicit[[:space:]]Planning[[:space:]]Skills[[:space:]]of[[:space:]]Language[[:space:]]Models[[:space:]]with[[:space:]]Procedural[[:space:]]Warnings[[:space:]]and[[:space:]]Tips[[:space:]]Dataset/5145db6d-3f27-49b6-b71d-2edb0c08fc60_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3735 |
+
2024/PAT-Questions_[[:space:]]A[[:space:]]Self-Updating[[:space:]]Benchmark[[:space:]]for[[:space:]]Present-Anchored[[:space:]]Temporal[[:space:]]Question-Answering/dc95e479-7b33-4980-9f58-76fbe12b67dc_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3736 |
+
2024/PCA-Bench_[[:space:]]Evaluating[[:space:]]Multimodal[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]in[[:space:]]Perception-Cognition-Action[[:space:]]Chain/5afbb4be-2916-4ab3-b4ca-189b41568f1a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3737 |
+
2024/PEK_[[:space:]]A[[:space:]]Parameter-Efficient[[:space:]]Framework[[:space:]]for[[:space:]]Knowledge-Grounded[[:space:]]Dialogue[[:space:]]Generation/818650d1-b9b6-4617-8280-7d134d2cfad4_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3738 |
+
2024/PEMT_[[:space:]]Multi-Task[[:space:]]Correlation[[:space:]]Guided[[:space:]]Mixture-of-Experts[[:space:]]Enables[[:space:]]Parameter-Efficient[[:space:]]Transfer[[:space:]]Learning/700a777e-dd56-4f43-a4e0-2cf02b5bf93d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3739 |
+
2024/PIXAR_[[:space:]]Auto-Regressive[[:space:]]Language[[:space:]]Modeling[[:space:]]in[[:space:]]Pixel[[:space:]]Space/4cf34e93-e6af-41cc-a6af-6911a72986e5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3740 |
+
2024/PLaD_[[:space:]]Preference-based[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Distillation[[:space:]]with[[:space:]]Pseudo-Preference[[:space:]]Pairs/206646c7-ec90-4a99-a8c9-ab58d1d81958_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3741 |
+
2024/POP-CEE_[[:space:]]Position-oriented[[:space:]]Prompt-tuning[[:space:]]Model[[:space:]]for[[:space:]]Causal[[:space:]]Emotion[[:space:]]Entailment/3e1808a1-2dc5-4551-b760-e73e32016c27_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3742 |
+
2024/PPTC[[:space:]]Benchmark_[[:space:]]Evaluating[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]for[[:space:]]PowerPoint[[:space:]]Task[[:space:]]Completion/dee767fa-17cc-4c3c-954d-b748ea4c1925_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3743 |
+
2024/PPTSER_[[:space:]]A[[:space:]]Plug-and-Play[[:space:]]Tag-guided[[:space:]]Method[[:space:]]for[[:space:]]Few-shot[[:space:]]Semantic[[:space:]]Entity[[:space:]]Recognition[[:space:]]on[[:space:]]Visually-rich[[:space:]]Documents/585a7300-4a3c-40fa-b25e-998cc0d9f617_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3744 |
+
2024/PUB_[[:space:]]A[[:space:]]Pragmatics[[:space:]]Understanding[[:space:]]Benchmark[[:space:]]for[[:space:]]Assessing[[:space:]]LLMs’[[:space:]]Pragmatics[[:space:]]Capabilities/f3a28f3e-8441-4103-b236-47b52a03e898_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3745 |
+
2024/Part-of-speech[[:space:]]Tagging[[:space:]]for[[:space:]]Extremely[[:space:]]Low-resource[[:space:]]Indian[[:space:]]Languages/693568db-b1d7-4905-82ac-03b7e25faaf3_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3746 |
+
2024/PartialFormer_[[:space:]]Modeling[[:space:]]Part[[:space:]]Instead[[:space:]]of[[:space:]]Whole[[:space:]]for[[:space:]]Machine[[:space:]]Translation/53bd8018-78ac-4778-aeca-4c08df5b2f99_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3747 |
+
2024/Paying[[:space:]]Attention[[:space:]]to[[:space:]]Deflections_[[:space:]]Mining[[:space:]]Pragmatic[[:space:]]Nuances[[:space:]]for[[:space:]]Whataboutism[[:space:]]Detection[[:space:]]in[[:space:]]Online[[:space:]]Discourse/59a4c69d-574e-4a5e-bd3e-93c7154122a7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3748 |
+
2024/Paying[[:space:]]More[[:space:]]Attention[[:space:]]to[[:space:]]Source[[:space:]]Context_[[:space:]]Mitigating[[:space:]]Unfaithful[[:space:]]Translations[[:space:]]from[[:space:]]Large[[:space:]]Language[[:space:]]Model/42087aa1-0584-48c3-8fa5-62ed2cf119b1_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3749 |
+
2024/Pearl_[[:space:]]A[[:space:]]Review-driven[[:space:]]Persona-Knowledge[[:space:]]Grounded[[:space:]]Conversational[[:space:]]Recommendation[[:space:]]Dataset/7d226c6d-376d-4ea9-969f-0c0a9237ef81_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3750 |
+
2024/Peering[[:space:]]into[[:space:]]the[[:space:]]Mind[[:space:]]of[[:space:]]Language[[:space:]]Models_[[:space:]]An[[:space:]]Approach[[:space:]]for[[:space:]]Attribution[[:space:]]in[[:space:]]Contextual[[:space:]]Question[[:space:]]Answering/de5173c9-fce5-4bd0-803f-18510bbd8292_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3751 |
+
2024/Penetrative[[:space:]]AI_[[:space:]]Making[[:space:]]LLMs[[:space:]]Comprehend[[:space:]]the[[:space:]]Physical[[:space:]]World/33e8760c-fdc5-4d5e-a4db-51933b0abee7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3752 |
+
2024/Perceptions[[:space:]]of[[:space:]]Language[[:space:]]Technology[[:space:]]Failures[[:space:]]from[[:space:]]South[[:space:]]Asian[[:space:]]English[[:space:]]Speakers/61093ac8-8b4d-4f08-8ca5-b7ed97fb5482_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3753 |
+
2024/Personalized[[:space:]]Topic[[:space:]]Selection[[:space:]]Model[[:space:]]for[[:space:]]Topic-Grounded[[:space:]]Dialogue/c57934dd-9e35-4b48-83b1-90eb178bb40e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3754 |
+
2024/Perspective[[:space:]]Taking[[:space:]]through[[:space:]]Generating[[:space:]]Responses[[:space:]]to[[:space:]]Conflict[[:space:]]Situations/211f5018-a672-47a9-bdf2-c0caf4efb3f5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3755 |
+
2024/Perturbed[[:space:]]examples[[:space:]]reveal[[:space:]]invariances[[:space:]]shared[[:space:]]by[[:space:]]language[[:space:]]models/bf25bdae-91a9-4c8e-a59b-7e88730434e3_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3756 |
+
2024/Phased[[:space:]]Instruction[[:space:]]Fine-Tuning[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/b242099b-c9fe-4b84-8700-cbb295b404a7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3757 |
+
2024/PiVe_[[:space:]]Prompting[[:space:]]with[[:space:]]Iterative[[:space:]]Verification[[:space:]]Improving[[:space:]]Graph-based[[:space:]]Generative[[:space:]]Capability[[:space:]]of[[:space:]]LLMs/33dc08d5-b6c5-455d-8090-43d9f08216a9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3758 |
+
2024/Pinpointing[[:space:]]Diffusion[[:space:]]Grid[[:space:]]Noise[[:space:]]to[[:space:]]Enhance[[:space:]]Aspect[[:space:]]Sentiment[[:space:]]Quad[[:space:]]Prediction/b42ea87d-8fc6-4024-b049-ee65ba404cb7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3759 |
+
2024/Plan,[[:space:]]Generate[[:space:]]and[[:space:]]Complicate_[[:space:]]Improving[[:space:]]Low-resource[[:space:]]Dialogue[[:space:]]State[[:space:]]Tracking[[:space:]]via[[:space:]]Easy-to-Difficult[[:space:]]Zero-shot[[:space:]]Data[[:space:]]Augmentation/b5b151e6-8d7d-4eeb-931e-bbb266f33f36_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3760 |
+
2024/Planning[[:space:]]First,[[:space:]]Question[[:space:]]Second_[[:space:]]An[[:space:]]LLM-Guided[[:space:]]Method[[:space:]]for[[:space:]]Controllable[[:space:]]Question[[:space:]]Generation/5c5afad3-29c5-4d9b-8d96-2a252b615fdb_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3761 |
+
2024/Planning,[[:space:]]Creation,[[:space:]]Usage_[[:space:]]Benchmarking[[:space:]]LLMs[[:space:]]for[[:space:]]Comprehensive[[:space:]]Tool[[:space:]]Utilization[[:space:]]in[[:space:]]Real-World[[:space:]]Complex[[:space:]]Scenarios/bec5eca2-231a-45af-8cf1-0c42084ebd30_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3762 |
+
2024/Plausible[[:space:]]Extractive[[:space:]]Rationalization[[:space:]]through[[:space:]]Semi-Supervised[[:space:]]Entailment[[:space:]]Signal/05cb81aa-04be-4cea-a54f-9764e7f4480d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3763 |
+
2024/Play[[:space:]]Guessing[[:space:]]Game[[:space:]]with[[:space:]]LLM_[[:space:]]Indirect[[:space:]]Jailbreak[[:space:]]Attack[[:space:]]with[[:space:]]Implicit[[:space:]]Clues/7b3f25d6-bd00-41d6-8b5c-eac4df657d84_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3764 |
+
2024/Plum_[[:space:]]Prompt[[:space:]]Learning[[:space:]]using[[:space:]]Metaheuristics/e20f52cb-04de-4fa0-9a1a-1b32ecb58759_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3765 |
+
2024/Poor-Supervised[[:space:]]Evaluation[[:space:]]for[[:space:]]SuperLLM[[:space:]]via[[:space:]]Mutual[[:space:]]Consistency/a43d4366-0b60-4943-b053-beff39d40262_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3766 |
+
2024/Predicting[[:space:]]Narratives[[:space:]]of[[:space:]]Climate[[:space:]]Obstruction[[:space:]]in[[:space:]]Social[[:space:]]Media[[:space:]]Advertising/e553500e-f625-4ac0-a432-c4455ce341da_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3767 |
+
2024/Predicting[[:space:]]the[[:space:]]Unpredictable_[[:space:]]Uncertainty-Aware[[:space:]]Reasoning[[:space:]]over[[:space:]]Temporal[[:space:]]Knowledge[[:space:]]Graphs[[:space:]]via[[:space:]]Diffusion[[:space:]]Process/6df2ea98-c196-4cfe-a7c0-a28d1d695a86_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3768 |
+
2024/Preemptive[[:space:]]Answer[[:space:]]“Attacks”[[:space:]]on[[:space:]]Chain-of-Thought[[:space:]]Reasoning/903e97ec-2490-4675-b76d-90e761c3af9d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3769 |
+
2024/Prefix[[:space:]]Text[[:space:]]as[[:space:]]a[[:space:]]Yarn_[[:space:]]Eliciting[[:space:]]Non-English[[:space:]]Alignment[[:space:]]in[[:space:]]Foundation[[:space:]]Language[[:space:]]Model/2100b1fe-c891-45fc-b1e0-150b1943dbbd_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3770 |
+
2024/Pro-Woman,[[:space:]]Anti-Man_[[:space:]]Identifying[[:space:]]Gender[[:space:]]Bias[[:space:]]in[[:space:]]Stance[[:space:]]Detection/ba4f150d-fb2c-453c-bed9-49ec4e6daac6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3771 |
+
2024/ProLex_[[:space:]]A[[:space:]]Benchmark[[:space:]]for[[:space:]]Language[[:space:]]Proficiency-oriented[[:space:]]Lexical[[:space:]]Substitution/ab750c18-f966-4189-81a4-1519fb02dde5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3772 |
+
2024/Probing[[:space:]]the[[:space:]]Emergence[[:space:]]of[[:space:]]Cross-lingual[[:space:]]Alignment[[:space:]]during[[:space:]]LLM[[:space:]]Training/9a200fc2-9c0e-4936-a7b6-d55cf900cef9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3773 |
+
2024/Probing[[:space:]]the[[:space:]]Uniquely[[:space:]]Identifiable[[:space:]]Linguistic[[:space:]]Patterns[[:space:]]of[[:space:]]Conversational[[:space:]]AI[[:space:]]Agents/c31f0756-af74-4c20-8b43-3dee662426c5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3774 |
+
2024/ProgGen_[[:space:]]Generating[[:space:]]Named[[:space:]]Entity[[:space:]]Recognition[[:space:]]Datasets[[:space:]]Step-by-step[[:space:]]with[[:space:]]Self-Reflexive[[:space:]]Large[[:space:]]Language[[:space:]]Models/0c87a9fc-6505-4afb-8ee0-47d5e04d4677_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3775 |
+
2024/Progressive[[:space:]]Tuning_[[:space:]]Towards[[:space:]]Generic[[:space:]]Sentiment[[:space:]]Abilities[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/66d8b795-eff8-45d8-ac24-cc01ce0095bd_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3776 |
+
2024/Prometheus-Vision_[[:space:]]Vision-Language[[:space:]]Model[[:space:]]as[[:space:]]a[[:space:]]Judge[[:space:]]for[[:space:]]Fine-Grained[[:space:]]Evaluation/cba58d18-c3ca-47fc-98e4-d6dde35372e9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 3777 |
+
2024/Prompt[[:space:]]Chaining[[:space:]]or[[:space:]]Stepwise[[:space:]]Prompt_[[:space:]]Refinement[[:space:]]in[[:space:]]Text[[:space:]]Summarization/af4d090d-ac6e-4f81-9447-14f3ca5a1e4a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/b7e45643-75d8-414e-b9c3-55471416e6dd_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/b7e45643-75d8-414e-b9c3-55471416e6dd_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/b7e45643-75d8-414e-b9c3-55471416e6dd_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6cea85e21e0db5e5928d117ddb0685c7a4557b0aeee7f2d9b0ac8f335faf7c51
|
| 3 |
+
size 1899832
|
2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/full.md
ADDED
|
@@ -0,0 +1,518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OOP: Object-Oriented Programming Evaluation Benchmark for Large Language Models
|
| 2 |
+
|
| 3 |
+
Shuai Wang $^{1,2}$ Liang Ding $^{3*}$ Li Shen $^{4}$ Yong Luo $^{1,2*}$ Bo Du $^{1}$ Dacheng Tao $^{5}$ \
|
| 4 |
+
$^{1}$ Institute of Artificial Intelligence, School of Computer Science, Wuhan University
|
| 5 |
+
|
| 6 |
+
$^{2}$ Hubei Luojia Laboratory, Wuhan $^{3}$ The University of Sydney
|
| 7 |
+
|
| 8 |
+
$^{4}$ School of Cyber Science and Technology, Sun Yat-sen University
|
| 9 |
+
|
| 10 |
+
$^{5}$ College of Computing & Data Science, Nanyang Technology University
|
| 11 |
+
|
| 12 |
+
{wangshuai123,luoyong,dubo}@whu.edu.cn
|
| 13 |
+
|
| 14 |
+
{mathshenli, liangding.liam, dacheng.tao}@gmail.com
|
| 15 |
+
|
| 16 |
+
# Abstract
|
| 17 |
+
|
| 18 |
+
Advancing automated programming necessitates robust and comprehensive code generation benchmarks, yet current evaluation frameworks largely neglect object-oriented programming (OOP) in favour of functional programming (FP), e.g., HumanEval and MBPP. To address this, our study introduces a pioneering OOP-focused benchmark, featuring 431 Python programs that encompass essential OOP concepts and features like classes and encapsulation methods. We propose a novel evaluation metric, $\text{pass} \circ$ tailored for OOP, enhancing traditional $\text{pass} \circ k$ metric. Our evaluation of 23 leading large language models (LLMs), including both general and code-specialized models, reveals three key insights: 1) $\text{pass} \circ o$ offers a more relevant and comprehensive assessment for OOP code generation; 2) Despite excelling in FP, code-specialized LLMs like WizardCoder lag in OOP compared to models like ChatGPT; 3) The poor performance of all advanced LLMs on our OOP benchmark highlights a critical need for improvements in this field. Our benchmark and scripts are publicly released at: https://github.com/alphad1/OOP-eval.
|
| 19 |
+
|
| 20 |
+
# 1 Introduction
|
| 21 |
+
|
| 22 |
+
Large language models (LLMs, Ouyang et al., 2022a; Touvron et al., 2023), consisting of billions or even trillions of parameters' Transformer blocks (Vaswani et al., 2017), have emerged like mushrooms after the rain, especially since the emergence of ChatGPT. In comparison to small models, LLMs exhibit stronger generalization and reasoning capabilities (Wei et al., 2022). Currently, LLMs are playing a crucial role in various tasks, e.g., code generation (Chen et al., 2021; Li et al., 2022; Roziere et al., 2023), language understanding (Zhong et al., 2023), human-computer interac
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
Figure 1: The performance comparison of widely-used code language models on functional programming (FP) and object-oriented programming (OOP) code generation benchmarks, in terms of $\text{pass} @ 1$ scores. We see that all models perform relatively well on FP benchmarks, i.e., Humaneval (Chen et al., 2021) and MBPP (Austin et al., 2021), while exhibiting poor performance on our OOP benchmark.
|
| 26 |
+
|
| 27 |
+
tion (Tolomei et al., 2023; Moslem et al., 2023), and translation (Peng et al., 2023; Lu et al., 2023).
|
| 28 |
+
|
| 29 |
+
The process of code generation entails crafting code in a suitable programming language from natural language descriptions of problems or requirements, aiming to effectively solve the problems or fulfill the requirements. Given that hiring professional programmers to write code consumes a significant amount of human and material resources, the importance of automated programming becomes particularly evident. Currently, the question of how to use the rising LLMs to generate more accurate automated programming codes based on problems or requirements stated by actual natural language has become an important research topic (Liu et al., 2023; Zhong and Wang, 2023). In the research process, code generation evaluation is crucial. Code generation evaluation not only needs to objectively and impartially reflect the current performance of LLMs in programming but also should disclose the shortcomings in LLM programming to further enhance its potential.
|
| 30 |
+
|
| 31 |
+
[Importance of OOP] According to the Novem
|
| 32 |
+
|
| 33 |
+
<table><tr><td>Benchmark</td><td>Number</td><td>NL</td><td>PL</td><td>Task Type</td></tr><tr><td>HumanEval (Chen et al., 2021)</td><td>164</td><td>en</td><td>Python</td><td>Function Programming</td></tr><tr><td>MBPP (Austin et al., 2021)</td><td>974</td><td>en</td><td>Python</td><td>Function Programming</td></tr><tr><td>APPS (Hendrycks et al., 2021)</td><td>5000</td><td>en</td><td>Python</td><td>Function Programming</td></tr><tr><td>CodeContests (Li et al., 2022)</td><td>165</td><td>en</td><td>Multi</td><td>Function Programming</td></tr><tr><td>MultiPL-MBPP (Cassano et al., 2023)</td><td>974*</td><td>Multi</td><td>Multi</td><td>Function Programming</td></tr><tr><td>HumanEval-X (Zheng et al., 2023)</td><td>164*</td><td>en</td><td>Multi</td><td>Function Programming</td></tr><tr><td>MultiPL-HumanEval (Cassano et al., 2023)</td><td>164*</td><td>en</td><td>Multi</td><td>Function Programming</td></tr><tr><td>MTPB (Nijkamp et al., 2022)</td><td>115</td><td>en</td><td>Python</td><td>Function Programming</td></tr><tr><td>ODEX (Wang et al., 2022)</td><td>945</td><td>Multi</td><td>Python</td><td>Function Programming</td></tr><tr><td>PandasEval (Zan et al., 2022)</td><td>101</td><td>en</td><td>Python</td><td>Function Programming</td></tr><tr><td>BIG-Bench (Srivastava et al., 2022)</td><td>32</td><td>en</td><td>Python</td><td>Function Programming</td></tr><tr><td>CodeApex* (Fu et al., 2023)</td><td>476*</td><td>zh&en</td><td>C++</td><td>Function Programming</td></tr><tr><td>ClassEval (Du et al., 2023)</td><td>100</td><td>en</td><td>Python</td><td>Class-level Programming</td></tr><tr><td>OOP (Our)</td><td>431</td><td>en</td><td>Python</td><td>Object-Oriented Programming</td></tr></table>
|
| 34 |
+
|
| 35 |
+
Table 1: Overview of existing code evaluation benchmarks. ("NL" denotes natural language describing the problem or requirements; "PL" represents the generated programming language; "en" and "zh" denote English and Chinese, respectively, and "Multi" means containing multiple NLs or PLs; "**" indicates the number of samples for each language; * means that in CodeApex, we only considered code generation tasks.)
|
| 36 |
+
|
| 37 |
+
ber programming language rankings by TIOBE $^{2}$ , four out of the top five programming languages are OOP, which reflects the importance of OOP languages. OOP is centred on designing code around data or objects rather than organizing it based on functionality and logic (Stroustrup, 1988; Stefik and Bobrow, 1985). OOP focuses more on the programming paradigm of class and object (Wegner, 1990). Functions are commonly referred to as methods in OOP.
|
| 38 |
+
|
| 39 |
+
[Motivation] However, existing code generation evaluation benchmarks primarily focus on the evaluation of FP, and lack the evaluation of relevant concepts and features of OOP, e.g., class, inheritance, encapsulation methods, etc. If using existing benchmarks in Table 1 for evaluation can only show the performance of LLMs in FP, it fails to reflect their potential in OOP, as illustrated in Figure 1.
|
| 40 |
+
|
| 41 |
+
[OOP benchmark and metric] Considering the limitations of current code generation evaluation FP benchmarks and the widespread use of the Python programming language, we propose the first OOP evaluation benchmark based on Python. OOP benchmark consists of 431 Python programs, covering key concepts and features of OOP, including class, inheritance, encapsulation methods, etc. Furthermore, to prevent the issue where LLMs may not generate concepts and features of OOP, we have optimized the pass@k (Kulal et al., 2019; Chen
|
| 42 |
+
|
| 43 |
+
et al., 2021) metric by matching key points in natural language with key points in the programming language, i.e., the class names and private function names, etc, for natural language requirements are matched with the class names and private function names, etc., in the programming language. Our main contributions are summarized as follows:
|
| 44 |
+
|
| 45 |
+
1. We construct and release the first OOP evaluation benchmark, which encompasses concepts and features of OOP, e.g., class, polymorphism, encapsulation methods, etc.
|
| 46 |
+
2. We devise a new metric $\text{pass} @ o$ based on conventional $\text{pass} @ k$ , tailored for the OOP code generation task, by matching key points in natural language and programming language.
|
| 47 |
+
3. We extensively evaluated our OOP with 23 advanced LLMs, demonstrating that $i)$ there is still significant room for improving the OOP tasks, $ii)$ our benchmark could serve as a robust and fair indicator that helps the community quantify LLMs' OOP performance.
|
| 48 |
+
|
| 49 |
+
# 2 Related work
|
| 50 |
+
|
| 51 |
+
Code Evaluation Benchmark In the early days of LLMs, researchers from Google and OpenAI launched artificial handwritten code evaluation benchmarks, namely MBPP (Austin et al., 2021) and HumanEval (Chen et al., 2021), respectively.
|
| 52 |
+
|
| 53 |
+
MBPP and HumanEval are currently the mainstream code generation evaluation benchmarks, but both of them are based on the Python programming language. Subsequently, MultiPL-MBPP (Cassano et al., 2023) and MultiPL-HumanEval (Cassano et al., 2023) expanded upon these two benchmarks by translating the Python programming language into eighteen other programming languages, e.g., Java, C++, PHP, etc, to evaluate the performance of LLMs across others programming languages. Additionally, HumanEval-X (Zheng et al., 2023) incorporated multiple test cases into the HumanEval benchmark. Apart from the extensions made to these two benchmarks, other benchmarks like CodeApex (Fu et al., 2023) and ODEX (Wang et al., 2022) exhibit distinctive features across different natural languages and task types. ClassEval (Du et al., 2023) focuses on class tasks. Unlike existing code evaluation benchmarks, our proposed OOP benchmark primarily focuses on the concepts and features of OOP, e.g., class, inheritance, etc. These works are summarized in Table 1.
|
| 54 |
+
|
| 55 |
+
Code Evaluation Metrics Existing evaluation metrics can be broadly categorized into two types: dynamic evaluation metrics and static evaluation metrics. Dynamic evaluation metrics evaluate the executability of generated codes by using test cases, with $pass@k$ (Kulal et al., 2019; Chen et al., 2021) serving as the primary representative. The calculation process for $pass@k$ is shown in Appendix A. Additionally, this category of metrics includes $n@k$ (Li et al., 2022). Static evaluation metrics calculate BLEU (Papineni et al., 2002), ROUGE (Lin, 2004), Codescore (Dong et al., 2023) and CodeBLEU (Ren et al., 2020) among manually written examples and generated programs. However, these code evaluation metrics do not specifically focus on evaluating the concepts and features of OOP. Therefore, we further optimized the $pass@k$ metric based on the evaluation benchmark for OOP.
|
| 56 |
+
|
| 57 |
+
# 3 Evaluation Framework
|
| 58 |
+
|
| 59 |
+
# 3.1 Overview
|
| 60 |
+
|
| 61 |
+
Existing code generation benchmarks in Table 1 for are confined to FP and do not involve essential concepts and features of OOP. We take the frequently used benchmarks, HumanEval (Chen et al., 2021) and MBPP (Austin et al., 2021) in Table 1, as examples. They primarily evaluate the capabilities of LLMs in FP. The detailed descriptions of Hu
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 2: The generation of private functions cannot be evaluated using pass@k. (We instructed ChatGPT (Ouyang et al., 2022b; OpenAI, 2023) model to generate the class class SS, public function public_Shortest_subarray, and private function def __private_Shortest_subarray based on a given prompt and implement the corresponding requirements within the functions. However, ChatGPT does not generate the private functions named private_Shortest_subarray outlined in the red box.)
|
| 65 |
+
|
| 66 |
+
manEval and MBPP are provided in Appendix B. If we use existing benchmarks in Table 1 for evaluation, it does not show the capability of LLMs in OOP, as illustrated in Figure 1, that is, the seemingly decent LLMs (on FP tasks) perform relatively worse on OOP tasks. In addition, existing code generation evaluation metrics primarily use $\text{pass} @ k$ to evaluate the executability of the generated code. However, using the $\text{pass} @ k$ metric can not reflect whether LLMs generate concepts and features related to OOP, as illustrated in Figure 2. Therefore, $\text{pass} @ k$ can not objectively and fairly reflect the OOP capabilities of LLMs.
|
| 67 |
+
|
| 68 |
+
As a result, we established an OOP benchmark and proposed the evaluation metric $\text{pass} @ o$ for OOP. The process for constructing the OOP benchmark is illustrated in Figure 3.
|
| 69 |
+
|
| 70 |
+
# 3.2 Building OOP Benchmarks
|
| 71 |
+
|
| 72 |
+
Data Filtering. The training data for current LLMs mostly comes from the internet. If we directly evaluate LLMs using existing OOP data from
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Figure 3: The construction process of our object-oriented programming (OOP) benchmark.
|
| 76 |
+
|
| 77 |
+
the web, it would not reflect the OOP capabilities of LLMs. Therefore, we first rigorously selected 500 natural language description-based problems or requirements based on Python from platforms like LeetCode $^{3}$ , open-source repositories on GitHub $^{4}$ , Stack Overflow $^{5}$ , and Codewars $^{6}$ . These 500 questions or requirements only are limited to FP and do not involve concepts and features related to OOP.
|
| 78 |
+
|
| 79 |
+
Human Rewritten. Subsequently, we manually rewrite the collected 500 questions or requirements by adhering to the following rules:
|
| 80 |
+
|
| 81 |
+
1. Designing, based on the problems or requirements, with relevant OOP concepts and features, e.g., class names, inheritance name (i.e., parent class name), encapsulation methods name (i.e., public function name and private function names), etc.
|
| 82 |
+
2. Related problems or requirements are implemented within the public function and private function of the class while ensuring the encapsulation of that implementation.
|
| 83 |
+
|
| 84 |
+
3. Convert the variables associated with problems or requirements into class attribute variables, ensuring that these variables are accessible in both public and private functions.
|
| 85 |
+
4. If the implementation of problems or requirements is placed within the private function of the class, it is necessary to design a corresponding public function for access.
|
| 86 |
+
5. The rewritten OOP relevant problems or requirements can be successfully implemented and accessed through objects.
|
| 87 |
+
|
| 88 |
+
Following the five rules mentioned above, we conducted a standardized rewriting of the 500 Python-based problems or requirements.
|
| 89 |
+
|
| 90 |
+
Case Design. Finally, we designed corresponding test cases to evaluate OOP. We obtained 431 samples of OOP, as shown in Figure 3. The specific construction details of OOP are provided in Appendix C.
|
| 91 |
+
|
| 92 |
+
Level Classification. Given the difficulty nature of programming, we divided the designed OOP benchmark into three levels: Simple-level OOP, Moderate-level OOP, and Difficult-level OOP, as shown in Figure 7.
|
| 93 |
+
|
| 94 |
+
Simple-level OOP has 77 program samples, and includes only class, and public function. Moderate-level OOP builds upon simple-level OOP by adding attribute variables and private functions, and has 179 program samples. Nevertheless, the difficult-level OOP is based on the Simple-level of OOP, and adds inheritance, polymorphism and other related concepts and features of OOP. There are a total of 175 program samples for difficult-level OOP. Although private functions are not involved in the difficulty level, the problems or requirements in difficult-level OOP are more complex and varied. Using such a level of classification, we can not only evaluate the performance of existing LLMs in OOP but also analyze the shortcomings of LLMs, which allows us to better unearth the potential of LLMs in OOP. Using this approach makes it more convenient for us to improve the OOP performance of LLMs.
|
| 95 |
+
|
| 96 |
+
# 3.3 Evaluation Metrics Pass@o
|
| 97 |
+
|
| 98 |
+
To evaluate whether LLMs generate concepts and features related to OOP, i.e., generated subclass name, parent class name, private function name and public function name, etc, in the programming language, we proposed a pass@o metric based on OOP. The pass@o metric adds keyword points matching between natural language with programming language based on the pass@k, i.e.,
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\alpha = \sum_ {i = 1} ^ {n} f (X _ {i}),
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
w h e r e f (X _ {i}) = \tag {1}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\left\{ \begin{array}{l} 1, i f u t f \left(X _ {i}\right) p a s s e d a n d \sum_ {j} ^ {m} x _ {j} \exists X _ {i} \\ 0, \text {o t h e r w i s e} \end{array} \right.,
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
p a s s @ o := \underset {P r o b l e m s} {\mathbb {E}} \left[ 1 - \frac {\binom {n - \alpha} {o}}{\binom {n} {o}} \right], \tag {2}
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
In Eq. (1), $n$ represents the number of code generations for a given problem; $X_{i}$ represents the $i$ -th generated program code; $\alpha$ represents the quantity of $n$ generated codes passing tests and matches; $ut(\cdot)$ denotes the unit test function; $m$ represents the number of keyword points in the current prompt; and $x_{j}$ represents the $j$ -th keyword points in natural language. In Eq. (2), $o \leq n$ .
|
| 117 |
+
|
| 118 |
+
The pass@o metric not only optimizes the limitations of pass@k evaluation but also objectively and fairly reflects the OOP performance of LLMs.
|
| 119 |
+
|
| 120 |
+
# 4 Experiments
|
| 121 |
+
|
| 122 |
+
# 4.1 Experimental Setup
|
| 123 |
+
|
| 124 |
+
Evaluated LLMs In the OOP task, we conduct experiments on 23 mainstream LLMs. These models include both general LLMs, i.g., ChatGPT (Ouyang et al., 2022b; OpenAI, 2023), Llama2 (Touvron et al., 2023), InternLm (Team, 2023a), MPT (Team, 2023b), DeepSeek (Team, 2024), Falcon (Almazrouei et al., 2023), Qwen (Bai et al., 2023), Yi and code-specialized LLMs, e.g., CodeLlama (Roziere et al., 2023), WizardCoder (Luo et al., 2023), StarCoder (Li et al., 2023), as shown in Table 6. The details description of 24 LLMs are shown in Appendix D.
|
| 125 |
+
|
| 126 |
+
Parameter Settings. In the experiment, we followed the settings on Llama2 (Touvron et al., 2023), configuring the temperature to 0.1 and 0.8 for code generation. The remaining parameters $(top - p = 0.95, n = 200, o \leq n)$ , consistently remained unchanged. We evaluate the OOP benchmark on eight NVIDIA A100 GPUs using the vllm (Kwon et al., 2023) 0.2.1.post1 framework<sup>8</sup>.
|
| 127 |
+
|
| 128 |
+
Metrics. In terms of evaluation metrics, we use for $\text{pass} @ k$ and the proposed $\text{pass} @ o$ metrics.
|
| 129 |
+
|
| 130 |
+
# 4.2 Overall Evaluation Result
|
| 131 |
+
|
| 132 |
+
The evaluation results of the LLMs with temperatures set to 0.1 and 0.8 are presented in Table 2, respectively. From the experimental results, We have obtained the following conclusions:
|
| 133 |
+
|
| 134 |
+
The OOP capabilities of the existing LLMs fall far short of the ideal state In Table 2, we can observe that LLMs with strong coding capabilities (e.g., WizardCoder-15b, CodeLlama-7b-Python, and CodeLlama-13b, achieved scores of 58.12, 40.48, and 35.07, respectively, in the HumanEval code leaderboard), exhibit performance in OOP benchmarks that falls significantly short of the ideal state. WizardCoder-15b, CodeLlama-7b-Python, and CodeLlama-13b scored 3.02, 1.27, and 2.92, respectively, on the OOP benchmark at pass@1. Their scores on pass@100 were also 10.01, 14.07, and 13.11, respectively. Even the current ChatGPT model with strong general capabilities scores 15.69
|
| 135 |
+
|
| 136 |
+
7https://01.ai/cn
|
| 137 |
+
<sup>8</sup>https://github.com/vllm-project/vllm
|
| 138 |
+
$^{9}$ https://huggingface.co/spaces/bigcode/bigcode-models-leaderboard
|
| 139 |
+
|
| 140 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Model</td><td colspan="3">1</td><td colspan="3">80</td><td colspan="3">100</td></tr><tr><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td></tr><tr><td rowspan="15">General</td><td>Falcon-7b</td><td>0.01</td><td>0.00</td><td>-0.01</td><td>0.37</td><td>0.19</td><td>-0.18</td><td>0.47</td><td>0.23</td><td>-0.24</td></tr><tr><td>Falcon-40b</td><td>0.01</td><td>0.00</td><td>-0.01</td><td>2.90</td><td>1.11</td><td>-1.79</td><td>3.42</td><td>1.26</td><td>-2.16</td></tr><tr><td>Llama2-7b</td><td>0.01</td><td>0.01</td><td>-0.00</td><td>4.02</td><td>1.72</td><td>-2.30</td><td>4.62</td><td>1.94</td><td>-2.68</td></tr><tr><td>InternLm-7b</td><td>0.03</td><td>0.02</td><td>-0.01</td><td>1.04</td><td>0.52</td><td>-0.52</td><td>1.22</td><td>0.58</td><td>-0.64</td></tr><tr><td>Yi-6b</td><td>0.07</td><td>0.01</td><td>-0.06</td><td>5.07</td><td>1.67</td><td>-3.40</td><td>6.00</td><td>1.98</td><td>-4.02</td></tr><tr><td>Llama2-13b</td><td>0.09</td><td>0.06</td><td>-0.03</td><td>7.28</td><td>2.17</td><td>-5.11</td><td>8.24</td><td>2.41</td><td>-5.83</td></tr><tr><td>MPT-7b</td><td>0.28</td><td>0.02</td><td>-0.26</td><td>4.77</td><td>1.27</td><td>-3.50</td><td>5.50</td><td>1.46</td><td>-4.04</td></tr><tr><td>Qwen-7b</td><td>0.94</td><td>0.61</td><td>-0.33</td><td>15.02</td><td>5.68</td><td>-9.34</td><td>16.35</td><td>5.83</td><td>-10.52</td></tr><tr><td>Qwen-14b</td><td>1.52</td><td>0.75</td><td>-0.77</td><td>26.28</td><td>10.58</td><td>-15.70</td><td>28.10</td><td>11.48</td><td>-16.62</td></tr><tr><td>DeepSeek-7b</td><td>1.53</td><td>0.50</td><td>-1.03</td><td>16.83</td><td>7.72</td><td>-9.11</td><td>18.70</td><td>8.70</td><td>-10.00</td></tr><tr><td>Yi-34b</td><td>2.20</td><td>1.09</td><td>-1.11</td><td>21.96</td><td>8.43</td><td>-13.53</td><td>23.68</td><td>9.22</td><td>-14.46</td></tr><tr><td>Llama2-70b</td><td>3.55</td><td>1.25</td><td>-2.30</td><td>21.01</td><td>9.97</td><td>-11.04</td><td>23.14</td><td>11.16</td><td>-11.98</td></tr><tr><td>DeepSeek-67b</td><td>8.02</td><td>3.71</td><td>-3.95</td><td>49.31</td><td>27.42</td><td>-21.89</td><td>51.60</td><td>29.47</td><td>-22.13</td></tr><tr><td>Qwen-72b</td><td>11.20</td><td>4.62</td><td>-6.58</td><td>57.48</td><td>35.70</td><td>-21.78</td><td>59.52</td><td>37.83</td><td>-21.69</td></tr><tr><td>ChatGPT</td><td>42.88</td><td>15.69</td><td>-27.19</td><td>75.71</td><td>58.28</td><td>-17.43</td><td>76.20</td><td>59.80</td><td>-16.40</td></tr><tr><td rowspan="8">Specialized</td><td>GPT_BigCode</td><td>0.10</td><td>0.06</td><td>-0.04</td><td>7.00</td><td>2.58</td><td>-4.42</td><td>8.01</td><td>2.92</td><td>-5.09</td></tr><tr><td>CodeLlama-7b</td><td>2.67</td><td>1.20</td><td>-1.47</td><td>24.09</td><td>9.16</td><td>-14.93</td><td>25.72</td><td>9.92</td><td>-15.80</td></tr><tr><td>CodeLlama-13b-Python</td><td>2.80</td><td>1.03</td><td>-1.77</td><td>36.34</td><td>17.22</td><td>-19.12</td><td>38.75</td><td>18.96</td><td>-19.79</td></tr><tr><td>StarCoder</td><td>4.61</td><td>1.26</td><td>-3.35</td><td>28.67</td><td>10.05</td><td>-18.62</td><td>30.44</td><td>10.88</td><td>-19.56</td></tr><tr><td>CodeLlama-7b-Python</td><td>4.68</td><td>1.27</td><td>-3.41</td><td>28.68</td><td>12.90</td><td>-15.78</td><td>30.33</td><td>14.07</td><td>-16.26</td></tr><tr><td>CodeLlama-34b</td><td>6.24</td><td>1.58</td><td>-4.66</td><td>46.31</td><td>22.59</td><td>-23.72</td><td>49.01</td><td>24.68</td><td>-24.33</td></tr><tr><td>WizardCoder-15b</td><td>6.83</td><td>3.02</td><td>-3.81</td><td>28.10</td><td>9.50</td><td>-18.60</td><td>29.41</td><td>10.01</td><td>-19.40</td></tr><tr><td>CodeLlama-13b</td><td>6.87</td><td>2.92</td><td>-3.95</td><td>32.69</td><td>12.20</td><td>-20.49</td><td>34.53</td><td>13.11</td><td>-21.42</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 2: Performance of 23 large language models (LLMs) on object-oriented programming (OOP) tasks. We also reported the differences in evaluation results between $\text{pass} @ k$ and $\text{pass} @ o$ . (All LLMs are evaluated in zero-shot fashion. For $\text{pass} @ 100$ and $\text{pass} @ 80$ scores, we use a temperature of 0.8 and top- $p = 0.95$ . For $\text{pass} @ 1$ scores, we use a temperature of 0.1 and top- $p = 0.95$ . The best results are highlighted in black bold; Red indicates the differences evaluated using the $\text{pass} @ o$ and $\text{pass} @ k$ metrics; Underlined indicates the maximum disparities evaluated between $\text{pass} @ o$ and $\text{pass} @ k$ metrics; Gray indicates models with a larger number of parameters.)
|
| 143 |
+
|
| 144 |
+
on pass@1 and 59.80 on pass@100. The results indicate that the untapped potential of existing LLMs in OOP has not been fully explored.
|
| 145 |
+
|
| 146 |
+
Limitations of $\text{pass} @ k$ evaluated OOP The scores from Table 2 indicate that using $\text{pass} @ k$ does not objectively reflect the OOP performance of LLMs, e.g., the WizardCoder-15b model achieves scores of 6.83, 28.10, and 29.41 using $\text{pass} @ k$ , while its scores drop to 3.02, 9.50, and 10.01 when using $\text{pass} @ o$ . The evaluation scores of other LLMs using $\text{pass} @ o$ in Table 2 showed a decline, once again proving the limitations of $\text{pass} @ k$ in evaluation OOP.
|
| 147 |
+
|
| 148 |
+
In addition, we also observed a significant phenomenon, e.g., when evaluated using $pass@k$ , Qwen-14b (score 26.28) scored lower than WizardCoder-15b (score 28.10) on pass@80. However, when evaluated using $pass@o$ , Qwen-14b (score 10.58) scored higher than WizardCoder-15b (score 9.50) on pass@80. Analyzing the experimental results of Qwen-14b and WizardCoder-15b, we observed that when evaluated using $pass@o$ , Qwen-14b outperforms WizardCoder-15b in terms
|
| 149 |
+
|
| 150 |
+
of the ability to correctly generate OOP concepts and feature keywords, as illustrated in Figure 4. It also reiterates that $\text{pass} @ k$ cannot objectively and fairly reflect the evaluation results of OOP.
|
| 151 |
+
|
| 152 |
+
A larger model scale does not necessarily perform better on pass@1 In Table 2, when evaluated using pass@o, CodeLlama-34b scores 1.58 on pass@1, whereas CodeLlama-13b scores 2.92 on pass@1. Additionally, CodeLlama-13b-Python scores 1.03 on pass@1, while the corresponding CodeLlama-7b-Python scores 1.27 on pass@1. However, CodeLlama-7b scores 1.20 on pass@1, which is lower than the score achieved by CodeLlama-13b. The scores of CodeLlama-7b, CodeLlama-13b, CodeLlama-34b, CodeLlama-7b-Python, and CodeLlama-13b-Python on pass@1 indicate that a larger model scale does not necessarily result in the highest scores on pass@1.
|
| 153 |
+
|
| 154 |
+
# 4.3 Different-level Evaluation Results
|
| 155 |
+
|
| 156 |
+
Following the classification of OOP benchmarks in Section 3.2, we conducted evaluations for three levels of OOP benchmarks, and the results are pre
|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
Figure 4: The case comparison of generation results between Qwen-14b and WizardCoder-15b in the OOP benchmark. We see: 1) Qwen-14b can accurately generate private functions, while WizardCoder-15b cannot accurately generate private functions; 2) The results generated by Qwen-14b and WizardCoder-15b can both pass the evaluation using $\text{pass} @ k$ ; 3) The results generated by Qwen-14b can pass the evaluation using $\text{pass} @ o$ , but the results generated by WizardCoder-15b cannot pass the evaluation using $\text{pass} @ o$ .
|
| 160 |
+
|
| 161 |
+
sented in Tables 3, 4, and 5, respectively. we have drawn the following conclusions:
|
| 162 |
+
|
| 163 |
+
LLMs perform better at the simple-level OOP compared to the moderate-level and difficult-level OOP. From the simple-level OOP evaluation results in Table 3, we can see that the evaluation results using $\text{pass} @ k$ and $\text{pass} @ o$ are the same. It also indicates that LLMs can comprehend the fundamental concepts and features of OOP, e.g., class, and encapsulation methods (i.e., public function). However, in Tables 4 and 5, LLMs exhibit a weaker understanding of concepts and features related to OOP, e.g., encapsulation methods (i.e., private function), inheritance, and polymorphism, and are unable to generate corresponding code accurately. Detailed descriptions are in Appendix E.
|
| 164 |
+
|
| 165 |
+
ChatGPT has large gap in moderate-level usage using $\text{pass} @ k$ and $\text{pass} @ o$ . From the results in Table 4, We observe that with $\text{pass} @ k$ evaluation, ChatGPT scores are 51.71, 83.30, and 83.67, but with $\text{pass} @ o$ evaluation, ChatGPT only achieves scores of 2.53, 51.54, and 54.78. We analyzed the moderate-level OOP results for ChatGPT, and found that its understanding of private functions is relatively poor. When evaluated using $\text{pass} @ k$ , a total of 5551 codes can pass the test cases correctly. However, when evaluated using $\text{pass} @ o$ , only 272
|
| 166 |
+
|
| 167 |
+
codes can successfully pass the test cases. Among them, 5279 codes fail to match the pass@o criteria. Upon careful examination, we found that all these 5279 codes resulted from errors generated by private functions To further validate the authenticity of the experimental results, we randomly selected prompts corresponding to three error results. Subsequently, we input prompts of the erroneous results into the web version of ChatGPT for code generation, as illustrated in Figure 13, 14 and 15. We found that the code generated by online ChatGPT $^{10}$ is also private function error.
|
| 168 |
+
|
| 169 |
+
ChatGPT outperforms moderate-level in difficult-level evaluation results According to the evaluation results from Tables 3 and 4, we observe that the performance of ChatGPT at the difficult level is stronger than at the moderate level. At the difficult-level OOP, ChatGPT scores are 19.70, 71.83, and 73.37, whereas at the moderate-level OOP, ChatGPT scores are only 2.53, 51.54, and 54.78.
|
| 170 |
+
|
| 171 |
+
# 5 Discussion
|
| 172 |
+
|
| 173 |
+
In this section, we will explore the reasons behind the generally lower scores of LLMs in OOP, as well as the applicability of the Chain-of-Thoughts
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
Figure 5: Distribution of search results for ChatGPT and CodeLlama-34b. (In program, "class" serves as the indicator for program class names. If the program does not contain a "class", it signifies an error in the generation of class names by the LLM. Similarly, it can be deduced that "def" and "def" serve as indicators for private function names; "def" signifies a public function name; and "def init" represents the indicator for attribute variables name. Moreover, In our OOP benchmark, the LLM should ideally generate at least 86,200 "class", 36,000 "def" or "def", 86,200 "def", and 70,800 "def init".)
|
| 177 |
+
|
| 178 |
+
# (CoT) method to OOP.
|
| 179 |
+
|
| 180 |
+
Why LLMs score lower in OOP benchmarks? We use the experimental results of ChatGPT and CodeLlama-34b on pass@1 as examples for analysis. As we instruct LLMs to generate relevant class names, private function names, public function names, etc., We conducted searches using simple keywords, e.g., "class", "def ", "def ", "def __init__", and "def" on both CodeLlama-34b and ChatGPT results. A detailed description of the retrieval process is provided in Appendix F. We compiled and analyzed the distribution of retrieval "class", "def ", "def ", "def __init__", and "def", as shown in Figure 5, concluding that: 1) Weak knowledge, e.g., class, encapsulation methods, etc, of OOP in LLMs; 2) LLMs particularly lack cognition of private functions; 3) There is a certain degree of gap between CodeLlama-34b and ChatGPT. Specific example is shown in Figure 11.
|
| 181 |
+
|
| 182 |
+
The applicability of CoT in OOP. Taking CodeLlama-13b, StarCoder, and WizardCoder-15b as examples, we respectively incorporate the few-shot, zero-shot CoT, and few-shot CoT methods to validate whether CoT approaches demonstrate applicability in OOP, as shown in Table 7. We observed a significant improvement in the scores
|
| 183 |
+
|
| 184 |
+
of LLMs in OOP when using the few-shot approach, e.g., CodeLlama-13b achieved scores of 14.50, 48.13, and 49.85 using the few-shot method, representing improvements of $396.58\%$ , $294.51\%$ , and $280.24\%$ , respectively, compared to the zero-shot method. In Table 7, we also observe that CodeLlama-13b achieves scores of 1.33, 13.31, and 14.62 in zero-shot CoT, but its score at pass@1 is lower at 2.92 compared to zero-shot. Additionally, StarCoder scores 0.25, 6.58, and 7.07 in zero-shot CoT, which are lower than StarCoder scores in zero-shot at 1.26, 10.05, and 10.88, respectively. The scores of the CodeLlama-13b, StarCoder, and WizardCoder-15b models on few-shot CoT are also lower than their scores on few-shot. We analyzed the experimental results of zero-shot and zero-shot CoT and found that using the CoT method introduces an illusion to the model, preventing it from directly generating the corresponding code, as illustrated in Figure 12. Therefore, it is necessary to integrate the concepts and features of OOP to design appropriate CoT strategies in order to enhance the effectiveness of generating OOP by LLMs. Appendix G provides detailed prompts for few-shot, zero-shot CoT, and few-shot CoT.
|
| 185 |
+
|
| 186 |
+
# 6 Conclusion
|
| 187 |
+
|
| 188 |
+
In this paper, we propose the first OOP evaluation benchmark based on Python, consisting of 431 Python programs, encompassing key concepts and features of OOP, e.g., class, encapsulation methods, etc. Simultaneously, we propose the evaluation metric $\text{pass} @ o$ for the OOP benchmark. $\text{pass} @ o$ improves upon the limitations of $\text{pass} @ k$ by matching keyword points between natural language with program language. We evaluate 23 mainstream LLMs using the proposed OOP benchmark and $\text{pass} @ o$ metric. Experimental results show that the current OOP of LLMs is far from ideal, which also reveals that LLMs have room for further improvement. Furthermore, Existing LLMs have a certain gap with ChatGPT in OOP. Moreover, we also investigate that applying some of the current improvement strategies directly to the OOP benchmark does not show significant improvement. In the future, we need to further strengthen the OOP knowledge of LLMs, especially regarding private functions. At the same time, we also hope that more researchers can contribute to the advancement of research in OOP.
|
| 189 |
+
|
| 190 |
+
# Limitations
|
| 191 |
+
|
| 192 |
+
Our OOP benchmark has several limitations: (1) Our proposed OOP benchmark is based on the Python programming language and does not cover other OOP languages. (2) Given the incorporation of crucial concepts like polymorphism and inheritance in the OOP benchmark, it does not specifically address challenges associated with more intricate scenarios, e.g., multiple inheritance and overloading. (3) While OOP languages hold a significant share, non-OOP languages, e.g., C and Go languages, also play irreplaceable roles. In future work, we plan to consider expanding the OOP benchmark to cover a broader spectrum. Additionally, we encourage researchers to explore the potential of LLMs through evaluations based on the OOP benchmark.
|
| 193 |
+
|
| 194 |
+
# Ethics Statement
|
| 195 |
+
|
| 196 |
+
We take ethical considerations very seriously. This paper focuses on establishing benchmarks for OOP to analyze the performance of existing LLMs. Our research reveals that existing LLMs fall far short of ideal performance in OOP. We conducted experiments on open and publicly available LLMs and accurately and objectively report the findings and conclusions of this paper. Therefore, we believe that this study does not raise ethical concerns.
|
| 197 |
+
|
| 198 |
+
# Acknowledgements
|
| 199 |
+
|
| 200 |
+
This work is supported in part by the STI 2030—Major Projects (No. 2021ZD0201405), National Natural Science Foundation of China (Grant No. U23A20318 and 62276195), the Special Fund of Hubei Luojia Laboratory under Grant 220100014, and the CCF-Zhipu AI Large Model Fund OF 202224.
|
| 201 |
+
|
| 202 |
+
# References
|
| 203 |
+
|
| 204 |
+
Loubna Ben Allal, Raymond Li, Denis Kocetkov, Chenghao Mou, Christopher Akiki, Carlos Munoz Ferrandis, Niklas Muennighoff, Mayank Mishra, Alex Gu, Manan Dey, et al. 2023. Santacoder: don't reach for the stars! arXiv preprint.
|
| 205 |
+
Ebtesam Almazrouei, Hamza Alobeidli, Abdulaziz Alshamsi, Alessandro Cappelli, Ruxandra Cojocaru, Mérouane Debbah, Étienne Goffinet, Daniel Hesslow, Julien Launay, Quentin Malartic, Daniele Mazzotta, Badreddine Noune, Baptiste Pannier, and Guilherme Penedo. 2023. The falcon series of open language models. arXiv preprint.
|
| 206 |
+
|
| 207 |
+
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. 2021. Program synthesis with large language models. arXiv preprint.
|
| 208 |
+
Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. 2023. Qwen technical report. arXiv preprint.
|
| 209 |
+
Federico Cassano, John Gouwar, Daniel Nguyen, Sydney Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q Feldman, et al. 2023. Multi-e: a scalable and polyglot approach to benchmarking neural code generation. IEEE TSE.
|
| 210 |
+
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. 2021. Evaluating large language models trained on code. arXiv preprint.
|
| 211 |
+
Yihong Dong, Jiazheng Ding, Xue Jiang, Zhuo Li, Ge Li, and Zhi Jin. 2023. Codescore: Evaluating code generation by learning code execution. arXiv preprint.
|
| 212 |
+
Xueying Du, Mingwei Liu, Kaixin Wang, Hanlin Wang, Junwei Liu, Yixuan Chen, Jiayi Feng, Chaofeng Sha, Xin Peng, and Yiling Lou. 2023. Classeval: A manually-crafted benchmark for evaluating llms on class-level code generation. arXiv preprint arXiv:2308.01861.
|
| 213 |
+
Lingyue Fu, Huacan Chai, Shuang Luo, Kounianhua Du, Weiming Zhang, Longteng Fan, Jiayi Lei, Renting Rui, Jianghao Lin, Yuchen Fang, et al. 2023. Codeapex: A bilingual programming evaluation benchmark for large language models. arXiv preprint.
|
| 214 |
+
Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, et al. 2021. Measuring coding challenge competence with apps. arXiv preprint.
|
| 215 |
+
Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy S Liang. 2019. Spoc: Search-based pseudocode to code. In NeurIPS.
|
| 216 |
+
Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient memory management for large language model serving with pagedattention. In SOSP.
|
| 217 |
+
Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, et al. 2023. Starcoder: may the source be with you! arXiv preprint.
|
| 218 |
+
|
| 219 |
+
Yujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, Tom Eccles, James Keeling, Felix Gimeno, Agustin Dal Lago, et al. 2022. Competition-level code generation with alphabet. Science.
|
| 220 |
+
Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In ACL.
|
| 221 |
+
Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. 2023. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. arXiv preprint.
|
| 222 |
+
Qingyu Lu, Baopu Qiu, Liang Ding, Liping Xie, and Dacheng Tao. 2023. Error analysis prompting enables human-like translation evaluation in large language models: A case study on chatgpt. arXiv preprint.
|
| 223 |
+
Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xi-ubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. 2023. Wizardcoder: Empowering code large language models with evol-instruct. arXiv preprint.
|
| 224 |
+
Yasmin Moslem, Rejwanul Haque, John D. Kelleher, and Andy Way. 2023. Adaptive machine translation with large language models. In EAMT.
|
| 225 |
+
Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. 2022. Codegen: An open large language model for code with multi-turn program synthesis. arXiv preprint.
|
| 226 |
+
OpenAI. 2023. Gpt-4 technical report. arXiv preprint.
|
| 227 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022a. Training language models to follow instructions with human feedback. NeurIPS.
|
| 228 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, et al. 2022b. Training language models to follow instructions with human feedback. In NeurIPS.
|
| 229 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In ACL.
|
| 230 |
+
Keqin Peng, Liang Ding, Qihuang Zhong, Li Shen, Xuebo Liu, Min Zhang, Yuanxin Ouyang, and Dacheng Tao. 2023. Towards making the most of chatgpt for machine translation. arxiv preprint.
|
| 231 |
+
Shuo Ren, Daya Guo, Shuai Lu, Long Zhou, Shujie Liu, Duyu Tang, Neel Sundaresan, Ming Zhou, Ambrosio Blanco, and Shuai Ma. 2020. Codebleu: a method for automatic evaluation of code synthesis. arXiv preprint.
|
| 232 |
+
Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. 2023. Code llama: Open foundation models for code. arXiv preprint.
|
| 233 |
+
|
| 234 |
+
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.
|
| 235 |
+
Mark Stefik and Daniel G Bobrow. 1985. Object-oriented programming: Themes and variations. AI magazine.
|
| 236 |
+
Bjarne Stroustrup. 1988. What is object-oriented programming? IEEE software.
|
| 237 |
+
DeepSeek-AI Team. 2024. Deepseek llm: Scaling open-source language models with longtermism. arXiv preprint.
|
| 238 |
+
InternLM Team. 2023a. Internlm: A multilingual language model with progressively enhanced capabilities.
|
| 239 |
+
MosaicML NLP Team. 2023b. Introducing mpt-7b: A new standard for open-source, commercially usable llms. Accessed: 2023-05-05.
|
| 240 |
+
Gabriele Tolomei, Cesare Campagnano, Fabrizio Silvestri, and Giovanni Trappolini. 2023. Prompt-toos (p2os): Revolutionizing operating systems and human-computer interaction with integrated ai generative models. arXiv preprint.
|
| 241 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint.
|
| 242 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need.
|
| 243 |
+
Zhiruo Wang, Shuyan Zhou, Daniel Fried, and Graham Neubig. 2022. Execution-based evaluation for open-domain code generation. arXiv preprint.
|
| 244 |
+
Peter Wegner. 1990. Concepts and paradigms of object-oriented programming. ACM Sigplan Oops Messenger.
|
| 245 |
+
Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, et al. 2022. Emergent abilities of large language models. arXiv preprint.
|
| 246 |
+
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. arXiv preprint.
|
| 247 |
+
Daoguang Zan, Bei Chen, Dejian Yang, Zeqi Lin, Minsu Kim, Bei Guan, Yongji Wang, Weizhu Chen, and Jian-Guang Lou. 2022. Cert: Continual pre-training on sketches for library-oriented code generation. In IJCAI.
|
| 248 |
+
|
| 249 |
+
Qinkai Zheng, Xiao Xia, Xu Zou, Yuxiao Dong, Shan Wang, Yufei Xue, Zihan Wang, Lei Shen, Andi Wang, Yang Li, et al. 2023. Codegeex: A pre-trained model for code generation with multilingual evaluations on humaneval-x. arXiv preprint.
|
| 250 |
+
Li Zhong and Zilong Wang. 2023. Can chatgpt replace stackoverflow? a study on robustness and reliability of large language model code generation. arXiv preprint.
|
| 251 |
+
Qihuang Zhong, Liang Ding, Juhua Liu, Bo Du, and Dacheng Tao. 2023. Can chatgpt understand too? a comparative study on chatgpt and fine-tuned bert. arXiv preprint.
|
| 252 |
+
|
| 253 |
+

|
| 254 |
+
(a) HumanEval.
|
| 255 |
+
|
| 256 |
+

|
| 257 |
+
(b) MBPP.
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
(c) OOP.
|
| 261 |
+
Figure 7: Examples of different levels for object-oriented programming (OOP) tasks.
|
| 262 |
+
|
| 263 |
+
# A Pass@k calculation process
|
| 264 |
+
|
| 265 |
+
The calculation process for $\text{pass} @ k$ is:
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
p a s s @ k := \underset {P r o b l e m s} {\mathbb {E}} \left[ 1 - \frac {\binom {n - c} {k}}{\binom {n} {k}} \right] \tag {3}
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
In Eq. (3), $n$ represents the number of code generations for a given problem; $c$ represents the quantity of $n$ generated codes passing tests.
|
| 272 |
+
|
| 273 |
+

|
| 274 |
+
(a) Simple-level.
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
(b) Moderate-level.
|
| 278 |
+
|
| 279 |
+

|
| 280 |
+
(c) Difficult-level.
|
| 281 |
+
|
| 282 |
+

|
| 283 |
+
Figure 6: Differences between OOP benchmarks and HumanEval, as well as MBPP Benchmarks (... indicates that the few-shot content in MBPP is omitted). We can see that: 1) the HumanEval benchmark requires models to complete based on the context within the function; 2) the MBPP benchmark directly requires models to generate based on prompt requirements; 3) However, our proposed OOP benchmark requirements are generated based on specified prompt as well as concepts and features of OOP. Therefore, HumanEval and MBPP do not reflect the concepts and features of OOP.
|
| 284 |
+
Figure 8: Example of a prompt using the zero-shot CoT approach. (The green content indicates guiding the model to generate code step by step using the CoT approach.)
|
| 285 |
+
|
| 286 |
+
# B Limitations of HumanEval and MBPP benchmarks
|
| 287 |
+
|
| 288 |
+
Existing HumanEval (Chen et al., 2021) and MBPP (Austin et al., 2021) benchmarks primarily focus on FP to evaluate the programming capabilities of LLMs, as illustrated in Figure 6.
|
| 289 |
+
|
| 290 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Model</td><td colspan="3">1</td><td colspan="3">80</td><td colspan="3">100</td></tr><tr><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td></tr><tr><td rowspan="15">General</td><td>Falcon-7b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>1.04</td><td>1.04</td><td>-0.00</td><td>1.30</td><td>1.30</td><td>-0.00</td></tr><tr><td>Falcon-40b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>5.10</td><td>5.10</td><td>-0.00</td><td>5.68</td><td>5.68</td><td>-0.00</td></tr><tr><td>Yi-6b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>5.87</td><td>5.87</td><td>-0.00</td><td>6.76</td><td>6.76</td><td>-0.00</td></tr><tr><td>Llama2-7b</td><td>0.03</td><td>0.03</td><td>-0.00</td><td>9.56</td><td>9.56</td><td>-0.00</td><td>10.77</td><td>10.77</td><td>-0.00</td></tr><tr><td>InternLm-7b</td><td>0.09</td><td>0.09</td><td>-0.00</td><td>2.87</td><td>2.87</td><td>-0.00</td><td>3.21</td><td>3.21</td><td>-0.00</td></tr><tr><td>MPT-7b</td><td>0.13</td><td>0.13</td><td>-0.00</td><td>7.03</td><td>7.03</td><td>-0.00</td><td>8.13</td><td>8.13</td><td>-0.00</td></tr><tr><td>Llama2-13b</td><td>0.32</td><td>0.32</td><td>-0.00</td><td>12.05</td><td>12.05</td><td>-0.00</td><td>13.39</td><td>13.39</td><td>-0.00</td></tr><tr><td>DeepSeek-7b</td><td>0.72</td><td>0.72</td><td>-0.00</td><td>24.03</td><td>24.03</td><td>-0.00</td><td>26.12</td><td>26.12</td><td>-0.00</td></tr><tr><td>Qwen-7b</td><td>3.36</td><td>3.36</td><td>-0.00</td><td>30.53</td><td>30.53</td><td>-0.00</td><td>31.24</td><td>31.24</td><td>-0.00</td></tr><tr><td>Yi-34b</td><td>3.41</td><td>3.41</td><td>-0.00</td><td>26.16</td><td>26.16</td><td>-0.00</td><td>27.63</td><td>27.63</td><td>-0.00</td></tr><tr><td>Llama2-70b</td><td>3.79</td><td>3.79</td><td>-0.00</td><td>27.15</td><td>27.15</td><td>-0.00</td><td>29.52</td><td>29.52</td><td>-0.00</td></tr><tr><td>Qwen-14b</td><td>4.06</td><td>4.06</td><td>-0.00</td><td>36.89</td><td>36.89</td><td>-0.00</td><td>37.87</td><td>37.87</td><td>-0.00</td></tr><tr><td>DeepSeek-67b</td><td>10.36</td><td>10.36</td><td>-0.00</td><td>52.75</td><td>52.75</td><td>-0.00</td><td>53.48</td><td>53.48</td><td>-0.00</td></tr><tr><td>Qwen-72b</td><td>15.12</td><td>15.12</td><td>-0.00</td><td>53.88</td><td>53.88</td><td>-0.00</td><td>54.66</td><td>54.66</td><td>-0.00</td></tr><tr><td>ChatGPT</td><td>37.34</td><td>37.34</td><td>-0.00</td><td>54.21</td><td>54.21</td><td>-0.00</td><td>54.45</td><td>54.45</td><td>-0.00</td></tr><tr><td rowspan="8">Specialized</td><td>GPT_BigCode</td><td>0.34</td><td>0.34</td><td>-0.00</td><td>12.28</td><td>12.28</td><td>-0.00</td><td>13.63</td><td>13.63</td><td>-0.00</td></tr><tr><td>CodeLlama-34b</td><td>4.08</td><td>4.08</td><td>-0.00</td><td>47.36</td><td>47.36</td><td>-0.00</td><td>48.99</td><td>48.99</td><td>-0.00</td></tr><tr><td>CodeLlama-13b-Python</td><td>5.31</td><td>5.31</td><td>-0.00</td><td>44.37</td><td>44.37</td><td>-0.00</td><td>46.39</td><td>46.39</td><td>-0.00</td></tr><tr><td>CodeLlama-7b</td><td>6.38</td><td>6.38</td><td>-0.00</td><td>38.44</td><td>38.44</td><td>-0.00</td><td>40.02</td><td>40.02</td><td>-0.00</td></tr><tr><td>CodeLlama-7b-Python</td><td>6.73</td><td>6.73</td><td>-0.00</td><td>43.78</td><td>43.78</td><td>-0.00</td><td>45.43</td><td>45.43</td><td>-0.00</td></tr><tr><td>StarCoder</td><td>6.99</td><td>6.99</td><td>-0.00</td><td>39.76</td><td>39.76</td><td>-0.00</td><td>41.28</td><td>41.28</td><td>-0.00</td></tr><tr><td>CodeLlama-13b</td><td>16.21</td><td>16.21</td><td>-0.00</td><td>47.72</td><td>47.72</td><td>-0.00</td><td>48.74</td><td>48.74</td><td>-0.00</td></tr><tr><td>WizardCoder-15b</td><td>16.79</td><td>16.79</td><td>-0.00</td><td>44.56</td><td>44.56</td><td>-0.00</td><td>45.96</td><td>45.96</td><td>-0.00</td></tr></table>
|
| 291 |
+
|
| 292 |
+
Table 3: Scores of 23 large language models (LLMs) on simple-level object-oriented programming (OOP) tasks. We also reported the differences in evaluation results between $\text{pass}@k$ and $\text{pass}@\text{o}$ . (All LLMs are evaluated in zero-shot fashion. For $\text{pass}@100$ and $\text{pass}@\text{80}$ scores, we use a temperature of 0.8 and top- $p=0.95$ . For $\text{pass}@1$ scores, we use a temperature of 0.1 and top- $p=0.95$ . Red indicates the differences evaluated using the $\text{pass}@\text{o}$ and $\text{pass}@\text{k}$ metrics; Underlined indicates the maximum disparities evaluated between $\text{pass}@\text{o}$ and $\text{pass}@\text{k}$ metrics; Gray indicates models with a larger number of parameters.)
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
Figure 9: Prompt using the few-shot approach. (The green color indicates the added few-shot content.)
|
| 296 |
+
|
| 297 |
+
# C Detailed construction process of OOP.
|
| 298 |
+
|
| 299 |
+
In the process of establishing the OOP benchmark, we hired a total of nine fourth-year undergraduate computer science students. Among them, two students were involved in the data collection process, four students participated in the rewriting process, and two students contributed to the use case construction phase, as shown in Figure 3.
|
| 300 |
+
|
| 301 |
+
During the data collection process, problems or requirements described in Non-English natural language are translated using the Google API, followed by manual verification. In the use case construction phase, we begin by inputting the rewritten prompt into ChatGPT to generate the corresponding code. Subsequently, the generated code is used for input testing. Finally, the output results are saved along with the input tests to serve as test cases. However, the code generated by ChatGPT may not always be correct, requiring manual inspection and correction. During the process of building the benchmark for OOP, we spent a total of $200.
|
| 302 |
+
|
| 303 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Model</td><td colspan="3">1</td><td colspan="3">80</td><td colspan="3">100</td></tr><tr><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td></tr><tr><td rowspan="15">General</td><td>Falcon-7b</td><td>0.02</td><td>0.00</td><td>-0.02</td><td>0.22</td><td>0.00</td><td>-0.22</td><td>0.28</td><td>0.00</td><td>-0.28</td></tr><tr><td>Falcon-40b</td><td>0.02</td><td>0.00</td><td>-0.02</td><td>0.23</td><td>0.00</td><td>-0.23</td><td>0.72</td><td>0.00</td><td>-0.72</td></tr><tr><td>Llama2-7b</td><td>0.02</td><td>0.00</td><td>-0.02</td><td>5.51</td><td>0.00</td><td>-5.51</td><td>6.41</td><td>0.00</td><td>-6.41</td></tr><tr><td>InternLm-7b</td><td>0.03</td><td>0.00</td><td>-0.03</td><td>1.03</td><td>0.00</td><td>-1.03</td><td>1.26</td><td>0.00</td><td>-1.26</td></tr><tr><td>Llama2-13b</td><td>0.08</td><td>0.00</td><td>-0.08</td><td>11.78</td><td>0.00</td><td>-11.78</td><td>13.39</td><td>0.00</td><td>-13.39</td></tr><tr><td>Yi-6b</td><td>0.08</td><td>0.00</td><td>-0.08</td><td>6.23</td><td>0.36</td><td>-5.87</td><td>7.39</td><td>0.42</td><td>-6.97</td></tr><tr><td>MPT-7b</td><td>0.61</td><td>0.00</td><td>-0.61</td><td>8.16</td><td>0.00</td><td>-8.16</td><td>9.38</td><td>0.00</td><td>-9.38</td></tr><tr><td>Qwen-7b</td><td>0.80</td><td>0.00</td><td>-0.80</td><td>20.79</td><td>0.00</td><td>-20.79</td><td>23.27</td><td>0.00</td><td>-23.27</td></tr><tr><td>DeepSeek-7b</td><td>1.51</td><td>0.00</td><td>-1.51</td><td>15.47</td><td>0.45</td><td>-15.02</td><td>17.14</td><td>0.56</td><td>-16.58</td></tr><tr><td>Qwen-14b</td><td>1.82</td><td>0.00</td><td>-1.82</td><td>37.58</td><td>5.12</td><td>-32.46</td><td>40.10</td><td>6.12</td><td>-33.98</td></tr><tr><td>Yi-34b</td><td>2.10</td><td>0.00</td><td>-2.10</td><td>25.61</td><td>0.58</td><td>-25.03</td><td>27.79</td><td>0.70</td><td>-27.09</td></tr><tr><td>Llama2-70b</td><td>5.01</td><td>0.00</td><td>-5.01</td><td>21.94</td><td>1.34</td><td>-20.60</td><td>24.27</td><td>1.68</td><td>-22.59</td></tr><tr><td>DeepSeek-67b</td><td>7.89</td><td>0.00</td><td>-7.89</td><td>49.79</td><td>13.03</td><td>-36.76</td><td>52.43</td><td>15.30</td><td>-37.13</td></tr><tr><td>Qwen-72b</td><td>13.02</td><td>0.28</td><td>-12.74</td><td>63.41</td><td>26.97</td><td>-36.44</td><td>65.21</td><td>29.71</td><td>-35.50</td></tr><tr><td>ChatGPT</td><td>51.71</td><td>2.53</td><td>-49.18</td><td>83.30</td><td>51.54</td><td>-31.76</td><td>83.67</td><td>54.78</td><td>-28.89</td></tr><tr><td rowspan="8">Specialized</td><td>GPT_BigCode</td><td>0.08</td><td>0.00</td><td>-0.08</td><td>9.22</td><td>0.67</td><td>-8.55</td><td>10.55</td><td>0.84</td><td>-9.71</td></tr><tr><td>CodeLlama-7b</td><td>3.46</td><td>0.00</td><td>-3.46</td><td>36.85</td><td>3.66</td><td>-33.19</td><td>39.15</td><td>4.40</td><td>-34.75</td></tr><tr><td>CodeLlama-13b-Python</td><td>4.31</td><td>0.01</td><td>-4.30</td><td>42.12</td><td>10.06</td><td>-32.06</td><td>45.07</td><td>11.84</td><td>-33.23</td></tr><tr><td>StarCoder</td><td>8.01</td><td>0.01</td><td>-8.00</td><td>44.40</td><td>4.28</td><td>-40.12</td><td>46.70</td><td>5.07</td><td>-41.63</td></tr><tr><td>CodeLlama-7b-Python</td><td>8.13</td><td>0.01</td><td>-8.12</td><td>43.96</td><td>9.28</td><td>-34.68</td><td>46.17</td><td>10.76</td><td>-35.41</td></tr><tr><td>WizardCoder-15b</td><td>9.10</td><td>0.00</td><td>-9.10</td><td>45.25</td><td>1.29</td><td>-43.96</td><td>47.41</td><td>1.50</td><td>-45.91</td></tr><tr><td>CodeLlama-13b</td><td>9.46</td><td>0.00</td><td>-9.46</td><td>51.73</td><td>7.62</td><td>-44.11</td><td>54.55</td><td>9.12</td><td>-45.43</td></tr><tr><td>CodeLlama-34b</td><td>10.23</td><td>0.00</td><td>-10.23</td><td>51.68</td><td>11.41</td><td>-40.27</td><td>54.22</td><td>13.48</td><td>-40.74</td></tr></table>
|
| 304 |
+
|
| 305 |
+
Table 4: Scores of 23 large language models (LLMs) on moderate-level object-oriented programming (OOP) tasks. We also reported the differences in evaluation results between $\text{pass}@k$ and $\text{pass}@\text{o}$ . (All LLMs are evaluated in zero-shot fashion. For $\text{pass}@100$ and $\text{pass}@\text{80}$ scores, we use a temperature of 0.8 and top- $p=0.95$ . For $\text{pass}@\text{1}$ scores, we use a temperature of 0.1 and top- $p=0.95$ . Red indicates the differences evaluated using the $\text{pass}@\text{o}$ and $\text{pass}@\text{k}$ metrics; Underlined indicates the maximum disparities evaluated between $\text{pass}@\text{o}$ and $\text{pass}@\text{k}$ metrics; Gray indicates models with a larger number of parameters.)
|
| 306 |
+
|
| 307 |
+
# D The details of 23 LLMs
|
| 308 |
+
|
| 309 |
+
We have selected a total of 23 mainstream LLMs, including both code-specialized models and general models, e.g.,
|
| 310 |
+
|
| 311 |
+
ChatGPT (Ouyang et al., 2022b; OpenAI, 2023): ChatGPT was released by OpenAI in November 2022 and has been widely recognized for its astonishing conversational generation capabilities. In March 2023, OpenAI released ChatGPT 4.0. In our experiments, we chose to use ChatGPT 3.5 (gpt-3.5-turb) to explore its OOP.
|
| 312 |
+
|
| 313 |
+
GPT_BigCode (Allal et al., 2023): GPT_BigCode, derived from the BigCode project, is a 1.12 billion parameter model trained on subsets of Java, JavaScript, and Python from The Stack.
|
| 314 |
+
|
| 315 |
+
CodeLlama (Roziere et al., 2023): CodeLlama is a series of large-scale code language models based on Llama2 that offers state-of-the-art performance in open modeling, function completion, support for large input contexts, and zero-shot instruction following capabilities for programming tasks. CodeLlama includes the base model (CodeLlama),
|
| 316 |
+
|
| 317 |
+
the Python specialized model (CodeLlama-Python), and the instruction-following model (CodeLlama-Instruct), each available with 7b, 13b, and 34b parameters. In our experiments, we selected the base models with 7b, 13b, and 34b parameters, as well as the Python-specialized models with 7b and 13b parameters.
|
| 318 |
+
|
| 319 |
+
WizardCoder (Luo et al., 2023): WizardCoder is a model fine-tuned using the Evol-Instruct (Xu et al., 2023) method based on CodeLlama. WizardCoder includes the base model and the Python specialized model (WizardCoder-Python). The base model comes in 1b, 3b, and 15b variants, while the Python specialized model is available in 7b, 13b, and 34b. In our experiments, we selected the 15b version of the base model.
|
| 320 |
+
|
| 321 |
+
StarCoder (Li et al., 2023): StarCoderBase is trained on The Stack (v1.2) $^{11}$ data in the GitHub repository. The StarCoder model is fine-tuned based on the StarCoderBase model.
|
| 322 |
+
|
| 323 |
+
Llama2 (Touvron et al., 2023): The Llama2 model was released by the Meta team in July 2023.
|
| 324 |
+
|
| 325 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Model</td><td colspan="3">1</td><td colspan="3">80</td><td colspan="3">100</td></tr><tr><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td><td>pass@k</td><td>pass@o</td><td>Δ(↓)</td></tr><tr><td rowspan="15">General</td><td>Llama2-7b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>0.00</td><td>0.00</td><td>-0.00</td></tr><tr><td>Falcon-7b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>0.22</td><td>0.00</td><td>-0.22</td><td>0.28</td><td>0.00</td><td>-0.28</td></tr><tr><td>MPT-7b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>0.23</td><td>0.00</td><td>-0.23</td><td>0.29</td><td>0.00</td><td>-0.29</td></tr><tr><td>Llama2-13b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>0.47</td><td>0.00</td><td>-0.47</td><td>0.58</td><td>0.00</td><td>-0.58</td></tr><tr><td>Qwen-7b</td><td>0.01</td><td>0.01</td><td>-0.00</td><td>2.08</td><td>0.46</td><td>-1.62</td><td>2.47</td><td>0.51</td><td>-1.96</td></tr><tr><td>InternLm-7b</td><td>0.01</td><td>0.00</td><td>-0.01</td><td>0.23</td><td>0.00</td><td>-0.23</td><td>0.29</td><td>0.00</td><td>-0.29</td></tr><tr><td>Falcon-40b</td><td>0.02</td><td>0.00</td><td>-0.01</td><td>0.23</td><td>0.00</td><td>-0.23</td><td>0.72</td><td>0.00</td><td>-0.72</td></tr><tr><td>Qwen-14b</td><td>0.07</td><td>0.06</td><td>-0.01</td><td>9.77</td><td>4.70</td><td>-5.07</td><td>11.24</td><td>5.53</td><td>-5.73</td></tr><tr><td>Yi-6b</td><td>0.09</td><td>0.03</td><td>-0.06</td><td>3.52</td><td>1.16</td><td>-2.36</td><td>4.20</td><td>1.45</td><td>-2.75</td></tr><tr><td>DeepSeek-7b</td><td>1.51</td><td>0.00</td><td>-1.51</td><td>15.47</td><td>0.45</td><td>-15.02</td><td>17.14</td><td>0.56</td><td>-16.58</td></tr><tr><td>Yi-34b</td><td>1.77</td><td>1.20</td><td>-0.57</td><td>16.27</td><td>8.66</td><td>-7.61</td><td>17.62</td><td>9.83</td><td>-7.79</td></tr><tr><td>Llama2-70b</td><td>1.94</td><td>1.42</td><td>-0.52</td><td>17.21</td><td>11.26</td><td>-5.95</td><td>19.05</td><td>12.81</td><td>-6.24</td></tr><tr><td>Qwen-72b</td><td>7.54</td><td>4.43</td><td>-3.11</td><td>53.28</td><td>36.56</td><td>-16.72</td><td>56.11</td><td>38.67</td><td>-17.44</td></tr><tr><td>DeepSeek-67b</td><td>7.89</td><td>0.00</td><td>-7.89</td><td>49.79</td><td>13.03</td><td>-36.76</td><td>52.43</td><td>15.30</td><td>-37.13</td></tr><tr><td>ChatGPT</td><td>36.52</td><td>19.70</td><td>-16.82</td><td>78.94</td><td>71.83</td><td>-7.11</td><td>79.95</td><td>73.37</td><td>-6.58</td></tr><tr><td rowspan="8">Specialized</td><td>WizardCoder-15b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>3.05</td><td>2.35</td><td>-0.70</td><td>3.48</td><td>2.76</td><td>-0.72</td></tr><tr><td>CodeLlama-13b</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>5.69</td><td>1.07</td><td>-4.62</td><td>6.75</td><td>1.31</td><td>-5.44</td></tr><tr><td>StarCoder</td><td>0.00</td><td>0.00</td><td>-0.00</td><td>7.34</td><td>2.74</td><td>-4.60</td><td>8.65</td><td>3.31</td><td>-5.34</td></tr><tr><td>GPT_BigCode</td><td>0.01</td><td>0.00</td><td>-0.01</td><td>2.08</td><td>0.23</td><td>-1.85</td><td>2.54</td><td>0.29</td><td>-2.25</td></tr><tr><td>CodeLlama-7b-Python</td><td>0.17</td><td>0.15</td><td>-0.02</td><td>5.93</td><td>2.84</td><td>-3.09</td><td>7.02</td><td>3.49</td><td>-3.53</td></tr><tr><td>CodeLlama-13b-Python</td><td>0.17</td><td>0.17</td><td>-0.00</td><td>26.74</td><td>16.61</td><td>-10.13</td><td>25.75</td><td>18.64</td><td>-7.11</td></tr><tr><td>CodeLlama-7b</td><td>0.18</td><td>0.13</td><td>-0.05</td><td>4.65</td><td>1.77</td><td>-2.88</td><td>5.64</td><td>2.18</td><td>-3.46</td></tr><tr><td>CodeLlama-34b</td><td>3.08</td><td>2.13</td><td>-0.95</td><td>40.26</td><td>27.83</td><td>-12.43</td><td>43.59</td><td>30.51</td><td>-13.08</td></tr></table>
|
| 326 |
+
|
| 327 |
+
Table 5: Scores of 23 large language models (LLMs) on difficult-level object-oriented programming (OOP) tasks. We also reported the differences in evaluation results between $\text{pass}@k$ and $\text{pass}@\text{o}$ . (All LLMs are evaluated in zero-shot fashion. For $\text{pass}@100$ and $\text{pass}@\text{80}$ scores, we use a temperature of 0.8 and top- $p=0.95$ . For $\text{pass}@1$ scores, we use a temperature of 0.1 and top- $p=0.95$ . Red indicates the differences evaluated using the $\text{pass}@\text{o}$ and $\text{pass}@\text{k}$ metrics; Underlined indicates the maximum disparities evaluated between $\text{pass}@\text{o}$ and $\text{pass}@\text{k}$ metrics; Gray indicates models with a larger number of parameters.)
|
| 328 |
+
|
| 329 |
+
<table><tr><td>Model name</td><td>Size</td><td>Years</td><td>Open-source</td><td>Task type</td></tr><tr><td>Falcon</td><td>7b, 40b</td><td>2023</td><td>✓</td><td>General</td></tr><tr><td>DeepSeek</td><td>7b, 67b</td><td>2023</td><td>✓</td><td>General</td></tr><tr><td>Llama2</td><td>7b, 13b, 70b</td><td>2023</td><td>✓</td><td>General</td></tr><tr><td>Yi</td><td>6b, 34b</td><td>2023</td><td>✓</td><td>General</td></tr><tr><td>InternLm</td><td>7b</td><td>2023</td><td>✓</td><td>General</td></tr><tr><td>MPT</td><td>7b</td><td>2023</td><td>✓</td><td>General</td></tr><tr><td>Qwen</td><td>7b, 14b, 72b</td><td>2023</td><td>✓</td><td>General</td></tr><tr><td>ChatGPT</td><td>N/A</td><td>2023</td><td>✗</td><td>General</td></tr><tr><td>GPT_Code</td><td>1.12b</td><td>2023</td><td>✓</td><td>Code-specialized</td></tr><tr><td>CodeLlama</td><td>7b, 13b, 34b</td><td>2023</td><td>✓</td><td>Code-specialized</td></tr><tr><td>CodeLlama-Python</td><td>7b, 13b</td><td>2023</td><td>✓</td><td>Code-specialized</td></tr><tr><td>StarCoder</td><td>15b</td><td>2023</td><td>✓</td><td>Code-specialized</td></tr><tr><td>WizardCoder</td><td>15b</td><td>2023</td><td>✓</td><td>Code-specialized</td></tr></table>
|
| 330 |
+
|
| 331 |
+
Table 6: Overview of the Evaluated Models.
|
| 332 |
+
|
| 333 |
+
Llama2 is a large language model (LLM) that has undergone pre-training and fine-tuning, with a range of parameters from 7 billion to 70 billion. In our experiments, we selected models with 7b, 13b, and 70b parameters.
|
| 334 |
+
|
| 335 |
+
InternLm (Team, 2023a): InternLM encompasses models designed for practical scenarios. The InternLM model includes both a base model and a chat model with 7b and 20b parameters. In our experiments, we selected the base model with 7b parameters.
|
| 336 |
+
|
| 337 |
+
MPT (Team, 2023b): The MPT model is a decoder-style transformer trained by MosaicML. In our experiments, we selected the base model with 7b parameters.
|
| 338 |
+
|
| 339 |
+
DeepSeek (Team, 2024): DeepSeek is an LLM based on the power-law scaling, encompassing models with 7b and 67b parameters. In our experiments, we opted to utilize the foundational models with 7b and 67b parameters.
|
| 340 |
+
|
| 341 |
+
Falcon (Almazrouei et al., 2023): The Falcon series models are primarily trained on diverse and high-quality corpora assembled from web data, including the 7b, 40b, and 180b parameter models. In our experiments, we opted to use models with 7b and 40b parameters.
|
| 342 |
+
|
| 343 |
+
Qwen (Bai et al., 2023): The Qwen model is a large language model based on the Transformer architecture, trained on a vast and diverse dataset for pre-training. The dataset encompasses a wide range of types, including extensive web text, professional books, code, and more. During our experiments, we selected the base models with 7b, 14b, and 72b parameters.
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
Figure 10: Prompt of using the few-shot CoT approach. (The green color indicates the added few-shot content; The blue color indicates guiding the model to generate code step by step using the CoT approach.)
|
| 347 |
+
|
| 348 |
+
Yi $^{12}$ : The Yi series models are developed as bilingual language models with a focus on Chinese and English. Yi models are trained on a 3T multilingual corpus and demonstrate promising prospects in language understanding, common sense reasoning, and reading comprehension. In our experiments, we selected models with 6 billion and 34 billion parameters.
|
| 349 |
+
|
| 350 |
+
We use 23 mainstream code-specialized and general models with the aim of better illustrating
|
| 351 |
+
|
| 352 |
+
the performance of existing LLMs in OOP. The overview of the evaluated models is presented in Table 6.
|
| 353 |
+
|
| 354 |
+
# E Analysis of results
|
| 355 |
+
|
| 356 |
+
In simple-level OOP of Table 3, ChatGPT scored 37.34 at pass@1. However, in the difficult-level and Moderate-level OOP, ChatGPT scored only 19.70 and 2.53 at pass@1, respectively. CodeLlama-13b scored 16.21 at pass@1 in the simple-level OOP. In the difficult-level and
|
| 357 |
+
|
| 358 |
+

|
| 359 |
+
Figure 11: An example of Code generated by CodeLlama-34b and ChatGPT. We can see that CodeLlama-34b did not generate the corresponding class and public function.
|
| 360 |
+
|
| 361 |
+
Moderate-level OOP, CodeLlama-13b scored only 0.00 and 0.00 at $pass@1$ , respectively. Additionally, WizardCoder-15b scored 16.79 at $pass@1$ in the simple-level OOP., while in the difficult-level and Moderate-level OOP, it scored only 0.00 and 0.00 at $pass@1$ , respectively. It indicates that LLMs can comprehend and execute simple class, and public functions. However, their understanding of private functions, inheritance, and polymorphism is relatively weak. It also provides us with room for improvement.
|
| 362 |
+
|
| 363 |
+
# F Detailed description of the retrieval process
|
| 364 |
+
|
| 365 |
+
During the retrieval process, we first search for the class class and attribute variables def init. Subsequently, we replace def init in the generated code snippets with <endoftext>, and finally, we search for private functions def and def Using this approach helps prevent the inadvertent retrieval of attribute variables as private functions
|
| 366 |
+
|
| 367 |
+
during the search for private functions. The process of searching for public functions def follows a similar method.
|
| 368 |
+
|
| 369 |
+
# G Details of using the CoT strategy.
|
| 370 |
+
|
| 371 |
+
zero-shot CoT. We incorporate "Let's think step by step" on top of the zero-shot, enabling LLMs to stepwise infer and thus complete the entire code generation process, as shown in Figure 8.
|
| 372 |
+
|
| 373 |
+
few-shot. We randomly selected three samples from MBPP (Austin et al., 2021), but these three samples are limited to functions and do not involve relevant concepts and features of OOP. Subsequently, we manually re-write the selected three samples into examples of OOP based on the five major principles. Finally, the constructed samples were integrated into zero-shot to form a few-shot, as shown in Figure 9.
|
| 374 |
+
|
| 375 |
+
few-shot CoT. On the foundation of a few-shot, we first instruct the LLMs to generate corresponding steps based on the question and then proceed
|
| 376 |
+
|
| 377 |
+
# Prompt:
|
| 378 |
+
|
| 379 |
+
First, write a NNTI class using the Python language, then write a public non_negative_integer function in the NNTI class to solve the following problem.
|
| 380 |
+
|
| 381 |
+
Problem: Given a non-empty array composed of integers representing a non-negative integer, add one to this number, and return the result with the highest digit stored at the beginning of the array.
|
| 382 |
+
|
| 383 |
+
Note: Each element in the array only stores a single digit (except for the integer 0, this integer will not start with zero).
|
| 384 |
+
|
| 385 |
+
# Zero-shot:
|
| 386 |
+
|
| 387 |
+
class NNTI:
|
| 388 |
+
|
| 389 |
+
```txt
|
| 390 |
+
def non_negative_integer(self, nums):
|
| 391 |
+
```
|
| 392 |
+
|
| 393 |
+
: type nums: List[int]
|
| 394 |
+
|
| 395 |
+
```txt
|
| 396 |
+
:rtype:List[int]
|
| 397 |
+
```
|
| 398 |
+
|
| 399 |
+
```txt
|
| 400 |
+
if $\mathrm{nums}[0] == 0$ return [1]
|
| 401 |
+
```
|
| 402 |
+
|
| 403 |
+
for i in range(len(numbers) - 1, -1, -1):
|
| 404 |
+
|
| 405 |
+
```txt
|
| 406 |
+
if $\mathrm{nums[i] == 9}$ .. $\mathrm{nums[i] = 0}$
|
| 407 |
+
```
|
| 408 |
+
|
| 409 |
+
```txt
|
| 410 |
+
else:
|
| 411 |
+
```
|
| 412 |
+
|
| 413 |
+
```txt
|
| 414 |
+
$\mathrm{nums[i] + = 1}$ break
|
| 415 |
+
```
|
| 416 |
+
|
| 417 |
+
```txt
|
| 418 |
+
if $\mathrm{nums}[0] == 0$ .. $\mathrm{nums.insert(0)}$
|
| 419 |
+
```
|
| 420 |
+
|
| 421 |
+
```txt
|
| 422 |
+
return nums
|
| 423 |
+
```
|
| 424 |
+
|
| 425 |
+
# Zero-shot-Cot:
|
| 426 |
+
|
| 427 |
+
1. First, we need to find the last digit of the number.
|
| 428 |
+
2. Then, we need to add one to the last digit.
|
| 429 |
+
3. If the last digit is 9, we need to add one to the digit before the last digit.
|
| 430 |
+
4. If the digit before the last digit is 9, we need to add one to the digit before the digit before the last digit.
|
| 431 |
+
5. If the digit before the digit before the last digit is 9, we need to add one to the digit before the digit before the digit before the last digit.
|
| 432 |
+
6. If the digit before the digit before the digit before the last digit is 9, we need to add one to the digit before the digit before the digit before the digit before the last digit.
|
| 433 |
+
7. If the digit before the digit before the digit before the digit before the last digit is 9, we need to add one to the digit before the digit before the digit before the digit before the digit before the digit before the last digit.
|
| 434 |
+
|
| 435 |
+
Figure 12: Comparison of results generated by zero-shot and zero-shot CoT. We can see that: 1) using the zero-shot CoT approach can lead the model to generate illusions, thus preventing it from generating the corresponding code. 2) using the zero-shot approach, the model is directly prompted to generate the corresponding code.
|
| 436 |
+
|
| 437 |
+
<table><tr><td>Model</td><td colspan="3">CodeLlama_13b</td><td colspan="3">WizardCoder_15b</td><td colspan="3">StarCoder</td></tr><tr><td>pass@o</td><td>1</td><td>80</td><td>100</td><td>1</td><td>80</td><td>100</td><td>1</td><td>80</td><td>100</td></tr><tr><td>zero-shot CoT</td><td>1.33(-1.59)</td><td>13.31(+1.11)</td><td>14.62(+1.51)</td><td>2.67(-0.35)</td><td>13.33(-3.89)</td><td>14.19(-4.18)</td><td>0.28(-0.98)</td><td>6.58(-3.47)</td><td>7.07(-3.81)</td></tr><tr><td>few-shot</td><td>14.50(+11.58)</td><td>48.13(+35.93)</td><td>49.85(+36.74)</td><td>17.34(+14.32)</td><td>48.25(+38.75)</td><td>49.78(+39.77)</td><td>14.47(+13.21)</td><td>46.59(+36.54)</td><td>48.19(+37.31)</td></tr><tr><td>few-shot CoT</td><td>11.06(-3.44)</td><td>42.30(-5.83)</td><td>43.79(-6.06)</td><td>2.91(-14.43)</td><td>36.40(-11.85)</td><td>38.61(-11.17)</td><td>6.51(-7.96)</td><td>39.71(-6.88)</td><td>41.76(-6.43)</td></tr></table>
|
| 438 |
+
|
| 439 |
+
Table 7: Performance of the CodeLlama_13b, StarCoder, and WizardCoder_15b models with advanced prompting strategies, i.e., few-shot, zero-shot CoT, few-shot CoT, on the OOP benchmark. Additionally, we reported the delta in results between few-shot and few-shot CoT, zero-shot and zero-shot CoT, as well as between few-shot and zero-shot prompting strategies. (Red indicates decline, while blue indicates increase.)
|
| 440 |
+
|
| 441 |
+
step by step to complete the entire code generation process, as shown in Figure 10.
|
| 442 |
+
|
| 443 |
+
# You
|
| 444 |
+
|
| 445 |
+
Firstly, design an \*\*MI\*\* class using Python language, which has an instance attribute \*\*n\*\*, a private function \*\*private_monotonic_increase\*\*, and a public function \*\*public_monotonic_increase\*\*. Then, implement the following problem in the private function \*\*private_monotonic_increase\*\*. Finally, call the private function \*\*private_monotonic_increase\*\* in the public function \*\*public_monotonic_increase\*\* to return the result. \\nProblem: An integer is said to be monotonically increasing if and only if each pair of adjacent digits \*\*x\*\* and \*\*y\*\* satisfy $x <= y$ . Given an integer \*\*n\*\*, return the largest number less than or equal to \*\*n\*\* that is monotonically increasing.
|
| 446 |
+
|
| 447 |
+

|
| 448 |
+
Figure 13: Case 1 of generating code using the web version of ChatGPT.
|
| 449 |
+
|
| 450 |
+
private_monotonic_increase
|
| 451 |
+
|
| 452 |
+

|
| 453 |
+
|
| 454 |
+
# ChatGPT
|
| 455 |
+
|
| 456 |
+
Certainly! Below is the implementation of the described class and its functions in
|
| 457 |
+
|
| 458 |
+
Python:
|
| 459 |
+
|
| 460 |
+
```python
|
| 461 |
+
class MI:
|
| 462 |
+
def __init__(self, n):
|
| 463 |
+
self.n = n
|
| 464 |
+
def private_monotonic_increase(self, num_str):
|
| 465 |
+
# Convert the integer to a list of digits
|
| 466 |
+
digits = [int-digit) for digit in str(num_str)]
|
| 467 |
+
n = lendigits)
|
| 468 |
+
# Iterate from right to left
|
| 469 |
+
for i in range(n - 1, 0, -1):
|
| 470 |
+
# If the current digit is greater than the next one, decrement
|
| 471 |
+
if digits[i - 1] > digits[i]:
|
| 472 |
+
digits[i - 1] -= 1
|
| 473 |
+
# Set all digits to 9 to the right of the current digit
|
| 474 |
+
for j in range(i, n):
|
| 475 |
+
digits[j] = 9
|
| 476 |
+
# Convert the list of digits back to an integer and return
|
| 477 |
+
return int([''.join(str, digits)))
|
| 478 |
+
def public_monotonic_increase(self):
|
| 479 |
+
# Convert the instance attribute n to a string
|
| 480 |
+
n_str = str(self.n)
|
| 481 |
+
# Call the private_monotonic_increase function and return the x
|
| 482 |
+
result = self/private_monotonic_increase(n_str)
|
| 483 |
+
return result
|
| 484 |
+
```
|
| 485 |
+
|
| 486 |
+

|
| 487 |
+
|
| 488 |
+
# You
|
| 489 |
+
|
| 490 |
+
Firstly, design an $^{**}\mathrm{MT}^{**}$ class using the Python language, which has instance attributes $^{**}$ words $^{**}$ and $^{**}$ k $^{**}$ , a private function $^{**}$ private_Most(times $^{**}$ , and a public function $^{**}$ public_Most(times $^{**}$ ). Then, in the private function $^{**}$ private_Most(times $^{**}$ , return the top $^{**}$ k $^{**}$ most frequently occurring words from a given word list $^{**}$ words $^{**}$ and an integer $^{**}$ k $^{**}$ . Finally, call the private function $^{**}$ private_Most(times $^{**}$ in the public function $^{**}$ public_Most(times $^{**}$ to return the result.
|
| 491 |
+
|
| 492 |
+

|
| 493 |
+
|
| 494 |
+
# ChatGPT
|
| 495 |
+
|
| 496 |
+
Certainly! Here's an example implementation of the `MT` class in Python with the specified requirements:
|
| 497 |
+
|
| 498 |
+

|
| 499 |
+
Figure 14: Case 2 of generating code using the web version of ChatGPT.
|
| 500 |
+
|
| 501 |
+
# You
|
| 502 |
+
|
| 503 |
+
Question: Given an integer array $^{**}$ citations**, where citations[i] represents the number of times the i-th paper of a researcher has been cited, and $^{**}$ citations** are already sorted in ascending order. Calculate and return the researcher's h-index.\nPlease design an $^{**}$ AOD class using Python language, which has an instance attribute $^{**}$ citations**, a private function $^{**}$ private_Paper_cited**, and a public function $^{**}$ public_ascending_order**. In the private function $^{**}$ private_Paper_cited**, return the researcher's h-index. Finally, in the public function $^{**}$ public_ascending_order**, call the private function $^{**}$ private_Paper_cited** and return the result.
|
| 504 |
+
|
| 505 |
+

|
| 506 |
+
Figure 15: Case 3 of generating code using the web version of ChatGPT.
|
| 507 |
+
|
| 508 |
+
private_Paper_cited
|
| 509 |
+
|
| 510 |
+

|
| 511 |
+
|
| 512 |
+
# ChatGPT
|
| 513 |
+
|
| 514 |
+
Certainly! Below is an example implementation of the described class in Python:
|
| 515 |
+
|
| 516 |
+
```python
|
| 517 |
+
class AOD: def__init__(self,citations): self.citations $=$ citations def public ascend_order(self): #Call the private function and return the result return self/private_Paper_cited() def private_Paper_cited(self): n $\equiv$ len(self.citations) h_index $= 0$ #Binary search to find the h-index left,right $= 0$ n-1 while left $\Leftarrow$ right: mid $=$ left $^+$ (right -left)//2 if self.citations[mid] $\rightharpoondown$ n-mid: h_index $\equiv$ n-mid right $=$ mid-1 else: left $=$ mid+1 return h_index #Example usage: citations $= [0,1,3,5,6]$ aod_instance $=$ AOD(citations) result $=$ aod_instance.public ascend_order() print("Researcher's h-index:",result)
|
| 518 |
+
```
|
2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1786eedd87c6f16e85d8a0792b7e393bb2ba7025f5a1324bbfd2a9b61446cfb3
|
| 3 |
+
size 1956640
|
2024/OOP_ Object-Oriented Programming Evaluation Benchmark for Large Language Models/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/61d07bb8-84ea-4e77-ab73-fd59a87c73ab_content_list.json
ADDED
|
@@ -0,0 +1,1940 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "OTTAWA: Optimal Transport Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
122,
|
| 8 |
+
79,
|
| 9 |
+
875,
|
| 10 |
+
118
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Chenyang Huang $^{1\\dagger*}$ Abbas Ghaddar $^{2*}$ Ivan Kobyzev $^{2}$ Mehdi Rezagholizadeh $^{2}$ Osmar R. Zaiane $^{1}$ Boxing Chen $^{2}$",
|
| 17 |
+
"bbox": [
|
| 18 |
+
240,
|
| 19 |
+
124,
|
| 20 |
+
752,
|
| 21 |
+
159
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "$^{1}$ Dept. of Computing Science, Alberta Machine Intelligence Institute (Amii), University of Alberta",
|
| 28 |
+
"bbox": [
|
| 29 |
+
132,
|
| 30 |
+
159,
|
| 31 |
+
863,
|
| 32 |
+
175
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "$^{2}$ Huawei Noah's Ark Lab, Montreal Research Center, Canada",
|
| 39 |
+
"bbox": [
|
| 40 |
+
248,
|
| 41 |
+
175,
|
| 42 |
+
747,
|
| 43 |
+
192
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "{chenyangh,zaiane}@ualberta.ca",
|
| 50 |
+
"bbox": [
|
| 51 |
+
344,
|
| 52 |
+
193,
|
| 53 |
+
650,
|
| 54 |
+
208
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "{abbas.ghaddar, ivan.kobyzev}@huawei.com",
|
| 61 |
+
"bbox": [
|
| 62 |
+
300,
|
| 63 |
+
210,
|
| 64 |
+
695,
|
| 65 |
+
225
|
| 66 |
+
],
|
| 67 |
+
"page_idx": 0
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "{mehdi.rezagholizadeh,boxing.chen}@huawei.com",
|
| 72 |
+
"bbox": [
|
| 73 |
+
270,
|
| 74 |
+
225,
|
| 75 |
+
727,
|
| 76 |
+
241
|
| 77 |
+
],
|
| 78 |
+
"page_idx": 0
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "Abstract",
|
| 83 |
+
"text_level": 1,
|
| 84 |
+
"bbox": [
|
| 85 |
+
260,
|
| 86 |
+
260,
|
| 87 |
+
339,
|
| 88 |
+
275
|
| 89 |
+
],
|
| 90 |
+
"page_idx": 0
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"type": "text",
|
| 94 |
+
"text": "Recently, there has been considerable attention on detecting hallucinations and omissions in Machine Translation (MT) systems. The two dominant approaches to tackle this task involve analyzing the MT system's internal states or relying on the output of external tools, such as sentence similarity or MT quality estimators. In this work, we introduce OTTAWA, a novel Optimal Transport (OT)-based word aligner specifically designed to enhance the detection of hallucinations and omissions in MT systems. Our approach explicitly models the missing alignments by introducing a \"null\" vector, for which we propose a novel one-side constrained OT setting to allow an adaptive null alignment. Our approach yields competitive results compared to state-of-the-art methods across 18 language pairs on the HalOmi benchmark. In addition, it shows promising features, such as the ability to distinguish between both error types and perform word-level detection without accessing the MT system's internal states.",
|
| 95 |
+
"bbox": [
|
| 96 |
+
141,
|
| 97 |
+
288,
|
| 98 |
+
460,
|
| 99 |
+
613
|
| 100 |
+
],
|
| 101 |
+
"page_idx": 0
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"type": "text",
|
| 105 |
+
"text": "1 Introduction",
|
| 106 |
+
"text_level": 1,
|
| 107 |
+
"bbox": [
|
| 108 |
+
114,
|
| 109 |
+
627,
|
| 110 |
+
258,
|
| 111 |
+
642
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Concerns regarding hallucination (as known as fabrication) of Machine Translation (MT) systems (Raunak et al., 2021; Müller and Sennrich, 2021; Guerreiro et al., 2023a) have led to considerable efforts towards the creation of diagnostic datasets (Zhou et al., 2021; Guerreiro et al., 2023c; Dale et al., 2023b) and developing detection methods (Guerreiro et al., 2023b; Dale et al., 2023a). In addition to hallucination errors, which occur when words in the translation are detached from the source sequence, addressing omission errors is also crucial—these are cases where words from the source sequence are absent in the translation.",
|
| 118 |
+
"bbox": [
|
| 119 |
+
112,
|
| 120 |
+
653,
|
| 121 |
+
489,
|
| 122 |
+
860
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "image",
|
| 128 |
+
"img_path": "images/0358ebd5bc3bbc6486021ebcbf9ba54dab7aa401b1c3d4fda0fd4b13a79ab146.jpg",
|
| 129 |
+
"image_caption": [
|
| 130 |
+
"Figure 1: A hallucinatory German-English translation was detected by correctly identifying the null alignments with our Optimal Transport-based method. Here, if a target word is mapping to \"NULL\", it is likely to be hallucinated, as no source word supports its translation."
|
| 131 |
+
],
|
| 132 |
+
"image_footnote": [],
|
| 133 |
+
"bbox": [
|
| 134 |
+
522,
|
| 135 |
+
259,
|
| 136 |
+
870,
|
| 137 |
+
475
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 0
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Existing methods for detecting hallucinations and omissions in MT either focus on analyzing the model's internal states (e.g. cross-attention) or rely on the output of external tools, such as cross-lingual similarity estimators (Feng et al., 2022; Heffernan et al., 2022) or MT quality estimators (Rei et al., 2020; Duquenne et al., 2023). On one hand, internal methods are limited to scenarios where white-box access to the MT system is assumed, and are further limited by dependencies on specific model architectures (e.g. attention-based). On the other hand, external methods heavily rely on scalar outputs from models optimized for related tasks, such as MT quality or sentence similarity, but not directly optimized for hallucination detection. While hallucinations and omissions constitute low-quality translations, the opposite does not always hold. Furthermore, despite their effectiveness in detecting hallucinations and omissions, existing internal and external methods cannot distinguish",
|
| 144 |
+
"bbox": [
|
| 145 |
+
507,
|
| 146 |
+
599,
|
| 147 |
+
884,
|
| 148 |
+
921
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 0
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "page_footnote",
|
| 154 |
+
"text": "*Equal contribution",
|
| 155 |
+
"bbox": [
|
| 156 |
+
134,
|
| 157 |
+
869,
|
| 158 |
+
258,
|
| 159 |
+
881
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 0
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "page_footnote",
|
| 165 |
+
"text": "$^{\\dagger}$ Work is done during an internship at Noah's Ark Lab.",
|
| 166 |
+
"bbox": [
|
| 167 |
+
136,
|
| 168 |
+
882,
|
| 169 |
+
470,
|
| 170 |
+
895
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 0
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "page_footnote",
|
| 176 |
+
"text": "<sup>1</sup>Our code is publicly available at https://github.com/chenyangh/OTTAWA",
|
| 177 |
+
"bbox": [
|
| 178 |
+
115,
|
| 179 |
+
895,
|
| 180 |
+
485,
|
| 181 |
+
920
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 0
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "page_number",
|
| 187 |
+
"text": "6322",
|
| 188 |
+
"bbox": [
|
| 189 |
+
478,
|
| 190 |
+
927,
|
| 191 |
+
519,
|
| 192 |
+
940
|
| 193 |
+
],
|
| 194 |
+
"page_idx": 0
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "footer",
|
| 198 |
+
"text": "Findings of the Association for Computational Linguistics: ACL 2024, pages 6322-6334",
|
| 199 |
+
"bbox": [
|
| 200 |
+
228,
|
| 201 |
+
945,
|
| 202 |
+
768,
|
| 203 |
+
958
|
| 204 |
+
],
|
| 205 |
+
"page_idx": 0
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "footer",
|
| 209 |
+
"text": "August 11-16, 2024 ©2024 Association for Computational Linguistics",
|
| 210 |
+
"bbox": [
|
| 211 |
+
284,
|
| 212 |
+
959,
|
| 213 |
+
712,
|
| 214 |
+
971
|
| 215 |
+
],
|
| 216 |
+
"page_idx": 0
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"type": "text",
|
| 220 |
+
"text": "between these two error types. This is because they frame the task as anomaly detection, relying on a single outlier score to detect both error types.",
|
| 221 |
+
"bbox": [
|
| 222 |
+
112,
|
| 223 |
+
84,
|
| 224 |
+
485,
|
| 225 |
+
131
|
| 226 |
+
],
|
| 227 |
+
"page_idx": 1
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"type": "text",
|
| 231 |
+
"text": "Cross-lingual word alignment (Brown et al., 1993a; Och and Ney, 2003) aligns source to target tokens in parallel sentence pairs, and it provides unique insight for translation errors like hallucination and omission. Following the definition by Guerreiro et al. (2023c), hallucinated translation happens when the generated content is largely detached from the source text; therefore, we can measure hallucination by the amount of \"misaligned\" words in the translated text. Similarly, an omission error is likely if a significant amount of source words are not found in the translation.",
|
| 232 |
+
"bbox": [
|
| 233 |
+
112,
|
| 234 |
+
133,
|
| 235 |
+
487,
|
| 236 |
+
323
|
| 237 |
+
],
|
| 238 |
+
"page_idx": 1
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"type": "text",
|
| 242 |
+
"text": "Despite the strong relevance between word alignments and translation errors, alignment tools have not yet been widely applied for hallucination and omission detection. In particular, we observe that existing alignment approaches (Sabet et al., 2020; Azadi et al., 2023; Arase et al., 2023) are often based on the assumption that the translation is correct, such that most of the source or target words can be aligned with each other. This assumption, however, does not hold for scenarios where translation errors have occurred; hence, the direct application of existing word alignment tools does not work well for detecting translation errors.",
|
| 243 |
+
"bbox": [
|
| 244 |
+
115,
|
| 245 |
+
326,
|
| 246 |
+
489,
|
| 247 |
+
533
|
| 248 |
+
],
|
| 249 |
+
"page_idx": 1
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"type": "text",
|
| 253 |
+
"text": "In this paper, we utilize Optimal Transport problem (Villani, 2009; Cuturi, 2013) and propose OT-TAWA, an Optimal Transport Adaptive Word Aligner that is specifically tailored to aligning words for the pathological cases where significant hallucination and omission errors are present. Our approach explicitly models the missing alignments by introducing a \"null\" vector. Specifically, we propose a novel one-side constrained Optimal Transport (OT) problem, which allows the null vector to be adaptively aligned to any number of words. Moreover, we set the null vector as a centric point, which is not biased during the computation of the OT problem. We show an example of our OT-based method in Figure 1.",
|
| 254 |
+
"bbox": [
|
| 255 |
+
112,
|
| 256 |
+
535,
|
| 257 |
+
489,
|
| 258 |
+
775
|
| 259 |
+
],
|
| 260 |
+
"page_idx": 1
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"type": "text",
|
| 264 |
+
"text": "We conduct extensive experiments using the newly proposed HalOmi benchmark (Dale et al., 2023b), designed for hallucination and omission detection, across a total of 18 language pairs. Results show that our word aligner-based approach, equipped with OTTAWA, performs on par with state-of-the-art internal and external detection methods (Guerreiro et al., 2023b; Dale et al., 2023a). In contrast to previous approaches, we",
|
| 265 |
+
"bbox": [
|
| 266 |
+
112,
|
| 267 |
+
777,
|
| 268 |
+
489,
|
| 269 |
+
921
|
| 270 |
+
],
|
| 271 |
+
"page_idx": 1
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"type": "text",
|
| 275 |
+
"text": "show that our method can distinguish between hallucination and omission errors, while OTTAWA being crucial for performances compared to using existing word aligners.",
|
| 276 |
+
"bbox": [
|
| 277 |
+
507,
|
| 278 |
+
84,
|
| 279 |
+
884,
|
| 280 |
+
149
|
| 281 |
+
],
|
| 282 |
+
"page_idx": 1
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"type": "text",
|
| 286 |
+
"text": "2 Related Work",
|
| 287 |
+
"text_level": 1,
|
| 288 |
+
"bbox": [
|
| 289 |
+
507,
|
| 290 |
+
162,
|
| 291 |
+
665,
|
| 292 |
+
178
|
| 293 |
+
],
|
| 294 |
+
"page_idx": 1
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"type": "text",
|
| 298 |
+
"text": "Hallucination remains a persistent concern in machine translation systems, which have recently gained increased attention in the field. Zhou et al. (2021) studied token-level hallucinations in machine translation on a Chinese-English dataset, which they constructed by randomly corrupting some tokens in the translation sentences. Guerreiro et al. (2023c) developed a dataset of 3.4k naturally occurring German-English translations, manually annotated at both the sentence and token levels for hallucinations and omissions detection. HalOmi (Dale et al., 2023b) expanded the language coverage for this task by manually annotating hundreds of translation pairs across 18 language pairs.",
|
| 299 |
+
"bbox": [
|
| 300 |
+
507,
|
| 301 |
+
190,
|
| 302 |
+
884,
|
| 303 |
+
414
|
| 304 |
+
],
|
| 305 |
+
"page_idx": 1
|
| 306 |
+
},
|
| 307 |
+
{
|
| 308 |
+
"type": "text",
|
| 309 |
+
"text": "Methods for detecting hallucinations and omissions in machine translation can be broadly categorized into two types: internal, which analyzes the translation model's own outputs and states, and external, which relies on additional tools or data outside the model itself (Dale et al., 2023a). Guerreiro et al. (2023b) developed a method that employs various optimal transport-based distances (Kantorovich, 1942; Villani, 2009) to evaluate the abnormality in a machine translation (MT) model's internal cross-attention distribution of a given translation, by making comparisons with those from a collection of high-quality translations. This method not only requires access to the internal states of the MT model but also necessitates a large collection of cross-attention maps from ground truth parallel sequences for the targeted language pair.",
|
| 310 |
+
"bbox": [
|
| 311 |
+
507,
|
| 312 |
+
416,
|
| 313 |
+
884,
|
| 314 |
+
689
|
| 315 |
+
],
|
| 316 |
+
"page_idx": 1
|
| 317 |
+
},
|
| 318 |
+
{
|
| 319 |
+
"type": "text",
|
| 320 |
+
"text": "Dale et al. (2023a) investigated the use of other internal MT model components, such as length-normalized sequence log-probability (SeqLogprob) and the token-token layer-wise interaction framework (ALTI) $^{2}$ , as alternative abnormality estimators that do not require external translation data. In addition, the authors suggested directly using scores from external MT quality estimator models, such as COMET-QE (Rei et al., 2020), or employing the cosine similarity between the source and translation as generated by cross-lingual sentence similarity models, including LASER (Heffer",
|
| 321 |
+
"bbox": [
|
| 322 |
+
507,
|
| 323 |
+
690,
|
| 324 |
+
884,
|
| 325 |
+
883
|
| 326 |
+
],
|
| 327 |
+
"page_idx": 1
|
| 328 |
+
},
|
| 329 |
+
{
|
| 330 |
+
"type": "page_footnote",
|
| 331 |
+
"text": "$^{2}$ Originally proposed by (Ferrando et al., 2022) for interpreting MT systems",
|
| 332 |
+
"bbox": [
|
| 333 |
+
507,
|
| 334 |
+
894,
|
| 335 |
+
882,
|
| 336 |
+
921
|
| 337 |
+
],
|
| 338 |
+
"page_idx": 1
|
| 339 |
+
},
|
| 340 |
+
{
|
| 341 |
+
"type": "page_number",
|
| 342 |
+
"text": "6323",
|
| 343 |
+
"bbox": [
|
| 344 |
+
480,
|
| 345 |
+
928,
|
| 346 |
+
519,
|
| 347 |
+
940
|
| 348 |
+
],
|
| 349 |
+
"page_idx": 1
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "text",
|
| 353 |
+
"text": "nan et al., 2022), LaBSE (Feng et al., 2022).",
|
| 354 |
+
"bbox": [
|
| 355 |
+
112,
|
| 356 |
+
84,
|
| 357 |
+
442,
|
| 358 |
+
99
|
| 359 |
+
],
|
| 360 |
+
"page_idx": 2
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "text",
|
| 364 |
+
"text": "Word alignment (Brown et al., 1993a,b) has been extensively studied over the years in both cross-lingual (Nagata et al., 2020; Dou and Neubig, 2021) and monolingual (Nagata et al., 2020; Lan et al., 2021) settings. The task is approached with supervised learning methods (Och and Ney, 2003; Östling and Tiedemann, 2016), which require sentence-level parallel data, as well as unsupervised methods that do not rely on such data. The latter approach involves leveraging token-token attention matrices (Ghader and Monz, 2017; Zenkel et al., 2020; Zhang and van Genabith, 2021) or pairwise similarity matrices between tokens' embedding vectors (Sabet et al., 2020; Azadi et al., 2023), both extracted from a multilingual pretrained language models (Devlin et al., 2019; Conneau et al., 2020). The application of Optimal Transport (OT, Monge, 1781; Kantorovich, 1942; Villani, 2009; Cuturi, 2013) in natural language processing tasks was mainly focused on similarity estimation between textual segments (Huang et al., 2016; Alqahtani et al., 2021; Lee et al., 2022; Mysore et al., 2022), and more recently for word alignment (Azadi et al., 2023; Arase et al., 2023).",
|
| 365 |
+
"bbox": [
|
| 366 |
+
112,
|
| 367 |
+
101,
|
| 368 |
+
489,
|
| 369 |
+
487
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 2
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "text",
|
| 375 |
+
"text": "3 Method",
|
| 376 |
+
"text_level": 1,
|
| 377 |
+
"bbox": [
|
| 378 |
+
114,
|
| 379 |
+
500,
|
| 380 |
+
218,
|
| 381 |
+
514
|
| 382 |
+
],
|
| 383 |
+
"page_idx": 2
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"type": "text",
|
| 387 |
+
"text": "We formulate the unsupervised word alignment task in § 3.1, and then provide an overview on how standard and partial optimal transport are employed to address the task in § 3.2 and § 3.3, respectively. In § 3.4, we describe our newly proposed optimal transport word aligner, OTTAWA, specifically adapted to enhance the detection of MT hallucinations and omissions.",
|
| 388 |
+
"bbox": [
|
| 389 |
+
112,
|
| 390 |
+
527,
|
| 391 |
+
489,
|
| 392 |
+
653
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 2
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "3.1 Unsupervised Word Alignment",
|
| 399 |
+
"text_level": 1,
|
| 400 |
+
"bbox": [
|
| 401 |
+
112,
|
| 402 |
+
668,
|
| 403 |
+
403,
|
| 404 |
+
684
|
| 405 |
+
],
|
| 406 |
+
"page_idx": 2
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"type": "text",
|
| 410 |
+
"text": "Given a source word sequence $s = [s_1, \\ldots, s_m]$ and a target word sequence $t = [t_1, \\ldots, t_n]$ , let $E^{(s)} = [e_1^{(s)}, \\ldots, e_m^{(s)}] \\in \\mathbb{R}^{m \\times D}$ and $E^{(t)} = [e_1^{(t)}, \\ldots, e_n^{(t)}] \\in \\mathbb{R}^{n \\times D}$ be the embedding matrices for the source and target sequences, respectively, where $D$ is the dimensionality of the embeddings. A cost matrix $C \\in \\mathbb{R}^{m \\times n}$ is defined such that $C_{i,j}$ is the cosine distance between the $i$ -th source vector and the $j$ -th target vector.",
|
| 411 |
+
"bbox": [
|
| 412 |
+
112,
|
| 413 |
+
690,
|
| 414 |
+
489,
|
| 415 |
+
839
|
| 416 |
+
],
|
| 417 |
+
"page_idx": 2
|
| 418 |
+
},
|
| 419 |
+
{
|
| 420 |
+
"type": "text",
|
| 421 |
+
"text": "The goal is to compute the alignment matrix $\\Gamma \\in \\{0,1\\}^{m\\times n}$ , where $\\Gamma_{i,j} = 1$ if the $i$ -th source word is aligned to the $j$ -th target word, such that the aligned words have the smallest distance in the cost matrix $C$ . A straightforward approach to obtain",
|
| 422 |
+
"bbox": [
|
| 423 |
+
112,
|
| 424 |
+
841,
|
| 425 |
+
487,
|
| 426 |
+
921
|
| 427 |
+
],
|
| 428 |
+
"page_idx": 2
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"type": "text",
|
| 432 |
+
"text": "$\\Gamma$ involves making greedy decisions on each word alignment in both forward (source-to-target) and reverse (target-to-source) directions. Specifically, given the cost matrix $C$ , the forward alignment $\\Gamma_{i,j}^{(F)}$ can be obtained by:",
|
| 433 |
+
"bbox": [
|
| 434 |
+
507,
|
| 435 |
+
84,
|
| 436 |
+
884,
|
| 437 |
+
170
|
| 438 |
+
],
|
| 439 |
+
"page_idx": 2
|
| 440 |
+
},
|
| 441 |
+
{
|
| 442 |
+
"type": "equation",
|
| 443 |
+
"text": "\n$$\n\\Gamma_ {i, j} ^ {(F)} = \\left\\{ \\begin{array}{l l} 1, & \\text {i f} j = \\operatorname {a r g m i n} _ {j} C _ {i, j} \\\\ 0, & \\text {o t h e r w i s e} \\end{array} \\right. \\tag {1}\n$$\n",
|
| 444 |
+
"text_format": "latex",
|
| 445 |
+
"bbox": [
|
| 446 |
+
564,
|
| 447 |
+
178,
|
| 448 |
+
882,
|
| 449 |
+
221
|
| 450 |
+
],
|
| 451 |
+
"page_idx": 2
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"type": "text",
|
| 455 |
+
"text": "and similarly, the reverse alignment $\\Gamma_{i,j}^{(R)}$ is computed by:",
|
| 456 |
+
"bbox": [
|
| 457 |
+
507,
|
| 458 |
+
231,
|
| 459 |
+
882,
|
| 460 |
+
266
|
| 461 |
+
],
|
| 462 |
+
"page_idx": 2
|
| 463 |
+
},
|
| 464 |
+
{
|
| 465 |
+
"type": "equation",
|
| 466 |
+
"text": "\n$$\n\\Gamma_ {i, j} ^ {(R)} = \\left\\{ \\begin{array}{l l} 1, & \\text {i f} i = \\operatorname {a r g m i n} _ {i} C _ {i, j} \\\\ 0, & \\text {o t h e r w i s e} \\end{array} \\right. \\tag {2}\n$$\n",
|
| 467 |
+
"text_format": "latex",
|
| 468 |
+
"bbox": [
|
| 469 |
+
566,
|
| 470 |
+
275,
|
| 471 |
+
882,
|
| 472 |
+
317
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 2
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "The final alignment matrix $\\Gamma$ is obtained by taking the element-wise multiplication of $\\Gamma^{(F)}$ and $\\Gamma^{(R)}$ . However, Sabet et al. (2020) found that greedy decisions tend to ignore the word pairs of relatively lower similarity. Therefore, the authors propose to formulate the word alignment as an assignment problem (Kuhn, 1955), which consequently involves solving the following optimization problem:",
|
| 479 |
+
"bbox": [
|
| 480 |
+
507,
|
| 481 |
+
326,
|
| 482 |
+
882,
|
| 483 |
+
470
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 2
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "equation",
|
| 489 |
+
"text": "\n$$\n\\Gamma^ {*} = \\underset {\\Gamma \\in U ^ {(A)}} {\\arg \\min } \\sum_ {i, j} C _ {i, j} \\Gamma_ {i, j} \\tag {3}\n$$\n",
|
| 490 |
+
"text_format": "latex",
|
| 491 |
+
"bbox": [
|
| 492 |
+
594,
|
| 493 |
+
480,
|
| 494 |
+
882,
|
| 495 |
+
514
|
| 496 |
+
],
|
| 497 |
+
"page_idx": 2
|
| 498 |
+
},
|
| 499 |
+
{
|
| 500 |
+
"type": "text",
|
| 501 |
+
"text": "where $U^{(A)} = \\{\\Gamma \\in \\{0,1\\}^{m\\times n}:\\Gamma \\mathbf{1}_n\\leq$ $\\mathbf{1}_n,\\Gamma^\\top \\mathbf{1}_m\\leq \\mathbf{1}_m,\\sum_{i,j}\\Gamma_{i,j} = \\min (m,n)\\}$ is the set of all binary matrices with the sum of row and column equal to 1. The optimization in Eq. 3 can be solved by linear programming (Bourgeois and Lassalle, 1971).",
|
| 502 |
+
"bbox": [
|
| 503 |
+
507,
|
| 504 |
+
525,
|
| 505 |
+
882,
|
| 506 |
+
623
|
| 507 |
+
],
|
| 508 |
+
"page_idx": 2
|
| 509 |
+
},
|
| 510 |
+
{
|
| 511 |
+
"type": "text",
|
| 512 |
+
"text": "3.2 Standard Optimal Transport",
|
| 513 |
+
"text_level": 1,
|
| 514 |
+
"bbox": [
|
| 515 |
+
507,
|
| 516 |
+
633,
|
| 517 |
+
784,
|
| 518 |
+
649
|
| 519 |
+
],
|
| 520 |
+
"page_idx": 2
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "Chi et al. (2021) have noticed that binary assignments obtained by Eq. 3 pose challenges when aligning source and target texts of markedly different lengths. This is because the binary assignment assumes that each word in the shorter text corresponds to a word in the longer text, while the additional words in the longer text remain unaligned. To address this issue, Chi et al. (2021); Dou and Neubig (2021) leverage standard optimal transport as an alternative solution for word alignment. The goal is to compute a matrix $P^{*} \\in \\mathbb{R}_{+}^{m \\times n}$ as follows:",
|
| 525 |
+
"bbox": [
|
| 526 |
+
507,
|
| 527 |
+
653,
|
| 528 |
+
884,
|
| 529 |
+
832
|
| 530 |
+
],
|
| 531 |
+
"page_idx": 2
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"type": "equation",
|
| 535 |
+
"text": "\n$$\nP ^ {*} = \\underset {P \\in U ^ {(O)}} {\\arg \\min } \\sum_ {i, j} C _ {i, j} P _ {i, j} \\tag {4}\n$$\n",
|
| 536 |
+
"text_format": "latex",
|
| 537 |
+
"bbox": [
|
| 538 |
+
594,
|
| 539 |
+
843,
|
| 540 |
+
882,
|
| 541 |
+
876
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 2
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "where $U^{(O)} = \\{P\\in \\mathbb{R}_+^{m\\times n}:P\\mathbf{1}_n = \\pmb {\\mu},P^\\top \\mathbf{1}_m = \\pmb {\\nu}\\}$ $\\pmb {\\mu} = (1 / m,\\dots ,1 / m)$ and",
|
| 548 |
+
"bbox": [
|
| 549 |
+
507,
|
| 550 |
+
887,
|
| 551 |
+
882,
|
| 552 |
+
922
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 2
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "page_number",
|
| 558 |
+
"text": "6324",
|
| 559 |
+
"bbox": [
|
| 560 |
+
480,
|
| 561 |
+
927,
|
| 562 |
+
519,
|
| 563 |
+
940
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 2
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "text",
|
| 569 |
+
"text": "$\\pmb{\\nu} = (1/n, \\dots, 1/n)$ . The binary matrix $\\Gamma$ can be obtained by replacing the cost matrix $C$ with the matrix $P^*$ in Eq. 1 and Eq. 2, followed by performing element-wise multiplication on the resultant matrices. It is important to note that standard OT strictly requires the use of marginal constraints on $\\pmb{\\mu}$ and $\\pmb{\\nu}$ , which enforce the alignment of each source or target word. Therefore, computing forward and reverse alignments is crucial for performance, as these computations implicitly model null alignments. This necessity arises because standard OT-based word alignment assumes that there is a one-to-one mapping between each word in the source sequence and a corresponding word in the target sequence, and vice versa.",
|
| 570 |
+
"bbox": [
|
| 571 |
+
112,
|
| 572 |
+
84,
|
| 573 |
+
489,
|
| 574 |
+
325
|
| 575 |
+
],
|
| 576 |
+
"page_idx": 3
|
| 577 |
+
},
|
| 578 |
+
{
|
| 579 |
+
"type": "text",
|
| 580 |
+
"text": "3.3 Partial Optimal Transport",
|
| 581 |
+
"text_level": 1,
|
| 582 |
+
"bbox": [
|
| 583 |
+
112,
|
| 584 |
+
335,
|
| 585 |
+
369,
|
| 586 |
+
351
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 3
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "text",
|
| 592 |
+
"text": "The one-to-one mapping assumption of standard OT is not always applicable, particularly in tasks with unbalanced source-target word alignments, such as monolingual text summarization. In response, Arase et al. (2023) introduce partial optimal transport (Peyre et al., 2016; Chapel et al., 2020) word aligner that relaxes the one-to-one mapping assumption, explicitly allowing for source or target words to remain naturally unaligned. In their setting, the transport map $P$ can be found by solving the optimization problem as in Eq. 4 but with different constraints:",
|
| 593 |
+
"bbox": [
|
| 594 |
+
112,
|
| 595 |
+
357,
|
| 596 |
+
489,
|
| 597 |
+
548
|
| 598 |
+
],
|
| 599 |
+
"page_idx": 3
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "equation",
|
| 603 |
+
"text": "\n$$\n\\begin{array}{l} U ^ {(P)} = \\left\\{P \\in \\mathbb {R} _ {+} ^ {m \\times n}: P \\mathbf {1} _ {n} \\leq \\boldsymbol {\\mu}, \\right. \\\\ P ^ {\\top} \\mathbf {1} _ {m} \\leq \\nu , \\sum_ {i, j} P _ {i, j} = m \\} \\tag {5} \\\\ \\end{array}\n$$\n",
|
| 604 |
+
"text_format": "latex",
|
| 605 |
+
"bbox": [
|
| 606 |
+
176,
|
| 607 |
+
554,
|
| 608 |
+
485,
|
| 609 |
+
609
|
| 610 |
+
],
|
| 611 |
+
"page_idx": 3
|
| 612 |
+
},
|
| 613 |
+
{
|
| 614 |
+
"type": "text",
|
| 615 |
+
"text": "where $\\pmb{\\mu}$ and $\\pmb{\\nu}$ are uniform distributions, $m\\in (0,1)$ is a hyperparameter controlling how many source and target words are aligned. Then, a threshold $\\tau$ is used to obtain the binary alignment matrix $\\Gamma$ from the matrix $P$ . Although the partial OT-based drops the strong assumption of the standard OT, it requires extensive search over the hyperparameters $m$ and $\\tau$ to determine whether a source and target word are considered aligned or not. Furthermore, the conditions in Eq. 5 favor the alignment of closely similar words, because the marginal constraints for either side are not guaranteed. Consequently, this promotes a high recall for alignments at the expense of precision when source and target words are not highly similar.",
|
| 616 |
+
"bbox": [
|
| 617 |
+
112,
|
| 618 |
+
617,
|
| 619 |
+
489,
|
| 620 |
+
858
|
| 621 |
+
],
|
| 622 |
+
"page_idx": 3
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"type": "text",
|
| 626 |
+
"text": "3.4 OTTAWA",
|
| 627 |
+
"text_level": 1,
|
| 628 |
+
"bbox": [
|
| 629 |
+
112,
|
| 630 |
+
869,
|
| 631 |
+
240,
|
| 632 |
+
882
|
| 633 |
+
],
|
| 634 |
+
"page_idx": 3
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "text",
|
| 638 |
+
"text": "Accurately identifying unaligned words in the target text is crucial for detecting MT hallucina-",
|
| 639 |
+
"bbox": [
|
| 640 |
+
112,
|
| 641 |
+
889,
|
| 642 |
+
489,
|
| 643 |
+
921
|
| 644 |
+
],
|
| 645 |
+
"page_idx": 3
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "text",
|
| 649 |
+
"text": "tions. Similarly, identifying unaligned words in the source text enhances the detection of omissions. We propose explicitly handle null alignments as a mapping to special null words, denoted as $\\mathrm{s}_{m+1}$ and $\\mathrm{t}_{n+1}$ , which are appended to the source s and target t sequences, respectively. We denote the embeddings corresponding to $\\mathrm{s}_{m+1}$ and $\\mathrm{t}_{n+1}$ as $e_{m+1}^{(s)}$ and $e_{n+1}^{(t)}$ , respectively. Our approach addresses forward and reverse alignments separately, yet employs the same method for both. Therefore, we describe how $\\Gamma^{(R)}$ is obtained, as $\\Gamma^{(F)}$ can be derived analogously. It is important to note that in performing a reverse alignment, only $e_{m+1}^{(s)}$ is appended to $E^{(s)}$ , while $E^{(t)}$ remains unchanged, and vice versa for forward alignment.",
|
| 650 |
+
"bbox": [
|
| 651 |
+
507,
|
| 652 |
+
84,
|
| 653 |
+
884,
|
| 654 |
+
330
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 3
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "text",
|
| 660 |
+
"text": "Let $e_{m+1}^{s}$ be denoted as $e^{(\\varnothing)}$ hereafter for simplicity. So far, $e^{(\\varnothing)}$ can be any vector but to make the OT problem meaningful, we need to impose constraints on the distance between $e^{(\\varnothing)}$ and the target word vectors $E^{(t)}$ . Firstly, $e^{(\\varnothing)}$ should be equidistant to every target vector to avoid bias. In addition, these equal distances should be of the same scale as the average pair-wise distances between the source and target vectors to avoid aggressive alignment to $e^{(\\varnothing)}$ .",
|
| 661 |
+
"bbox": [
|
| 662 |
+
507,
|
| 663 |
+
331,
|
| 664 |
+
884,
|
| 665 |
+
492
|
| 666 |
+
],
|
| 667 |
+
"page_idx": 3
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"text": "To this end, we extend the cost matrix $C$ to $\\bar{C} \\in \\mathbb{R}^{(m + 1) \\times n}$ , where $\\bar{C}_{i,j} = C_{i,j}$ for $i \\in [1,m]$ and $\\bar{C}_{m + 1,j} = d$ , where $d$ is the distance between $e^{(\\varnothing)}$ and the target word representations (by our assumption, it is the same for all target words). One can define $d$ in multiple ways. For example, a natural choice is to use the mean of pair-wise distances between the source and target vectors. However, we choose to use the median over the mean to avoid the influence of the outliers. It is also based on the intuition that $e^{(\\varnothing)}$ should serve as a centric point, which is not biased during the computation of the optimal transport map.",
|
| 672 |
+
"bbox": [
|
| 673 |
+
507,
|
| 674 |
+
493,
|
| 675 |
+
882,
|
| 676 |
+
701
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 3
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "text",
|
| 682 |
+
"text": "For $e^{(\\varnothing)}$ to be realizable in the vector space $\\mathbb{R}^D$ , the equal distance $d$ has a lower bound $d_{\\mathrm{min}}$ (see Appendix A). We finally define $d = \\max(d_{\\mathrm{min}}, c)$ , where $c$ is the median of all pair-wise distances between the source and target words. We reformulate the optimization problem for the transport map in Eq. 4 by replacing the cost matrix $C$ with $\\bar{C}$ and relaxing the constraints as follows:",
|
| 683 |
+
"bbox": [
|
| 684 |
+
507,
|
| 685 |
+
702,
|
| 686 |
+
882,
|
| 687 |
+
829
|
| 688 |
+
],
|
| 689 |
+
"page_idx": 3
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"type": "equation",
|
| 693 |
+
"text": "\n$$\n\\begin{array}{l} U ^ {(\\varnothing , R)} = \\left\\{P \\in \\mathbb {R} _ {+} ^ {(m + 1) \\times n}: P \\mathbf {1} _ {n} \\leq \\boldsymbol {\\mu} ^ {\\prime}, \\right. \\tag {6} \\\\ P ^ {\\top} \\mathbf {1} _ {m + 1} = \\boldsymbol {\\nu} \\} \\\\ \\end{array}\n$$\n",
|
| 694 |
+
"text_format": "latex",
|
| 695 |
+
"bbox": [
|
| 696 |
+
534,
|
| 697 |
+
837,
|
| 698 |
+
882,
|
| 699 |
+
879
|
| 700 |
+
],
|
| 701 |
+
"page_idx": 3
|
| 702 |
+
},
|
| 703 |
+
{
|
| 704 |
+
"type": "text",
|
| 705 |
+
"text": "where $\\pmb{\\mu}^{\\prime} = (\\pmb{\\mu},1)$ allows $e^{(\\varnothing)}$ to have a maximum marginal of 1, and to be aligned with any number",
|
| 706 |
+
"bbox": [
|
| 707 |
+
507,
|
| 708 |
+
888,
|
| 709 |
+
882,
|
| 710 |
+
921
|
| 711 |
+
],
|
| 712 |
+
"page_idx": 3
|
| 713 |
+
},
|
| 714 |
+
{
|
| 715 |
+
"type": "page_number",
|
| 716 |
+
"text": "6325",
|
| 717 |
+
"bbox": [
|
| 718 |
+
480,
|
| 719 |
+
927,
|
| 720 |
+
519,
|
| 721 |
+
940
|
| 722 |
+
],
|
| 723 |
+
"page_idx": 3
|
| 724 |
+
},
|
| 725 |
+
{
|
| 726 |
+
"type": "text",
|
| 727 |
+
"text": "of target vectors. We denote the solution of this optimization problem as $P^{(\\varnothing, R)}$ . The reverse alignment matrix $\\Gamma^{(R)}$ is computed as in Eq. 2 by replacing $C$ with $P^{(\\varnothing, R)}$ . The forward alignment matrix $\\Gamma^{(F)}$ is computed analogously. The final alignment matrix $\\Gamma$ is obtained by taking the element-wise product between $\\Gamma^{(F)}$ and $\\Gamma^{(R)}$ .",
|
| 728 |
+
"bbox": [
|
| 729 |
+
112,
|
| 730 |
+
84,
|
| 731 |
+
487,
|
| 732 |
+
195
|
| 733 |
+
],
|
| 734 |
+
"page_idx": 4
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"type": "text",
|
| 738 |
+
"text": "Our optimization problem in the set of Eq. 6 is a special case of partial optimal transport, it combines the properties of Eq. 4 and Eq. 5. For example, in the computation of $\\Gamma^{(R)}$ , we relax the marginal constraint on the source side, a necessity given that the marginal for $e^{(\\varnothing)}$ can range between 0 and 1. As a result, the model has the freedom to adaptively decide whether or not to make null alignment based on our defined median distance $d$ . Conversely, the marginal constraint on the target side remains unchanged, ensuring that each target vector is compared with the centric point $e^{(\\varnothing)}$ .",
|
| 739 |
+
"bbox": [
|
| 740 |
+
112,
|
| 741 |
+
197,
|
| 742 |
+
487,
|
| 743 |
+
388
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 4
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "text",
|
| 749 |
+
"text": "To apply word alignment for hallucination and omission detections, we propose to analyze the number of non-aligned words from the final alignment matrix $\\Gamma$ . For both source and target sentences, we obtain the ratio of the misaligned words, given by:",
|
| 750 |
+
"bbox": [
|
| 751 |
+
112,
|
| 752 |
+
391,
|
| 753 |
+
487,
|
| 754 |
+
487
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 4
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "equation",
|
| 760 |
+
"text": "\n$$\nr ^ {(R)} = \\frac {1}{m} \\sum_ {i = 1} ^ {m} \\mathbb {I} \\left(\\sum_ {j = 1} ^ {n} \\Gamma_ {i, j} > 0\\right) \\tag {7}\n$$\n",
|
| 761 |
+
"text_format": "latex",
|
| 762 |
+
"bbox": [
|
| 763 |
+
174,
|
| 764 |
+
492,
|
| 765 |
+
487,
|
| 766 |
+
542
|
| 767 |
+
],
|
| 768 |
+
"page_idx": 4
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "equation",
|
| 772 |
+
"text": "\n$$\nr ^ {(F)} = \\frac {1}{n} \\sum_ {j = 1} ^ {n} \\mathbb {I} \\left(\\sum_ {i = 1} ^ {m} \\Gamma_ {i, j} > 0\\right) \\tag {8}\n$$\n",
|
| 773 |
+
"text_format": "latex",
|
| 774 |
+
"bbox": [
|
| 775 |
+
174,
|
| 776 |
+
543,
|
| 777 |
+
485,
|
| 778 |
+
586
|
| 779 |
+
],
|
| 780 |
+
"page_idx": 4
|
| 781 |
+
},
|
| 782 |
+
{
|
| 783 |
+
"type": "text",
|
| 784 |
+
"text": "where $\\mathbb{I}(\\cdot)$ is the indicator function. Further, we accumulate the transported mass to $e^{(\\varnothing)}$ as the confidence of missing alignments, given by:",
|
| 785 |
+
"bbox": [
|
| 786 |
+
112,
|
| 787 |
+
599,
|
| 788 |
+
487,
|
| 789 |
+
646
|
| 790 |
+
],
|
| 791 |
+
"page_idx": 4
|
| 792 |
+
},
|
| 793 |
+
{
|
| 794 |
+
"type": "equation",
|
| 795 |
+
"text": "\n$$\nc ^ {(R)} = \\frac {1}{n} \\sum_ {j = 1} ^ {n} P _ {m + 1, j} ^ {(\\varnothing , R)}; c ^ {(F)} = \\frac {1}{m} \\sum_ {i = 1} ^ {m} P _ {i, n + 1} ^ {(\\varnothing , F)}\n$$\n",
|
| 796 |
+
"text_format": "latex",
|
| 797 |
+
"bbox": [
|
| 798 |
+
124,
|
| 799 |
+
659,
|
| 800 |
+
472,
|
| 801 |
+
701
|
| 802 |
+
],
|
| 803 |
+
"page_idx": 4
|
| 804 |
+
},
|
| 805 |
+
{
|
| 806 |
+
"type": "text",
|
| 807 |
+
"text": "The combined score $r^{(R)} + c^{(R)}$ is used to detect hallucinations, and $r^{(F)} + c^{(F)}$ is for omissions.",
|
| 808 |
+
"bbox": [
|
| 809 |
+
112,
|
| 810 |
+
714,
|
| 811 |
+
485,
|
| 812 |
+
747
|
| 813 |
+
],
|
| 814 |
+
"page_idx": 4
|
| 815 |
+
},
|
| 816 |
+
{
|
| 817 |
+
"type": "text",
|
| 818 |
+
"text": "4 Experimental Setup",
|
| 819 |
+
"text_level": 1,
|
| 820 |
+
"bbox": [
|
| 821 |
+
112,
|
| 822 |
+
760,
|
| 823 |
+
321,
|
| 824 |
+
778
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 4
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "text",
|
| 830 |
+
"text": "4.1 Datasets and Evaluation Metrics",
|
| 831 |
+
"text_level": 1,
|
| 832 |
+
"bbox": [
|
| 833 |
+
112,
|
| 834 |
+
787,
|
| 835 |
+
415,
|
| 836 |
+
802
|
| 837 |
+
],
|
| 838 |
+
"page_idx": 4
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"type": "text",
|
| 842 |
+
"text": "We conducted experiments using the recently proposed HalOmi benchmark (Dale et al., 2023b), which contains manually annotated data for MT hallucination and omission detection across 18 language pairs. It is constructed by pairing English sentences with translations in 5 high-resource languages (ar:Arabic, ru:Russian, es:Spanish,",
|
| 843 |
+
"bbox": [
|
| 844 |
+
112,
|
| 845 |
+
808,
|
| 846 |
+
487,
|
| 847 |
+
921
|
| 848 |
+
],
|
| 849 |
+
"page_idx": 4
|
| 850 |
+
},
|
| 851 |
+
{
|
| 852 |
+
"type": "text",
|
| 853 |
+
"text": "de:German, and zh:Mandarin) and 3 lowresource languages (ks:Kashmiri, mni:Manipuri, and yo:Yoruba), and a one zero-shot SpanishYoruba pair. Each language pair includes between 145 to 197 examples, totaling 2,865 overall. Each example is annotated with 4 labels: no, small, partial, and full hallucination, with a similar scheme applied for omissions. Therefore, we utilized the multi-class ROC AUC variant, as defined in HalOmi (Dale et al., 2023b).",
|
| 854 |
+
"bbox": [
|
| 855 |
+
507,
|
| 856 |
+
84,
|
| 857 |
+
882,
|
| 858 |
+
244
|
| 859 |
+
],
|
| 860 |
+
"page_idx": 4
|
| 861 |
+
},
|
| 862 |
+
{
|
| 863 |
+
"type": "text",
|
| 864 |
+
"text": "4.2 Baselines and Models",
|
| 865 |
+
"text_level": 1,
|
| 866 |
+
"bbox": [
|
| 867 |
+
507,
|
| 868 |
+
256,
|
| 869 |
+
724,
|
| 870 |
+
269
|
| 871 |
+
],
|
| 872 |
+
"page_idx": 4
|
| 873 |
+
},
|
| 874 |
+
{
|
| 875 |
+
"type": "text",
|
| 876 |
+
"text": "We conduct experiments to compare internal and external approaches for detecting hallucinations and omissions in MT, alongside our newly proposed word aligner-based approach. More precisely, consider Seq-Logprob, ALTI, $\\mathrm{ALTI}^{\\mathrm{T}}$ , and ATT-OT (originally proposed by (Guerreiro et al., 2023b)). Similarly, for external approaches, we report results from MT quality estimators LaBSE (Feng et al., 2022) and BLASER-QE (Barrault et al., 2023), as they are the best performers in this category according to (Dale et al., 2023b). We refer the readers to (Dale et al., 2023b) for a detailed of these baselines.",
|
| 877 |
+
"bbox": [
|
| 878 |
+
507,
|
| 879 |
+
277,
|
| 880 |
+
882,
|
| 881 |
+
485
|
| 882 |
+
],
|
| 883 |
+
"page_idx": 4
|
| 884 |
+
},
|
| 885 |
+
{
|
| 886 |
+
"type": "text",
|
| 887 |
+
"text": "4.3 Implementation Details",
|
| 888 |
+
"text_level": 1,
|
| 889 |
+
"bbox": [
|
| 890 |
+
507,
|
| 891 |
+
497,
|
| 892 |
+
739,
|
| 893 |
+
512
|
| 894 |
+
],
|
| 895 |
+
"page_idx": 4
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"type": "text",
|
| 899 |
+
"text": "Our implementation is based on PyTorch (Paszke et al., 2019), and we use the POT library for all the Optimal Transport-based methods. For the entropy-regulated O (including the standard OT and partial OT), there is a regularization parameter $\\epsilon$ that controls the sparsity of the OT solution, where 0.1 is the default value. In our experiments, we set $\\epsilon$ to a low value of 0.05 to encourage the confidence of the sovler. However, we observed that the performance is not sensitive, but an overly small $\\epsilon$ may lead to numerical instability.",
|
| 900 |
+
"bbox": [
|
| 901 |
+
507,
|
| 902 |
+
519,
|
| 903 |
+
882,
|
| 904 |
+
695
|
| 905 |
+
],
|
| 906 |
+
"page_idx": 4
|
| 907 |
+
},
|
| 908 |
+
{
|
| 909 |
+
"type": "text",
|
| 910 |
+
"text": "In all experiments, we adopt a word-level representation approach which is consistent with standard practices in word alignment task (Sabet et al., 2020; Azadi et al., 2023). Specifically, we first generate token-level representations for each token in the sequence and establish a token-to-word index mapping. Then, we apply mean pooling to average the tokens representations corresponding to the same word, resulting in word-level representations. In our main experiment uses the representations of the last layer of LaBSE (Feng et al.,",
|
| 911 |
+
"bbox": [
|
| 912 |
+
507,
|
| 913 |
+
696,
|
| 914 |
+
882,
|
| 915 |
+
872
|
| 916 |
+
],
|
| 917 |
+
"page_idx": 4
|
| 918 |
+
},
|
| 919 |
+
{
|
| 920 |
+
"type": "page_footnote",
|
| 921 |
+
"text": "3The MT system utilized for generating the data was not trained on Spanish-Yoruba parallel corpora.",
|
| 922 |
+
"bbox": [
|
| 923 |
+
507,
|
| 924 |
+
881,
|
| 925 |
+
880,
|
| 926 |
+
906
|
| 927 |
+
],
|
| 928 |
+
"page_idx": 4
|
| 929 |
+
},
|
| 930 |
+
{
|
| 931 |
+
"type": "page_footnote",
|
| 932 |
+
"text": "4https://pythonot.github.io/",
|
| 933 |
+
"bbox": [
|
| 934 |
+
532,
|
| 935 |
+
906,
|
| 936 |
+
744,
|
| 937 |
+
920
|
| 938 |
+
],
|
| 939 |
+
"page_idx": 4
|
| 940 |
+
},
|
| 941 |
+
{
|
| 942 |
+
"type": "page_number",
|
| 943 |
+
"text": "6326",
|
| 944 |
+
"bbox": [
|
| 945 |
+
480,
|
| 946 |
+
927,
|
| 947 |
+
519,
|
| 948 |
+
940
|
| 949 |
+
],
|
| 950 |
+
"page_idx": 4
|
| 951 |
+
},
|
| 952 |
+
{
|
| 953 |
+
"type": "table",
|
| 954 |
+
"img_path": "images/f34e3c9790ef4ae627c229710fa05a7f6e61e7cdaf43bf49c2389387e9b63839.jpg",
|
| 955 |
+
"table_caption": [],
|
| 956 |
+
"table_footnote": [
|
| 957 |
+
"Table 1: Methods performances (ROC AUC) on hallucination and omission detection across HalOmi's high-resource, low-resource, and zero-shot sets. Bold entries describe the best results among all methods, which we categorize under 3 approaches: $\\underline{\\mathcal{I}}$ internal, $\\underline{\\mathcal{E}}$ external, and Our word alignment. $\\mathcal{I}1, \\mathcal{I}2, \\mathcal{I}3, \\mathcal{I}4$ : Seq-Logprob, ALTI, $\\mathrm{ALTI}^{\\mathrm{T}}$ , and ATT-OT. $\\mathcal{E}1, \\mathcal{E}2$ : LaBSE and BLASER-QE MT quality estimators. Our: OTTAWA using LaBSE token embeddings. All scores are scaled within the range of [0, 100] following (Dale et al., 2023b)."
|
| 958 |
+
],
|
| 959 |
+
"table_body": "<table><tr><td rowspan=\"2\" colspan=\"2\">Source Lang</td><td colspan=\"7\">Hallucination</td><td colspan=\"7\">Omission</td></tr><tr><td>I1</td><td>I2</td><td>I3</td><td>I4</td><td>E1</td><td>E2</td><td>Our</td><td>I1</td><td>I2</td><td>I3</td><td>I4</td><td>E1</td><td>E2</td><td>Our</td></tr><tr><td rowspan=\"10\">High Resource</td><td>en-ar</td><td>89</td><td>78</td><td>54</td><td>36</td><td>84</td><td>90</td><td>93</td><td>63</td><td>44</td><td>76</td><td>64</td><td>79</td><td>85</td><td>79</td></tr><tr><td>ar-en</td><td>83</td><td>75</td><td>72</td><td>51</td><td>88</td><td>94</td><td>90</td><td>56</td><td>49</td><td>82</td><td>72</td><td>83</td><td>77</td><td>70</td></tr><tr><td>en-ru</td><td>95</td><td>36</td><td>37</td><td>61</td><td>86</td><td>89</td><td>91</td><td>53</td><td>56</td><td>79</td><td>75</td><td>85</td><td>84</td><td>85</td></tr><tr><td>ru-en</td><td>86</td><td>76</td><td>56</td><td>55</td><td>83</td><td>92</td><td>99</td><td>59</td><td>52</td><td>86</td><td>76</td><td>76</td><td>80</td><td>89</td></tr><tr><td>en-es</td><td>87</td><td>85</td><td>69</td><td>59</td><td>88</td><td>85</td><td>88</td><td>39</td><td>31</td><td>89</td><td>89</td><td>86</td><td>80</td><td>87</td></tr><tr><td>es-en</td><td>92</td><td>89</td><td>67</td><td>37</td><td>94</td><td>87</td><td>87</td><td>61</td><td>50</td><td>59</td><td>66</td><td>73</td><td>71</td><td>73</td></tr><tr><td>en-de</td><td>85</td><td>97</td><td>69</td><td>55</td><td>97</td><td>87</td><td>88</td><td>50</td><td>46</td><td>77</td><td>74</td><td>66</td><td>85</td><td>81</td></tr><tr><td>de-en</td><td>90</td><td>80</td><td>59</td><td>65</td><td>95</td><td>97</td><td>96</td><td>48</td><td>38</td><td>82</td><td>83</td><td>70</td><td>70</td><td>74</td></tr><tr><td>en-zh</td><td>88</td><td>82</td><td>47</td><td>60</td><td>86</td><td>78</td><td>88</td><td>60</td><td>51</td><td>73</td><td>67</td><td>69</td><td>88</td><td>92</td></tr><tr><td>zh-en</td><td>89</td><td>88</td><td>65</td><td>46</td><td>88</td><td>87</td><td>86</td><td>73</td><td>61</td><td>77</td><td>64</td><td>75</td><td>73</td><td>77</td></tr><tr><td colspan=\"2\">Avg. High Resource</td><td>88</td><td>78</td><td>59</td><td>53</td><td>89</td><td>89</td><td>91</td><td>54</td><td>46</td><td>78</td><td>74</td><td>76</td><td>80</td><td>81</td></tr><tr><td rowspan=\"6\">Low Resource</td><td>en-ks</td><td>68</td><td>71</td><td>74</td><td>54</td><td>76</td><td>81</td><td>78</td><td>50</td><td>52</td><td>90</td><td>81</td><td>76</td><td>77</td><td>84</td></tr><tr><td>ks-en</td><td>59</td><td>67</td><td>65</td><td>65</td><td>57</td><td>73</td><td>56</td><td>36</td><td>50</td><td>64</td><td>63</td><td>59</td><td>45</td><td>70</td></tr><tr><td>en-mni</td><td>68</td><td>81</td><td>49</td><td>54</td><td>80</td><td>83</td><td>59</td><td>45</td><td>52</td><td>80</td><td>73</td><td>82</td><td>80</td><td>69</td></tr><tr><td>mni-en</td><td>70</td><td>64</td><td>49</td><td>56</td><td>56</td><td>78</td><td>64</td><td>42</td><td>33</td><td>68</td><td>63</td><td>52</td><td>74</td><td>77</td></tr><tr><td>en-yo</td><td>77</td><td>74</td><td>59</td><td>65</td><td>56</td><td>79</td><td>80</td><td>77</td><td>50</td><td>70</td><td>72</td><td>65</td><td>67</td><td>86</td></tr><tr><td>yo-en</td><td>78</td><td>72</td><td>54</td><td>43</td><td>66</td><td>80</td><td>65</td><td>68</td><td>60</td><td>65</td><td>55</td><td>66</td><td>56</td><td>68</td></tr><tr><td colspan=\"2\">Avg. Low Resource</td><td>70</td><td>71</td><td>57</td><td>56</td><td>66</td><td>79</td><td>67</td><td>53</td><td>49</td><td>73</td><td>68</td><td>67</td><td>67</td><td>76</td></tr><tr><td rowspan=\"2\">Zero-Shot</td><td>yo-es</td><td>60</td><td>65</td><td>47</td><td>44</td><td>56</td><td>57</td><td>54</td><td>62</td><td>47</td><td>85</td><td>69</td><td>62</td><td>66</td><td>76</td></tr><tr><td>es-yo</td><td>61</td><td>66</td><td>52</td><td>55</td><td>66</td><td>68</td><td>65</td><td>68</td><td>50</td><td>83</td><td>60</td><td>69</td><td>67</td><td>80</td></tr><tr><td colspan=\"2\">Avg. Zero-Shot</td><td>60</td><td>66</td><td>49</td><td>49</td><td>61</td><td>63</td><td>59</td><td>65</td><td>48</td><td>84</td><td>65</td><td>66</td><td>67</td><td>78</td></tr><tr><td colspan=\"2\">Avg. HalOmi</td><td>79</td><td>75</td><td>57</td><td>53</td><td>78</td><td>83</td><td>79</td><td>56</td><td>48</td><td>77</td><td>70</td><td>72</td><td>74</td><td>79</td></tr></table>",
|
| 960 |
+
"bbox": [
|
| 961 |
+
114,
|
| 962 |
+
80,
|
| 963 |
+
878,
|
| 964 |
+
574
|
| 965 |
+
],
|
| 966 |
+
"page_idx": 5
|
| 967 |
+
},
|
| 968 |
+
{
|
| 969 |
+
"type": "text",
|
| 970 |
+
"text": "2022). When experimenting with other models, we use the hidden representation of the 8th layer of mBERT (Devlin et al., 2019) and XLMR (Connieu et al., 2020), respectively, following (Dou and Neubig, 2021; Chi et al., 2021; Azadi et al., 2023).",
|
| 971 |
+
"bbox": [
|
| 972 |
+
112,
|
| 973 |
+
686,
|
| 974 |
+
489,
|
| 975 |
+
766
|
| 976 |
+
],
|
| 977 |
+
"page_idx": 5
|
| 978 |
+
},
|
| 979 |
+
{
|
| 980 |
+
"type": "text",
|
| 981 |
+
"text": "Our OTTAWA, PMIAign, and the standard OT do need extra hyper-parameters to determine word alignments. However, for partial OT, we set $m = 0.5$ and tested a few thresholds. Specifically, we set $\\tau$ to 0.1, 0.05, and 0.025 of the maximal value in marginal $\\mu$ and $\\nu$ , given by $\\max(1/m, 1/n)$ , and used the best threshold 0.05 to report the scores. To obtain the hallucination and omission, all baseline aligners use the reverse missing alignment ratio",
|
| 982 |
+
"bbox": [
|
| 983 |
+
112,
|
| 984 |
+
776,
|
| 985 |
+
489,
|
| 986 |
+
921
|
| 987 |
+
],
|
| 988 |
+
"page_idx": 5
|
| 989 |
+
},
|
| 990 |
+
{
|
| 991 |
+
"type": "text",
|
| 992 |
+
"text": "Eq. 7 to estimate hallucination and use Eq. 8 to obtain omission scores.",
|
| 993 |
+
"bbox": [
|
| 994 |
+
507,
|
| 995 |
+
686,
|
| 996 |
+
882,
|
| 997 |
+
717
|
| 998 |
+
],
|
| 999 |
+
"page_idx": 5
|
| 1000 |
+
},
|
| 1001 |
+
{
|
| 1002 |
+
"type": "text",
|
| 1003 |
+
"text": "5 Results",
|
| 1004 |
+
"text_level": 1,
|
| 1005 |
+
"bbox": [
|
| 1006 |
+
509,
|
| 1007 |
+
730,
|
| 1008 |
+
606,
|
| 1009 |
+
744
|
| 1010 |
+
],
|
| 1011 |
+
"page_idx": 5
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"type": "text",
|
| 1015 |
+
"text": "5.1 Sentence-Level Detection",
|
| 1016 |
+
"text_level": 1,
|
| 1017 |
+
"bbox": [
|
| 1018 |
+
507,
|
| 1019 |
+
755,
|
| 1020 |
+
752,
|
| 1021 |
+
770
|
| 1022 |
+
],
|
| 1023 |
+
"page_idx": 5
|
| 1024 |
+
},
|
| 1025 |
+
{
|
| 1026 |
+
"type": "text",
|
| 1027 |
+
"text": "Table 1 shows the performances of methods across 3 approaches for hallucination and omission detection across HalOmi's 18 language pairs: 4 methods representing the internal approach, 2 for the external approach, and 1 showcasing our newly introduced word alignment approach. The latter approach employs our OTTAWA word aligner, which leverages LaBSE to obtain token-level representations.",
|
| 1028 |
+
"bbox": [
|
| 1029 |
+
507,
|
| 1030 |
+
776,
|
| 1031 |
+
884,
|
| 1032 |
+
919
|
| 1033 |
+
],
|
| 1034 |
+
"page_idx": 5
|
| 1035 |
+
},
|
| 1036 |
+
{
|
| 1037 |
+
"type": "page_number",
|
| 1038 |
+
"text": "6327",
|
| 1039 |
+
"bbox": [
|
| 1040 |
+
480,
|
| 1041 |
+
928,
|
| 1042 |
+
519,
|
| 1043 |
+
940
|
| 1044 |
+
],
|
| 1045 |
+
"page_idx": 5
|
| 1046 |
+
},
|
| 1047 |
+
{
|
| 1048 |
+
"type": "text",
|
| 1049 |
+
"text": "Although our method performs best on only 5 out of 18 language pairs for hallucination and 7 out of 18 for omission, it outperforms other methods in terms of overall average performance. More precisely, we outperform all baselines in high-resource languages for both hallucination and omission detection. However, we underperform in low-resource languages (except for omission detection) and zero-shot language pairs. Overall, although we underperform by $4\\%$ compared to BLASER-QE $(\\mathcal{E}2)$ on average hallucination detection across the 18 language pairs, we surpass that model by $5\\%$ on omission. It is worth mentioning that BLASER-QE is a strong baseline, it is an MT quality estimator that leverages the SONAR (Duquenne et al., 2023) sentence embeddings. It was carefully tuned on 123.4k source-translation pairs, derived from outputs of 24 MT systems and covering 62 language pairs, all manually labeled by humans for MT quality estimation.",
|
| 1050 |
+
"bbox": [
|
| 1051 |
+
115,
|
| 1052 |
+
84,
|
| 1053 |
+
489,
|
| 1054 |
+
405
|
| 1055 |
+
],
|
| 1056 |
+
"page_idx": 6
|
| 1057 |
+
},
|
| 1058 |
+
{
|
| 1059 |
+
"type": "text",
|
| 1060 |
+
"text": "However, our method significantly improves upon LaBSE (E2), another MT quality estimator. While we report close tight (1% gain on HalOmi average) on hallucination, we significantly outperform it by 6% on omission. These results demonstrate that LaBSE's token-level representations contain more expressive information for detecting omissions compared to the scalar values generated for MT quality estimation.",
|
| 1061 |
+
"bbox": [
|
| 1062 |
+
115,
|
| 1063 |
+
411,
|
| 1064 |
+
487,
|
| 1065 |
+
555
|
| 1066 |
+
],
|
| 1067 |
+
"page_idx": 6
|
| 1068 |
+
},
|
| 1069 |
+
{
|
| 1070 |
+
"type": "text",
|
| 1071 |
+
"text": "Finally, we observe that our method provides consistent and balanced performance in detecting both hallucinations and omissions compared to internal methods. For instance, although Seq-Logprob (1) matches our method on hallucinations, it significantly underperforms compared to us by $23\\%$ on omissions. Similarly, $\\mathrm{ALTI}^{\\mathrm{T}}(\\mathcal{I}3)$ has the smallest gap $(2\\%)$ with our method on omission but performs poorly, achieving only $57\\%$ compared to our method's $79\\%$ , on hallucination.",
|
| 1072 |
+
"bbox": [
|
| 1073 |
+
115,
|
| 1074 |
+
560,
|
| 1075 |
+
487,
|
| 1076 |
+
719
|
| 1077 |
+
],
|
| 1078 |
+
"page_idx": 6
|
| 1079 |
+
},
|
| 1080 |
+
{
|
| 1081 |
+
"type": "text",
|
| 1082 |
+
"text": "5.2 Ablation Study",
|
| 1083 |
+
"text_level": 1,
|
| 1084 |
+
"bbox": [
|
| 1085 |
+
115,
|
| 1086 |
+
746,
|
| 1087 |
+
278,
|
| 1088 |
+
762
|
| 1089 |
+
],
|
| 1090 |
+
"page_idx": 6
|
| 1091 |
+
},
|
| 1092 |
+
{
|
| 1093 |
+
"type": "text",
|
| 1094 |
+
"text": "We conduct ablation studies on our approach, testing variants that modify its two key components: the Embedding vector representation model and the word Aligner. Table 2 presents the average scores for both HalOmi high-resource (HR) and low-resource (LR) language pair clusters, along with the overall average. The complete results across the 18 language pairs are presented in Table 5 in Appendix B.",
|
| 1095 |
+
"bbox": [
|
| 1096 |
+
115,
|
| 1097 |
+
776,
|
| 1098 |
+
487,
|
| 1099 |
+
920
|
| 1100 |
+
],
|
| 1101 |
+
"page_idx": 6
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"type": "table",
|
| 1105 |
+
"img_path": "images/a42eb0c436fe9a78b80dad533b4ee73bbdf51f21214bec1b0143a7ae085a3ddf.jpg",
|
| 1106 |
+
"table_caption": [],
|
| 1107 |
+
"table_footnote": [],
|
| 1108 |
+
"table_body": "<table><tr><td></td><td colspan=\"3\">Hallucination</td><td colspan=\"3\">Omission</td></tr><tr><td></td><td>HR</td><td>LR</td><td>Avg</td><td>HR</td><td>LR</td><td>Avg</td></tr><tr><td>Embedding</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>mBERT</td><td>87</td><td>56</td><td>73</td><td>81</td><td>69</td><td>76</td></tr><tr><td>XLMR</td><td>88</td><td>53</td><td>71</td><td>78</td><td>64</td><td>72</td></tr><tr><td>LaBSE</td><td>91</td><td>67</td><td>79</td><td>81</td><td>76</td><td>79</td></tr><tr><td>Aligner</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SimAlign</td><td>47</td><td>55</td><td>51</td><td>70</td><td>62</td><td>66</td></tr><tr><td>PMIAign</td><td>81</td><td>61</td><td>72</td><td>82</td><td>71</td><td>78</td></tr><tr><td>OT</td><td>81</td><td>60</td><td>72</td><td>82</td><td>74</td><td>79</td></tr><tr><td>POT</td><td>64</td><td>52</td><td>57</td><td>73</td><td>60</td><td>68</td></tr><tr><td>OTTAWA</td><td>91</td><td>67</td><td>79</td><td>81</td><td>76</td><td>79</td></tr></table>",
|
| 1109 |
+
"bbox": [
|
| 1110 |
+
515,
|
| 1111 |
+
82,
|
| 1112 |
+
878,
|
| 1113 |
+
259
|
| 1114 |
+
],
|
| 1115 |
+
"page_idx": 6
|
| 1116 |
+
},
|
| 1117 |
+
{
|
| 1118 |
+
"type": "text",
|
| 1119 |
+
"text": "Table 2: Hallucation and omission detection average AUC scores on HalOmi's high-resource (HR) and lowresource (LR) languages. Embeddings refer to the results obtained by testing OTTAWA with token embeddings from various models. Aligner are the results when employing different word aligners, all utilizing LaBSE embeddings.",
|
| 1120 |
+
"bbox": [
|
| 1121 |
+
510,
|
| 1122 |
+
275,
|
| 1123 |
+
882,
|
| 1124 |
+
375
|
| 1125 |
+
],
|
| 1126 |
+
"page_idx": 6
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"type": "text",
|
| 1130 |
+
"text": "Embedding We conduct experiments with OT-TAWA, utilizing embeddings derived from unsupervised pre-trained models such as mBERT (Devlin et al., 2019) and XLM-R (Conneau et al., 2020). These models are commonly used in crosslingual word alignment (Sabet et al., 2020; Azadi et al., 2023). We notice that OT-TAWA with LaBSE representations significantly outperforms the best unsupervised representation baseline (mBERT) by $6\\%$ and $3\\%$ on the overall HalOmi average score on hallucination and omission, respectively. This is expected given that LaBSE representations are more task-specific than those from unsupervised models, having been extensively fine-tuned for translation pair quality estimation using carefully curated data for low-resource languages.",
|
| 1131 |
+
"bbox": [
|
| 1132 |
+
510,
|
| 1133 |
+
404,
|
| 1134 |
+
882,
|
| 1135 |
+
661
|
| 1136 |
+
],
|
| 1137 |
+
"page_idx": 6
|
| 1138 |
+
},
|
| 1139 |
+
{
|
| 1140 |
+
"type": "text",
|
| 1141 |
+
"text": "Consequently, the performance gap between LaBSE and models such as mBERT is larger in low-resource languages (11% and %3 on omissions) compared to high-resource languages (4% and 0% on hallucinations). Overall, the results are promising, demonstrating that hallucinations and omissions can be detected even without access to the MT system or a robust MT quality estimator. This approach serves as an acceptable alternative, particularly in high-resource settings. However, its performance in low-resource languages necessitates further investigation.",
|
| 1142 |
+
"bbox": [
|
| 1143 |
+
510,
|
| 1144 |
+
664,
|
| 1145 |
+
882,
|
| 1146 |
+
856
|
| 1147 |
+
],
|
| 1148 |
+
"page_idx": 6
|
| 1149 |
+
},
|
| 1150 |
+
{
|
| 1151 |
+
"type": "text",
|
| 1152 |
+
"text": "Aligner We compared OTTAWA with state-of-the-art word aligner methods, including SimAlign (Sabet et al., 2020) (Itermax), PMI",
|
| 1153 |
+
"bbox": [
|
| 1154 |
+
512,
|
| 1155 |
+
872,
|
| 1156 |
+
882,
|
| 1157 |
+
920
|
| 1158 |
+
],
|
| 1159 |
+
"page_idx": 6
|
| 1160 |
+
},
|
| 1161 |
+
{
|
| 1162 |
+
"type": "page_number",
|
| 1163 |
+
"text": "6328",
|
| 1164 |
+
"bbox": [
|
| 1165 |
+
480,
|
| 1166 |
+
928,
|
| 1167 |
+
519,
|
| 1168 |
+
940
|
| 1169 |
+
],
|
| 1170 |
+
"page_idx": 6
|
| 1171 |
+
},
|
| 1172 |
+
{
|
| 1173 |
+
"type": "text",
|
| 1174 |
+
"text": "Align (Azadi et al., 2023), standard OT (Chi et al., 2021; Dou and Neubig, 2021), and POT (Arase et al., 2023), all utilizing LaBSE representations.",
|
| 1175 |
+
"bbox": [
|
| 1176 |
+
112,
|
| 1177 |
+
84,
|
| 1178 |
+
487,
|
| 1179 |
+
131
|
| 1180 |
+
],
|
| 1181 |
+
"page_idx": 7
|
| 1182 |
+
},
|
| 1183 |
+
{
|
| 1184 |
+
"type": "text",
|
| 1185 |
+
"text": "We first observe that the standard alignment methods work reasonably well on detecting omissions but not hallucinations. This is an understandable outcome, which can be explained as follows: 1) the hallucinated translations often contain a significant amount of \"detached\" words. For example, the word \"cat\" may be translated to \"dog\". This is particularly problematic for standard alignment methods as they assume the word \"cat\" should have a corresponding word in the translation, resulting in aligning \"cat\" to \"dog\" nevertheless. 2) the omission errors in the HalOmi dataset are often early terminated translations. In this case, the translated words are still mapped to the source words, and the standard methods are still able to align the existing words and detect the omission errors.",
|
| 1186 |
+
"bbox": [
|
| 1187 |
+
115,
|
| 1188 |
+
133,
|
| 1189 |
+
489,
|
| 1190 |
+
388
|
| 1191 |
+
],
|
| 1192 |
+
"page_idx": 7
|
| 1193 |
+
},
|
| 1194 |
+
{
|
| 1195 |
+
"type": "text",
|
| 1196 |
+
"text": "However, only our method works well in the detection of both hallucinations and omissions, where there is a $7\\%$ overall average improvement over both PMIAign and standard OT in hallucination errors. This outcome is consistent with our motivation that the common assumption among standard word-alignment tools, which is that a mapping exists between all source and target words, prevents them from effectively identifying all errors.",
|
| 1197 |
+
"bbox": [
|
| 1198 |
+
112,
|
| 1199 |
+
390,
|
| 1200 |
+
489,
|
| 1201 |
+
535
|
| 1202 |
+
],
|
| 1203 |
+
"page_idx": 7
|
| 1204 |
+
},
|
| 1205 |
+
{
|
| 1206 |
+
"type": "text",
|
| 1207 |
+
"text": "5.3 Distinguish Hallucination and Omission",
|
| 1208 |
+
"text_level": 1,
|
| 1209 |
+
"bbox": [
|
| 1210 |
+
112,
|
| 1211 |
+
546,
|
| 1212 |
+
473,
|
| 1213 |
+
562
|
| 1214 |
+
],
|
| 1215 |
+
"page_idx": 7
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"type": "image",
|
| 1219 |
+
"img_path": "images/f795d3cdb545d575908fc61e14cc68dae7d87fb5939c7ccf7e108b80a3ffec9d.jpg",
|
| 1220 |
+
"image_caption": [
|
| 1221 |
+
"Figure 2: LaBSE cosine similarity score (y-axis) of samples, aggregated across 10 high-resource datasets, with either hallucination (red triangles) or omission (blue circles) as gold labels. The x-axis shows the sample count index."
|
| 1222 |
+
],
|
| 1223 |
+
"image_footnote": [],
|
| 1224 |
+
"bbox": [
|
| 1225 |
+
142,
|
| 1226 |
+
579,
|
| 1227 |
+
458,
|
| 1228 |
+
793
|
| 1229 |
+
],
|
| 1230 |
+
"page_idx": 7
|
| 1231 |
+
},
|
| 1232 |
+
{
|
| 1233 |
+
"type": "text",
|
| 1234 |
+
"text": "Figure 2 shows LaBSE cosine similarity scores for samples with either hallucination or omission",
|
| 1235 |
+
"bbox": [
|
| 1236 |
+
112,
|
| 1237 |
+
889,
|
| 1238 |
+
487,
|
| 1239 |
+
921
|
| 1240 |
+
],
|
| 1241 |
+
"page_idx": 7
|
| 1242 |
+
},
|
| 1243 |
+
{
|
| 1244 |
+
"type": "text",
|
| 1245 |
+
"text": "labels, aggregated from the 10 high-resource language pairs datasets. We only focus on high-resource languages, given that the performance of all methods significantly diminishes with low-resource ones. The primary goal of this experiment is to study the models' abilities to differentiate between types of errors. Although LaBSE quality estimator can effectively detect both hallucinations and omissions, the figure clearly shows that it fails to distinguish between them. The majority of samples for both hallucinations and omissions exhibit cosine similarity scores below $-0.8$ .",
|
| 1246 |
+
"bbox": [
|
| 1247 |
+
507,
|
| 1248 |
+
84,
|
| 1249 |
+
884,
|
| 1250 |
+
277
|
| 1251 |
+
],
|
| 1252 |
+
"page_idx": 7
|
| 1253 |
+
},
|
| 1254 |
+
{
|
| 1255 |
+
"type": "image",
|
| 1256 |
+
"img_path": "images/ee4d00b4213d9549294dc51a59fab0c6273756801db21cdfb2a2ded2e6241e3e.jpg",
|
| 1257 |
+
"image_caption": [
|
| 1258 |
+
"Figure 3: Hallucination scores (x-axis) and Omission scores (y-axis) produced by our OTTAWA across the same samples used in Figure 2. The dotted green line simply illustrates the diagonal."
|
| 1259 |
+
],
|
| 1260 |
+
"image_footnote": [],
|
| 1261 |
+
"bbox": [
|
| 1262 |
+
539,
|
| 1263 |
+
288,
|
| 1264 |
+
850,
|
| 1265 |
+
502
|
| 1266 |
+
],
|
| 1267 |
+
"page_idx": 7
|
| 1268 |
+
},
|
| 1269 |
+
{
|
| 1270 |
+
"type": "text",
|
| 1271 |
+
"text": "Figure 3 shows the hallucination (x-axis) and omission (y-axis) scores produced by OT-TAWA(using LaBSE embeddings), on the same samples used in Figure 2. The figure demonstrates that our approach effectively distinguishes between omission and hallucination errors, with omission errors concentrated below the diagonal, and hallucination errors concentrated above it. In most cases, our word alignment approach, which operates without any supervision signal, accurately distinguishes omissions from hallucinations, and vice versa. This unique feature offered by our approach can help researchers to precisely diagnose and comprehend error types in MT systems, thereby facilitating more efficient development and the implementation of targeted solutions.",
|
| 1272 |
+
"bbox": [
|
| 1273 |
+
507,
|
| 1274 |
+
583,
|
| 1275 |
+
884,
|
| 1276 |
+
841
|
| 1277 |
+
],
|
| 1278 |
+
"page_idx": 7
|
| 1279 |
+
},
|
| 1280 |
+
{
|
| 1281 |
+
"type": "text",
|
| 1282 |
+
"text": "5.4 Word-Level Detection",
|
| 1283 |
+
"text_level": 1,
|
| 1284 |
+
"bbox": [
|
| 1285 |
+
507,
|
| 1286 |
+
852,
|
| 1287 |
+
727,
|
| 1288 |
+
866
|
| 1289 |
+
],
|
| 1290 |
+
"page_idx": 7
|
| 1291 |
+
},
|
| 1292 |
+
{
|
| 1293 |
+
"type": "text",
|
| 1294 |
+
"text": "Following the experimental setup in (Dale et al., 2023b), we evaluate our OTTAWA for word-level hallucination and omission detection. Table 3 com",
|
| 1295 |
+
"bbox": [
|
| 1296 |
+
507,
|
| 1297 |
+
873,
|
| 1298 |
+
882,
|
| 1299 |
+
920
|
| 1300 |
+
],
|
| 1301 |
+
"page_idx": 7
|
| 1302 |
+
},
|
| 1303 |
+
{
|
| 1304 |
+
"type": "page_number",
|
| 1305 |
+
"text": "6329",
|
| 1306 |
+
"bbox": [
|
| 1307 |
+
480,
|
| 1308 |
+
927,
|
| 1309 |
+
519,
|
| 1310 |
+
940
|
| 1311 |
+
],
|
| 1312 |
+
"page_idx": 7
|
| 1313 |
+
},
|
| 1314 |
+
{
|
| 1315 |
+
"type": "text",
|
| 1316 |
+
"text": "pares its performance with the best internal approach baselines identified in their study: LogProb (the Stand. variant) and ALTI (the sum variant). It is worth noting that the LogProb and ALTI baselines are different from those in Table 1 despite the name resemblance. Specifically, ALTI is a combination of two baselines from Table 1: ALTI (hallucination results), and $\\mathrm{ALTIT}^{\\mathrm{T}}$ (omission results). Conversely, the LogProb baseline is obtained by processing the sentence pairs through the MT model twice (once for the source and once for the target), unlike SeqLogProb in Table 1, which involves only one pass.",
|
| 1317 |
+
"bbox": [
|
| 1318 |
+
112,
|
| 1319 |
+
84,
|
| 1320 |
+
492,
|
| 1321 |
+
294
|
| 1322 |
+
],
|
| 1323 |
+
"page_idx": 8
|
| 1324 |
+
},
|
| 1325 |
+
{
|
| 1326 |
+
"type": "table",
|
| 1327 |
+
"img_path": "images/a984c2bcaf318d8476db942b55984ad5bcd93c7e1f01c673218966c08786e603.jpg",
|
| 1328 |
+
"table_caption": [],
|
| 1329 |
+
"table_footnote": [],
|
| 1330 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">Hallucination</td><td colspan=\"3\">Omission</td></tr><tr><td>HR</td><td>LR</td><td>Avg</td><td>HR</td><td>LR</td><td>Avg</td></tr><tr><td>LogProb</td><td>73</td><td>66</td><td>70</td><td>84</td><td>71</td><td>78</td></tr><tr><td>ALTI</td><td>87</td><td>69</td><td>78</td><td>86</td><td>69</td><td>78</td></tr><tr><td>OTTAWA</td><td>78</td><td>59</td><td>70</td><td>79</td><td>60</td><td>71</td></tr></table>",
|
| 1331 |
+
"bbox": [
|
| 1332 |
+
119,
|
| 1333 |
+
307,
|
| 1334 |
+
485,
|
| 1335 |
+
388
|
| 1336 |
+
],
|
| 1337 |
+
"page_idx": 8
|
| 1338 |
+
},
|
| 1339 |
+
{
|
| 1340 |
+
"type": "text",
|
| 1341 |
+
"text": "Additionally, (Dale et al., 2023b) conducted ablations with these baselines, creating two variants for each: Standard and Contrastive for LogProb, and Mean and Max for ALTI. In Table 3, we report only the results for the best-performing variant of each baseline. Results indicate that word-level detection poses a greater challenge for our approach, which significantly under-performs compared to the best baseline (ALTI) by $8\\%$ and $7\\%$ in the overall average for hallucination and omission detection, respectively. However, we find the results encouraging when considering that unsupervised world-level detection with current state-of-the-art methods was not feasible without white-box access to the MT system, as external approaches operate on sentence level only.",
|
| 1342 |
+
"bbox": [
|
| 1343 |
+
112,
|
| 1344 |
+
464,
|
| 1345 |
+
489,
|
| 1346 |
+
722
|
| 1347 |
+
],
|
| 1348 |
+
"page_idx": 8
|
| 1349 |
+
},
|
| 1350 |
+
{
|
| 1351 |
+
"type": "text",
|
| 1352 |
+
"text": "5.5 Word Alignment",
|
| 1353 |
+
"text_level": 1,
|
| 1354 |
+
"bbox": [
|
| 1355 |
+
112,
|
| 1356 |
+
737,
|
| 1357 |
+
294,
|
| 1358 |
+
753
|
| 1359 |
+
],
|
| 1360 |
+
"page_idx": 8
|
| 1361 |
+
},
|
| 1362 |
+
{
|
| 1363 |
+
"type": "text",
|
| 1364 |
+
"text": "We run experiments on cross-lingual word alignment using 6 datasets, as in SimAlign (Sabet et al., 2020) and PMIAAlign (Azadi et al., 2023), with gold word alignment labels. We include English-Czech (en-cs) (Mareček, 2011), German-English (de-en) (Koehn, 2005), English-Persian (en-fa) (Tavakoli and Faili, 2014), English-French (en-fr) (Och and Ney, 2000), English-Hindi (en-hi) (Koehn et al., 2005) and Romanian-English (ro-en) (Mihalcea and Pedersen, 2003) language",
|
| 1365 |
+
"bbox": [
|
| 1366 |
+
112,
|
| 1367 |
+
760,
|
| 1368 |
+
489,
|
| 1369 |
+
921
|
| 1370 |
+
],
|
| 1371 |
+
"page_idx": 8
|
| 1372 |
+
},
|
| 1373 |
+
{
|
| 1374 |
+
"type": "text",
|
| 1375 |
+
"text": "pairs. For evaluation metrics, we utilize the standard Alignment Error Rate (AER) (Och and Ney, 2003), and aligners use the mBERT representations.",
|
| 1376 |
+
"bbox": [
|
| 1377 |
+
507,
|
| 1378 |
+
84,
|
| 1379 |
+
884,
|
| 1380 |
+
133
|
| 1381 |
+
],
|
| 1382 |
+
"page_idx": 8
|
| 1383 |
+
},
|
| 1384 |
+
{
|
| 1385 |
+
"type": "table",
|
| 1386 |
+
"img_path": "images/69f6a1c4080ae67a4f0af3c241f9504cc3c2e915c16607c90e0240dc9f0467f4.jpg",
|
| 1387 |
+
"table_caption": [
|
| 1388 |
+
"Table 3: Word-level hallucination and omission results, evaluated using the word-level ROC AUC score as defined by (Dale et al., 2023b)."
|
| 1389 |
+
],
|
| 1390 |
+
"table_footnote": [],
|
| 1391 |
+
"table_body": "<table><tr><td></td><td>en-cs</td><td>de-en</td><td>en-fa</td><td>en-fr</td><td>en-hi</td><td>ro-en</td></tr><tr><td colspan=\"7\">Alignment Error Rate (AER) ↓</td></tr><tr><td>SimAlign</td><td>0.12</td><td>0.19</td><td>0.37</td><td>0.06</td><td>0.44</td><td>0.34</td></tr><tr><td>PMIAign</td><td>0.12</td><td>0.17</td><td>0.32</td><td>0.06</td><td>0.39</td><td>0.31</td></tr><tr><td>OT</td><td>0.12</td><td>0.17</td><td>0.32</td><td>0.06</td><td>0.39</td><td>0.39</td></tr><tr><td>POT</td><td>0.13</td><td>0.19</td><td>0.37</td><td>0.06</td><td>0.44</td><td>0.34</td></tr><tr><td>OTTAWA</td><td>0.12</td><td>0.17</td><td>0.33</td><td>0.05</td><td>0.39</td><td>0.30</td></tr></table>",
|
| 1392 |
+
"bbox": [
|
| 1393 |
+
512,
|
| 1394 |
+
148,
|
| 1395 |
+
878,
|
| 1396 |
+
243
|
| 1397 |
+
],
|
| 1398 |
+
"page_idx": 8
|
| 1399 |
+
},
|
| 1400 |
+
{
|
| 1401 |
+
"type": "text",
|
| 1402 |
+
"text": "Table 4: Cross-lingual word alignment performances (AER) across 6 language pairs for 5-word aligners.",
|
| 1403 |
+
"bbox": [
|
| 1404 |
+
507,
|
| 1405 |
+
256,
|
| 1406 |
+
882,
|
| 1407 |
+
288
|
| 1408 |
+
],
|
| 1409 |
+
"page_idx": 8
|
| 1410 |
+
},
|
| 1411 |
+
{
|
| 1412 |
+
"type": "text",
|
| 1413 |
+
"text": "As shown in Table 4, OTTAWA performs on par with another state-of-the-art word aligner on the cross-lingual alignment task. More precisely, it matches the best-performing baselines in three languages (en-cs, de-en, and en-hi), while slightly outperforming them by $1\\%$ in the en-fr and ro-en language pairs. We anticipated no significant gains in word alignment, as the datasets for cross-lingual word alignment are constructed from clean translations, making null alignments less concerning.",
|
| 1414 |
+
"bbox": [
|
| 1415 |
+
507,
|
| 1416 |
+
307,
|
| 1417 |
+
884,
|
| 1418 |
+
468
|
| 1419 |
+
],
|
| 1420 |
+
"page_idx": 8
|
| 1421 |
+
},
|
| 1422 |
+
{
|
| 1423 |
+
"type": "text",
|
| 1424 |
+
"text": "6 Conclusion and Future Work",
|
| 1425 |
+
"text_level": 1,
|
| 1426 |
+
"bbox": [
|
| 1427 |
+
507,
|
| 1428 |
+
487,
|
| 1429 |
+
794,
|
| 1430 |
+
502
|
| 1431 |
+
],
|
| 1432 |
+
"page_idx": 8
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"type": "text",
|
| 1436 |
+
"text": "In this work, we propose a new word alignment-based approach for detecting hallucinations and omissions in MT systems. We develop OTTAWA, an innovative word aligner designed specifically for this purpose. While experiments show promise in MT hallucination and omission detection, this area remains an intriguing direction for future research exploration. We plan to focus on one-to-many alignments for pathological translations.",
|
| 1437 |
+
"bbox": [
|
| 1438 |
+
507,
|
| 1439 |
+
518,
|
| 1440 |
+
884,
|
| 1441 |
+
663
|
| 1442 |
+
],
|
| 1443 |
+
"page_idx": 8
|
| 1444 |
+
},
|
| 1445 |
+
{
|
| 1446 |
+
"type": "text",
|
| 1447 |
+
"text": "7 Limitations",
|
| 1448 |
+
"text_level": 1,
|
| 1449 |
+
"bbox": [
|
| 1450 |
+
507,
|
| 1451 |
+
681,
|
| 1452 |
+
645,
|
| 1453 |
+
697
|
| 1454 |
+
],
|
| 1455 |
+
"page_idx": 8
|
| 1456 |
+
},
|
| 1457 |
+
{
|
| 1458 |
+
"type": "text",
|
| 1459 |
+
"text": "Our Optimal Transport (OT)-based word alignment method relies on pretrained word embeddings, which may not be available for low and scarce resource languages. Also, the performance of our word aligner on low resources heavily depends on representations obtained from a supervised MT quality estimator, which may not be accessible or does not support certain languages. Another limitation of our study is the exclusive focus on null alignments, which are central to our task of interest. However, we do not address other complex cases such as one-to-many and many-to-many alignments.",
|
| 1460 |
+
"bbox": [
|
| 1461 |
+
507,
|
| 1462 |
+
712,
|
| 1463 |
+
884,
|
| 1464 |
+
921
|
| 1465 |
+
],
|
| 1466 |
+
"page_idx": 8
|
| 1467 |
+
},
|
| 1468 |
+
{
|
| 1469 |
+
"type": "page_number",
|
| 1470 |
+
"text": "6330",
|
| 1471 |
+
"bbox": [
|
| 1472 |
+
480,
|
| 1473 |
+
927,
|
| 1474 |
+
521,
|
| 1475 |
+
940
|
| 1476 |
+
],
|
| 1477 |
+
"page_idx": 8
|
| 1478 |
+
},
|
| 1479 |
+
{
|
| 1480 |
+
"type": "text",
|
| 1481 |
+
"text": "Acknowledgements",
|
| 1482 |
+
"text_level": 1,
|
| 1483 |
+
"bbox": [
|
| 1484 |
+
114,
|
| 1485 |
+
84,
|
| 1486 |
+
285,
|
| 1487 |
+
101
|
| 1488 |
+
],
|
| 1489 |
+
"page_idx": 9
|
| 1490 |
+
},
|
| 1491 |
+
{
|
| 1492 |
+
"type": "text",
|
| 1493 |
+
"text": "We thank the anonymous reviewers for their insightful comments. Osmar R. Zaiane is supported by the Amii Fellow Program.",
|
| 1494 |
+
"bbox": [
|
| 1495 |
+
112,
|
| 1496 |
+
109,
|
| 1497 |
+
489,
|
| 1498 |
+
156
|
| 1499 |
+
],
|
| 1500 |
+
"page_idx": 9
|
| 1501 |
+
},
|
| 1502 |
+
{
|
| 1503 |
+
"type": "text",
|
| 1504 |
+
"text": "References",
|
| 1505 |
+
"text_level": 1,
|
| 1506 |
+
"bbox": [
|
| 1507 |
+
115,
|
| 1508 |
+
184,
|
| 1509 |
+
213,
|
| 1510 |
+
199
|
| 1511 |
+
],
|
| 1512 |
+
"page_idx": 9
|
| 1513 |
+
},
|
| 1514 |
+
{
|
| 1515 |
+
"type": "list",
|
| 1516 |
+
"sub_type": "ref_text",
|
| 1517 |
+
"list_items": [
|
| 1518 |
+
"Sawsan Alqahtani, Garima Lalwani, Yi Zhang, Salvatore Romeo, and Saab Mansour. 2021. Using optimal transport as alignment objective for fine-tuning multilingual contextualized embeddings. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 3904-3919.",
|
| 1519 |
+
"Yuki Arase, Han Bao, and Sho Yokoi. 2023. Unbalanced optimal transport for unbalanced word alignment. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3966-3986.",
|
| 1520 |
+
"Fatemeh Azadi, Heshaam Faili, and Mohammad Javad Dousti. 2023. Pmi-align: Word alignment with pointwise mutual information without requiring parallel training data. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 12366-12377.",
|
| 1521 |
+
"Loic Barrault, Yu-An Chung, Mariano Cora Meglioli, David Dale, Ning Dong, Paul-Ambroise Duquenne, Hady Elsahar, Hongyu Gong, Kevin Heffernan, John Hoffman, et al. 2023. Seamlessm4t-massively multilingual & multimodal machine translation. ArXiv Preprint.",
|
| 1522 |
+
"F. Bourgeois and J. Lassalle. 1971. An extension of the munkres algorithm for the assignment problem to rectangular matrices. Communications of the ACM, 14(12):802-804.",
|
| 1523 |
+
"Peter E Brown, Vincent J Della Pietra, Stephen A Della Pietra, and Robert L Mercer. 1993a. The mathematics of statistical machine translation: Parameter estimation. Computational Linguistics, 19(2).",
|
| 1524 |
+
"Peter F Brown, Vincent J Della Pietra, Stephen A Della Pietra, and Robert L Mercer. 1993b. Advances in probabilistic and other parsing technologies. IBM Journal of Research and Development, 37(3):288-307.",
|
| 1525 |
+
"Stephen L. Campbell and Carl Dean Meyer. 2009. Generalized inverses of linear transformations. Society for Industrial and Applied Mathematics.",
|
| 1526 |
+
"Laetitia Chapel, Mokhtar Z. Alaya, and Gilles Gasso. 2020. Partial optimal transport with applications on positive-unlabeled learning. In Advances in Neural Information Processing Systems, volume 33, pages 9778-9789.",
|
| 1527 |
+
"Zewen Chi, Li Dong, Bo Zheng, Shaohan Huang, XianLing Mao, He-Yan Huang, and Furu Wei. 2021. Improving pretrained cross-lingual language models via"
|
| 1528 |
+
],
|
| 1529 |
+
"bbox": [
|
| 1530 |
+
115,
|
| 1531 |
+
206,
|
| 1532 |
+
489,
|
| 1533 |
+
920
|
| 1534 |
+
],
|
| 1535 |
+
"page_idx": 9
|
| 1536 |
+
},
|
| 1537 |
+
{
|
| 1538 |
+
"type": "list",
|
| 1539 |
+
"sub_type": "ref_text",
|
| 1540 |
+
"list_items": [
|
| 1541 |
+
"self-labeled word alignment. 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 3418-3430.",
|
| 1542 |
+
"Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Édouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440-8451.",
|
| 1543 |
+
"Marco Cuturi. 2013. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems, volume 26.",
|
| 1544 |
+
"David Dale, Elena Voita, Loic Barrault, and Marta R. Costa-jussa. 2023a. Detecting and mitigating hallucinations in machine translation: Model internal workings alone do well, sentence similarity Even better. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 36-50.",
|
| 1545 |
+
"David Dale, Elena Voita, Janice Lam, Prangthip Hansanti, Christophe Ropers, Elahe Kalbassi, Cynthia Gao, Loic Barrault, and Marta Costa-jussa. 2023b. HalOmi: A manually annotated benchmark for multilingual hallucination and omission detection in machine translation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 638-653.",
|
| 1546 |
+
"Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. 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 4171-4186.",
|
| 1547 |
+
"Zi-Yi Dou and Graham Neubig. 2021. Word alignment by fine-tuning embeddings on parallel corpora. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2112-2128.",
|
| 1548 |
+
"Paul-Ambroise Duquenne, Holger Schwenk, and Benoit Sagot. 2023. Sonar: Sentence-level multimodal and language-agnostic representations. ArXiv Preprint.",
|
| 1549 |
+
"Fangxiaoyu Feng, Yinfei Yang, Daniel Cer, Naveen Arivazhagan, and Wei Wang. 2022. Language-agnostic bert sentence embedding. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 878-891.",
|
| 1550 |
+
"Javier Ferrando, Gerard I Gallego, Belen Alastruey, Carlos Escolano, and Marta R Costa-jussa. 2022. Towards opening the black box of neural machine translation: Source and target interpretations of the transformer. In Proceedings of the 2022 Conference on"
|
| 1551 |
+
],
|
| 1552 |
+
"bbox": [
|
| 1553 |
+
510,
|
| 1554 |
+
85,
|
| 1555 |
+
884,
|
| 1556 |
+
920
|
| 1557 |
+
],
|
| 1558 |
+
"page_idx": 9
|
| 1559 |
+
},
|
| 1560 |
+
{
|
| 1561 |
+
"type": "page_number",
|
| 1562 |
+
"text": "6331",
|
| 1563 |
+
"bbox": [
|
| 1564 |
+
480,
|
| 1565 |
+
928,
|
| 1566 |
+
517,
|
| 1567 |
+
940
|
| 1568 |
+
],
|
| 1569 |
+
"page_idx": 9
|
| 1570 |
+
},
|
| 1571 |
+
{
|
| 1572 |
+
"type": "list",
|
| 1573 |
+
"sub_type": "ref_text",
|
| 1574 |
+
"list_items": [
|
| 1575 |
+
"Empirical Methods in Natural Language Processing, pages 8756-8769.",
|
| 1576 |
+
"Hamidreza Ghader and Christof Monz. 2017. What does attention in neural machine translation pay attention to? In Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 30-39.",
|
| 1577 |
+
"Nuno M Guerreiro, Duarte M Alves, Jonas Waldendorf, Barry Haddow, Alexandra Birch, Pierre Colombo, and Andre FT Martins. 2023a. Hallucinations in large multilingual translation models. Transactions of the Association for Computational Linguistics, 11:1500-1517.",
|
| 1578 |
+
"Nuno M. Guerreiro, Pierre Colombo, Pablo Piantanida, and André Martins. 2023b. Optimal transport for unsupervised hallucination detection in neural machine translation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13766-13784.",
|
| 1579 |
+
"Nuno M Guerreiro, Elena Voita, and André FT Martins. 2023c. Looking for a needle in a haystack: A comprehensive study of hallucinations in neural machine translation. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 1059-1075.",
|
| 1580 |
+
"Kevin Heffernan, Onur Celebi, and Holger Schwenk. 2022. Bitext mining using distilled sentence representations for low-resource languages. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 2101-2112.",
|
| 1581 |
+
"Gao Huang, Chuan Guo, Matt J Kusner, Yu Sun, Fei Sha, and Kilian Q Weinberger. 2016. Supervised word mover's distance. Advances in Neural Information Processing Systems, 29.",
|
| 1582 |
+
"L. V. Kantorovich. 1942. On the translocation of masses. Doklady Akademii Nauk, 37(2):227-229.",
|
| 1583 |
+
"Philipp Koehn. 2005. Europarl: A parallel corpus for statistical machine translation. In Proceedings of Machine Translation Summit X: Papers, pages 79-86.",
|
| 1584 |
+
"Philipp Koehn, Joel Martin, Rada Mihalcea, Christof Monz, and Ted Pedersen. 2005. Proceedings of the acl workshop on building and using parallel texts. In Proceedings of the ACL Workshop on Building and Using Parallel Texts.",
|
| 1585 |
+
"Harold W Kuhn. 1955. The hungarian method for the assignment problem. Naval Research Logistics Quarterly, 2(1-2):83-97.",
|
| 1586 |
+
"Wuwei Lan, Chao Jiang, and Wei Xu. 2021. Neural semi-markov crf for monolingual word alignment. 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 6815-6828."
|
| 1587 |
+
],
|
| 1588 |
+
"bbox": [
|
| 1589 |
+
115,
|
| 1590 |
+
85,
|
| 1591 |
+
487,
|
| 1592 |
+
917
|
| 1593 |
+
],
|
| 1594 |
+
"page_idx": 10
|
| 1595 |
+
},
|
| 1596 |
+
{
|
| 1597 |
+
"type": "list",
|
| 1598 |
+
"sub_type": "ref_text",
|
| 1599 |
+
"list_items": [
|
| 1600 |
+
"Seonghyeon Lee, Dongha Lee, Seongbo Jang, and Hwanjo Yu. 2022. Toward interpretable semantic textual similarity via optimal transport-based contrastive sentence learning. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5969-5979.",
|
| 1601 |
+
"David Mareček. 2011. Automatic alignment of tectogrammatical trees from czech-english parallel corpus. Univerzita Karlova, Matematicko-fyzikálnífakulta.",
|
| 1602 |
+
"Rada Mihalcea and Ted Pedersen. 2003. An evaluation exercise for word alignment. In Proceedings of the HLT-NAACL 2003 Workshop on Building and using parallel texts: data driven machine translation and beyond, pages 1-10.",
|
| 1603 |
+
"Gaspard Monge. 1781. Mémoire sur la théorie des déblais et des remblais. Histoire de l'Académie Royale des Sciences de Paris.",
|
| 1604 |
+
"Mathias Müller and Rico Sennrich. 2021. Understanding the properties of minimum bayes risk decoding in 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 259-272.",
|
| 1605 |
+
"Sheshera Mysore, Arman Cohan, and Tom Hope. 2022. Multi-vector models with textual guidance for fine-grained scientific document similarity. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4453-4470.",
|
| 1606 |
+
"Masaaki Nagata, Katsuki Chousa, and Masaaki Nishino. 2020. A supervised word alignment method based on cross-language span prediction using multilingual bert. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 555-565.",
|
| 1607 |
+
"Franz Josef Och and Hermann Ney. 2000. Improved statistical alignment models. In Proceedings of the 38th Annual Meeting of the Association for Computational Linguistics, pages 440-447.",
|
| 1608 |
+
"Franz Josef Och and Hermann Ney. 2003. A systematic comparison of various statistical alignment models. Computational linguistics, 29(1):19-51.",
|
| 1609 |
+
"Robert Östling and Jörg Tiedemann. 2016. Efficient word alignment with markov chain monte carlo. The Prague Bulletin of Mathematical Linguistics.",
|
| 1610 |
+
"Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. 2019. PyTorch: An imperative style, high-performance deep learning library. Advances in Neural Information Processing Systems, 32."
|
| 1611 |
+
],
|
| 1612 |
+
"bbox": [
|
| 1613 |
+
510,
|
| 1614 |
+
85,
|
| 1615 |
+
880,
|
| 1616 |
+
920
|
| 1617 |
+
],
|
| 1618 |
+
"page_idx": 10
|
| 1619 |
+
},
|
| 1620 |
+
{
|
| 1621 |
+
"type": "page_number",
|
| 1622 |
+
"text": "6332",
|
| 1623 |
+
"bbox": [
|
| 1624 |
+
480,
|
| 1625 |
+
928,
|
| 1626 |
+
519,
|
| 1627 |
+
940
|
| 1628 |
+
],
|
| 1629 |
+
"page_idx": 10
|
| 1630 |
+
},
|
| 1631 |
+
{
|
| 1632 |
+
"type": "text",
|
| 1633 |
+
"text": "Gabriel Peyre, Marco Cuturi, and Justin Solomon. 2016. Gromov-wasserstein averaging of kernel and distance matrices. In International Conference on Machine Learning, pages 2664-2672.",
|
| 1634 |
+
"bbox": [
|
| 1635 |
+
114,
|
| 1636 |
+
85,
|
| 1637 |
+
489,
|
| 1638 |
+
139
|
| 1639 |
+
],
|
| 1640 |
+
"page_idx": 11
|
| 1641 |
+
},
|
| 1642 |
+
{
|
| 1643 |
+
"type": "text",
|
| 1644 |
+
"text": "Vikas Raunak, Arul Menezes, and Marcin Junczys-Dowmunt. 2021. The curious case of hallucinations in neural machine translation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1172-1183.",
|
| 1645 |
+
"bbox": [
|
| 1646 |
+
114,
|
| 1647 |
+
148,
|
| 1648 |
+
489,
|
| 1649 |
+
228
|
| 1650 |
+
],
|
| 1651 |
+
"page_idx": 11
|
| 1652 |
+
},
|
| 1653 |
+
{
|
| 1654 |
+
"type": "text",
|
| 1655 |
+
"text": "Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020. COMET: A neural framework for mt evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685-2702.",
|
| 1656 |
+
"bbox": [
|
| 1657 |
+
114,
|
| 1658 |
+
237,
|
| 1659 |
+
487,
|
| 1660 |
+
304
|
| 1661 |
+
],
|
| 1662 |
+
"page_idx": 11
|
| 1663 |
+
},
|
| 1664 |
+
{
|
| 1665 |
+
"type": "text",
|
| 1666 |
+
"text": "Masoud Jalili Sabet, Philipp Dufter, François Yvon, and Hinrich Schütze. 2020. Simalign: High quality word alignments without parallel training data using static and contextualized embeddings. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 1627-1643.",
|
| 1667 |
+
"bbox": [
|
| 1668 |
+
114,
|
| 1669 |
+
313,
|
| 1670 |
+
487,
|
| 1671 |
+
392
|
| 1672 |
+
],
|
| 1673 |
+
"page_idx": 11
|
| 1674 |
+
},
|
| 1675 |
+
{
|
| 1676 |
+
"type": "text",
|
| 1677 |
+
"text": "Leila Tavakoli and Heshaam Faili. 2014. Phrase alignments in parallel corpus using bootstrapping approach. International Journal of Information and Communication Technology Research.",
|
| 1678 |
+
"bbox": [
|
| 1679 |
+
114,
|
| 1680 |
+
401,
|
| 1681 |
+
487,
|
| 1682 |
+
455
|
| 1683 |
+
],
|
| 1684 |
+
"page_idx": 11
|
| 1685 |
+
},
|
| 1686 |
+
{
|
| 1687 |
+
"type": "text",
|
| 1688 |
+
"text": "Cédric Villani. 2009. Optimal transport: Old and new, volume 338. Springer.",
|
| 1689 |
+
"bbox": [
|
| 1690 |
+
114,
|
| 1691 |
+
464,
|
| 1692 |
+
487,
|
| 1693 |
+
493
|
| 1694 |
+
],
|
| 1695 |
+
"page_idx": 11
|
| 1696 |
+
},
|
| 1697 |
+
{
|
| 1698 |
+
"type": "text",
|
| 1699 |
+
"text": "Thomas Zenkel, Joern Wuebker, and John DeNero. 2020. End-to-end neural word alignment outperforms giza++. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1605-1617.",
|
| 1700 |
+
"bbox": [
|
| 1701 |
+
114,
|
| 1702 |
+
502,
|
| 1703 |
+
487,
|
| 1704 |
+
569
|
| 1705 |
+
],
|
| 1706 |
+
"page_idx": 11
|
| 1707 |
+
},
|
| 1708 |
+
{
|
| 1709 |
+
"type": "text",
|
| 1710 |
+
"text": "Jingyi Zhang and Josef van Genabith. 2021. A bidirectional transformer based alignment model for unsupervised word alignment. 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 283-292.",
|
| 1711 |
+
"bbox": [
|
| 1712 |
+
114,
|
| 1713 |
+
577,
|
| 1714 |
+
489,
|
| 1715 |
+
670
|
| 1716 |
+
],
|
| 1717 |
+
"page_idx": 11
|
| 1718 |
+
},
|
| 1719 |
+
{
|
| 1720 |
+
"type": "text",
|
| 1721 |
+
"text": "Chunting Zhou, Graham Neubig, Jiatao Gu, Mona Diab, Francisco Guzmán, Luke Zettlemoyer, and Marjan Ghazvininejad. 2021. Detecting hallucinated content in conditional neural sequence generation. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 1393-1404.",
|
| 1722 |
+
"bbox": [
|
| 1723 |
+
114,
|
| 1724 |
+
680,
|
| 1725 |
+
489,
|
| 1726 |
+
759
|
| 1727 |
+
],
|
| 1728 |
+
"page_idx": 11
|
| 1729 |
+
},
|
| 1730 |
+
{
|
| 1731 |
+
"type": "text",
|
| 1732 |
+
"text": "A Equidistant Vector",
|
| 1733 |
+
"text_level": 1,
|
| 1734 |
+
"bbox": [
|
| 1735 |
+
114,
|
| 1736 |
+
772,
|
| 1737 |
+
315,
|
| 1738 |
+
788
|
| 1739 |
+
],
|
| 1740 |
+
"page_idx": 11
|
| 1741 |
+
},
|
| 1742 |
+
{
|
| 1743 |
+
"type": "text",
|
| 1744 |
+
"text": "Assume that we have vectors $e_1, \\ldots, e_n$ in $\\mathbb{R}^D$ . Here we discuss how to find an equidistant vector $e^{(\\varnothing)}$ with respect to cosine distance. For that we need to solve a system of $N - 1$ equations:",
|
| 1745 |
+
"bbox": [
|
| 1746 |
+
112,
|
| 1747 |
+
797,
|
| 1748 |
+
487,
|
| 1749 |
+
862
|
| 1750 |
+
],
|
| 1751 |
+
"page_idx": 11
|
| 1752 |
+
},
|
| 1753 |
+
{
|
| 1754 |
+
"type": "equation",
|
| 1755 |
+
"text": "\n$$\n\\mathbf {d i s t} (e ^ {\\emptyset}, e _ {1}) = \\mathbf {d i s t} (e ^ {\\emptyset}, e _ {j})\n$$\n",
|
| 1756 |
+
"text_format": "latex",
|
| 1757 |
+
"bbox": [
|
| 1758 |
+
196,
|
| 1759 |
+
873,
|
| 1760 |
+
403,
|
| 1761 |
+
892
|
| 1762 |
+
],
|
| 1763 |
+
"page_idx": 11
|
| 1764 |
+
},
|
| 1765 |
+
{
|
| 1766 |
+
"type": "text",
|
| 1767 |
+
"text": "for all $j = 2,\\ldots ,N$",
|
| 1768 |
+
"bbox": [
|
| 1769 |
+
114,
|
| 1770 |
+
904,
|
| 1771 |
+
272,
|
| 1772 |
+
921
|
| 1773 |
+
],
|
| 1774 |
+
"page_idx": 11
|
| 1775 |
+
},
|
| 1776 |
+
{
|
| 1777 |
+
"type": "text",
|
| 1778 |
+
"text": "Recall the definition of the cosine distance:",
|
| 1779 |
+
"bbox": [
|
| 1780 |
+
527,
|
| 1781 |
+
84,
|
| 1782 |
+
848,
|
| 1783 |
+
98
|
| 1784 |
+
],
|
| 1785 |
+
"page_idx": 11
|
| 1786 |
+
},
|
| 1787 |
+
{
|
| 1788 |
+
"type": "equation",
|
| 1789 |
+
"text": "\n$$\n\\mathbf {d i s t} (x, y) = 1 - \\frac {\\boldsymbol {x} \\cdot \\boldsymbol {y}}{\\| \\boldsymbol {x} \\| \\| \\boldsymbol {y} \\|.}\n$$\n",
|
| 1790 |
+
"text_format": "latex",
|
| 1791 |
+
"bbox": [
|
| 1792 |
+
591,
|
| 1793 |
+
107,
|
| 1794 |
+
800,
|
| 1795 |
+
139
|
| 1796 |
+
],
|
| 1797 |
+
"page_idx": 11
|
| 1798 |
+
},
|
| 1799 |
+
{
|
| 1800 |
+
"type": "text",
|
| 1801 |
+
"text": "Hence, the system of equations we need to solve is equivalent to the system of linear equations:",
|
| 1802 |
+
"bbox": [
|
| 1803 |
+
507,
|
| 1804 |
+
149,
|
| 1805 |
+
880,
|
| 1806 |
+
180
|
| 1807 |
+
],
|
| 1808 |
+
"page_idx": 11
|
| 1809 |
+
},
|
| 1810 |
+
{
|
| 1811 |
+
"type": "equation",
|
| 1812 |
+
"text": "\n$$\n\\frac {\\boldsymbol {e} ^ {\\varnothing} \\cdot \\boldsymbol {e} _ {1}}{\\| \\boldsymbol {e} ^ {\\varnothing} \\| \\| \\boldsymbol {e} _ {1} \\|} = \\frac {\\boldsymbol {e} ^ {\\varnothing} \\cdot \\boldsymbol {e} _ {j}}{\\| \\boldsymbol {e} ^ {\\varnothing} \\| \\| \\boldsymbol {e} _ {j} \\|}.\n$$\n",
|
| 1813 |
+
"text_format": "latex",
|
| 1814 |
+
"bbox": [
|
| 1815 |
+
600,
|
| 1816 |
+
190,
|
| 1817 |
+
793,
|
| 1818 |
+
227
|
| 1819 |
+
],
|
| 1820 |
+
"page_idx": 11
|
| 1821 |
+
},
|
| 1822 |
+
{
|
| 1823 |
+
"type": "text",
|
| 1824 |
+
"text": "Slightly rewriting it, we get:",
|
| 1825 |
+
"bbox": [
|
| 1826 |
+
527,
|
| 1827 |
+
237,
|
| 1828 |
+
739,
|
| 1829 |
+
252
|
| 1830 |
+
],
|
| 1831 |
+
"page_idx": 11
|
| 1832 |
+
},
|
| 1833 |
+
{
|
| 1834 |
+
"type": "equation",
|
| 1835 |
+
"text": "\n$$\n\\boldsymbol {e} ^ {\\varnothing} \\cdot \\left(\\frac {\\boldsymbol {e} _ {1}}{\\| \\boldsymbol {e} _ {1} \\|} - \\frac {\\boldsymbol {e} _ {j}}{\\| \\boldsymbol {e} _ {j} \\|}\\right) = 0.\n$$\n",
|
| 1836 |
+
"text_format": "latex",
|
| 1837 |
+
"bbox": [
|
| 1838 |
+
589,
|
| 1839 |
+
263,
|
| 1840 |
+
800,
|
| 1841 |
+
298
|
| 1842 |
+
],
|
| 1843 |
+
"page_idx": 11
|
| 1844 |
+
},
|
| 1845 |
+
{
|
| 1846 |
+
"type": "text",
|
| 1847 |
+
"text": "Note that usually for our word alignment problems $N < D$ , hence this system always has a solution. However, we want to find the minimum possible equal distance so that the NULL vector is meaningful for the OT task. For that, assume that $e^{(\\varnothing)}$ lies in the span of the given vectors: $e^{\\varnothing} = \\sum_{k=1}^{N} a_k e_k$ . Inserting it in the previous system, we obtain a new homogeneous system on the coefficients $a_k$ :",
|
| 1848 |
+
"bbox": [
|
| 1849 |
+
507,
|
| 1850 |
+
307,
|
| 1851 |
+
884,
|
| 1852 |
+
451
|
| 1853 |
+
],
|
| 1854 |
+
"page_idx": 11
|
| 1855 |
+
},
|
| 1856 |
+
{
|
| 1857 |
+
"type": "equation",
|
| 1858 |
+
"text": "\n$$\n\\boldsymbol {E} \\boldsymbol {a} = \\boldsymbol {0},\n$$\n",
|
| 1859 |
+
"text_format": "latex",
|
| 1860 |
+
"bbox": [
|
| 1861 |
+
658,
|
| 1862 |
+
466,
|
| 1863 |
+
731,
|
| 1864 |
+
480
|
| 1865 |
+
],
|
| 1866 |
+
"page_idx": 11
|
| 1867 |
+
},
|
| 1868 |
+
{
|
| 1869 |
+
"type": "text",
|
| 1870 |
+
"text": "where $E_{jk} = \\pmb{e}_k\\cdot \\left(\\frac{\\pmb{e}_1}{\\|\\pmb{e}_1\\|} -\\frac{\\pmb{e}_j}{\\|\\pmb{e}_j\\|}\\right)$ is a $(N - 1)\\times N$ matrix. For general positions of word representation vectors, the kernel of $\\pmb{E}$ is one-dimensional. Projection onto it could be computed as $I_N - E^+ E$ where $E^{+}$ is Moore-Penrose inverse and $I_N$ is $N\\times N$ identity matrix (Campbell and Meyer, 2009). In this case $\\pmb{a}$ will be the basis vector for the kernel subspace. After finding $\\pmb{a}$ , one can construct $e^{\\emptyset} = \\sum_{k = 1}^{N}a_{k}e_{k}$ and compute $d_{\\mathrm{min}} = \\mathbf{dist}(e^{\\emptyset},e_1)$ . Note that there is no equidistant vector with a smaller distance than $d_{\\mathrm{min}}$ .",
|
| 1871 |
+
"bbox": [
|
| 1872 |
+
507,
|
| 1873 |
+
493,
|
| 1874 |
+
884,
|
| 1875 |
+
677
|
| 1876 |
+
],
|
| 1877 |
+
"page_idx": 11
|
| 1878 |
+
},
|
| 1879 |
+
{
|
| 1880 |
+
"type": "text",
|
| 1881 |
+
"text": "B Additional Results",
|
| 1882 |
+
"text_level": 1,
|
| 1883 |
+
"bbox": [
|
| 1884 |
+
507,
|
| 1885 |
+
688,
|
| 1886 |
+
707,
|
| 1887 |
+
703
|
| 1888 |
+
],
|
| 1889 |
+
"page_idx": 11
|
| 1890 |
+
},
|
| 1891 |
+
{
|
| 1892 |
+
"type": "text",
|
| 1893 |
+
"text": "We present the comparisons of different word embeddings and alignment methods in Table 5.",
|
| 1894 |
+
"bbox": [
|
| 1895 |
+
507,
|
| 1896 |
+
713,
|
| 1897 |
+
882,
|
| 1898 |
+
745
|
| 1899 |
+
],
|
| 1900 |
+
"page_idx": 11
|
| 1901 |
+
},
|
| 1902 |
+
{
|
| 1903 |
+
"type": "page_number",
|
| 1904 |
+
"text": "6333",
|
| 1905 |
+
"bbox": [
|
| 1906 |
+
480,
|
| 1907 |
+
927,
|
| 1908 |
+
519,
|
| 1909 |
+
940
|
| 1910 |
+
],
|
| 1911 |
+
"page_idx": 11
|
| 1912 |
+
},
|
| 1913 |
+
{
|
| 1914 |
+
"type": "table",
|
| 1915 |
+
"img_path": "images/34dfb4127e6bf4878a1d4af829502b2ba17a9ca772ec0ba8583991a7516c0ad2.jpg",
|
| 1916 |
+
"table_caption": [],
|
| 1917 |
+
"table_footnote": [
|
| 1918 |
+
"Table 5: Methods performances (ROC AUC) on hallucination and omission detection across HalOmi's high-resource, low-resource, and zero-shot language-pair clusters. Bold entries describe the best results among all methods. OTTAWA refer to using OTTAWA word aligner with LABSE embeddings. W1, W2, W3, W4: SimAlign-Itermax (Sabet et al., 2020), PMIAign (Azadi et al., 2023), OT (Azadi et al., 2023), POT (Arase et al., 2023) word aligners with LaBSE embeddings. R1, R2: OTTAWA with embeddings obtained from mBERT (Devlin et al., 2019) and XLMR (Conneau et al., 2020)."
|
| 1919 |
+
],
|
| 1920 |
+
"table_body": "<table><tr><td rowspan=\"2\" colspan=\"2\">Source Lang</td><td colspan=\"7\">Hallucination</td><td colspan=\"7\">Omission</td></tr><tr><td>W1</td><td>W2</td><td>W3</td><td>W4</td><td>Our</td><td>R1</td><td>W2</td><td>W1</td><td>W2</td><td>W3</td><td>W4</td><td>Our</td><td>R1</td><td>W2</td></tr><tr><td rowspan=\"10\">High Resource</td><td>en-ar</td><td>33</td><td>64</td><td>66</td><td>65</td><td>93</td><td>85</td><td>88</td><td>56</td><td>80</td><td>82</td><td>78</td><td>79</td><td>84</td><td>81</td></tr><tr><td>ar-en</td><td>49</td><td>83</td><td>82</td><td>69</td><td>90</td><td>85</td><td>88</td><td>71</td><td>74</td><td>67</td><td>65</td><td>70</td><td>68</td><td>63</td></tr><tr><td>en-ru</td><td>31</td><td>74</td><td>75</td><td>71</td><td>91</td><td>87</td><td>94</td><td>74</td><td>83</td><td>82</td><td>76</td><td>85</td><td>83</td><td>76</td></tr><tr><td>ru-en</td><td>51</td><td>81</td><td>80</td><td>50</td><td>99</td><td>97</td><td>91</td><td>75</td><td>87</td><td>90</td><td>80</td><td>89</td><td>85</td><td>81</td></tr><tr><td>en-es</td><td>54</td><td>88</td><td>86</td><td>77</td><td>88</td><td>85</td><td>84</td><td>64</td><td>88</td><td>89</td><td>70</td><td>87</td><td>88</td><td>89</td></tr><tr><td>es-en</td><td>60</td><td>83</td><td>88</td><td>67</td><td>87</td><td>83</td><td>83</td><td>69</td><td>79</td><td>75</td><td>65</td><td>73</td><td>73</td><td>68</td></tr><tr><td>en-de</td><td>40</td><td>86</td><td>86</td><td>52</td><td>88</td><td>81</td><td>83</td><td>65</td><td>78</td><td>81</td><td>78</td><td>81</td><td>82</td><td>84</td></tr><tr><td>de-en</td><td>62</td><td>94</td><td>95</td><td>67</td><td>96</td><td>92</td><td>94</td><td>75</td><td>79</td><td>80</td><td>64</td><td>74</td><td>75</td><td>75</td></tr><tr><td>en-zh</td><td>39</td><td>72</td><td>72</td><td>59</td><td>88</td><td>87</td><td>85</td><td>84</td><td>92</td><td>94</td><td>79</td><td>92</td><td>93</td><td>88</td></tr><tr><td>zh-en</td><td>63</td><td>85</td><td>83</td><td>53</td><td>86</td><td>87</td><td>77</td><td>61</td><td>80</td><td>77</td><td>72</td><td>77</td><td>79</td><td>66</td></tr><tr><td colspan=\"2\">Avg. High Resource</td><td>47</td><td>81</td><td>81</td><td>64</td><td>91</td><td>87</td><td>88</td><td>70</td><td>82</td><td>82</td><td>73</td><td>81</td><td>81</td><td>78</td></tr><tr><td rowspan=\"6\">Low Resource</td><td>en-ks</td><td>51</td><td>62</td><td>65</td><td>47</td><td>78</td><td>62</td><td>52</td><td>62</td><td>84</td><td>78</td><td>46</td><td>84</td><td>83</td><td>71</td></tr><tr><td>ks-en</td><td>51</td><td>53</td><td>51</td><td>44</td><td>56</td><td>56</td><td>56</td><td>56</td><td>66</td><td>71</td><td>49</td><td>70</td><td>61</td><td>68</td></tr><tr><td>en-mni</td><td>55</td><td>56</td><td>56</td><td>51</td><td>59</td><td>50</td><td>52</td><td>55</td><td>63</td><td>67</td><td>65</td><td>69</td><td>60</td><td>49</td></tr><tr><td>mni-en</td><td>57</td><td>59</td><td>56</td><td>56</td><td>64</td><td>50</td><td>52</td><td>66</td><td>67</td><td>74</td><td>61</td><td>77</td><td>65</td><td>63</td></tr><tr><td>en-yo</td><td>55</td><td>77</td><td>74</td><td>60</td><td>80</td><td>67</td><td>57</td><td>69</td><td>82</td><td>85</td><td>75</td><td>86</td><td>76</td><td>72</td></tr><tr><td>yo-en</td><td>57</td><td>59</td><td>59</td><td>52</td><td>65</td><td>60</td><td>45</td><td>61</td><td>66</td><td>68</td><td>62</td><td>68</td><td>69</td><td>59</td></tr><tr><td colspan=\"2\">Avg. Low Resource</td><td>55</td><td>61</td><td>60</td><td>52</td><td>67</td><td>56</td><td>53</td><td>62</td><td>71</td><td>74</td><td>60</td><td>76</td><td>69</td><td>64</td></tr><tr><td rowspan=\"2\">Zero-Shot</td><td>yo-es</td><td>51</td><td>54</td><td>54</td><td>47</td><td>54</td><td>48</td><td>45</td><td>72</td><td>76</td><td>77</td><td>80</td><td>76</td><td>76</td><td>73</td></tr><tr><td>es-yo</td><td>62</td><td>62</td><td>63</td><td>56</td><td>65</td><td>57</td><td>56</td><td>59</td><td>80</td><td>85</td><td>53</td><td>80</td><td>76</td><td>72</td></tr><tr><td colspan=\"2\">Avg. Zero-Shot</td><td>56</td><td>57</td><td>57</td><td>52</td><td>59</td><td>53</td><td>51</td><td>66</td><td>78</td><td>81</td><td>67</td><td>78</td><td>76</td><td>72</td></tr><tr><td colspan=\"2\">Avg. HalOmi</td><td>51</td><td>72</td><td>72</td><td>57</td><td>79</td><td>73</td><td>71</td><td>66</td><td>78</td><td>79</td><td>68</td><td>79</td><td>76</td><td>72</td></tr></table>",
|
| 1921 |
+
"bbox": [
|
| 1922 |
+
114,
|
| 1923 |
+
227,
|
| 1924 |
+
878,
|
| 1925 |
+
674
|
| 1926 |
+
],
|
| 1927 |
+
"page_idx": 12
|
| 1928 |
+
},
|
| 1929 |
+
{
|
| 1930 |
+
"type": "page_number",
|
| 1931 |
+
"text": "6334",
|
| 1932 |
+
"bbox": [
|
| 1933 |
+
480,
|
| 1934 |
+
928,
|
| 1935 |
+
521,
|
| 1936 |
+
940
|
| 1937 |
+
],
|
| 1938 |
+
"page_idx": 12
|
| 1939 |
+
}
|
| 1940 |
+
]
|
2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/61d07bb8-84ea-4e77-ab73-fd59a87c73ab_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/61d07bb8-84ea-4e77-ab73-fd59a87c73ab_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bab9de7bc57bf0ce29cf86036b3493412e0c7b8be34473d98e1ee55bd3c5c272
|
| 3 |
+
size 530098
|
2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/full.md
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OTTAWA: Optimal Transport Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection
|
| 2 |
+
|
| 3 |
+
Chenyang Huang $^{1\dagger*}$ Abbas Ghaddar $^{2*}$ Ivan Kobyzev $^{2}$ Mehdi Rezagholizadeh $^{2}$ Osmar R. Zaiane $^{1}$ Boxing Chen $^{2}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Dept. of Computing Science, Alberta Machine Intelligence Institute (Amii), University of Alberta
|
| 6 |
+
|
| 7 |
+
$^{2}$ Huawei Noah's Ark Lab, Montreal Research Center, Canada
|
| 8 |
+
|
| 9 |
+
{chenyangh,zaiane}@ualberta.ca
|
| 10 |
+
|
| 11 |
+
{abbas.ghaddar, ivan.kobyzev}@huawei.com
|
| 12 |
+
|
| 13 |
+
{mehdi.rezagholizadeh,boxing.chen}@huawei.com
|
| 14 |
+
|
| 15 |
+
# Abstract
|
| 16 |
+
|
| 17 |
+
Recently, there has been considerable attention on detecting hallucinations and omissions in Machine Translation (MT) systems. The two dominant approaches to tackle this task involve analyzing the MT system's internal states or relying on the output of external tools, such as sentence similarity or MT quality estimators. In this work, we introduce OTTAWA, a novel Optimal Transport (OT)-based word aligner specifically designed to enhance the detection of hallucinations and omissions in MT systems. Our approach explicitly models the missing alignments by introducing a "null" vector, for which we propose a novel one-side constrained OT setting to allow an adaptive null alignment. Our approach yields competitive results compared to state-of-the-art methods across 18 language pairs on the HalOmi benchmark. In addition, it shows promising features, such as the ability to distinguish between both error types and perform word-level detection without accessing the MT system's internal states.
|
| 18 |
+
|
| 19 |
+
# 1 Introduction
|
| 20 |
+
|
| 21 |
+
Concerns regarding hallucination (as known as fabrication) of Machine Translation (MT) systems (Raunak et al., 2021; Müller and Sennrich, 2021; Guerreiro et al., 2023a) have led to considerable efforts towards the creation of diagnostic datasets (Zhou et al., 2021; Guerreiro et al., 2023c; Dale et al., 2023b) and developing detection methods (Guerreiro et al., 2023b; Dale et al., 2023a). In addition to hallucination errors, which occur when words in the translation are detached from the source sequence, addressing omission errors is also crucial—these are cases where words from the source sequence are absent in the translation.
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: A hallucinatory German-English translation was detected by correctly identifying the null alignments with our Optimal Transport-based method. Here, if a target word is mapping to "NULL", it is likely to be hallucinated, as no source word supports its translation.
|
| 25 |
+
|
| 26 |
+
Existing methods for detecting hallucinations and omissions in MT either focus on analyzing the model's internal states (e.g. cross-attention) or rely on the output of external tools, such as cross-lingual similarity estimators (Feng et al., 2022; Heffernan et al., 2022) or MT quality estimators (Rei et al., 2020; Duquenne et al., 2023). On one hand, internal methods are limited to scenarios where white-box access to the MT system is assumed, and are further limited by dependencies on specific model architectures (e.g. attention-based). On the other hand, external methods heavily rely on scalar outputs from models optimized for related tasks, such as MT quality or sentence similarity, but not directly optimized for hallucination detection. While hallucinations and omissions constitute low-quality translations, the opposite does not always hold. Furthermore, despite their effectiveness in detecting hallucinations and omissions, existing internal and external methods cannot distinguish
|
| 27 |
+
|
| 28 |
+
between these two error types. This is because they frame the task as anomaly detection, relying on a single outlier score to detect both error types.
|
| 29 |
+
|
| 30 |
+
Cross-lingual word alignment (Brown et al., 1993a; Och and Ney, 2003) aligns source to target tokens in parallel sentence pairs, and it provides unique insight for translation errors like hallucination and omission. Following the definition by Guerreiro et al. (2023c), hallucinated translation happens when the generated content is largely detached from the source text; therefore, we can measure hallucination by the amount of "misaligned" words in the translated text. Similarly, an omission error is likely if a significant amount of source words are not found in the translation.
|
| 31 |
+
|
| 32 |
+
Despite the strong relevance between word alignments and translation errors, alignment tools have not yet been widely applied for hallucination and omission detection. In particular, we observe that existing alignment approaches (Sabet et al., 2020; Azadi et al., 2023; Arase et al., 2023) are often based on the assumption that the translation is correct, such that most of the source or target words can be aligned with each other. This assumption, however, does not hold for scenarios where translation errors have occurred; hence, the direct application of existing word alignment tools does not work well for detecting translation errors.
|
| 33 |
+
|
| 34 |
+
In this paper, we utilize Optimal Transport problem (Villani, 2009; Cuturi, 2013) and propose OT-TAWA, an Optimal Transport Adaptive Word Aligner that is specifically tailored to aligning words for the pathological cases where significant hallucination and omission errors are present. Our approach explicitly models the missing alignments by introducing a "null" vector. Specifically, we propose a novel one-side constrained Optimal Transport (OT) problem, which allows the null vector to be adaptively aligned to any number of words. Moreover, we set the null vector as a centric point, which is not biased during the computation of the OT problem. We show an example of our OT-based method in Figure 1.
|
| 35 |
+
|
| 36 |
+
We conduct extensive experiments using the newly proposed HalOmi benchmark (Dale et al., 2023b), designed for hallucination and omission detection, across a total of 18 language pairs. Results show that our word aligner-based approach, equipped with OTTAWA, performs on par with state-of-the-art internal and external detection methods (Guerreiro et al., 2023b; Dale et al., 2023a). In contrast to previous approaches, we
|
| 37 |
+
|
| 38 |
+
show that our method can distinguish between hallucination and omission errors, while OTTAWA being crucial for performances compared to using existing word aligners.
|
| 39 |
+
|
| 40 |
+
# 2 Related Work
|
| 41 |
+
|
| 42 |
+
Hallucination remains a persistent concern in machine translation systems, which have recently gained increased attention in the field. Zhou et al. (2021) studied token-level hallucinations in machine translation on a Chinese-English dataset, which they constructed by randomly corrupting some tokens in the translation sentences. Guerreiro et al. (2023c) developed a dataset of 3.4k naturally occurring German-English translations, manually annotated at both the sentence and token levels for hallucinations and omissions detection. HalOmi (Dale et al., 2023b) expanded the language coverage for this task by manually annotating hundreds of translation pairs across 18 language pairs.
|
| 43 |
+
|
| 44 |
+
Methods for detecting hallucinations and omissions in machine translation can be broadly categorized into two types: internal, which analyzes the translation model's own outputs and states, and external, which relies on additional tools or data outside the model itself (Dale et al., 2023a). Guerreiro et al. (2023b) developed a method that employs various optimal transport-based distances (Kantorovich, 1942; Villani, 2009) to evaluate the abnormality in a machine translation (MT) model's internal cross-attention distribution of a given translation, by making comparisons with those from a collection of high-quality translations. This method not only requires access to the internal states of the MT model but also necessitates a large collection of cross-attention maps from ground truth parallel sequences for the targeted language pair.
|
| 45 |
+
|
| 46 |
+
Dale et al. (2023a) investigated the use of other internal MT model components, such as length-normalized sequence log-probability (SeqLogprob) and the token-token layer-wise interaction framework (ALTI) $^{2}$ , as alternative abnormality estimators that do not require external translation data. In addition, the authors suggested directly using scores from external MT quality estimator models, such as COMET-QE (Rei et al., 2020), or employing the cosine similarity between the source and translation as generated by cross-lingual sentence similarity models, including LASER (Heffer
|
| 47 |
+
|
| 48 |
+
nan et al., 2022), LaBSE (Feng et al., 2022).
|
| 49 |
+
|
| 50 |
+
Word alignment (Brown et al., 1993a,b) has been extensively studied over the years in both cross-lingual (Nagata et al., 2020; Dou and Neubig, 2021) and monolingual (Nagata et al., 2020; Lan et al., 2021) settings. The task is approached with supervised learning methods (Och and Ney, 2003; Östling and Tiedemann, 2016), which require sentence-level parallel data, as well as unsupervised methods that do not rely on such data. The latter approach involves leveraging token-token attention matrices (Ghader and Monz, 2017; Zenkel et al., 2020; Zhang and van Genabith, 2021) or pairwise similarity matrices between tokens' embedding vectors (Sabet et al., 2020; Azadi et al., 2023), both extracted from a multilingual pretrained language models (Devlin et al., 2019; Conneau et al., 2020). The application of Optimal Transport (OT, Monge, 1781; Kantorovich, 1942; Villani, 2009; Cuturi, 2013) in natural language processing tasks was mainly focused on similarity estimation between textual segments (Huang et al., 2016; Alqahtani et al., 2021; Lee et al., 2022; Mysore et al., 2022), and more recently for word alignment (Azadi et al., 2023; Arase et al., 2023).
|
| 51 |
+
|
| 52 |
+
# 3 Method
|
| 53 |
+
|
| 54 |
+
We formulate the unsupervised word alignment task in § 3.1, and then provide an overview on how standard and partial optimal transport are employed to address the task in § 3.2 and § 3.3, respectively. In § 3.4, we describe our newly proposed optimal transport word aligner, OTTAWA, specifically adapted to enhance the detection of MT hallucinations and omissions.
|
| 55 |
+
|
| 56 |
+
# 3.1 Unsupervised Word Alignment
|
| 57 |
+
|
| 58 |
+
Given a source word sequence $s = [s_1, \ldots, s_m]$ and a target word sequence $t = [t_1, \ldots, t_n]$ , let $E^{(s)} = [e_1^{(s)}, \ldots, e_m^{(s)}] \in \mathbb{R}^{m \times D}$ and $E^{(t)} = [e_1^{(t)}, \ldots, e_n^{(t)}] \in \mathbb{R}^{n \times D}$ be the embedding matrices for the source and target sequences, respectively, where $D$ is the dimensionality of the embeddings. A cost matrix $C \in \mathbb{R}^{m \times n}$ is defined such that $C_{i,j}$ is the cosine distance between the $i$ -th source vector and the $j$ -th target vector.
|
| 59 |
+
|
| 60 |
+
The goal is to compute the alignment matrix $\Gamma \in \{0,1\}^{m\times n}$ , where $\Gamma_{i,j} = 1$ if the $i$ -th source word is aligned to the $j$ -th target word, such that the aligned words have the smallest distance in the cost matrix $C$ . A straightforward approach to obtain
|
| 61 |
+
|
| 62 |
+
$\Gamma$ involves making greedy decisions on each word alignment in both forward (source-to-target) and reverse (target-to-source) directions. Specifically, given the cost matrix $C$ , the forward alignment $\Gamma_{i,j}^{(F)}$ can be obtained by:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\Gamma_ {i, j} ^ {(F)} = \left\{ \begin{array}{l l} 1, & \text {i f} j = \operatorname {a r g m i n} _ {j} C _ {i, j} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {1}
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
and similarly, the reverse alignment $\Gamma_{i,j}^{(R)}$ is computed by:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\Gamma_ {i, j} ^ {(R)} = \left\{ \begin{array}{l l} 1, & \text {i f} i = \operatorname {a r g m i n} _ {i} C _ {i, j} \\ 0, & \text {o t h e r w i s e} \end{array} \right. \tag {2}
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
The final alignment matrix $\Gamma$ is obtained by taking the element-wise multiplication of $\Gamma^{(F)}$ and $\Gamma^{(R)}$ . However, Sabet et al. (2020) found that greedy decisions tend to ignore the word pairs of relatively lower similarity. Therefore, the authors propose to formulate the word alignment as an assignment problem (Kuhn, 1955), which consequently involves solving the following optimization problem:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\Gamma^ {*} = \underset {\Gamma \in U ^ {(A)}} {\arg \min } \sum_ {i, j} C _ {i, j} \Gamma_ {i, j} \tag {3}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $U^{(A)} = \{\Gamma \in \{0,1\}^{m\times n}:\Gamma \mathbf{1}_n\leq$ $\mathbf{1}_n,\Gamma^\top \mathbf{1}_m\leq \mathbf{1}_m,\sum_{i,j}\Gamma_{i,j} = \min (m,n)\}$ is the set of all binary matrices with the sum of row and column equal to 1. The optimization in Eq. 3 can be solved by linear programming (Bourgeois and Lassalle, 1971).
|
| 81 |
+
|
| 82 |
+
# 3.2 Standard Optimal Transport
|
| 83 |
+
|
| 84 |
+
Chi et al. (2021) have noticed that binary assignments obtained by Eq. 3 pose challenges when aligning source and target texts of markedly different lengths. This is because the binary assignment assumes that each word in the shorter text corresponds to a word in the longer text, while the additional words in the longer text remain unaligned. To address this issue, Chi et al. (2021); Dou and Neubig (2021) leverage standard optimal transport as an alternative solution for word alignment. The goal is to compute a matrix $P^{*} \in \mathbb{R}_{+}^{m \times n}$ as follows:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
P ^ {*} = \underset {P \in U ^ {(O)}} {\arg \min } \sum_ {i, j} C _ {i, j} P _ {i, j} \tag {4}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $U^{(O)} = \{P\in \mathbb{R}_+^{m\times n}:P\mathbf{1}_n = \pmb {\mu},P^\top \mathbf{1}_m = \pmb {\nu}\}$ $\pmb {\mu} = (1 / m,\dots ,1 / m)$ and
|
| 91 |
+
|
| 92 |
+
$\pmb{\nu} = (1/n, \dots, 1/n)$ . The binary matrix $\Gamma$ can be obtained by replacing the cost matrix $C$ with the matrix $P^*$ in Eq. 1 and Eq. 2, followed by performing element-wise multiplication on the resultant matrices. It is important to note that standard OT strictly requires the use of marginal constraints on $\pmb{\mu}$ and $\pmb{\nu}$ , which enforce the alignment of each source or target word. Therefore, computing forward and reverse alignments is crucial for performance, as these computations implicitly model null alignments. This necessity arises because standard OT-based word alignment assumes that there is a one-to-one mapping between each word in the source sequence and a corresponding word in the target sequence, and vice versa.
|
| 93 |
+
|
| 94 |
+
# 3.3 Partial Optimal Transport
|
| 95 |
+
|
| 96 |
+
The one-to-one mapping assumption of standard OT is not always applicable, particularly in tasks with unbalanced source-target word alignments, such as monolingual text summarization. In response, Arase et al. (2023) introduce partial optimal transport (Peyre et al., 2016; Chapel et al., 2020) word aligner that relaxes the one-to-one mapping assumption, explicitly allowing for source or target words to remain naturally unaligned. In their setting, the transport map $P$ can be found by solving the optimization problem as in Eq. 4 but with different constraints:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\begin{array}{l} U ^ {(P)} = \left\{P \in \mathbb {R} _ {+} ^ {m \times n}: P \mathbf {1} _ {n} \leq \boldsymbol {\mu}, \right. \\ P ^ {\top} \mathbf {1} _ {m} \leq \nu , \sum_ {i, j} P _ {i, j} = m \} \tag {5} \\ \end{array}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
where $\pmb{\mu}$ and $\pmb{\nu}$ are uniform distributions, $m\in (0,1)$ is a hyperparameter controlling how many source and target words are aligned. Then, a threshold $\tau$ is used to obtain the binary alignment matrix $\Gamma$ from the matrix $P$ . Although the partial OT-based drops the strong assumption of the standard OT, it requires extensive search over the hyperparameters $m$ and $\tau$ to determine whether a source and target word are considered aligned or not. Furthermore, the conditions in Eq. 5 favor the alignment of closely similar words, because the marginal constraints for either side are not guaranteed. Consequently, this promotes a high recall for alignments at the expense of precision when source and target words are not highly similar.
|
| 103 |
+
|
| 104 |
+
# 3.4 OTTAWA
|
| 105 |
+
|
| 106 |
+
Accurately identifying unaligned words in the target text is crucial for detecting MT hallucina-
|
| 107 |
+
|
| 108 |
+
tions. Similarly, identifying unaligned words in the source text enhances the detection of omissions. We propose explicitly handle null alignments as a mapping to special null words, denoted as $\mathrm{s}_{m+1}$ and $\mathrm{t}_{n+1}$ , which are appended to the source s and target t sequences, respectively. We denote the embeddings corresponding to $\mathrm{s}_{m+1}$ and $\mathrm{t}_{n+1}$ as $e_{m+1}^{(s)}$ and $e_{n+1}^{(t)}$ , respectively. Our approach addresses forward and reverse alignments separately, yet employs the same method for both. Therefore, we describe how $\Gamma^{(R)}$ is obtained, as $\Gamma^{(F)}$ can be derived analogously. It is important to note that in performing a reverse alignment, only $e_{m+1}^{(s)}$ is appended to $E^{(s)}$ , while $E^{(t)}$ remains unchanged, and vice versa for forward alignment.
|
| 109 |
+
|
| 110 |
+
Let $e_{m+1}^{s}$ be denoted as $e^{(\varnothing)}$ hereafter for simplicity. So far, $e^{(\varnothing)}$ can be any vector but to make the OT problem meaningful, we need to impose constraints on the distance between $e^{(\varnothing)}$ and the target word vectors $E^{(t)}$ . Firstly, $e^{(\varnothing)}$ should be equidistant to every target vector to avoid bias. In addition, these equal distances should be of the same scale as the average pair-wise distances between the source and target vectors to avoid aggressive alignment to $e^{(\varnothing)}$ .
|
| 111 |
+
|
| 112 |
+
To this end, we extend the cost matrix $C$ to $\bar{C} \in \mathbb{R}^{(m + 1) \times n}$ , where $\bar{C}_{i,j} = C_{i,j}$ for $i \in [1,m]$ and $\bar{C}_{m + 1,j} = d$ , where $d$ is the distance between $e^{(\varnothing)}$ and the target word representations (by our assumption, it is the same for all target words). One can define $d$ in multiple ways. For example, a natural choice is to use the mean of pair-wise distances between the source and target vectors. However, we choose to use the median over the mean to avoid the influence of the outliers. It is also based on the intuition that $e^{(\varnothing)}$ should serve as a centric point, which is not biased during the computation of the optimal transport map.
|
| 113 |
+
|
| 114 |
+
For $e^{(\varnothing)}$ to be realizable in the vector space $\mathbb{R}^D$ , the equal distance $d$ has a lower bound $d_{\mathrm{min}}$ (see Appendix A). We finally define $d = \max(d_{\mathrm{min}}, c)$ , where $c$ is the median of all pair-wise distances between the source and target words. We reformulate the optimization problem for the transport map in Eq. 4 by replacing the cost matrix $C$ with $\bar{C}$ and relaxing the constraints as follows:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\begin{array}{l} U ^ {(\varnothing , R)} = \left\{P \in \mathbb {R} _ {+} ^ {(m + 1) \times n}: P \mathbf {1} _ {n} \leq \boldsymbol {\mu} ^ {\prime}, \right. \tag {6} \\ P ^ {\top} \mathbf {1} _ {m + 1} = \boldsymbol {\nu} \} \\ \end{array}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\pmb{\mu}^{\prime} = (\pmb{\mu},1)$ allows $e^{(\varnothing)}$ to have a maximum marginal of 1, and to be aligned with any number
|
| 121 |
+
|
| 122 |
+
of target vectors. We denote the solution of this optimization problem as $P^{(\varnothing, R)}$ . The reverse alignment matrix $\Gamma^{(R)}$ is computed as in Eq. 2 by replacing $C$ with $P^{(\varnothing, R)}$ . The forward alignment matrix $\Gamma^{(F)}$ is computed analogously. The final alignment matrix $\Gamma$ is obtained by taking the element-wise product between $\Gamma^{(F)}$ and $\Gamma^{(R)}$ .
|
| 123 |
+
|
| 124 |
+
Our optimization problem in the set of Eq. 6 is a special case of partial optimal transport, it combines the properties of Eq. 4 and Eq. 5. For example, in the computation of $\Gamma^{(R)}$ , we relax the marginal constraint on the source side, a necessity given that the marginal for $e^{(\varnothing)}$ can range between 0 and 1. As a result, the model has the freedom to adaptively decide whether or not to make null alignment based on our defined median distance $d$ . Conversely, the marginal constraint on the target side remains unchanged, ensuring that each target vector is compared with the centric point $e^{(\varnothing)}$ .
|
| 125 |
+
|
| 126 |
+
To apply word alignment for hallucination and omission detections, we propose to analyze the number of non-aligned words from the final alignment matrix $\Gamma$ . For both source and target sentences, we obtain the ratio of the misaligned words, given by:
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
r ^ {(R)} = \frac {1}{m} \sum_ {i = 1} ^ {m} \mathbb {I} \left(\sum_ {j = 1} ^ {n} \Gamma_ {i, j} > 0\right) \tag {7}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
r ^ {(F)} = \frac {1}{n} \sum_ {j = 1} ^ {n} \mathbb {I} \left(\sum_ {i = 1} ^ {m} \Gamma_ {i, j} > 0\right) \tag {8}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $\mathbb{I}(\cdot)$ is the indicator function. Further, we accumulate the transported mass to $e^{(\varnothing)}$ as the confidence of missing alignments, given by:
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
c ^ {(R)} = \frac {1}{n} \sum_ {j = 1} ^ {n} P _ {m + 1, j} ^ {(\varnothing , R)}; c ^ {(F)} = \frac {1}{m} \sum_ {i = 1} ^ {m} P _ {i, n + 1} ^ {(\varnothing , F)}
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
The combined score $r^{(R)} + c^{(R)}$ is used to detect hallucinations, and $r^{(F)} + c^{(F)}$ is for omissions.
|
| 143 |
+
|
| 144 |
+
# 4 Experimental Setup
|
| 145 |
+
|
| 146 |
+
# 4.1 Datasets and Evaluation Metrics
|
| 147 |
+
|
| 148 |
+
We conducted experiments using the recently proposed HalOmi benchmark (Dale et al., 2023b), which contains manually annotated data for MT hallucination and omission detection across 18 language pairs. It is constructed by pairing English sentences with translations in 5 high-resource languages (ar:Arabic, ru:Russian, es:Spanish,
|
| 149 |
+
|
| 150 |
+
de:German, and zh:Mandarin) and 3 lowresource languages (ks:Kashmiri, mni:Manipuri, and yo:Yoruba), and a one zero-shot SpanishYoruba pair. Each language pair includes between 145 to 197 examples, totaling 2,865 overall. Each example is annotated with 4 labels: no, small, partial, and full hallucination, with a similar scheme applied for omissions. Therefore, we utilized the multi-class ROC AUC variant, as defined in HalOmi (Dale et al., 2023b).
|
| 151 |
+
|
| 152 |
+
# 4.2 Baselines and Models
|
| 153 |
+
|
| 154 |
+
We conduct experiments to compare internal and external approaches for detecting hallucinations and omissions in MT, alongside our newly proposed word aligner-based approach. More precisely, consider Seq-Logprob, ALTI, $\mathrm{ALTI}^{\mathrm{T}}$ , and ATT-OT (originally proposed by (Guerreiro et al., 2023b)). Similarly, for external approaches, we report results from MT quality estimators LaBSE (Feng et al., 2022) and BLASER-QE (Barrault et al., 2023), as they are the best performers in this category according to (Dale et al., 2023b). We refer the readers to (Dale et al., 2023b) for a detailed of these baselines.
|
| 155 |
+
|
| 156 |
+
# 4.3 Implementation Details
|
| 157 |
+
|
| 158 |
+
Our implementation is based on PyTorch (Paszke et al., 2019), and we use the POT library for all the Optimal Transport-based methods. For the entropy-regulated O (including the standard OT and partial OT), there is a regularization parameter $\epsilon$ that controls the sparsity of the OT solution, where 0.1 is the default value. In our experiments, we set $\epsilon$ to a low value of 0.05 to encourage the confidence of the sovler. However, we observed that the performance is not sensitive, but an overly small $\epsilon$ may lead to numerical instability.
|
| 159 |
+
|
| 160 |
+
In all experiments, we adopt a word-level representation approach which is consistent with standard practices in word alignment task (Sabet et al., 2020; Azadi et al., 2023). Specifically, we first generate token-level representations for each token in the sequence and establish a token-to-word index mapping. Then, we apply mean pooling to average the tokens representations corresponding to the same word, resulting in word-level representations. In our main experiment uses the representations of the last layer of LaBSE (Feng et al.,
|
| 161 |
+
|
| 162 |
+
<table><tr><td rowspan="2" colspan="2">Source Lang</td><td colspan="7">Hallucination</td><td colspan="7">Omission</td></tr><tr><td>I1</td><td>I2</td><td>I3</td><td>I4</td><td>E1</td><td>E2</td><td>Our</td><td>I1</td><td>I2</td><td>I3</td><td>I4</td><td>E1</td><td>E2</td><td>Our</td></tr><tr><td rowspan="10">High Resource</td><td>en-ar</td><td>89</td><td>78</td><td>54</td><td>36</td><td>84</td><td>90</td><td>93</td><td>63</td><td>44</td><td>76</td><td>64</td><td>79</td><td>85</td><td>79</td></tr><tr><td>ar-en</td><td>83</td><td>75</td><td>72</td><td>51</td><td>88</td><td>94</td><td>90</td><td>56</td><td>49</td><td>82</td><td>72</td><td>83</td><td>77</td><td>70</td></tr><tr><td>en-ru</td><td>95</td><td>36</td><td>37</td><td>61</td><td>86</td><td>89</td><td>91</td><td>53</td><td>56</td><td>79</td><td>75</td><td>85</td><td>84</td><td>85</td></tr><tr><td>ru-en</td><td>86</td><td>76</td><td>56</td><td>55</td><td>83</td><td>92</td><td>99</td><td>59</td><td>52</td><td>86</td><td>76</td><td>76</td><td>80</td><td>89</td></tr><tr><td>en-es</td><td>87</td><td>85</td><td>69</td><td>59</td><td>88</td><td>85</td><td>88</td><td>39</td><td>31</td><td>89</td><td>89</td><td>86</td><td>80</td><td>87</td></tr><tr><td>es-en</td><td>92</td><td>89</td><td>67</td><td>37</td><td>94</td><td>87</td><td>87</td><td>61</td><td>50</td><td>59</td><td>66</td><td>73</td><td>71</td><td>73</td></tr><tr><td>en-de</td><td>85</td><td>97</td><td>69</td><td>55</td><td>97</td><td>87</td><td>88</td><td>50</td><td>46</td><td>77</td><td>74</td><td>66</td><td>85</td><td>81</td></tr><tr><td>de-en</td><td>90</td><td>80</td><td>59</td><td>65</td><td>95</td><td>97</td><td>96</td><td>48</td><td>38</td><td>82</td><td>83</td><td>70</td><td>70</td><td>74</td></tr><tr><td>en-zh</td><td>88</td><td>82</td><td>47</td><td>60</td><td>86</td><td>78</td><td>88</td><td>60</td><td>51</td><td>73</td><td>67</td><td>69</td><td>88</td><td>92</td></tr><tr><td>zh-en</td><td>89</td><td>88</td><td>65</td><td>46</td><td>88</td><td>87</td><td>86</td><td>73</td><td>61</td><td>77</td><td>64</td><td>75</td><td>73</td><td>77</td></tr><tr><td colspan="2">Avg. High Resource</td><td>88</td><td>78</td><td>59</td><td>53</td><td>89</td><td>89</td><td>91</td><td>54</td><td>46</td><td>78</td><td>74</td><td>76</td><td>80</td><td>81</td></tr><tr><td rowspan="6">Low Resource</td><td>en-ks</td><td>68</td><td>71</td><td>74</td><td>54</td><td>76</td><td>81</td><td>78</td><td>50</td><td>52</td><td>90</td><td>81</td><td>76</td><td>77</td><td>84</td></tr><tr><td>ks-en</td><td>59</td><td>67</td><td>65</td><td>65</td><td>57</td><td>73</td><td>56</td><td>36</td><td>50</td><td>64</td><td>63</td><td>59</td><td>45</td><td>70</td></tr><tr><td>en-mni</td><td>68</td><td>81</td><td>49</td><td>54</td><td>80</td><td>83</td><td>59</td><td>45</td><td>52</td><td>80</td><td>73</td><td>82</td><td>80</td><td>69</td></tr><tr><td>mni-en</td><td>70</td><td>64</td><td>49</td><td>56</td><td>56</td><td>78</td><td>64</td><td>42</td><td>33</td><td>68</td><td>63</td><td>52</td><td>74</td><td>77</td></tr><tr><td>en-yo</td><td>77</td><td>74</td><td>59</td><td>65</td><td>56</td><td>79</td><td>80</td><td>77</td><td>50</td><td>70</td><td>72</td><td>65</td><td>67</td><td>86</td></tr><tr><td>yo-en</td><td>78</td><td>72</td><td>54</td><td>43</td><td>66</td><td>80</td><td>65</td><td>68</td><td>60</td><td>65</td><td>55</td><td>66</td><td>56</td><td>68</td></tr><tr><td colspan="2">Avg. Low Resource</td><td>70</td><td>71</td><td>57</td><td>56</td><td>66</td><td>79</td><td>67</td><td>53</td><td>49</td><td>73</td><td>68</td><td>67</td><td>67</td><td>76</td></tr><tr><td rowspan="2">Zero-Shot</td><td>yo-es</td><td>60</td><td>65</td><td>47</td><td>44</td><td>56</td><td>57</td><td>54</td><td>62</td><td>47</td><td>85</td><td>69</td><td>62</td><td>66</td><td>76</td></tr><tr><td>es-yo</td><td>61</td><td>66</td><td>52</td><td>55</td><td>66</td><td>68</td><td>65</td><td>68</td><td>50</td><td>83</td><td>60</td><td>69</td><td>67</td><td>80</td></tr><tr><td colspan="2">Avg. Zero-Shot</td><td>60</td><td>66</td><td>49</td><td>49</td><td>61</td><td>63</td><td>59</td><td>65</td><td>48</td><td>84</td><td>65</td><td>66</td><td>67</td><td>78</td></tr><tr><td colspan="2">Avg. HalOmi</td><td>79</td><td>75</td><td>57</td><td>53</td><td>78</td><td>83</td><td>79</td><td>56</td><td>48</td><td>77</td><td>70</td><td>72</td><td>74</td><td>79</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Table 1: Methods performances (ROC AUC) on hallucination and omission detection across HalOmi's high-resource, low-resource, and zero-shot sets. Bold entries describe the best results among all methods, which we categorize under 3 approaches: $\underline{\mathcal{I}}$ internal, $\underline{\mathcal{E}}$ external, and Our word alignment. $\mathcal{I}1, \mathcal{I}2, \mathcal{I}3, \mathcal{I}4$ : Seq-Logprob, ALTI, $\mathrm{ALTI}^{\mathrm{T}}$ , and ATT-OT. $\mathcal{E}1, \mathcal{E}2$ : LaBSE and BLASER-QE MT quality estimators. Our: OTTAWA using LaBSE token embeddings. All scores are scaled within the range of [0, 100] following (Dale et al., 2023b).
|
| 165 |
+
|
| 166 |
+
2022). When experimenting with other models, we use the hidden representation of the 8th layer of mBERT (Devlin et al., 2019) and XLMR (Connieu et al., 2020), respectively, following (Dou and Neubig, 2021; Chi et al., 2021; Azadi et al., 2023).
|
| 167 |
+
|
| 168 |
+
Our OTTAWA, PMIAign, and the standard OT do need extra hyper-parameters to determine word alignments. However, for partial OT, we set $m = 0.5$ and tested a few thresholds. Specifically, we set $\tau$ to 0.1, 0.05, and 0.025 of the maximal value in marginal $\mu$ and $\nu$ , given by $\max(1/m, 1/n)$ , and used the best threshold 0.05 to report the scores. To obtain the hallucination and omission, all baseline aligners use the reverse missing alignment ratio
|
| 169 |
+
|
| 170 |
+
Eq. 7 to estimate hallucination and use Eq. 8 to obtain omission scores.
|
| 171 |
+
|
| 172 |
+
# 5 Results
|
| 173 |
+
|
| 174 |
+
# 5.1 Sentence-Level Detection
|
| 175 |
+
|
| 176 |
+
Table 1 shows the performances of methods across 3 approaches for hallucination and omission detection across HalOmi's 18 language pairs: 4 methods representing the internal approach, 2 for the external approach, and 1 showcasing our newly introduced word alignment approach. The latter approach employs our OTTAWA word aligner, which leverages LaBSE to obtain token-level representations.
|
| 177 |
+
|
| 178 |
+
Although our method performs best on only 5 out of 18 language pairs for hallucination and 7 out of 18 for omission, it outperforms other methods in terms of overall average performance. More precisely, we outperform all baselines in high-resource languages for both hallucination and omission detection. However, we underperform in low-resource languages (except for omission detection) and zero-shot language pairs. Overall, although we underperform by $4\%$ compared to BLASER-QE $(\mathcal{E}2)$ on average hallucination detection across the 18 language pairs, we surpass that model by $5\%$ on omission. It is worth mentioning that BLASER-QE is a strong baseline, it is an MT quality estimator that leverages the SONAR (Duquenne et al., 2023) sentence embeddings. It was carefully tuned on 123.4k source-translation pairs, derived from outputs of 24 MT systems and covering 62 language pairs, all manually labeled by humans for MT quality estimation.
|
| 179 |
+
|
| 180 |
+
However, our method significantly improves upon LaBSE (E2), another MT quality estimator. While we report close tight (1% gain on HalOmi average) on hallucination, we significantly outperform it by 6% on omission. These results demonstrate that LaBSE's token-level representations contain more expressive information for detecting omissions compared to the scalar values generated for MT quality estimation.
|
| 181 |
+
|
| 182 |
+
Finally, we observe that our method provides consistent and balanced performance in detecting both hallucinations and omissions compared to internal methods. For instance, although Seq-Logprob (1) matches our method on hallucinations, it significantly underperforms compared to us by $23\%$ on omissions. Similarly, $\mathrm{ALTI}^{\mathrm{T}}(\mathcal{I}3)$ has the smallest gap $(2\%)$ with our method on omission but performs poorly, achieving only $57\%$ compared to our method's $79\%$ , on hallucination.
|
| 183 |
+
|
| 184 |
+
# 5.2 Ablation Study
|
| 185 |
+
|
| 186 |
+
We conduct ablation studies on our approach, testing variants that modify its two key components: the Embedding vector representation model and the word Aligner. Table 2 presents the average scores for both HalOmi high-resource (HR) and low-resource (LR) language pair clusters, along with the overall average. The complete results across the 18 language pairs are presented in Table 5 in Appendix B.
|
| 187 |
+
|
| 188 |
+
<table><tr><td></td><td colspan="3">Hallucination</td><td colspan="3">Omission</td></tr><tr><td></td><td>HR</td><td>LR</td><td>Avg</td><td>HR</td><td>LR</td><td>Avg</td></tr><tr><td>Embedding</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>mBERT</td><td>87</td><td>56</td><td>73</td><td>81</td><td>69</td><td>76</td></tr><tr><td>XLMR</td><td>88</td><td>53</td><td>71</td><td>78</td><td>64</td><td>72</td></tr><tr><td>LaBSE</td><td>91</td><td>67</td><td>79</td><td>81</td><td>76</td><td>79</td></tr><tr><td>Aligner</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SimAlign</td><td>47</td><td>55</td><td>51</td><td>70</td><td>62</td><td>66</td></tr><tr><td>PMIAign</td><td>81</td><td>61</td><td>72</td><td>82</td><td>71</td><td>78</td></tr><tr><td>OT</td><td>81</td><td>60</td><td>72</td><td>82</td><td>74</td><td>79</td></tr><tr><td>POT</td><td>64</td><td>52</td><td>57</td><td>73</td><td>60</td><td>68</td></tr><tr><td>OTTAWA</td><td>91</td><td>67</td><td>79</td><td>81</td><td>76</td><td>79</td></tr></table>
|
| 189 |
+
|
| 190 |
+
Table 2: Hallucation and omission detection average AUC scores on HalOmi's high-resource (HR) and lowresource (LR) languages. Embeddings refer to the results obtained by testing OTTAWA with token embeddings from various models. Aligner are the results when employing different word aligners, all utilizing LaBSE embeddings.
|
| 191 |
+
|
| 192 |
+
Embedding We conduct experiments with OT-TAWA, utilizing embeddings derived from unsupervised pre-trained models such as mBERT (Devlin et al., 2019) and XLM-R (Conneau et al., 2020). These models are commonly used in crosslingual word alignment (Sabet et al., 2020; Azadi et al., 2023). We notice that OT-TAWA with LaBSE representations significantly outperforms the best unsupervised representation baseline (mBERT) by $6\%$ and $3\%$ on the overall HalOmi average score on hallucination and omission, respectively. This is expected given that LaBSE representations are more task-specific than those from unsupervised models, having been extensively fine-tuned for translation pair quality estimation using carefully curated data for low-resource languages.
|
| 193 |
+
|
| 194 |
+
Consequently, the performance gap between LaBSE and models such as mBERT is larger in low-resource languages (11% and %3 on omissions) compared to high-resource languages (4% and 0% on hallucinations). Overall, the results are promising, demonstrating that hallucinations and omissions can be detected even without access to the MT system or a robust MT quality estimator. This approach serves as an acceptable alternative, particularly in high-resource settings. However, its performance in low-resource languages necessitates further investigation.
|
| 195 |
+
|
| 196 |
+
Aligner We compared OTTAWA with state-of-the-art word aligner methods, including SimAlign (Sabet et al., 2020) (Itermax), PMI
|
| 197 |
+
|
| 198 |
+
Align (Azadi et al., 2023), standard OT (Chi et al., 2021; Dou and Neubig, 2021), and POT (Arase et al., 2023), all utilizing LaBSE representations.
|
| 199 |
+
|
| 200 |
+
We first observe that the standard alignment methods work reasonably well on detecting omissions but not hallucinations. This is an understandable outcome, which can be explained as follows: 1) the hallucinated translations often contain a significant amount of "detached" words. For example, the word "cat" may be translated to "dog". This is particularly problematic for standard alignment methods as they assume the word "cat" should have a corresponding word in the translation, resulting in aligning "cat" to "dog" nevertheless. 2) the omission errors in the HalOmi dataset are often early terminated translations. In this case, the translated words are still mapped to the source words, and the standard methods are still able to align the existing words and detect the omission errors.
|
| 201 |
+
|
| 202 |
+
However, only our method works well in the detection of both hallucinations and omissions, where there is a $7\%$ overall average improvement over both PMIAign and standard OT in hallucination errors. This outcome is consistent with our motivation that the common assumption among standard word-alignment tools, which is that a mapping exists between all source and target words, prevents them from effectively identifying all errors.
|
| 203 |
+
|
| 204 |
+
# 5.3 Distinguish Hallucination and Omission
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 2: LaBSE cosine similarity score (y-axis) of samples, aggregated across 10 high-resource datasets, with either hallucination (red triangles) or omission (blue circles) as gold labels. The x-axis shows the sample count index.
|
| 208 |
+
|
| 209 |
+
Figure 2 shows LaBSE cosine similarity scores for samples with either hallucination or omission
|
| 210 |
+
|
| 211 |
+
labels, aggregated from the 10 high-resource language pairs datasets. We only focus on high-resource languages, given that the performance of all methods significantly diminishes with low-resource ones. The primary goal of this experiment is to study the models' abilities to differentiate between types of errors. Although LaBSE quality estimator can effectively detect both hallucinations and omissions, the figure clearly shows that it fails to distinguish between them. The majority of samples for both hallucinations and omissions exhibit cosine similarity scores below $-0.8$ .
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 3: Hallucination scores (x-axis) and Omission scores (y-axis) produced by our OTTAWA across the same samples used in Figure 2. The dotted green line simply illustrates the diagonal.
|
| 215 |
+
|
| 216 |
+
Figure 3 shows the hallucination (x-axis) and omission (y-axis) scores produced by OT-TAWA(using LaBSE embeddings), on the same samples used in Figure 2. The figure demonstrates that our approach effectively distinguishes between omission and hallucination errors, with omission errors concentrated below the diagonal, and hallucination errors concentrated above it. In most cases, our word alignment approach, which operates without any supervision signal, accurately distinguishes omissions from hallucinations, and vice versa. This unique feature offered by our approach can help researchers to precisely diagnose and comprehend error types in MT systems, thereby facilitating more efficient development and the implementation of targeted solutions.
|
| 217 |
+
|
| 218 |
+
# 5.4 Word-Level Detection
|
| 219 |
+
|
| 220 |
+
Following the experimental setup in (Dale et al., 2023b), we evaluate our OTTAWA for word-level hallucination and omission detection. Table 3 com
|
| 221 |
+
|
| 222 |
+
pares its performance with the best internal approach baselines identified in their study: LogProb (the Stand. variant) and ALTI (the sum variant). It is worth noting that the LogProb and ALTI baselines are different from those in Table 1 despite the name resemblance. Specifically, ALTI is a combination of two baselines from Table 1: ALTI (hallucination results), and $\mathrm{ALTIT}^{\mathrm{T}}$ (omission results). Conversely, the LogProb baseline is obtained by processing the sentence pairs through the MT model twice (once for the source and once for the target), unlike SeqLogProb in Table 1, which involves only one pass.
|
| 223 |
+
|
| 224 |
+
<table><tr><td rowspan="2"></td><td colspan="3">Hallucination</td><td colspan="3">Omission</td></tr><tr><td>HR</td><td>LR</td><td>Avg</td><td>HR</td><td>LR</td><td>Avg</td></tr><tr><td>LogProb</td><td>73</td><td>66</td><td>70</td><td>84</td><td>71</td><td>78</td></tr><tr><td>ALTI</td><td>87</td><td>69</td><td>78</td><td>86</td><td>69</td><td>78</td></tr><tr><td>OTTAWA</td><td>78</td><td>59</td><td>70</td><td>79</td><td>60</td><td>71</td></tr></table>
|
| 225 |
+
|
| 226 |
+
Additionally, (Dale et al., 2023b) conducted ablations with these baselines, creating two variants for each: Standard and Contrastive for LogProb, and Mean and Max for ALTI. In Table 3, we report only the results for the best-performing variant of each baseline. Results indicate that word-level detection poses a greater challenge for our approach, which significantly under-performs compared to the best baseline (ALTI) by $8\%$ and $7\%$ in the overall average for hallucination and omission detection, respectively. However, we find the results encouraging when considering that unsupervised world-level detection with current state-of-the-art methods was not feasible without white-box access to the MT system, as external approaches operate on sentence level only.
|
| 227 |
+
|
| 228 |
+
# 5.5 Word Alignment
|
| 229 |
+
|
| 230 |
+
We run experiments on cross-lingual word alignment using 6 datasets, as in SimAlign (Sabet et al., 2020) and PMIAAlign (Azadi et al., 2023), with gold word alignment labels. We include English-Czech (en-cs) (Mareček, 2011), German-English (de-en) (Koehn, 2005), English-Persian (en-fa) (Tavakoli and Faili, 2014), English-French (en-fr) (Och and Ney, 2000), English-Hindi (en-hi) (Koehn et al., 2005) and Romanian-English (ro-en) (Mihalcea and Pedersen, 2003) language
|
| 231 |
+
|
| 232 |
+
pairs. For evaluation metrics, we utilize the standard Alignment Error Rate (AER) (Och and Ney, 2003), and aligners use the mBERT representations.
|
| 233 |
+
|
| 234 |
+
Table 3: Word-level hallucination and omission results, evaluated using the word-level ROC AUC score as defined by (Dale et al., 2023b).
|
| 235 |
+
|
| 236 |
+
<table><tr><td></td><td>en-cs</td><td>de-en</td><td>en-fa</td><td>en-fr</td><td>en-hi</td><td>ro-en</td></tr><tr><td colspan="7">Alignment Error Rate (AER) ↓</td></tr><tr><td>SimAlign</td><td>0.12</td><td>0.19</td><td>0.37</td><td>0.06</td><td>0.44</td><td>0.34</td></tr><tr><td>PMIAign</td><td>0.12</td><td>0.17</td><td>0.32</td><td>0.06</td><td>0.39</td><td>0.31</td></tr><tr><td>OT</td><td>0.12</td><td>0.17</td><td>0.32</td><td>0.06</td><td>0.39</td><td>0.39</td></tr><tr><td>POT</td><td>0.13</td><td>0.19</td><td>0.37</td><td>0.06</td><td>0.44</td><td>0.34</td></tr><tr><td>OTTAWA</td><td>0.12</td><td>0.17</td><td>0.33</td><td>0.05</td><td>0.39</td><td>0.30</td></tr></table>
|
| 237 |
+
|
| 238 |
+
Table 4: Cross-lingual word alignment performances (AER) across 6 language pairs for 5-word aligners.
|
| 239 |
+
|
| 240 |
+
As shown in Table 4, OTTAWA performs on par with another state-of-the-art word aligner on the cross-lingual alignment task. More precisely, it matches the best-performing baselines in three languages (en-cs, de-en, and en-hi), while slightly outperforming them by $1\%$ in the en-fr and ro-en language pairs. We anticipated no significant gains in word alignment, as the datasets for cross-lingual word alignment are constructed from clean translations, making null alignments less concerning.
|
| 241 |
+
|
| 242 |
+
# 6 Conclusion and Future Work
|
| 243 |
+
|
| 244 |
+
In this work, we propose a new word alignment-based approach for detecting hallucinations and omissions in MT systems. We develop OTTAWA, an innovative word aligner designed specifically for this purpose. While experiments show promise in MT hallucination and omission detection, this area remains an intriguing direction for future research exploration. We plan to focus on one-to-many alignments for pathological translations.
|
| 245 |
+
|
| 246 |
+
# 7 Limitations
|
| 247 |
+
|
| 248 |
+
Our Optimal Transport (OT)-based word alignment method relies on pretrained word embeddings, which may not be available for low and scarce resource languages. Also, the performance of our word aligner on low resources heavily depends on representations obtained from a supervised MT quality estimator, which may not be accessible or does not support certain languages. Another limitation of our study is the exclusive focus on null alignments, which are central to our task of interest. However, we do not address other complex cases such as one-to-many and many-to-many alignments.
|
| 249 |
+
|
| 250 |
+
# Acknowledgements
|
| 251 |
+
|
| 252 |
+
We thank the anonymous reviewers for their insightful comments. Osmar R. Zaiane is supported by the Amii Fellow Program.
|
| 253 |
+
|
| 254 |
+
# References
|
| 255 |
+
|
| 256 |
+
Sawsan Alqahtani, Garima Lalwani, Yi Zhang, Salvatore Romeo, and Saab Mansour. 2021. Using optimal transport as alignment objective for fine-tuning multilingual contextualized embeddings. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 3904-3919.
|
| 257 |
+
Yuki Arase, Han Bao, and Sho Yokoi. 2023. Unbalanced optimal transport for unbalanced word alignment. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3966-3986.
|
| 258 |
+
Fatemeh Azadi, Heshaam Faili, and Mohammad Javad Dousti. 2023. Pmi-align: Word alignment with pointwise mutual information without requiring parallel training data. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 12366-12377.
|
| 259 |
+
Loic Barrault, Yu-An Chung, Mariano Cora Meglioli, David Dale, Ning Dong, Paul-Ambroise Duquenne, Hady Elsahar, Hongyu Gong, Kevin Heffernan, John Hoffman, et al. 2023. Seamlessm4t-massively multilingual & multimodal machine translation. ArXiv Preprint.
|
| 260 |
+
F. Bourgeois and J. Lassalle. 1971. An extension of the munkres algorithm for the assignment problem to rectangular matrices. Communications of the ACM, 14(12):802-804.
|
| 261 |
+
Peter E Brown, Vincent J Della Pietra, Stephen A Della Pietra, and Robert L Mercer. 1993a. The mathematics of statistical machine translation: Parameter estimation. Computational Linguistics, 19(2).
|
| 262 |
+
Peter F Brown, Vincent J Della Pietra, Stephen A Della Pietra, and Robert L Mercer. 1993b. Advances in probabilistic and other parsing technologies. IBM Journal of Research and Development, 37(3):288-307.
|
| 263 |
+
Stephen L. Campbell and Carl Dean Meyer. 2009. Generalized inverses of linear transformations. Society for Industrial and Applied Mathematics.
|
| 264 |
+
Laetitia Chapel, Mokhtar Z. Alaya, and Gilles Gasso. 2020. Partial optimal transport with applications on positive-unlabeled learning. In Advances in Neural Information Processing Systems, volume 33, pages 9778-9789.
|
| 265 |
+
Zewen Chi, Li Dong, Bo Zheng, Shaohan Huang, XianLing Mao, He-Yan Huang, and Furu Wei. 2021. Improving pretrained cross-lingual language models via
|
| 266 |
+
|
| 267 |
+
self-labeled word alignment. 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 3418-3430.
|
| 268 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Édouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440-8451.
|
| 269 |
+
Marco Cuturi. 2013. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems, volume 26.
|
| 270 |
+
David Dale, Elena Voita, Loic Barrault, and Marta R. Costa-jussa. 2023a. Detecting and mitigating hallucinations in machine translation: Model internal workings alone do well, sentence similarity Even better. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 36-50.
|
| 271 |
+
David Dale, Elena Voita, Janice Lam, Prangthip Hansanti, Christophe Ropers, Elahe Kalbassi, Cynthia Gao, Loic Barrault, and Marta Costa-jussa. 2023b. HalOmi: A manually annotated benchmark for multilingual hallucination and omission detection in machine translation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 638-653.
|
| 272 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. 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 4171-4186.
|
| 273 |
+
Zi-Yi Dou and Graham Neubig. 2021. Word alignment by fine-tuning embeddings on parallel corpora. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2112-2128.
|
| 274 |
+
Paul-Ambroise Duquenne, Holger Schwenk, and Benoit Sagot. 2023. Sonar: Sentence-level multimodal and language-agnostic representations. ArXiv Preprint.
|
| 275 |
+
Fangxiaoyu Feng, Yinfei Yang, Daniel Cer, Naveen Arivazhagan, and Wei Wang. 2022. Language-agnostic bert sentence embedding. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 878-891.
|
| 276 |
+
Javier Ferrando, Gerard I Gallego, Belen Alastruey, Carlos Escolano, and Marta R Costa-jussa. 2022. Towards opening the black box of neural machine translation: Source and target interpretations of the transformer. In Proceedings of the 2022 Conference on
|
| 277 |
+
|
| 278 |
+
Empirical Methods in Natural Language Processing, pages 8756-8769.
|
| 279 |
+
Hamidreza Ghader and Christof Monz. 2017. What does attention in neural machine translation pay attention to? In Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 30-39.
|
| 280 |
+
Nuno M Guerreiro, Duarte M Alves, Jonas Waldendorf, Barry Haddow, Alexandra Birch, Pierre Colombo, and Andre FT Martins. 2023a. Hallucinations in large multilingual translation models. Transactions of the Association for Computational Linguistics, 11:1500-1517.
|
| 281 |
+
Nuno M. Guerreiro, Pierre Colombo, Pablo Piantanida, and André Martins. 2023b. Optimal transport for unsupervised hallucination detection in neural machine translation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13766-13784.
|
| 282 |
+
Nuno M Guerreiro, Elena Voita, and André FT Martins. 2023c. Looking for a needle in a haystack: A comprehensive study of hallucinations in neural machine translation. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 1059-1075.
|
| 283 |
+
Kevin Heffernan, Onur Celebi, and Holger Schwenk. 2022. Bitext mining using distilled sentence representations for low-resource languages. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 2101-2112.
|
| 284 |
+
Gao Huang, Chuan Guo, Matt J Kusner, Yu Sun, Fei Sha, and Kilian Q Weinberger. 2016. Supervised word mover's distance. Advances in Neural Information Processing Systems, 29.
|
| 285 |
+
L. V. Kantorovich. 1942. On the translocation of masses. Doklady Akademii Nauk, 37(2):227-229.
|
| 286 |
+
Philipp Koehn. 2005. Europarl: A parallel corpus for statistical machine translation. In Proceedings of Machine Translation Summit X: Papers, pages 79-86.
|
| 287 |
+
Philipp Koehn, Joel Martin, Rada Mihalcea, Christof Monz, and Ted Pedersen. 2005. Proceedings of the acl workshop on building and using parallel texts. In Proceedings of the ACL Workshop on Building and Using Parallel Texts.
|
| 288 |
+
Harold W Kuhn. 1955. The hungarian method for the assignment problem. Naval Research Logistics Quarterly, 2(1-2):83-97.
|
| 289 |
+
Wuwei Lan, Chao Jiang, and Wei Xu. 2021. Neural semi-markov crf for monolingual word alignment. 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 6815-6828.
|
| 290 |
+
|
| 291 |
+
Seonghyeon Lee, Dongha Lee, Seongbo Jang, and Hwanjo Yu. 2022. Toward interpretable semantic textual similarity via optimal transport-based contrastive sentence learning. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5969-5979.
|
| 292 |
+
David Mareček. 2011. Automatic alignment of tectogrammatical trees from czech-english parallel corpus. Univerzita Karlova, Matematicko-fyzikálnífakulta.
|
| 293 |
+
Rada Mihalcea and Ted Pedersen. 2003. An evaluation exercise for word alignment. In Proceedings of the HLT-NAACL 2003 Workshop on Building and using parallel texts: data driven machine translation and beyond, pages 1-10.
|
| 294 |
+
Gaspard Monge. 1781. Mémoire sur la théorie des déblais et des remblais. Histoire de l'Académie Royale des Sciences de Paris.
|
| 295 |
+
Mathias Müller and Rico Sennrich. 2021. Understanding the properties of minimum bayes risk decoding in 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 259-272.
|
| 296 |
+
Sheshera Mysore, Arman Cohan, and Tom Hope. 2022. Multi-vector models with textual guidance for fine-grained scientific document similarity. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4453-4470.
|
| 297 |
+
Masaaki Nagata, Katsuki Chousa, and Masaaki Nishino. 2020. A supervised word alignment method based on cross-language span prediction using multilingual bert. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 555-565.
|
| 298 |
+
Franz Josef Och and Hermann Ney. 2000. Improved statistical alignment models. In Proceedings of the 38th Annual Meeting of the Association for Computational Linguistics, pages 440-447.
|
| 299 |
+
Franz Josef Och and Hermann Ney. 2003. A systematic comparison of various statistical alignment models. Computational linguistics, 29(1):19-51.
|
| 300 |
+
Robert Östling and Jörg Tiedemann. 2016. Efficient word alignment with markov chain monte carlo. The Prague Bulletin of Mathematical Linguistics.
|
| 301 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. 2019. PyTorch: An imperative style, high-performance deep learning library. Advances in Neural Information Processing Systems, 32.
|
| 302 |
+
|
| 303 |
+
Gabriel Peyre, Marco Cuturi, and Justin Solomon. 2016. Gromov-wasserstein averaging of kernel and distance matrices. In International Conference on Machine Learning, pages 2664-2672.
|
| 304 |
+
|
| 305 |
+
Vikas Raunak, Arul Menezes, and Marcin Junczys-Dowmunt. 2021. The curious case of hallucinations in neural machine translation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1172-1183.
|
| 306 |
+
|
| 307 |
+
Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020. COMET: A neural framework for mt evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685-2702.
|
| 308 |
+
|
| 309 |
+
Masoud Jalili Sabet, Philipp Dufter, François Yvon, and Hinrich Schütze. 2020. Simalign: High quality word alignments without parallel training data using static and contextualized embeddings. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 1627-1643.
|
| 310 |
+
|
| 311 |
+
Leila Tavakoli and Heshaam Faili. 2014. Phrase alignments in parallel corpus using bootstrapping approach. International Journal of Information and Communication Technology Research.
|
| 312 |
+
|
| 313 |
+
Cédric Villani. 2009. Optimal transport: Old and new, volume 338. Springer.
|
| 314 |
+
|
| 315 |
+
Thomas Zenkel, Joern Wuebker, and John DeNero. 2020. End-to-end neural word alignment outperforms giza++. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1605-1617.
|
| 316 |
+
|
| 317 |
+
Jingyi Zhang and Josef van Genabith. 2021. A bidirectional transformer based alignment model for unsupervised word alignment. 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 283-292.
|
| 318 |
+
|
| 319 |
+
Chunting Zhou, Graham Neubig, Jiatao Gu, Mona Diab, Francisco Guzmán, Luke Zettlemoyer, and Marjan Ghazvininejad. 2021. Detecting hallucinated content in conditional neural sequence generation. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 1393-1404.
|
| 320 |
+
|
| 321 |
+
# A Equidistant Vector
|
| 322 |
+
|
| 323 |
+
Assume that we have vectors $e_1, \ldots, e_n$ in $\mathbb{R}^D$ . Here we discuss how to find an equidistant vector $e^{(\varnothing)}$ with respect to cosine distance. For that we need to solve a system of $N - 1$ equations:
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
\mathbf {d i s t} (e ^ {\emptyset}, e _ {1}) = \mathbf {d i s t} (e ^ {\emptyset}, e _ {j})
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
for all $j = 2,\ldots ,N$
|
| 330 |
+
|
| 331 |
+
Recall the definition of the cosine distance:
|
| 332 |
+
|
| 333 |
+
$$
|
| 334 |
+
\mathbf {d i s t} (x, y) = 1 - \frac {\boldsymbol {x} \cdot \boldsymbol {y}}{\| \boldsymbol {x} \| \| \boldsymbol {y} \|.}
|
| 335 |
+
$$
|
| 336 |
+
|
| 337 |
+
Hence, the system of equations we need to solve is equivalent to the system of linear equations:
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
\frac {\boldsymbol {e} ^ {\varnothing} \cdot \boldsymbol {e} _ {1}}{\| \boldsymbol {e} ^ {\varnothing} \| \| \boldsymbol {e} _ {1} \|} = \frac {\boldsymbol {e} ^ {\varnothing} \cdot \boldsymbol {e} _ {j}}{\| \boldsymbol {e} ^ {\varnothing} \| \| \boldsymbol {e} _ {j} \|}.
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
Slightly rewriting it, we get:
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
\boldsymbol {e} ^ {\varnothing} \cdot \left(\frac {\boldsymbol {e} _ {1}}{\| \boldsymbol {e} _ {1} \|} - \frac {\boldsymbol {e} _ {j}}{\| \boldsymbol {e} _ {j} \|}\right) = 0.
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
Note that usually for our word alignment problems $N < D$ , hence this system always has a solution. However, we want to find the minimum possible equal distance so that the NULL vector is meaningful for the OT task. For that, assume that $e^{(\varnothing)}$ lies in the span of the given vectors: $e^{\varnothing} = \sum_{k=1}^{N} a_k e_k$ . Inserting it in the previous system, we obtain a new homogeneous system on the coefficients $a_k$ :
|
| 350 |
+
|
| 351 |
+
$$
|
| 352 |
+
\boldsymbol {E} \boldsymbol {a} = \boldsymbol {0},
|
| 353 |
+
$$
|
| 354 |
+
|
| 355 |
+
where $E_{jk} = \pmb{e}_k\cdot \left(\frac{\pmb{e}_1}{\|\pmb{e}_1\|} -\frac{\pmb{e}_j}{\|\pmb{e}_j\|}\right)$ is a $(N - 1)\times N$ matrix. For general positions of word representation vectors, the kernel of $\pmb{E}$ is one-dimensional. Projection onto it could be computed as $I_N - E^+ E$ where $E^{+}$ is Moore-Penrose inverse and $I_N$ is $N\times N$ identity matrix (Campbell and Meyer, 2009). In this case $\pmb{a}$ will be the basis vector for the kernel subspace. After finding $\pmb{a}$ , one can construct $e^{\emptyset} = \sum_{k = 1}^{N}a_{k}e_{k}$ and compute $d_{\mathrm{min}} = \mathbf{dist}(e^{\emptyset},e_1)$ . Note that there is no equidistant vector with a smaller distance than $d_{\mathrm{min}}$ .
|
| 356 |
+
|
| 357 |
+
# B Additional Results
|
| 358 |
+
|
| 359 |
+
We present the comparisons of different word embeddings and alignment methods in Table 5.
|
| 360 |
+
|
| 361 |
+
<table><tr><td rowspan="2" colspan="2">Source Lang</td><td colspan="7">Hallucination</td><td colspan="7">Omission</td></tr><tr><td>W1</td><td>W2</td><td>W3</td><td>W4</td><td>Our</td><td>R1</td><td>W2</td><td>W1</td><td>W2</td><td>W3</td><td>W4</td><td>Our</td><td>R1</td><td>W2</td></tr><tr><td rowspan="10">High Resource</td><td>en-ar</td><td>33</td><td>64</td><td>66</td><td>65</td><td>93</td><td>85</td><td>88</td><td>56</td><td>80</td><td>82</td><td>78</td><td>79</td><td>84</td><td>81</td></tr><tr><td>ar-en</td><td>49</td><td>83</td><td>82</td><td>69</td><td>90</td><td>85</td><td>88</td><td>71</td><td>74</td><td>67</td><td>65</td><td>70</td><td>68</td><td>63</td></tr><tr><td>en-ru</td><td>31</td><td>74</td><td>75</td><td>71</td><td>91</td><td>87</td><td>94</td><td>74</td><td>83</td><td>82</td><td>76</td><td>85</td><td>83</td><td>76</td></tr><tr><td>ru-en</td><td>51</td><td>81</td><td>80</td><td>50</td><td>99</td><td>97</td><td>91</td><td>75</td><td>87</td><td>90</td><td>80</td><td>89</td><td>85</td><td>81</td></tr><tr><td>en-es</td><td>54</td><td>88</td><td>86</td><td>77</td><td>88</td><td>85</td><td>84</td><td>64</td><td>88</td><td>89</td><td>70</td><td>87</td><td>88</td><td>89</td></tr><tr><td>es-en</td><td>60</td><td>83</td><td>88</td><td>67</td><td>87</td><td>83</td><td>83</td><td>69</td><td>79</td><td>75</td><td>65</td><td>73</td><td>73</td><td>68</td></tr><tr><td>en-de</td><td>40</td><td>86</td><td>86</td><td>52</td><td>88</td><td>81</td><td>83</td><td>65</td><td>78</td><td>81</td><td>78</td><td>81</td><td>82</td><td>84</td></tr><tr><td>de-en</td><td>62</td><td>94</td><td>95</td><td>67</td><td>96</td><td>92</td><td>94</td><td>75</td><td>79</td><td>80</td><td>64</td><td>74</td><td>75</td><td>75</td></tr><tr><td>en-zh</td><td>39</td><td>72</td><td>72</td><td>59</td><td>88</td><td>87</td><td>85</td><td>84</td><td>92</td><td>94</td><td>79</td><td>92</td><td>93</td><td>88</td></tr><tr><td>zh-en</td><td>63</td><td>85</td><td>83</td><td>53</td><td>86</td><td>87</td><td>77</td><td>61</td><td>80</td><td>77</td><td>72</td><td>77</td><td>79</td><td>66</td></tr><tr><td colspan="2">Avg. High Resource</td><td>47</td><td>81</td><td>81</td><td>64</td><td>91</td><td>87</td><td>88</td><td>70</td><td>82</td><td>82</td><td>73</td><td>81</td><td>81</td><td>78</td></tr><tr><td rowspan="6">Low Resource</td><td>en-ks</td><td>51</td><td>62</td><td>65</td><td>47</td><td>78</td><td>62</td><td>52</td><td>62</td><td>84</td><td>78</td><td>46</td><td>84</td><td>83</td><td>71</td></tr><tr><td>ks-en</td><td>51</td><td>53</td><td>51</td><td>44</td><td>56</td><td>56</td><td>56</td><td>56</td><td>66</td><td>71</td><td>49</td><td>70</td><td>61</td><td>68</td></tr><tr><td>en-mni</td><td>55</td><td>56</td><td>56</td><td>51</td><td>59</td><td>50</td><td>52</td><td>55</td><td>63</td><td>67</td><td>65</td><td>69</td><td>60</td><td>49</td></tr><tr><td>mni-en</td><td>57</td><td>59</td><td>56</td><td>56</td><td>64</td><td>50</td><td>52</td><td>66</td><td>67</td><td>74</td><td>61</td><td>77</td><td>65</td><td>63</td></tr><tr><td>en-yo</td><td>55</td><td>77</td><td>74</td><td>60</td><td>80</td><td>67</td><td>57</td><td>69</td><td>82</td><td>85</td><td>75</td><td>86</td><td>76</td><td>72</td></tr><tr><td>yo-en</td><td>57</td><td>59</td><td>59</td><td>52</td><td>65</td><td>60</td><td>45</td><td>61</td><td>66</td><td>68</td><td>62</td><td>68</td><td>69</td><td>59</td></tr><tr><td colspan="2">Avg. Low Resource</td><td>55</td><td>61</td><td>60</td><td>52</td><td>67</td><td>56</td><td>53</td><td>62</td><td>71</td><td>74</td><td>60</td><td>76</td><td>69</td><td>64</td></tr><tr><td rowspan="2">Zero-Shot</td><td>yo-es</td><td>51</td><td>54</td><td>54</td><td>47</td><td>54</td><td>48</td><td>45</td><td>72</td><td>76</td><td>77</td><td>80</td><td>76</td><td>76</td><td>73</td></tr><tr><td>es-yo</td><td>62</td><td>62</td><td>63</td><td>56</td><td>65</td><td>57</td><td>56</td><td>59</td><td>80</td><td>85</td><td>53</td><td>80</td><td>76</td><td>72</td></tr><tr><td colspan="2">Avg. Zero-Shot</td><td>56</td><td>57</td><td>57</td><td>52</td><td>59</td><td>53</td><td>51</td><td>66</td><td>78</td><td>81</td><td>67</td><td>78</td><td>76</td><td>72</td></tr><tr><td colspan="2">Avg. HalOmi</td><td>51</td><td>72</td><td>72</td><td>57</td><td>79</td><td>73</td><td>71</td><td>66</td><td>78</td><td>79</td><td>68</td><td>79</td><td>76</td><td>72</td></tr></table>
|
| 362 |
+
|
| 363 |
+
Table 5: Methods performances (ROC AUC) on hallucination and omission detection across HalOmi's high-resource, low-resource, and zero-shot language-pair clusters. Bold entries describe the best results among all methods. OTTAWA refer to using OTTAWA word aligner with LABSE embeddings. W1, W2, W3, W4: SimAlign-Itermax (Sabet et al., 2020), PMIAign (Azadi et al., 2023), OT (Azadi et al., 2023), POT (Arase et al., 2023) word aligners with LaBSE embeddings. R1, R2: OTTAWA with embeddings obtained from mBERT (Devlin et al., 2019) and XLMR (Conneau et al., 2020).
|
2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:63b4b817e967da11b16e9bd4c1e46222a8ba32316e91dbbd5d6cd405f4f97c45
|
| 3 |
+
size 597880
|
2024/OTTAWA_ Optimal TransporT Adaptive Word Aligner for Hallucination and Omission Translation Errors Detection/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On Efficiently Representing Regular Languages as RNNs/1ffd8d38-80f5-48a5-8ded-ff8f3cb80857_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On Efficiently Representing Regular Languages as RNNs/1ffd8d38-80f5-48a5-8ded-ff8f3cb80857_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On Efficiently Representing Regular Languages as RNNs/1ffd8d38-80f5-48a5-8ded-ff8f3cb80857_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e9ae60e0e156323f2282c02bec91e85653273ed3d1d961606adfe034376d11c
|
| 3 |
+
size 647083
|
2024/On Efficiently Representing Regular Languages as RNNs/full.md
ADDED
|
@@ -0,0 +1,639 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On Efficiently Representing Regular Languages as RNNs
|
| 2 |
+
|
| 3 |
+
Anej Svete Robin Shing Moon Chan Ryan Cotterell
|
| 4 |
+
|
| 5 |
+
{asvete, chanr, ryan.cotterell}@inf.ethz.ch
|
| 6 |
+
|
| 7 |
+
ETH zürich
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Recent work by Hewitt et al. (2020) provides an interpretation of the empirical success of recurrent neural networks (RNNs) as language models (LMs). It shows that RNNs can efficiently represent bounded hierarchical structures that are prevalent in human language. This suggests that RNNs' success might be linked to their ability to model hierarchy. However, a closer inspection of Hewitt et al.'s (2020) construction shows that it is not inherently limited to hierarchical structures. This poses a natural question: What other classes of LMs RNNs can efficiently represent? To this end, we generalize Hewitt et al.'s (2020) construction and show that RNNs can efficiently represent a larger class of LMs than previously claimed—specifically, those that can be represented by a pushdown automaton with a bounded stack and a specific stack update function. Altogether, the efficiency of representing this diverse class of LMs with RNN LMs suggests novel interpretations of their inductive bias.
|
| 12 |
+
|
| 13 |
+
https://github.com/rycolab/bpdas
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Neural LMs have demonstrated a human-level grasp of grammar and linguistic nuance. Yet, a considerable gap remains between our empirical observations and our theoretical understanding of their capabilities. One approach to bridge this gap is to study what classes of formal languages neural LMs can efficiently represent. The rationale behind this object of study is that a neural LM's ability to represent a language efficiently suggests the presence of an inductive bias in the model architecture that prefers that language over others, and may make it specifically easier to learn, e.g., due to Occam's razor.
|
| 18 |
+
|
| 19 |
+
Exploring LMs' ability to model formal languages has garnered significant interest in recent years; see, e.g., the surveys by Merrill (2023) and Strobl et al. (2023). Investigation into this area has a particularly long history in the context of RNNs (McCulloch and Pitts, 1943; Minsky, 1954; Siegel-
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: An illustration of how an RNN can store information about a fixed number of symbols (in this case, three) that have appeared in the string $\mathbf{y}_{<t}$ . Using some mechanism, the symbols $y_{2}, y_{t-4}, y_{t-1}$ have been selected for determining the continuation of the string and are stored in $\mathbf{h}$ . These symbols are used to compute the conditional probability of the next symbol $\overline{y}_t$ .
|
| 23 |
+
|
| 24 |
+
mann and Sontag, 1992). For example, a classic result (Minsky, 1954) states that RNNs are equivalent to finite-state automata (FSAs). How efficiently an RNN can encode an FSA was studied by Indyk (1995), who showed that an FSA with states $Q$ over an alphabet $\Sigma$ can be simulated by an RNN with $\mathcal{O}\left(|\Sigma|\sqrt{|Q|}\right)$ neurons. This construction is optimal in the sense that there exist FSAs that require this many neurons to be emulated by an RNN.
|
| 25 |
+
|
| 26 |
+
Indyk's (1995) bound presents a worst-case analysis: It reflects the number of neurons needed for an adversarially selected FSA. However, it is easy to construct FSAs that can be encoded with exponentially fewer neurons than the number of states. Fig. 2 exhibits an $n$ -gram LM that, when encoded as an FSA, has $|\Sigma|^{n-1}$ states, but can still be represented with $\mathcal{O}(n\log|\Sigma|)$ neurons. Building on this insight, Hewitt et al. (2020) show that an entire class of languages— $\mathrm{D}(b,n)$ , i.e., the Dyck language over $b$ parentheses types with nesting up to depth $n$ —can be encoded in logarithmic space. Specifically, even though an FSA that accepts the
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
Figure 2: A simplified 3-gram LM over $\Sigma = \{a, b\}$ . Even though the number of states is exponential in $n$ , the hidden state of the RNN only has to keep the $n - 1 = 2$ symbols of interest, each of which is represented by $\lceil \log_2|\Sigma| \rceil$ bits. This is illustrated by the state $ab$ being represented as $\mathbf{h} = \begin{pmatrix} a \\ b \end{pmatrix}$ .<sup>3</sup>
|
| 30 |
+
|
| 31 |
+
$\mathrm{D}(b,n)$ language requires $\mathcal{O}(b^n)$ states, it can be encoded by an RNN with $\mathcal{O}(n\log b)$ neurons, which is memory-optimal. Attractively, $\mathrm{D}(b,n)$ languages capture, to some extent, the bounded nested nature of human language.2
|
| 32 |
+
|
| 33 |
+
Hewitt et al.'s (2020) result poses an interesting question: Are all languages that RNNs can implement efficiently hierarchical in nature? We show that this is not the case. We revisit Hewitt et al.'s (2020) construction and demonstrate that the same optimal compression can be achieved for a more general class of languages, which do not necessarily exhibit hierarchical structure. Stated differently, RNNs do not necessarily encode hierarchical languages any more compactly than non-hierarchical ones. To show this, we introduce probabilistic bounded pushdown automata (BPDAs), probabilistic pushdown automata (Abney et al., 1999) whose stack is bounded. The probabilistic nature of BPDAs furthermore allows us to go beyond the binary recognition and reason about classes of language models—probability distributions over strings—that RNN LMs can efficiently represent. This is particularly interesting
|
| 34 |
+
|
| 35 |
+
because it requires the RNN to not only efficiently encode the transition dynamics of the automaton but also the string probabilities.4 Thus, we generalize the result by Hewitt et al. (2020) and give sufficient conditions for a probabilistic BPDA to be optimally compressible into an RNN.
|
| 36 |
+
|
| 37 |
+
The non-hierarchical nature of BPDAs leads us to contend that the reason some LMs lend themselves to exponential compression has little to do with their hierarchical structure. This offers two intriguing insights. First, it shows that the inductive biases of RNN LMs might be difficult to link to a hierarchical structure. Second, it provides a new perspective on which languages RNNs efficiently encode, i.e., those representable by sequential machines with a bounded stack. Such a machine is illustrated in Fig. 1.
|
| 38 |
+
|
| 39 |
+
# 2 Preliminaries
|
| 40 |
+
|
| 41 |
+
We begin by introducing some core concepts. An alphabet $\Sigma$ is a finite, non-empty set of symbols. Its Kleene closure $\Sigma^{*}$ is the set of all strings of symbols in $\Sigma$ . The length of the string $y = y_{1} \ldots y_{T} \in \Sigma^{*}$ , denoted by $|y| = T$ , is the number of symbols it contains. A language model $p$ is a probability distribution over $\Sigma^{*}$ . Two LMs $p$ and $q$ are weakly equivalent if $p(y) = q(y)$ for all $y \in \Sigma^{*}$ and two families of LMs $\mathcal{P}$ and $\mathcal{Q}$ are weakly equivalent if, for any $p \in \mathcal{P}$ , there exists a weakly equivalent $q \in \mathcal{Q}$ and vice versa.
|
| 42 |
+
|
| 43 |
+
Most modern LMs define $p(\mathbf{y})$ as a product of conditional probability distributions:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
p (\boldsymbol {y}) \stackrel {\text {d e f}} {=} p (\operatorname {E O S} | \boldsymbol {y}) \prod_ {t = 1} ^ {| \boldsymbol {y} |} p \left(y _ {t} | \boldsymbol {y} _ {< t}\right), \tag {1}
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
where EOS $\notin \Sigma$ is a distinguished end-of-string symbol. We denote $\overline{\Sigma} \stackrel{\mathrm{def}}{=} \Sigma \cup \{\mathrm{EOS}\}$ and use the notation $\overline{y} \in \overline{\Sigma}$ whenever $\overline{y}$ can also be EOS. Such a definition is without loss of generality; any LM can be factorized in this form (Cotterell et al., 2024). However, not all models expressible as Eq. (1) constitute LMs, i.e., a probabilistic model of the form given in Eq. (1) may leak probability mass to infinite sequences (Du et al., 2023). In this paper, we assume all autoregressive models are tight, i.e., they place probability 1 on $\Sigma^{*}$ .
|
| 50 |
+
|
| 51 |
+
A historically important class of LM are those that obey the $n$ -gram assumption.
|
| 52 |
+
|
| 53 |
+
Assumption 2.1. The $n$ -gram assumption states that the probability $p(\overline{y}_t \mid \mathbf{y}_{<t})$ only depends on $n - 1$ previous symbols $y_{t-1}, \ldots, y_{t-n+1}$ :
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
p \left(\bar {y} _ {t} \mid \boldsymbol {y} _ {< t}\right) = p \left(\bar {y} _ {t} \mid y _ {t - n + 1} \dots y _ {t - 1}\right). \tag {2}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
Fig. 2 shows an example of an 2-gram LM. The weights on the transitions denote the conditional probabilities of the next symbol given the previous $n - 1 = 2$ symbols encoded by the current state.
|
| 60 |
+
|
| 61 |
+
# 2.1 Recurrent Neural Language Models
|
| 62 |
+
|
| 63 |
+
The conditional distributions of recurrent neural LMs are given by a recurrent neural network. Hewitt et al. (2020) present results for both Elman RNNs (Elman, 1990) as well as those derived from the LSTM architecture (Hochreiter and Schmidhuber, 1997). Our paper focuses on Elman RNNs, as they are easier to analyze and suffice to present the main ideas, which also easily generalize to the LSTM case.
|
| 64 |
+
|
| 65 |
+
Definition 2.1. An Elman RNN $\mathcal{R}$ = $(\Sigma, \sigma, D, \mathbf{U}, \mathbf{V}, \mathbf{b}, \boldsymbol{\eta})$ is an RNN with the hidden state recurrence
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\mathbf {h} _ {0} = \boldsymbol {\eta} \quad (t = 0) \quad (3 \mathrm {a})
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\mathbf {h} _ {t} = \sigma (\mathbf {U h} _ {t - 1} + \mathbf {V r} (y _ {t}) + \mathbf {b}) \quad (t > 0), (3 \mathbf {b})
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
where $\mathbf{h}_t\in \mathbb{R}^D$ is the hidden state at time step $t$ , $\pmb {\eta}\in \mathbb{R}^{D}$ is an initialization parameter, $y_{t}\in \Sigma$ is the input symbol at time step $t$ , $\mathbf{r}\colon \Sigma \to \mathbb{R}^R$ is a symbol representation function, $\mathbf{U}\in \mathbb{R}^{D\times D}$ , $\mathbf{V}\in \mathbb{R}^{D\times R}$ are parameter matrices, $\mathbf{b}\in \mathbb{R}^{D}$ is a bias vector, and $\sigma \colon \mathbb{R}^D\rightarrow \mathbb{R}^D$ is an element-wise non-linear activation function. We refer to the dimensionality of the hidden state, $D$ , as the size of the RNN, and to each entry of the hidden state as a neuron.
|
| 76 |
+
|
| 77 |
+
Because $\mathbf{h}_t$ represents the string consumed by the RNN, we also use the evocative notation $\mathbf{h}(\mathbf{y})$ to denote the result of the application of Eq. (3b) over the string $\mathbf{y} = y_1\cdots y_t$ . An RNN can be used to specify an LM by using the hidden states to define the conditional distributions over $\overline{y}$ given $\mathbf{y}_{< t}$ .
|
| 78 |
+
|
| 79 |
+
Definition 2.2. Let $\mathcal{R}$ be an Elman RNN, $\mathbf{E} \in \mathbb{R}^{|\Sigma| \times D}$ and $\mathbf{u} \in \mathbb{R}^{|\Sigma|}$ . An RNN LM is an LM whose conditional distributions are defined as
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
p (\bar {y} \mid \boldsymbol {y} _ {< t}) \stackrel {\text {d e f}} {=} \operatorname {s o f t m a x} \left(\mathbf {E h} \left(\boldsymbol {y} _ {< t}\right) + \mathbf {u}\right) _ {\bar {y}} \tag {4}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
for $\overline{y} \in \overline{\Sigma}, y_{<t} \in \Sigma^{*}$ . We term $\mathbf{E}$ the output matrix and $\mathbf{u}$ the bias vector.
|
| 86 |
+
|
| 87 |
+
# 2.1.1 Activation Functions and Precision
|
| 88 |
+
|
| 89 |
+
An important consideration when analyzing RNN LM's ability to compute the probability of a string $\mathbf{y} \in \Sigma^{*}$ is the number of bits required to represent the entries in $\mathbf{h}_t$ and how the number of bits scales with the length of the string, $|\mathbf{y}|$ . This depends both on the dynamics of the RNN and the activation function used (Merrill, 2019) and motivates the following definition of precision.
|
| 90 |
+
|
| 91 |
+
Definition 2.3. The precision of an RNN is the number of bits required to represent $\mathbf{h}(\mathbf{y})$ :
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\psi_ {\mathcal {R}} (\boldsymbol {y}) \stackrel {{\text {d e f}}} {{=}} \max _ {d \in [ D ]} \min _ {\substack {p, q \in \mathbb {N}, \\ \frac {p}{q} = \mathbf {h} (\boldsymbol {y}) _ {d}}} \lceil \log_ {2} p \rceil + \lceil \log_ {2} q \rceil . \tag{5}
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
We say that an Elman RNN is of constant precision if $\psi_{\mathcal{R}}(\pmb {y}) = \mathcal{O}(1)$ , i.e., if $\psi_{\mathcal{R}}(\pmb {y})\leqslant C$ for all $\pmb {y}\in$ $\Sigma^{*}$ and some $C\in \mathbb{R}$ . It is of unbounded precision if $\psi_{\mathcal{R}}(\pmb {y})$ cannot be bounded by a function of $|\pmb {y}|$
|
| 98 |
+
|
| 99 |
+
Common choices for the nonlinear function $\sigma$ in Eq. (3b) are the Heaviside function $\mathrm{H}(x)\stackrel {\mathrm{def}}{=}\mathbb{1}\{x > 0\}$ , its continuous approximation, the sigmoid function $\sigma (x)\stackrel {\mathrm{def}}{=}\frac{1}{1 + \exp(-x)}$ , and $\mathrm{ReLU}\stackrel {\mathrm{def}}{=}\max (0,x)$ . Hewitt et al. (2020) focus on sigmoid activations as originally presented by Elman (1990). However, to simply the analysis, they assume that $|x|\gg 0$ , such that $\sigma (x)\approx 0$ or $\sigma (x)\approx 1$ since $\lim_{x\to -\infty}\sigma (x) = 0$ and $\lim_{x\to \infty}\sigma (x) = 1$ . Concretely, they define a parameter $\beta \in \mathbb{R}_+$ and assume $\sigma (x) = 0$ for $x < -\beta$ and $\sigma (x) = 1$ for $x > \beta$ . Restricting to values of $x$ with $|x| > \beta$ results in a constant-precision RNN, equivalent to one with the Heaviside activation function. Its hidden states live in $\{0,1\}^D$ , meaning that they can be interpreted as binary vectors. The update rule Eq. (3b) can then be interpreted as a logical operation on the hidden state and the input symbol (Svete and Cotterell, 2023b). We simplify the exposition by working directly with H-activated RNNs, which additionally allows for easy analysis of the RNN's precision. $^6$
|
| 100 |
+
|
| 101 |
+
# 3 Bounded Pushdown Automata
|
| 102 |
+
|
| 103 |
+
In this section, we present a broad class of LMs that provide a convenient framework for analyzing the sufficient conditions for efficient representation by RNNs: bounded pushdown automata. They maintain a stack, albeit one that contains at most a fixed number of symbols.
|
| 104 |
+
|
| 105 |
+
Definition 3.1. An $m$ -bounded pushdown automaton (BPDA) is a tuple $(\Sigma, \Gamma, m, \mu, \lambda, \rho)$ where $m \in \mathbb{N}$ , $\Sigma$ is an alphabet of input symbols, $\Gamma$ is an alphabet of stack symbols, $\mu: \Gamma^{\leqslant m} \times \Sigma \times \Gamma^{\leqslant m} \to [0,1]$ is a weighted transition function, $\lambda: \Gamma^{\leqslant m} \to [0,1]$ is the initial weight function, and $\rho: \Gamma^{\leqslant m} \to [0,1]$ is the final weight function.
|
| 106 |
+
|
| 107 |
+
The string $\gamma$ currently stored in the stack is the BPDA's configuration. We read $\gamma$ bottom to top, e.g., in the stack $\gamma = \gamma_1\gamma_2\dots \gamma_\ell$ , $\gamma_{1}$ is at the bottom of the stack, while $\gamma_{\ell}$ is at the top. We say that the $m$ -bounded stack is empty if $|\gamma| = 0$ (equivalently, $\gamma = \varepsilon$ ) and full if $|\gamma| = m$ . Sometimes, it will be useful to think of the bounded stack as always being full—in that case, if there are $\ell < m$ elements on the stack, we assume that the other $m - \ell$ elements are occupied by a special placeholder symbol $\iota \notin \Gamma$ ; see Fig. 3 for an illustration. We denote $\Gamma_{\iota} \stackrel{\mathrm{def}}{=} \Gamma \cup \{\iota\}$ .
|
| 108 |
+
|
| 109 |
+
We call a BPDA probabilistic if the following two equations hold
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\sum_ {\gamma \in \Gamma^ {\leqslant m}} \lambda (\gamma) = 1 \tag {6a}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\sum_ {\substack {y \in \Sigma \\ \boldsymbol {\gamma} ^ {\prime} \in \Gamma^ {\leqslant m}}} \mu (\boldsymbol {\gamma}, y, \boldsymbol {\gamma} ^ {\prime}) + \rho (\boldsymbol {\gamma}) = 1, \forall \boldsymbol {\gamma} \in \Gamma^ {\leqslant m}. \tag{6b}
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
We call a BPDA $\mathcal{P} = (\Sigma, \Gamma, m, \mu, \lambda, \rho)$ deterministic if there exists exactly one $\gamma \in \Gamma^{\leqslant m}$ with $\lambda(\gamma) > 0$ and, for any $\gamma \in \Gamma^{\leqslant m}$ and $y \in \Sigma$ , there is at most one $\gamma' \in \Gamma^{\leqslant m}$ with $\mu(\gamma, y, \gamma') > 0$ . For deterministic BPDAs, we also define:
|
| 120 |
+
|
| 121 |
+
- $\phi (\gamma ,y)\stackrel {\mathrm{def}}{=}\gamma^{\prime}$ for $\mu (\gamma ,y,\gamma^{\prime}) > 0$ as the function returning the (deterministic) next configuration of the BPDA,
|
| 122 |
+
$\omega (\gamma ,y)\stackrel {\mathrm{def}}{=}w$ for $w = \mu (\gamma ,y,\phi (\gamma ,y))$ as the weight of the only $y$ -labeled transition from $\pmb{\gamma}$ , and
|
| 123 |
+
- $\varphi(\pmb{y})$ as the (unique) stack configuration reached upon reading $\pmb{y}$ .
|
| 124 |
+
|
| 125 |
+
Runs of a BPDA. A BPDA processes a string $\pmb{y} = y_{1}\dots y_{T}\in \Sigma^{*}$ left to right by reading its symbols and changing its configurations accordingly. It starts with an initial configuration $\gamma_0$ according to $\lambda$ . Then, it updates the stack according to $\mu$ for each symbol in $\pmb{y}$ , resulting in a sequence of stacks $\pi = \gamma_0,\gamma_1,\ldots ,\gamma_T$ where $\mu (\gamma_{t - 1},y_t,\gamma_t) > 0$ . Each such sequence of stacks $\pi$ is called a run and
|
| 126 |
+
|
| 127 |
+

|
| 128 |
+
Figure 3: An illustration of how a BPDA can compute the probability of a string under an $n$ -gram LM.
|
| 129 |
+
|
| 130 |
+
<table><tr><td>y1</td><td>y2</td><td>···</td><td>yT-1</td><td>yT</td></tr></table>
|
| 131 |
+
|
| 132 |
+
we will denote all runs of $\mathcal{P}$ on $\pmb{y}$ as $\Pi (\pmb {y};\mathcal{P})$ . A probabilistic BPDA $\mathcal{P}$ assigns $\pmb{y}$ the probability
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\mathcal {P} (\boldsymbol {y}) \stackrel {\text {d e f}} {=} \tag {7}
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\sum_{\substack{\boldsymbol {\pi}\in \Pi (\boldsymbol {y};\mathcal{P}),\\ \boldsymbol {\pi} = \boldsymbol{\gamma}_{0},\boldsymbol{\gamma}_{1},\ldots ,\boldsymbol{\gamma}_{T}}}\lambda \left(\boldsymbol{\gamma}_{0}\right)\left[\prod_{t = 1}^{T}\mu \left(\boldsymbol{\gamma}_{t - 1},\boldsymbol{y}_{t},\boldsymbol{\gamma}_{t}\right)\right]\rho \left(\boldsymbol{\gamma}_{T}\right).
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
In this sense, probabilistic BPDAs induce distributions over strings and generalize Hewitt et al.'s (2020) thresholded string acceptance to the probabilistic setting. This is illustrated in Fig. 3.
|
| 143 |
+
|
| 144 |
+
Pushing and popping. We define the transition function $\mu$ as a general function of the stack configuration and the input symbol. As important special cases, $\mu$ can define the standard POP and PUSH operations. Popping the top of stack $\tau$ is performed by transitions of the form $(\gamma \tau, y, \gamma)$ with $\mu(\gamma \tau, y, \gamma) > 0$ ;
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\operatorname {P O P} (\gamma \tau , y, \gamma) \stackrel {\text {d e f}} {=} \mu (\gamma \tau , y, \gamma). \tag {8}
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
Pushing definitionally increases the size of the stack, which raises the question of how to handle stack overflows. Rather than simply rejecting PUSHs that would result in a stack overflow, we allow a BPDA to discard the bottom of the stack when pushing; this is easy to specify with the general transition function $\mu$ . Given the current stack configuration $\gamma = \gamma_{1} \cdots \gamma_{\ell}$ , we define the weight of pushing the symbols $\tau = \gamma_{1}' \cdots \gamma_{r}' \in \Gamma^{\leqslant m}$ as
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
\operatorname {P U S H} (\gamma , y, \gamma \tau) \stackrel {\text {d e f}} {=} \tag {9}
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\left\{ \begin{array}{l l} \mu \left(\gamma , y, \gamma \tau\right) & \text {i f} \ell + r \leqslant m \\ \mu \left(\gamma , y, \gamma_ {\ell + r - m + 1} \dots \gamma_ {\ell} \tau\right) & \text {o t h e r w i s e} . \end{array} \right.
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
m - \ell \left\{\left( \begin{array}{c} \gamma_ {\ell} \\ \vdots \\ \gamma_ {1} \\ \iota \\ & \end{array} \right) _ {- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } \left( \begin{array}{c} \tau_ {r} \\ \vdots \\ \tau_ {1} \\ \gamma_ {\ell} \\ \vdots \\ \gamma_ {1} \\ \iota \\ \vdots \\ \iota \end{array} \right) \right\} m - \ell - r
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
Figure 4: PUSH moves the stack down, discards the bottom-most elements, and inserts a new top.
|
| 165 |
+
|
| 166 |
+
This definition is without loss of generality; we can always define BPDAs that assign transitions resulting in a stack overflow probability 0. PUSH is illustrated in Fig. 4.
|
| 167 |
+
|
| 168 |
+
# 3.1 Efficiently Representable BPDAs
|
| 169 |
+
|
| 170 |
+
It is easy to see that there are $\mathcal{O}\left(|\Gamma_{\iota}|^{m}\right)$ possible $m$ -bounded stacks over $\Gamma$ , defining the number of configurations a BPDA can be in. Interpreting the configurations as states of a (probabilistic) FSA, general constructions of RNN simulating FSAs mentioned in §1 would require $\Omega\left(|\Sigma||\Gamma_{\iota}|^{\frac{m}{2}}\right)$ neurons, exponentially many in the size of the stack (Minsky, 1954; Dewdney, 1977; Indyk, 1995; Svete and Cotterell, 2023a,b). One might, however, hope to exploit the special structure of the state space induced by the stack configurations to come up with more efficient representations. This motivates the following definition.
|
| 171 |
+
|
| 172 |
+
Definition 3.2. A BPDA $\mathcal{P} = (\Sigma, \Gamma, m, \mu, \lambda, \rho)$ is called $C$ -efficiently representable if there exists a weakly equivalent RNN LM of size
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
D \leqslant C \left[ \log_ {2} \left| \Gamma_ {\iota} \right| ^ {m} \right] = C m \left\lceil \log_ {2} \left| \Gamma_ {\iota} \right|\right\rceil . \tag {10}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
Intuitively, Def. 3.2 characterizes efficiently representable BPDAs as those that can be defined by an RNN LM with logarithmically many neurons in the number of configurations. This is a natural generalization of (efficient) thresholded acceptance defined by Hewitt et al. (2020) to the probabilistic (language modeling) setting. $^{8}$
|
| 179 |
+
|
| 180 |
+
Def. 3.2 paves the way to a formalization of LMs efficiently representable by RNN LMs with
|
| 181 |
+
|
| 182 |
+
BPDAs. However, BPDAs are too rich to be efficiently representable in general. The following theorem shows that BPDA LMs are weakly equivalent to LMs induced by probabilistic finite-state automata, a classic family of computational models with a well-described relationship to RNNs.
|
| 183 |
+
|
| 184 |
+
Theorem 3.1. The family of LMs induced by $PF$ -SAs is weakly equivalent to the family of LMs induced by BPDAs.
|
| 185 |
+
|
| 186 |
+
Proof. See App. B.
|
| 187 |
+
|
| 188 |
+
Because BPDAs define the same class of LMs as probabilistic FSAs, they cannot, in general, be represented more efficiently than with $\Omega(|\Sigma| |\Gamma_{\iota}|^{m})$ neurons—a more efficient simulation of general BPDAs would contradict the known lower bounds on simulating FSAs (Indyk, 1995; Svete and Coterell, 2023b). This implies that we inevitably must restrict the class of BPDAs to ensure their efficient representability. The following definitions will help us characterize efficiently representable BPDAs.
|
| 189 |
+
|
| 190 |
+
Vectorial representation of a stack. When connecting BPDAs to RNNs, it is useful to think of the stack as a vector. Setting $G \stackrel{\mathrm{def}}{=} \lceil \log_2 |\Gamma_\iota| \rceil$ , we define the stack vector function $\chi: \Gamma^{\leqslant m} \to \{0,1\}^{mG}$ as
|
| 191 |
+
|
| 192 |
+
$$
|
| 193 |
+
\chi \left(\gamma_ {1} \dots \gamma_ {m}\right) \stackrel {\text {d e f}} {=} \binom {\operatorname {B i n} \left(\gamma_ {m}\right)} {\vdots} \in \{0, 1 \} ^ {m G}. \tag {11}
|
| 194 |
+
$$
|
| 195 |
+
|
| 196 |
+
Here, $\operatorname{Bin} \colon \Gamma_{\iota} \to \{0,1\}^{G}$ is the binary encoding function, where we assume that $\operatorname{Bin}(\iota) = \mathbf{0}_G$ , the $G$ -dimensional vector of zeros. More precisely, let $c \colon \Gamma_{\iota} \to \{0,1,\dots,|\Gamma|\}$ be a bijection between $\Gamma_{\iota}$ and $\{0,1,\dots,|\Gamma|\}$ such that $c(\iota) = 0$ . Then $\operatorname{Bin}(\gamma)$ is the binary representation of $c(\gamma)$ .
|
| 197 |
+
|
| 198 |
+
Definition 3.3. A function $f\colon \Gamma^{\leqslant m}\to \Gamma^{\leqslant m}$ is stack-affine if there exists a matrix $\mathbf{M}\in \mathbb{R}^{mG\times mG}$ and a vector $\mathbf{v}\in \mathbb{R}^{mG}$ such that, for all $\gamma \in \Gamma^{\leqslant m}$ , it holds that $\chi (f(\gamma)) = \mathbf{M}\chi (\gamma) + \mathbf{v}$ .
|
| 199 |
+
|
| 200 |
+
Definition 3.4. A function $\zeta: \Gamma^{\leqslant m} \times \Sigma \to \Gamma^{\leqslant m}$ is $K$ -varied in $\Sigma$ if there exists a partition $\Sigma = \Sigma_1 \sqcup \dots \sqcup \Sigma_K$ such that, for all $k = 1, \ldots, K$ , it holds that $\zeta(\gamma, y) = \zeta(\gamma, y') \stackrel{\text{def}}{=} \zeta_k(\gamma)$ for all $y, y' \in \Sigma_k$ and $\gamma \in \Gamma^{\leqslant m}$ .
|
| 201 |
+
|
| 202 |
+
Definition 3.5. A function $\alpha \colon \Gamma^{\leqslant m} \times \Sigma \to \Gamma^{\leqslant m}$ is $\Sigma$ -determined if there exists a function $s \colon \Sigma \to \Gamma$ and a family of partitions
|
| 203 |
+
|
| 204 |
+
$([m] = \mathcal{J}_1^y \sqcup \mathcal{J}_2^y \sqcup \mathcal{J}_3^y)_{y \in \Sigma}$ such that, for all $\pmb{\gamma} \in \Gamma \leqslant m$ , it holds that
|
| 205 |
+
|
| 206 |
+
$$
|
| 207 |
+
\alpha (\boldsymbol {\gamma}, y) _ {j} = \left\{ \begin{array}{l l} \gamma_ {j} & \boldsymbol {i f} j \in \mathcal {J} _ {1} ^ {y} \\ s (y) & \boldsymbol {i f} j \in \mathcal {J} _ {2} ^ {y}. \\ \iota & \boldsymbol {i f} j \in \mathcal {J} _ {3} ^ {y} \end{array} \right. \tag {12}
|
| 208 |
+
$$
|
| 209 |
+
|
| 210 |
+
In words, a stack-affine function can be implemented by an affine transformation of the vectorial representation of the stack, a $K$ -varied function can be decomposed into $K$ different functions that are invariant to the input symbol, and a $\Sigma$ -determined function changes the stack in a manner that only depends on the input symbol: it either keeps a symbol the same, replaces it with $s(y)$ , or empties the slot (inserting the placeholder symbol $\iota$ ). Importantly, a $\Sigma$ -determined function acts independent of the stack $\gamma$ .
|
| 211 |
+
|
| 212 |
+
Lastly, we consider the efficient representation of next-symbol probabilities. For a deterministic BPDA $\mathcal{P} = (\Sigma, \Gamma, m, \mu, \lambda, \rho)$ , we define
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
p (y \mid \gamma) \stackrel {\text {d e f}} {=} \omega (\gamma , y) \tag {13a}
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
p (\operatorname {E O S} \mid \gamma) \stackrel {\text {d e f}} {=} \rho (\gamma), \tag {13b}
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
for $\gamma \in \Gamma^{\leqslant m}$ and $y\in \Sigma$ and
|
| 223 |
+
|
| 224 |
+
$$
|
| 225 |
+
p (\bar {y} \mid \boldsymbol {y}) \stackrel {\text {d e f}} {=} p (\bar {y} \mid \varphi (\boldsymbol {y})), \tag {14}
|
| 226 |
+
$$
|
| 227 |
+
|
| 228 |
+
for $\pmb{y} \in \Sigma^{*}$ and $\overline{y} \in \overline{\Sigma}$ .
|
| 229 |
+
|
| 230 |
+
Definition 3.6. A deterministic BPDA is representation-compatible if there exists a matrix $\mathbf{E} \in \mathbb{R}^{|\overline{\Sigma}| \times mG}$ and a vector $\mathbf{u} \in \mathbb{R}^{|\overline{\Sigma}|}$ such that, for every $\gamma \in \Gamma^{\leqslant m}$ , it holds for all $\overline{y} \in \overline{\Sigma}$ that
|
| 231 |
+
|
| 232 |
+
$$
|
| 233 |
+
\log p (\bar {y} \mid \boldsymbol {\gamma}) = \operatorname {s o f t m a x} (\mathbf {E} \chi (\boldsymbol {\gamma}) + \mathbf {u}) _ {\bar {y}}. \tag {15}
|
| 234 |
+
$$
|
| 235 |
+
|
| 236 |
+
# 4 Efficiently Representing BPDAs
|
| 237 |
+
|
| 238 |
+
The introduced technical machinery allows us to present our main result.
|
| 239 |
+
|
| 240 |
+
Theorem 4.1. Let $\mathcal{P} = (\Sigma, \Gamma, m, \mu, \lambda, \rho)$ be a deterministic representation-compatible (cf. Def. 3.6) BPDA where
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
\mu (\gamma , y, \gamma^ {\prime}) = \left\{ \begin{array}{l l} \omega (\gamma , y) & i f \gamma^ {\prime} = \alpha (\zeta (\gamma , y)) \\ 0 & o t h e r w i s e \end{array} \right. \tag {16}
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
for a $\Sigma$ -determined function $\alpha$ (cf. Def. 3.5) and a $K$ -varied function (cf. Def. 3.4) $\zeta$ where all $\zeta_k$ are stack-affine (cf. Def. 3.3). Then, $\mathcal{P}$ is $K$ -efficiently representable (cf. Def. 3.2).
|
| 247 |
+
|
| 248 |
+
This generalizes Hewitt et al.'s (2020) result by considering the more general class of BPDA LMs, which includes $\mathrm{D}(b,n)$ LMs as a special case, and by incorporating the probabilistic nature of LMs. The requirement for the BPDA to be representation compatible is crucial for Thm. 4.1; there exist BPDAs that fulfill all the criteria of Thm. 4.1 but the one on representation compatibility that are not efficiently representable by RNN LMs.
|
| 249 |
+
|
| 250 |
+
Theorem 4.2. There exist deterministic BPDAs whose transition function $\mu$ conforms to the structure in Eq. (16), but which are not efficiently representable for any $K$ independent of $|\Sigma|$ .
|
| 251 |
+
|
| 252 |
+
Proof intuition. Consider a BPDA where $\Gamma = \Sigma$ . Intuitively, this holds because a BPDA LM defines exponentially many possible (independently specified) conditional distributions over the next symbol given the current stack configuration. For an RNN LM to be weakly equivalent, it would need to, after affinely transforming the hidden state (applying the output matrix and the output bias vector), match the logits of these distributions. However, as the logits can in general span the entire $|\Sigma|$ -dimensional space, the hidden state $\mathbf{h}$ would have to be of size $\Omega(|\Sigma|)$ to be able to do that, rather than $Km\log_2|\Sigma|$ , as we have in the case of efficient simulation. See App. C for details.
|
| 253 |
+
|
| 254 |
+
# 4.1 Known Efficiently Representable Families
|
| 255 |
+
|
| 256 |
+
Thm. 4.1 offers a very abstract characterization of (the components of) efficiently representable BPDAs. Here, we frame this characterization in the context of two well-known LM families: bounded Dyck and $n$ -gram LMs.
|
| 257 |
+
|
| 258 |
+
Proposition 4.1. Representation-compatible LMs over $\mathrm{D}(b,n)$ are 2-efficiently representable with $m = n$ and $\Gamma = \{\langle i|i\in [b]\}$ .
|
| 259 |
+
|
| 260 |
+
Proof. LMs over $\mathrm{D}(b,n)$ define distributions over strings of well-nested parentheses of $b$ up do depth $n$ . They work over the alphabet $\Sigma = \{\langle i|i\in [b]\} \cup \{\langle_i|i\in [b]\}$ . A BPDA modeling an LM over $\mathrm{D}(b,n)$ only has to define POP and PUSH operations. Specifically, $\langle_{i}$ corresponds to a push operation PUSH $(\gamma ,\langle_{i},\gamma \langle_{i})$ while $\rangle_{i}$ corresponds to a pop operation POP $(\gamma \langle_{i},\gamma \rangle_{i},\gamma)$ for all $i\in [b]$ .<sup>10</sup> Since popping can be performed by shifting all entries
|
| 261 |
+
|
| 262 |
+
on the stack one position up while pushing can be performed by shifting all entries one position down (before inserting a new symbol), the BPDA modeling a $\mathrm{D}(b,n)$ language is stack-affine and 2- varied with the partition $\Sigma = \Sigma_{\mathsf{POP}} \sqcup \Sigma_{\mathsf{PUSH}}$ where $\Sigma_{\mathsf{POP}} = \{\langle i | i \in [b]\}$ , $\Sigma_{\mathsf{PUSH}} = \{\langle i | i \in [b]\}$ . Additionally, since each input symbol modifies the stack in a deterministic way—either it is discarded (in case of popping) or is added to the top position of the stack (in case of pushing)—the BPDA is $\Sigma$ -determined. Moreover, since the stack only ever needs to store the $b$ opening brackets, only $[\log_2(b + 1)]$ bits are needed to represent each entry. Altogether, this means that $\mathrm{D}(b,n)$ LMs are efficiently representable by RNN LMs of size $D = 2n[\log_2(b + 1)]$ .
|
| 263 |
+
|
| 264 |
+
Note that the construction presented by Hewitt et al. (2020) results in RNNs of size $2 \cdot 2n[\log_2(b + 1)]$ . This is because they rely on stack representations that contain the complements of the symbol encodings. This is not strictly required, which is interesting since Hewitt et al. (2020) note a difference in the constant factor between Elman RNNs and LSTMs. Our construction does away with this difference; see App. C for details.
|
| 265 |
+
|
| 266 |
+
Proposition 4.2. Representation-compatible $n$ -gram LMs are 1-efficiently representable with $m = n - 1$ and $\Gamma = \Sigma$ .
|
| 267 |
+
|
| 268 |
+
Proof. Representing an $n$ -gram LM requires computing the probability of every symbol given the previous $n - 1$ symbols.[11] This can be performed by, at step $t$ , (1) storing the previous $n - 1$ symbols in the bounded stack of size $m = n - 1$ and (2) checking the probability of the symbol $y_{t}$ given the $n - 1$ stored symbols. The required updates to the bounded stack can easily be performed by the stack-affine operation of shifting all symbols one position downward. Since all symbols perform that action, the function is 1-varied. Furthermore, since each input symbol induces the same update to the stack—the insertion of the symbol at the top of the stack—the BPDA is $\Sigma$ -determined. This makes $n$ -gram LMs efficiently representable by RNN LMs of size $D = (n - 1)\lceil \log_2(|\Sigma | + 1)\rceil$ .
|
| 269 |
+
|
| 270 |
+
# 5 Discussion
|
| 271 |
+
|
| 272 |
+
This work was motivated by the question of what classes of LMs beyond those over $\mathrm{D}(b, n)$ can be
|
| 273 |
+
|
| 274 |
+
efficiently represented by RNN LMs, a generalization of an open question posed by Hewitt et al. (2020). We address this with Thm. 4.1, whose implications we discuss next.
|
| 275 |
+
|
| 276 |
+
Analyzing LMs with general models of computation. This work puts the results by Hewitt et al. (2020) in a broader context of studying the representational capacity of RNN LMs not limited to human language phenomena. Restricting the analysis to isolated phenomena might not provide a holistic understanding of the model, its capabilities, and the upper bounds of its representational capacity. General models of computation provide a framework for such holistic analysis; besides being able to provide concrete lower and upper bounds on the (efficient) representational capacity, the thorough understanding of their relationship to human language also provides apt insights into the model's linguistic capabilities. For example, the simulation of $n$ -gram LMs shows that RNNs can efficiently represent representation-compatible strictly local LMs (Jäger and Rogers, 2012), a simple and well-understood class of LMs. This provides a concrete (albeit loose) lower bound on the efficient representational capacity of RNNs. Further, we directly study the efficient probabilistic representational capacity of RNN LMs rather than the binary acceptance of strings. This allows for a more natural and immediate connection between the inherently probabilistic neural LMs and probabilistic formal models of computation such as BPDAs.
|
| 277 |
+
|
| 278 |
+
Inductive biases of RNN LMs. Understanding neural LMs in terms of the classes of LMs they can efficiently represent allows us to reason about their inductive biases. When identifying the best model to explain the data, we suspect an RNN would prefer to learn simple representations that still effectively capture the underlying patterns, rather than more complex ones. We note that this is a form of inductive bias inherent to the model architecture; we do not address other defining aspects of inductive biases, such as the learning procedure itself. Understanding such inductive biases can then, as argued by Hewitt et al. (2020), lead to architectural improvements. One can, for example, design better architectures or training procedures that exploit these inductive biases, enforce them, or loosen them if they are too restrictive. In this light, Thm. 4.1 substantiates that there is nothing inherent in RNN LMs that biases them towards hierarchi-
|
| 279 |
+
|
| 280 |
+
cal languages since non-hierarchical ones can be modeled just as efficiently. Encouraging RNNs to learn and model cognitively plausible mechanisms for modeling language might, therefore, require us to augment them with additional mechanisms that explicitly model hierarchical structure, such as a stack (DuSell and Chiang, 2023). Thm. 4.1 also indicates that hierarchical languages might not be the most appropriate playground for studying the inductive biases of RNNs. For example, isolating the hidden state recurrence to the POP and PUSH operations disregards that, unlike a stack, an RNN can look at and modify the entire hidden state when performing the update; POP and PUSH operations are limited to modifying of the top of the stack.
|
| 281 |
+
|
| 282 |
+
Inductive biases and learnability. A defining aspect of an inductive bias is its effect on the learning behavior. While we do not discuss the learnability of bounded stack LMs by RNN LMs, we underscore the importance of this factor for a full understanding of inductive biases. Both theoretical and empirical insights are required; they provide an exciting avenue for future work, one which we see as deserving of its own treatment. More broadly, the inductive biases of a particular neural model rely on various aspects beyond the architecture, including the learning objective, the training algorithm, and features of the training data such as its ordering and size. With this in mind, we note that our results in no way suggest that RNNs are any worse at modeling hierarchical languages than non-hierarchical ones. The results merely provide a first step towards a more thorough understanding of the inductive biases and suggest that studies striving to understand RNNs' learning behavior should look beyond hierarchical languages.
|
| 283 |
+
|
| 284 |
+
On the connection to human language. Our paper was motivated by the question of whether RNNs can efficiently represent languages beyond $\mathrm{D}(b, n)$ , which models hierarchical structures prominent in human language. Interestingly, our exploration of a broader class of efficiently representable LMs revealed that $n$ -gram LMs, another class of models useful for studying human language processing, are also efficiently representable (Bickel et al., 2005; Shain et al., 2020; Wang et al., 2024). This suggests a compelling interpretation: While RNNs may not naturally prefer hierarchical languages, our extended framework associates them with a more extensive range of
|
| 285 |
+
|
| 286 |
+
human-relevant languages. This opens new avenues for understanding the inductive biases of RNNs and their connection to human language, encouraging further theoretical and empirical studies on the specific facets of human language that efficiently representable BPDAs can represent and that RNNs are adept at modeling.
|
| 287 |
+
|
| 288 |
+
# A new interpretation of Elman RNN recurrence.
|
| 289 |
+
|
| 290 |
+
As detailed by the construction in the proof of Thm. 4.1, the core principle behind the efficient representation lies in the utilization of different parts of the hidden state as placeholders for relevant symbols that have occurred in the context; see also Fig. 1. This suggests that a natural interpretation of the languages efficiently representable by Elman RNNs: Those recognized by an automaton that keeps a memory of a fixed number of elements that have occurred in the string so far.
|
| 291 |
+
|
| 292 |
+
# Relation to other classes of formal languages.
|
| 293 |
+
|
| 294 |
+
Striving to make the results as general as possible motivates the connection of bounded stack languages to other well-understood classes of languages. Since bounded stack languages are a particular class of finite-state languages, a natural question is how they relate to the existing sub-regular languages. Those have in the past been connected to various aspects of human language (Jäger and Rogers, 2012) and the representational power of convolutional neural LMs (Merrill, 2019) and transformers (Yao et al., 2021). At first glance, efficiently representable BPDAs do not lend themselves to a natural characterization in terms of known classes of sub-regular languages, but we plan on investigating this further in future work.
|
| 295 |
+
|
| 296 |
+
# 6 Conclusion
|
| 297 |
+
|
| 298 |
+
We build on Hewitt et al.'s (2020) results and show that RNNs can efficiently represent a more general class of LMs than those over bounded Dyck languages. Concretely, we introduce bounded stack LMs as LMs defined by automata that keep $m$ selected symbols that have occurred in the string so far and update the memory using simple update mechanisms. We show that instances of such LMs can be represented by RNN LMs in optimal space. This provides a step towards a more holistic grasp of the inductive biases of RNN LMs.
|
| 299 |
+
|
| 300 |
+
# Limitations
|
| 301 |
+
|
| 302 |
+
We conclude by discussing some limitations of our theoretical investigation and point out some ways these limitations can be addressed. We first touch on the universality of the result implied by Thm. 4.1. While we provide a new, more general, class of languages efficiently representable by RNNs and discuss the implications of this result, we do not provide an exact characterization of RNNs' efficient representational capacity. In other words, we do not provide tight lower and upper bounds on the complexity of the languages that can be efficiently represented by RNNs. The lower bound of strictly local languages that can be encoded using parameter sharing is relatively loose $(\mathrm{D}(b,n)$ languages are much more complex than strictly local languages) and the upper bound remains evasive. This is because we do not characterize the relation of bounded stack languages to other classes of languages, such as sub-regular languages. Determining precise bounds is further complicated by the unavoidable fact that the efficient representational capacity of RNNs also depends on the parameterization of the specific probability distributions formal models of computation can represent, as made clear by Thm. 4.2. Establishing more concrete bounds is therefore a challenging open problem that is left for future work.
|
| 303 |
+
|
| 304 |
+
We note that all our results are also specifically tailored to Elman RNNs with the specific update rule from Eq. (3b). However, the results naturally generalize to the LSTM architecture in the same way that Hewitt et al.'s (2020) original constructions do.
|
| 305 |
+
|
| 306 |
+
# Ethics Statement
|
| 307 |
+
|
| 308 |
+
The paper provides a way to theoretically analyze language models. To the best of the authors' knowledge, this paper has no ethical implications.
|
| 309 |
+
|
| 310 |
+
# Acknowledgements
|
| 311 |
+
|
| 312 |
+
Ryan Cotterell acknowledges support from the Swiss National Science Foundation (SNSF) as part of the "The Forgotten Role of Inductive Bias in Interpretability" project. Anej Svete is supported by the ETH AI Center Doctoral Fellowship. We thank the reviewers for their insightful comments and suggestions.
|
| 313 |
+
|
| 314 |
+
# References
|
| 315 |
+
|
| 316 |
+
Steven Abney, David McAllester, and Fernando Pereira. 1999. Relating probabilistic grammars and automata. In Proceedings of the 37th Annual Meeting of the Association for Computational Linguistics, pages 542-549, College Park, Maryland, USA. Association for Computational Linguistics.
|
| 317 |
+
Steffen Bickel, Peter Haider, and Tobias Scheffer. 2005. Predicting sentences using n-gram language models. In Proceedings of Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing, pages 193-200, Vancouver, British Columbia, Canada. Association for Computational Linguistics.
|
| 318 |
+
Nadav Borenstein, Anej Svete, Robin Shing Moon Chan, Josef Valvoda, Franz Nowak, Isabelle Augenstein, Eleanor Chodroff, and Ryan Cotterell. 2024. What languages are easy to language-model? a perspective from learning probabilistic regular languages. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Bangkok, Thailand. Association for Computational Linguistics.
|
| 319 |
+
Haw-Shiuan Chang and Andrew McCallum. 2022. Softmax bottleneck makes language models unable to represent multi-mode word distributions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8048-8073, Dublin, Ireland. Association for Computational Linguistics.
|
| 320 |
+
Ryan Cotterell, Anej Svete, Clara Meister, Tianyu Liu, and Li Du. 2024. Formal aspects of language modeling. arXiv preprint 2311.04329.
|
| 321 |
+
A. K. Dewdney. 1977. Threshold matrices and the state assignment problem for neural nets. In Proceedings of the 8th South Eastern Conference on Combinatorics, Graph Theory and Computing, pages 227-245, Baton Rouge, La, USA.
|
| 322 |
+
Li Du, Lucas Torroba Hennigen, Tiago Pimentel, Clara Meister, Jason Eisner, and Ryan Cotterell. 2023. A measure-theoretic characterization of tight language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 9744-9770, Toronto, Canada. Association for Computational Linguistics.
|
| 323 |
+
Brian DuSell and David Chiang. 2023. The surprising computational power of nondeterministic stack RNNs. arXiv preprint 2210.01343.
|
| 324 |
+
Jeffrey L. Elman. 1990. Finding structure in time. Cognitive Science, 14(2):179-211.
|
| 325 |
+
Yiding Hao, William Merrill, Dana Angluin, Robert Frank, Noah Amsel, Andrew Benz, and Simon Mendelsohn. 2018. Context-free transductions with neural stacks. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 306-315, Brussels, Belgium. Association for Computational Linguistics.
|
| 326 |
+
|
| 327 |
+
John Hewitt, Michael Hahn, Surya Ganguli, Percy Liang, and Christopher D. Manning. 2020. RNNs can generate bounded hierarchical languages with optimal memory. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1978-2010, Online. Association for Computational Linguistics.
|
| 328 |
+
Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. *Neural Computation*, 9(8):1735-1780.
|
| 329 |
+
P. Indyk. 1995. Optimal simulation of automata by neural nets. In STACS '95, pages 337-348, Berlin, Heidelberg. Springer Berlin Heidelberg.
|
| 330 |
+
Gerhard Jäger and James Rogers. 2012. Formal language theory: Refining the Chomsky hierarchy. Philos Trans R Soc Lond B Biol Sci, 367(1598):1956-1970.
|
| 331 |
+
S. C. Kleene. 1956. Representation of events in nerve nets and finite automata. In C. E. Shannon and J. McCarthy, editors, Automata Studies. (AM-34), Volume 34, pages 3-42. Princeton University Press, Princeton.
|
| 332 |
+
Samuel A. Korsky and Robert C. Berwick. 2019. On the computational power of RNNs. CoRR, abs/1906.06349.
|
| 333 |
+
Warren S. McCulloch and Walter Pitts. 1943. A logical calculus of the ideas immanent in nervous activity. The bulletin of mathematical biophysics, 5(4):115-133.
|
| 334 |
+
William Merrill. 2019. Sequential neural networks as automata. In Proceedings of the Workshop on Deep Learning and Formal Languages: Building Bridges, pages 1-13, Florence. Association for Computational Linguistics.
|
| 335 |
+
William Merrill. 2023. Formal languages and the NLP black box. In *Developments in Language Theory: 27th International Conference, DLT* 2023, Umeå, Sweden, June 12–16, 2023, Proceedings, page 1–8, Berlin, Heidelberg. Springer-Verlag.
|
| 336 |
+
William Merrill, Ashish Sabharwal, and Noah A. Smith. 2022. Saturated transformers are constant-depth threshold circuits. Transactions of the Association for Computational Linguistics, 10:843-856.
|
| 337 |
+
William Merrill and Nikolaos Tsilivis. 2022. Extracting finite automata from RNNs using state merging. arXiv preprint arXiv:2201.12451.
|
| 338 |
+
William Merrill, Gail Weiss, Yoav Goldberg, Roy Schwartz, Noah A. Smith, and Eran Yahav. 2020. A formal hierarchy of RNN architectures. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 443-459, Online. Association for Computational Linguistics.
|
| 339 |
+
Marvin Lee Minsky. 1954. Neural Nets and the Brain Model Problem. Ph.D. thesis, Princeton University.
|
| 340 |
+
|
| 341 |
+
Antonio Orvieto, Samuel L Smith, Albert Gu, Anushan Fernando, Caglar Gulcehre, Razvan Pascanu, and Soham De. 2023. Resurrecting recurrent neural networks for long sequences.
|
| 342 |
+
Bo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak, Samuel Arcadinho, Huanqi Cao, Xin Cheng, Michael Chung, Matteo Grella, Kranthi Kiran GV, Xuzheng He, Haowen Hou, Przemyslaw Kazienko, Jan Kocon, Jiaming Kong, Bartlomiej Koptyra, Hayden Lau, Krishna Sri Ipsit Mantri, Ferdinand Mom, Atsushi Saito, Xiangru Tang, Bolun Wang, Johan S. Wind, Stansilaw Wozniak, Ruichong Zhang, Zhenyuan Zhang, Qihang Zhao, Peng Zhou, Jian Zhu, and Rui-Jie Zhu. 2023. RWKV: Reinventing RNNs for the transformer era. arXiv preprint arXiv:2305.13048.
|
| 343 |
+
XiPeng Qiu, TianXiang Sun, YiGe Xu, YunFan Shao, Ning Dai, and XuanJing Huang. 2020. Pre-trained models for natural language processing: A survey. Science China Technological Sciences, 63(10):1872-1897.
|
| 344 |
+
Cory Shain, Idan Asher Blank, Marten van Schijndel, William Schuler, and Evelina Fedorenko. 2020. fmri reveals language-specific predictive coding during naturalistic sentence comprehension. Neuropsychologia, 138:107307.
|
| 345 |
+
Hava T. Siegelmann and Eduardo D. Sontag. 1992. On the computational power of neural nets. In Proceedings of the Fifth Annual Workshop on Computational Learning Theory, COLT '92, page 440-449, New York, NY, USA. Association for Computing Machinery.
|
| 346 |
+
Lena Strobl, William Merrill, Gail Weiss, David Chiang, and Dana Angluin. 2023. Transformers as recognizers of formal languages: A survey on expressivity. arXiv preprint arXiv:2311.00208.
|
| 347 |
+
Anej Svete and Ryan Cotterell. 2023a. Efficiently representing finite-state automata with recurrent neural networks. arXiv preprint arXiv:2310.05161v3.
|
| 348 |
+
Anej Svete and Ryan Cotterell. 2023b. Recurrent neural language models as probabilistic finite-state automata. arXiv preprint arXiv:2310.05161.
|
| 349 |
+
Anej Svete, Franz Nowak, Anisha Mohamed Sahabdeen, and Ryan Cotterell. 2024. Lower bounds on the expressivity of recurrent neural language models.
|
| 350 |
+
Shaonan Wang, Jingyuan Sun, Yunhao Zhang, Nan Lin, Marie-Francine Moens, and Chengqing Zong. 2024. Computational models to study language processing in the human brain: A survey.
|
| 351 |
+
Zhilin Yang, Zihang Dai, Ruslan Salakhutdinov, and William W. Cohen. 2018. Breaking the softmax bottleneck: A high-rank RNN language model. In International Conference on Learning Representations.
|
| 352 |
+
Shunyu Yao, Binghui Peng, Christos Papadimitriou, and Karthik Narasimhan. 2021. Self-attention networks can process bounded hierarchical languages.
|
| 353 |
+
|
| 354 |
+
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 3770-3785, Online. Association for Computational Linguistics.
|
| 355 |
+
Wangchunshu Zhou, Yuchen Eleanor Jiang, Peng Cui, Tiannan Wang, Zhenxin Xiao, Yifan Hou, Ryan Cotterell, and Mrinmaya Sachan. 2023. RecurrentGPT: Interactive generation of (arbitrarily) long text. arXiv preprint arXiv:2305.13304.
|
| 356 |
+
|
| 357 |
+
# A Related Work
|
| 358 |
+
|
| 359 |
+
This work is part of the ongoing effort to better apprehend the theoretical representational capacity of LMs, particularly those implemented with RNNs (Merrill, 2023). The study of the representational capacity of RNNs has a long history (see, e.g., McCulloch and Pitts, 1943; Minsky, 1954; Kleene, 1956; Siegelmann and Sontag, 1992; Hao et al., 2018; Korsky and Berwick, 2019; Merrill, 2019; Merrill et al., 2020; Hewitt et al., 2020; Merrill et al., 2022; Merrill and Tsilivis, 2022; Svete and Cotterell, 2023b; Svete et al., 2024, inter alia). Minsky (1954), for example, showed that binary-activated RNNs are equivalent to (deterministic) finite-state automata: They can represent any finite-state language and can be simulated by deterministic finite-state automata. Minsky's construction of an RNN simulating a general deterministic FSA was extended to the probabilistic—language modeling—setting by Svete and Cotterell (2023b).<sup>12</sup>
|
| 360 |
+
|
| 361 |
+
Recently, increased interest has been put on the efficient representational capacity of LMs and their inductive biases. To emulate a deterministic probabilistic FSA $\mathcal{A}$ with states $Q$ over the alphabet $\Sigma$ , Minsky's (1954) construction requires an RNN of size $\mathcal{O}(|\Sigma||Q|)$ . This was improved by Dewdney (1977), who established that a general FSA can be simulated by an RNN of size $\mathcal{O}\left(|\Sigma||Q|^{3/4}\right)$ , and further by Indyk (1995), who lowered this bound to $\mathcal{O}\left(|\Sigma|\sqrt{|Q|}\right)$ . The latter was also shown to be optimal for general (adversarial) FSAs. The starting point of this work, Hewitt et al. (2020), was the first to show the possibility of exponentially compressing a specific family of finite-state languages, namely the bounded Dyck languages. This provides an exponential improvement over the general FSA simulation results. In this work, we generalize this result to a more general class of languages, aiming to gain a more thorough understanding of the mechanisms that allow exponential compression with RNNs. As shown by Thm. 4.1, a possible candidate for the mechanism enabling exponential compression might be the notion of a bounded stack.
|
| 362 |
+
|
| 363 |
+
# A.1 Relation to Hewitt et al.'s (2020) Notion of Language Recognition
|
| 364 |
+
|
| 365 |
+
A crucial difference in our approach to that of Hewitt et al. (2020) is the direct treatment of language models rather than binary languages. The notion of recognition of binary languages by RNNs (or any other neural LM) can be somewhat tricky, since the LM assigns a probability to each string in the language, not just a binary decision of whether the string is in the language. To reconcile the discrepancy between the discrete nature of formal languages and the probabilistic nature of (RNN) LMs, Hewitt et al. (2020) define the so-called truncated recognition of a formal language.
|
| 366 |
+
|
| 367 |
+
Definition A.1. Let $\Sigma$ be an alphabet and $\alpha \in \mathbb{R}_+$ . An LM $p$ is said to recognize the language $\mathcal{L} \subseteq \Sigma^*$ with the threshold $\alpha$ if for every $\boldsymbol{y} = y_1 \ldots y_T \in \mathcal{L}$ , it holds for all $t \in [T]$ that
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
p \left(y _ {t} \mid \boldsymbol {y} _ {< t}\right) > \alpha \quad a n d \quad p (\operatorname {E O S} \mid \boldsymbol {y}) > \alpha . \tag {17}
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+
In words, a language $\mathcal{L}$ is recognized by $p$ if $p$ assigns sufficiently high probability to all allowed continuations of (sub)strings in $\mathcal{L}$ .<sup>14</sup>
|
| 374 |
+
|
| 375 |
+
The notion of truncated recognition allows Hewitt et al. (2020) to talk about the recognition of binary languages by RNNs and design RNNs efficiently representing bounded Dyck languages. In contrast to our results, they do not consider the exact probabilities in their constructions—they simply ensure that the probabilities of valid continuations in their constructions are bounded from below by a constant and those of invalid continuations are bounded from above by a constant. While this results in interesting insights and reusable mechanisms, as we showcase here, it is not clear how to generalize this approach to languages more general than the structured Dyck languages. Taking into account the exact probabilities
|
| 376 |
+
|
| 377 |
+
allows us to consider a more general class of languages, for example, $n$ -gram LMs. When applicable, thresholding the exact probabilities from our construction in the manner described by Def. A.1 allows us to reconstruct the construction of Hewitt et al. (2020), meaning that our results provide a convenient generalization of theirs.
|
| 378 |
+
|
| 379 |
+
# B Finite-state Automata and Bounded Stack Languages
|
| 380 |
+
|
| 381 |
+
The main part of the paper discussed the connection of LMs representable by BPDAs and RNNs. BPDA LMs, however, are a particular class of finite-state LMs, and we discuss this connection in more detail here.
|
| 382 |
+
|
| 383 |
+
# B.1 Probabilistic Finite-state Automata
|
| 384 |
+
|
| 385 |
+
We begin by more formally defining the notion of probabilistic finite-state automata (PFSAs). Probabilistic finite-state automata are a well-understood real-time computational model.
|
| 386 |
+
|
| 387 |
+
Definition B.1. A probabilistic finite-state automaton (PFSA) is a 5-tuple $(\Sigma, Q, \delta, \lambda, \rho)$ where $\Sigma$ is an alphabet, $Q$ is a finite set of states, $\delta \subseteq Q \times \Sigma \times \mathbb{R}_{\geqslant 0} \times Q$ is a finite set of weighted transitions where we write transitions $(q, y, w, q') \in \delta$ as $q \xrightarrow{y/w} q'$ , and $\lambda, \rho: Q \to \mathbb{R}_{\geqslant 0}$ are functions that assign each state its initial and final weight, respectively. Moreover, for all states $q \in Q$ , $\delta, \lambda$ and $\rho$ satisfy $\sum_{q \in Q} \lambda(q) = 1$ , and $\sum w + \rho(q) = 1$ .
|
| 388 |
+
|
| 389 |
+
$$
|
| 390 |
+
q \xrightarrow {y / w} q ^ {\prime} \in \delta
|
| 391 |
+
$$
|
| 392 |
+
|
| 393 |
+
We next define some basic concepts. A PFSA $\mathcal{A} = (\Sigma, Q, \delta, \lambda, \rho)$ is deterministic if $|\{q \mid \lambda(q) > 0\}| = 1$ and, for every $q \in Q, y \in \Sigma$ , there is at most one $q' \in Q$ such that $q \xrightarrow{y/w} q' \in \delta$ with $w > 0$ . Any state $q$ where $\lambda(q) > 0$ is called an initial state, and if $\rho(q) > 0$ , it is called a final state. A path $\pi$ of length $N$ is a sequence of subsequent transitions in $\mathcal{A}$ , denoted as
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
q _ {1} \xrightarrow {y _ {1} / w _ {1}} q _ {2} \xrightarrow {y _ {2} / w _ {2}} q _ {3} \dots q _ {N} \xrightarrow {y _ {N} / w _ {N}} q _ {N + 1}. \tag {18}
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
The yield of a path is $\mathbf{s}(\pi) \stackrel{\mathrm{def}}{=} y_1 \ldots y_N$ . The prefix weight $\widetilde{\mathbf{w}}$ of a path $\pi$ is the product of the transition and initial weights, whereas the weight of a path additionally has the final weight multiplied in. In symbols, this means
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\widetilde {\mathbf {w}} (\boldsymbol {\pi}) \stackrel {\text {d e f}} {=} \prod_ {n = 0} ^ {N} w _ {n}, \tag {19}
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\mathrm {w} (\boldsymbol {\pi}) \stackrel {\text {d e f}} {=} \prod_ {n = 0} ^ {N + 1} w _ {n}, \tag {20}
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
with $w_0 \stackrel{\mathrm{def}}{=} \lambda(q_1)$ and $w_{N+1} \stackrel{\mathrm{def}}{=} \rho(q_{N+1})$ . We write $\Pi(\mathcal{A})$ for the set of all paths in $\mathcal{A}$ and we write $\Pi(\mathcal{A}, \boldsymbol{y})$ for the set of all paths in $\mathcal{A}$ with yield $\boldsymbol{y}$ . The sum of weights of all paths that yield a certain string $\boldsymbol{y} \in \Sigma^*$ is called the stringsum, given in the notation below
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
\mathcal {A} (\boldsymbol {y}) \stackrel {\text {d e f}} {=} \sum_ {\boldsymbol {\pi} \in \Pi (\mathcal {A}, \boldsymbol {y})} \mathrm {w} (\boldsymbol {\pi}). \tag {21}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
The stringsum gives the probability of the string $y$ .
|
| 416 |
+
|
| 417 |
+
# B.2 Bounded-stack Probabilistic Finite-state Automata
|
| 418 |
+
|
| 419 |
+
The main text presented bounded stack LMs as LMs defined by BPDAs. While the specification with respect to bounded stacks is enough to connect them to RNN LMs, we can also investigate weakly equivalent PFSAs, establishing an explicit connection to this well-studied class of computational models. This relationship is characterized by the following theorem.
|
| 420 |
+
|
| 421 |
+
Theorem 3.1. The family of LMs induced by PFSAs is weakly equivalent to the family of LMs induced by BPDAs.
|
| 422 |
+
|
| 423 |
+
Proof. $(\Longleftarrow)$ . It is easy to see that any BPDA defines a PFSA: Since the set of possible bounded stack configurations is finite and $\mu$ simply defines transitions between the finitely many configurations,
|
| 424 |
+
|
| 425 |
+

|
| 426 |
+
Figure 5: An illustration of how one can think of BPDA LMs as being represented by three different mechanisms: a BPDA, a black-box PFSA, and an RNN.
|
| 427 |
+
|
| 428 |
+
one can think of the BPDA as defining transitions between the finitely many states represented by the configurations.
|
| 429 |
+
|
| 430 |
+
$(\Rightarrow)$ . Let $\mathcal{A} = (\Sigma, Q, \delta, \lambda, \rho)$ be a PFSA. We define the weakly equivalent BPDA $\mathcal{P} = (\Sigma, \Gamma, m, \mu, \lambda_{\mathcal{P}}, \rho_{\mathcal{P}})$ with $\Gamma = Q$ , $m = 1$ , $\lambda_{\mathcal{P}} = \lambda$ , $\rho_{\mathcal{P}} = \rho$ , $\mu(q, y, q') = \delta(q, y, q')$ for all $q, q' \in Q$ and $y \in \Sigma$ . By noting that there is a trivial bijection between the stack configurations and the states of the PFSA as well as between the two transition functions, it is easy to see that the BPDA $\mathcal{P}$ is weakly equivalent<sup>16</sup> to the PFSA $\mathcal{A}$ .
|
| 431 |
+
|
| 432 |
+
The interpretation of BPDA LMs in terms of three mechanisms—a stack modification function, an RNN, and a bounded-stack PFSA—is illustrated in Fig. 5, which shows the three update mechanisms in action on the same string.
|
| 433 |
+
|
| 434 |
+
# C Proofs
|
| 435 |
+
|
| 436 |
+
This section contains the proofs of the theorems stated and used in the paper.
|
| 437 |
+
|
| 438 |
+
# C.1 Emulating Stack Updates
|
| 439 |
+
|
| 440 |
+
This section contains the proof of Thm. 4.1. In many ways, it resembles the original exposition by Hewitt et al. (2020) but is presented in our notation and with the additional generality of BPDAs. Some aspects are also simplified in our framework (for example, we do not have to scale the inputs to the activation functions).
|
| 441 |
+
|
| 442 |
+
On the use of the Heaviside activation function. The proof below relies on the use of the Heaviside activation function. As mentioned in §2.1, due to the relationship between ReLU and H, the same results hold for ReLU-activated RNNs as well. More precisely, it is easy to show that
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
\mathrm {H} (i) = \operatorname {R e L U} (i) - \operatorname {R e L U} (i - 1) \tag {22}
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
for all $i \in \mathbb{Z}$ .<sup>17</sup> All our results therefore map to the setting of ReLU-activated RNNs, but might require hidden states of twice the size to store the results of ReLU $(i)$ and ReLU $(i - 1)$ .<sup>18</sup> Interestingly, the
|
| 449 |
+
|
| 450 |
+
duplication of the size of the hidden state is not required for the same reason as in Hewitt et al. (2020); they use hidden states of size $2KmG$ (in our notation) to store the logarithmic encodings and their complements. This is required since it allows for an easier explicit determination of next-symbol probabilities. We do not require that. Notice that the binary complement $\overline{\mathbf{x}}$ of a vector $\mathbf{x} \in \{0,1\}^D$ is its affine transformation $\overline{\mathbf{x}} = \mathbf{1}_D - \mathbf{x}$ . Thus, the transformation $\mathbf{x} \mapsto \overline{\mathbf{x}}$ can be absorbed into the affine transformation $\mathbf{Ex} + \mathbf{u}$ .<sup>19</sup>
|
| 451 |
+
|
| 452 |
+
Theorem 4.1. Let $\mathcal{P} = (\Sigma, \Gamma, m, \mu, \lambda, \rho)$ be a deterministic representation-compatible (cf. Def. 3.6) BPDA where
|
| 453 |
+
|
| 454 |
+
$$
|
| 455 |
+
\mu (\boldsymbol {\gamma}, y, \boldsymbol {\gamma} ^ {\prime}) = \left\{ \begin{array}{l l} \omega (\boldsymbol {\gamma}, y) & \text {i f} \boldsymbol {\gamma} ^ {\prime} = \alpha (\zeta (\boldsymbol {\gamma}, y)) \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {16}
|
| 456 |
+
$$
|
| 457 |
+
|
| 458 |
+
for a $\Sigma$ -determined function $\alpha$ (cf. Def. 3.5) and a $K$ -varied function (cf. Def. 3.4) $\zeta$ where all $\zeta_k$ are stack-affine (cf. Def. 3.3). Then, $\mathcal{P}$ is $K$ -efficiently representable (cf. Def. 3.2).
|
| 459 |
+
|
| 460 |
+
Proof. The proof of Thm. 4.1 requires us to show that the RNN recurrence (cf. Eq. (3b)) can $(i)$ implement the update mechanisms implementing the stack update mechanism of the BPDA and $(ii)$ encode the same next-symbol probabilities as the BPDA. We do that by defining the appropriate recurrence and input matrices $\mathbf{U}$ and $\mathbf{V}$ , the bias vector $\mathbf{b}$ , and the output parameters $\mathbf{E}$ and $\mathbf{u}$ . We also use one-hot encodings of input symbols $y$ , which we denote with $\llbracket y\rrbracket$ . More precisely, for a bijection $h\colon \Sigma \to \left|\Sigma \right|$ , we define the entries of $\llbracket y\rrbracket \in \{0,1\}^{\left|\Sigma \right|}$ as
|
| 461 |
+
|
| 462 |
+
$$
|
| 463 |
+
\llbracket y \rrbracket_ {i} \stackrel {\mathrm {d e f}} {=} \mathbb {1} \left\{i = h (y) \right\} \tag {23}
|
| 464 |
+
$$
|
| 465 |
+
|
| 466 |
+
for $i\in [|\Sigma |]$
|
| 467 |
+
|
| 468 |
+
The condition Eq. (16) can be equivalently expressed as the requirement that (the deterministic) $\mathcal{P}$ defines the next-stack configuration function $\phi$ of the form
|
| 469 |
+
|
| 470 |
+
$$
|
| 471 |
+
\phi (\boldsymbol {\gamma}, y) = \alpha (\zeta (\boldsymbol {\gamma}, y), y) \tag {24}
|
| 472 |
+
$$
|
| 473 |
+
|
| 474 |
+
for a $\Sigma$ -determined function $\alpha$ and a $K$ -varied function $\zeta$ where all $\zeta_k$ are stack-affine. Definitionally, it thus holds for all $\zeta_k$ that
|
| 475 |
+
|
| 476 |
+
$$
|
| 477 |
+
\chi \left(\zeta_ {k} (\gamma , y)\right) = \chi \left(\zeta_ {k} (\gamma)\right) = \mathbf {M} ^ {k} \chi (\gamma) + \mathbf {v} ^ {k} \tag {25}
|
| 478 |
+
$$
|
| 479 |
+
|
| 480 |
+
for some matrix $\mathbf{M}^k\in \mathbb{R}^{mG\times mG}$ and $\mathbf{v}^k\in \mathbb{R}^{mG}$ . We now define $\kappa \colon \Sigma \to [K]$ as the function that maps a symbol $y\in \Sigma$ to the index of the set $y$ belongs to in the partition of $\Sigma$ . That is, we define
|
| 481 |
+
|
| 482 |
+
$$
|
| 483 |
+
\kappa (y) \stackrel {\text {d e f}} {=} k \quad \text {i f} y \in \Sigma_ {k}, \tag {26}
|
| 484 |
+
$$
|
| 485 |
+
|
| 486 |
+
where $\Sigma = \Sigma_{1} \sqcup \ldots \sqcup \Sigma_{K}$ is the partition defined by the $K$ -varied function $\zeta$ . Then, we have that
|
| 487 |
+
|
| 488 |
+
$$
|
| 489 |
+
\phi (\boldsymbol {\gamma}, y) = \alpha \left(\zeta_ {\kappa (y)} (\boldsymbol {\gamma}), y\right) = \alpha \left(\mathbf {M} ^ {\kappa (y)} \chi (\boldsymbol {\gamma}) + \mathbf {v} ^ {\kappa (y)}, y\right) \tag {27}
|
| 490 |
+
$$
|
| 491 |
+
|
| 492 |
+
This motivates the following implementation of $\phi$ with the RNN recurrence:
|
| 493 |
+
|
| 494 |
+
1. Divide the hidden state $\mathbf{h}$ into $K$ copies, one of those containing the vectorial representation of the actual stack (cf. Eq. (11)).
|
| 495 |
+
2. Depending on the input symbol $y \in \Sigma$ , perform the appropriate affine transformation $\mathbf{h} \mapsto \mathbf{M}^{\kappa(y)}\mathbf{h} + \mathbf{v}^{\kappa(y)}$ .
|
| 496 |
+
3. Apply the $\Sigma$ -determined function $\alpha$ .
|
| 497 |
+
|
| 498 |
+
We thus define, for the (single) initial configuration of $\mathcal{P}$ , $\gamma_0$ ,
|
| 499 |
+
|
| 500 |
+
$$
|
| 501 |
+
\boldsymbol {\eta} = \mathbf {h} _ {0} \stackrel {\text {d e f}} {=} \left( \begin{array}{c} \chi (\boldsymbol {\gamma} _ {0}) \\ \mathbf {0} _ {m G} \\ \vdots \\ \mathbf {0} _ {m G} \end{array} \right) \in \{0, 1 \} ^ {K m G}, \tag {28}
|
| 502 |
+
$$
|
| 503 |
+
|
| 504 |
+
which encodes the initial configuration. In general, we will write
|
| 505 |
+
|
| 506 |
+
$$
|
| 507 |
+
\mathbf {h} = \left( \begin{array}{c} \mathbf {h} ^ {1} \\ \vdots \\ \mathbf {h} ^ {K} \end{array} \right) \in \{0, 1 \} ^ {K m G}. \tag {29}
|
| 508 |
+
$$
|
| 509 |
+
|
| 510 |
+
We will say that the hidden state $\mathbf{h}$ satisfies the single-copy invariance if at most one of the components $\mathbf{h}^1, \ldots, \mathbf{h}^K$ is non-zero. This completes step 1.
|
| 511 |
+
|
| 512 |
+
To implement steps 2 and 3 we proceed as follows. To perform the $K$ different stack-affine functions, we define the parameters
|
| 513 |
+
|
| 514 |
+
$$
|
| 515 |
+
\mathbf {U} \stackrel {\text {d e f}} {=} \left( \begin{array}{c c c} \mathbf {M} ^ {1} & \dots & \mathbf {M} ^ {1} \\ \vdots & \ddots & \vdots \\ \mathbf {M} ^ {K} & \dots & \mathbf {M} ^ {K} \end{array} \right) \in \mathbb {R} ^ {K m G \times K m G} \tag {30a}
|
| 516 |
+
$$
|
| 517 |
+
|
| 518 |
+
$$
|
| 519 |
+
\mathbf {b} \stackrel {\text {d e f}} {=} \left( \begin{array}{c} \mathbf {v} ^ {1} \\ \vdots \\ \mathbf {v} ^ {K} \end{array} \right) \quad \in \mathbb {R} ^ {K m G}. \tag {30b}
|
| 520 |
+
$$
|
| 521 |
+
|
| 522 |
+
We also define the input matrix $\mathbf{V}$ as
|
| 523 |
+
|
| 524 |
+
$$
|
| 525 |
+
\mathbf {V} \stackrel {\text {d e f}} {=} \left(\mathbf {r} \left(y _ {1}\right) \quad \dots \quad \mathbf {r} \left(y _ {| \Sigma |}\right)\right) \in \mathbb {R} ^ {K m G \times | \Sigma |} \tag {31}
|
| 526 |
+
$$
|
| 527 |
+
|
| 528 |
+
where, for $y \in \Sigma$ , we write
|
| 529 |
+
|
| 530 |
+
$$
|
| 531 |
+
\mathbf {r} (y) = \left( \begin{array}{c} \mathbf {r} (y) ^ {1} \\ \vdots \\ \mathbf {r} (y) ^ {K} \end{array} \right) \in \mathbb {R} ^ {K m G}, \tag {32}
|
| 532 |
+
$$
|
| 533 |
+
|
| 534 |
+
and define
|
| 535 |
+
|
| 536 |
+
$$
|
| 537 |
+
\mathbf {r} (y) ^ {k} \stackrel {\text {d e f}} {=} \left\{ \begin{array}{l l} \mathbf {z} (y) & \text {i f} k = \kappa (y) \\ - \mathbf {1} _ {m G} & \text {o t h e r w i s e} \end{array} , \right. \tag {33}
|
| 538 |
+
$$
|
| 539 |
+
|
| 540 |
+
where finally
|
| 541 |
+
|
| 542 |
+
$$
|
| 543 |
+
\mathbf {z} (y) _ {j} = \left\{ \begin{array}{l l} \mathbf {0} _ {G} & \text {i f} j \in \mathcal {J} _ {1} ^ {y} \\ 2 \operatorname {B i n} (s (y)) - \mathbf {1} _ {G} & \text {i f} j \in \mathcal {J} _ {2} ^ {y}, \\ - \mathbf {1} _ {G} & \text {i f} j \in \mathcal {J} _ {3} ^ {y} \end{array} \right. \tag {34}
|
| 544 |
+
$$
|
| 545 |
+
|
| 546 |
+
for $j \in [m]$ . Here, $\mathbf{1}_G$ is the $G$ -dimensional vector of ones.
|
| 547 |
+
|
| 548 |
+
We now show that the parameters defined above simulate the stack update function $\phi$ correctly. Let $\pmb{y} \in \Sigma^{*}$ , $\pmb{\gamma} \stackrel{\mathrm{def}}{=} \varphi(\pmb{y})$ , and $y \in \Sigma$ . Furthermore, assume (by an inductive hypothesis) that $\mathbf{h}$ satisfies the single-copy invariance and that the non-zero component of $\mathbf{h}$ contains $\chi(\pmb{\gamma})$ . We want to show that $\mathbf{h}' \stackrel{\mathrm{def}}{=} \mathbf{H}(\mathbf{U}\mathbf{h} + \mathbf{V}[[y]] + \mathbf{b})$ ( $I$ ) satisfies the single-copy invariance, and (2) that the non-zero copy in $\mathbf{h}'$ contains exactly the encoding $\chi(\phi(\pmb{\gamma}, y))$ . Because of the single-copy invariance of $\mathbf{h}$ and the definition of $\mathbf{U}$ , we see that
|
| 549 |
+
|
| 550 |
+
$$
|
| 551 |
+
\mathbf {U} \mathbf {h} + \mathbf {b} = \left( \begin{array}{c} \mathbf {M} ^ {1} \mathbf {h} + \mathbf {v} ^ {1} \\ \vdots \\ \mathbf {M} ^ {K} \mathbf {h} + \mathbf {v} ^ {K} \end{array} \right). \tag {35}
|
| 552 |
+
$$
|
| 553 |
+
|
| 554 |
+
We now note that, for $\zeta_k$ to be a valid stack-affine function, it has to hold that $\mathbf{M}^k\mathbf{h} + \mathbf{v}^k \in \{0,1\}^{mG}$ . Now, let $k \in [K]$ . We distinguish two cases:
|
| 555 |
+
|
| 556 |
+
- $k = \kappa(y)$ . Then
|
| 557 |
+
|
| 558 |
+
$$
|
| 559 |
+
\mathbf {V} [ [ y ] ] = \mathbf {r} (y) ^ {\kappa (y)} = \mathbf {z} (y). \tag {36}
|
| 560 |
+
$$
|
| 561 |
+
|
| 562 |
+
This results in the entries
|
| 563 |
+
|
| 564 |
+
$$
|
| 565 |
+
\begin{array}{l} \left. \mathrm {H} \left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {r} (y) ^ {\kappa (y)} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} = \mathrm {H} \left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {z} (y) + \mathbf {v} ^ {\kappa (y)}\right) _ {j} \right. (37a) \\ = \mathrm {H} \left(\left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} + \mathbf {z} (y) _ {j}\right). (37b) \\ \end{array}
|
| 566 |
+
$$
|
| 567 |
+
|
| 568 |
+
We further consider three cases
|
| 569 |
+
|
| 570 |
+
- $j \in \mathcal{J}_1^y$ . Then
|
| 571 |
+
|
| 572 |
+
$$
|
| 573 |
+
\begin{array}{l} \mathrm {H} \left(\left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} + \mathbf {z} (y) _ {j}\right) = \mathrm {H} \left(\left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} + \mathbf {0} _ {G}\right) (38a) \\ = \left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} (38b) \\ \end{array}
|
| 574 |
+
$$
|
| 575 |
+
|
| 576 |
+
- $j \in \mathcal{J}_2^y$ . Then
|
| 577 |
+
|
| 578 |
+
$$
|
| 579 |
+
\begin{array}{l} \left. \mathrm {H} \left(\left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} + \mathbf {z} (y) _ {j}\right) = \mathrm {H} \left(\left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} + 2 \operatorname {B i n} (s (y)) - \mathbf {1} _ {G}\right) \right. (39a) \\ = \operatorname {B i n} (s (y)) (39b) \\ \end{array}
|
| 580 |
+
$$
|
| 581 |
+
|
| 582 |
+
This follows from the fact that $2\operatorname{Bin}(s(y)) - \mathbf{1}_G$ contains the value 1 wherever $\operatorname{Bin}(s(y))$ is 1 and the value $-1$ elsewhere, masking out the entries in the vector that are not active in $\operatorname{Bin}(s(y))$ .
|
| 583 |
+
|
| 584 |
+
- $j\in \mathcal{J}_3^y$ . Then
|
| 585 |
+
|
| 586 |
+
$$
|
| 587 |
+
\begin{array}{l} \mathrm {H} \left(\left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} + \mathbf {z} (y) _ {j}\right) = \mathrm {H} \left(\left(\mathbf {M} ^ {\kappa (y)} \mathbf {h} + \mathbf {v} ^ {\kappa (y)}\right) _ {j} - \mathbf {1} _ {G}\right) (40a) \\ = \mathbf {0} _ {G} (40b) \\ \end{array}
|
| 588 |
+
$$
|
| 589 |
+
|
| 590 |
+
- $k \neq \kappa(y)$ . Then
|
| 591 |
+
|
| 592 |
+
$$
|
| 593 |
+
\mathbf {V} [ [ y ] ] = \mathbf {r} (y) ^ {k} = - \mathbf {1} _ {m G}, \tag {41}
|
| 594 |
+
$$
|
| 595 |
+
|
| 596 |
+
resulting in
|
| 597 |
+
|
| 598 |
+
$$
|
| 599 |
+
\mathbf {M} ^ {k} \mathbf {h} + \mathbf {r} (y) ^ {k} + \mathbf {v} ^ {k} = \mathbf {M} ^ {k} \mathbf {h} - \mathbf {1} _ {m G} + \mathbf {v} ^ {k}, \tag {42}
|
| 600 |
+
$$
|
| 601 |
+
|
| 602 |
+
whose entries are $\leqslant 0$ . This directly implies that
|
| 603 |
+
|
| 604 |
+
$$
|
| 605 |
+
\mathbf {H} \left(\mathbf {M} ^ {k} \mathbf {h} + \mathbf {r} (y) ^ {k} + \mathbf {v} ^ {k}\right) = \mathbf {0} _ {m G}, \tag {43}
|
| 606 |
+
$$
|
| 607 |
+
|
| 608 |
+
masking the $k^{\mathrm{th}}$ component of $\mathbf{h}^{\prime}$ .
|
| 609 |
+
|
| 610 |
+
Examining Eqs. (38b), (39b) and (40b) reveals that these results cover the three conditions of $\Sigma$ -determined function $\alpha$ . Moreover Eq. (43) shows that the update rule preserves the single-copy invariance: All but the $\kappa(y)^{\mathrm{th}}$ component of the hidden state are masked to 0. Summarizing, this shows that the RNN parametrized with the parameters $\mathbf{U}, \mathbf{V}$ , and $\mathbf{b}$ correctly implements the stack update function $\phi$ .
|
| 611 |
+
|
| 612 |
+
To extend this to the probabilistic setting, we use the assumption that $\mathcal{P}$ is representation-compatible. By definition, $\mathcal{P}$ then defines next-symbol probabilities $p(\overline{y} \mid \boldsymbol{y})$ where
|
| 613 |
+
|
| 614 |
+
$$
|
| 615 |
+
\log p (\bar {y} \mid \varphi (\boldsymbol {y})) = \operatorname {s o f t m a x} \left(\mathbf {E} ^ {\prime} \chi (\varphi (\boldsymbol {y})) + \mathbf {u} ^ {\prime}\right) _ {\bar {y}} \tag {44}
|
| 616 |
+
$$
|
| 617 |
+
|
| 618 |
+
for some matrix $\mathbf{E}' \in \mathbb{R}^{|\overline{\Sigma}| \times mG}$ and $\mathbf{u}' \in \mathbb{R}^{|\overline{\Sigma}|}$ . The first part of the proof shows that $\mathbf{h}(\boldsymbol{y})$ contains exactly one copy of $\chi(\varphi(\boldsymbol{y}))$ . We use that fact and define
|
| 619 |
+
|
| 620 |
+
$$
|
| 621 |
+
\mathbf {E} \stackrel {\text {d e f}} {=} \left(\mathbf {E} ^ {\prime} \quad \dots \quad \mathbf {E} ^ {\prime}\right) \in \mathbb {R} ^ {| \overline {{\Sigma}} | \times K m G} \tag {45a}
|
| 622 |
+
$$
|
| 623 |
+
|
| 624 |
+
$$
|
| 625 |
+
\mathbf {u} \stackrel {\text {d e f}} {=} \mathbf {u} ^ {\prime} \quad \in \mathbb {R} ^ {| \overline {{\Sigma}} |}, \tag {45b}
|
| 626 |
+
$$
|
| 627 |
+
|
| 628 |
+
which will result in the softmax-normalized RNN computing identical next-symbol probabilities to those computed by $\mathcal{P}$ . This means that $\mathcal{R}$ and $\mathcal{P}$ are weakly equivalent.
|
| 629 |
+
|
| 630 |
+
# C.2 On the Impossibility of Efficiently Representing All BPDA LMs
|
| 631 |
+
|
| 632 |
+
Theorem 4.2. There exist deterministic BPDAs whose transition function $\mu$ conforms to the structure in Eq. (16), but which are not efficiently representable for any $K$ independent of $|\Sigma|$ .
|
| 633 |
+
|
| 634 |
+
Proof. The reason behind this is intuitive—the $|\Sigma|^m$ next-symbol probability distributions defined by a BPDA LM can be completely arbitrary and might not lend themselves to a compact parametrization with matrix multiplication (cf. Def. 3.6). This is why the proof of Thm. 4.1 relies heavily on specific families of BPDA LMs that are particularly well-suited for efficient representation by RNN LMs through parameter sharing. More formally, this is a special case of the softmax bottleneck (Yang et al., 2018; Chang and McCallum, 2022; Borenstein et al., 2024): The notion that the representations $\mathbf{h}(\boldsymbol{y}) \in \mathbb{R}^D$ defining an LM whose conditional logits span a $d$ -dimensional subspace of $\mathbb{R}^{|\overline{\Sigma}|}$ must be of size $D \geqslant d$ . Because BPDAs can in general define full-rank distributions whose logits span $\mathbb{R}^{|\overline{\Sigma}|}$ , there exist BPDAs for which it has to hold that $D \geqslant |\overline{\Sigma}|$ . Any such BPDA is not efficiently representable; $|\overline{\Sigma}| \leqslant D \leqslant Cm\log_2|\Sigma|$ would require $C \geqslant \frac{|\overline{\Sigma}|}{m\log_2|\Sigma|}$ , which is not constant in $|\Sigma|$ .
|
| 635 |
+
|
| 636 |
+
Connection to the result by Hewitt et al. (2020). The impossibility result from Thm. 4.2 of course includes distributions over bounded Dyck languages as well. That is, a general distribution over a bounded Dyck language may not be efficiently represented by an RNN LM. This does not contradict the results from Hewitt et al. (2020)—the LMs considered by Hewitt et al. (2020) form a particular family of LMs that are efficiently representable by Elman RNN LMs. Intuitively, this is because of two reasons:
|
| 637 |
+
|
| 638 |
+
1. In their construction, the probability of the next symbol only depends on the top of the stack. As such, many stack configurations (and thus RNN hidden states) result in the same next-symbol probability distribution, allowing for more efficient encoding.
|
| 639 |
+
2. Hewitt et al. (2020) are only interested in recognizing binary languages, which means that they only consider LMs that assign sufficiently large probabilities to the correct continuations of the input string. Exact probabilities under the language model are not important.
|
2024/On Efficiently Representing Regular Languages as RNNs/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7ccb2c46df369602f879b944fe09bd8525dd6c17f299888b58fe720b47b701e
|
| 3 |
+
size 457404
|
2024/On Efficiently Representing Regular Languages as RNNs/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/8a58a270-a9e5-437e-bb95-bae3964ebb76_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/8a58a270-a9e5-437e-bb95-bae3964ebb76_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/8a58a270-a9e5-437e-bb95-bae3964ebb76_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b468405adf5b4149401a92fbf53a93b24c936f5fdcf6542e51e9209af214a299
|
| 3 |
+
size 1616614
|
2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/full.md
ADDED
|
@@ -0,0 +1,446 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation: A Survey
|
| 2 |
+
|
| 3 |
+
Lin Long $^{1}$ , Rui Wang $^{1}$ , Ruixuan Xiao $^{1}$
|
| 4 |
+
nbo Zhao $^{1}$ , Xiao Ding $^{2}$ , Gang Chen $^{1}$ , Haobo Wang $^{1*}$
|
| 5 |
+
|
| 6 |
+
<sup>1</sup>Zhejiang University, China <sup>2</sup>Harbin Institute of Technology, China
|
| 7 |
+
|
| 8 |
+
Correspondence: wanghaobo@zju.edu.cn
|
| 9 |
+
|
| 10 |
+
# Abstract
|
| 11 |
+
|
| 12 |
+
Within the evolving landscape of deep learning, the dilemma of data quantity and quality has been a long-standing problem. The recent advent of Large Language Models (LLMs) offers a data-centric solution to alleviate the limitations of real-world data with synthetic data generation. However, current investigations into this field lack a unified framework and mostly stay on the surface. Therefore, this paper provides an organization of relevant studies based on a generic workflow of synthetic data generation. By doing so, we highlight the gaps within existing research and outline prospective avenues for future study. This work aims to shepherd the academic and industrial communities towards deeper, more methodical inquiries into the capabilities and applications of LLMs-driven synthetic data generation.
|
| 13 |
+
|
| 14 |
+
# 1 Introduction
|
| 15 |
+
|
| 16 |
+
The game-changing emergence of Large Language Models (LLMs) instigated a significant paradigm shift in the field of deep learning (Zhang et al., 2023a; Guo et al., 2023; Bang et al., 2023). Despite these advancements, a large amount of high-quality data remains the foundation for building robust NLP models (Gandhi et al., 2024). To be more specific, here high-quality data typically refers to diverse data that carries rich supervision signals (generally in the form of labels) closely aligned with human intent. However, fulfilling such data reliance with human data can be challenging or even unrealistic sometimes, due to high costs, data scarcity, privacy concerns, etc. (Kurakin et al., 2023). Moreover, several studies (Hosking et al., 2023; Singh et al., 2023; Gilardi et al., 2023) have highlighted that human-generated data, being inherently susceptible to biases and errors, may not even be optimal for model training or evaluation. These considerations necessitate a more serious inquiry
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
Figure 1: Illustration of the LLMs-based application ecosystem, where synthetic data serves as the flowing nutrients for fruiting (training of small LMs or fine-tuning task-specific LLMs) and rooting (training stronger LLMs or self-improvement).
|
| 20 |
+
|
| 21 |
+
into the question: are there other more effective and scalable methods of data collection that can overcome the current limitations?
|
| 22 |
+
|
| 23 |
+
Given the recent advancements in LLMs, which demonstrate the capability to generate fluent text on par with human output (Hartvigsen et al., 2022; Sahu et al., 2022; Ye et al., 2022a; Tang et al., 2023; Gao et al., 2023a), synthetic data produced by LLMs emerges as a viable alternative or supplement to human-generated data. Specifically, synthetic data is designed to mimic the characteristics and patterns of real-world data (Liu et al., 2024). On the one hand, LLMs, through extensive pretraining, have acquired a vast repository of knowledge and demonstrate exceptional linguistic comprehension (Kim et al., 2022; Ding et al., 2023a), which forms a foundation for generating faithful data. On the other hand, the profound instruction-following capabilities of LLMs allow better controllability and adaptability over the generation process, facilitating the creation of tailored datasets for specific applications with more flexible process designs (Eldan and Li, 2023). These two advantages make LLMs highly promising synthetic data generators.
|
| 24 |
+
|
| 25 |
+
As a pivotal application of LLMs, synthetic data
|
| 26 |
+
|
| 27 |
+
generation holds significant importance for the development of deep learning. As shown in Figure 1, LLMs-driven synthetic data generation (Li et al., 2023c; Wang et al., 2021; Seedat et al., 2023) enables the automation of the entire model training and evaluation process with minimal human participation required in the loop (Huang et al., 2023), which allows the advantages of deep learning models to be applied across a broader range of applications. Beyond providing a scalable supply of training and testing data, LLM-driven synthetic data generation also may pave the way for developing next-generation LLMs. Insights from TinyStories (Eldan and Li, 2023) and the Phi series (Gunasekar et al., 2023; Li et al., 2023b) emphasize that data quality is crucial for effective model learning, while LLMs empower us to actively "design" what the models learn through data manipulation, significantly enhancing the efficacy and controllability of model training. As of June 2024, there are over 300 datasets on Hugging Face<sup>1</sup> that are tagged as "synthetic", with many mainstream LLMs leveraging high-quality synthetic data for training, including Alpaca (Taori et al., 2023), Vicuna (Zheng et al., 2023), OpenHermes 2.5, and Openchat 3.5 (Wang et al., 2023a).
|
| 28 |
+
|
| 29 |
+
Though seemingly straightforward, generating synthetic datasets that simultaneously have high correctness and sufficient diversity requires careful process designs and involves a lot of tricks (Gandhi et al., 2024), making LLMs-driven synthetic data generation a non-trivial problem. While most existing works generally target data generation for various tasks (e.g., pre-training (Gunasekar et al., 2023; Li et al., 2023b; Eldan and Li, 2023), fine-tuning (Mukherjee et al., 2023; Mitra et al., 2023; Xu et al., 2023a), evaluation (Feng et al., 2023; Wei et al., 2024)) across different domains (e.g., math (Yu et al., 2023a; Luo et al., 2023a), code (Luo et al., 2023b; Wei et al., 2023b), instruction (Honovich et al., 2023a; Wang et al., 2023d)), they share many common ideas. To address the lack of a unified framework in the emerging field of LLM-driven synthetic data generation and develop a general workflow, this survey investigates recent studies and organizes them according to the topics of generation, curation, and evaluation, which are closely related, as shown in Figure 2. Our primary aim is to provide a comprehensive overview of the current state of the field, identify key areas of focus,
|
| 30 |
+
|
| 31 |
+
and highlight the gaps that remain to be addressed. We hope to bring insights to both the academic and industrial communities and drive further development in LLM-driven synthetic data generation.
|
| 32 |
+
|
| 33 |
+
# 2 Preliminaries
|
| 34 |
+
|
| 35 |
+
# 2.1 Problem Definition
|
| 36 |
+
|
| 37 |
+
In this paper, we investigate the challenge of generating high-quality synthetic data using pretrained LLMs, denoted as $\mathcal{M}$ . Rather than creating new datasets from scratch, in more cases, we perform data augmentation with a small number of seed samples or unlabeled inputs, which we denote uniformly as $\mathcal{D}_{\mathrm{sup}}$ . Although optional for LLMs-driven synthetic data generation, $\mathcal{D}_{\mathrm{sup}}$ can typically provide valuable supporting information when available. Consequently, the overall generation task can be formulated as:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\mathcal {D} _ {\text {g e n}} \leftarrow \mathcal {M} _ {p} (\mathcal {T}, \mathcal {D} _ {\sup }), \tag {1}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $\mathcal{D}_{\mathrm{gen}}$ represents the final generated dataset, and $p$ refers to the prompt used for model inference. $\mathcal{T}$ specifies the generation task, such as rewriting, question answering, annotation, etc. Notably, data annotation as a specialized paradigm of synthetic data generation, has particularly extensive applicability, including RLAIF (Bai et al., 2022) and LLMs-based evaluation (Chen et al., 2023b; Zheng et al., 2023; Kim et al., 2023), which may involve specific challenges and corresponding solution techniques. Due to page limitations, further details about data annotation can be found in Appendix A.
|
| 44 |
+
|
| 45 |
+
# 2.2 Requirements of $\mathcal{D}_{\mathrm{gen}}$
|
| 46 |
+
|
| 47 |
+
Briefly speaking, our goal is to generate data that closely aligns with evaluation metrics. While the standard of high-quality data may vary across different downstream tasks, there are two general requirements that are considered challenging in most existing literature:
|
| 48 |
+
|
| 49 |
+
- Faithfulness. To provide valid supervision, the generated data must first be logically and grammatically coherent. However, the inherent problems of hallucination fat-tailed knowledge distribution of LLMs can introduce significant noise into the generated results, manifesting as factual errors, incorrect labels, or irrelevant content. These issues become more pronounced when generating long, complex, or domain-specific data.
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 2: A taxonomy of LLMs-driven synthetic data generation, curation, and evaluation.
|
| 57 |
+
|
| 58 |
+
- Diversity. Diversity captures the variation among the generated data, reflecting differences in text length, topic, or even writing style. It is crucial for generating synthetic samples that mimic the diversified nature of real-world data, thereby preventing overfitting and bias during model training or evaluation. Nevertheless, due to the inherent biases of LLMs, uncontrolled generated content often tends to be monotonous, limiting its applicability in downstream tasks.
|
| 59 |
+
|
| 60 |
+
These two requirements are the focal points of most current research efforts. In the subsequent workflow, we will introduce how different methods address these issues.
|
| 61 |
+
|
| 62 |
+
# 3 Generic Workflow
|
| 63 |
+
|
| 64 |
+
Existing studies on LLMs-driven synthetic data generation generally incorporate three main topics: generation, curation, and evaluation. Various approaches are employed within these aspects to collaboratively achieve optimal data generation.
|
| 65 |
+
|
| 66 |
+
# 3.1 Data Generation
|
| 67 |
+
|
| 68 |
+
In this section, we systematically summarize some common practices for synthetic data generation with LLMs, which can be roughly divided into prompt engineering and multi-step generation. An overall illustration is provided in Figure 3.
|
| 69 |
+
|
| 70 |
+
# 3.1.1 Prompt Engineering
|
| 71 |
+
|
| 72 |
+
One of the greatest advantages of LLMs for synthetic data generation is their instruction-following capability, which contributes to great controllability (Wang et al., 2023c; Radford et al., 2019). Therefore, many approaches try to guide LLMs with heuristic prompts to enhance the faithfulness and diversity of the synthetic data (Liu et al., 2024).
|
| 73 |
+
|
| 74 |
+
Empirically, an effective prompt generally contains three key elements: task specification $e_{\mathrm{task}}$ , generation conditions $e_{\mathrm{condition}}$ , and in-context demonstrations $e_{\mathrm{demo}}$ , which are then collectively wrapped with a template $E$ into the form of natural instruction:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
p (\mathcal {T}, \mathcal {D}) \leftarrow E \left(e _ {\text {t a s k}}, e _ {\text {c o n d i t i o n}}, e _ {\text {d e m o}}\right). \tag {2}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
As shown above, both the generation task $\mathcal{T}$ and the support dataset $\mathcal{D}$ will affect the design of $p$ . Next, we will proceed to detail how each part of the prompt should be appropriately designed to accommodate various scenarios.
|
| 81 |
+
|
| 82 |
+
Task Specification. In traditional crowdsourced annotation scenarios, the recruited workers are commonly offered a codebook that specifies the necessary contexts, such as task purpose, data explanation, and other background knowledge, so that they can better understand their jobs (Gilardi et al., 2023). Similarly, such task specification is crucial for setting the right context for LLMs-driven data generation, which can also include role-play (Li et al., 2023c), format clarification, knowledge augmentation (Xu et al., 2023b; Sudalairaj et al., 2024), etc. Evidence shows that a simple prologue such as "suppose you are a $\{xxx\}$ " can significantly improve the LLMs' performance by setting up a proper scenario for data generation and allowing the LLMs to better take on the roles (Li et al., 2023c). More formally, Yoo et al. (2021) defines the task specification with a triplet of text type, label type, and label-token verbalizer. Such a description header is particularly important when extra domain expertise is demanded to address issues like terminology complexities in both context understanding and data generation. Consequently, Xu et al. (2023b) leverages external knowledge graphs and LLMs to obtain domain topics for context-informed prompting, which effectively enhances the faithfulness and complexity of generated data.
|
| 83 |
+
|
| 84 |
+
Conditional Prompt. As mentioned in Section 2.2, a pivotal challenge in using LLMs for
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
|
| 88 |
+
# Prompt for Data Synthesis (AttrPrompt, Yu et al., 2023)
|
| 89 |
+
|
| 90 |
+
Suppose you are a news writer. Please generate affordable
|
| 91 |
+
|
| 92 |
+
care act news in NYT following requirements below:
|
| 93 |
+
1. Should focus on role of state governments;
|
| 94 |
+
2. Should be in length between 30 and 80 words;
|
| 95 |
+
3. The writing style of the news should be news analysis;
|
| 96 |
+
4. The location of the news is in Oceania.
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
|
| 104 |
+
# Prompt for Data Annotation (App. A) -- A Special Case (LLMAAA, Zhang et al., 2023)
|
| 105 |
+
|
| 106 |
+
You are a highly intelligent and accurate news domain namedentity recognition (NER) system. You take passage as input and your task is to recognize and extract specific types of named entities in that given passage and classify into a set of following predefined entity types: [PER,LOC,ORG,MISC] Your output format must be in ison form of:
|
| 107 |
+
|
| 108 |
+
{{"span":span,"type":type}}
|
| 109 |
+
|
| 110 |
+
Input: ... Output:
|
| 111 |
+
Input: Soccer - late goals give Japan win over Syria. Output:
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
|
| 119 |
+
# Prompts for Sample-Wise Multi-Step Generation (Self-Prompt, Li et al., 2023)
|
| 120 |
+
|
| 121 |
+
List some historical events:
|
| 122 |
+
|
| 123 |
+
This is a passage from Wikipedia about the historical even, The battle of Galipoli:
|
| 124 |
+
|
| 125 |
+
Here is a passage: The Battle of Gallipoli was ... over half a million men. Extract the named entities in it:
|
| 126 |
+
|
| 127 |
+
The Battle of Gallipoli was ... over half a million men. Dardanelles is the answer to the question:
|
| 128 |
+
|
| 129 |
+
The Battle of Gallipoli ... million men. Question: What is the name of the waterway that was the site of the Battle of Gallipoli? Answer: Dardanelles. You can refer to the passage and write a short explanation to this Question-Answer pair:
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
|
| 133 |
+
# LLM Reponses
|
| 134 |
+
|
| 135 |
+
D-Day, The Battle of Gallipoli, The Black Death, ...
|
| 136 |
+
|
| 137 |
+
The Battle of Galippoli ... and to open up a supply route to Russia through the Dardanelles and ... a million men.
|
| 138 |
+
|
| 139 |
+
Passage
|
| 140 |
+
|
| 141 |
+
April 1915, Dardanelles, the Black Sea, ...
|
| 142 |
+
|
| 143 |
+
What is the name of the waterway that was the site of the Battle of Gallipoli?
|
| 144 |
+
|
| 145 |
+
The Battle of Gallipoli was fought along the Dardanelles, a waterway that connects the Aegean Sea to the Sea of Marmara.
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
Example of Integrated Pipeline of Generating High-Quality Data (for Sentiment Analysis)
|
| 149 |
+
Figure 3: A toy example of effective synthetic data generation. The corresponding fields for task specification, conditions, and in-context demonstrations are highlighted, while $<>$ marks the switchable contents.
|
| 150 |
+
|
| 151 |
+
synthetic data generation is ensuring sufficient diversity, as directly prompting the LLMs to produce data for certain tasks often results in highly repetitive outputs, even with a high decoding temperature (Gandhi et al., 2024; Liu et al., 2024). Addressing this problem, a widely adopted strategy is conditional prompting, which explicitly and concretely communicates to the LLMs the specific type of data desired. The core of conditional prompting involves delineating the targeted data through the formulation of a series of condition-value pairs:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
e _ {\text {c o n d i t i o n}} = \left\{\left(c _ {1}, v _ {1}\right), \left(c _ {2}, v _ {2}\right), \dots , \left(c _ {n}, v _ {n}\right) \right\}, \tag {3}
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
which effectively characterizes the desired attributes and characteristics of the synthetic data. With different combinations of such attributes, we can automatically achieve a degree of "artificially
|
| 158 |
+
|
| 159 |
+
defined” diversity in the generated samples (Gunasekar et al., 2023; Li et al., 2023b; Eldan and Li, 2023). Conditional prompting not only allows better control over the diversity and coverage of the generated dataset but also refines the content to a narrower, more focused scope that is more likely to align with our specific expectations and requirements (Li et al., 2023c). Current research on conditional prompting primarily centers on the following two subjects:
|
| 160 |
+
|
| 161 |
+
1) Conditioning Scope. As the backbone of $e_{\mathrm{condition}}$ , conditioning scope defined by $\{c_1, \dots, c_n\}$ delineates the dimensions that we utilize to characterize our target data. Early studies (Gao et al., 2023a; Ye et al., 2022a,b) employed a basic output-conditional prompting strategy, utilizing the specific label asso
|
| 162 |
+
|
| 163 |
+
ciated with the classification task as the conditioning variable. The rationale behind this was primarily to maintain class balance and coverage. However, such a strategy is unsuitable for data lacking explicit category labels. Subsequent work by Yu et al. (2023b) argues that conditional-prompting with finer-grained attributes (e.g., topics, length, and style (Xu et al., 2023b)), can lead to more diversified generation due to the vast number of possible attribute combinations, being also applicable to open-ended data. Additionally, Eldan and Li (2023) also condition each generation on the task of incorporating three randomly chosen words into the generated story. This approach was also proven to significantly enhance the diversity of the generated data, shifting the focus from the heuristic features of the output to a more structured and targeted conditioning mechanism by adding "creative randomness" to the prompt (Eldan and Li, 2023).
|
| 164 |
+
|
| 165 |
+
2) Conditioning Values. After defining the conditioning scope, we then need to assign concrete values to each condition. Despite the seemingly straightforward strategy of sampling from the known classes or labels (Ye et al., 2022a), there are cases where such an instance pool is unavailable. Addressing this problem, Josifoski et al. (2023) actively retrieves the conditioning instances from external knowledge graphs, while Xu et al. (2023b); Ding et al. (2023b) leverage the LLMs to generate diversified instances for conditional prompting. Specifically, Ding et al. (2023b) construct a concept tree to delve into different subtopics, ensuring the coverage of sampled conditioning values, which then contributes to more diverse generated data. Moreover, the prompt template $E$ can also be considered a special type of condition. It has been demonstrated that incorporating templates with a certain level of randomness throughout the generation process can enhance the diversity of the generated contents (Meng et al., 2022).
|
| 166 |
+
|
| 167 |
+
In-Context Learning. Due to the inherent bias of LLMs, it remains challenging to elicit favorable responses from the LLMs with merely task specification and conditional prompting. In this case, a straightforward yet effective strategy is to provide several demonstrations, which can serve as a form of implicit human guidance. Research has shown
|
| 168 |
+
|
| 169 |
+
that, owing to LLMs' remarkable in-context learning (ICL) capabilities, a few exemplars can provide them with insights into the patterns exhibited in real-world data, thereby significantly improving the faithfulness of generated data (Li et al., 2023c). In the few-shot setting, where labeled samples are available in the support set $\mathcal{D}_{\mathrm{sup}}$ , these samples can be directly utilized as demonstrations for ICL. However, in scenarios where no ground truth data is available, approaches like Self-Instruct (Wang et al., 2023e) and Self-Prompting (Li et al., 2022) instead leverage ICL with synthetic demonstrations generated by LLMs. This allows the models to learn from their own predictions or other teacher models, even in the absence of labeled data.
|
| 170 |
+
|
| 171 |
+
However, given the constraint of prompt length and data inconsistency, the quality of in-context samples significantly affects the effectiveness of in-context learning. Sudalairaj et al. (2024) argue that randomly selecting in-context examples from the pool of seed samples, as done in Self-Instruct (Wang et al., 2023e), results in a lack of diversity and quality in the generated data. To address this issue, Sudalairaj et al. (2024) opt for selecting examples that concentrate on specific aspects to better stimulate the long tail of knowledge inherent in LLMs. Liu et al. (2022b) and Su et al. (2023) prioritize consistent samples as demonstrative examples based on their cosine similarity in the embedding space. Alternatively, Ye et al. (2022b) selects the most informative samples using quantified influence scores to steer the generation process. To enhance the informativeness of in-context examples, He et al. (2023) prompts LLMs to provide an explanation for each sample before integrating it into the prompt. This approach not only offers valuable additional information but also aligns well with the subsequent Chain-of-Thought generation.
|
| 172 |
+
|
| 173 |
+
# 3.1.2 Multi-Step Generation
|
| 174 |
+
|
| 175 |
+
In the previous paragraphs, we have introduced some common prompting strategies, which are typically designed for a specific generation task $\mathcal{T}$ . However, in most cases, due to the lack of enough reasoning abilities, it is unrealistic to expect the LLMs to generate the entire desired dataset within a single reference, especially when targeting data with complex structures or semantics (Cui and Wang, 2023). In addressing this problem, a common strategy is multi-step generation, through which the overall generation process is manually decomposed into a chain of simpler sub-tasks $\mathcal{T}_{1:k}$ ,
|
| 176 |
+
|
| 177 |
+
to force the LLMs to produce data in a step-by-step manner as scheduled:
|
| 178 |
+
|
| 179 |
+
$$
|
| 180 |
+
\mathcal {D} _ {i} \leftarrow \mathcal {M} _ {p _ {i}} ^ {i} \left(\mathcal {T} _ {i}, \mathcal {D} _ {0: i - 1}\right), i = 1, 2, \dots , k, \tag {4}
|
| 181 |
+
$$
|
| 182 |
+
|
| 183 |
+
where $\mathcal{D}_0 = \mathcal{D}_{\mathrm{sup}}$ . Each intermediate output $\mathcal{D}_i$ is generated using model $\mathcal{M}^i$ , prompted by $p_i$ , for a sub-task $\mathcal{T}_i$ . These outputs can then potentially be used in subsequent generations. By manually scheduling the generation procedure, we implicitly align the reasoning paths of LLMs with human prior knowledge. Specifically, there are two common strategies for task decomposition: sample-wise and dataset-wise decomposition, which mainly aim at enhancing the quality of synthetic data at different scales.
|
| 184 |
+
|
| 185 |
+
Sample-Wise Decomposition. A typical use-case of multi-step generation is for addressing the challenges of long-text processing and logical reasoning when dealing with multi-text data such as dialogues and entity-relation triplets. In such cases, a straightforward approach is to divide the sample into smaller chunks and generate only a portion of each sample at a time (Li et al., 2022; Ye et al., 2023; Wang et al., 2023e). In this way, $\mathcal{D}_{1:k}$ can be considered as different parts of $\mathcal{D}_{\mathrm{gen}}$ :
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
\mathcal {D} _ {\text {g e n}} = \left(\mathcal {D} _ {1}, \mathcal {D} _ {2}, \dots , \mathcal {D} _ {k}\right). \tag {5}
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
Notably, as shown in Eq. 4, each iteration of the generation process can be conditioned on the previously generated contents. For example, Ding et al. (2023b) prompts the LLMs to alternate between acting as the assistant and the user, replying to each other based on the context, ultimately producing a complete conversation transcript. In this way, the coherence among each internal component $\mathcal{D}_i$ can be pointedly reinforced with separated instructions, thus making it easier for the model to follow the requirements and generate more faithful data. It should be noted that $D_{1:k}$ may not necessarily form part of the final $D_{\mathrm{gen}}$ , instead, explicitly outputting some intermediate reasoning steps can also improve the generation of complex data (Bai et al., 2022; He et al., 2023). Chain-of-Thought (CoT) prompting stands out as one of the most popular strategies for improving the faithfulness of LLM-generated content (Wei et al., 2022). Nevertheless, current research on the exploration of such latent metadata is still insufficient, leaving sample-wise task decomposition from a reasoning perspective an open problem for future studies.
|
| 192 |
+
|
| 193 |
+
Dataset-Wise Decomposition. In Section 3.1.1 we have introduced how to generate data with specified properties. However, generating a series of such data that can eventually form a dataset with good diversity and domain coverage requires long-term scheduling. To this end, dataset-wise task decomposition dynamically adjusts the conditions used at each stage of multi-step generation to ensure the overall dataset grows in the right direction:
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
\mathcal {D} _ {\text {g e n}} = \bigcup_ {i = 1} ^ {k} \mathcal {D} _ {i}. \tag {6}
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
Specifically, S3 (Wang et al., 2023b) targets the most frequently mislabeled categories at each iteration, according to the performance of the downstream model trained on previously generated data. Similarly, Honovich et al. (2023b); Shao et al. (2023) utilize a generate-then-expand paradigm, to enhance the diversity of the overall dataset accordingly. Some other methods also leverage specific data structures to model the pathways of data generation. For example, Explore-Instruct (Wan et al., 2023) models the domain space as a tree structure and continually refines the generated data along with tree traversal to promote both the specialization and domain coverage of the generated data.
|
| 200 |
+
|
| 201 |
+
# 3.2 Data Curation
|
| 202 |
+
|
| 203 |
+
After the preceding steps, one may excessively generate overflowing and theoretically unlimited data $\mathcal{D}_{\mathrm{gen}}$ . However, these datasets often comprise a considerable portion of noisy, worthless, or even toxic samples, which primarily stems from two causes. Firstly, LLMs can inevitably produce corrupted samples with incorrect labels due to the hallucination problem. Secondly, ineffective prompts containing ambiguous descriptions can trick the model into generating irrelevant or redundant samples. Consequently, directly utilizing these low-quality data without proper processing may have a significant negative impact.
|
| 204 |
+
|
| 205 |
+
To address this, plenty of data curation approaches have been studied, which mainly fall into two dominant groups of high-quality sample filtering and label enhancement as elaborated below.
|
| 206 |
+
|
| 207 |
+
# 3.2.1 High-Quality Sample Filtering
|
| 208 |
+
|
| 209 |
+
Sample filtering aims to weed out undesired low-quality samples and obtain a more helpful subset $\mathcal{D}_{\mathrm{curated}} \subset \mathcal{D}_{\mathrm{gen}}$ . These methods typically design heuristic criteria or re-weighting functions to rerank samples for filtering, as shown in Figure 4.
|
| 210 |
+
|
| 211 |
+

|
| 212 |
+
Figure 4: Two dominant approaches of data curation.
|
| 213 |
+
|
| 214 |
+
Heuristic Metrics. For methods based on heuristic metrics, the key step is to design appropriate criteria based on the learning dynamics, such as confidence score (Seedat et al., 2023), influence function (Ye et al., 2022b), and generation ability (Meng et al., 2022). SuperGen (Meng et al., 2022) employs the estimated generation probability to identify samples most related to the desired label. Seedat et al. (2023) discard samples with both low confidence and low uncertainty. Some other methods assume that clean samples are prone to hold similar predictions under different conditions and employ cross-condition consistency for filtering. Specifically, such consistency can be between LLM and downstream classifier (Yu et al., 2023c), between multiple executions (Ye et al., 2023), or between neighboring data points (Seedat et al., 2023). More recently, Chen et al. (2023b) leverage the powerful text understanding capabilities of large models to assess the quality of different samples and filter out the ones with scores lower than a specific threshold. Their findings indicate that Alpagasus (Chen et al., 2023b), trained on a much smaller but curated dataset, notably surpasses the original Alpaca (Taori et al., 2023) across several benchmarks, underscoring the critical role of data curation.
|
| 215 |
+
|
| 216 |
+
Sample Re-Weighting. On the other hand, reweighting methods believe all data are valuable but with varying importance. Thus, they assign larger weights to correctly annotated or influential samples during downstream utilization (Zhang et al., 2023b; Gao et al., 2023a; Meng et al., 2023). For instance, SunGen (Gao et al., 2023a) proposes an adaptive bi-level re-weighting algorithm without human annotations. FewGen (Meng et al., 2023) designs a discriminative meta-learning objective to adjust sample weights and demarcate the nuanced differences between different labels.
|
| 217 |
+
|
| 218 |
+
# 3.2.2 Label Enhancement
|
| 219 |
+
|
| 220 |
+
Label enhancement methods strive to rectify the potentially erroneous annotations in generated samples. Due to confirmation bias, it is unrealistic for LLMs to identify their own mistakes. To address this, recent works either rely on human intervention or incorporate a student model for human-free knowledge distillation.
|
| 221 |
+
|
| 222 |
+
Human Intervention. A straightforward strategy for label refinery is to include human efforts to re-announce the corrupted samples (Chung et al., 2023a; Wang et al., 2021; Pangakis et al., 2023). Wang et al. (2021) proposed to actively select samples with the lowest confidence for human re-labeling. Pangakis et al. (2023) and Liu et al. (2022a) further emphasize the importance of human review and suggest comparing annotations from humans and LLMs guided by the same codebook. Despite the simplicity, these methods can lead to considerable labeling costs and can be unrealistic in practical deployment.
|
| 223 |
+
|
| 224 |
+
Auxiliary Model. To reduce the labeling cost, a more pragmatic human-free paradigm is developed which involves auxiliary student models for knowledge distillation and label refinery (Xiao et al., 2023; Zhao et al., 2023a; Saad-Falcon et al., 2023). These methods rely on the weakly supervised ability of student models and hypothesize that a student distilled from the LLM teacher can produce superior labels. The seminal work FreeAL (Xiao et al., 2023) proposes a collaborative framework, where a student model is leveraged to distill the high-quality task-related knowledge from the weak annotations and in return feedback LLMs for label refinery. MCKD (Zhao et al., 2023a) designs a multistage distillation pipeline with data-split training and cross-partition labeling to avoid overfitting on noisy labels. With the expanding abilities and availability of LLMs, the incorporation of auxiliary student models will play a more crucial role as a cost-effective alternative to human intervention.
|
| 225 |
+
|
| 226 |
+
# 3.3 Data Evaluation
|
| 227 |
+
|
| 228 |
+
Before the employment of generated data, it is important to evaluate the quality and application effectiveness of the data, to ensure its value to downstream tasks. The current mainstream evaluation methods can be roughly divided into two categories: direct and indirect, which evaluate the quality of $\mathcal{D}_{\mathrm{gen}}$ individually and through its effectiveness on downstream tasks, respectively.
|
| 229 |
+
|
| 230 |
+

|
| 231 |
+
Figure 5: Direct and indirect methods of data evaluation.
|
| 232 |
+
|
| 233 |
+
# 3.3.1 Direct Evaluation
|
| 234 |
+
|
| 235 |
+
Data Faithfulness. Ideally, automatic evaluation of the LLMs' generation results can be easily realized with ground truths from existing datasets, if available (Zhu et al., 2023). However, for open-ended data, human-based evaluation is necessitated. A straightforward idea is to provide some generated samples to human experts, who will then determine whether they are correct, according to which we can estimate the overall generation quality (Wang et al., 2023e). Theoretically, the larger the sample size, the more accurate the estimation results will be, but the labor it costs will correspondingly get higher. To this end, a reliable auxiliary model can be leveraged for a more comprehensive yet cost-effective evaluation of the generated data in replace of human experts (Chung et al., 2023b). Considering that most models can only process contents of limited length, appropriate information extraction can reduce the burden of the auxiliary model and contribute to a more precise prediction of whether a sample contains factual errors (Lee et al., 2022).
|
| 236 |
+
|
| 237 |
+
Data Diversity. The quantification of data diversity primarily employs vocabulary statistics and sample relevance calculations. Vocabulary statistics (Yu et al., 2023b), such as vocabulary size and N-gram frequency, provide a straightforward and intuitive approach. However, they struggle to capture the semantic information of a dataset. The calculation of sample relevance compensates for this limitation effectively. The most common measures of sample correlation are based on cosine similarity (Wang et al., 2023b) and sample distance (Chung et al., 2023b) calculations, which can better capture the contextual and semantic diversity of the dataset. Furthermore, these metrics
|
| 238 |
+
|
| 239 |
+
can also be leveraged to select in-context demonstrations $e_{\mathrm{demo}}$ (Wang et al., 2023e) that are more dissimilar with the previously generated samples, thereby leading to more diversified generation results.
|
| 240 |
+
|
| 241 |
+
# 3.3.2 Indirect Evaluation
|
| 242 |
+
|
| 243 |
+
Benchmark Evaluation. The performance of downstream models trained on the generated data can also reflect the generation quality to some extent (Yu et al., 2023b; Chung et al., 2023b). Specifically, the impact of synthetic data can be evaluated from multiple dimensions except for the specialized capabilities of the downstream models. For example, TruthfulQA enables the assessment of a model's ability to identify true claims (Sun et al., 2023); NIV2 is employed to evaluate a model's language comprehension and reasoning abilities across multiple tasks (Wang et al., 2023e).
|
| 244 |
+
|
| 245 |
+
Open Evaluation. For open-ended benchmarks, evaluation by humans or auxiliary models is necessitated due to the absence of standardized answers. To fully leverage the preference outputs of the auxiliary models, multiple evaluation strategies have been designed, such as response ranking (Xu et al., 2023a), four-level rating system (Wang et al., 2023e) and Elo scores (Bai et al., 2022). To further reduce evaluation costs, Sun et al. (2023); Xu et al. (2023a) utilize the automatic evaluation framework based on GPT-4 proposed by Vicuna for evaluation. However, general LLMs (e.g., ChatGPT) sometimes lack enough knowledge for domain-specific tasks, which hinders them to provide effective evaluation (Bran et al., 2023). Therefore, collecting human assessment data to fine-tune open-source models for evaluation purposes is an important practice in real-world scenarios (He et al., 2023).
|
| 246 |
+
|
| 247 |
+
# 4 Future Directions
|
| 248 |
+
|
| 249 |
+
# 4.1 Complex Task Decomposition
|
| 250 |
+
|
| 251 |
+
Current multi-step generation algorithms depend on the model's understanding of task requirements, requiring it to perform complex logical reasoning with limited information. However, in real-world complex scenarios, this limited information may not adequately support effective decision-making. For instance, the generation of mathematical problem-solution pairs entails multiple reasoning steps and may necessitate the utilization of calculator tools for validation. To date, there remains a lack of systematic investigation on how
|
| 252 |
+
|
| 253 |
+
to activate the reasoning and planning capabilities of LLMs for autonomous synthetic data generation. Inspired by prevalent LLMs-based agents like HuggingGPT (Shen et al., 2023) and MetaGPT (Hong et al., 2023), we believe it would also be quite valuable to develop a data generation agent for industrial applications.
|
| 254 |
+
|
| 255 |
+
# 4.2 Knowledge Enhancement
|
| 256 |
+
|
| 257 |
+
Recent research has found that LLMs' knowledge is long-tailed and biased (Navigli et al., 2023; Fei et al., 2023). Lacking specific domain knowledge, LLMs tend to generate biased, monotonous, and even unfaithful data. Though we have introduced how to mildly guide the data generation with task specification and conditional prompting in the previous sections, such methods still hold strong limitations and are not conducive to scalable implementation. Instead, we believe that developing automated condition controls directly on mature domain knowledge bases will significantly improve the efficiency of knowledge enhancement. For example, we can establish certain links between the LLMs and external knowledge graphs (Ji et al., 2022) or retrieve augmentation from the website (Gao et al., 2023b), which is helpful for the definition, decomposition, and reasoning of data features throughout the entire generation process. Additionally, with enhanced domain knowledge, we may also better assess the quality of generated data or even develop automatic evaluation systems. Overall, we believe that knowledge-driven data generation will be a key focus for future studies.
|
| 258 |
+
|
| 259 |
+
# 4.3 Synergy between Large & Small LMs
|
| 260 |
+
|
| 261 |
+
In Section 3.2, we introduced the use of small domain-specific models for data curation. In particular, FreeAL (Xiao et al., 2023) has shown the feasibility of low-cost data curation with integrated collaboration between large and small models. The idea of leveraging real-time feedback provided by automated performance evaluation during the data generation process to guide the corresponding adjustments in the following generation hints at an important research direction. However, the exploitation of small LMs at the current stage is simply based on prediction confidence. In the future, we are looking forward to seeing more diversified collaboration modes between large and small models to improve the quality of generated data, e.g., usage of various output information, new design of collaborative architectures, and so on.
|
| 262 |
+
|
| 263 |
+
# 4.4 Human-Model Collaboration
|
| 264 |
+
|
| 265 |
+
Data, as the source of model intelligence, theoretically cannot be generated completely without human intervention. Otherwise, wild synthetic data that carries noisy, toxic information can easily "poison" a model, even resulting in mode collapse. Due to the inherent bias of LLMs, they can hardly be self-aware of the bias in their generated data and finally deviate from our intentions. Thus, designing a human-friendly interactive system to involves a few necessary human knowledge for annotation and verification is vital and irreplaceable. To date, there is still a lack of a generic framework to standardize and systematize the human-machine collaboration involved in the data production process.
|
| 266 |
+
|
| 267 |
+
We believe that an appropriate design of such a system must be based on a thorough understanding of the strengths and limitations of human intervention, and should follow the human-centered principle. To achieve sustainable and efficient human involvement, we need comprehensive consideration of various factors such as feasibility, cost, and even labor psychology. For specific examples: (i)-readability and interpretability of the information provided by the LLMs should be ensured to reduce obstacles to human understanding; (ii)-upstream knowledge enrichment or filtering should be carried out to improve the efficiency of human resource utilization and reduce consumption on tasks with low cost-effectiveness; (iii)-incorporating enjoyable interactive features can not only mitigate the negative impact of mechanical data processing tasks on humans but also attract a broader audience.
|
| 268 |
+
|
| 269 |
+
# 5 Conclusion
|
| 270 |
+
|
| 271 |
+
In this paper, we present a systematic review of advancements in synthetic data generation propelled by Large Language Models (LLMs). We aim to offer guidance to enterprises and organizations on effectively building their domain-specific datasets using LLMs. In the meantime, we endeavor to provide insights into the challenges and opportunities within this field, while also proposing potential directions for future research. We hope that our work can promote the rapid production of large amounts of data in various fields and push the limits of data-centric AI. We also envision a fantastic future, where an LLMs community, endowed with human-like abilities such as bionics and communication, may be constructed to generate data for its own self-improvement.
|
| 272 |
+
|
| 273 |
+
# Limitations
|
| 274 |
+
|
| 275 |
+
In this paper, we survey existing studies on LLMs-driven synthetic data generation, curation, and evaluation, proposing a generic workflow for real-world practice. Synthetic data generation is a broad topic that involves data and models of various modals, including vision and speech. Due to the page limit, we mainly focus on the objective of text data and LLMs-driven approaches, while leaving investigations in other fields for future work. We will also keep paying attention to the latest work and add more related approaches with more detailed analysis.
|
| 276 |
+
|
| 277 |
+
# Ethics Statement
|
| 278 |
+
|
| 279 |
+
We believe that our proposed workflow of LLMs-driven synthetic data generation, curation, and evaluation can benefit both researchers who are interested in data-centric AI and industrial producers who are facing data problems. However, the malicious use of such synthetic data also raises ethical concerns that should arouse our vigilance.
|
| 280 |
+
|
| 281 |
+
# Acknowledgements
|
| 282 |
+
|
| 283 |
+
This work is supported by the Pioneer R&D Program of Zhejiang (No. 2024C01035), NSFC under Grants (No. 62206247), and the Fundamental Research Funds for the Central Universities (No. 226-2024-00049).
|
| 284 |
+
|
| 285 |
+
# References
|
| 286 |
+
|
| 287 |
+
Tiago A. Almeida, José María Gómez Hidalgo, and Akebo Yamakami. 2011. Contributions to the study of SMS spam filtering: new collection and results. In Proceedings of the 2011 ACM Symposium on Document Engineering, Mountain View, CA, USA, September 19-22, 2011.
|
| 288 |
+
Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, Anna Goldie, Azalia Mirhoseini, Cameron McKinnon, Carol Chen, Catherine Olsson, Christopher Olah, Danny Hernandez, Dawn Drain, Deep Ganguli, Dustin Li, Eli Tran-Johnson, Ethan Perez, Jamie Kerr, Jared Mueller, Jeffrey Ladish, Joshua Landau, Kamal Ndousse, Kamile Lukosiute, Liane Lovitt, Michael Sellitto, Nelson Elhage, Nicholas Schiefer, Noemi Mercado, Nova DasSarma, Robert Lasenby, Robin Larson, Sam Ringer, Scott Johnston, Shauna Kravec, Sheer El Showk, Stanislav Fort, Tamera Lanham, Timothy Telleen-Lawton, Tom Conerly, Tom Henighan, Tristan Hume, Samuel R. Bowman, Zac Hatfield-Dodds, Ben Mann, Dario Amodei, Nicholas Joseph, Sam McCandlish, Tom Brown, and
|
| 289 |
+
|
| 290 |
+
Jared Kaplan. 2022. Constitutional AI: harmlessness from AI feedback. CoRR, abs/2212.08073.
|
| 291 |
+
Yejin Bang, Samuel Cahyawijaya, Nayeon Lee, Wenliang Dai, Dan Su, Bryan Wilie, Holy Lovenia, Ziwei Ji, Tiezheng Yu, Willy Chung, Quyet V. Do, Yan Xu, and Pascale Fung. 2023. A multitask, multilingual, multimodal evaluation of chatgpt on reasoning, hallucination, and interactivity. CoRR, abs/2302.04023.
|
| 292 |
+
Parikhshit Bansal and Amit Sharma. 2023. Large language models as annotators: Enhancing generalization of NLP models at minimal cost. CoRR, abs/2306.15766.
|
| 293 |
+
Max Bartolo, Alastair Roberts, Johannes Welbl, Sebastian Riedel, and Pontus Stenetorp. 2020. Beat the AI: Investigating adversarial human annotation for reading comprehension. Transactions of the Association for Computational Linguistics, 8:662-678.
|
| 294 |
+
Andres M Bran, Sam Cox, Andrew D White, and Philippe Schwaller. 2023. Chemcrow: Augmenting large-language models with chemistry tools. arXiv preprint arXiv:2304.05376.
|
| 295 |
+
Inigo Casanueva, Tadas Temčinas, Daniela Gerz, Matthew Henderson, and Ivan Vulić. 2020. Efficient intent detection with dual sentence encoders. In Proceedings of the 2nd Workshop on Natural Language Processing for Conversational AI, pages 38-45, Online. Association for Computational Linguistics.
|
| 296 |
+
Derek Chen, Celine Lee, Yunan Lu, Domenic Rosati, and Zhou Yu. 2023a. Mixture of soft prompts for controllable data generation. In EMNLP, pages 14815-14833. Association for Computational Linguistics.
|
| 297 |
+
Lichang Chen, Shiyang Li, Jun Yan, Hai Wang, Kalpa Gunaratna, Vikas Yadav, Zheng Tang, Vijay Srinivasan, Tianyi Zhou, Heng Huang, and Hongxia Jin. 2023b. Alpagasus: Training A better alpaca with fewer data. CoRR, abs/2307.08701.
|
| 298 |
+
John Chung, Ece Kamar, and Saleema Amershi. 2023a. Increasing diversity while maintaining accuracy: Text data generation with large language models and human interventions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 575-593, Toronto, Canada. Association for Computational Linguistics.
|
| 299 |
+
John Joon Young Chung, Ece Kamar, and Saleema Amershi. 2023b. Increasing diversity while maintaining accuracy: Text data generation with large language models and human interventions. In ACL, pages 575-593. Association for Computational Linguistics.
|
| 300 |
+
Wanyun Cui and Qianle Wang. 2023. Ada-instruct: Adapting instruction generators for complex reasoning. CoRR, abs/2310.04484.
|
| 301 |
+
|
| 302 |
+
Dorottya Demszky, Dana Movshovitz-Attias, Jeongwoo Ko, Alan Cowen, Gaurav Nemade, and Sujith Ravi. 2020. GoEmotions: A dataset of fine-grained emotions. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4040–4054, Online. Association for Computational Linguistics.
|
| 303 |
+
Bosheng Ding, Chengwei Qin, Linlin Liu, Yew Ken Chia, Boyang Li, Shafiq Joty, and Lidong Bing. 2023a. Is GPT-3 a good data annotator? In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 11173–11195, Toronto, Canada. Association for Computational Linguistics.
|
| 304 |
+
Ning Ding, Yulin Chen, Bokai Xu, Yujia Qin, Shengding Hu, Zhiyuan Liu, Maosong Sun, and Bowen Zhou. 2023b. Enhancing chat language models by scaling high-quality instructional conversations. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 3029-3051, Singapore. Association for Computational Linguistics.
|
| 305 |
+
Ronen Eldan and Yuanzhi Li. 2023. Tinystories: How small can language models be and still speak coherent english? CoRR, abs/2305.07759.
|
| 306 |
+
Yu Fei, Yifan Hou, Zeming Chen, and Antoine Bosselut. 2023. Mitigating label biases for in-context learning. In ACL, pages 14014-14031. Association for Computational Linguistics.
|
| 307 |
+
Shangbin Feng, Vidhisha Balachandran, Yuyang Bai, and Yulia Tsvetkov. 2023. FactKB: Generalizable factuality evaluation using language models enhanced with factual knowledge. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 933-952, Singapore. Association for Computational Linguistics.
|
| 308 |
+
Saumya Gandhi, Ritu Gala, Vijay Viswanathan, Tongshuang Wu, and Graham Neubig. 2024. Better synthetic data by retrieving and transforming existing datasets. CoRR, abs/2404.14361.
|
| 309 |
+
Jiahui Gao, Renjie Pi, Yong Lin, Hang Xu, Jiacheng Ye, Zhiyong Wu, Weizhong Zhang, Xiaodan Liang, Zhenguo Li, and Lingpeng Kong. 2023a. Self-guided noise-free data generation for efficient zero-shot learning. In ICLR. OpenReview.net.
|
| 310 |
+
Tianyu Gao, Xu Han, Hao Zhu, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2019. FewRel 2.0: Towards more challenging few-shot relation classification. 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 6250-6255, Hong Kong, China. Association for Computational Linguistics.
|
| 311 |
+
Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, Qianyu Guo,
|
| 312 |
+
|
| 313 |
+
Meng Wang, and Haofen Wang. 2023b. Retrievalaugmented generation for large language models: A survey. CoRR, abs/2312.10997.
|
| 314 |
+
Fabrizio Gilardi, Meysam Alizadeh, and Mael Kubli. 2023. Chatgpt outperforms crowd-workers for text-annotation tasks. CoRR, abs/2303.15056.
|
| 315 |
+
Suriya Gunasekar, Yi Zhang, Jyoti Aneja, Caio Cesar Teodoro Mendes, Allie Del Giorno, Sivakanth Gopi, Mojan Javaheripi, Piero Kauffmann, Gustavo de Rosa, Olli Saarikivi, Adil Salim, Shital Shah, Harkirat Singh Behl, Xin Wang, Sébastien Bubeck, Ronen Eldan, Adam Tauman Kalai, Yin Tat Lee, and Yuanzhi Li. 2023. Textbooks are all you need. CoRR, abs/2306.11644.
|
| 316 |
+
Biyang Guo, Xin Zhang, Ziyuan Wang, Minqi Jiang, Jinran Nie, Yuxuan Ding, Jianwei Yue, and Yupeng Wu. 2023. How close is chatgpt to human experts? comparison corpus, evaluation, and detection. CoRR, abs/2301.07597.
|
| 317 |
+
Kelvin Han and Claire Gardent. 2023. Multilingual generation and answering of questions from texts and knowledge graphs. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 13740-13756, Singapore. Association for Computational Linguistics.
|
| 318 |
+
Yucheng Han, Chi Zhang, Xin Chen, Xu Yang, Zhibin Wang, Gang Yu, Bin Fu, and Hanwang Zhang. 2023. Chartlama: A multimodal LLM for chart understanding and generation. CoRR, abs/2311.16483.
|
| 319 |
+
Thomas Hartvigsen, Saadia Gabriel, Hamid Palangi, Maarten Sap, Dipankar Ray, and Ece Kamar. 2022. ToxiGen: A large-scale machine-generated dataset for adversarial and implicit hate speech detection. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3309-3326, Dublin, Ireland. Association for Computational Linguistics.
|
| 320 |
+
Xingwei He, Zhenghao Lin, Yeyun Gong, A-Long Jin, Hang Zhang, Chen Lin, Jian Jiao, Siu Ming Yiu, Nan Duan, and Weizhu Chen. 2023. Annollm: Making large language models to be better crowdsourced annotators. CoRR, abs/2303.16854.
|
| 321 |
+
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring mathematical problem solving with the MATH dataset. In Proc. of NeurIPS.
|
| 322 |
+
Sirui Hong, Xiawu Zheng, Jonathan Chen, Yuheng Cheng, Jinlin Wang, Ceyao Zhang, Zili Wang, Steven Ka Shing Yau, Zijuan Lin, Liyang Zhou, Chenyu Ran, Lingfeng Xiao, and Chenglin Wu. 2023. Metagpt: Meta programming for multi-agent collaborative framework. CoRR, abs/2308.00352.
|
| 323 |
+
Or Honovich, Thomas Scialom, Omer Levy, and Timo Schick. 2023a. Unnatural instructions: Tuning language models with (almost) no human labor. In
|
| 324 |
+
|
| 325 |
+
Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14409-14428, Toronto, Canada. Association for Computational Linguistics.
|
| 326 |
+
Or Honovich, Thomas Scialom, Omer Levy, and Timo Schick. 2023b. Unnatural instructions: Tuning language models with (almost) no human labor. In ACL, pages 14409-14428. Association for Computational Linguistics.
|
| 327 |
+
Tom Hosking, Phil Blunsom, and Max Bartolo. 2023. Human feedback is not gold standard. CoRR, abs/2309.16349.
|
| 328 |
+
Zhiqiang Hu, Lei Wang, Yihuai Lan, Wanyu Xu, EePeng Lim, Lidong Bing, Xing Xu, Soujanya Poria, and Roy Lee. 2023. LLM-adapters: An adapter family for parameter-efficient fine-tuning of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 5254-5276, Singapore. Association for Computational Linguistics.
|
| 329 |
+
Jiaxin Huang, Shixiang Gu, Le Hou, Yuexin Wu, Xuezhi Wang, Hongkun Yu, and Jiawei Han. 2023. Large language models can self-improve. In EMNLP, pages 1051-1068. Association for Computational Linguistics.
|
| 330 |
+
Shaoxiong Ji, Shirui Pan, Erik Cambria, Pekka Martinen, and Philip S. Yu. 2022. A survey on knowledge graphs: Representation, acquisition, and applications. IEEE Trans. Neural Networks Learn. Syst., 33(2):494-514.
|
| 331 |
+
Martin Josifoski, Marija Sakota, Maxime Peyrard, and Robert West. 2023. Exploiting asymmetry for synthetic training data generation: Synthie and the case of information extraction. In *EMNLP*, pages 1555–1574. Association for Computational Linguistics.
|
| 332 |
+
Seungone Kim, Jamin Shin, Yejin Cho, Joel Jang, Shayne Longpre, Hwaran Lee, Sangdoo Yun, Seongjin Shin, Sungdong Kim, James Thorne, and Minjoon Seo. 2023. Prometheus: Inducing fine-grained evaluation capability in language models. CoRR, abs/2310.08491.
|
| 333 |
+
Su Young Kim, Hyeon-Jin Park, Kyuyong Shin, and Kyung-Min Kim. 2022. Ask me what you need: Product retrieval using knowledge from GPT-3. CoRR, abs/2207.02516.
|
| 334 |
+
Jan Kocon, Igor Cichecki, Olivier Kaszyca, Mateusz Kochanek, Dominika Szydlo, Joanna Baran, Julita Bieleniewicz, Marcin Gruza, Arkadiusz Janz, Kamil Kanclerz, Anna Kocon, Bartlomiej Koptyra, Wiktoria Mieleszczenko-Kowszewicz, Piotr Milkowski, Marcin Oleksy, Maciej Piasecki, Lukasz Radlinski, Konrad Wojtasik, Stanislaw Wozniak, and Przemyslaw Kazienko. 2023. Chatgpt: Jack of all trades, master of none. Inf. Fusion, 99:101861.
|
| 335 |
+
|
| 336 |
+
Anastasia Kritharoula, Maria Lymperaiou, and Giorgos Stamou. 2023. Large language models and multimodal retrieval for visual word sense disambiguation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 13053-13077, Singapore. Association for Computational Linguistics.
|
| 337 |
+
Alexey Kurakin, Natalia Ponomareva, Umar Syed, Liam MacDermed, and Andreas Terzis. 2023. Harnessing large-language models to generate private synthetic text. arXiv preprint arXiv:2306.01684.
|
| 338 |
+
Stefan Larson, Anish Mahendran, Joseph J. Peper, Christopher Clarke, Andrew Lee, Parker Hill, Jonathan K. Kummerfeld, Kevin Leach, Michael A. Laurenzano, Lingjia Tang, and Jason Mars. 2019. An evaluation dataset for intent classification and out-of-scope prediction. In Proc. of EMNLP.
|
| 339 |
+
Nayeon Lee, Wei Ping, Peng Xu, Mostofa Patwary, Pascale N Fung, Mohammad Shoeybi, and Bryan Catanzaro. 2022. Factuality enhanced language models for open-ended text generation. NeurIPS.
|
| 340 |
+
Bryan Li and Chris Callison-Burch. 2023. PAXQA: Generating cross-lingual question answering examples at training scale. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 439-454, Singapore. Association for Computational Linguistics.
|
| 341 |
+
Junlong Li, Zhuosheng Zhang, and Hai Zhao. 2022. Self-prompting large language models for open-domain QA. CoRR, abs/2212.08635.
|
| 342 |
+
Minzhi Li, Taiwei Shi, Caleb Ziems, Min-Yen Kan, Nancy Chen, Zhengyuan Liu, and Diyi Yang. 2023a. CoAnnotating: Uncertainty-guided work allocation between human and large language models for data annotation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 1487-1505, Singapore. Association for Computational Linguistics.
|
| 343 |
+
Yuanzhi Li, Sebastien Bubeck, Ronen Eldan, Allie Del Giorno, Suriya Gunasekar, and Yin Tat Lee. 2023b. Textbooks are all you need II: phi-1.5 technical report. CoRR, abs/2309.05463.
|
| 344 |
+
Zhuoyan Li, Hangxiao Zhu, Zhuoran Lu, and Ming Yin. 2023c. Synthetic data generation with large language models for text classification: Potential and limitations. In EMNLP, pages 10443-10461. Association for Computational Linguistics.
|
| 345 |
+
Stephanie Lin, Jacob Hilton, and Owain Evans. 2022. TruthfulQA: Measuring how models mimic human falsehoods. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3214-3252, Dublin, Ireland. Association for Computational Linguistics.
|
| 346 |
+
Alisa Liu, Swabha Swayamdipta, Noah A. Smith, and Yejin Choi. 2022a. WANLI: Worker and AI collaboration for natural language inference dataset creation.
|
| 347 |
+
|
| 348 |
+
In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 6826-6847, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 349 |
+
Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. 2023. Improved baselines with visual instruction tuning. CoRR, abs/2310.03744.
|
| 350 |
+
Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. 2022b. What makes good in-context examples for gpt-3? In Deelio@ACL, pages 100-114. Association for Computational Linguistics.
|
| 351 |
+
Ruibo Liu, Jerry Wei, Fangyu Liu, Chenglei Si, Yanzhe Zhang, Jinmeng Rao, Steven Zheng, Daiyi Peng, Diyi Yang, Denny Zhou, and Andrew M. Dai. 2024. Best practices and lessons learned on synthetic data for language models. CoRR, abs/2404.07503.
|
| 352 |
+
Yuzhe Lu, Sungmin Hong, Yash Shah, and Panpan Xu. 2023. Effectively fine-tune to improve large multimodal models for radiology report generation. CoRR, abs/2312.01504.
|
| 353 |
+
Haipeng Luo, Qingfeng Sun, Can Xu, Pu Zhao, Jianguang Lou, Chongyang Tao, Xiubo Geng, Qingwei Lin, Shifeng Chen, and Dongmei Zhang. 2023a. Wizardmath: Empowering mathematical reasoning for large language models via reinforced evol-instruct. CoRR, abs/2308.09583.
|
| 354 |
+
Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xiubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. 2023b. Wizardcoder: Empowering code large language models with evol-instruct. CoRR, abs/2306.08568.
|
| 355 |
+
Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142-150, Portland, Oregon, USA. Association for Computational Linguistics.
|
| 356 |
+
Yu Meng, Jiaxin Huang, Yu Zhang, and Jiawei Han. 2022. Generating training data with language models: Towards zero-shot language understanding. In NeurIPS.
|
| 357 |
+
Yu Meng, Martin Michalski, Jiaxin Huang, Yu Zhang, Tarek Abdelzaher, and Jiawei Han. 2023. Tuning language models as training data generators for augmentation-enhanced few-shot learning. In ICML, pages 24457-24477. PMLR.
|
| 358 |
+
Arindam Mitra, Luciano Del Corro, Shweti Mahajan, Andres Codas, Clarisse Simões, Sahaj Agrawal, Xuxi Chen, Anastasia Razdaibiedina, Erik Jones, Kriti Aggarwal, Hamid Palangi, Guoqing Zheng, Corby Rosset, Hamed Khanpour, and Ahmed Awadallah. 2023. Orca 2: Teaching small language models how to reason. CoRR, abs/2311.11045.
|
| 359 |
+
|
| 360 |
+
Subhabrata Mukherjee, Arindam Mitra, Ganesh Jawahar, Sahaj Agarwal, Hamid Palangi, and Ahmed Awadallah. 2023. Orca: Progressive learning from complex explanation traces of GPT-4. CoRR, abs/2306.02707.
|
| 361 |
+
Roberto Navigli, Simone Conia, and Björn Ross. 2023. Biases in large language models: Origins, inventory, and discussion. ACM J. Data Inf. Qual., 15(2):10:1-10:21.
|
| 362 |
+
Seokjin Oh, Su Ah Lee, and Woohwan Jung. 2023. Data augmentation for neural machine translation using generative language model. CoRR, abs/2307.16833.
|
| 363 |
+
Nicholas Pangakis, Samuel Wolken, and Neil Fasching. 2023. Automated annotation with generative AI requires validation. CoRR, abs/2306.00176.
|
| 364 |
+
Yujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu, Lan Yan, Yaxi Lu, Yankai Lin, Xin Cong, Xiangru Tang, Bill Qian, Sihan Zhao, Runchu Tian, Ruobing Xie, Jie Zhou, Mark Gerstein, Dahai Li, Zhiyuan Liu, and Maosong Sun. 2023. Toollm: Facilitating large language models to master 16000+ real-world apis. CoRR.
|
| 365 |
+
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
|
| 366 |
+
Jon Saad-Falcon, Omar Khattab, Keshav Santhanam, Radu Florian, Martin Franz, Salim Roukos, Avirup Sil, Md Sultan, and Christopher Potts. 2023. UDAPDR: Unsupervised domain adaptation via LLM prompting and distillation of rerankers. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 11265-11279, Singapore. Association for Computational Linguistics.
|
| 367 |
+
Gaurav Sahu, Pau Rodriguez, Issam Laradji, Parmida Atighehchian, David Vazquez, and Dzmitry Bahdanau. 2022. Data augmentation for intent classification with off-the-shelf large language models. In Proceedings of the 4th Workshop on NLP for Conversational AI, pages 47-57, Dublin, Ireland. Association for Computational Linguistics.
|
| 368 |
+
Nabeel Seedat, Nicolas Huynh, Boris van Breugel, and Mihaela van der Schaar. 2023. Curated llm: Synergy of llms and data curation for tabular augmentation in ultra low-data regimes.
|
| 369 |
+
Zhihong Shao, Yeyun Gong, Yelong Shen, Minlie Huang, Nan Duan, and Weizhu Chen. 2023. Synthetic prompting: Generating chain-of-thought demonstrations for large language models. In ICML, volume 202 of Proceedings of Machine Learning Research, pages 30706-30775. PMLR.
|
| 370 |
+
Yongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li, Weiming Lu, and Yueting Zhuang. 2023. Hugginggpt: Solving AI tasks with chatgpt and its friends in huggingface. CoRR, abs/2303.17580.
|
| 371 |
+
|
| 372 |
+
Avi Singh, John D. Co-Reyes, Rishabh Agarwal, Ankesh Anand, Piyush Patil, Xavier Garcia, Peter J. Liu, James Harrison, Jaehoon Lee, Kelvin Xu, Aaron Parisi, Abhishek Kumar, Alex Alemi, Alex Rizkowsky, Azade Nova, Ben Adlam, Bernd Bohnet, Gamaeldin F. Elsayed, Hanie Sedghi, Igor Mordatch, Isabelle Simpson, Izzeddin Gur, Jasper Snoek, Jeffrey Pennington, Jiri Hron, Kathleen Ke- nealy, Kevin Swersky, Kshitteej Mahajan, Laura Culp, Lechao Xiao, Maxwell L. Bileschi, Noah Constant, Roman Novak, Rosanne Liu, Tris Warkentin, Yundi Qian, Yamini Bansal, Ethan Dyer, Behnam Neyshabur, Jascha Sohl-Dickstein, and Noah Fiedel. 2023. Beyond human data: Scaling self-training for problem-solving with language models. CoRR, abs/2312.06585.
|
| 373 |
+
Ryan Smith, Jason A. Fries, Braden Hancock, and Stephen H. Bach. 2022. Language models in the loop: Incorporating prompting into weak supervision. CoRR, abs/2205.02318.
|
| 374 |
+
Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R. Brown, Adam Santoro, Aditya Gupta, Adrià Garriga-Alonso, Agnieszka Kluska, Aitor Lewkowycz, Akshit Agarwal, Alethea Power, Alex Ray, Alex Warstadt, Alexander W. Kocurek, Ali Safaya, Ali Tazarv, Alice Xiang, Alicia Parrish, Allen Nie, Aman Hussain, Amanda Askell, Amanda Dsouza, Ameet Rahane, Anantharaman S. Iyer, Anders Andreassen, Andrea Santilli, Andreas Stuhlmüller, Andrew M. Dai, Andrew La, Andrew K. Lampinen, Andy Zou, Angela Jiang, Angelica Chen, Anh Vuong, Animesh Gupta, Anna Gottardi, Antonio Norelli, Anu Venkatesh, Arash Gholamidavoodi, Arfa Tabassum, Arul Menezes, Arun Kirubarajan, Asher Mullokandov, Ashish Sabharwal, Austin Herrick, Avia Efrat, Aykut Erdem, Ayla Karakas, and et al. 2022. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. CoRR.
|
| 375 |
+
Hongjin Su, Jungo Kasai, Chen Henry Wu, Weijia Shi, Tianlu Wang, Jiayi Xin, Rui Zhang, Mari Ostendorf, Luke Zettlemoyer, Noah A. Smith, and Tao Yu. 2023. Selective annotation makes language models better few-shot learners. In ICLR. OpenReview.net.
|
| 376 |
+
Shivchander Sudalairaj, Abhishek Bhandwaldar, Aldo Pareja, Kai Xu, David D. Cox, and Akash Srivastava. 2024. LAB: large-scale alignment for chatbots. CoRR, abs/2403.01081.
|
| 377 |
+
Zhiqing Sun, Yikang Shen, Qinhong Zhou, Hongxin Zhang, Zhenfang Chen, David D. Cox, Yiming Yang, and Chuang Gan. 2023. Principle-driven self-alignment of language models from scratch with minimal human supervision. CoRR, abs/2305.03047.
|
| 378 |
+
Ruixiang Tang, Xiaotian Han, Xiaoqian Jiang, and Xia Hu. 2023. Does synthetic data generation of llms help clinical text mining? CoRR, abs/2303.04360.
|
| 379 |
+
Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang,
|
| 380 |
+
|
| 381 |
+
and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca.
|
| 382 |
+
Fanqi Wan, Xinting Huang, Tao Yang, Xiaojun Quan, Wei Bi, and Shuming Shi. 2023. Explore-instruct: Enhancing domain-specific instruction coverage through active exploration. In EMNLP, pages 9435-9454. Association for Computational Linguistics.
|
| 383 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium. Association for Computational Linguistics.
|
| 384 |
+
Guan Wang, Sijie Cheng, Xianyuan Zhan, Xiangang Li, Sen Song, and Yang Liu. 2023a. Openchat: Advancing open-source language models with mixed-quality data. arXiv preprint arXiv:2309.11235.
|
| 385 |
+
Ruida Wang, Wangchunshu Zhou, and Mrinmaya Sachan. 2023b. Let's synthesize step by step: Iterative dataset synthesis with large language models by extrapolating errors from small models. In EMNLP (Findings), pages 11817-11831. Association for Computational Linguistics.
|
| 386 |
+
Shuohang Wang, Yang Liu, Yichong Xu, Chenguang Zhu, and Michael Zeng. 2021. Want to reduce labeling cost? GPT-3 can help. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 4195–4205, Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 387 |
+
Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xingxu Xie, Wei Ye, Shi-Bo Zhang, and Yue Zhang. 2023c. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization. ArXiv.
|
| 388 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, and Hannaneh Hajishirzi. 2023d. Self-instruct: Aligning language models with self-generated instructions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13484-13508, Toronto, Canada. Association for Computational Linguistics.
|
| 389 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, and Hannaneh Hajishirzi. 2023e. Self-instruct: Aligning language models with self-generated instructions. In ACL, pages 13484-13508. Association for Computational Linguistics.
|
| 390 |
+
Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Atharva Naik, Arjun Ashok, Arut Selvan Dhanasekaran, Anjana Arunkumar, David Stap, Eshaan Pathak,
|
| 391 |
+
|
| 392 |
+
Giannis Karamanolakis, Haizhi Lai, Ishan Purohit, Ishani Mondal, Jacob Anderson, Kirby Kuznia, Krima Doshi, Kuntal Kumar Pal, Maitreya Patel, Mehrad Moradshahi, Mihir Parmar, Mirali Purohit, Neeraj Varshney, Phani Rohitha Kaza, Pulkit Verma, Ravsehaj Singh Puri, Rushang Karia, Savan Doshi, Shailaja Keyur Sampat, Siddhartha Mishra, Sujan Reddy A, Sumanta Patro, Tanay Dixit, and Xudong Shen. 2022. Super-Natural Instructions: Generalization via declarative instructions on $1600+$ NLP tasks. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 5085-5109, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 393 |
+
Fusheng Wei, Robert Keeling, Nathaniel Huber-Fliflet, Jianping Zhang, Adam Dabrowski, Jingchao Yang, Qiang Mao, and Han Qin. 2023a. Empirical study of LLM fine-tuning for text classification in legal document review. In IEEE Big Data, pages 2786-2792. IEEE.
|
| 394 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V. Le, and Denny Zhou. 2022. Chain-of-thought prompting elicits reasoning in large language models. In NeurIPS.
|
| 395 |
+
Jerry Wei, Chengrun Yang, Xinying Song, Yifeng Lu, Nathan Hu, Dustin Tran, Daiyi Peng, Ruibo Liu, Da Huang, Cosmo Du, and Quoc V. Le. 2024. Longform factuality in large language models. CoRR, abs/2403.18802.
|
| 396 |
+
Yuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding, and Lingming Zhang. 2023b. Magicoder: Source code is all you need. CoRR, abs/2312.02120.
|
| 397 |
+
Le Xiao and Xiaolin Chen. 2023. Enhancing LLM with evolutionary fine tuning for news summary generation. CoRR, abs/2307.02839.
|
| 398 |
+
Ruixuan Xiao, Yiwen Dong, Junbo Zhao, Runze Wu, Minmin Lin, Gang Chen, and Haobo Wang. 2023. FreeAL: Towards human-free active learning in the era of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 14520-14535, Singapore. Association for Computational Linguistics.
|
| 399 |
+
Can Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng, Pu Zhao, Jiazhan Feng, Chongyang Tao, and Daxin Jiang. 2023a. Wizardlm: Empowering large language models to follow complex instructions. CoRR, abs/2304.12244.
|
| 400 |
+
Ran Xu, Hejie Cui, Yue Yu, Xuan Kan, Wenqi Shi, Yuchen Zhuang, Wei Jin, Joyce C. Ho, and Carl J. Yang. 2023b. Knowledge-infused prompting: Assessing and advancing clinical text data generation with large language models. CoRR, abs/2311.00287.
|
| 401 |
+
Jiacheng Ye, Jiahui Gao, Qintong Li, Hang Xu, Jiangtao Feng, Zhiyong Wu, Tao Yu, and Lingpeng Kong. 2022a. ZeroGen: Efficient zero-shot learning via
|
| 402 |
+
|
| 403 |
+
dataset generation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 11653-11669, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 404 |
+
Jiacheng Ye, Jiahui Gao, Zhiyong Wu, Jiangtao Feng, Tao Yu, and Lingpeng Kong. 2022b. ProGen: Progressive zero-shot dataset generation via in-context feedback. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 3671-3683, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 405 |
+
Jiacheng Ye, Chengzhu Li, Lingpeng Kong, and Tao Yu. 2023. Generating data for symbolic language with large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 8418-8443, Singapore. Association for Computational Linguistics.
|
| 406 |
+
Kang Min Yoo, Dongju Park, Jaewook Kang, Sang-Woo Lee, and Woo-Myoung Park. 2021. Gpt3mix: Leveraging large-scale language models for text augmentation. In EMNLP, pages 2225–2239. Association for Computational Linguistics.
|
| 407 |
+
Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T. Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. 2023a. Metamath: Bootstrap your own mathematical questions for large language models. CoRR, abs/2309.12284.
|
| 408 |
+
Yue Yu, Yuchen Zhuang, Jieyu Zhang, Yu Meng, Alexander Ratner, Ranjay Krishna, Jiaming Shen, and Chao Zhang. 2023b. Large language model as attributed training data generator: A tale of diversity and bias. CoRR, abs/2306.15895.
|
| 409 |
+
Yue Yu, Yuchen Zhuang, Rongzhi Zhang, Yu Meng, Jiaming Shen, and Chao Zhang. 2023c. ReGen: Zero-shot text classification via training data generation with progressive dense retrieval. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 11782-11805, Toronto, Canada. Association for Computational Linguistics.
|
| 410 |
+
Chaoning Zhang, Chenshuang Zhang, Sheng Zheng, Yu Qiao, Chenghao Li, Mengchun Zhang, Sumit Kumar Dam, Chu Myaet Thwal, Ye Lin Tun, Le Luang Huy, Dong Uk Kim, Sung-Ho Bae, Lik-Hang Lee, Yang Yang, Heng Tao Shen, In So Kweon, and Choong Seon Hong. 2023a. A complete survey on generative AI (AIGC): is chatgpt from GPT-4 to GPT-5 all you need? CoRR, abs/2303.11717.
|
| 411 |
+
Jieyu Zhang, Bohan Wang, Xiangchen Song, Yujing Wang, Yaming Yang, Jing Bai, and Alexander Ratner. 2022. Creating training sets via weak indirect supervision. In ICLR. OpenReview.net.
|
| 412 |
+
Ruoyu Zhang, Yanzeng Li, Yongliang Ma, Ming Zhou, and Lei Zou. 2023b. LLMaAA: Making large language models as active annotators. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 13088-13103, Singapore. Association for Computational Linguistics.
|
| 413 |
+
|
| 414 |
+
Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Proc. of NeurIPS.
|
| 415 |
+
Jiachen Zhao, Wenlong Zhao, Andrew Drozdov, Benjamin Rozonoyer, Md. Arafat Sultan, Jay-Yoon Lee, Mohit Iyyer, and Andrew McCallum. 2023a. Multi-stage collaborative knowledge distillation from large language models. CoRR, abs/2311.08640.
|
| 416 |
+
Zilong Zhao, Robert Birke, and Lydia Chen. 2023b. Tabula: Harnessing language models for tabular data synthesis. arXiv preprint arXiv:2310.12746.
|
| 417 |
+
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.
|
| 418 |
+
Yiming Zhu, Peixian Zhang, Ehsan ul Haq, Pan Hui, and Gareth Tyson. 2023. Can chatgpt reproduce human-generated labels? A study of social computing tasks. CoRR, abs/2304.10145.
|
| 419 |
+
|
| 420 |
+
# A Data Annotation
|
| 421 |
+
|
| 422 |
+
In the main text, we introduced a series of techniques for general data synthesis. Though annotation can be considered a special type of synthesis with the input of a particular sample as the synthesis condition, there are also approaches specifically suitable for data annotation. Among them, selective annotation is one of the most important practices. Selective annotation represents an optimal tradeoff between expensive and precise human annotation and economic but relatively rough LLMs-based annotation (Wang et al., 2021; Kocon et al., 2023).
|
| 423 |
+
|
| 424 |
+
The key to selective annotation is to define a "cost-effective" sample distribution between humans and LLMs. (Zhang et al., 2023b; Bansal and Sharma, 2023) covers some common selection strategies for LLMs-based annotation, including random selection, maximum entropy selection, least confidence selection and $k$ means selection for thorough comparisons. Results show that uncertainty-based methods, i.e. maximal entropy and least confidence, perform significantly better than the random baseline, with faster convergence and better performance of the downstream model trained on the annotated data. (Li et al., 2023a) also utilizes uncertainty to estimate LLMs' annotation capability to effectively allocate the annotation work among humans and LLMs. (Su et al., 2023) instead proposes a novel unsupervised, graph-based selective annotation method named vote- $k$ , to select diverse and representative examples to annotate.
|
| 425 |
+
|
| 426 |
+
# B Tuning Techniques
|
| 427 |
+
|
| 428 |
+
Another large body of research pertains to the tuning techniques, such as model fine-tuning (Zhao et al., 2023b; Sun et al., 2023; Meng et al., 2023; Kurakin et al., 2023) and soft prompting (Chen et al., 2023a), which have already been heavily studied in other fields and can be dually referred in (Hu et al., 2023; Lu et al., 2023; Wei et al., 2023a; Xiao and Chen, 2023). Despite their effectiveness in improving the generation performance, most of the existing approaches are established on the accessibility of the LLMs, while their application on black-box models remains to be further explored.
|
| 429 |
+
|
| 430 |
+
# C Applications
|
| 431 |
+
|
| 432 |
+
LLM-driven synthetic data generation has served as a new alternative to traditional human-dependent data collection and demonstrated great potential in various applications, including general tasks, domain-specific tasks, and multimodal tasks.
|
| 433 |
+
|
| 434 |
+
Generic Tasks. With the exploding capabilities of LLMs, this generation pipeline has been adopted in a wide range of basic NLP studies, including text classification (Ye et al., 2022b; Yu et al., 2023c; Sahu et al., 2022), named entity recognition (Xiao et al., 2023), question answering (Li and Callison-Burch, 2023), relationship extraction (He et al., 2023), and natural language inference (Zhang et al., 2023b). These studies further underpin diverse applications, such as sentiment recognition (Gao et al., 2023a; Ye et al., 2022b), online translation (Oh et al., 2023), stance detection (Li et al., 2023a) and spam identification (Smith et al., 2022).
|
| 435 |
+
|
| 436 |
+
Domain-specific Tasks. Some domain-specific tasks also impose significant demands on this pipeline, where human annotation can be extremely expensive and impractical, such as medical diagnosis (Tang et al., 2023), drug discovery (Xiao et al., 2023), clinical trial extraction (Xu et al., 2023b), industrial advertisement (Zhang et al., 2022) and tabular data analysis (Seedat et al., 2023).
|
| 437 |
+
|
| 438 |
+
Multimodal Tasks. Stemming from the simplicity and low cost, this generation paradigm has also exhibited significant promise in multimodal tasks, including text-image retrieval (Kritharoula et al., 2023), chat understanding (Han et al., 2023), visual question answering (Han and Gardent, 2023), and multimodal instruction tuning (Liu et al., 2023).
|
| 439 |
+
|
| 440 |
+
<table><tr><td>Type</td><td>Benchmark Dataset</td><td>Subdataset Quantity</td><td>Partial Subdataset</td><td>Task</td><td>Ability</td><td>Domain/Data Source</td></tr><tr><td rowspan="9">Classification</td><td>SMS spam (Almeida et al., 2011; Li et al., 2023c)</td><td>1</td><td>SMS spam</td><td>Text Classification</td><td>Spam Detection</td><td>SMS</td></tr><tr><td>AG News (Zhang et al., 2015; Li et al., 2023c)</td><td>1</td><td>AG News</td><td>Text Classification</td><td>Topic Classification</td><td>News</td></tr><tr><td>IMDb (Maas et al., 2011; Li et al., 2023c; Wang et al., 2023b)</td><td>1</td><td>IMDb</td><td>Text Classification</td><td>Binary Sentiment Classification</td><td>Review</td></tr><tr><td>GoEmotions (Demszky et al., 2020; Li et al., 2023c)</td><td>1</td><td>GoEmotions</td><td>Text Classification</td><td>Sentiment Classification</td><td>Reddit Comments</td></tr><tr><td>CLINC150 (Larson et al., 2019; Sahu et al., 2022)</td><td>1</td><td>CLINC150</td><td>Text Classification</td><td>Intent Detection</td><td>Human Annotation</td></tr><tr><td>BANKING77 (Casanueva et al., 2020; Sahu et al., 2022)</td><td>1</td><td>BANKING77</td><td>Text Classification</td><td>Intent Detection</td><td>Bank</td></tr><tr><td>FewRel (Gao et al., 2019; Li et al., 2023c)</td><td>1</td><td>FewRel</td><td>Text Classification</td><td>Relation Classification</td><td>Wikipedia</td></tr><tr><td rowspan="2">GLUE (Wang et al., 2018, 2023b)</td><td rowspan="2">7</td><td>QNLI</td><td>Natural Language Inference</td><td>Recognizing Textual Entailment</td><td>Wikipedia</td></tr><tr><td>RTE</td><td>Natural Language Inference</td><td>Recognizing Textual Entailment</td><td>News and Wikipedia</td></tr><tr><td rowspan="2">QA</td><td>AdversarialQA (Bartolo et al., 2020; Wang et al., 2023b)</td><td>1</td><td>AdversarialQA</td><td>Question Answering</td><td>Reading Comprehension</td><td>Wikipedia</td></tr><tr><td>TruthfulQA (Lin et al., 2022; Sun et al., 2023)</td><td>1</td><td>TruthfulQA</td><td>Question Answering</td><td>Honestness</td><td>Hard Data</td></tr><tr><td rowspan="2">Reasoning</td><td>MATH (Hendrycks et al., 2021; Wan et al., 2023)</td><td>1</td><td>MATH</td><td>mathematical reasoning</td><td>Complex Reasoning</td><td>Math</td></tr><tr><td>ToolBench (Qin et al., 2023)</td><td>1</td><td>ToolBench</td><td>Trajectory Planning</td><td>Tool manipulation</td><td>Tool</td></tr><tr><td>-</td><td>NIV2 (Wang et al., 2022, 2023e)</td><td>1616</td><td>-</td><td>-</td><td>Language Understanding & Reasoning</td><td>Benchmark Collection/Human Annotation</td></tr><tr><td>-</td><td>BIG-bench (Srivastava et al., 2022; Sun et al., 2023)</td><td>204</td><td>-</td><td>-</td><td>Language Understanding & Reasoning</td><td>Human Annotation</td></tr></table>
|
| 441 |
+
|
| 442 |
+
Table 1: Representative benchmark dataset for assessing models trained with generated data. The dataset generated based on LLM is highlighted in bold.
|
| 443 |
+
|
| 444 |
+
# D Benchmark Datasets
|
| 445 |
+
|
| 446 |
+
In Table 1, we summarize representative benchmark datasets for evaluating models trained through data generation. Among them, ToolBench (Qin et al., 2023) is generated by LLMs and is commonly employed to evaluate the performance of LLMs in tool usage proficiency. In most classification task evaluations (Li et al., 2023c; Wang et al., 2023b; Sahu et al., 2022), LLMs are infrequently used as test models; instead, small language models trained on generated data are often used, followed by testing on existing benchmarks.
|
2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2867ddd54107771e07a130a24d3e7616e732ba5da0a57938930a596b984ba1f
|
| 3 |
+
size 418847
|
2024/On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation_ A Survey/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On The Persona-based Summarization of Domain-Specific Documents/651ad0c2-5db8-4cc6-9ae9-aba05e409e66_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On The Persona-based Summarization of Domain-Specific Documents/651ad0c2-5db8-4cc6-9ae9-aba05e409e66_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On The Persona-based Summarization of Domain-Specific Documents/651ad0c2-5db8-4cc6-9ae9-aba05e409e66_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:229df4910f60befa83c92c20e68403c975f9feb5262e349a9e40a5eae5a80c43
|
| 3 |
+
size 582351
|
2024/On The Persona-based Summarization of Domain-Specific Documents/full.md
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On The Persona-based Summarization of Domain-Specific Documents
|
| 2 |
+
|
| 3 |
+
$^{1}$ Ankan Mullick $^{1}$ Sombit Bose* $^{1}$ Rounak Saha* $^{2}$ Ayan Kumar Bhowmick $^{1}$ Pawan Goyal $^{1}$ Niloy Ganguly $^{2}$ Prasenjit Dey $^{2}$ Ravi Kokku
|
| 4 |
+
|
| 5 |
+
{ankanm, sbcs.sombit, runk20}@kgpian.iitkgp.ac.in {pawang, niloy}@cse.iitkgp.ac.in, {ayan, prasenjit, ravi}@merlyn.org $^{1}$ Computer Science and Engineering Department, IIT Kharagpur, India. $^{2}$ Emergence AI
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
In an ever-expanding world of domain-specific knowledge, the increasing complexity of consuming, and storing information necessitates the generation of summaries from large information repositories. However, every persona of a domain has different requirements of information and hence their summarization. For example, in the healthcare domain, a persona-based (such as Doctor, Nurse, Patient etc.) approach is imperative to deliver targeted medical information efficiently. Persona-based summarization of domain-specific information by humans is a high cognitive load task and is generally not preferred. The summaries generated by two different humans have high variability and do not scale in cost and subject matter expertise as domains and personas grow. Further, AI-generated summaries using generic Large Language Models (LLMs) may not necessarily offer satisfactory accuracy for different domains unless they have been specifically trained on domain-specific data and can also be very expensive to use in day-to-day operations. Our contribution in this paper is two-fold: 1) We present an approach to efficiently fine-tune a domain-specific small foundation LLM using a healthcare corpus and also show that we can effectively evaluate the summarization quality using AI-based critiquing. 2) We further show that AI-based critiquing has good concordance with Human-based critiquing of the summaries. Hence, such AI-based pipelines to generate domain-specific persona-based summaries can be easily scaled to other domains such as legal, enterprise documents, education etc. in a very efficient and cost-effective manner.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
In the rapidly expanding digital world, the exponential growth of domain-specific knowledge has posed unprecedented challenges in efficiently storing and consuming vast information repositories.
|
| 14 |
+
|
| 15 |
+
With the increasing complexity of managing such information, the need for generation of precise and specific summaries becomes important. This need becomes particularly evident for domain-specific data as there exist different personas within a domain who have different information requirements which should be reflected in generated summaries. For instance, if we consider the healthcare domain, there exist diverse personas ranging from healthcare professionals like doctors and nurses to patients who require targeted information customized to their specific roles and comprehension levels.
|
| 16 |
+
|
| 17 |
+
Traditional generic approaches to summarization have often relied on humans to perform this high cognitive load task. However, as the volume and diversity of information burgeoning with growing number of domains and personas, human generated persona-based summaries encounter limitations in scalability, cost-effectiveness, and consistency. The inherent subjectivity and variability among different human summarizers hinder the reliability and efficiency of such an approach. Although there have been several approaches in prior literature with focus on generic summaries through extractive and abstractive methods (Paulus et al., 2017; Erkan and Radev, 2004) as well as goal-oriented summaries (Hayashi et al., 2021; Zhu et al., 2022) but none of them have focused on persona-based summarization of domain-specific information. Goldsack et al. (2023); Luo et al. (2022) focus on building layman-summarization comprehensible to nontechnical audiences but do not differentiate the various technical summaries based on persona and they also do not use LLMs as an alternative evaluator. Our work differs in the sense that we develop a pipelined approach that generates persona-specific training summaries (doctor, patient, normal person), fine-tune small-size LLMs on this data, and use GPT-4 to efficiently evaluate summary quality.
|
| 18 |
+
|
| 19 |
+
One possible solution is to harness the power of generic large language models (LLMs) such as GPT-4 to automate the generation of persona-based summaries as such models have been used to generate data for other NLP tasks (Sun et al., 2023; Yu et al., 2023). ChatGPT $^{2}$ is also used in educational data generation (Kieser et al., 2023; Maddigan and Susnjak, 2023). However, AI-generated summaries using generic LLMs may not be guaranteed to achieve optimal accuracy across different domains unless they are trained on domain-specific data and they can also be very expensive to use for daily repeated inferences. In this paper, we take a step towards introducing a two-fold contribution aimed at overcoming these challenges of generating domain-specific persona-based summaries. Firstly, we present an efficient approach towards the training of domain-specific, small-sized Large Language Models (LLMs) on a corpus related to healthcare domain. Though data distillation from a stronger model for supervised fine-tuning is a standard method, the novelty of our work lies in the fact that we effectively employ the approach in this context to build a cost-optimised summarization framework catering to different healthcare persona given the scarcity of domain-specific data. This approach addresses the limitations of generic LLMs by aligning the trained model specifically to the intricacies of summaries in the healthcare domain. Moreover, we showcase the effectiveness of utilizing AI-based critiquing for the evaluation of summarization quality, providing a more automated and scalable solution.
|
| 20 |
+
|
| 21 |
+
Secondly, we demonstrate the strong agreement between AI-based and human-based critiquing of generated summaries, establishing the reliability of our proposed approach. This not only validates the effectiveness of domain-specific small LLM-based models in generating accurate summaries but also opens up avenues for scalability across diverse domains. The implications of our findings extend beyond healthcare, as the proposed AI pipeline can be seamlessly adapted to other domains, including legal, corporate documents, education, and more, offering a versatile and cost-effective solution for generating persona-based summaries.
|
| 22 |
+
|
| 23 |
+
# 2 Proposed Framework
|
| 24 |
+
|
| 25 |
+
We describe here our framework for training our small-size domain-specific LLM, generation of
|
| 26 |
+
|
| 27 |
+
<table><tr><td>Filtering Steps with Criteria (removed)</td><td>%</td></tr><tr><td>Step 1: Too many special characters and other string (HTML tags and # )</td><td>1.52</td></tr><tr><td>Step 2: Incomplete Summary (By checking punctuations)</td><td>0.86</td></tr><tr><td>Step 3: Conflict identification - Very similar summaries of different persona</td><td>1.12</td></tr><tr><td>Step 4: If the summary contains Medical Terms or numbers not present in the document (using QuickUMLS - https://github.com/Georgetown-IR-Lab/QuickUMLS/)</td><td>1.39</td></tr><tr><td>Overall summaries filtered out</td><td>4.89</td></tr></table>
|
| 28 |
+
|
| 29 |
+
Table 1: Step-by-Step Data Filtering
|
| 30 |
+
|
| 31 |
+
data for finetuning and evaluation, and other model baselines that we compare our model against.
|
| 32 |
+
|
| 33 |
+
# 2.1 Dataset
|
| 34 |
+
|
| 35 |
+
We create persona-based dataset (named 'PersonaData') utilizing GPT-4<sup>3</sup> with specific prompts on 1455 articles from the publicly available WebMD<sup>4</sup> website. The mean ratio between summary length and document length is $0.2:1$ . After data generation using GPT-4, we did a step by step validation of the generated summaries using an automated approach followed by manual verification to filter out the bad generations. Around $4.89\%$ of document-summary pairs were filtered out. We provide the detailed filtering steps with criteria and removal pairs (in $\%$ ) as shown in Table 1.
|
| 36 |
+
|
| 37 |
+
These articles, related to healthcare, form the basis for creation of their summaries related to three distinct persona: (a) Doctor: Summaries focus on medical terminology, guidelines and provide detailed technical information suitable for medical professionals. (b) Patient: Summaries are easily understandable, addressing patient concerns without excessive technical jargon, focusing on top-level information. (c) Normal Person: Summaries are tailored for a general audience without medical background, presented in simple language and engaging for laypersons while avoiding technical terms. The dataset comprises 1091, 73 and 291 articles for training, validation, and testing respectively. Additionally, we select 50 WebMD articles and generate manual summaries for three personas (termed as Annotated-Data) using the Prolific $^{5}$ annotation platform and Doctors to evaluate the GPT-4 generated summaries against human curated summaries $^{6}$ (Details are in Appendix F).
|
| 38 |
+
|
| 39 |
+
# 2.2 Model Architecture
|
| 40 |
+
|
| 41 |
+
Our training process consists of employing small foundation LLMs such as Llama2 and finetuning such models on the training set of the WebMD data
|
| 42 |
+
|
| 43 |
+
<table><tr><td>Model</td><td>Rouge1</td><td>Rouge2</td><td>RougeL</td><td>Meteor</td><td>Bleu</td><td>BERT-Prec</td><td>BERT-Rec</td><td>BERT-F1</td></tr><tr><td>Falcon</td><td>23.3</td><td>5.0</td><td>12.8</td><td>12.4</td><td>1.3</td><td>78.6</td><td>73.2</td><td>75.8</td></tr><tr><td>BART</td><td>23.6</td><td>8.1</td><td>15.0</td><td>11.3</td><td>0.8</td><td>83.8</td><td>74.9</td><td>79.1</td></tr><tr><td>Pegasus</td><td>27.8</td><td>8.3</td><td>16.2</td><td>14.3</td><td>2.0</td><td>80.7</td><td>75.0</td><td>77.8</td></tr><tr><td>T5-FT</td><td>42.6</td><td>15.6</td><td>23.7</td><td>30.2</td><td>11.4</td><td>84.2</td><td>80.7</td><td>82.4</td></tr><tr><td>FT5-FT</td><td>41.2</td><td>15.5</td><td>23.3</td><td>29.0</td><td>11.2</td><td>83.9</td><td>79.9</td><td>81.9</td></tr><tr><td>LED-B</td><td>33.3</td><td>9.3</td><td>17.4</td><td>17.3</td><td>3.3</td><td>80.7</td><td>76.7</td><td>78.6</td></tr><tr><td>LED-L</td><td>39.8</td><td>12.3</td><td>25.6</td><td>25.3</td><td>9.3</td><td>82.5</td><td>78.7</td><td>80.6</td></tr><tr><td>L-V-7b</td><td>14.2</td><td>4.0</td><td>8.5</td><td>6.7</td><td>0.6</td><td>72.0</td><td>65.7</td><td>68.7</td></tr><tr><td>L-V-13b</td><td>24.1</td><td>7.3</td><td>14.3</td><td>11.5</td><td>1.1</td><td>80.8</td><td>73.5</td><td>77.0</td></tr><tr><td>L-V-70b</td><td>25.1</td><td>7.2</td><td>13.7</td><td>16.2</td><td>3.7</td><td>65.7</td><td>64.6</td><td>65.1</td></tr><tr><td>L-F-7b</td><td>45.9</td><td>17.2</td><td>25.2</td><td>32.6</td><td>12.5</td><td>83.6</td><td>82.6</td><td>83.1</td></tr><tr><td>L-F-13b</td><td>53.7</td><td>24.3</td><td>33.8</td><td>38.3</td><td>18.4</td><td>87.4</td><td>85.3</td><td>86.3</td></tr></table>
|
| 44 |
+
|
| 45 |
+
described above. Specifically, we use supervised fine-tuning approach (Li et al., 2023) on the pretrained vanilla model versions of Llama2.
|
| 46 |
+
|
| 47 |
+
Llama2 $^{7}$ : We perform supervised fine-tuning (SFT) on the pretrained vanilla Llama2-7b and Llama2-13b models using the training data that consists of prompt-completion pairs where the prompt comprises a WebMD article in the training set and the instruction to generate a summary based on a persona (doctor/patient/normal person) and the completion is the corresponding persona-based summary generated using GPT-4. We use a parameter efficient finetuning approach i.e. Quantized Low-Rank Adaptation (QLoRA) (Dettmers et al., 2023) to optimize the training process. After training, the finetuned Llama2-7b and Llama2-13b models (referred to as L-F-7b and L-F-13b respectively) acquire the ability to generate a persona-based summary for a given medical article depending on the persona specified in the prompt.
|
| 48 |
+
|
| 49 |
+
Baselines: For comparison with our finetuned models on the persona-based summary generation task, we use different state-of-the-art models as baselines such as Falcon 7b-instruction tuned model (Penedo et al., 2023), BART-large (Lewis et al., 2019), instruction-tuned Pegasus (Zhang et al., 2020) and Longformer (Beltagy et al., 2020) Base (LED-B), Large (LED-L) $^{8}$ . Besides these, we also use finetuned versions of T5-Large (Raffel et al., 2020) (T5-FT) and Flan-T5-Large (Chung et al., 2022)
|
| 50 |
+
|
| 51 |
+
(FT5-FT) on our training data as baselines. Further, we also compare the performance with the different vanilla Llama2 model variants (7b, 13b, 70b referred to as L-V-7b, L-V-13b and L-V-70b respectively).
|
| 52 |
+
|
| 53 |
+
# 3 Evaluation and Results
|
| 54 |
+
|
| 55 |
+
We evaluate the performance of our finetuned models (L-F-7b and L-F-13b) in terms of generating high quality persona-based summaries for medical articles and compare against the baseline models.
|
| 56 |
+
|
| 57 |
+
Evaluation metrics: Our evaluation relies on two different approaches:
|
| 58 |
+
|
| 59 |
+
(i) Traditional - Here we use traditional metrics such as Rouge [1, 2 and L] (Lin, 2004), Meteor (Banerjee and Lavie, 2005), Bleu (Papineni et al., 2002), BERTScore (Zhang et al., 2019) [Precision (BERT-Prec), Recall (BERT-Rec) and F1-score (BERT-F1)] to assess the quality of generated summaries.
|
| 60 |
+
|
| 61 |
+
(ii) GPT-4 critique - Here we use the GPT-4 LLM as a critic to evaluate the quality of the model generated summaries against the gold standard GPT-4 generated summary (Section 2) from different dimensions. Specifically, we provide suitable critique based prompts to GPT-4 where we evaluate the summaries based on a set of five predefined criterias (termed as GPT-4 criteria) defined below: Criteria 1: Relevance (Rel): The extent to which the generated persona-based summary is relevant to the intended persona (doctor/patient/normal person) given the document.
|
| 62 |
+
|
| 63 |
+
Criteria 2: Coverage (Cov): The extent to which
|
| 64 |
+
|
| 65 |
+
Table 2: Traditional Metrics' based evaluation results (all are in %)
|
| 66 |
+
|
| 67 |
+
<table><tr><td>Model</td><td>Rouge1</td><td>Rouge2</td><td>RougeL</td><td>Meteor</td><td>Bleu</td><td>BERT-Prec</td><td>BERT-Rec</td><td>BERT-F1</td></tr><tr><td>Doctor</td><td>53.9</td><td>24.7</td><td>34.0</td><td>37.0</td><td>18.7</td><td>88.0</td><td>85.1</td><td>86.5</td></tr><tr><td>Patient</td><td>53.5</td><td>24.2</td><td>33.5</td><td>36.7</td><td>18.3</td><td>87.2</td><td>84.8</td><td>86.0</td></tr><tr><td>Nor-Per</td><td>53.6</td><td>23.9</td><td>33.9</td><td>41.0</td><td>18.1</td><td>86.9</td><td>86.1</td><td>86.5</td></tr><tr><td>Average</td><td>53.7</td><td>24.3</td><td>33.8</td><td>38.3</td><td>18.4</td><td>87.4</td><td>85.3</td><td>86.3</td></tr></table>
|
| 68 |
+
|
| 69 |
+
Table 3: Traditional Metrics' based evaluation on different persona using Llama2-13b Finetuning model (in %)
|
| 70 |
+
|
| 71 |
+
the generated persona-based summary correctly covers important key points described in the gold standard persona-based summary of the document.
|
| 72 |
+
|
| 73 |
+
Criteria 3: Impurity (Imp): The extent to which the persona-based summary does not contain information specific to all other possible personas {persona_set - persona}.
|
| 74 |
+
|
| 75 |
+
Criteria 4: Quality (Qlt): The extent to which the persona-based summary is of overall good quality from the perspective of the intended persona.
|
| 76 |
+
|
| 77 |
+
Criteria 5: Goodness (Gds): Extending from 4, we manually verify the goodness of the summary.
|
| 78 |
+
|
| 79 |
+
(Details of these criteria with prompts are provided in Appendix D).
|
| 80 |
+
|
| 81 |
+
Results: We provide a comparison of our finetuned models against the baselines in terms of both traditional metrics as well as GPT-4 criteria in Tables 2 and 4 respectively (all values are in %) on the WebMD test set of size 873 (prompt specific to three different persona each for 291 articles). Table 2 infers that both our finetuned models (L-F-7b and L-F-13b) achieve superior performance compared to the baseline methods in terms of traditional metrics. In fact, finetuned Llama2-13b (L-F-13b) outperforms the baselines in terms of all the traditional metrics, demonstrating the superiority of our finetuning approach which helps to adapt the model to the healthcare domain and perform better on specific applications such as persona-based summarization. Similar observation holds true when we compare the values of the GPT-4 critique based criteria shown in Table 4. Here we also compare the quality of the gold standard GPT-4 generated summaries in terms of the GPT-4 critique based criteria. We find that the finetuned Llama2-13b model (L-F-13b) can generate summaries pretty close in quality to the gold standard, while being much faster in terms of training and inference time as well as cost-effective and cheaper in terms of memory requirement.
|
| 82 |
+
|
| 83 |
+
Framework: We use 80GB A100 GPU, 210MHz clock cycle along with NLTK/SpaCy python packages for all experiments. For 6 epochs, Llama2-13b takes 20 hrs for finetuning and 3 hrs for inference, Llama2-7b takes 8 hrs for finetuning and 2.5 hrs for inference (Details in Appendix E.3).
|
| 84 |
+
|
| 85 |
+
Ablation study: Here we investigate the quality of persona-based summaries generated by different variations of our best performing finetuned Llama2-13b (L-F-13b) model on WebMD test set:
|
| 86 |
+
|
| 87 |
+
(A) Performance specific to different persona: Table 3 and 5 shows the performance in terms of
|
| 88 |
+
|
| 89 |
+
<table><tr><td>Model</td><td>Rel</td><td>Cov</td><td>Imp</td><td>Qlt</td><td>Gds</td></tr><tr><td>Falcon</td><td>56.3</td><td>45.4</td><td>82.0</td><td>50.6</td><td>46.8</td></tr><tr><td>BART</td><td>65.4</td><td>42.6</td><td>84.8</td><td>49.7</td><td>25.8</td></tr><tr><td>Pegasus</td><td>47.7</td><td>33.0</td><td>74.0</td><td>36.1</td><td>11.5</td></tr><tr><td>T5-FT</td><td>72.4</td><td>70.1</td><td>84.9</td><td>67.6</td><td>78.1</td></tr><tr><td>FT5-FT</td><td>72.2</td><td>70.2</td><td>88.0</td><td>68.3</td><td>80.3</td></tr><tr><td>LED-B</td><td>36.1</td><td>19.2</td><td>79.3</td><td>31.3</td><td>17.6</td></tr><tr><td>LED-L</td><td>69.1</td><td>56.2</td><td>82.3</td><td>59.3</td><td>56.6</td></tr><tr><td>L-V-7b</td><td>19.1</td><td>18.4</td><td>41.3</td><td>16.6</td><td>15.2</td></tr><tr><td>L-V-13b</td><td>32.1</td><td>29.1</td><td>73.1</td><td>28.5</td><td>23.4</td></tr><tr><td>L-V-70b</td><td>49.7</td><td>45.1</td><td>78.0</td><td>46.4</td><td>47.8</td></tr><tr><td>L-F-7b</td><td>75.8</td><td>58.7</td><td>85.8</td><td>63.8</td><td>58.6</td></tr><tr><td>L-F-13b</td><td>93.5</td><td>90.1</td><td>91.7</td><td>88.5</td><td>99.1</td></tr><tr><td>GPT-4</td><td>98.2</td><td>96.3</td><td>98.6</td><td>98.5</td><td>99.7</td></tr></table>
|
| 90 |
+
|
| 91 |
+
standard evaluation metrics and outcomes of GPT-4 critique based criteria for each of the three persona [Doctor, Patient and Normal Person (Nor-Per)] for the best performing Llama2-13b Finetuned model (L-F-13b). We observe that the model performs uniformly across the three persona which confirms that our finetuned model generalizes well across multiple persona, generating distinct persona-based summaries for the same medical article.
|
| 92 |
+
|
| 93 |
+
Table 4: GPT-4 Critique evaluation results (in %)
|
| 94 |
+
|
| 95 |
+
<table><tr><td>Persona</td><td>Rel</td><td>Cov</td><td>Imp</td><td>Qlt</td><td>Gds</td></tr><tr><td>Doctor</td><td>90.0</td><td>89.1</td><td>91.0</td><td>86.2</td><td>98.8</td></tr><tr><td>Patient</td><td>94.4</td><td>90.4</td><td>92.2</td><td>88.5</td><td>99.0</td></tr><tr><td>Nor-Per</td><td>93.2</td><td>91.0</td><td>91.8</td><td>87.7</td><td>99.3</td></tr><tr><td>Average</td><td>93.5</td><td>90.1</td><td>91.7</td><td>88.5</td><td>99.1</td></tr></table>
|
| 96 |
+
|
| 97 |
+
Table 5: GPT-4 critique on different persona using Llama2-13b Finetuning model (in %)
|
| 98 |
+
|
| 99 |
+
(B) Validation of GPT-4 generated gold standard summaries: To verify the robustness of the GPT-4 generated summaries for the WebMD articles and to mitigate the GPT-4 introduced inherent bias in generated summaries, we perform different types of human annotation experiments:
|
| 100 |
+
|
| 101 |
+
(i) Persona-based Summary of GPT-4: We randomly select 50 different WebMD articles and provide three different persona-based (doctor, patient, normal person) summaries (without their actual labels) to three different doctors with domain knowledge expertise along with a good working proficiency in English and ask them to identify the intended persona, i.e. - which summary belongs to which specific persona. Initial human labeling is done by two doctors and any annotation discrepancy is checked and resolved by the third doctor after discussing with others. The inter-annotator agreement is found to be 0.91. On comparing with actual persona labels, we found that human labels have $86.67\%$ accuracy for correctly identifying the actual persona which shows the reliability of GPT-4
|
| 102 |
+
|
| 103 |
+
generated persona-based summaries.
|
| 104 |
+
|
| 105 |
+
(ii) Content Quality Check: We ask human annotators (doctors) to annotate summaries on the basis of whether the persona-based summary is relevant while correctly covering appropriate key points based on information need of different persona and its overall usefulness. $96\%$ of the GPT-4 generated summaries for different personas are found to be useful by human annotators (doctors).
|
| 106 |
+
|
| 107 |
+
(iii) GPT-4 Generated and Ground Truth Summary Check: Both doctors with domain expertise and GPT-4 evaluate 50 document-summary pairs in terms of whether the persona-based summary is relevant and correctly covers appropriate key points based on information need of different persona, each for GPT-4 generated summaries and ground truth summaries generated by annotators. We obtain an inter-annotator agreement of 0.893 which signifies strong consensus between human and GPT-4 based evaluation. We separately test our best fine-tuned (Llama2-13b-FT) model on the human-generated summaries (50 articles) and obtain the following scores for different metrics - Traditional: R1-52.9, R2-24.1, RL-33.2, Meteor-38.7, Bleu-18.0, Bert-P-87.7, Bert-R-84.9, Bert-F1-86.3; GPT-4 criteria: Rel-91.2, Cov-90.8, Imp-90.4, Qtlt-88.7, Gds-98.5. This shows that there is strong alignment between results of on human generated and GPT-4 generated summaries, signifying the high quality of GPT-4 generated summaries.
|
| 108 |
+
|
| 109 |
+
(C) Validation of finetuned model generated summaries: To further investigate the reliability of our finetuned model generated summaries, we choose 50 different WebMD articles and provide persona-based summaries for each persona (generated by GPT-4 in ground truth v/s Llama2-13b finetuned model generated) to two doctors to annotate: (i) whether finetuned generated summary is better, (ii) Both are Good, (iii) Ground Truth/GPT-4 summary is better and (iv) Both are bad. We find that for - $20\%$ cases Llama2-13b finetuned model summaries are better (i), for $50\%$ cases both finetuned and ground truth generated summaries are good (ii) and rest $30\%$ cases ground truth generated summaries are better (iii) and no instance is found where both performs bad (iv).
|
| 110 |
+
|
| 111 |
+
(D) Different LLM Evaluators: We evaluate the fine-tuned model generated summaries in the test set with Gemini model<sup>9</sup> keeping the same prompts and criteria as used earlier for GPT-4 and the obtain
|
| 112 |
+
|
| 113 |
+
values of the same LLM based criteria are: Rel - 95.2, Cov - 92.4, Imp - 87.6, Qt - 90.7, Gds - 99.4. Thus, Gemini scores are also aligned with GPT-4 scores with a correlation coefficient of 0.808 (Gemini provides higher scores for all criteria except Criteria 3 - 'Imp'). This verifies that the GPT-4 based evaluation is impartial and robust.
|
| 114 |
+
|
| 115 |
+
(E) Llama2-13b performance on Other data: We test our best performing Llama2-13b finetuned model on healthcare domain articles of OASUM (Yang et al., 2022) dataset which is publicly available. We select OASUM articles with aspects related to healthcare [Death, Diagnosis, Differential Diagnosis and Diagnosis Classification] and obtain 234 such documents. We perform GPT-critique based evaluation and observe that $82.77\%$ of the summaries are labeled as good which signifies the robustness of our model in terms of generating high quality summaries.
|
| 116 |
+
|
| 117 |
+
# 4 Conclusion
|
| 118 |
+
|
| 119 |
+
In this paper, we propose a framework for the efficient training of a small foundation LLM on AI-generated datasets to obtain high quality domain-specific persona-based summaries. Our focus is on training a finetuned version of Llama2 on a corpus related to healthcare domain such that the trained model captures the intricacies of persona-based summaries in healthcare domain. We also demonstrate the effectiveness of using AI-based critiquing for the evaluation of the model generated summaries, providing a more automated and scalable solution. Our experiments also reveal the superior quality of persona-based summaries generated by our finetuned model compared to contemporary baselines. Further, AI-based critiquing of the summaries show high inter-annotator agreement with human-based critiquing methods, further confirming the effectiveness of our proposed approach. We plan to extend our work in generating accurate persona-based summaries for documents in other domains such as legal, enterprises, education and more, which is the focus of our future work.
|
| 120 |
+
|
| 121 |
+
# Acknowledgements
|
| 122 |
+
|
| 123 |
+
The work was supported in part by a research grant from IIT KHARAGPUR AI4ICPS I HUB FOUN-DATION.
|
| 124 |
+
|
| 125 |
+
# Limitation and Discussion
|
| 126 |
+
|
| 127 |
+
There are a few limitations in our works - (i) Not all LLMs are useful (similar to GPT-4) to generate personalized contents properly - like GPT2, GPT3.5, Llama2-vanilla models do not perform very well mostly due to hallucination and not covering important informations. (ii) We only explore the data from healthcare domain, but we plan to extend our work to other domains such as legal, corporate and education among others. (iii) Our experimental dataset is only English in healthcare domain, we wish to extend the work in multilingual setup, specifically for low-resource settings in diverse domains. (iv) Prompt command is very important. Unless, we specifically mention with explanation in Prompt about different Persona (Doctor/Patient/Normal Person), GPT-4 does not perform well to generate appropriate summary.
|
| 128 |
+
|
| 129 |
+
# Ethical Concerns
|
| 130 |
+
|
| 131 |
+
We use the publicly available content of the WebMD platform for non-commercial and academic purpose only without violating any ethical concerns. The dataset neither reveals any personal sensitive information of the patients nor any toxic statement. Consent has been taken from all annotators including doctors. For experiments, we use publicly available free frameworks - Llama2, Falcon, BART, Pegasus, T5-FT, Flan-T5 (FT5-FT), LED-Base, LED-Large, Llama2-7b, 13b and 70b - vanilla and finetune.
|
| 132 |
+
|
| 133 |
+
# References
|
| 134 |
+
|
| 135 |
+
Nadeem Akhtar, Nashez Zubair, Abhishek Kumar, and Tameem Ahmad. 2017. Aspect based sentiment oriented summarization of hotel reviews. Procedia computer science, 115:563-571.
|
| 136 |
+
Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72.
|
| 137 |
+
Iz Beltagy, Matthew E Peters, and Arman Cohan. 2020. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150.
|
| 138 |
+
Chi-Min Chan, Weize Chen, Yusheng Su, Jianxuan Yu, Wei Xue, Shanghang Zhang, Jie Fu, and Zhiyuan Liu. 2023. Chateval: Towards better llm-based evaluators through multi-agent debate. arXiv preprint arXiv:2308.07201.
|
| 139 |
+
|
| 140 |
+
Bharath Chintagunta, Namit Katariya, Xavier Amatriain, and Anitha Kannan. 2021. Medically aware gpt-3 as a data generator for medical dialogue summarization. In Machine Learning for Healthcare Conference, pages 354-372. PMLR.
|
| 141 |
+
Sumit Chopra, Michael Auli, and Alexander M Rush. 2016. Abstractive sentence summarization with attentive recurrent neural networks. In Proceedings of the 2016 conference of the North American chapter of the association for computational linguistics: human language technologies, pages 93-98.
|
| 142 |
+
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.
|
| 143 |
+
Maximin Coavoux, Hady Elsahar, and Matthias Galle. 2019. Unsupervised aspect-based multi-document abstractive summarization. In Proceedings of the 2nd Workshop on New Frontiers in Summarization, pages 42-47.
|
| 144 |
+
Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. 2023. Qlora: Efficient finetuning of quantized llms. arXiv preprint arXiv:2305.14314.
|
| 145 |
+
Günes Erkan and Dragomir R Radev. 2004. Lexrank: Graph-based lexical centrality as salience in text summarization. Journal of artificial intelligence research, 22:457-479.
|
| 146 |
+
Mingqi Gao, Xinyu Hu, Jie Ruan, Xiao Pu, and Xiaojun Wan. 2024. Llm-based nlg evaluation: Current status and challenges. arXiv preprint arXiv:2402.01383.
|
| 147 |
+
Tomsa Goldsack, Zheheng Luo, Qianqian Xie, Carolina Scarton, Matthew Shardlow, Sophia Ananiadou, and Chenghua Lin. 2023. Overview of the biolaysumm 2023 shared task on lay summarization of biomedical research articles. arXiv preprint arXiv:2309.17332.
|
| 148 |
+
Souradip Guha, Ankan Mullick, Jatin Agrawal, Swetarekha Ram, Samir Ghui, Seung-Cheol Lee, Satadeep Bhattacharjee, and Pawan Goyal. 2021. Matscie: An automated tool for the generation of databases of methods and parameters used in the computational materials science literature. Computational Materials Science (Comput. Mater. Sci.), 192:110325.
|
| 149 |
+
Hiroaki Hayashi, Prashant Budania, Peng Wang, Chris Ackerson, Raj Neervannan, and Graham Neubig. 2021. Wikiasp: A dataset for multi-domain aspect-based summarization. Transactions of the Association for Computational Linguistics, 9:211-225.
|
| 150 |
+
Fabian Kieser, Peter Wulff, Jochen Kuhn, and Stefan Kuchemann. 2023. Educational data augmentation in physics education research using chatgpt. Physical Review Physics Education Research, 19(2):020150.
|
| 151 |
+
|
| 152 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461.
|
| 153 |
+
Zongxi Li, Xianming Li, Yuzhang Liu, Haoran Xie, Jing Li, Fu-lee Wang, Qing Li, and Xiaoqin Zhong. 2023. Label supervised llama finetuning. arXiv preprint arXiv:2310.01208.
|
| 154 |
+
Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.
|
| 155 |
+
Yuxuan Liu, Tianchi Yang, Shaohan Huang, Zihan Zhang, Haizhen Huang, Furu Wei, Weiwei Deng, Feng Sun, and Qi Zhang. 2023. Calibrating llmbased evaluator. arXiv preprint arXiv:2309.13308.
|
| 156 |
+
Zheheng Luo, Qianqian Xie, and Sophia Ananiadou. 2022. Readability controllable biomedical document summarization. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 4667-4680.
|
| 157 |
+
Paula Maddigan and Teo Susnjak. 2023. Chat2vis: Generating data visualisations via natural language using chatgpt, codex and gpt-3 large language models. IEEE Access.
|
| 158 |
+
Yu Meng, Jiaxin Huang, Yu Zhang, and Jiawei Han. 2022. Generating training data with language models: Towards zero-shot language understanding. Advances in Neural Information Processing Systems, 35:462-477.
|
| 159 |
+
Rada Mihalcea and Paul Tarau. 2004. Textrank: Bringing order into text. In Proceedings of the 2004 conference on empirical methods in natural language processing, pages 404-411.
|
| 160 |
+
Rajdeep Mukherjee, Hari Chandana Peruri, Uppada Vishnu, Pawan Goyal, Sourangshu Bhattacharya, and Niloy Ganguly. 2020. Read what you need: Controllable aspect-based opinion summarization of tourist reviews. In Proceedings of the 43rd international ACM SIGIR conference on research and development in information retrieval, pages 1825-1828.
|
| 161 |
+
Ankan Mullick. 2023a. Exploring multilingual intent dynamics and applications. *IJCAI Doctoral Consortium*.
|
| 162 |
+
Ankan Mullick. 2023b. Novel intent detection and active learning based classification (student abstract). arXiv e-prints, pages arXiv-2304.
|
| 163 |
+
Ankan Mullick, Akash Ghosh, G Sai Chaitanya, Samir Ghui, Tapas Nayak, Seung-Cheol Lee, Satadeep Bhattacharjee, and Pawan Goyal. 2024. Matscire: Leveraging pointer networks to automate entity and relation extraction for material science knowledge-base construction. Computational Materials Science, 233:112659.
|
| 164 |
+
|
| 165 |
+
Ankan Mullick, Surjodoy Ghosh D, Shivam Maheswari, Srotaswini Sahoo, Suman Kalyan Maity, and Pawan Goyal. 2018a. Identifying opinion and fact subcategories from the social web. In Proceedings of the 2018 ACM International Conference on Supporting Group Work, pages 145-149.
|
| 166 |
+
Ankan Mullick, Pawan Goyal, and Niloy Ganguly. 2016. A graphical framework to detect and categorize diverse opinions from online news. In Proceedings of the Workshop on Computational Modeling of People's Opinions, Personality, and Emotions in Social Media (PEOPLES), pages 40-49.
|
| 167 |
+
Ankan Mullick, Pawan Goyal, Niloy Ganguly, and Manish Gupta. 2017a. Extracting social lists from twitter. In Proceedings of the 2017 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining 2017, pages 391-394.
|
| 168 |
+
Ankan Mullick, Pawan Goyal, Niloy Ganguly, and Manish Gupta. 2018b. Harnessing twitter for answering opinion list queries. IEEE Transactions on Computational Social Systems, 5(4):1083-1095.
|
| 169 |
+
Ankan Mullick, Shivam Maheshwari, Pawan Goyal, and Niloy Ganguly. 2017b. A generic opinion-fact classifier with application in understanding opinionatedness in various news section. In Proceedings of the 26th International Conference on World Wide Web Companion, pages 827-828.
|
| 170 |
+
Ankan Mullick, Ishani Mondal, Sourjyadip Ray, R Raghav, G Chaitanya, and Pawan Goyal. 2023. Intent identification and entity extraction for healthcare queries in indic languages. In Findings of the Association for Computational Linguistics: EACL 2023, pages 1825-1836.
|
| 171 |
+
Ankan Mullick, Abhilash Nandy, Manav Kapadnis, Sohan Patnaik, R Raghav, and Roshni Kar. 2022a. An evaluation framework for legal document summarization. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 4747-4753.
|
| 172 |
+
Ankan Mullick, Abhilash Nandy, Manav Nitin Kapadnis, Sohan Patnaik, and R Raghav. 2022b. Finegrained intent classification in the legal domain. arXiv preprint arXiv:2205.03509.
|
| 173 |
+
Ankan Mullick, Shubhraneel Pal, Tapas Nayak, Seung-Cheol Lee, Satadeep Bhattacharjee, and Pawan Goyal. 2022c. Using sentence-level classification helps entity extraction from material science literature. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 4540-4545.
|
| 174 |
+
Ankan Mullick, Sourav Pal, Projjal Chanda, Arijit Panigrahy, Anurag Bharadwaj, Siddhant Singh, and Tanmoy Dam. 2019. D-fj: Deep neural network based factuality judgment. Technology, 50:173.
|
| 175 |
+
|
| 176 |
+
Ankan Mullick, Sukannya Purkayastha, Pawan Goyal, and Niloy Ganguly. 2022d. A framework to generate high-quality datapoints for multiple novel intent detection. arXiv preprint arXiv:2205.02005.
|
| 177 |
+
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, pages 311-318.
|
| 178 |
+
Romain Paulus, Caiming Xiong, and Richard Socher. 2017. A deep reinforced model for abstractive summarization. arXiv preprint arXiv:1705.04304.
|
| 179 |
+
Guilherme Penedo, Quentin Malartic, Daniel Hesslow, Ruxandra Cojocaru, Alessandro Cappelli, Hamza Alobeidli, Baptiste Pannier, Ebtesam Almazrouei, and Julien Launay. 2023. The refinedweb dataset for falcon llm: outperforming curated corpora with web data, and web data only. arXiv preprint arXiv:2306.01116.
|
| 180 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(1):5485-5551.
|
| 181 |
+
Abigail See, Peter J Liu, and Christopher D Manning. 2017. Get to the point: Summarization with pointer-generator networks. arXiv preprint arXiv:1704.04368.
|
| 182 |
+
Zhaoyi Sun, Hanley Ong, Patrick Kennedy, Liyan Tang, Shirley Chen, Jonathan Elias, Eugene Lucas, George Shih, and Yifan Peng. 2023. Evaluating gpt-4 on impressions generation in radiology reports. Radiology, 307(5):e231259.
|
| 183 |
+
Jesse Vig, Alexander R Fabbri, Wojciech Krysciński, Chien-Sheng Wu, and Wenhao Liu. 2021. Exploring neural models for query-focused summarization. arXiv preprint arXiv:2112.07637.
|
| 184 |
+
Yumo Xu and Mirella Lapata. 2020. Query focused multi-document summarization with distant supervision. arXiv preprint arXiv:2004.03027.
|
| 185 |
+
Xianjun Yang, Kaiqiang Song, Sangwoo Cho, Xiaoyang Wang, Xiaoman Pan, Linda Petzold, and Dong Yu. 2022. Oasum: Large-scale open domain aspect-based summarization. arXiv preprint arXiv:2212.09233.
|
| 186 |
+
Jiacheng Ye, Jiahui Gao, Jiangtao Feng, Zhiyong Wu, Tao Yu, and Lingpeng Kong. 2022. Progen: Progressive zero-shot dataset generation via in-context feedback. arXiv preprint arXiv:2210.12329.
|
| 187 |
+
Yue Yu, Yuchen Zhuang, Jieyu Zhang, Yu Meng, Alexander Ratner, Ranjay Krishna, Jiaming Shen, and Chao Zhang. 2023. Large language model as attributed training data generator: A tale of diversity and bias. arXiv preprint arXiv:2306.15895.
|
| 188 |
+
|
| 189 |
+
Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter Liu. 2020. Pegasus: Pre-training with extracted gap-sentences for abstractive summarization. In International Conference on Machine Learning, pages 11328-11339. PMLR.
|
| 190 |
+
Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2019. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675.
|
| 191 |
+
Kun Zhou, Yutao Zhu, Zhipeng Chen, Wentong Chen, Wayne Xin Zhao, Xu Chen, Yankai Lin, Ji-Rong Wen, and Jiawei Han. 2023. Don't make your lmm an evaluation benchmark cheater. arXiv preprint arXiv:2311.01964.
|
| 192 |
+
Haichao Zhu, Li Dong, Furu Wei, Bing Qin, and Ting Liu. 2022. Transforming wikipedia into augmented data for query-focused summarization. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 30:2357-2367.
|
| 193 |
+
|
| 194 |
+
# Appendix
|
| 195 |
+
|
| 196 |
+
# A Related Work
|
| 197 |
+
|
| 198 |
+
In this section, we conduct a survey of state-of-the-art literature on closely related topics.
|
| 199 |
+
|
| 200 |
+
Summarization: We perform a survey of various summarization techniques, that encompasses generic approaches such as abstractive (Chopra et al., 2016; See et al., 2017; Paulus et al., 2017) and extractive summarization like TextRank (Mihalcea and Tarau, 2004) and LexRank (Erkan and Radev, 2004). Subsequent research has explored summarization in specific directions, including aspect-based summaries (Hayashi et al., 2021; Coavoux et al., 2019; Mukherjee et al., 2020; Akhtar et al., 2017) and query-focused summaries (Vig et al., 2021; Zhu et al., 2022; Xu and Lapata, 2020), but none focuses on domain-specific persona-based summarization.
|
| 201 |
+
|
| 202 |
+
Persona Concept: (Goldsack et al., 2023; Luo et al., 2022) focus on building lay-summarization for comprehensible to non-technical audiences but do not have the differentiating factor of persona concept to distinguish the various technical summaries. based on persona and no usage of LLMs as an alternative metrics to evaluate the summaries. Our work differs from the fact that we show a pipelined approach - data generation, persona-specific (doctor vs patient vs normal person) summarization with key points and GPT-4 based evaluation to save time and assist different persona to augment their knowledge on it to make conclusions more efficiently. The concept of Persona also different from the notion of intent (Mullick et al., 2022d, 2023, 2022b; Mullick, 2023b,a; Mullick et al., 2022a), entity-relation (Mullick et al., 2024; Guha et al., 2021; Mullick et al., 2022c) or opinion/fact (Mullick et al., 2017b, 2016, 2018a,b, 2019, 2017a) idea. Our work differs from the fact that we show a pipelined approach - data generation, 'persona concept' specific (doctor vs patient vs normal person) summarization with key points and GPT-4 based evaluation to save time and assist different persona to augment their knowledge on it to make conclusions more efficiently.
|
| 203 |
+
|
| 204 |
+
Data Generation using LLMs: Large Language Models (LLMs), such as the GPT family, have been utilized to generate training datasets for NLP tasks, addressing data scarcity issues in a cost effective manner (Yu et al., 2023; Meng et al., 2022;
|
| 205 |
+
|
| 206 |
+
Ye et al., 2022). ChatGPT $^{10}$ aids in educational data augmentation and data visualization (Kieser et al., 2023; Maddigan and Susnjak, 2023); however, in healthcare domain, GPT-3 and GPT-4 are employed for generating medical dialogue summarization data (Chintagunta et al., 2021) and radiology reports (Sun et al., 2023). However, no prior work focuses on benchmark domain-specific persona-based summary data generation with appropriate human validation.
|
| 207 |
+
|
| 208 |
+
LLMs as Evaluation Metrics: The rise of LLMs presents a potential, cost-effective alternative for evaluating various NLP tasks. Existing efforts include a taxonomy of LLM-based NLG evaluation methods (Gao et al., 2024), the development of 'ChatEval' for assessing response quality (Chan et al., 2023), and proposed guidelines for LLM-based evaluation (Zhou et al., 2023). While some studies explore LLM-based assessments with human alignment (Liu et al., 2023), there is a lack of work utilizing LLMs to evaluate solution architectures comprehensively with a critique scoring system.
|
| 209 |
+
|
| 210 |
+
Our paper takes a significant step towards addressing the shortcomings of prior literature in terms of persona-based summary data generation followed by human validation as well as performing LLM based critic evaluation.
|
| 211 |
+
|
| 212 |
+
# B Dataset Requirement
|
| 213 |
+
|
| 214 |
+
Access to robust, comprehensive datasets is crucial for training NLP models to understand and generate persona-specific content, emphasizing the challenges of data scarcity and summary-making capabilities. Manual annotation of large healthcare datasets is both costly and time-intensive, demanding domain expertise and meticulous attention to detail. Consider the example where $n$ individuals generate summaries for $m$ persona, resulting in $n \times m$ distinct summary generations for a single article — it is a highly expensive and time consuming process. Moreover, acquiring suitable human resources for labeling is challenging, as people are often hesitant to undertake the tedious and difficult task of summary generation, even with a standard payment agreement.
|
| 215 |
+
|
| 216 |
+
We provide healthcare data to the Prolific annotation platform with specific criteria: annotators
|
| 217 |
+
|
| 218 |
+
with a PhD / Graduate degree, a medical background, approval rates of $90\% - 100\%$ , and expertise in medicine. However, out of 157,341 potential annotators, only 189 meet these criteria, and even among them, there is a high rejection rate of $71.43\%$ for selecting documents for manual summary generation, despite offering more than standard payment. Further, eligible annotators tend to heavily rely on ChatGPT and similar automated approaches, leading to the need for extensive re-evaluations and revisions, along with issues related to annotator rejection, even to assess a limited number of documents. Hence, obtaining a high quality dataset remains a formidable challenge.
|
| 219 |
+
|
| 220 |
+
# C GPT-4 Bias
|
| 221 |
+
|
| 222 |
+
It is acknowledged that using summaries generated exclusively by GPT-4 could introduce biases inherent in its summarization capabilities, it may also be noted that alternatives, such as human evaluation, also carry their own biases. Despite the potential for bias, leveraging GPT-4 for summarization may still be a pragmatic choice, especially in scenarios where access to diverse datasets or sophisticated validation methods is limited. However, in this work, we remain vigilant, recognizing the limitations inherent in both automated and human-generated summaries, and take proactive steps such as human intervention to validate and contextualise the results to mitigate biases to the best extent possible within the given constraints.
|
| 223 |
+
|
| 224 |
+
# D Prompts
|
| 225 |
+
|
| 226 |
+
We use prompting in three stages - data generation, finetune-inference and critique. There are two kinds of prompts - system prompt and user prompt.
|
| 227 |
+
|
| 228 |
+
# D.1 Data Generation
|
| 229 |
+
|
| 230 |
+
system : You are an AI assistant who are to generate a summary of a medical document specific to a certain persona which can be doctor, patient, normal person. The summary of a medical document should be generated from the perspective of the respective persona.
|
| 231 |
+
|
| 232 |
+
user : Summarize the medical document given below from the perspective of a {persona} [doctor/patient/normal person] and return the summary only. The medical document is as follows: Document: {document}
|
| 233 |
+
|
| 234 |
+
# D.2 Finetune and Inference prompt
|
| 235 |
+
|
| 236 |
+
user prompt - Summarize the medical document given below from the perspective of a persona:
|
| 237 |
+
|
| 238 |
+
Document: document
|
| 239 |
+
|
| 240 |
+
# D.3 Critique
|
| 241 |
+
|
| 242 |
+
system: You are an AI assistant who is to evaluate the summary of a medical document specific to a certain persona which can be doctor, patient or a normal person. A doctor requires a detailed and technical summary about the medical document. Patients require a layman's summary about the medical document, with information about things like causes, effects, treatment etc. that may be helpful to them. A normal person has no medical knowledge and requires a generic summary about the medical document. You need to return a score between 0 and 1 reflecting the quality of the generated summary based on some criteria.
|
| 243 |
+
|
| 244 |
+
user: You are given a medical document and the corresponding summary of the document generated from the perspective of a {persona} predicted by a language model as follows.
|
| 245 |
+
|
| 246 |
+
Document: {document}
|
| 247 |
+
|
| 248 |
+
Ground truth summary: {label summary}
|
| 249 |
+
|
| 250 |
+
Summary from the perspective of a {persona} [doctor/patient/normal person]: {model generated summary}
|
| 251 |
+
|
| 252 |
+
Evaluate the above persona based summary for the document in terms of each of the following criteria and return only a score between 0 and 1 without any explanation:
|
| 253 |
+
|
| 254 |
+
- The extent to which the generated summary is relevant to the specific persona {persona} [doctor/patient/normal person] based summary of the document.
|
| 255 |
+
- The extent to which the generated person-based summary correctly covers all the important key points described in the persona {persona} [doctor/patient/normal person] based summary of the document.
|
| 256 |
+
- The extent to which the summary does not contain information specific to all other possible personas {persona_set - persona}[doctor/patient/normal person] based summary.
|
| 257 |
+
- Rate the summary from the point of view of the persona – whether the summary is good, average, or bad. A good summary effectively
|
| 258 |
+
|
| 259 |
+
captures the essential points, presenting them clearly and concisely. It maintains accuracy, encourages reader engagement, and serves as a compelling introduction to the content. An average summary conveys the main points but may lack some clarity or detail, presenting a decent overview without standing out in terms of conciseness or precision. It provides a basic understanding but not from a more refined focused summary and fails to accurately convey the main points, containing inaccuracies or misinterpretations. It is either overly verbose or lacks coherence, making it difficult for the reader to grasp the core information effectively.
|
| 260 |
+
|
| 261 |
+
- Calculated summary from the point of view of the persona [Good/Bad/Average] [Calculated from 4 with the help of manual annotation]
|
| 262 |
+
|
| 263 |
+
# E Experiments
|
| 264 |
+
|
| 265 |
+
# E.1 Varying Training Size Dataset
|
| 266 |
+
|
| 267 |
+
To understand the effect of training data size on the performance, we vary the WebMD training data for the Llama2-13b model - taking 10-shot ( $k$ -shot settings where $k = 10$ ), $10\%$ , $40\%$ and $70\%$ of the initial training data, and finetune the Llama2-13b model with same parameter and hyper-parameter settings and the five criterias of GPT-4 Critique outcome (in $\%$ ) are shown in Fig 1. We see that with increasing the dataset size, the performance of Llama2-13b improves in terms of GPT-4 critique and traditional metrics. Even at $40\%$ of the dataset, the model is able to achieve a very good performance. It shows the effectiveness of the Llama2-13b model. It also infers that even with very little amount of data in 10-shot Llama2-13b can be able to generate appropriate persona and aspect based summary.
|
| 268 |
+
|
| 269 |
+

|
| 270 |
+
Figure 1: Different Training Data Sizes
|
| 271 |
+
|
| 272 |
+
# E.2 Tuning generation parameters during model inference:
|
| 273 |
+
|
| 274 |
+
We investigate the impact of tuning the max-new-token and temperature generation parameters on
|
| 275 |
+
|
| 276 |
+
the performance of our finetuned model during inference. The variation in performance in terms of the five GPT-4 critique based criteria are shown in Figures 2a and 2b respectively. We observe that our model performs the best for a temperature of 0 and performance degrades significantly as we increase the temperature beyond 0.4. Similarly, the best model performance is achieved for a max-new-token size of 350. We have used NLTK, Spacy, openai (version=0.28), huggingface hubs, torch and transformers python packages for all experiment.
|
| 277 |
+
|
| 278 |
+

|
| 279 |
+
(a) w.r.t. max-new-token
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
(b) w.r.t. temperature
|
| 283 |
+
Figure 2: Variations of Llama2-13b-Finetune (in %)
|
| 284 |
+
|
| 285 |
+
# E.3 Time and GPU
|
| 286 |
+
|
| 287 |
+
We experiment on 80GB A100 GPU with GPU clock cycle $210\mathrm{MHz}$ . The finetuning and inference time of our finetuned models are in Table 6.
|
| 288 |
+
|
| 289 |
+
<table><tr><td>Model</td><td>Finetune Time</td><td>Inference Time</td></tr><tr><td>Llama2-7b</td><td>8 hrs</td><td>2hrs 30 mins</td></tr><tr><td>Llama2-13b</td><td>20 hrs</td><td>2hrs 50 mins</td></tr></table>
|
| 290 |
+
|
| 291 |
+
Table 6: Model Training Time [using 80GB A100 GPU]
|
| 292 |
+
|
| 293 |
+
# F Human Annotations
|
| 294 |
+
|
| 295 |
+
Annotation Guidelines for Comparative Rating: We provide instructions with explanations of different persona and ask to identify which summary belongs to which persona as shown in Fig 5. We also provide the link of document along with distinct summaries of GPT-4 and Llama2-13b finetune model for comprison as shown in Fig 6. The instructions are the following -
|
| 296 |
+
|
| 297 |
+
"You are given a summary of a medical document specific to the perspective of a certain group of people (doctor, patient and normal person).
|
| 298 |
+
|
| 299 |
+
A doctor requires a detailed and technical summary about the medical document.
|
| 300 |
+
|
| 301 |
+
A patient requires a layman summary about the medical document, with information about things like causes, effects, treatment etc. that may be helpful to him. A patient only requires a top level view of the extensive medical details and not so much
|
| 302 |
+
|
| 303 |
+
medical details like a doctor.
|
| 304 |
+
|
| 305 |
+
A normal person has no medical knowledge and requires a generic summary about the medical document and does not require extensive medical details."
|
| 306 |
+
|
| 307 |
+
# Annotation Guidelines to Prolific and Doctors
|
| 308 |
+
|
| 309 |
+
For annotator selection, we have several criterias. Annotator selection includes specific criteria such as 'Degree subject' in Health and welfare, 'Highest education level completed' as Doctorate degree or Graduate degree, 'Fluent languages' in English, 'Approval Rate' of 90-100, 'Subject' in Medicine, and 'Employment Sector' as Doctor. Further annotations are conducted by graduate doctors (details in Section - Human Evaluation Part).
|
| 310 |
+
|
| 311 |
+
Following is the annotation guideline to 'Prolific' annotation platform -
|
| 312 |
+
|
| 313 |
+
Objective: Generate Personified Summaries by Prolific
|
| 314 |
+
|
| 315 |
+
Introduction: In this study, you are tasked with generating a summary tailored to three different personas: a Doctor, a Patient, and a Normal Person. You will be provided with a document link containing a Source Document (SD) – which can be a medical research document or a general article related to health from https://www.webmd.com/. Additionally, a Persona (P) will be present.
|
| 316 |
+
|
| 317 |
+
Your Task: Read the Source Document (and Persona) and craft three summaries, each targeted towards one of the personas mentioned. Use your understanding and perspective to tailor the information in a way that is most relevant and comprehensible to each persona.
|
| 318 |
+
|
| 319 |
+
# Summary Persona:
|
| 320 |
+
|
| 321 |
+
Doctor Persona: Craft a summary that focuses on medical terminology, guidelines, and provides information suitable for a medical professional. Emphasize technical accuracy and relevance to medical practice. A doctor requires a detailed and technical summary about the medical document.
|
| 322 |
+
|
| 323 |
+
Patient Persona: Generate a summary with a patient-centric approach, avoiding excessive technical jargon. Ensure that the information is clear, easily understandable, and addresses concerns that a patient might have. A patient requires a nontechnical summary about the medical document, with information about things like causes, effects, treatment etc. that may be helpful to him. A patient only requires a top level view of the extensive medical details and not so much medical details like a doctor.
|
| 324 |
+
|
| 325 |
+
Normal Person Persona: Tailor a summary for
|
| 326 |
+
|
| 327 |
+
a general audience without a medical background. Use simple language, avoid technical terms, and present the information in a way that is accessible and engaging to a layperson. A normal person has no medical knowledge and requires a generic summary about the medical document and does not require extensive medical details.
|
| 328 |
+
|
| 329 |
+
Instructions: 1. Carefully review the Source Document and the Persona. Consider the specific needs and understanding level of each persona while generating the summaries.
|
| 330 |
+
|
| 331 |
+
2. No additional software download is required. Use a browser, preferably Google Chrome, and ensure a stable internet connection.
|
| 332 |
+
3. Allocate time judiciously for crafting each of the three summaries based on the provided 2 SD instances.
|
| 333 |
+
4. After completion, you will be asked to provide feedback on the generation exercise, platform interaction, and details about your academic background, age, country of birth, and any medical background or experience with model-generated summaries.
|
| 334 |
+
|
| 335 |
+
Payment Requirements: Upon completing the study, click on the provided link containing the completion code to redirect you to the Prolific platform. Payment will be processed within one to two weeks.
|
| 336 |
+
|
| 337 |
+
# Ethical Considerations:
|
| 338 |
+
|
| 339 |
+
Adhere to strict confidentiality and data protection standards to ensure the privacy of medical information. If you have concerns or questions, feel free to reach out, as this study aligns with ethical guidelines.
|
| 340 |
+
|
| 341 |
+
This study aims to harness diverse perspectives, including those of medical professionals, to refine the generation of personified summaries for enhanced utility in various contexts.
|
| 342 |
+
|
| 343 |
+
Next, the details while providing the documents - "You will be given 2 documents in the next 2 pages and you need to write the summaries with respect to Doctor, Patient and Normal Person (as in example).
|
| 344 |
+
|
| 345 |
+
Please do not use ChatGPT/GPT-4 or any Large Language Models - all summaries should be generated by human properly. It is a strict instruction and will be checked manually - if found any issue: it will be rejected and re-doing will be required.
|
| 346 |
+
|
| 347 |
+
Your summary length (word count) is approximately $15\% - 20\%$ of the document length (word count) for three different types."
|
| 348 |
+
|
| 349 |
+
# G Examples
|
| 350 |
+
|
| 351 |
+
Two human annotated examples in doctor persona is shown in Fig 3 where the GPT-4 generated summary is better and Fig 4 where LLAMA-2 generated summary is better. Two examples of human annotation interface is shown in Fig 5 and Fig 6 respectively.
|
| 352 |
+
|
| 353 |
+
Doc link - https://www.webmd.com/cholesterol-management/what-is-cholesterol-test
|
| 354 |
+
|
| 355 |
+
GPT-4 Summary- The medical document discusses the importance, procedures, and interpretations of cholesterol tests. These tests are crucial in evaluating the risk of heart attack or stroke by measuring cholesterol and triglyceride levels in the blood. The test is recommended every five years from age 20, with increased frequency for individuals over 45 (men) or 50 (women), those with cholesterol greater than 200, low HDL cholesterol, obesity, high blood pressure, other high-risk conditions, or those undergoing treatment for high cholesterol. The American Heart Association recommends conducting the test in a doctor's office, hospital, or lab to ensure accuracy and personalized follow-up care. Results interpretation includes total cholesterol (healthy level: $200\mathrm{mg / dL}$ or less), LDL bad cholesterol (healthy level: less than $100\mathrm{mg / dL}$ ), HDL good cholesterol (healthy level: $60\mathrm{mg / dL}$ or higher for both genders), and triglyceride levels (healthy level: less than $150\mathrm{mg / dL}$ ). These numbers are not universally applicable; the doctor will define specific targets based on the patient's health condition. If the results are in the unhealthy range, lifestyle modifications such as diet and exercise changes are suggested initially, followed by medication if necessary. If all results are within healthy limits, the test is usually not repeated for another five years.
|
| 356 |
+
|
| 357 |
+
LLAMA-2 Summary- The document discusses the importance of regular cholesterol testing for individuals aged 20 and above. It emphasizes the need for testing every five years or more frequently for those with high cholesterol levels, low HDL levels, obesity, high blood pressure, or other conditions that increase the risk of heart disease. The document also mentions that the test should be conducted in a medical setting, either at the doctor's office, hospital, or laboratory, to ensure accurate results. The test results provide a lipid panel, which includes the total cholesterol level, LDL and HDL levels, and triglyceride levels. A low LDL level is considered healthy and protects against heart attacks and strokes. A high HDL level is considered healthy and protects against heart disease. A low triglyceride level is also considered healthy. The document also mentions that the target levels for each of these parameters may vary depending on the individual's health status. If any of the test results fall in the unhealthy range, the individual may be advised to make lifestyle changes or take medication to improve their health. The document emphasizes the importance of maintaining a healthy lifestyle, including a balanced diet and regular physical activity, to prevent heart disease.
|
| 358 |
+
|
| 359 |
+
Figure 3: GPT-4 generated summary better than LLAMA2-13b model generated summary[persona : doctor]
|
| 360 |
+
|
| 361 |
+
Doc link- https://www.webmd.com/sex/birth-control/nausea-from-birth-control-pills
|
| 362 |
+
|
| 363 |
+
GPT-4 Summary- The document addresses the side effects, specifically nausea, related to birth control pills and offers strategies to mitigate these symptoms. Birth control pills are an effective means of pregnancy prevention, with additional benefits of lighter periods and improved acne, possible prevention of certain types of breast disease, anemia, ovarian cysts, and ovarian and endometrial cancers. However, nausea is a common drawback due to the estrogen in the pill irritating the stomach lining, potentially leading to vomiting, bloating, and loss of appetite. If vomiting occurs within 2 hours of pill intake, contraceptive absorption may not have occurred and another pill should be taken. The document suggests several methods to prevent pill-induced nausea including taking the pill at a consistent time, preferably at night, consuming light, bland foods, drinking cold liquids, eating smaller, slow meals, avoiding post-eating activities and spicy foods. If these methods fail, consultation with a healthcare provider about alternative contraceptive methods is advised.
|
| 364 |
+
|
| 365 |
+
LLAMA-2 Summary- The medical document highlights the benefits and drawbacks of birth control pills, including their effectiveness in preventing pregnancy, regulating periods, improving skin conditions, and potentially reducing the risk of certain cancers. However, it also mentions that nausea can be a common side effect of these pills, especially during the first three months of use. The document suggests that the hormones in the birth control pills, particularly estrogen, can irritate the lining of the stomach, leading to symptoms such as nausea, vomiting, bloating, and loss of appetite. If a pill is taken within two hours of vomiting, it may not be effective in preventing pregnancy. The document recommends several strategies to help prevent or manage nausea, including taking the pill at the same time every day, eating light, bland foods, drinking cold liquids, eating smaller meals slowly, and avoiding spicy foods. If nausea persists, it suggests consulting a doctor about switching to a different birth control pill or using alternative contraceptive methods. Overall, the document emphasizes the importance of weighing the benefits and drawbacks of birth control pills and finding the right method that works best for an individual's needs and lifestyle. doctor : The patient is experiencing nausea due to the birth control pills. The patient can take antacid tablets to manage the nausea. However, if the nausea persists, it is recommended to consult a doctor.
|
| 366 |
+
|
| 367 |
+
Figure 4: LLAMA2-13b model generated summary better than GPT-4 generated summary[persona : doctor]
|
| 368 |
+
|
| 369 |
+
Document link - https://www.webmd.com/ibd-crohns-disease/ulcerative-colitis/antineutrophilcytoplasmic-antibodies-anca-test
|
| 370 |
+
|
| 371 |
+
Summary -
|
| 372 |
+
|
| 373 |
+
An antineutrophil cytoplasmic antibodies (ANCA) test is a blood test used to check for proteins your immune system makes to fight germs. This test can help your doctor distinguish between ulcerative colitis and Crohn's disease, and diagnose autoimmune diseases like vasculitis. In some cases, your immune system may mistakenly attack your healthy tissues, these are called autoantibodies. The presence of these autoantibodies in your blood could indicate you have an autoimmune disease. The ANCA test checks for these autoantibodies. This test is particularly useful if your doctor is unsure whether you have Crohn's disease or ulcerative colitis, as the symptoms of these two types of inflammatory bowel disease are often similar. The ANCA test can help confirm a diagnosis when other tests are inconclusive. Up to $80\%$ of people with ulcerative colitis test positive for a specific type of ANCA. The ANCA test can also predict whether you'll respond to certain medications for inflammatory bowel disease and is commonly used to diagnose vasculitis, a group of autoimmune disorders that affect small blood vessels. In vasculitis, ANCA can cause an attack on the blood vessels, causing them to swell. Depending on which blood vessels are affected, vasculitis can cause a variety of symptoms, including fever, tiredness, weight loss, muscle or joint aches, vision or hearing loss, skin rashes, and changes in urine. The ANCA test can also show if your treatment for vasculitis is working and can predict if symptoms might come back after treatment. The test is done by drawing a blood sample, which is then sent to a lab for analysis. If the test is positive, you may have an autoimmune vasculitis or, if you are having symptoms of inflammatory bowel disease, you are more likely to have ulcerative colitis rather than Crohn's disease. Depending on the results, your doctor will discuss the next steps, including potential further tests or treatments.
|
| 374 |
+
|
| 375 |
+
Doctor
|
| 376 |
+
Patient
|
| 377 |
+
Normal Person
|
| 378 |
+
|
| 379 |
+
Figure 5: Persona identify experiment example snapshot
|
| 380 |
+
|
| 381 |
+
Document link - https://www.webmd.com/sex/birth-control/nausea-from-birth-control-pills
|
| 382 |
+
|
| 383 |
+
# Patient's Summary 1-
|
| 384 |
+
|
| 385 |
+
Birth control pills are a safe and effective method for preventing pregnancy. They are also known to lighten periods, improve acne, and prevent certain diseases. However, one potential side effect is nausea, which is often caused by the hormone estrogen irritating the stomach lining. If you vomit within 2 hours of taking the pill, it may not have been absorbed properly and you may need to take another one. To prevent nausea from birth control pills, try taking the pill with a meal or using antacids. Other helpful tips include taking the pill at the same time each day, preferably at night before bed, eating light and bland foods, drinking cold liquids, eating smaller meals slowly, and avoiding activity and spicy foods after eating. If these strategies don't help, consult your doctor about potentially switching to a different pill or another type of contraceptive.
|
| 386 |
+
|
| 387 |
+
# Patient's Summary 2-
|
| 388 |
+
|
| 389 |
+
The document explains that birth control pills are a safe and effective way to prevent pregnancy, but they can also cause nausea. Nausea is usually caused by the hormones in the pill, which can irritate the lining of the stomach. The document suggests several ways to prevent and treat nausea, such as taking the pill at the same time every day, eating light, bland foods, drinking cold liquids, eating smaller meals slowly, avoiding activity after eating, and avoiding spicy foods. If these methods don't work, it's suggested to talk to a doctor about switching to a different birth control pill or using other forms of contraception. patient : Birth control pills are a safe and effective way to prevent pregnancy. They can make periods lighter and improve acne, and may help prevent certain types of breast disease, anemia, ovarian cysts, and ovarian and endometrial cancers. However, they can also cause nausea. This is usually caused by the hormones in the pill, which can irritate the lining of the stomach. Nausea can be treated with antacid tablets, but it can also be prevented with a few lifestyle and diet changes. These include taking the pill at the same time every day, eating light, bland foods, drinking cold liquids, eating smaller meals slowly, avoiding activity after eating, and avoiding spicy foods.
|
| 390 |
+
|
| 391 |
+
Both are good
|
| 392 |
+
$\bigcirc$ Summary 1 is better
|
| 393 |
+
$\bigcirc$ Summary 2 is better
|
| 394 |
+
Both are bad
|
| 395 |
+
|
| 396 |
+
Figure 6: Llama2-13b finetune and GPT-4 summary comparison experiment example snapshot
|
2024/On The Persona-based Summarization of Domain-Specific Documents/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39cbb559c9c6c951c57c1f04728f82f192bb8a300ba7bc2d37a8f297a9c6099b
|
| 3 |
+
size 240028
|
2024/On The Persona-based Summarization of Domain-Specific Documents/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/ec565f86-66f8-4233-a78d-67cf9262ff3b_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/ec565f86-66f8-4233-a78d-67cf9262ff3b_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/ec565f86-66f8-4233-a78d-67cf9262ff3b_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2428c49d3a6ffa2a7ad1413ef4b80370a5c0ab973ea20bb605927d44b5f7ed9d
|
| 3 |
+
size 2135631
|
2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/full.md
ADDED
|
@@ -0,0 +1,490 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On the Effect of (Near) Duplicate Subwords in Language Modelling
|
| 2 |
+
|
| 3 |
+
Anton Schäfer<sup>1</sup>, Thomas Hofmann<sup>1</sup>, Imanol Schlag<sup>2,*</sup>, Tiago Pimentel<sup>1,*</sup>
|
| 4 |
+
|
| 5 |
+
$^{1}$ ETH Zürich, $^{2}$ ETH AI Center
|
| 6 |
+
|
| 7 |
+
scanton@ethz.ch, {thomas.hofmann, imanol.schlag, tiago.pimentel}@inf.ethz.ch
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Tokenisation is a core part of language models (LMs). It involves splitting a character sequence into subwords which are assigned arbitrary indices before being served to the LM. While typically lossless, however, this process may lead to less sample efficient LM training: as it removes character-level information, it could make it harder for LMs to generalise across similar subwords, such as now and Now. We refer to such subwords as near duplicates. In this paper, we study the impact of near duplicate subwords on LM training efficiency. First, we design an experiment that gives us an upper bound to how much we should expect a model to improve if we could perfectly generalise across near duplicates. We do this by duplicating each subword in our LM's vocabulary, creating perfectly equivalent classes of subwords. Experimentally, we find that LMs need roughly $17\%$ more data when trained in a fully duplicated setting. Second, we investigate the impact of naturally occurring near duplicates on LMs. Here, we see that merging them considerably hurts LM performance. Therefore, although subword duplication negatively impacts LM training efficiency, naturally occurring near duplicates may not be as similar as anticipated, limiting the potential for performance improvements.
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
|
| 15 |
+
antonschafer/duplicate-subwords
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Most modern language models (LMs) do not have direct access to the bits or characters which make up the text that they must model. Rather, they operate on higher-level units, so-called tokens, which are elements of a finite set of previously defined subwords. This set of subwords is typically obtained as the output of a tokenisation method and forms an LM's vocabulary (Gage,
|
| 20 |
+
|
| 21 |
+
<table><tr><td>Model</td><td>Near Duplicate Rate</td></tr><tr><td>GPT-{3.5, 4, 4-turbo}</td><td>43%</td></tr><tr><td>Claude 2.1</td><td>46%</td></tr><tr><td>Llama 1 & 2</td><td>35%</td></tr><tr><td>Mistral 7B & 8x7B</td><td>37%</td></tr><tr><td>Gemma 7B</td><td>39%</td></tr></table>
|
| 22 |
+
|
| 23 |
+
Table 1: Near duplicate rates of modern LLM vocabularies. We consider subwords that only differ in whitespace, capitalization, or plural suffix as equivalent ( $\mathbb{S}_{\mathrm{all}}$ dedduplication mapping, see §5.2.1). For details, see App. B.
|
| 24 |
+
|
| 25 |
+
1994; Sennrich et al., 2016; Kudo, 2018; Wu et al., 2016). Importantly, most tokenisation algorithms are lossless: the original character sequence is perfectly recoverable from its tokenised version.
|
| 26 |
+
|
| 27 |
+
A language model's vocabulary, however, may contain several near duplicate subwords: minimal pairs like now and Now, with roughly the same semantic meaning, but which differ due to typos, whitespace marking, or capitalisation (Stanic et al., 2023). Such near duplicates can make up over $40\%$ of the vocabulary of modern LMs (see Table 1). Intuitively, if the model had access to character-level information, it should trivially generalise what it learns from one of these forms to the other. Given only access to subword-level inputs, however, the model may not be able to do the same, or may require more data to do so.
|
| 28 |
+
|
| 29 |
+
Previous work tried to address this issue by modelling language directly at the character, byte, or even pixel level (Kim et al., 2016; Clark et al., 2022; Xue et al., 2022; Yu et al., 2023; Rust et al., 2023, inter alia). However, while the existing literature has proposed several solutions to improve
|
| 30 |
+
|
| 31 |
+
LMs generalisation across near duplicates, a proper quantification of the issue is still lacking.
|
| 32 |
+
|
| 33 |
+
In this work, we thus take a step back and assess the actual impact of near duplicate subwords on LMs' performance. To this end, we first propose a controlled synthetic setting where we duplicate every subword in our LM's vocabulary, allowing us to (1.) quantify an LM's ability to generalise across perfectly equivalent duplicates and to (2.) carefully investigate how the generalisation happens. This yields an upper bound on the cost incurred due to limited generalisation across real near duplicates: a vocabulary with $40\%$ duplicates (common for LLMs, see Table 1) may reduce data efficiency by up to $10\%$ . We then (3.) investigate the tightness of this upper bound by merging naturally occurring near duplicates in an LM's vocabulary. We find that deduplicating the vocabulary in this way, in general, hurts performance instead of improving it. This suggests that real near duplicates might be less similar than anticipated, which might impose challenges when trying to leverage their similarity to improve LMs' performance.
|
| 34 |
+
|
| 35 |
+
# 2 Language Modelling
|
| 36 |
+
|
| 37 |
+
Let $\Sigma$ be a vocabulary of subwords. A language model $\widehat{p}$ is formally defined as a probability distribution over the set of all finite sequences of subwords $\boldsymbol{w} = (w_{1}, w_{2}, \ldots) \in \mathcal{W} \stackrel{\mathrm{def}}{=} \Sigma^{*}: 2$
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\widehat {p} (\boldsymbol {w}) = \prod_ {t = 1} ^ {| \boldsymbol {w} |} \widehat {p} \left(w _ {t} \mid \boldsymbol {w} _ {< t}\right) \tag {1}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $\widehat{p} (w_t\mid w_{< t})$ is the probability of token $w_{t}$ given the sequence of previous tokens $w_{0},\ldots w_{t - 1}$
|
| 44 |
+
|
| 45 |
+
In order for $\widehat{p}$ to approximate the true distributions over natural strings $p(\boldsymbol{w})$ , we train this model to minimise its cross-entropy with $p$ :
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\widehat {\mathrm {H}} (\mathbf {W}) = \sum_ {\boldsymbol {w} \in \mathcal {W}} p (\boldsymbol {w}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{\widehat {p} \left(w _ {t} \mid \boldsymbol {w} _ {< t}\right)} \tag {2}
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $\mathbf{W}$ represents a $\mathcal{W}$ -valued random variable. Since we do not know $p$ , we approximate this objective using a finite training set $\mathcal{D}_{\mathrm{trn}} = \{\boldsymbol{w}_n\}_{n=1}^N \sim p(\boldsymbol{w})$ . This leads to the loss function:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\mathcal {L} (\widehat {p} \boldsymbol {w}), \mathcal {D} _ {\mathrm {t r n}}) = \frac {1}{N} \sum_ {\boldsymbol {w} \in \mathcal {D} _ {\mathrm {t r n}}} \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{\widehat {p} \left(\boldsymbol {w} _ {t} \mid \boldsymbol {w} _ {< t}\right)} \tag {3}
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
# 3 Subword Duplication
|
| 58 |
+
|
| 59 |
+
Now, let's assume there exist in our alphabet pairs or groups of subwords which are nearly identical—in both their orthography and semantics. Such near duplicates can arise from various sources, including but not limited to capitalization differences (e.g., now vs. Now), typographical errors (language vs. language), the presence or absence of whitespace (e.g., the vs. _the),<sup>3</sup> and variations in spelling (e.g., modeling vs. modelling). The question we are concerned with is: how might such subword duplication affect the performance of language models?
|
| 60 |
+
|
| 61 |
+
To define this question formally, let $S$ be a set of disjoint sets of near duplicate subwords:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\mathcal {S} = \left\{ \begin{array}{c} \left\{w _ {①}, w _ {②}, w _ {③}, w _ {④} \right\}, \\ \left\{w _ {⑤}, w _ {⑥} \right\}, \dots , \left\{w _ {①}, w _ {\widehat {(i + 1)}} \right\} \end{array} \right\} \tag {4}
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
We index these as $S_{\mathfrak{L}}$ to represent the i'th set of near duplicates. Further, let $\overline{S} = \{c_{\mathfrak{L}} \mid 0 < i \leq |\mathcal{S}| \}$ be a set of canonical symbols which we will use to represent each of these duplicate sets. To find out how duplication affects LMs, we can create a map $\mathbb{S} : \Sigma \to \overline{\Sigma}$ which deduplicates subwords, mapping duplicates to the corresponding canonical symbols. This map is defined as:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\mathbb {S} (w) = \left\{ \begin{array}{l l} w & \text {i f} w \notin \operatorname {f l a t t e n} (\mathcal {S}) \\ c _ {\text {①}} & \text {i f} w \in \mathcal {S} _ {\text {①}} \end{array} \right. \tag {5}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
with $\overline{\Sigma} \stackrel{\mathrm{def}}{=} (\Sigma \setminus \operatorname{flatten}(\mathcal{S})) \cup \overline{\mathcal{S}}$ . We are now in a position to define a distribution over deduplicated subword sequences:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
p (\boldsymbol {c}) = \sum_ {\boldsymbol {w} \in \mathcal {W}} p (\boldsymbol {w}) \mathbb {1} \{\boldsymbol {c} = \mathbb {S} (\boldsymbol {w}) \} \tag {6}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where we overload $\mathbb{S}$ to operate on sequences $\pmb{w}$ by applying it elementwise on each subword $w_{t} \in w$ . Note that $p(c)$ is now a distribution over deduplicated subword sequences $\pmb{c} = (c_{1}, c_{2}, \ldots) \in \mathcal{C} \stackrel{\mathrm{def}}{=} \overline{\Sigma}^{*}$ . We can further define a hybrid conditional projected distribution as:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\begin{array}{l} p _ {\mathbb {S}} \left(c _ {t} \mid \boldsymbol {w} _ {< t}\right) = \tag {7} \\ \sum_ {w \in \Sigma} p (w \mid w _ {< t}) \mathbb {1} \{c _ {t} = \mathbb {S} (w) \} \\ \end{array}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
In words, the conditional probability $p_{\mathbb{S}}(c_t \mid w_{<t})$ of a deduplicated subword $c_t$ is defined as the sum of the conditional probabilities of all subwords which map to it through $\mathbb{S}(w)$ .
|
| 86 |
+
|
| 87 |
+
# 3.1 Comparing (De-)Duplicated LMs
|
| 88 |
+
|
| 89 |
+
Typically, LMs are evaluated based on their cross-entropy (or perplexity) on a held-out test set. It would, however, be unfair to simply compare the cross-entropies of LMs trained on $p(c)$ and $p(\boldsymbol{w})$ . The cross-entropy is lower bounded by the entropy—with a perfect model's cross-entropy equalling the entropy. If $p(c)$ 's and $p(\boldsymbol{w})$ 's entropies are different, they would impose different optima achievable by LMs trained in each setting. We write these distributions' entropies as:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\mathrm {H} (\mathbf {W}) = \sum_ {\boldsymbol {w}} p (\boldsymbol {w}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{p \left(w _ {t} \mid \boldsymbol {w} _ {< t}\right)} \tag {8}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
and $\mathrm{H}(\mathbf{C})$ , analogously, where $\mathbf{C}$ denotes a $\mathcal{C}$ -valued random variable. Now note that, given their definition in Eq. 6, deduplicated sequences $\mathbf{C}$ are deterministic given the original subwords $\mathbf{W}$ . The two entropies above are thus related via equation:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\mathrm {H} (\mathbf {W}) = \mathrm {H} (\mathbf {C}) + \mathrm {H} (\mathbf {W} \mid \mathbf {C}) \tag {9}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Assuming $\mathbf{W}$ cannot be deterministically predicted from $\mathbf{C}$ , we have that $\mathrm{H}(\mathbf{W} \mid \mathbf{C}) > 0$ ; this implies that predicting $\mathbf{W}$ is strictly harder than $\mathbf{C}$ .
|
| 102 |
+
|
| 103 |
+
To make these settings more easily comparable, we define $p(w)$ 's projected entropy as:
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\mathrm {H} _ {\mathbb {S}} (\mathbf {W}) = \sum_ {\boldsymbol {w} \in \mathcal {W}} p (\boldsymbol {w}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{p _ {\mathbb {S}} \left(\mathbb {S} \left(w _ {t}\right) \mid \boldsymbol {w} _ {< t}\right)} \tag {10}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
This entropy measures the uncertainty in predicting a deduplicated subword $c_t$ given the duplicated context $w_{<t}$ . Interestingly, we can show that:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\mathrm {H} _ {\mathbb {S}} (\mathbf {W}) = \mathrm {H} (\mathbf {C}) - \operatorname {M I} \left(\mathbf {W} _ {< \mathrm {T}}; \mathbf {C} _ {\mathrm {T}} \mid \mathbf {C} _ {< \mathrm {T}}\right) \tag {11}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $\mathrm{MI}(\mathbf{W}_{<\mathrm{T}}; \mathbf{C}_{\mathrm{T}} \mid \mathbf{C}_{<\mathrm{T}})$ is the mutual information between a subword context $w_{<t}$ and the next deduplicated token $c_t$ conditioned on the previous deduplicated tokens $c_{<t}$ (see App. A for a proof and the precise definition of this mutual information). In both §5.1 and §5.2, we discuss how this value relates to our research question.
|
| 116 |
+
|
| 117 |
+
# 4 Experimental Setup
|
| 118 |
+
|
| 119 |
+
We implement all of our experiments in the codebase of the Languini Kitchen (Stanic et al., 2023). Below, we provide an overview of the models and datasets used here. We refer the reader to Stanic et al.'s (2023) work for more details regarding implementation choices, training setup, and dataset collection.
|
| 120 |
+
|
| 121 |
+
Model. We use the GPT model from Languini, which is a GPT-2 style transformer decoder (Radford et al., 2019). Unless otherwise noted, we use the "small" configuration with 12 layers, hidden size 768, and 85M non-embedding parameters. We train models with sequence length 512, batch size 128, the Adam optimiser (Kingma and Ba, 2015), and a cosine learning rate schedule from 6e-4 to 6e-6 with 500 warmup steps.
|
| 122 |
+
|
| 123 |
+
Data. We train on the Languini training data, a filtered version of the books3 subset from the Pile (Gao et al., 2020). For evaluation, we use the held-out Languini test set, which contains 11M tokens. This data is pre-tokenised into a vocabulary of size 16k using a BPE tokeniser (Gage, 1994; Sennrich et al., 2016) trained using SentencePiece (Kudo and Richardson, 2018). Unless otherwise noted, we train our models for 18,265 steps—i.e., the first 1.2B tokens in our dataset—which corresponds to training the small GPT model for 6h on an RTX 3090 GPU; this is Languini's GPT small 6h setting.
|
| 124 |
+
|
| 125 |
+
Evaluation. We generally report our model's perplexity on the test set as our evaluation metric. To ensure sufficient context for all predictions, we use a sliding window with steps of 128: we fill in a 512 tokens context, ignore the model's outputs on the initial 384, and evaluate it only using the last 128 tokens. For models $\widehat{p}(\mathbf{c})$ trained on the deduplicated setting, we simply report their perplexities, defined as the exponentiated cross-entropy evaluated on a held-out test set $\mathcal{D}_{\mathrm{eval}}$ : $\mathrm{PPL}(\mathbf{C}) = \exp \left( \mathcal{L}(\widehat{p}(\mathbf{c}); \mathcal{D}_{\mathrm{eval}}) \right)$ . When evaluating models $\widehat{p}(\mathbf{w})$ , trained in the duplicated setting, we report their projected perplexity, defined as:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array}{l} \mathrm {P P L} _ {\mathbb {S}} (\mathbf {W}) = \exp \left(\mathcal {L} _ {\mathbb {S}} \left(\widehat {p} (\boldsymbol {w}); \mathcal {D} _ {\text {e v a l}}\right)\right) \tag {12} \\ = \exp \left(\frac {1}{N} \sum_ {\boldsymbol {w} \in \mathcal {D} _ {\mathrm {e v a l}}} \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{\widehat {p} _ {\mathbb {S}} (\mathbb {S} (w _ {t}) \mid \boldsymbol {w} _ {< t})}\right) \\ \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $\widehat{p}_{\mathbb{S}}$ is defined analogously to $p_{\mathbb{S}}$ (see Eq. 7). Intuitively, we add up the probabilities of subwords $w$ that are equivalent under $\mathbb{S}$ (i.e., which map to the same canonical symbol $c$ ), to avoid giving $\widehat{p}(\boldsymbol{c})$ an unfair advantage over $\widehat{p}(\boldsymbol{w})$ .
|
| 132 |
+
|
| 133 |
+
# 5 Experiments and Results
|
| 134 |
+
|
| 135 |
+
We evaluate our LM's ability to generalise over (near) duplicates in two settings: perfect and natural duplication. In the perfect duplication setting, we compare LMs trained using either the default
|
| 136 |
+
|
| 137 |
+
or a synthetically duplicated vocabulary; this gives us an upper bound for the impact of real near duplicates, as synthetically duplicated subwords are perfectly comparable in terms of their semantics. In the natural duplication setting, we deduplicate the default vocabulary by merging real near duplicates. By comparing performance on the default and the deduplicated vocabulary, we verify whether the effect of natural near duplicates in LMs is comparable to the effect of perfect duplicates.
|
| 138 |
+
|
| 139 |
+
# 5.1 Perfect Duplication
|
| 140 |
+
|
| 141 |
+
In this first set of experiments, we assume an idealised situation where all subwords in a near duplicate set $w \in S_{\mathfrak{L}}$ are perfectly interchangeable with each other. Choosing among these subwords, then, is neither impacted by prior subwords nor impacts future subword choices. In this case, we can relate distributions $p(\pmb{w})$ and $p(\pmb{c})$ as:
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
p (\boldsymbol {w}) = \prod_ {t = 1} ^ {| \boldsymbol {w} |} p \left(c _ {t} \mid c _ {< t}\right) \underbrace {p \left(w _ {t} \mid c _ {t}\right)} _ {\text {d u p l i c a t e c h o i c e}} \tag {13}
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
Further, we can show that in this idealised setting $\mathrm{MI}(\mathbf{W}_{<\mathrm{T}}; \mathbf{C}_{\mathrm{T}} \mid \mathbf{C}_{<\mathrm{T}}) = 0$ ; this is because the decomposition above implies conditional independence between $w_{t}$ and any $c_{t'}$ given $c_{t}$ . We thus have:
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\mathrm {H} _ {\mathbb {S}} (\mathbf {W}) = \mathrm {H} (\mathbf {C}) \tag {14}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
which creates a perfectly controlled setting to evaluate language models. If we could train a perfect language model on either distribution $p(\boldsymbol{w})$ or $p(\boldsymbol{c})$ , we would achieve the same performance in both settings. Any difference in language modelling performance between these settings must thus derive from a language model's lack of ability to generalise from observing near duplicate subwords.
|
| 154 |
+
|
| 155 |
+
# 5.1.1 Empirical Implementation
|
| 156 |
+
|
| 157 |
+
To achieve the perfect duplication described above, we simulate Eq. 13 by duplicating every entry in our subword vocabulary. First, we assume our BPE-generated vocabulary is composed of canonical symbols $\overline{\Sigma} = \{c_{\mathbb{1}}, c_{\mathbb{2}}, \ldots\}$ . This set is composed of 16k subwords. We then duplicate each to get a vocabulary of size $32k:^4 \Sigma = \{w_{\mathbb{1}}, w_{\mathbb{1}}', w_{\mathbb{2}}, w_{\mathbb{2}}', \ldots\}$ . This gives us the dedduplication mapping $\mathbb{S}(w_{\mathbb{1}}) = \mathbb{S}(w_{\mathbb{1}}') = c_{\mathbb{1}}$ . Given
|
| 158 |
+
|
| 159 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">PPLS</td></tr><tr><td>GPT-S</td><td>GPT-M</td></tr><tr><td>\(\widehat{p} (c)\)</td><td>21.9</td><td>16.3</td></tr><tr><td>\(\widehat{p} (c), 85\%\) of data</td><td>22.6</td><td>16.7</td></tr><tr><td>\(\widehat{p} (c), 50\%\) of data</td><td>25.3</td><td>-</td></tr><tr><td>\(\widehat{p}(w)\)</td><td>22.7</td><td>16.7</td></tr></table>
|
| 160 |
+
|
| 161 |
+
Table 2: Impact of duplication on $\mathrm{PPL}_{\S}$ . Lower is better. The right column shows results for Languini's GPT-medium model with 370M parameters (vs 111M for small), trained on 2.8B tokens (vs 1.2B for small).
|
| 162 |
+
|
| 163 |
+
a sequence $\pmb{c}$ from our training set $\mathcal{D}_{\mathrm{trn}}$ , we then create a duplicated sequence $\pmb{w}$ by independently sampling the form of each token $c_{\uparrow 1} \in c$ to be either $w_{\uparrow 1}$ or $w_{\uparrow 1}^{\prime}$ . Unless specified differently, we set all duplicate choice probabilities to be uniform (i.e., $p(w_{\uparrow 1} \mid c_{\uparrow 1}) = p(w_{\uparrow 1}^{\prime} \mid c_{\uparrow 1}) = 0.5$ for all $i$ ).
|
| 164 |
+
|
| 165 |
+
# 5.1.2 Raw Performance
|
| 166 |
+
|
| 167 |
+
In this section, we describe our main results using the perfect duplication setting. First, we note that, when training with $p(w_{\mathfrak{L}}^{\prime} \mid c_{\mathfrak{L}}) = 0.5$ , each subword $w_{\mathfrak{L}}$ or $w_{\mathfrak{L}}^{\prime}$ is only seen half as often by $\widehat{p}(\boldsymbol{w})$ as its original version $c_{\mathfrak{L}}$ is seen by $\widehat{p}(\boldsymbol{c})$ . However, we achieve significantly better performance with $\widehat{p}(\boldsymbol{w})$ than with $\widehat{p}(\boldsymbol{c})$ trained on only $50\%$ of the dataset (see Table 2). The model thus seems to generalise across duplicates, with data containing $w$ leading to improved performance on $w^{\prime}$ and vice versa. Still, duplication significantly hurts performance. Using the duplicated data, the model $\widehat{p}(\boldsymbol{w})$ is only about $85\%$ as data efficient as $\widehat{p}(\boldsymbol{c})$ , which is trained on the original data. This suggests our LMs cannot generalise perfectly. Interestingly, this trend stays relatively consistent across different amounts of training data (up to 3x, see Fig. 1) and also applies to a 3x larger GPT-medium model (see Table 2). Further, if we vary the number of subwords we duplicate, interpolating from $0\%$ of the vocabulary $(\widehat{p}(\boldsymbol{c})$ setting) to $100\%$ of the vocabulary $(\widehat{p}(\boldsymbol{w})$ setting), we obtain a roughly linear increase in PPLS (see Fig. 2).
|
| 168 |
+
|
| 169 |
+
Takeaway 1. The model is capable of generalising across duplicates, yet their presence negatively impacts performance.
|
| 170 |
+
|
| 171 |
+
# 5.1.3Duplicates' Alignment
|
| 172 |
+
|
| 173 |
+
One strategy the model could use to generalise across duplicated pairs $w_{①}$ and $w_{①}^{\prime}$ is to fully align their representations. If these word pairs have a
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
Figure 1: Left: Fitted power laws capturing the relationship between training data and $\mathrm{PPL}_{\mathbb{S}}$ . Our standard training set contains around 1.2B tokens. Right: Data required to achieve the same performance with $p(c)$ and $p(\boldsymbol{w})$ , computed based on the fitted scaling law curves. In the considered interval, this curve's slope—which roughly corresponds to $\frac{\text{number of training tokens for } p(\boldsymbol{w})}{\text{number of training tokens for } p(c)}$ —is approximately equal to $\frac{1}{0.85}$ .
|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 2: Impact of duplication on $\mathrm{PPL}_{\mathbb{S}}$ while varying the fraction of subwords in the vocabulary that are duplicated (1.0 corresponds to $\widehat{p}(\boldsymbol{w})$ , 0.0 to $\widehat{p}(\boldsymbol{c})$ ). Lower $\mathrm{PPL}_{\mathbb{S}}$ is better. When duplicating $70\%$ of the vocabulary (which yields a $41\%$ duplication rate in the final vocabulary, roughly the rate of near duplicates in real vocabularies), we obtain $\mathrm{PPL}_{\mathbb{S}} \approx 22.4$ ; this is equivalent to a $\approx 10\%$ decrease in data efficiency.
|
| 182 |
+
|
| 183 |
+
cosine similarity of 1.0, then any change to other model components would affect them similarly. When we analyse our model $\widehat{p}(\boldsymbol{w})$ 's embeddings, we indeed observe a high average cosine similarity of around 0.8 among duplicate pairs. This number is even higher for frequent subwords (see Fig. 3); it appears that a subword's frequency during training is an underlying driver for alignment. This observation is intuitive: the representations of $w_{①}$ and $w_{①}^{\prime}$ are both randomly initialised and converge to each other after a certain number of gradient updates.
|
| 184 |
+
|
| 185 |
+
What causes this alignment of representations
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
Figure 3: Input embedding cosine similarity of duplicates $w_{\text{①}}$ , $w_{\text{①}}'$ , by frequency. Frequencies binned and similarities averaged per bin.
|
| 189 |
+
|
| 190 |
+
and what is it impacted by? Loosely speaking, the contexts in which the duplicates appear follow the same distribution; this might lead to similar gradient signals throughout training. If this is the case, then this high cosine similarity should not be an exclusive property of transformers, but apply to simpler architectures as well. Interestingly, when training a word2vec model (Mikolov et al., 2013) on the same data, we observe its embeddings exhibit even stronger alignment (details in App. E).
|
| 191 |
+
|
| 192 |
+
Takeaway 2. Representations of frequent duplicates have high cosine similarity.
|
| 193 |
+
|
| 194 |
+
# 5.1.4 Finetuning Generalisation
|
| 195 |
+
|
| 196 |
+
Presumably, the alignment of duplicated word pairs may cause the model to use the same "circuits" when processing those words, allowing it to gener
|
| 197 |
+
|
| 198 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">GLUE Accuracy</td></tr><tr><td>on w①</td><td>on w′①</td></tr><tr><td>p(c)</td><td>0.72</td><td>-</td></tr><tr><td>p(w)</td><td>0.71</td><td>0.71</td></tr></table>
|
| 199 |
+
|
| 200 |
+
Table 3: GLUE average validation accuracy achieved by fine-tuning solely on $w_{\text{①}}$ inputs (and not on $w_{\text{①}}^{\prime}$ ) while keeping the embedding layer frozen.
|
| 201 |
+
|
| 202 |
+
<table><tr><td>Subset</td><td>Mean Δ Surprisal</td></tr><tr><td>All</td><td>0.015</td></tr><tr><td>Duplicated</td><td>0.018</td></tr><tr><td>Not Duplicated</td><td>0.012</td></tr></table>
|
| 203 |
+
|
| 204 |
+
Table 4: Duplication of half the vocabulary: mean difference in surprisal to $\widehat{p} (\boldsymbol {c})$ for subwords within the treatment (duplicated) and control (non-duplicated) groups.
|
| 205 |
+
|
| 206 |
+
alise what it learns across them (Cammarata et al., 2020; Elhage et al., 2021). To verify this hypothesis, we finetune our $\widehat{p}(\boldsymbol{w})$ model on GLUE (Wang et al., 2019), employing only one subword from each duplicate pair as input (specifically, $w_{\mathfrak{U}}^{\prime}$ and never $w_{\mathfrak{U}}^{\prime}$ ). Intriguingly, when this finetuned model is subsequently evaluated on the unseen subwords (i.e., $w_{\mathfrak{U}}^{\prime}$ ) it generalises perfectly, achieving the same accuracy (see Table 3).
|
| 207 |
+
|
| 208 |
+
Takeaway 3. GLUE performance of $\widehat{p}(\boldsymbol{w})$ generalises across duplicate pairs despite being finetuned with $w_{1}$ and evaluated with $w_{1}^{\prime}$ .
|
| 209 |
+
|
| 210 |
+
# 5.1.5 Comparing Duplicating or Not a Pair
|
| 211 |
+
|
| 212 |
+
We observed that the alignment of duplicate subword representations seems to drive generalisation. If infrequent subwords have less aligned representations, does this mean that they generalise less? To investigate the effects of duplication in a more controlled manner, we now duplicate only half of our vocabulary and train a model in this setting. This gives us a treatment group of duplicated subwords and a control group of non-duplicated subwords, allowing us to isolate the causal effect of duplication. We will now analyse this effect on the output side (predicting duplicated tokens compared to non-duplicated tokens) and on the input side (predictions based on a context with many duplicated tokens vs few duplicated tokens).
|
| 213 |
+
|
| 214 |
+
On the output side, we measure the effect of duplication by first taking the difference in
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 4: Duplication of half of the vocabulary: Analysing the mean surprisal difference per subword between $\widehat{p}(\boldsymbol{w})$ and $\widehat{p}(\boldsymbol{c})$ . Frequencies are categorised into bins, with averages computed for each bin.
|
| 218 |
+
|
| 219 |
+
surprisal (negative log probability) assigned to each original subword token $c_t$ by either model $\widehat{p}(\boldsymbol{w})$ (through $\widehat{p}_{\mathbb{S}}(c_t \mid \boldsymbol{w}_{<t})$ ) or $\widehat{p}(\boldsymbol{c})$ (through $\widehat{p}(c_t \mid c_{<t})$ ). We then average these delta surprisesals within either the set of actually duplicated (treatment) subwords, or the ones not duplicated (control). We observe that subword duplication leads to an increase in surprisal which is around 50% higher when predicting duplicated tokens compared to non-duplicated ones (see Table 4). This might seem unexpected, considering that, e.g., a simple n-gram model's predictions would not be affected by duplicated outputs. Yet, in our LM, the output embeddings of duplicated subwords receive only half as many gradient updates, which could explain the lower performance. In line with this, we observe that infrequent subwords are affected the most by this performance loss (see Fig. 4), likely because their output representations are not well aligned after receiving few updates.
|
| 220 |
+
|
| 221 |
+
To evaluate the impact of duplication on the LM's input side, we assess how surprisal on subwords changes depending on the number of duplicated (vs non-duplicated) subwords in its context. Here, we observe no clear trend between the number of duplicates in our model's full context window and its performance loss on observed subwords (see Fig. 5). However, when limited to a more local context of size 16, the number of duplicate tokens seems to have a clear negative impact on prediction performance.
|
| 222 |
+
|
| 223 |
+
Takeaway 4. Infrequent subwords are predicted worse when duplicated, and duplicated tokens in the LM's local context tend to hurt its predictions.
|
| 224 |
+
|
| 225 |
+

|
| 226 |
+
Figure 5: Duplication of half of the vocabulary. Difference between the surprisal assigned to each token by $\widehat{p}(\boldsymbol{w})$ and $\widehat{p}(\boldsymbol{c})$ , depending on fraction $\frac{\text{duplicated subwords}}{\text{non-duplicated subwords}}$ in context. Fractions are categorised into bins, with average surprisal differences computed for each bin. "Support" shows the number of samples per bin.
|
| 227 |
+
|
| 228 |
+

|
| 229 |
+
|
| 230 |
+
# 5.2 Natural Duplication
|
| 231 |
+
|
| 232 |
+
After exploring the impact of perfect duplicates in LMs, we now turn our attention to the influence of naturally occurring near duplicates on LM performance. Notably, despite their similarity, near duplicates are seldom perfectly interchangeable. For example, _individual differs from _individuals, the _he in 'and he writes' does not convey the same meaning as he in 'breathe' (we analyse this in App. C), and a Now at the start of a sentence can subtly vary from a now used mid-sentence. When merging near duplicates, we lose information about such small differences. If this lost information is relevant for predicting a token $c_{t} = \mathbb{S}(w_{t})$ , the task should become harder through dedduplication. We have $\mathrm{MI}(\mathbf{W}_{<\mathrm{T}}; \mathbf{C}_{\mathrm{T}} \mid \mathbf{C}_{<\mathrm{T}}) > 0$ and hence
|
| 233 |
+
|
| 234 |
+
$$
|
| 235 |
+
\mathrm {H} (\mathbf {C}) > \mathrm {H} _ {\mathbb {S}} (\mathbf {W}) \tag {15}
|
| 236 |
+
$$
|
| 237 |
+
|
| 238 |
+
which means that even a perfect model would perform worse on the deduplicated data distribution. This subsection examines whether merging naturally occurring near duplicates yields comparable advantages to merging perfect duplicates.
|
| 239 |
+
|
| 240 |
+
# 5.2.1 Empirical Implementation
|
| 241 |
+
|
| 242 |
+
We consider four types of near duplicates, defined by their corresponding mapping $\mathbb{S}$ :
|
| 243 |
+
|
| 244 |
+
$\mathbf{S}_{\mathrm{space}}$ ignores leading or trailing whitespace, mapping, e.g., _the to the. Around $10\%$ of subwords are merged.
|
| 245 |
+
$\mathbb{S}_{\text{lower}}$ ignores capitalisation, mapping, e.g., Now to now. Around $12\%$ of subwords are merged.
|
| 246 |
+
$S_{\text{plural}}$ ignores plural markings, mapping, e.g., _individuals to _individual. Around $8\%$ of subwords are merged.
|
| 247 |
+
|
| 248 |
+
$S_{all}$ combines all of the previous mappings, mapping, e.g., _Books to book. Around $29\%$ of subwords are merged.
|
| 249 |
+
|
| 250 |
+
We train models $\widehat{p}(\boldsymbol{c})$ for each of these dedduplication mappings $\mathbb{S}$ and compare them to the performance of the regular model $\widehat{p}(\boldsymbol{w})$ when evaluated under the same projection.
|
| 251 |
+
|
| 252 |
+
The first three mappings all reduce the vocabulary size by around $10\%$ . If the near duplicates were perfectly equivalent, we could expect $\widehat{p}(\boldsymbol{c})$ to perform marginally better than $\widehat{p}(\boldsymbol{w})$ , which is what we observe in the synthetic setting with a low duplication rate (see Fig. 2). For the combined $\mathbb{S}_{\mathrm{all}}$ , with $29\%$ near duplicates, we would expect a performance boost corresponding to roughly $5\%$ better data efficiency; or, alternatively, a $\mathrm{PPL}_{\mathbb{S}}$ decrease of roughly 0.2 from $\widehat{p}(\boldsymbol{w})$ to $\widehat{p}(\boldsymbol{c})$ (see the results for $40\%$ duplication rate in Fig. 2).
|
| 253 |
+
|
| 254 |
+
Modern large models show even higher duplication rates than our small vocabulary. Their vocabularies contain around $40\%$ near duplicates under $\mathbf{S}_{\mathrm{all}}$ (see Table 1). This translates to duplicating roughly $70\%$ of a canonical vocabulary; in the synthetic case, this corresponds to a potential data efficiency increase of around $10\%$ due to dedduplication, assuming the trends in Fig. 2 apply. In the following, we examine whether this is plausible by verifying to what extent these trends transfer from perfect duplicates to near duplicates for our models.
|
| 255 |
+
|
| 256 |
+
Note that, different to the previous subsection where we duplicated our standard vocabulary, here
|
| 257 |
+
|
| 258 |
+
<table><tr><td rowspan="2">Setting</td><td colspan="4">PPLS</td></tr><tr><td>SSpace</td><td>SLower</td><td>Splural</td><td>Sall</td></tr><tr><td>p(w)*</td><td>21.80 (± 0.11)</td><td>21.50 (± 0.11)</td><td>21.56 (± 0.11)</td><td>20.99 (± 0.11)</td></tr><tr><td>p(w), 95% data</td><td>22.00</td><td>21.71</td><td>21.77</td><td>21.56</td></tr><tr><td>p(w), 90% data</td><td>22.21</td><td>21.91</td><td>21.97</td><td>21.76</td></tr><tr><td>p(c)*</td><td>22.14 (± 0.16)</td><td>21.87 (± 0.15)</td><td>21.82 (± 0.11)</td><td>22.08 (± 0.09)</td></tr><tr><td>p(c) + enon-canonical*</td><td>21.92 (± 0.17)</td><td>21.45 (± 0.12)</td><td>21.59 (± 0.14)</td><td>21.15 (± 0.09)</td></tr></table>
|
| 259 |
+
|
| 260 |
+
we deduplicate it; this means the $\widehat{p} (\boldsymbol {c})$ in the previous subsection and $\widehat{p} (\boldsymbol {w})$ in this subsection both refer to a "baseline" over our standard vocabulary.
|
| 261 |
+
|
| 262 |
+
# 5.2.2 Raw Performance & Duplicate Alignment
|
| 263 |
+
|
| 264 |
+
We observe that dedduplication hurts performance (see Table 5). Across all considered S, training $\widehat{p} (\boldsymbol {c})$ on deduplicated data yields worse results than the setting $\widehat{p} (\boldsymbol {w})$ in which near duplicates remain untouched. The performance degradation is equivalent to training on $5 - 10\%$ less data. This is in stark contrast to the trends we observed on perfectly equivalent synthetic duplicates, where deduplication boosts performance. Near duplicates thus seem to be less equivalent than one might expect, noticeably differing in their semantics.
|
| 265 |
+
|
| 266 |
+
The near duplicates' learned embeddings, which tend to contain information about the subwords' semantics, reflect this discrepancy. Near duplicates' embeddings are not nearly as similar as the embeddings of synthetic perfect duplicates, which had a cosine similarity of 0.8: all three types of natural duplicates exhibit average cosine similarities of around 0.4. This indicates that the model perceives semantic differences between the near duplicates. As described earlier, if we merge them, we will lose information. The associated decline in performance indicates that the information is significant.
|
| 267 |
+
|
| 268 |
+
Takeaway 5. Near duplicates are not equivalent and merging them hurts performance.
|
| 269 |
+
|
| 270 |
+
# 5.2.3 Comparing Deduplicating or Not a Pair
|
| 271 |
+
|
| 272 |
+
Are predictions worse when more deduplicated tokens are in the context, since more information is "lost"? We investigate this again through a controlled experiment. We run experiments where we deduplicate only half of the near duplicates, obtaining a deduplicated treatment group and an un
|
| 273 |
+
|
| 274 |
+
Table 5: Impact of dedduplication on $\mathrm{PPL}_{\mathbb{S}}$ . For rows with *, the reported values represent means and standard deviations over four runs. Note that, for each column, $\widehat{p}(\boldsymbol{c})$ refers to a different model trained under the respective $\mathbb{S}$ .
|
| 275 |
+
|
| 276 |
+
<table><tr><td rowspan="2">Setting</td><td colspan="2">Mean Δ Surprisal</td></tr><tr><td>Deduplicated</td><td>Not Deduplicated</td></tr><tr><td>Sspace</td><td>0.014</td><td>0.010</td></tr><tr><td>Slower</td><td>0.009</td><td>0.008</td></tr><tr><td>Splural</td><td>0.010</td><td>0.009</td></tr></table>
|
| 277 |
+
|
| 278 |
+
Table 6: Dedduplication of half of the vocabulary. Mean difference to baseline surprisal, for subwords in treatment (duplicated) and control (not duplicated) group.
|
| 279 |
+
|
| 280 |
+
changed control group. This setup is similar to the one in the previous subsection, but treatment and control group do not cover the entire vocabulary; both consist only of subwords that have a near duplicate. To isolate the causal effect of duplication, we investigate differences between these groups.
|
| 281 |
+
|
| 282 |
+
We first compare the effects of the number of deduplicated subwords and non-deduplicated subwords in the LMs context, i.e., measuring the effect of deduplication on the input side. An increased number of deduplicated subwords seems to generally lead to a steeper increase in surprisal than an increased number of non-deduplicated subwords, at least in the local context (see Fig. 8 in App. F). This suggests that deduplicated subwords in the context do hurt performance, presumably due to the lost information.
|
| 283 |
+
|
| 284 |
+
Interestingly, deduplicated subwords are also predicted slightly worse on the output side (see Table 6). In this setting, the model is forced to learn only one output embedding for each pair of merged near duplicates. If these merged subwords have different meanings, finding a single embedding to represent both of them might be challenging, as this embedding would need to produce large dot products with the hidden states of contexts from both subwords.
|
| 285 |
+
|
| 286 |
+
Takeaway 6. The presence of merged near duplicates in the local context tends to reduce an LM's prediction accuracy.
|
| 287 |
+
|
| 288 |
+
# 5.2.4 Re-adding Information
|
| 289 |
+
|
| 290 |
+
If the missing information in the input causes worse predictions, can we improve performance by reinjecting it? If we provide the model with an extra input that allows it to distinguish between merged near duplicates while still sharing their embeddings, could we obtain the benefits of dedduplication without the downside of losing information?
|
| 291 |
+
|
| 292 |
+
To investigate this, we introduce an extra learnable embedding $e_{\mathrm{non - canonical}}$ . This is a single shared vector which is added to the model's input at every token that corresponds to a non-canonical subword. (A non-canonical subword $w$ is any subword where $\mathbb{S}(w) \neq w$ , e.g., Now when operating under $\mathbb{S}_{\mathrm{lower}}$ , since $\mathbb{S}_{\mathrm{lower}}(Now) = now \neq Now$ .) As $\mathbb{S}_{\mathrm{all}}$ combines the three different types of dedduplication, we use three different learnable embeddings for the $\mathbb{S}_{\mathrm{all}}$ setting, one for each type.
|
| 293 |
+
|
| 294 |
+
When comparing $\widehat{p}(\boldsymbol{c})$ with and without $e_{\text{non-canonical}}$ , such an embedding's availability significantly improves performance ( $\mathrm{p} \leq 0.05$ in one-sided t-test) in all four dedduplication settings (see Table 5). Further, $\widehat{p}(\boldsymbol{c})$ with $e_{\text{non-canonical}}$ roughly matches $\widehat{p}(\boldsymbol{w})$ performance for $\mathbb{S}_{\text{space}}$ , $\mathbb{S}_{\text{lower}}$ , and $\mathbb{S}_{\text{plural}}$ (differences not statistically significant with $\mathrm{p} = 0.22, 0.48, 0.72$ , respectively, in two-sided t-test). However, we still do not see the same performance improvements due to dedduplication as we observed in the synthetic setting; this is especially clear for $\mathbb{S}_{\text{all}}$ which has a higher dedduplication rate, but clearly fails to improve performance ( $\widehat{p}(\boldsymbol{c})$ with $e_{\text{non-canonical}}$ is significantly worse than $\widehat{p}(\boldsymbol{w})$ with $\mathrm{p} \leq 0.05$ in two-sided t-test). Presumably, even if they belong to the same type ( $\mathbb{S}_{\text{space}}$ , $\mathbb{S}_{\text{lower}}$ , or $\mathbb{S}_{\text{plural}}$ ), near duplicate pairs' semantic differences are diverse and can thus not be fully captured by a single shared embedding vector.
|
| 295 |
+
|
| 296 |
+
Takeaway 7. Performance losses can be mitigated by accounting for semantic differences of near duplicates via a shared learned embedding. Still, this approach does not achieve the same benefits as observed when merging perfectly equivalent duplicates.
|
| 297 |
+
|
| 298 |
+
# 6 Related Work
|
| 299 |
+
|
| 300 |
+
Our experiments are partly inspired by a number of works on cross-lingual LM generalisation. These works also use duplicated vocabularies, terming the duplicates "fake-english". Unlike our work, however, they sample entire sequences of either English or "fake-english" tokens (we perform token-wise
|
| 301 |
+
|
| 302 |
+
i.i.d. sampling; K et al., 2020; Dufter and Schütze, 2020; Schäfer et al., 2024). Relatedly, Huang et al.'s (2023) lex-invariant LMs can be interpreted as an extreme case of token duplication; essentially creating infinite "fake languages", they show that LMs can learn, to a certain extent, even in the absence of a fixed set of embeddings. More similar to our duplication method is the work of Kharitonov et al. (2021), who use duplicates sampled at the token level to isolate the effect of vocabulary size when investigating the role of BPE tokenisation in a model's ability to memorise training data.
|
| 303 |
+
|
| 304 |
+
Another set of related work studies subword regularisation techniques, such as, e.g., BPE dropout (Kudo, 2018; Provilkov et al., 2020). Certain character sequences can be represented by multiple equivalent sequences of subwords. These techniques then non-deterministically choose between these equivalent choices at training time, which can lead to improved LMs. Our perfect duplication experiments, where we train LMs with either of two duplicated tokens, can be seen as similar to these methods. Unlike them, however, our approach duplicates a model's vocabulary to introduce this ambiguity, which may explain the fact that our results diverge. Relatedly, our projected entropy measure (which sums over subword duplicates) is analogous to the marginalisation proposed by Cao and Rimell (2021), which sums over spurious tokenisations.
|
| 305 |
+
|
| 306 |
+
# 7 Conclusion
|
| 307 |
+
|
| 308 |
+
In this paper, we investigate to what extent (near) duplicate subwords impact language modelling performance, conducting controlled experiments on synthetic perfect duplicates and natural near duplicates. We find that LMs can generalise across duplicated subwords, although this incurs extra cost. When operating on a fully duplicated vocabulary, the LM is about $17\%$ less data efficient. This number depends roughly linearly on the fraction of the vocabulary that is duplicated. Assuming that roughly $40\%$ of subwords are near duplicates in common LM vocabularies, our findings imply that LMs with improved generalisation across duplicates, e.g., by modelling language at the character-level, could achieve data efficiency gains of up to $10\%$ . This bound is reached for perfectly equivalent duplicates. However, we find that natural near duplicates are not perfectly equivalent: in practice, the potential for such performance improvements is likely limited.
|
| 309 |
+
|
| 310 |
+
# Limitations
|
| 311 |
+
|
| 312 |
+
We conduct most of our experiments on models with about 100M parameters, training on roughly 1.2B tokens in English. Although the trends we identify are consistent in up to 3x larger models and datasets, it is uncertain whether they extend to the scale of modern large language models. Furthermore, we have not validated that our results transfer to languages beyond English.
|
| 313 |
+
|
| 314 |
+
When we study the causal effects of (de)duplication on the input and output side, we do not fully isolate the two effects from each other. After a manual inspection, it appears that this does not confound the results; e.g., duplicated subwords are not more frequent in the input/context of duplicated subwords than non-duplicated subwords are. However, to fully exclude the possibility that such patterns affect results, one should run experiments where only the inputs or only the outputs are (de)duplicated.
|
| 315 |
+
|
| 316 |
+
Finally, while studying natural near duplicates, we only investigate dedduplication mappings that can be described by simple heuristics. Alternatively, one could use more involved methods to also deduplicate, e.g., typos or wordform variations beyond plural forms.
|
| 317 |
+
|
| 318 |
+
# Acknowledgements
|
| 319 |
+
|
| 320 |
+
The authors would like to thank Shauli Ravfogel, Andreas Opedal, Marius Mosbach, and the anonymous reviewers for feedback on earlier versions of this manuscript.
|
| 321 |
+
|
| 322 |
+
# References
|
| 323 |
+
|
| 324 |
+
Anthropic. 2023. Model card and evaluations for claude models. *Anthropic Blog*.
|
| 325 |
+
Elron Bandel, Yoav Goldberg, and Yanai Elazar. 2022. Lexical generalization improves with larger models and longer training. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 4398-4410, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
|
| 326 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens
|
| 327 |
+
|
| 328 |
+
Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901. Curran Associates, Inc.
|
| 329 |
+
Nick Cammarata, Shan Carter, Gabriel Goh, Chris Olah, Michael Petrov, Ludwig Schubert, Chelsea Voss, Ben Egan, and Swee Kiat Lim. 2020. Thread: Circuits. Distill.
|
| 330 |
+
Kris Cao and Laura Rimell. 2021. You should evaluate your language model on marginal likelihood over tokenisations. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 2104-2114, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 331 |
+
Jonathan H. Clark, Dan Garrette, Iulia Turc, and John Wieting. 2022. CANINE: Pre-training an efficient tokenization-free encoder for language representation. Transactions of the Association for Computational Linguistics, 10:73-91.
|
| 332 |
+
Philipp Duffer and Hinrich Schütze. 2020. Identifying elements essential for BERT's multilinguality. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4423-4437.
|
| 333 |
+
Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. 2021. A mathematical framework for transformer circuits. Transformer Circuits Thread.
|
| 334 |
+
Philip Gage. 1994. A new algorithm for data compression. C Users Journal, 12(2):23-38.
|
| 335 |
+
Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, and Connor Leahy. 2020. The Pile: An 800GB dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027.
|
| 336 |
+
Gemma Team, Thomas Mesnard, Cassidy Hardin, Robert Dadashi, Surya Bhupatiraju, Shreya Pathak, Laurent Sifre, Morgane Riviere, Mihir Sanjay Kale, Juliette Love, Pouya Tafti, Leonard Hussenot, Aakanksha Chowdhery, Adam Roberts, Aditya Barua, Alex Botev, Alex Castro-Ros, Ambrose Slone, Amelie Heliou, Andrea Tacchetti, Anna Bulanova, Antonia Paterson, Beth Tsai, Bobak Shahriari, Charline Le Lan, Christopher A. Choquette-Choo, Clément Crepy, Daniel Cer, Daphne Ippolito, David
|
| 337 |
+
|
| 338 |
+
Reid, Elena Buchatskaya, Eric Ni, Eric Noland, Geng Yan, George Tucker, George-Christian Muraru, Grigory Rozhdestvenskiy, Henryk Michalewski, Ian Tenney, Ivan Grishchenko, Jacob Austin, James Keeling, Jane Labanowski, Jean-Baptiste Lespiau, Jeff Stanway, Jenny Brennan, Jeremy Chen, Johan Ferret, Justin Chiu, Justin Mao-Jones, Katherine Lee, Kathy Yu, Katie Millican, Lars Lowe Sjoesund, Lisa Lee, Lucas Dixon, Machel Reid, Maciej Mikula, Mateo Wirth, Michael Sharman, Nikolai Chinaev, Nithum Thain, Olivier Bachem, Oscar Chang, Oscar Wahltinez, Paige Bailey, Paul Michel, Petko Yotov, Pier Giuseppe Sessa, Rahma Chaabouni, Ramona Comanescu, Reena Jana, Rohan Anil, Ross McIlroy, Ruibo Liu, Ryan Mullins, Samuel L Smith, Sebastian Borgeaud, Sertan Girgin, Sholto Douglas, Shree Pandya, Siamak Shakeri, Soham De, Ted Klimenko, Tom Hennigan, Vlad Feinberg, Wojciech Stokowiec, Yu hui Chen, Zafarali Ahmed, Zhitao Gong, Tris Warkentin, Ludovic Peran, Minh Giang, Clément Farabet, Oriol Vinylals, Jeff Dean, Koray Kavukcuoglu, Demis Hassabis, Zoubin Ghahramani, Douglas Eck, Joelle Barral, Fernando Pereira, Eli Collins, Armand Joulin, Noah Fiedel, Evan Senter, Alek Andreev, and Kathleen Kenealy. 2024. Gemma: Open models based on gemini research and technology. Google Blog.
|
| 339 |
+
|
| 340 |
+
Qian Huang, Eric Zelikman, Sarah Li Chen, Yuhuai Wu, Gregory Valiant, and Percy Liang. 2023. Lexinvariant language models. In Thirty-seventh Conference on Neural Information Processing Systems.
|
| 341 |
+
|
| 342 |
+
Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2023. Mistral 7B. arXiv preprint arXiv:2310.06825.
|
| 343 |
+
|
| 344 |
+
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.
|
| 345 |
+
|
| 346 |
+
Karthikeyan K, Zihan Wang, Stephen Mayhew, and Dan Roth. 2020. Cross-lingual ability of multilingual BERT: An empirical study. In International Conference on Learning Representations.
|
| 347 |
+
|
| 348 |
+
Eugene Kharitonov, Marco Baroni, and Dieuwke Hupkes. 2021. How BPE affects memorization in transformers. arXiv preprint arXiv:2110.02782.
|
| 349 |
+
|
| 350 |
+
Yoon Kim, Yacine Jernite, David Sontag, and Alexander Rush. 2016. Character-aware neural language
|
| 351 |
+
|
| 352 |
+
models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 30.
|
| 353 |
+
|
| 354 |
+
Diederik Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In International Conference on Learning Representations, San Diego, CA, USA.
|
| 355 |
+
|
| 356 |
+
Taku Kudo. 2018. Subword regularization: Improving neural network translation models with multiple subword candidates. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 66-75, Melbourne, Australia. Association for Computational Linguistics.
|
| 357 |
+
|
| 358 |
+
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: System Demonstrations, pages 66-71.
|
| 359 |
+
|
| 360 |
+
Tomás Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. In International Conference on Learning Representations, Workshop Track Proceedings, Scottsdale, Arizona, USA.
|
| 361 |
+
|
| 362 |
+
OpenAI, Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, Red Avila, Igor Babuschkin, Suchir Balaji, Valerie Balcom, Paul Baltescu, Haiming Bao, Mohammad Bavarian, Jeff Belgium, Irwan Bello, Jake Berdine, Gabriel Bernadett-Shapiro, Christopher Berner, Lenny Bogdonoff, Oleg Boiko, Madelaine Boyd, Anna-Luisa Brakman, Greg Brockman, Tim Brooks, Miles Brundage, Kevin Button, Trevor Cai, Rosie Campbell, Andrew Cann, Brittany Carey, Chelsea Carlson, Rory Carmichael, Brooke Chan, Che Chang, Fotis Chantzis, Derek Chen, Sully Chen, Ruby Chen, Jason Chen, Mark Chen, Ben Chess, Chester Cho, Casey Chu, Hyung Won Chung, Dave Cummings, Jeremiah Currier, Yunxing Dai, Cory Decareaux, Thomas Degry, Noah Deutsch, Damien Deville, Arka Dhar, David Dohan, Steve Dowling, Sheila Dunning, Adrien Ecoffet, Atty Eleti, Tyna Eloundou, David Farhi, Liam Fedus, Niko Felix, Simón Posada Fishman, Juston Forte, Isabella Fulford, Leo Gao, Elie Georges, Christian Gibson, Vik Goel, Tarun Gogineni, Gabriel Goh, Rapha GontijoLopes, Jonathan Gordon, Morgan Grafstein, Scott Gray, Ryan Greene, Joshua Gross, Shixiang Shane Gu, Yufei Guo, Chris Hallacy, Jesse Han, Jeff Harris, Yuchen He, Mike Heaton, Johannes Heidecke, Chris Hesse, Alan Hickey, Wade Hickey, Peter Hoeschele, Brandon Houghton, Kenny Hsu, Shengli Hu, Xin Hu, Joost Huizinga, Shantanu Jain, Shawn Jain, Joanne Jang, Angela Jiang, Roger Jiang, Haozhun Jin, Denny Jin, Shino Jomoto, Billie Jonn, Heewoo Jun, Tomer Kaftan, Lukasz Kaiser, Ali Kamali, Ingmar Kanitscheider, Nitish Shirish Keskar Tabarak Khan, Logan Kilpatrick, Jong Wook Kim
|
| 363 |
+
|
| 364 |
+
Christina Kim, Yongjik Kim, Jan Hendrik Kirchner, Jamie Kiros, Matt Knight, Daniel Kokotajlo, Lukasz Kondraciuk, Andrew Kondrich, Aris Konstantinidis, Kyle Kosic, Gretchen Krueger, Vishal Kuo, Michael Lampe, Ikai Lan, Teddy Lee, Jan Leike, Jade Leung, Daniel Levy, Chak Ming Li, Rachel Lim, Molly Lin, Stephanie Lin, Mateusz Litwin, Theresa Lopez, Ryan Lowe, Patricia Lue, Anna Makanju, Kim Malfacini, Sam Manning, Todor Markov, Yaniv Markovski, Bianca Martin, Katie Mayer, Andrew Mayne, Bob McGrew, Scott Mayer McKinney, Christine McLeavey, Paul McMillan, Jake McNeil, David Medina, Aalok Mehta, Jacob Menick, Luke Metz, Andrey Mishchenko, Pamela Mishkin, Vinnie Monaco, Evan Morikawa, Daniel Mossing, Tong Mu, Mira Murati, Oleg Murk, David Mély, Ashvin Nair, Reiichiro Nakano, Rajeev Nayak, Arvind Neelakantan, Richard Ngo, Hyeonwoo Noh, Long Ouyang, Cullen O'Keefe, Jakub Pachocki, Alex Paino, Joe Palermo, Ashley Pantuliano, Giambattista Parascandolo, Joel Parish, Emy Parparita, Alex Passos, Mikhail Pavlov, Andrew Peng, Adam Perelman, Filipe de Avila Belbute Peres, Michael Petrov, Henrique Ponde de Oliveira Pinto, Michael Pokorny, Michelle Pokrass, Vitchyr H. Pong, Tolly Powell, Alethea Power, Boris Power, Elizabeth Proehl, Raul Puri, Alec Radford, Jack Rae, Aditya Ramesh, Cameron Raymond, Francis Real, Kendra Rimbach, Carl Ross, Bob Rotsted, Henri Roussez, Nick Ryder, Mario Saltarelli, Ted Sanders, Shibani Santurkar, Girish Sastry, Heather Schmidt, David Schnurr, John Schulman, Daniel Selsam, Kyla Sheppard, Toki Sherbakov, Jessica Shieh, Sarah Shoker, Pranav Shyam, Szymon Sidor, Eric Sigler, Maddie Simens, Jordan Sitkin, Katarina Slama, Ian Sohl, Benjamin Sokolowsky, Yang Song, Natalie Staudacher, Felipe Petroski Such, Natalie Summers, Ilya Sutskever, Jie Tang, Nikolas Tezak, Madeleine B. Thompson, Phil Tillet, Amin Tootoonchian, Elizabeth Tseng, Preston Tuggle, Nick Turley, Jerry Tworek, Juan Felipe Cerón Uribe, Andrea Vallone, Arun Vijayvergiya, Chelsea Voss, Carroll Wainwright, Justin Jay Wang, Alvin Wang, Ben Wang, Jonathan Ward, Jason Wei CJ Weinmann Akila Welihinda Peter Welinder Jiayi WengLilian WengMatt Wiethoff Dave Willner Clemens Winter,Samuel Wolrich,Hannah Wong Lauren Workman Sherwin WuJeff WuMichael Wu,Kai Xiao,Tao Xu,Sarah Yoo,Kevin Yu,Qiming Yuan Wojciech Zaremba Rowan Zellers Chong ZhangMarvin ZhangShengjia ZhaoTianhao ZhengJuntang ZhuangWilliam Zhuk and Barret Zoph. 2023.GPT-4 technical report. OpenAI Blog.
|
| 365 |
+
|
| 366 |
+
Ivan Provilkov, Dmitrii Emelianenko, and Elena Voita. 2020. BPE-dropout: Simple and effective subword regularization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1882-1892, Online. Association for Computational Linguistics.
|
| 367 |
+
|
| 368 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI Blog.
|
| 369 |
+
|
| 370 |
+
Joshua Rozner, Christopher Potts, and Kyle Mahowald. 2021. Decrypting cryptic crosswords: Semantically complex wordplay puzzles as a target for NLP. In Advances in Neural Information Processing Systems.
|
| 371 |
+
|
| 372 |
+
Phillip Rust, Jonas F. Lotz, Emanuele Bugliarello, Elizabeth Salesky, Miryam de Lhoneux, and Desmond Elliott. 2023. Language modelling with pixels. In International Conference on Learning Representations.
|
| 373 |
+
|
| 374 |
+
Anton Schäfer, Shauli Ravfogel, Thomas Hofmann, Tiago Pimentel, and Imanol Schlag. 2024. Language imbalance can boost cross-lingual generalisation. arXiv preprint arXiv:2404.07982.
|
| 375 |
+
|
| 376 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1715-1725, Berlin, Germany. Association for Computational Linguistics.
|
| 377 |
+
|
| 378 |
+
Aleksandar Stanic, Dylan Ashley, Oleg Serikov, Louis Kirsch, Francesco Faccio, Jürgen Schmidhuber, Thomas Hofmann, and Imanol Schlag. 2023. The languini kitchen: Enabling language modelling research at different scales of compute. arXiv preprint arXiv:2309.11197.
|
| 379 |
+
|
| 380 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023a. LLaMA: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
|
| 381 |
+
|
| 382 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal 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. 2023b. Llama 2: Open foundation and finetuned chat models. arXiv preprint arXiv:2307.09288.
|
| 383 |
+
|
| 384 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019.
|
| 385 |
+
|
| 386 |
+
GLUE: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations.
|
| 387 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyls, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144.
|
| 388 |
+
Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, and Colin Raffel. 2022. ByT5: Towards a token-free future with pre-trained byte-to-byte models. Transactions of the Association for Computational Linguistics, 10:291-306.
|
| 389 |
+
Lili Yu, Daniel Simig, Colin Flaherty, Armen Aghajanyan, Luke Zettlemoyer, and Mike Lewis. 2023. MEGABYTE: Predicting million-byte sequences with multiscale transformers. In Thirty-seventh Conference on Neural Information Processing Systems.
|
| 390 |
+
|
| 391 |
+
# A Lemma 1 and Proof
|
| 392 |
+
|
| 393 |
+
Definition 1 (Time-dependent Conditional Entropy and Mutual Information). We define a time-dependent conditional entropy as:
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
\mathrm {H} \left(\mathbf {W} _ {< \mathrm {T}} \mid \mathbf {C} _ {\leq \mathrm {T}}\right) \stackrel {\text {d e f}} {=} \sum_ {\boldsymbol {w} \in \mathcal {W}} \sum_ {\boldsymbol {c} \in \mathcal {C}} p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{p _ {\mathbb {S}} \left(\boldsymbol {w} < t \mid \boldsymbol {c} _ {\leq t}\right)} \tag {16}
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
with $\mathrm{H}(\mathbf{W}_{<\mathrm{T}} \mid \mathbf{C}_{<\mathrm{T}})$ defined analogously. Note that, while $p_{\mathbb{S}}(\boldsymbol{w})$ stands for the probability of the single event $\{\boldsymbol{w}\}$ , we write $p_{\mathbb{S}}(\boldsymbol{w}_{<t})$ to represent the probability of the event composed by the union of all sequences with this prefix, i.e., $\cup_{\boldsymbol{w}' \in \mathcal{W}} \{\boldsymbol{w}_{<t} \circ \boldsymbol{w}'\}$ , where $\circ$ stands for concatenation.
|
| 400 |
+
|
| 401 |
+
Accordingly, we define a time-dependent mutual information as:
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
\operatorname {M I} \left(\mathbf {W} _ {< \mathrm {T}}; \mathbf {C} _ {\mathrm {T}} \mid \mathbf {C} _ {< \mathrm {T}}\right) = \operatorname {H} \left(\mathbf {W} _ {< \mathrm {T}} \mid \mathbf {C} _ {< \mathrm {T}}\right) - \operatorname {H} \left(\mathbf {W} _ {< \mathrm {T}} \mid \mathbf {C} _ {\leq \mathrm {T}}\right). \tag {17}
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
Lemma 1. Let $\mathbb{S}:\Sigma \to \overline{\Sigma}$ be a deterministic function which maps duplicated subwords $w\in \Sigma$ to their deduplicated versions $c\in \overline{\Sigma}$ . We then have that:
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
\mathrm {H} _ {\mathbb {S}} (\mathbf {W}) = \mathrm {H} (\mathbf {C}) - \operatorname {M I} \left(\mathbf {W} _ {< \mathrm {T}}; \mathbf {C} _ {\mathrm {T}} \mid \mathbf {C} _ {< \mathrm {T}}\right) \tag {18}
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
Proof. We start with the definition of $\mathrm{H}_{\mathbb{S}}(\mathbf{W})$ and derive Lemma 1:
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\begin{array}{l} \mathrm {H} _ {\mathbb {S}} (\mathbf {W}) = \sum_ {\boldsymbol {w} \in \mathcal {W}} p (\boldsymbol {w}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{p _ {\mathbb {S}} \left(\mathbb {S} \left(w _ {t}\right) \mid \boldsymbol {w} _ {< t}\right)} \tag {19a} \\ = \sum_ {\boldsymbol {w} \in \mathcal {W}} \sum_ {\boldsymbol {c} \in \mathcal {C}} p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{p _ {\mathbb {S}} \left(c _ {t} \mid \boldsymbol {w} _ {< t}\right)} \quad p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) = p (\boldsymbol {w}) \text {i f} \mathbb {S} (\boldsymbol {w}) = \boldsymbol {c} \text {e l s e} 0 (1 9 b) \\ = \sum_ {\boldsymbol {w} \in \mathcal {W}} \sum_ {\boldsymbol {c} \in \mathcal {C}} p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {1}{p _ {\mathbb {S}} \left(c _ {t} \mid \boldsymbol {c} _ {< t} , \boldsymbol {w} _ {< t}\right)} \quad p _ {\mathbb {S}} \left(\boldsymbol {c} _ {< t} \mid \boldsymbol {w} _ {< t}\right) \text {i s d e t e r m i n i s t i c (1 9 c)} \\ = \sum_ {\boldsymbol {w} \in \mathcal {W}} \sum_ {\boldsymbol {c} \in \mathcal {C}} p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {< t}\right)}{p _ {\mathbb {S}} \left(c _ {t} \mid \boldsymbol {c} _ {< t}\right) p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {\leq t}\right)} \quad \text {B a y e s r u l e (1 9 d)} \\ = \sum_ {\boldsymbol {w} \in \mathcal {W}} \sum_ {\boldsymbol {c} \in \mathcal {C}} p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \left(\log \frac {1}{p \left(c _ {t} \mid c _ {< t}\right)} + \log \frac {p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {< t}\right)}{p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {\leq t}\right)}\right) \quad S p l i t \\ = \sum_ {\boldsymbol {c} \in \mathcal {C}} p (\boldsymbol {c}) \sum_ {t = 1} ^ {| c |} \log \frac {1}{p \left(c _ {t} \mid \boldsymbol {c} _ {< t}\right)} + \sum_ {\boldsymbol {w} \in \mathcal {W}} \sum_ {\boldsymbol {c} \in \mathcal {C}} p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) \sum_ {t = 1} ^ {| w |} \log \frac {p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {< t}\right)}{p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {\leq t}\right)} \quad S p l i t s u m (1 9 f) \\ = \mathrm {H} (\mathbf {C}) + \sum_ {\boldsymbol {w} \in \mathcal {W}} \sum_ {\boldsymbol {c} \in \mathcal {C}} p _ {\mathbb {S}} (\boldsymbol {w}, \boldsymbol {c}) \sum_ {t = 1} ^ {| \boldsymbol {w} |} \log \frac {p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {< t}\right)}{p _ {\mathbb {S}} \left(\boldsymbol {w} _ {< t} \mid \boldsymbol {c} _ {\leq t}\right)} \quad \text {D e f i n i t i o n o f H (C) (1 9 g)} \\ = \mathrm {H} (\mathbf {C}) + \mathrm {H} \left(\mathbf {W} _ {< \mathrm {T}} \mid \mathbf {C} _ {\leq \mathrm {T}}\right) - \mathrm {H} \left(\mathbf {W} _ {< \mathrm {T}} \mid \mathbf {C} _ {< \mathrm {T}}\right) \quad \text {D e f i n i t i o n s o f c o n d i t i o n a l e n t r o p i e s} (1 9 \mathrm {h}) \\ = \mathrm {H} (\mathbf {C}) - \operatorname {M I} \left(\mathbf {W} _ {< \mathrm {T}}; \mathbf {C} _ {\mathrm {T}} \mid \mathbf {C} _ {< \mathrm {T}}\right) \quad \text {D e f i n i t i o n o f m u t u a l i n f o r m a t i o n (1 9 i)} \\ \end{array}
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
Note that $p_{\mathbb{S}}(\boldsymbol{w}, \boldsymbol{c}) > 0 \Rightarrow \mathbb{S}(\boldsymbol{w}) = \boldsymbol{c} \Rightarrow |\boldsymbol{w}| = |\boldsymbol{c}|$ , which is required for arriving at Eq. (19f).
|
| 420 |
+
|
| 421 |
+
# B Near Duplicates in Modern LLMs
|
| 422 |
+
|
| 423 |
+
Table 7 shows the near duplicate rates in vocabularies of modern large language models, namely GPT-3.5 and GPT-4 models (Brown et al., 2020; OpenAI et al., 2023), Claude 2.1 (Anthropic, 2023), Llama (Touvron et al., 2023a,b), Mistral 7B and Mixtral 8x7B (Jiang et al., 2023, 2024), and Gemma (Gemma Team et al., 2024).
|
| 424 |
+
|
| 425 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Vocabulary Size</td><td colspan="4">Near Duplicate Rate</td></tr><tr><td>Sspace</td><td>Slower</td><td>Splural</td><td>Sall</td></tr><tr><td>GPT-{3.5, 4, 4-turbo}</td><td>100k</td><td>19%</td><td>24%</td><td>9%</td><td>43%</td></tr><tr><td>Claude 2.1</td><td>65k</td><td>25%</td><td>23%</td><td>9%</td><td>46%</td></tr><tr><td>Llama 1 & 2</td><td>32k</td><td>17%</td><td>31%</td><td>22%</td><td>35%</td></tr><tr><td>Mistral 7B & Mixtral 8x7B</td><td>32k</td><td>15%</td><td>32%</td><td>23%</td><td>37%</td></tr><tr><td>Gemma 7B</td><td>256k</td><td>21%</td><td>20%</td><td>7%</td><td>39%</td></tr></table>
|
| 426 |
+
|
| 427 |
+
Table 7: Near duplicate rates of modern LLM vocabularies. Computed as $1 - \frac{|\Sigma|}{|\Sigma|}$ , i.e., the ratio by which the size of the vocabulary decreases when mapping all subwords to their canonical versions using the respective S. For the definitions of the dedduplication mappings S, see §5.2.1.
|
| 428 |
+
|
| 429 |
+
# C Near Duplicates under $\mathbf{S}_{\mathrm{space}}$
|
| 430 |
+
|
| 431 |
+
Near duplicates under $\mathbb{S}_{\text{lower}}$ and $\mathbb{S}_{\text{plural}}$ are generally very close in meaning. $\mathbb{S}_{\text{lower}}$ pairs often consist of the lowercase and the capitalized version of a subword, where the latter might appear at the beginning of sentences. And (sub)word pairs under $\mathbb{S}_{\text{plural}}$ tend to refer to the same lemma. For $\mathbb{S}_{\text{space}}$ , however, the contexts in which subword variants with and without a leading space appear might differ much more: in particular, we observe this with shorter subwords that can appear both as their own word (e.g., $\_he$ in 'and he writes') and as a substring of a longer unrelated word (e.g., $he$ in 'breathe').
|
| 432 |
+
|
| 433 |
+
To quantify how frequently $\mathbb{S}_{\text{space}}$ near duplicate pairs show such differences, we manually inspect 100 randomly sampled pairs and note whether the subwords convey comparable meaning in their first occurrences in the training data. We find that $53\%$ of the pairs carry highly similar meaning in both occurrences. Examples include use in compound words (e.g., _writing in isolation vs writing in 'handwriting', or _held in isolation vs held in 'long-held') or after special characters like newlines, parentheses, or quotation marks (e.g. _wide in isolation vs wide in ('wide [...]')). Of the remaining $47\%$ , around half appear in contexts that are clearly different (e.g., he and _he as in example above) while the rest are very short subwords where the conveyed meaning is hard to determine (e.g. _sche in 'schemed' vs sche in 'Nietzsche').
|
| 434 |
+
|
| 435 |
+
# D Effect of Added Parameters forDuplicates
|
| 436 |
+
|
| 437 |
+
A model $\widehat{p}(\boldsymbol{w})$ over duplicated subwords has more embedding parameters than its deduplicated counterpart $\widehat{p}(\boldsymbol{c})$ . In the perfect duplication setting, however, these extra parameters should not yield an unfair advantage. In particular, assume an equiprobable duplicates setting, where $p(w_{\mathfrak{i}} \mid c_{\mathfrak{i}}) = p(w_{\mathfrak{i}}' \mid c_{\mathfrak{i}}) = 0.5$ . We can show that, in this setting, if there exists an optimal model $\widehat{p}(\boldsymbol{w})$ (which achieves $\widehat{\mathrm{H}}(\mathbf{W}) = \mathrm{H}(\mathbf{W})$ ), then there also exists an equivalent model $\widehat{p}(c)$ . Further, the input and output embeddings for duplicates $w_{\mathfrak{i}}$ and $w_{\mathfrak{i}}'$ are perfectly interchangeable; the added embeddings thus provide no benefits, as the embedding of any $w_{\mathfrak{i}}'$ can be replaced with the embedding of the respective $w_{\mathfrak{i}}$ without affecting performance.
|
| 438 |
+
|
| 439 |
+
To see this, note that for the optimal $\widehat{p}(\boldsymbol{w})$ , we have $\widehat{p}(\boldsymbol{w}) = p(\boldsymbol{w})$ almost everywhere. Consequently, by Bayes, $\widehat{p}(\boldsymbol{w} \mid \boldsymbol{w}_{<t}) = p(\boldsymbol{w} \mid \boldsymbol{w}_{<t})$ . We thus obtain
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
\widehat {p} \left(w _ {①} \mid w _ {< t}\right) = \widehat {p} \left(w _ {①} ^ {\prime} \mid w _ {< t}\right) \tag {20}
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
which means that the model makes identical predictions for duplicate subwords. Predictions are thus not affected if we assign all $w_{\mathrm{①}}^{\prime}$ the output embedding of the respective $w_{\mathrm{①}}$ (or vice-versa).
|
| 446 |
+
|
| 447 |
+
An analogous argument holds for input embeddings. Let $\boldsymbol{w}_{<t}[w_{\mathfrak{U}}' \to w_{\mathfrak{U}}]$ denote the token sequence obtained when replacing every occurrence of $w_{\mathfrak{U}}'$ in $\boldsymbol{w}_{<t}$ with $w_{\mathfrak{U}}$ . For the true distribution, we know that $p(w_{\mathfrak{U}} | \boldsymbol{w}_{<t}) = p(w_{\mathfrak{U}} | \boldsymbol{w}_{<t}[w_{\mathfrak{U}}' \to w_{\mathfrak{U}}])$ due to the perfect equivalence, and thus also:
|
| 448 |
+
|
| 449 |
+
$$
|
| 450 |
+
\widehat {p} \left(w _ {①} \mid w _ {< t}\right) = \widehat {p} \left(w _ {①} \mid w _ {< t} \left[ w _ {①} ^ {\prime} \rightarrow w _ {①} \right]\right) \tag {21}
|
| 451 |
+
$$
|
| 452 |
+
|
| 453 |
+
This means that $\widehat{p}(\boldsymbol{w})$ makes identical predictions, whether we replace $w_{\textcircled{1}}^{\prime}$ with $w_{\textcircled{1}}$ in the context or not. If we assign $w_{\textcircled{1}}^{\prime}$ the input embedding of $w_{\textcircled{1}}$ , model performance is not affected. By applying this argument iteratively for all $i$ , we can show that all duplicates' input embeddings can be made identical. If the input embeddings of all duplicates can be made identical, then there exists a model $\widehat{p}(c_{\textcircled{1}} \mid c_{<t})$ which, when given as input $\mathbb{S}(\boldsymbol{w})$ , outputs the same probability as $\widehat{p}(w_{\textcircled{1}} \mid w_{<t}) + \widehat{p}(w_{\textcircled{1}}^{\prime} \mid w_{<t})$ . In particular, let $\mathbf{v}_w$ be the output embeddings associated with $w$ . We can show that:
|
| 454 |
+
|
| 455 |
+
$$
|
| 456 |
+
\begin{array}{l} \widehat {p} \left(w _ {\text {①}} \mid w _ {< t}\right) + \widehat {p} \left(w _ {\text {①}} ^ {\prime} \mid w _ {< t}\right) = 2 \widehat {p} \left(w _ {\text {①}} \mid w _ {< t}\right) (22a) \\ = 2 \frac {\exp \left(\mathbf {v} _ {w \text {①}} \mathbf {h}\right)}{\sum_ {w \in \Sigma} \exp \left(\mathbf {v} _ {w} \mathbf {h}\right)} (22b) \\ = 2 \frac {\exp \left(\mathbf {v} _ {w _ {①}} \mathbf {h}\right)}{\sum_ {j = 1} ^ {| \overline {{\Sigma}} |} \exp \left(\mathbf {v} _ {w _ {①}} \mathbf {h}\right) + \sum_ {j = 1} ^ {| \overline {{\Sigma}} |} \exp \left(\mathbf {v} _ {w _ {①} ^ {\prime}} \mathbf {h}\right)} (22c) \\ = \frac {2 \exp \left(\mathbf {v} _ {w _ {\text {①}}} \mathbf {h}\right)}{2 \sum_ {j = 1} ^ {| \overline {{\Sigma}} |} \exp \left(\mathbf {v} _ {w _ {\text {①}}} \mathbf {h}\right)} (22d) \\ = \frac {\exp \left(\mathbf {v} _ {c _ {①}} \mathbf {h}\right)}{\sum_ {j = 1} ^ {| \overline {{\Sigma}} |} \exp \left(\mathbf {v} _ {c _ {①}} \mathbf {h}\right)} (22e) \\ = \widehat {p} \left(c _ {\text {①}} \mid c _ {< t}\right) (22f) \\ \end{array}
|
| 457 |
+
$$
|
| 458 |
+
|
| 459 |
+
So we can construct a $\widehat{p}(\boldsymbol{c})$ model from $\widehat{p}(\boldsymbol{w})$ by simply making the embeddings of $c_{\mathbb{1}}$ the same as $w_{\mathbb{1}}$ . The identical input embeddings preserve the value of the hidden state $\mathbf{h}$ for any context, which, along with the identical output embeddings, ensures identical model outputs.
|
| 460 |
+
|
| 461 |
+
# E Embedding Similarity Results
|
| 462 |
+
|
| 463 |
+
While in Fig. 6, it appears that a balance between duplicated and non-duplicated subwords (i.e. $p(w_{\mathfrak{i}}^{\prime}) \mid c_{\mathfrak{i}}) = 1 - p(w_{\mathfrak{i}} \mid c_{\mathfrak{i}})$ close to 0.5) leads to higher similarity of their embeddings, Fig. 7 shows that the underlying factor driving embedding alignment seems to be subword frequency, or more precisely, how often the rarer version of the subword (here always $w^{\prime}$ as $p(w_{\mathfrak{i}}^{\prime} \mid c_{\mathfrak{i}}) < 0.5$ ) occurs.
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
Figure 6: Embedding cosine similarity of duplicates $w_{1}$ , $w_{1}'$ and random pairs $w_{1}$ , $w_{1}'$ to control for anisotropy. Left: Our GPT model. Right: Word2vec embeddings trained on the same data (computed with Gensim).
|
| 467 |
+
|
| 468 |
+

|
| 469 |
+
|
| 470 |
+

|
| 471 |
+
Figure 7: Embedding cosine similarity of duplicates $w_{①}$ , $w_{①}^{\prime}$ , by frequency of the rarer $w_{①}^{\prime}$ . Frequencies binned and similarities averaged per bin.
|
| 472 |
+
|
| 473 |
+
# F Effect of Deduplicated Subwords in the Context
|
| 474 |
+
|
| 475 |
+
An increased number of deduplicated subwords in the context seems to generally lead to a steeper increase in surprisal than an increased number of non-deduplicated subwords, at least in the local context of 16 tokens (see Figure Fig. 8). For the full context, the trend is less clear.
|
| 476 |
+
|
| 477 |
+

|
| 478 |
+
|
| 479 |
+

|
| 480 |
+
|
| 481 |
+

|
| 482 |
+
|
| 483 |
+

|
| 484 |
+
|
| 485 |
+

|
| 486 |
+
Fraction of ... in last 16 tokens (bins)
|
| 487 |
+
|
| 488 |
+

|
| 489 |
+
Fraction of ... in full context (bins)
|
| 490 |
+
Figure 8: Dedduplication of half of the vocabulary. Difference to baseline $(\widehat{p}(\boldsymbol{w}))$ surprisal, depending on fraction of (non-)deduplicated subwords in context. Fractions binned and surprisal differences averaged per bin. To reduce noise and ensure readability, we only plot bins that contain at least $1k$ predicted tokens.
|
2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae91de7c8c42e3ff8899fa18f8461af470a5a9dc82536466250f556ecc36cdde
|
| 3 |
+
size 975188
|
2024/On the Effect of (Near) Duplicate Subwords in Language Modelling/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/77cffe5a-33d9-4e6f-bafa-2f5c5a054738_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/77cffe5a-33d9-4e6f-bafa-2f5c5a054738_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/77cffe5a-33d9-4e6f-bafa-2f5c5a054738_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:496e5a6296781dcef54fe807d01173db3ac3e23ad97ef3f97ea357093ca3ff2d
|
| 3 |
+
size 4759152
|
2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/full.md
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On the Evaluation of Speech Foundation Models for Spoken Language Understanding
|
| 2 |
+
|
| 3 |
+
Siddhant Arora<sup>1</sup>, Ankita Pasad<sup>2</sup>, Chung-Ming Chien<sup>2</sup>, Jionghao Han<sup>1</sup>, Roshan Sharma<sup>1</sup>, Jee-weon Jung<sup>1</sup>, Hira Dhamyal<sup>1</sup>, William Chen<sup>1</sup>, Suwon Shon<sup>3</sup>, Hung-yi Lee<sup>4</sup>, Karen Livescu<sup>2</sup>, Shinji Watanabe<sup>1</sup>
|
| 4 |
+
|
| 5 |
+
$^{1}$ Carnegie Mellon University, USA
|
| 6 |
+
|
| 7 |
+
$^{2}$ Toyota Technological Institute at Chicago
|
| 8 |
+
|
| 9 |
+
$^{3}$ ASAPP $^{4}$ National Taiwan University
|
| 10 |
+
|
| 11 |
+
{siddhana}@cs.cmu.edu
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
The Spoken Language Understanding Evaluation (SLUE) suite of benchmark tasks was recently introduced to address the need for open resources and benchmarking of complex spoken language understanding (SLU) tasks, including both classification and sequence generation tasks, on natural speech. The benchmark has demonstrated preliminary success in using pre-trained speech foundation models (SFM) for these SLU tasks. However, the community still lacks a fine-grained understanding of the comparative utility of different SFMs. Inspired by this, we ask: which SFMs offer the most benefits for these complex SLU tasks, and what is the most effective approach for incorporating these SFMs? To answer this, we perform an extensive evaluation of multiple supervised and self-supervised SFMs using several evaluation protocols: (i) frozen SFMs with a lightweight prediction head, (ii) frozen SFMs with a complex prediction head, and (iii) fine-tuned SFMs with a lightweight prediction head. Although the supervised SFMs are pretrained on much more speech recognition data (with labels), they do not always outperform self-supervised SFMs; the latter tend to perform at least as well as, and sometimes better than, supervised SFMs, especially on the sequence generation tasks in SLUE. While there is no universally optimal way of incorporating SFMs, the complex prediction head gives the best performance for most tasks, although it increases the inference time. We also introduce an open-source toolkit and performance leaderboard, SLUE-PERB, for these tasks and modeling strategies.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Spoken language understanding (SLU) refers to tasks that require extracting semantics from spoken utterances. SLU systems have important applications, for example, in voice assistants and conversational agents, and have attracted increasing interest
|
| 20 |
+
|
| 21 |
+
in recent years (Yu et al., 2019; Coucke et al., 2018). SLU encompasses a wide range of tasks, such as predicting intents and slots (Lugosch et al., 2019; Bastianelli et al., 2020; Saade et al., 2018), recognizing entity mentions and labels (Bastianelli et al., 2020; Del Rio et al., 2021), detecting the speaker's sentiment (Busso et al., 2008) and modeling the topic of a spoken dialogue (Ortega and Vu, 2018; Stolcke et al., 2000). More recently, there has been significant interest in tackling more complex tasks like question answering (Li et al., 2018; Shon et al., 2023) or summarization (Sharma et al., 2022).
|
| 22 |
+
|
| 23 |
+
The Spoken Language Understanding Evaluation (SLUE) (Shon et al., 2022, 2023) suite of benchmark tasks was recently proposed to address the lack of sufficiently complex and varied tasks on natural (rather than synthetic or read) speech from public datasets. SLUE uses annotated natural speech from conversations and monologues and includes both classification and sequence generation tasks. Traditional SLU models use a pipeline (Palmer and Ostendorf, 2001; Horlock and King, 2003; Béchet et al., 2004) of an automatic speech recognition (ASR) system followed by a natural language understanding (NLU) system. End-to-end (E2E) SLU systems (Arora et al., 2022; Ghannay et al., 2018) have also been explored to mitigate the impact of error propagation observed in pipeline approaches and take advantage of the information in the audio signal beyond the word content.
|
| 24 |
+
|
| 25 |
+
A recent trend in E2E models has been the use of pre-trained speech foundation models (SFM) (Mohamed et al., 2022; Chen et al., 2021b; Hsu et al., 2021; Radford et al., 2022; Peng et al., 2023b) that can learn useful representations for a large number of tasks. Due to the increasing diversity of models, benchmarks are important to compare the performance of SFMs on multiple downstream tasks. Performance benchmarks like SUPERB (Speech processing Universal PERfor
|
| 26 |
+
|
| 27 |
+
mance Benchmark) (Yang et al., 2021) have facilitated standardized comparison of pre-trained SFMs across a diverse range of speech-processing tasks. However, such benchmarks lack coverage of challenging and realistic SLU tasks. Hence, the community lacks a fine-grained understanding of the relative merits of different SFMs and different ways to use them for downstream SLU tasks.
|
| 28 |
+
|
| 29 |
+
Motivated by these shortcomings, we introduce SLUE-PERB (Spoken Language Understanding Evaluation PERformance Benchmark), specifically designed to evaluate representations extracted from pre-trained SFMs on complex SLU tasks. We use this benchmark to answer two main questions: (i) which SFMs are most useful for these tasks, and (ii) how do different ways of using these SFMs, varying in their compute budget, compare. Our study addresses various questions concerning SLU systems, such as whether supervised SFMs are more beneficial than self-supervised SFMs, whether SFMs are effective as frozen feature extractors or should be fine-tuned on downstream tasks, and whether the complexity of prediction heads affects the performance trends.
|
| 30 |
+
|
| 31 |
+
We conduct a comprehensive analysis by examining three types of SFMs: (i) self-supervised learning (SSL) speech models (Baevski et al., 2020; Hsu et al., 2021; Chen et al., 2021b) trained on unlabeled speech data; (ii) (weakly) supervised ASR (and speech translation) models (Radford et al., 2022; Peng et al., 2023b) pre-trained on large labeled corpora; and (iii) supervised SLU models pretrained on external SLU corpora (Chen et al., 2020; Bastianelli et al., 2020). Our extensive experiments are performed on the SLUE benchmark (Shon et al., 2022, 2023), which provides curated data for Sentiment Analysis (SA), Named Entity Recognition (NER), Named Entity Localization (NEL), Dialogue Act Classification (DAC), Question Answering (QA) and Summarization (SUMM). The key contributions are:
|
| 32 |
+
|
| 33 |
+
- We compare representations extracted from various pre-trained SFMs across all SLUE tasks. Our experiments reveal that pre-trained ASR SFMs excel in classification tasks, while SSL SFMs either outperform or perform comparably to supervised ASR SFMs in sequence generation tasks.
|
| 34 |
+
- We evaluate different modeling strategies and find that the performance improves, and the
|
| 35 |
+
|
| 36 |
+
performance gap between different SFMs reduces, as we increase the prediction head size or fine-tune the pre-trained SFMs instead of using frozen representations.
|
| 37 |
+
|
| 38 |
+
- While no single method is universally optimal for all tasks, employing a complex prediction head is the best performing strategy for most tasks when inference speed is not a limiting factor. On the other hand, fine-tuned SFMs with a lightweight prediction head are a good option if latency is a concern.
|
| 39 |
+
- We release our code publicly so that researchers can easily reproduce our results and test their own pre-trained SFMs.
|
| 40 |
+
|
| 41 |
+
# 2 Related Work
|
| 42 |
+
|
| 43 |
+
# 2.1 Pre-trained speech foundation models
|
| 44 |
+
|
| 45 |
+
The earliest self-supervised speech model, pretrained on large amounts of unlabeled data, to show improvements in large-scale ASR was wav2vec (Schneider et al., 2019). Since then, the community has developed a variety of pre-trained self-supervised SFMs (Mohamed et al., 2022) and their representations have been successfully incorporated into task-specific models spanning many applications.
|
| 46 |
+
|
| 47 |
+
Recently, supervised SFMs pre-trained on large amounts of paired or weakly paired speech-text data have gained in popularity. Studies (Arora et al., 2023a,b) have shown that these supervised SFMs can be fine-tuned to achieve state-of-the-art (SOTA) performance on certain downstream tasks. But it remains to be seen how supervised pretraining compares with self-supervised SFMs on complex language understanding tasks like those in SLUE.
|
| 48 |
+
|
| 49 |
+
The few studies so far on SFMs for SLU (Yang et al., 2021; Shon et al., 2022, 2023; Wu et al., 2023; Chien et al., 2023; Chou et al., 2023) focus on only selected SLU tasks, a single pre-trained SFM, or simpler SLU tasks. With SLUE-PERB, we aim to fill this knowledge gap by studying the applicability of different types of SFMs and modeling strategies on a variety of SLU tasks.
|
| 50 |
+
|
| 51 |
+
# 2.2 Performance benchmarks
|
| 52 |
+
|
| 53 |
+
Performance benchmarks have been widely used to study performance on downstream tasks and the information encoded in SFMs. Among them,
|
| 54 |
+
|
| 55 |
+
<table><tr><td rowspan="2">Dataset</td><td rowspan="2">Speaking Style</td><td colspan="3">Size (hours)</td><td rowspan="2">Tasks</td><td rowspan="2">Output</td><td rowspan="2">Metric</td></tr><tr><td>Train</td><td>Dev</td><td>Test</td></tr><tr><td>SLUE-VoxCeleb</td><td>Conversational</td><td>12.8</td><td>2.1</td><td>9.0</td><td>SA* ASR†</td><td>sentiment class text transcript</td><td>F1WER</td></tr><tr><td>SLUE-VoxPopuli</td><td>Orated Speech</td><td>14.5</td><td>5.0</td><td>4.9</td><td>NER† NEL§ ASR†</td><td>-entity phrase, entity tag) pairs (entity start time, entity end time) pairs text transcript</td><td>Label F1, F1 Frame F1WER</td></tr><tr><td>SLUE-HVB</td><td>Scripted conversation</td><td>6.8</td><td>1.0</td><td>3.6</td><td>DAC*</td><td>dialogue act classes</td><td>F1</td></tr><tr><td>SLUE-SQA-5</td><td>Read speech</td><td>244.0</td><td>21.2</td><td>25.8</td><td>QA§</td><td>(answer start time, answer end time)</td><td>Frame F1</td></tr><tr><td>SLUE-TED</td><td>Orated Speech</td><td>664.0</td><td>81.0</td><td>84.0</td><td>SUMM†</td><td>text summary</td><td>ROUGE-L,BERTScore</td></tr></table>
|
| 56 |
+
|
| 57 |
+
*: Classification, †: Sequence generation, §: Temporal Alignment
|
| 58 |
+
|
| 59 |
+
Table 1: Overview of the datasets (Shon et al., 2022, 2023) and tasks in SLUE-PERB. "WER" = "word error rate."
|
| 60 |
+
|
| 61 |
+
SUPERB (Yang et al., 2021) is a popular benchmark developed for SSL SFMs. It includes a variety of downstream tasks from speech recognition, speaker recognition, emotion recognition, to simple SLU tasks like intent classification and slot filling. It uses a shared evaluation protocol, combining a frozen SFM with a lightweight prediction head for each task. Extensions of the benchmark to different languages (LeBenchmark, IndicSUPERB, MLSUPERB (Parcollet et al., 2023; Javed et al., 2023; Shi et al., 2023)), modalities (AV-SUPERB (Tseng et al., 2023)), and tasks (SUPERB-SG (Tsai et al., 2022)) have been proposed.
|
| 62 |
+
|
| 63 |
+
Though such benchmarks have tremendous value, they lack coverage of challenging and practical SLU tasks. Motivated by this, SLUE (Shon et al., 2022, 2023) was proposed to focus on more challenging SLU tasks on freely available annotated natural speech datasets, including conversational or long-discourse speech, as shown in Tab. 1. However, the original SLUE tasks do not have a standardized evaluation protocol with an interface to a benchmark. Additionally, SLUE primarily aimed to compare various pipeline and E2E SLU systems rather than analyze the comparative efficacy of different SFMs. To address these issues, we introduce SLUE-PERB, which exhaustively evaluates various pre-trained SFMs across different evaluation settings on these complex SLU tasks.
|
| 64 |
+
|
| 65 |
+
# 3 The SLUE-PERB benchmark
|
| 66 |
+
|
| 67 |
+
SLUE-PERB is an open-source testbed for evaluating SFMs on SLU tasks.
|
| 68 |
+
|
| 69 |
+
# 3.1 Tasks
|
| 70 |
+
|
| 71 |
+
Our benchmark currently focuses on the datasets from SLUE (Shon et al., 2022) and SLUE Phase-2 (Shon et al., 2023). We provide support for 6
|
| 72 |
+
|
| 73 |
+
SLUE tasks, shown in Tab. 1. SA is an utterance-level classification task of identifying the sentiment of an utterance. NER is a sequence prediction task of detecting the named entities and labeling their tags in a spoken utterance. NEL involves locating the entities, i.e., predicting the start and end timestamps of any entity in the audio. DAC is an utterance-level multi-label, multi-class classification task that identifies the function(s) of an utterance in a spoken conversation, such as a statement, a question, etc. QA involves locating the answer (i.e. predicting the start and end timestamps) in a spoken document given a spoken question. SUMM is a sequence prediction task that involves generating a text summary of a long speech input. Sec. A.2 in the Appendix provides additional dataset details.
|
| 74 |
+
|
| 75 |
+
# 3.2 Pre-trained speech foundation models
|
| 76 |
+
|
| 77 |
+
We experiment with the following three types of pre-trained SFMs, summarised in Tab. 2, with additional details in Sec. A.1 in the Appendix.
|
| 78 |
+
|
| 79 |
+
Self-supervised SFMs: To incorporate SSL SFMs, we follow prior work (Yang et al., 2021) and use a weighted sum of the hidden layer representations of SSL encoder to generate speech representations.
|
| 80 |
+
|
| 81 |
+
Supervised ASR SFMs: We use representations derived from the hidden layers of the encoder of supervised encoder-decoder ASR SFMs. The use of the encoder alone makes the comparisons with SSL-based encoders more straightforward, and also follows the practice of prior work using supervised ASR SFMs for other downstream tasks (Gong et al., 2023). However, in future work, we plan to study the use of the pre-trained decoder as well.
|
| 82 |
+
|
| 83 |
+
Supervised SLU SFMs: Since most SLU tasks have limited labeled data, our benchmark also evaluates the impact of pre-training using an external SLU corpus. As in the case of supervised ASR models, we use the encoder of the pre-trained
|
| 84 |
+
|
| 85 |
+
<table><tr><td>Type</td><td>Speech Foundation Model</td><td>Architecture</td><td>Model size</td><td>Dataset (size in hours)</td><td>Objective</td></tr><tr><td rowspan="3">SSL</td><td>Wav2Vec2 (large) (Baevski et al.)</td><td>7-Conv 24-Trans</td><td>317.4M</td><td>LibriLight 60k (60k)</td><td>contrastive</td></tr><tr><td>HuBERT (large) (Hsu et al.)</td><td>7-Conv 24-Trans</td><td>316.6M</td><td>LibriLight 60k (60k)</td><td>masked prediction</td></tr><tr><td>WavLM (large) (Chen et al.)</td><td>7-Conv 24-Trans</td><td>315.5M</td><td>Mix 94k (94k)</td><td>masked prediction + de-noising</td></tr><tr><td rowspan="2">ASR</td><td>Whisper (med.) (Radford et al.)</td><td>2-Conv 24-Trans</td><td>315.7M</td><td>Web data (680k)</td><td>ASR, ST</td></tr><tr><td>OWSM (3.1) (Peng et al.)</td><td>2-Conv 18-Branch</td><td>560.8M</td><td>Open-source ASR + ST data (180k)</td><td>ASR, ST</td></tr><tr><td rowspan="2">SLU</td><td>SWBD Sentiment (Arora et al.)</td><td>2-Conv 12-Conf</td><td>82.2M</td><td>SWBD Sentiment (260)</td><td>SLU</td></tr><tr><td>SLURP (Arora et al.)</td><td>2-Conv 12-Conf</td><td>83.2M</td><td>SLURP (58)</td><td>SLU</td></tr></table>
|
| 86 |
+
|
| 87 |
+
Table 2: Summary of the encoder of self-supervised and supervised pre-trained SFMs used in this work. The Mix 94k dataset is a mixture of LibriLight 60k (Kahn et al., 2020), GigaSpeech 10k (Chen et al., 2021a), and VoxPopuli 24k (Wang et al., 2021).
|
| 88 |
+
|
| 89 |
+
model to extract speech representations. For SLU SFMs, we choose pre-training SLU corpora designed for the same task as the target SLU data. Hence, we use SLU model pre-trained on the SWBD Sentiment dataset for the SA task and SLU model pre-trained on SLURP for all other tasks.
|
| 90 |
+
|
| 91 |
+
# 3.3 Evaluation Protocols
|
| 92 |
+
|
| 93 |
+
This section provides a high-level overview of the various prediction heads and approaches for leveraging SFMs investigated in this study. We consistently employ a learned weighted sum of hidden layers of SFMs to generate speech representations across all 3 approaches. Further details about the evaluation setup are in Sec. 4.
|
| 94 |
+
|
| 95 |
+
Lightweight prediction head: We first experiment with using a similar evaluation protocol to SUPERB, where the pre-trained SFM is kept frozen, with a lightweight prediction head learned on top of it to perform classification or sequence generation. Depending on the task, this lightweight prediction head usually consists of a classification layer or a shallow encoder with CTC. As in SUPERB, we use weighted combinations of hidden layer activations as the input to the classifier or encoder. This evaluation protocol not only facilitates quick comparison of various SFMs but also promotes the development of models capable of performing well across multiple tasks without the need for task-specific fine-tuning. Unlike SUPERB, SLUE-PERB does not restrict its evaluation solely to SSL SFMs.
|
| 96 |
+
|
| 97 |
+
Fine-tuned representations: Another popular paradigm for incorporating pre-trained SFMs is fine-tuning the SFMs along with a lightweight prediction head. While there are multiple approaches to fine-tune SFMs, including parameter-efficient approaches like LoRA (Hu et al., 2022), full fine-tuning has been most commonly used in prior
|
| 98 |
+
|
| 99 |
+
works (Ott et al., 2019; Shon et al., 2022). However, this approach significantly increases the computation cost during fine-tuning, which might make it challenging to use in scenarios with a limited computation budget.
|
| 100 |
+
|
| 101 |
+
Complex prediction head: Motivated by prior works (Zaiem et al., 2023b,a) that show a change in benchmark results with a change in prediction head architectures, we investigate increasing the complexity of the prediction head while keeping the SFMs frozen. In this protocol, we experiment with a "prediction head" based on an encoder-decoder architecture. The input to this prediction head is a sequence of pre-trained speech representations and the output is a sequence of text tokens denoting the SLU label sequence. While this setting does increase inference time, it serves as a middle ground between the "Lightweight prediction head" and "Fine-tuned representations" settings in terms of the number of trainable parameters and has been used in prior works on SLU (Arora et al., 2022).
|
| 102 |
+
|
| 103 |
+
# 4 Experiments
|
| 104 |
+
|
| 105 |
+
We conduct our analysis by examining various SFMs as introduced in Tab. 2. Training hyperparameters are selected based on validation performance. More details can be found in Sec. A.3 in the Appendix. All our models and config files will be publicly available upon acceptance of the paper.
|
| 106 |
+
|
| 107 |
+
Lightweight prediction head: For the SA task, we mean-pool the extracted features from the SFMs across time, and then pass the pooled representation through a linear layer to compute the probability for each sentiment class. The lightweight classification layers are trained using cross-entropy loss. In the case of DAC, we follow a similar procedure of mean-pooling followed by a linear layer. As this is a multi-label classification task, we use a sigmoid
|
| 108 |
+
|
| 109 |
+
<table><tr><td rowspan="2">Evaluation
|
| 110 |
+
Protocol</td><td rowspan="2">Pre-Trained
|
| 111 |
+
Model</td><td colspan="2">SLUE-VoxCeleb</td><td colspan="4">SLUE-VoxPopuli</td><td>SQA-5</td><td colspan="2">SLUE-TED</td><td>SLUE-HVB</td></tr><tr><td>SA F1 ↑</td><td>ASR WER ↓</td><td>NER Label F1 ↑</td><td>F1 ↑</td><td>ASR WER ↓</td><td>NEL Frame F1 ↑</td><td>QA Frame F1 ↑</td><td>SUMM ROUGE-L ↑</td><td>BERTScore ↑</td><td>DAC F1 ↑</td></tr><tr><td rowspan="6">Lightweight prediction head</td><td>HuBERT (large)</td><td>41.0</td><td>19.0</td><td>76.5</td><td>59.3</td><td>14.2</td><td>67.7</td><td>12.0</td><td>✘</td><td>✘</td><td>48.0</td></tr><tr><td>Wav2Vec2 (large)</td><td>40.6</td><td>21.7</td><td>73.6</td><td>57.5</td><td>16.0</td><td>64.1</td><td>6.0</td><td>✘</td><td>✘</td><td>51.2</td></tr><tr><td>WavLM (large)</td><td>43.3</td><td>14.1</td><td>80.6</td><td>64.5</td><td>10.4</td><td>72.0</td><td>17.4</td><td>✘</td><td>✘</td><td>54.6</td></tr><tr><td>Whisper (medium)</td><td>49.6</td><td>15.0</td><td>79.6</td><td>63.1</td><td>12.5</td><td>71.8</td><td>0.1</td><td>✘</td><td>✘</td><td>59.7</td></tr><tr><td>OWSM (3.1)</td><td>47.2</td><td>17.4</td><td>78.4</td><td>61.7</td><td>12.8</td><td>70.5</td><td>14.0</td><td>✘</td><td>✘</td><td>66.3</td></tr><tr><td>Pre-trained SLU</td><td>36.4</td><td>47.5</td><td>60.8</td><td>45.5</td><td>39.1</td><td>47.8</td><td>2.0</td><td>✘</td><td>✘</td><td>54.4</td></tr><tr><td rowspan="6">Complex prediction head</td><td>HuBERT (large)</td><td>52.2</td><td>15.5</td><td>78.5</td><td>63.1</td><td>13.0</td><td>69.8</td><td>21.4</td><td>16.0</td><td>83.4</td><td>66.1</td></tr><tr><td>Wav2Vec2 (large)</td><td>53.3</td><td>17.2</td><td>78.2</td><td>63.7</td><td>14.0</td><td>71.2</td><td>18.8</td><td>16.2</td><td>83.0</td><td>65.8</td></tr><tr><td>WavLM (large)</td><td>52.0</td><td>11.4</td><td>82.7</td><td>69.7</td><td>10.1</td><td>72.6</td><td>22.5</td><td>16.4</td><td>83.0</td><td>67.4</td></tr><tr><td>Whisper (medium)</td><td>51.0</td><td>14.9</td><td>79.2</td><td>64.1</td><td>13.2</td><td>70.1</td><td>1.6</td><td>16.0</td><td>83.8</td><td>67.8</td></tr><tr><td>OWSM (3.1)</td><td>52.8</td><td>16.5</td><td>79.6</td><td>66.0</td><td>12.6</td><td>68.6</td><td>20.3</td><td>16.5</td><td>83.6</td><td>69.4</td></tr><tr><td>Pre-trained SLU</td><td>49.7</td><td>36.4</td><td>68.7</td><td>54.8</td><td>28.5</td><td>54.4</td><td>3.2</td><td>15.4</td><td>82.9</td><td>66.3</td></tr><tr><td rowspan="6">Fine-tuning representations</td><td>HuBERT (large)</td><td>46.5</td><td>14.8</td><td>78.8</td><td>62.6</td><td>12.0</td><td>69.4</td><td>✘</td><td>✘</td><td>✘</td><td>72.7</td></tr><tr><td>Wav2Vec2 (large)</td><td>45.0</td><td>14.7</td><td>78.2</td><td>62.9</td><td>11.7</td><td>68.6</td><td>✘</td><td>✘</td><td>✘</td><td>71.3</td></tr><tr><td>WavLM (large)</td><td>47.9</td><td>12.1</td><td>82.5</td><td>66.3</td><td>9.7</td><td>71.7</td><td>✘</td><td>✘</td><td>✘</td><td>71.5</td></tr><tr><td>Whisper (medium)</td><td>51.8</td><td>20.5</td><td>76.9</td><td>59.8</td><td>18.2</td><td>56.6</td><td>✘</td><td>✘</td><td>✘</td><td>69.8</td></tr><tr><td>OWSM (3.1)</td><td>47.8</td><td>15.0</td><td>78.5</td><td>61.5</td><td>14.3</td><td>65.1</td><td>✘</td><td>✘</td><td>✘</td><td>72.1</td></tr><tr><td>Pre-trained SLU</td><td>46.1</td><td>34.6</td><td>60.8</td><td>47.6</td><td>37.1</td><td>49.1</td><td>✘</td><td>✘</td><td>✘</td><td>68.7</td></tr></table>
|
| 112 |
+
|
| 113 |
+
Table 3: Performance of various SSL, supervised ASR, and SLU representations on the test set of SLUE tasks using various evaluation protocols in SLUE-PERB. The symbol $\pmb{x}$ indicates that the results were not computed, either due to the inability to perform summarization without a decoder or because fine-tuning representations on SQA-5 and SLUE-TED corpora is not feasible within our computational budget.
|
| 114 |
+
|
| 115 |
+
activation to compute the probability for each dialogue class and train the linear layer using binary cross entropy loss. During inference, classes with a probability greater than 0.5 are considered positive.
|
| 116 |
+
|
| 117 |
+
For sequence prediction and temporal alignment tasks like ASR, NER, NEL and QA, we pass the extracted features through a shallow encoder trained with CTC loss. NER and ASR models use a 2-layer conformer encoder as the prediction head and follow a similar input-output formulation as in Peng et al. (2023a). For NEL, following Shon et al. (2023), we perform greedy CTC decoding on the NER model to obtain frame-level alignments, which are used to get entity start and end timestamps. For the QA task, the input to the model is the concatenation of the question and document audio, and the output is the concatenation of the question and document transcript where the answer is delimited by a special character (See Sec. A.3). Since QA involves more complex language understanding, we use a 4-layer conformer encoder<sup>1</sup> and again get timestamps using greedy CTC decoding. We experimented with encoder-only CTC training for SUMM as well but found that coherent summaries cannot be produced without a decoder and, hence, we do not report results with a lightweight prediction head for SUMM.
|
| 118 |
+
|
| 119 |
+
Complex prediction head: The complex prediction head is an encoder-decoder architecture consisting of a 12-layer conformer encoder and a 6-layer transformer decoder, which takes as input the
|
| 120 |
+
|
| 121 |
+
weighted sum of representations from pre-trained speech models and outputs the SLU label sequence. For classification tasks, the SLU label sequence comprises the ASR transcript concatenated after the SLU class label, following prior work (Arora et al., 2022). The SLU label sequences for sequence generation and temporal alignment tasks are identical to those in the "lightweight prediction head". For the SUMM task, the TED talks are too long to fit in a GPU, and prior work (Sharma et al., 2023) has shown that very little performance is lost by using only the first 30 seconds of input audio in the SLUE-TED dataset. Hence, we truncate all the audios to 30 seconds since the TED talks were too long to fit in a GPU. Since we experiment with various SFMs using the same setup (i.e. using only 30-second input), we believe it is a fair comparison for gaining insights into the relative utility of various SFMs. Our approach can be extended to use more than 30 seconds of input by developing additional strategies to deal with long-form inputs, which will be an interesting future direction. We follow prior works (Shon et al., 2023) to first pre-train the model for ASR on the TEDLIUM-3 corpus, and then train the model for summarization on the SLUE-TED dataset.
|
| 122 |
+
|
| 123 |
+
Fine-tuned representations: The prediction head
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 1: Performance of various SSL SFMs with a lightweight prediction head on SLUE tasks.
|
| 127 |
+
|
| 128 |
+

|
| 129 |
+
Figure 2: Performance of various supervised ASR SFMs with a lightweight prediction head on SLUE tasks.
|
| 130 |
+
|
| 131 |
+
architecture and model inputs/outputs are identical to those of the "lightweight prediction head" setup for all the tasks. We omit the QA and SUMM tasks in this setting, as fine-tuning representations on the SQA-5 and SLUE-TED corpora is too computationally expensive.
|
| 132 |
+
|
| 133 |
+
# 5 Results
|
| 134 |
+
|
| 135 |
+
In this section, we analyze the performance of various SFMs on our performance leaderboard SLUEPERB, as detailed in Sec. 3. This analysis provides insights into the types of SFMs that prove most effective for complex understanding tasks and how this trend varies across tasks and modeling settings. Figs. 1-7 summarize our results. In all figures, bars with sparse stripes correspond to the "lightweight prediction head" setting, dense striped bars correspond to "complex prediction head", and solid bars correspond to "fine-tuned representations". Test and development set results for all experiments are shown in Tabs. 3 and 5 (in the Appendix) respectively.
|
| 136 |
+
|
| 137 |
+
# 5.1 Lightweight prediction head
|
| 138 |
+
|
| 139 |
+
What is the best SSL SFM for SLU? We first compare SSL SFMs using the "lightweight prediction head" evaluation protocol (Sec. 3.3) in Fig. 1. We observe that among all SSL models, WavLM features consistently demonstrate superior performance across all tasks, probably since it was pretrained on larger and more diverse corpora (see
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 3: Performance of best performing SSL and ASR SFMs with a lightweight prediction head on SLUE tasks. The label for each bar is the specific SFM chosen.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 4: ASR performance of SFMs with a lightweight prediction head on VoxCeleb and VoxPopuli datasets.
|
| 146 |
+
|
| 147 |
+
Tab. 2). We further observe that HuBERT features outperform Wav2Vec2 on all tasks except DAC. Prior work (Yang et al., 2021) has also noted the superior performance of WavLM and HuBERT's representations.
|
| 148 |
+
|
| 149 |
+
What is the best supervised SFM for SLU? Fig. 2 compares models that use supervised ASR SFMs and are trained with lightweight prediction heads. Our results show that while OWSM is slightly worse than Whisper on SA, NER, and NEL tasks, it significantly outperforms Whisper for DAC and QA. As shown in Tab. 2, the two models differ in encoder architecture (branchformer in OWSM (Peng et al., 2024b) vs. transformer in Whisper (Radford et al., 2022)), training objective (joint Connectionist Temporal Classification (CTC) loss in OWSM (Peng et al., 2024b)), and pre-training data, which may contribute to the difference in their downstream performance. Notably, Whisper performs significantly worse on QA. This may result from Whisper's pre-training on 30-second speech segments, while the input audiios for QA tasks are typically longer than 30 seconds. While OWSM is also pre-trained on 30 second segments, our results show that Whisper representations particularly struggle to perform well on longer utterances; we discuss this further in Sec. A.3.
|
| 150 |
+
|
| 151 |
+
SSL vs. supervised SFMs for SLU: Fig. 3 reports the performance of the best performing SSL and ASR SFMs using a lightweight prediction head. We can observe that supervised ASR SFMs exhibit the best performance on the classification
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 5: Performance of best performing SSL and ASR SFMs with complex prediction head on SLUE tasks. The label for each bar is the specific SFM chosen.
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 6: Performance of best performing SSL and ASR SFMs with fine-tuned representations on SLUE tasks. The label for each bar is the specific SFM chosen.
|
| 158 |
+
|
| 159 |
+
tasks (SA, DAC). Meanwhile, SSL SFMs, WavLM, demonstrate strong performance on temporal alignment and sequence generation tasks, comparable to or better than supervised ASR SFMs. Since SSL SFMs have an encoder-only architecture, the SLU tasks could leverage all the information learned during pre-training as we use the representations from all encoder layers. Supervised SFMs, on the other hand, employ an encoder-decoder architecture and may also retain semantic information within their decoder, which is not used for feature extraction in our experiments. We anticipate that SLU tasks could benefit from integrating the pre-trained decoder of supervised SFMs, although we leave this exploration to future work.
|
| 160 |
+
|
| 161 |
+
Additionally, Tab. 3 shows that the supervised SLU SFMs consistently underperform across all tasks, probably due to their much smaller pretraining data. However, they are comparable to SSL SFMs on DAC. This result may be attributed to the scripted nature of conversations in DAC, that resemble the scripted recordings in the SLURP data used for pre-training our SLU model.
|
| 162 |
+
|
| 163 |
+
We also report the ASR performance for the SLUE Phase-1 datasets in Fig. 4. Surprisingly, we observe that features extracted from supervised ASR SFMs exhibit worseWER than an SSL SFM, namely WavLM. As in sequence generation tasks, we speculate that this may be attributed to the use of representations from the encoder layers alone.
|
| 164 |
+
|
| 165 |
+
# 5.2 Do performance trends change with different modeling strategies?
|
| 166 |
+
|
| 167 |
+
Complex prediction head: Tab. 3 and Fig. 5 show the performance trends of models with a complex prediction head. We observe that the trends remain similar to the setting with simple prediction heads, where WavLM features consistently achieve the best performance across most tasks. Among supervised ASR SFMs, OWSM now outperforms Whisper on most tasks. SSL SFMs demonstrate slight superiority on most temporal alignment and sequence generation tasks, while supervised ASR SFMs excel on classification tasks (Fig. 5). We note a reduction in the performance gap between different SFMs compared to the lightweight prediction head setting. For example, all models now exhibit very similar performance on the SA task. Similarly for SUMM, the performance of all models is very close, but the models that use supervised ASR SFMs are slightly better, reinforcing prior work showing the benefits of ASR pre-training for SUMM (Sharma et al., 2023).
|
| 168 |
+
|
| 169 |
+
Fine-tuned representations: Similarly to the trends with frozen representations, Tab. 3 and Fig. 6 demonstrate that WavLM features continue to exhibit superior performance among SSL representations, while OWSM performs better than Whisper when we fine-tune SFMs. Additionally, Fig. 6 illustrates that even with complete fine-tuning of SFMs, SSL SFMs (WavLM) still performs optimally on sequence generation and temporal alignment tasks, whereas supervised ASR SFMs perform better or equally well on classification tasks.
|
| 170 |
+
|
| 171 |
+
# 6 Discussion
|
| 172 |
+
|
| 173 |
+
# 6.1 Is there an overall best model?
|
| 174 |
+
|
| 175 |
+
When comparing the performance between lightweight and complex prediction heads (refer to Figs. 3 and 5), we notice an improvement in performance across all SFMs and tasks. Upon closer examination, it becomes evident that the performance improvement is more pronounced for the SSL SFMs compared to supervised ASR SFMs on classification tasks, resulting in an overall decrease in the performance gap.
|
| 176 |
+
|
| 177 |
+
When comparing performance of frozen and finetuned representations under the lightweight prediction head protocol (Figs. 3 and 6), we generally observe an improvement in performance across all SFMs and tasks. However, a notable exception is observed with the supervised ASR SFMs, which
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 7: Performance of best performing SLUE-PERB results, best E2E model in SLUE toolkit (Shon et al., 2022, 2023) and SOTA on SLU tasks. SOTA results from *:(Shon et al., 2022), ∧:(Pasad et al., 2022), %:(Shon et al., 2023), #:(Sharma et al., 2023). Dense striped bars correspond to the "complex prediction head", and solid bars corresponds to "fine-tuned representations".
|
| 181 |
+
|
| 182 |
+
perform worse on the NER and NEL tasks. This discrepancy may be attributed to the presence of an excessive number of trainable parameters, especially for the OWSM model, when the entire supervised ASR encoder is fine-tuned.
|
| 183 |
+
|
| 184 |
+
We further compare the performance achieved by frozen representations with a complex prediction head (Fig. 5) against fine-tuned representations with a lightweight prediction head (Fig. 6). Interestingly, complex prediction heads demonstrate superior performance compared to fine-tuned representations across most tasks. However, for the DAC task, fine-tuning a pre-trained encoder yields better results across all SFMs.
|
| 185 |
+
|
| 186 |
+
Overall, our findings indicate that there is no universal optimal method for incorporating pretrained SFMs across all tasks. When we take both SFMs and prediction heads into consideration, the optimal SFMs and method of incorporating them is task-dependent for our complex SLU tasks. This is in contrast to some prior works (Yang et al., 2021), where a single model, WavLM, emerged as the universal best performing model.
|
| 187 |
+
|
| 188 |
+
# 6.2 Performance-compute tradeoffs
|
| 189 |
+
|
| 190 |
+
We also compare the training and inference efficiency of using a complex prediction head and finetuned representations, both of which outperform frozen representations with a lightweight prediction head. Models with a complex prediction head offer overall better performance, as well as greater training efficiency due to their significantly fewer trainable parameters (Tab. 6 in Appendix). However, it's important to note that the use of complex prediction heads leads to a substantial increase in inference time compared to simple prediction heads ( $>2.5\mathrm{x}$ for all tasks). In summary, employing a
|
| 191 |
+
|
| 192 |
+
complex prediction head is, in general, better when inference speed is not a bottleneck. On the other hand, if latency is a concern, fine-tuned representations with a lightweight prediction head serve as a good option, enhancing performance without compromising on inference time.
|
| 193 |
+
|
| 194 |
+
# 6.3 Training data tradeoffs
|
| 195 |
+
|
| 196 |
+
The SLUE benchmark comprises datasets with varying amounts of training data, which enables us to consider the effects of both low-resource settings and scenarios where we have sufficient labeled data ( $>200$ hours). We observe certain trends in the utility of SFMs for lower- vs. higher-resource tasks in Table 3. For example, the DAC task, with only 7 hours of training data, has the smallest training set. Supervised SFMs appear to be particularly beneficial for DAC across all settings incorporating pre-trained representations. Conversely, for tasks with more abundant labeled data, such as SQA and SUMM, we observe a narrower performance gap between different SFMs. Interestingly, in some cases, SSL SFMs like WavLM even outperform supervised SFMs. We plan to perform a more thorough examination of the effects of varying data size within each task in future work.
|
| 197 |
+
|
| 198 |
+
# 6.4 Comparison with SOTA and E2E baseline
|
| 199 |
+
|
| 200 |
+
Fig. 7 compares the best results in our SLUE-PERB benchmark with the best E2E results in the original SLUE toolkit (Shon et al., 2022, 2023) and SOTA results published in prior works. The best performing E2E models in our benchmark either outperform or achieve comparable performance to existing E2E baselines in the SLUE toolkit. For SA, the SOTA results (Shon et al., 2022) are obtained by a pipeline consisting of an ASR system,
|
| 201 |
+
|
| 202 |
+
fine-tuned from Wav2Vec2-large, and a NLU system fine-tuned from Deberta-large, on the SLUE-Voxceleb dataset. It is notable that the SOTA results significantly outperform the SLUE-PERB results, likely due to a significantly larger number of trainable parameters (700 million vs. 32.41 million in our best model), as well as stronger semantic processing ability due to the incorporation of a large pre-trained text encoder. Regarding ASR tasks, we achieve similar performance to SOTA results (Shon et al., 2022), and the small performance difference can be attributed to the fact that SOTA models use external language models (LMs) during decoding.
|
| 203 |
+
|
| 204 |
+
For NER and NEL tasks, the SOTA results (Pasad et al., 2022) perform better than our benchmark models since they leverage external speech and text data to significantly boost performance. There is a significant difference between SOTA results and our best performing benchmark model for QA tasks. The SOTA model (Shon et al., 2023) is a pipeline system similar to the SOTA SA model. We hypothesize that the performance gap can be attributed to a larger number of trainable parameters (700 million vs. 32.41 million for in best model) as well as the fact that QA is the most semantically challenging among all SLUE tasks and, hence, greatly benefits from incorporating an LM. For SUMM, the SOTA results (Sharma et al., 2023) are achieved by using Whisper-base as the ASR model and a fine-tuned T5-base model for text summarization. The SOTA results outperform our best results, potentially because we do not incorporate a pre-trained LM. We also demonstrate that we outperform the current SOTA (Shon et al., 2023) on DAC despite having fewer trainable parameters (700M in the SOTA pipeline model vs. 561.91M in our best model).
|
| 205 |
+
|
| 206 |
+
These findings highlight that the benchmark models are strong baseline E2E models and outperform typical E2E baselines reported in prior work (Shon et al., 2022, 2023). By giving open access to these strong baselines as part of SLUEPERB, we facilitate faster research and development on SLUE tasks. We further show that E2E models can outperform pipeline systems for certain tasks despite having fewer trainable parameters, indicating that the utility of pre-trained LMs is task-dependent. However, pipeline SOTA models currently outperform end-to-end models on semantically challenging SLU tasks like QA and SA. Hence, we plan to extend our benchmark to include pipeline systems in future work to further explore
|
| 207 |
+
|
| 208 |
+
their effectiveness.
|
| 209 |
+
|
| 210 |
+
# 7 Conclusion
|
| 211 |
+
|
| 212 |
+
In this paper, we address the lack of performance benchmarks for evaluating pre-trained SFMs on SLU tasks. We introduce SLUE-PERB to compare multiple pre-trained SSL and supervised SFMs on complex SLU tasks. Our experiments demonstrate that supervised ASR SFMs like OWSM produce the best performing representations for classification tasks, while SSL SFMs like WavLM can outperform or perform comparably to supervised ASR SFMs on temporal alignment and sequence generation tasks. The trends generally remain similar across different evaluation settings, but the performance gap between different SFMs decreases as we increase the size of the prediction head or finetune the SFMs. We also find that while there is no universal best approach for incorporating SFMs, a complex prediction head gives the best performance for most tasks, at the price of higher inference latency.
|
| 213 |
+
|
| 214 |
+
In addition to providing guidance for researchers working on SLU tasks, we believe that our findings will spark innovation in developing SFMs for SLU tasks. (i) SSL SFM representations either outperform or perform comparably to supervised SFM representations for sequence generation tasks. This suggests that supervised SFMs, which employ an encoder-decoder architecture, may retain meaningful information within their decoder, which is not straightforward to use for feature extraction. Hence, developing encoder-only supervised SFMs (Peng et al., 2024a) could be a promising future research direction. (ii) SFMs like Whisper demonstrate notably poor performance on QA since Whisper's pretraining is on 30-second speech segments, while the input audios for QA tasks are typically longer than 30 seconds. This suggests the need for SFMs pre-trained on longer speech utterances (Chen et al., 2024). (iii) Using a complex prediction head with a frozen SFM outperforms full fine-tuning on most tasks, which suggests the exploration of modeling strategies that can utilize SFMs without significantly changing the pre-trained parameters, such as using parameter-efficient tuning approaches (Hu et al., 2022). By making all our code public, we aim to facilitate future research and development on SLUE tasks. In future work, we plan to extend SLUE-PERB to include more data and models, including pipeline systems.
|
| 215 |
+
|
| 216 |
+
# Limitations
|
| 217 |
+
|
| 218 |
+
Our approach currently uses only the encoder of the supervised SFMs to generate speech representations. A potential limitation is that supervised SFMs are encoder-decoder architectures and may also retain some information within their decoder, which is currently not being used in generating speech representations. We plan to delve deeper into generating representations from the pre-trained decoders in future work. Fig. 7 also illustrates that pipeline models incorporating large pre-trained text encoders can outperform E2E SLU models on many tasks. Hence, a limitation of our benchmark is that we currently do not include pipeline systems, and we plan to extend our benchmark to incorporate these systems in future work. Further, we observe that full fine-tuning of SFMs might be too computationally expensive for some tasks, and we plan to explore the efficacy of parameter-efficient fine-tuning approaches in future work.
|
| 219 |
+
|
| 220 |
+
# Broader Impact and Ethics
|
| 221 |
+
|
| 222 |
+
In this work, we compare various SFMs on many complex SLU tasks and gain insights on which SFMs perform the best and what is the optimal way of incorporating SFMs in E2E SLU systems. Our investigations aim to provide valuable insights to researchers regarding which SFMs are best suited for their experiments and how to achieve optimal performance with minimal experimentation. Further, by incorporating SFMs, they can perform the task with a significantly smaller number of trainable parameters and without the need for large amounts of task-specific labeled data. Additionally, we adhere to the ACL Ethics Policy. Our experiments are based on open-source datasets with no violation of privacy, and we will make all our code and models publicly available.
|
| 223 |
+
|
| 224 |
+
# Acknowledgement
|
| 225 |
+
|
| 226 |
+
Experiments in this work used the Bridges2 system at PSC and Delta system at NCSA through allocations CIS210014 and IRI120008P from the Advanced Cyberinfrastructure Coordination Ecosystem: Services & Support (ACCESS) program, supported by National Science Foundation grants #2138259,#tel:2138286,#tel:2138307,#tel:2137603,and #tel:2138296.
|
| 227 |
+
|
| 228 |
+
# References
|
| 229 |
+
|
| 230 |
+
Siddhant Arora, Siddharth Dalmia, Pavel Denisov, Xuankai Chang, Yushi Ueda, Yifan Peng, Yuekai Zhang, Sujay Kumar, Karthik Ganesan, Brian Yan, Ngoc Thang Vu, Alan W. Black, and Shinji Watanabe. 2022. ESPnet-SLU: Advancing spoken language understanding through espnet. In IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2022, Virtual and Singapore, 23-27 May 2022, pages 7167-7171. IEEE.
|
| 231 |
+
Siddhant Arora, Hayato Futami, Jee-weon Jung, Yifan Peng, Roshan S. Sharma, Yosuke Kashiwagi, Emiru Tsunoo, and Shinji Watanabe. 2023a. Universlu: Universal spoken language understanding for diverse classification and sequence generation tasks with a single network. CoRR, abs/2310.02973.
|
| 232 |
+
Siddhant Arora, Hayato Futami, Shih-Lun Wu, Jessica Huynh, Yifan Peng, Yosuke Kashiwagi, Emiru Tsunoo, Brian Yan, and Shinji Watanabe. 2023b. A study on the integration of pipeline and e2e slu systems for spoken semantic parsing toward stop quality challenge. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-2. IEEE.
|
| 233 |
+
Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. 2020. wav2vec 2.0: A framework for self-supervised learning of speech representations. Proc. NeurIPS.
|
| 234 |
+
Emanuele Bastianelli, Andrea Vanzo, Pawel Swietojanski, and Verena Rieser. 2020. SLURP: A spoken language understanding resource package. In Proc. EMNLP.
|
| 235 |
+
Frédéric Béchet, Allen L. Gorin, Jeremy H. Wright, and Dilek Hakkani-Tür. 2004. Detecting and extracting named entities from spontaneous speech in a mixed-initiative spoken dialogue context: How may I help you?<sup>sm, tm</sup>. Speech Commun., 42(2):207-225.
|
| 236 |
+
C. Busso, M. Bulut, C. Lee, A. Kazemzadeh, E. Mower, S. Kim, J. Changa, S. Lee, and S. Narayanan. 2008. IEMOCAP: Interactive emotional dyadic motion capture database. Proc. LREC, 42(4):335-359.
|
| 237 |
+
Eric Chen, Zhiyun Lu, Hao Xu, Liangliang Cao, Yu Zhang, and James Fan. 2020. A large scale speech sentiment corpus. In Proc. LREC.
|
| 238 |
+
Guoguo Chen, Shuzhou Chai, Guanbo Wang, Jiayu Du, Wei-Qiang Zhang, Chao Weng, Dan Su, Daniel Povey, Jan Trmal, Junbo Zhang, et al. 2021a. GigaSpeech: An evolving, multi-domain ASR corpus with 10,000 hours of transcribed audio. arXiv preprint arXiv:2106.06909.
|
| 239 |
+
Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, et al. 2021b. WavLM: Large-scale self-supervised pre-training for full stack speech processing. arXiv preprint arXiv:2110.13900.
|
| 240 |
+
|
| 241 |
+
William Chen, Takatomo Kano, Atsunori Ogawa, Marc Delcroix, and Shinji Watanabe. 2024. Train long and test long: leveraging full document contexts in speech processing. In ICASSP 2024 - 2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 13066-13070.
|
| 242 |
+
Chung-Ming Chien, Mingjiamei Zhang, Ju-Chieh Chou, and Karen Livescu. 2023. Few-shot spoken language understanding via joint speech-text models. In 2023 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), pages 1-8. IEEE.
|
| 243 |
+
Ju-Chieh Chou, Chung-Ming Chien, Wei-Ning Hsu, Karen Livescu, Arun Babu, Alexis Conneau, Alexei Baevski, and Michael Auli. 2023. Toward joint language modeling for speech units and text. arXiv preprint arXiv:2310.08715.
|
| 244 |
+
Alice Coucke, Alaa Saade, Adrien Ball, Theodore Bluche, Alexandre Caulier, David Leroy, Clément Doumouro, Thibault Gisselbrecht, Francesco Caltagirone, Thibaut Lavril, et al. 2018. Snips voice platform: an embedded spoken language understanding system for private-by-design voice interfaces. arXiv preprint arXiv:1805.10190.
|
| 245 |
+
Miguel Del Rio, Natalie Delworth, Ryan Westerman, Michelle Huang, Nishchal Bhandari, Joseph Palakapilly, Quinten McNamara, Joshua Dong, Piotr Želasko, and Miguel Jette. 2021. Earnings-21: A practical benchmark for ASR in the wild. In Proc. Interspeech.
|
| 246 |
+
S. Ghannay, A. Caubriere, Y. Esteve, N. Camelin, E. Simonnet, A. Laurent, and E. Morin. 2019. End-To-End Named Entity and Semantic Concept Extraction from Speech. In SLT.
|
| 247 |
+
S. Ghannay, A. Caubrière, Y. Esteve, N. Camelin, E. Simonnet, A. Laurent, and E. Morin. 2018. End-to-end named entity and semantic concept extraction from speech. In 2018 IEEE Spoken Language Technology Workshop (SLT), pages 692-699.
|
| 248 |
+
Yuan Gong, Sameer Khurana, Leonid Karlinsky, and James Glass. 2023. Whisper-at: Noise-robust automatic speech recognizers are also strong general audio event taggers. arXiv preprint arXiv:2307.03183.
|
| 249 |
+
James Horlock and Simon King. 2003. Discriminative methods for improving named entity extraction on speech data. In Proc. 8th European Conference on Speech Communication and Technology (Eurospeech 2003), pages 2765-2768.
|
| 250 |
+
Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, and Abdelrahman Mohamed. 2021. HuBERT: Self-supervised speech representation learning by masked prediction of hidden units. IEEE Trans. Audio, Speech, Lang. Process., 29:3451-3460.
|
| 251 |
+
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
|
| 252 |
+
|
| 253 |
+
large language models. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net.
|
| 254 |
+
Tahir Javed, Kaushal Santosh Bhogale, Abhigyan Raman, Pratyush Kumar, Anoop Kunchukuttan, and Mitesh M. Khapra. 2023. Indicsuperb: A speech processing universal performance benchmark for indian languages. 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 12942-12950. AAAI Press.
|
| 255 |
+
Jacob Kahn, Morgane Riviere, Weiyi Zheng, Evgeny Kharitonov, Qiantong Xu, Pierre-Emmanuel Mazaré, Julien Karadayi, Vitaliy Liptchinsky, Ronan Collobert, Christian Fuegen, et al. 2020. Libri-Light: A benchmark for ASR with limited or no supervision. In Proc. ICASSP.
|
| 256 |
+
Arne Kohn, Florian Stegen, and Timo Baumann. 2016. Mining the spoken wikipedia for speech data and beyond. In Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16), pages 4644-4647.
|
| 257 |
+
Chia-Hsuan Li, Szu-Lin Wu, Chi-Liang Liu, and Hung-yi Lee. 2018. Spoken squad: A study of mitigating the impact of speech recognition errors on listening comprehension. In Interspeech.
|
| 258 |
+
Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics.
|
| 259 |
+
Loren Lusosch, Mirco Ravanelli, Patrick Ignoto, Vikrant Singh Tomar, and Yoshua Bengio. 2019. Speech model pre-training for end-to-end spoken language understanding. In Proc. Interspeech.
|
| 260 |
+
Abdelrahman Mohamed, Hung-yi Lee, Lasse Borgholt, Jakob D Havtorn, et al. 2022. Self-supervised speech representation learning: A review. IEEE Journal of Selected Topics in Signal Processing (JSTSP).
|
| 261 |
+
Rafael Müller, Simon Kornblith, and Geoffrey E Hinton. 2019. When does label smoothing help? Advances in neural information processing systems, 32.
|
| 262 |
+
Daniel Ortega and Ngoc Thang Vu. 2018. Lexico-acoustic neural-based models for dialog act classification. In Proc. ICASSP.
|
| 263 |
+
Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairoseq: A fast, extensible toolkit for sequence modeling*. In *Proceedings of NAACL-HLT* 2019: Demonstrations.
|
| 264 |
+
David D. Palmer and Mari Ostendorf. 2001. Improving information extraction by modeling errors in speech
|
| 265 |
+
|
| 266 |
+
recognizer output. In Proceedings of the First International Conference on Human Language Technology Research.
|
| 267 |
+
Titouan Parcollet, Ha Nguyen, Solene Evain, Marcely Zanon Boito, Adrien Pupier, Salima Mdhaffar, Hang Le, Sina Alisamir, Natalia Tomashenko, Marco Dinarelli, Shuong Zhang, Alexandre Allauzen, Maximin Coavoux, Yannick Esteve, Mickael Rouvier, Jerome Goulian, Benjamin Lecouteux, Francois Portet, Solange Rossato, Fabien Ringeval, Didier Schwab, and Laurent Besacier. 2023. Lebenchmark 2.0: a standardized, replicable and enhanced framework for self-supervised representations of french speech.
|
| 268 |
+
Daniel S. Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D. Cubuk, and Quoc V. Le. 2019. Specaugment: A simple data augmentation method for automatic speech recognition. In *Interspeech*, pages 2613-2617.
|
| 269 |
+
Ankita Pasad, Felix Wu, Suwon Shon, Karen Livescu, and Kyu Han. 2022. On the use of external data for spoken named entity recognition. In NAACL-HLT.
|
| 270 |
+
Yifan Peng, Siddhant Arora, Yosuke Higuchi, Yushi Ueda, Sujay Kumar, Karthik Ganesan, Siddharth Dalmia, Xuankai Chang, and Shinji Watanabe. 2023a. A study on the integration of pre-trained ssl, asr, lm and slu models for spoken language understanding. In 2022 IEEE Spoken Language Technology Workshop (SLT), pages 406-413.
|
| 271 |
+
Yifan Peng, Yui Sudo, Muhammad Shakeel, and Shinji Watanabe. 2024a. Owsm-ctc: An open encoder-only speech foundation model for speech recognition, translation, and language identification.
|
| 272 |
+
Yifan Peng, Jinchuan Tian, William Chen, Siddhant Arora, Brian Yan, Yui Sudo, Muhammad Shakeel, Kwanghee Choi, Jiatong Shi, Xuankai Chang, et al. 2024b. Owsm v3.1: Better and faster open whisper-style speech models based on e-branchformer. arXiv preprint arXiv:2401.16658.
|
| 273 |
+
Yifan Peng, Jinchuan Tian, Brian Yan, Dan Berrebbi, Xuankai Chang, Xinjian Li, Jiatong Shi, Siddhant Arora, William Chen, Roshan Sharma, Wangyou Zhang, Yui Sudo, Muhammad Shakeel, Jee weon Jung, Soumi Maiti, and Shinji Watanabe. 2023b. Reproducing whisper-style training using an opensource toolkit and publicly available data.
|
| 274 |
+
Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever. 2022. Robust speech recognition via large-scale weak supervision. CoRR, abs/2212.04356.
|
| 275 |
+
Alaa Saade, Alice Coucke, Alexandre Caulier, Joseph Dureau, Adrien Ball, Théodore Bluche, David Leroy, Clément Doumouro, Thibault Gisselbrecht, Francesco Caltagirone, et al. 2018. Spoken language understanding on the edge. arXiv preprint arXiv:1810.12735.
|
| 276 |
+
|
| 277 |
+
Steffen Schneider, Alexei Baevski, Ronan Collobert, and Michael Auli. 2019. wav2vec: Unsupervised pre-training for speech recognition. In Interspeech 2019, 20th Annual Conference of the International Speech Communication Association, Graz, Austria, 15-19 September 2019, pages 3465-3469. ISCA.
|
| 278 |
+
Roshan Sharma, William Chen, Takatomo Kano, Ruchira Sharma, Atsunori Ogawa, Siddhant Arora, Marc Delcroix, Rita Singh, Shinji Watanabe, and Bhiksha Raj. 2023. ESPNET-SUMM: Introducing a novel large dataset, toolkit, and a cross-corpora evaluation of speech summarization systems. In ASRU 2023.
|
| 279 |
+
Roshan Sharma, Shruti Palaskar, Alan W Black, and Florian Metze. 2022. End-to-end speech summarization using restricted self-attention. In ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 8072-8076.
|
| 280 |
+
Jiatong Shi, Dan Berrebbi, William Chen, En-Pei Hu, Wei-Ping Huang, Ho-Lam Chung, Xuankai Chang, Shang-Wen Li, Abdelrahman Mohamed, Hung yi Lee, and Shinji Watanabe. 2023. MLSUPERB: Multilingual Speech Universal PERformance Benchmark. In Proc. INTERSPEECH 2023, pages 884-888.
|
| 281 |
+
Suwon Shon, Siddhant Arora, Chyi-Jiunn Lin, Ankita Pasad, Felix Wu, Roshan S Sharma, Wei-Lun Wu, Hung-yi Lee, Karen Livescu, and Shinji Watanabe. 2023. SLUE phase-2: A benchmark suite of diverse spoken language understanding tasks. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8906-8937, Toronto, Canada. Association for Computational Linguistics.
|
| 282 |
+
Suwon Shon, Ankita Pasad, Felix Wu, Pablo Brusco, Yoav Artzi, Karen Livescu, and Kyu J. Han. 2022. Slue: New benchmark tasks for spoken language understanding evaluation on natural speech. In ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 7927-7931.
|
| 283 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929-1958.
|
| 284 |
+
Andreas Stolcke, Klaus Ries, Noah Coccaro, Elizabeth Shriberg, Rebecca Bates, et al. 2000. Dialogue act modeling for automatic tagging and recognition of conversational speech. Computational Linguistics, 26(3):339-371.
|
| 285 |
+
Hsiang-Sheng Tsai, Heng-Jui Chang, Wen-Chin Huang, Zili Huang, et al. 2022. Superb-sg: Enhanced speech processing universal performance benchmark for semantic and generative capabilities. In Association for Computational Linguistics (ACL).
|
| 286 |
+
|
| 287 |
+
Yuan Tseng, Layne Berry, Yi-Ting Chen, I-Hsiang Chiu, Hsuan-Hao Lin, Max Liu, Puyuan Peng, Yi-Jen Shih, Hung-Yu Wang, Haibin Wu, Po-Yao Huang, ChunMao Lai, Shang-Wen Li, David Harwath, Yu Tsao, Shinji Watanabe, Abdelrahman Mohamed, Chi-Luen Feng, and Hung yi Lee. 2023. Av-superb: A multitask evaluation benchmark for audio-visual representation models.
|
| 288 |
+
Changhan Wang, Morgane Riviere, Ann Lee, Anne Wu, Chaitanya Talnikar, Daniel Haziza, Mary Williamson, Juan Pino, and Emmanuel Dupoux. 2021. VoxPopuli: A large-scale multilingual speech corpus for representation learning, semi-supervised learning and interpretation. arXiv preprint arXiv:2101.00390.
|
| 289 |
+
Felix Wu, Kwangyoun Kim, Shinji Watanabe, Kyu J. Han, Ryan McDonald, Kilian Q. Weinberger, and Yoav Artzi. 2023. Wav2seq: Pre-training speech-to-text encoder-decoder models using pseudo languages. In ICASSP 2023 - 2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5.
|
| 290 |
+
Shu-Wen Yang, Po-Han Chi, Yung-Sung Chuang, Cheng-I Jeff Lai, Kushal Lakhotia, Yist Y. Lin, Andy T. Liu, Jiatong Shi, Xuankai Chang, Guan-Ting Lin, Tzu-Hsien Huang, Wei-Cheng Tseng, Ko-tik Lee, Da-Rong Liu, Zili Huang, Shuyan Dong, Shang-Wen Li, Shinji Watanabe, Abdelrahman Mohamed, and Hung-yi Lee. 2021. SUPERB: speech processing universal performance benchmark. In Interspeech 2021, 22nd Annual Conference of the International Speech Communication Association, Brno, Czechia, 30 August - 3 September 2021, pages 1194-1198. ISCA.
|
| 291 |
+
Dian Yu, Michelle Cohn, Yi Mang Yang, Chun-Yen Chen, Weiming Wen, et al. 2019. Gunrock: A social bot for complex and engaging long conversations. In Proc. EMNLP-IJCNLP: System Demonstrations.
|
| 292 |
+
Salah Zaiem, Youcef Kemiche, Titouan Parcollet, Slim Essid, and Mirco Ravanelli. 2023a. Speech self-supervised representation benchmarking: Are we doing it right? arXiv preprint arXiv:2306.00452.
|
| 293 |
+
Salah Zaiem, Youcef Kemiche, Titouan Parcollet, Slim Essid, and Mirco Ravanelli. 2023b. Speech self-supervised representations benchmarking: a case for larger probing heads. arXiv preprint arXiv:2308.14456.
|
| 294 |
+
Tianyi Zhang*, Varsha Kishore*, Felix Wu*, Kilian Q. Weinberger, and Yoav Artzi. 2020. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations.
|
| 295 |
+
|
| 296 |
+
# A Appendix
|
| 297 |
+
|
| 298 |
+
# A.1 Model details
|
| 299 |
+
|
| 300 |
+
Wav2Vec2 (Baevski et al., 2020) is a SSL speech model which employs a contrastive loss during pre-training and has shown improvements in large-scale ASR.
|
| 301 |
+
|
| 302 |
+
HuBERT (Hsu et al., 2021) is another SSL model that predicts discrete targets of masked speech regions, similar to the masked language model objective.
|
| 303 |
+
|
| 304 |
+
WavLM (Chen et al., 2021b) expands on HuBERT by increasing pre-training data and adopting a masked speech denoising and prediction framework.
|
| 305 |
+
|
| 306 |
+
Whisper (Radford et al., 2022) is one large speech foundation model that has been pre-trained on huge amounts of labeled data for ASR and speech translation (ST) tasks.
|
| 307 |
+
|
| 308 |
+
OWSM (Peng et al., 2023b, 2024b) is a reproduction of Whisper using publicly available data and open-source toolkits.
|
| 309 |
+
|
| 310 |
+
# A.2 Datasets, Tasks and Metrics
|
| 311 |
+
|
| 312 |
+
All the datasets are released under Creative Common license to give the best freedom of use.
|
| 313 |
+
|
| 314 |
+
SLUE-VoxCeleb (Shon et al., 2022): SLUE-VoxCeleb is constructed from YouTube videos. In this dataset, each spoken utterance is labeled with one of three sentiment classes: positive, negative, and neutral. To assess SA performance, we calculate macro-averaged F1 scores.
|
| 315 |
+
|
| 316 |
+
SLUE-Voxpopuli (Shon et al., 2022, 2023): SLUE-Voxpopuli consists of European Parliament event recordings. It includes 7 named-entity tags and 13 sub-tags (fine-grained tagging labels). Prior work (Shon et al., 2023) extends SLUE-VoxPopuli to also evaluate NEL systems by including word-level timestamps for entities. NEL performance is evaluated either as a frame-level overlap between the predicted and the ground-truth entity spans and is reported as an F1 score (frame-F1), tuned with an offset hyperparameter (Shon et al., 2023). The NEL evaluation is purely based on the time stamps and does not consider the entity tags or the entity phrases. Complementary to NEL, NER performance is evaluated on the predicted named entity phrase and the corresponding tags using a micro-averaged F1 score (Ghannay et al., 2019; Shon et al., 2022). In addition, we also report label-F1 that only considers the tag predictions and excuses
|
| 317 |
+
|
| 318 |
+
misspellings or segmentation errors in the decoded text.
|
| 319 |
+
|
| 320 |
+
SLUE-HVB (Shon et al., 2023): HarperValley-Bank corpus consists of scripted dialogues between bank employees and customers. The dialog act labels in SLUE-HVB include 5 actions and 18 subactions (fine-grained labeling scheme). We evaluate DAC on the fine-grained labeling scheme using macro-averaged (unweighted) F1 score.
|
| 321 |
+
|
| 322 |
+
SLUE-SQA-5 (Shon et al., 2023): SLUE-SQA-5 is a spoken question answering (QA) corpus where both document and question consist of real speech data. The question-answer pairs are collected from the text QA dataset; spoken documents are collected from the Spoken Wikipedia dataset (Kohn et al., 2016) whereas the spoken versions of questions are obtained by crowdsourcing. Similar to NEL, we measure the performance using the frame-F1 score.
|
| 323 |
+
|
| 324 |
+
SLUE-TED (Shon et al., 2023): SLUE-TED is a corpus of summaries for TED-talks. The ground truth summary is obtained by concatenating the title and abstract of TED talks, which are publicly available. We evaluate summarisation performance using ROUGE (Lin, 2004) and BERTScore (Zhang* et al., 2020).
|
| 325 |
+
|
| 326 |
+
# A.3 Experimental Setups
|
| 327 |
+
|
| 328 |
+
All our experiments are conducted with ESPnet-SLU toolkit (Arora et al., 2022). We apply SpecAugment (Park et al., 2019) and use dropout (Srivastava et al., 2014) and label smoothing (Müller et al., 2019) techniques. The models are trained using an NVIDIA A40 (40GB) GPU. All model, training, and inference parameters are selected based on validation performance. Table 4 shows training and inference hyperparameters for our hyperparameter search. We perform extensive tuning of training parameters, particularly warmup and learning rate. Full details about models, configuration files, and data preparation will be made publicly available prior to publication.
|
| 329 |
+
|
| 330 |
+
Lightweight prediction head: For classification tasks, the prediction head is a linear classifier that takes in the pooled representations as discussed in Sec. 4. The output of the classifier layer is the number of classes, which is 3 for SA and 18 for DAC. For NER and NEL, the output is the text transcript, where entity phrases are delimited by entity tags and special characters. An example of NER label sequence is "we welcome ORG FILL parliament SEP's agreement" where "ORG" is the
|
| 331 |
+
|
| 332 |
+
entity tag, "parliament" is the entity mention, and FILL and SEP are special characters.
|
| 333 |
+
|
| 334 |
+
For QA, the input is the concatenation of the question and document audio, and the output is the concatenation of the question and document transcript, where special characters again delimit the answer. An example output sequence is "who is the present quarterback of the broncos SEP nature and persistence of the tennessee volunteers quarterback at the time ANS peyton manning ANS having ..." where the "SEP" token separate the question and document transcript and "peyton manning" is the answer to the question delimited by special tokens "ANS". Since each spoken document is nearly 40 seconds long, we cannot use Whisper's original sinusoid positional embedding since it cannot accept inputs greater than 30 seconds. Hence, we defined our own sinusoid positional embedding that can accept inputs that are as long as 2 minutes to generate speech representations from the Whisper encoder. Since sinusoid positional embedding does not have any parameters, we believe that our modeling design should not affect the quality of generated speech representations. The architecture of the prediction head for NER and QA are shallow conformer encoders trained with CTC loss, as described in Sec. 4.
|
| 335 |
+
|
| 336 |
+
Complex prediction head: The architecture of the complex prediction head is an encoder-decoder architecture consisting of a 12-layer conformer encoder and a 6-layer transformer decoder. For SUMM task, the output is the concatenation of the title and abstract of TED talks, which are publicly available. An example of SUMM label sequence is "what it's like to be a parent in a war zone [sep] how do parents protect their children and help them feel secure again . . .". Further, for SQA, we obtain the answer tokens from the decoder and then get the timestamps for the answer tokens from greedy CTC decoding. The inference setting for all other non-classification tasks is the same as that with the "Lightweight prediction head".
|
| 337 |
+
|
| 338 |
+
Fine-tuned representations: The architecture of the prediction head is the same as the lightweight prediction head; however, now the pre-trained speech representations are also fine-tuned. Similar to prior work (Baevski et al., 2020; Hsu et al., 2021; Chen et al., 2021b), the convolutional feature encoder layers for SSL SFMs are kept frozen.
|
| 339 |
+
|
| 340 |
+
<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Convolution Subsampling</td><td>[1/2x, 1/4x]</td></tr><tr><td>Dropout Rate</td><td>[0, 0.1, 0.2]</td></tr><tr><td>LR schedule</td><td>[inv. sqrt., exp. lr.]</td></tr><tr><td>Max learning rate</td><td>[1e-1, 1e-2, 5e-3, 1e-3, 4e-4, 1e-4, 1e-5, 1e-6]</td></tr><tr><td>Warmup steps</td><td>[2500, 5000, 10000]</td></tr><tr><td>Number of epochs</td><td>[30, 50, 70]</td></tr><tr><td>Adam eps</td><td>1e-8</td></tr><tr><td>Adam betas</td><td>(0.9, 0.999)</td></tr><tr><td>Weight decay</td><td>[1e-5, 1e-6, 1e-7]</td></tr><tr><td>Beam Size</td><td>[1, 2, 10]</td></tr><tr><td>Length Penalty</td><td>[0, 0.1]</td></tr><tr><td>CTC weight</td><td>[0.0, 0.3]</td></tr></table>
|
| 341 |
+
|
| 342 |
+
Table 4: Training and inference hyper-parameter search for SLUE-PERB Models.
|
| 343 |
+
|
| 344 |
+
<table><tr><td rowspan="2">Evaluation
|
| 345 |
+
Protocol</td><td rowspan="2">Pre-Trained
|
| 346 |
+
Model</td><td colspan="2">SLUE-VoxCeleb</td><td colspan="4">SLUE-VoxPopuli</td><td>SQA-5</td><td colspan="2">SLUE-TED</td><td>SLUE-HVB</td></tr><tr><td>SA
|
| 347 |
+
F1 ↑</td><td>ASR
|
| 348 |
+
WER ↓</td><td>NER
|
| 349 |
+
Label F1 ↑</td><td>F1 ↑</td><td>ASR
|
| 350 |
+
WER ↓</td><td>NEL
|
| 351 |
+
Frame F1 ↑</td><td>QA
|
| 352 |
+
Frame F1 ↑</td><td>SUMM
|
| 353 |
+
ROUGE-L ↑</td><td>BERTScore ↑</td><td>DAC
|
| 354 |
+
F1 ↑</td></tr><tr><td rowspan="6">Lightweight
|
| 355 |
+
prediction
|
| 356 |
+
head</td><td>HuBERT (large)</td><td>37.2</td><td>16.2</td><td>81.8</td><td>64.6</td><td>13.8</td><td>70.9</td><td>14.3</td><td>X</td><td>X</td><td>46.7</td></tr><tr><td>Wav2Vec2 (large)</td><td>40.0</td><td>18.7</td><td>79.9</td><td>64.5</td><td>15.4</td><td>68.4</td><td>6.7</td><td>X</td><td>X</td><td>50.6</td></tr><tr><td>WavLM (large)</td><td>38.9</td><td>11.8</td><td>87.4</td><td>71.4</td><td>10.2</td><td>74.1</td><td>18.9</td><td>X</td><td>X</td><td>53.5</td></tr><tr><td>Whisper (medium)</td><td>44.7</td><td>13.0</td><td>85.8</td><td>68.9</td><td>12.0</td><td>73.5</td><td>0.4</td><td>X</td><td>X</td><td>57.2</td></tr><tr><td>OWSM (3.1)</td><td>42.2</td><td>14.9</td><td>84.6</td><td>69.2</td><td>12.6</td><td>73.1</td><td>15.0</td><td>X</td><td>X</td><td>69.1</td></tr><tr><td>Pre-trained SLU</td><td>36.6</td><td>44.6</td><td>66.6</td><td>50.8</td><td>37.7</td><td>52.2</td><td>2.2</td><td>X</td><td>X</td><td>56.6</td></tr><tr><td rowspan="6">Complex
|
| 357 |
+
prediction
|
| 358 |
+
head</td><td>HuBERT (large)</td><td>46.9</td><td>12.8</td><td>84.6</td><td>69.4</td><td>12.6</td><td>72.7</td><td>25.6</td><td>16.1</td><td>83.4</td><td>62.8</td></tr><tr><td>Wav2Vec2 (large)</td><td>46.5</td><td>14.3</td><td>83.1</td><td>68.9</td><td>13.1</td><td>74.0</td><td>22.1</td><td>16.3</td><td>83.3</td><td>67.0</td></tr><tr><td>WavLM (large)</td><td>47.8</td><td>9.6</td><td>87.9</td><td>74.1</td><td>9.5</td><td>74.7</td><td>25.2</td><td>16.7</td><td>83.4</td><td>70.7</td></tr><tr><td>Whisper (medium)</td><td>45.2</td><td>12.8</td><td>86.1</td><td>69.9</td><td>12.7</td><td>73.9</td><td>2.0</td><td>16.3</td><td>83.7</td><td>69.4</td></tr><tr><td>OWSM (3.1)</td><td>46.8</td><td>14.0</td><td>84.8</td><td>72.2</td><td>12.0</td><td>70.7</td><td>23.7</td><td>16.6</td><td>83.7</td><td>73.5</td></tr><tr><td>Pre-trained SLU</td><td>45.2</td><td>33.5</td><td>73.8</td><td>61.0</td><td>27.5</td><td>57.8</td><td>4.2</td><td>15.8</td><td>83.1</td><td>66.8</td></tr><tr><td rowspan="6">Fine-tuning
|
| 359 |
+
representations</td><td>HuBERT (large)</td><td>42.4</td><td>12.3</td><td>84.3</td><td>68.2</td><td>11.6</td><td>73.0</td><td>X</td><td>X</td><td>X</td><td>73.8</td></tr><tr><td>Wav2Vec2 (large)</td><td>41.8</td><td>12.5</td><td>84.6</td><td>70.4</td><td>11.3</td><td>71.1</td><td>X</td><td>X</td><td>X</td><td>75.3</td></tr><tr><td>WavLM (large)</td><td>45.0</td><td>10.3</td><td>88.3</td><td>73.5</td><td>9.3</td><td>73.9</td><td>X</td><td>X</td><td>X</td><td>75.9</td></tr><tr><td>Whisper (medium)</td><td>48.2</td><td>18.2</td><td>82.3</td><td>65.5</td><td>16.7</td><td>56.3</td><td>X</td><td>X</td><td>X</td><td>72.5</td></tr><tr><td>OWSM (3.1)</td><td>44.2</td><td>12.6</td><td>83.7</td><td>68.3</td><td>13.7</td><td>66.9</td><td>X</td><td>X</td><td>X</td><td>76.8</td></tr><tr><td>Pre-trained SLU</td><td>41.6</td><td>31.1</td><td>67.5</td><td>54.1</td><td>35.3</td><td>54.8</td><td>X</td><td>X</td><td>X</td><td>70.3</td></tr></table>
|
| 360 |
+
|
| 361 |
+
Table 5: Performance of various SSL, supervised ASR, and SLU representations on the development set of SLUE tasks using various evaluation protocols in SLUE-PERB. The symbol $\pmb{x}$ indicates that the results were not computed either due to the inability to perform summarization without a decoder or because fine-tuning representations on SQA-5 and SLUE-TED corpora were not feasible within our computational budget.
|
| 362 |
+
|
| 363 |
+
# A.4 Number of Trainable Parameters
|
| 364 |
+
|
| 365 |
+
We present the number of trainable parameters for all our models in Tab. 6. We observe that the lightweight prediction head protocol has approximately 6 million trainable parameters, the complex prediction head setting has around 30 million trainable parameters, and fine-tuning representation has nearly 300 million parameters for most speech representations and tasks. Consequently, the complex prediction head settings serves as a middle ground between lightweight prediction heads and fine-tuned representation settings in terms of computational cost. Furthermore, we demonstrate that increasing the number of trainable parameters does not always result in improved performance. Inter
|
| 366 |
+
|
| 367 |
+
estingly, models with complex prediction heads can outperform models with fine-tuned representations on some SLU tasks, namely NER and NEL. This observation highlights the need to explore diverse methods of incorporating pre-trained speech representations to achieve optimal performance.
|
| 368 |
+
|
| 369 |
+
<table><tr><td rowspan="2">Evaluation
|
| 370 |
+
Protocol</td><td rowspan="2">Pre-Trained
|
| 371 |
+
Model</td><td colspan="2">SLUE-VoxCeleb</td><td>SLUE-VoxPopuli</td><td>SQA-5</td><td>SLUE-TED</td><td>SLUE-HVB</td></tr><tr><td>SA</td><td>ASR</td><td>NER</td><td>QA</td><td>SUMM</td><td>DAC</td></tr><tr><td rowspan="6">Lightweight
|
| 372 |
+
prediction
|
| 373 |
+
head</td><td>HuBERT (large)</td><td>1.1</td><td>6.5</td><td>6.5</td><td>9.7</td><td>X</td><td>1.1</td></tr><tr><td>Wav2Vec2 (large)</td><td>1.1</td><td>6.5</td><td>6.5</td><td>9.7</td><td>X</td><td>1.1</td></tr><tr><td>WavLM (large)</td><td>1.1</td><td>6.5</td><td>6.5</td><td>9.7</td><td>X</td><td>1.1</td></tr><tr><td>Pre-trained SLU</td><td>0.3</td><td>9.1</td><td>9.1</td><td>12.2</td><td>X</td><td>0.3</td></tr><tr><td>Whisper (medium)</td><td>1.1</td><td>9.1</td><td>9.1</td><td>9.7</td><td>X</td><td>1.1</td></tr><tr><td>OWSM (3.1)</td><td>1.1</td><td>9.1</td><td>9.1</td><td>12.3</td><td>X</td><td>1.1</td></tr><tr><td rowspan="6">Complex
|
| 374 |
+
prediction
|
| 375 |
+
head</td><td>HuBERT (large)</td><td>32.4</td><td>32.4</td><td>32.4</td><td>32.4</td><td>31.9</td><td>114.3</td></tr><tr><td>Wav2Vec2 (large)</td><td>32.4</td><td>32.4</td><td>32.4</td><td>32.4</td><td>31.9</td><td>114.3</td></tr><tr><td>WavLM (large)</td><td>32.4</td><td>32.4</td><td>32.4</td><td>32.4</td><td>31.9</td><td>114.3</td></tr><tr><td>Pre-trained SLU</td><td>34.9</td><td>34.9</td><td>34.9</td><td>34.9</td><td>34.4</td><td>124.5</td></tr><tr><td>Whisper (medium)</td><td>32.4</td><td>32.4</td><td>32.4</td><td>32.4</td><td>31.9</td><td>114.3</td></tr><tr><td>OWSM (3.1)</td><td>32.4</td><td>32.4</td><td>35.0</td><td>35.0</td><td>34.5</td><td>124.5</td></tr><tr><td rowspan="6">Fine-tuning
|
| 376 |
+
representations</td><td>HuBERT (large)</td><td>313.4</td><td>318.9</td><td>318.9</td><td>X</td><td>X</td><td>313.5</td></tr><tr><td>Wav2Vec2 (large)</td><td>314.2</td><td>319.7</td><td>319.7</td><td>X</td><td>X</td><td>314.3</td></tr><tr><td>WavLM (large)</td><td>312.3</td><td>317.8</td><td>317.8</td><td>X</td><td>X</td><td>312.3</td></tr><tr><td>Pre-trained SLU</td><td>83.5</td><td>93.3</td><td>92.3</td><td>X</td><td>X</td><td>83.5</td></tr><tr><td>Whisper (medium)</td><td>306.7</td><td>314.8</td><td>314.8</td><td>X</td><td>X</td><td>306.8</td></tr><tr><td>OWSM (3.1)</td><td>561.9</td><td>569.9</td><td>569.9</td><td>X</td><td>X</td><td>561.9</td></tr></table>
|
| 377 |
+
|
| 378 |
+
Table 6: Number of trainable parameters (in million of parameters) in models using various SSL, supervised ASR, and SLU representations across different evaluation protocols in SLUE-PERB. The symbol $\mathcal{X}$ indicates that the results were not computed either due to the inability to perform summarization without a decoder or because fine-tuning representations on SQA-5 and SLUE-TED corpora were not feasible within our computational budget.
|
2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:992dd02894a518e9e24e2f32e0f0d9ae1ad391b129be002d9c03042130f13285
|
| 3 |
+
size 717264
|
2024/On the Evaluation of Speech Foundation Models for Spoken Language Understanding/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Language Encoder of Contrastive Cross-modal Models/e4b16f55-1c1a-4636-bc64-112dc7f05e0b_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Language Encoder of Contrastive Cross-modal Models/e4b16f55-1c1a-4636-bc64-112dc7f05e0b_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Language Encoder of Contrastive Cross-modal Models/e4b16f55-1c1a-4636-bc64-112dc7f05e0b_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a548928909710b28bfc7c40f87cc1f2989da60785c44e20612758e0dc610995
|
| 3 |
+
size 602994
|
2024/On the Language Encoder of Contrastive Cross-modal Models/full.md
ADDED
|
@@ -0,0 +1,430 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On the Language Encoder of Contrastive Cross-modal Models
|
| 2 |
+
|
| 3 |
+
Mengjie Zhao† Junya Ono† Zhi Zhong† Chieh-Hsin Lai‡ Yuhta Takida‡ Naoki Murata‡ Wei-Hsiang Liao‡ Takashi Shibuya‡ Hiromi Wakaki† Yuki Mitsufuji†
|
| 4 |
+
|
| 5 |
+
†Sony Group Corporation ‡Sony AI
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Contrastive cross-modal models such as CLIP and CLAP aid various vision-language (VL) and audio-language (AL) tasks. However, there has been limited investigation of and improvement in their language encoder – the central component of encoding natural language descriptions of image/audio into vector representations. We extensively evaluate how unsupervised and supervised sentence embedding training affect language encoder quality and cross-modal task performance. In VL pretraining, we found that sentence embedding training enhances language encoder quality and aids in cross-modal tasks, improving contrastive VL models such as CyCLIP. Sentence embedding training also benefits AL tasks when the amount of training data is large. We analyze the representation spaces to understand the strengths of sentence embedding training, and find that it improves text-space uniformity, at the cost of decreased cross-modal alignment.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Significant progresses have been made in pretraining large-scale cross-modal models, such as CLIP (Radford et al., 2021) and ALIGN (Jia et al., 2021), for various vision-language (VL) applications such as retrieval and zero-shot image classification. These models are often pretrained with large amounts of data, e.g., OpenAI leverages $\approx 400\mathrm{M}$ caption-image pairs to train CLIP while LAION-AI scaled up this number to 5B (Schuhmann et al., 2022; Cherti et al., 2023). Such a large amount of multi-modal pretraining data contains text captions at the same scale as the pretraining corpora of large language models (LLMs) such as BERT, which is pretrained on 3.3B words (Devlin et al., 2019).
|
| 14 |
+
|
| 15 |
+
The success of VL pretraining encourages research on contrastive learning models for other modalities like audio. Pretrained audio-language
|
| 16 |
+
|
| 17 |
+
(AL) models such as AudioCLIP (Guzhov et al., 2022) and CLAP (Wu et al., 2023; Elizalde et al., 2023) show promising results on AL retrieval and zero-shot audio classification tasks.
|
| 18 |
+
|
| 19 |
+
It is clear that the language encoder in cross-modal contrastive models plays a central role when scaling-up pretraining of a specific modality and/or the amount of modalities. Therefore, analyzing and improving the language encoder become increasingly crucial. CLIP's language encoder (CLIP LM) – a decoder-only language model similar to GPT-2 (Radford et al., 2019) – has been investigated. Yan et al. (2022) showed that the CLIP LM outperforms BERT (Devlin et al., 2019) in clustering entities with prompting. Wolfe and Caliskan (2022) probed the CLIP LM, showing its word representations are less anisotropic (Ethayarajh, 2019), i.e., more uniformly distributed with respect to direction, than GPT-2. Complementary to these research on CLIP LM, we focus on pretraining. CLIP-like models are often pretrained with cross-modal contrastive learning. We measure – during pretraining – the effectiveness of systematically modeling the captions with sentence embedding training (Reimers and Gurevych, 2019; Gao et al., 2021), which is a natural fit to the captions.
|
| 20 |
+
|
| 21 |
+
We pretrain CLIP and one of its new variants CyCLIP (Goel et al., 2022) with sentence embedding training, as well as the conventional cross-modal contrastive learning. In addition to CLIP's cross-modal contrastive learning objective, CyCLIP explicitly optimizes for geometry consistency between the text and image representation spaces, making it a suitable model for validating the effectiveness of NLP methods. We evaluate pretrained models on an array of tasks involving one or two modalities such as SentEval, zero-shot VL retrieval, and image classification. We find that unsupervised sentence embedding training improves the language encoder quality and VL tasks. Supervised sentence embedding training improves language en
|
| 22 |
+
|
| 23 |
+
coder quality, but the benefit does not necessarily transfer to VL tasks. We analyze the learned representation spaces and find that sentence embedding training improves text-space uniformity (Wang and Isola, 2020) and reduces anisotropy (Ethayarajh, 2019; Wolfe and Caliskan, 2022).
|
| 24 |
+
|
| 25 |
+
We also investigate AL contrastive models such as CLAP (Wu et al., 2023). In contrast to VL pretraining, AL pretraining suffers from data scarcity and often leverages pretrained LLMs and audio encoders. We determine the effectiveness of sentence embedding training in both scenarios: continued pretraining with LLMs and audio encoders, and pretraining from scratch. We find that sentence embedding training improves AL tasks when the amount of data is large, while the benefits become less noticeable on small datasets. To the best of our knowledge, this is the first study on investigating and trying to improve the language encoder of AL contrastive learning, and we expect our results will encourage more research in this direction.
|
| 26 |
+
|
| 27 |
+
In summary, our contributions are as follows: (i) We extensively evaluate how unsupervised and supervised sentence embedding trainings affect VL and AL contrastive pretraining. Experimental results indicate improved VL performance. AL tasks see improvements when the amount of training data is large, while the benefits become less noticeable on small datasets. (ii) We show that unsupervised sentence embedding training improves the language encoder of CyCLIP (Goel et al., 2022), hence improves performance of cross-modal tasks. (iii) We conduct a comprehensive analysis on the alignment and uniformity of learned representation spaces following Wang and Isola (2020), and show that sentence embedding training improves uniformity of the text representation space, but at the cost of decreased cross-modal alignment.
|
| 28 |
+
|
| 29 |
+
# 2 Related work
|
| 30 |
+
|
| 31 |
+
CLIP LM. Research has focused on the language encoder of OpenAI CLIP (Radford et al., 2021). The model consists of a language encoder (CLIP LM) and an image encoder that are jointly trained on Web-scale caption-image pairs. Yan et al. (2022) stressed the importance of CLIP LM, showing that it outperforms BERT (Devlin et al., 2019) in tasks, such as entity clustering, through prompting. Bielawski et al. (2022) showed that CLIP LM outperforms BERT in "human-centric" tasks such as genre classification on books or movies. Santurkar
|
| 32 |
+
|
| 33 |
+
et al. (2023) highlighted the importance of text captions for representation learning of CLIP by comparing it with SimCLR (Chen et al., 2020) in which no language supervisions is present. Training signals from language are shown to be detrimental, worth any number of images in a sufficiently large dataset. Our work follows this direction, with a focus on determining how supervised or unsupervised sentence embedding trainings affect CLIP LM and VL contrastive learning.
|
| 34 |
+
|
| 35 |
+
Goel et al. (2022) introduced CyCLIP, incorporating extra training objectives than cross-modal contrastive learning such that the geometry consistency between the text and image spaces is improved. One of CyCLIP's training objectives is computing similarities between captions; this motivates us to determine how systematically modeling the captions through supervised or unsupervised sentence embedding training affects CyCLIP/CLIP.
|
| 36 |
+
|
| 37 |
+
Contrastive audio-language pretraining models have also been recently proposed. Guzhov et al. (2022) extended CLIP to audio tasks by adding an extra module and continued training on audio datasets. Similar distillation methods such as Wav2CLIP (Wu et al., 2022), have also been proposed. Elizalde et al. (2023) and Wu et al. (2023) independently proposed CLAP, in which a language encoder and an audio encoder are jointly trained on AL datasets, which resembles CLIP. We focused on the language encoder in the AL models, and demonstrated the impact of sentence embedding training. To the best of our knowledge, this is the first step in this direction.
|
| 38 |
+
|
| 39 |
+
Sentence embedding is an extensively investigated NLP topic. Methods ranging from bag-of-word averaging non-contextualized embeddings (Mikolov et al., 2013; Pennington et al., 2014) to training LSTMs (Hochreiter and Schmidhuber, 1997), e.g., SkipThought (Kiros et al., 2015) and InferSent (Conneau et al., 2017), have been proposed to effectively compose individual tokens to meaningful sentence representations. Methods that leverage post-hoc transforming (Li et al., 2020; Su et al., 2021) or finetuning the pretrained BERT in supervised (Reimers and Gurevych, 2019) or unsupervised scenarios (Gao et al., 2021) are also introduced. Zhang et al. (2022) show that grounding sentence embedding learning to images improves semantic textual similarity tasks. We present a focused investigation on the LM in CLIP/CyCLIP. We pretrained from scratch an LM and ResNet-50 (He et al., 2016) with cross-modal contrastive learn
|
| 40 |
+
|
| 41 |
+
ing, as well as unsupervised or supervised sentence embedding training with image captions. Verifying the effectiveness of sentence embeddings – a critical component for retrieval and clustering (Reimers and Gurevych, 2019; Gao et al., 2021; Wang et al., 2021; Thakur et al., 2021; Geigle et al., 2022) – is of great importance because retrieval has been one of the main applications of CLIP-like models.
|
| 42 |
+
|
| 43 |
+
# 3 Method
|
| 44 |
+
|
| 45 |
+
Cross-modal contrastive learning plays a key role in training models such as CLIP/CLAP. We take the image modality as an example for introducing this method. Consider a caption-image dataset $\{(I_i, T_i)\}_{i=1}^N$ that includes $N$ caption-image pairs, and denote $I^e$ and $T^e$ as the output representations from an image and language encoder, respectively. The cross-modal contrastive loss (Radford et al., 2021) is defined as
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\begin{array}{l} \mathcal {L} _ {\text {c o n t r a .}} (\tau) = - \sum_ {j = 1} ^ {N} \log \frac {\exp \left(\langle I _ {j} ^ {e} , T _ {j} ^ {e} \rangle / \tau\right)}{\sum_ {k} \exp \left(\langle I _ {j} ^ {e} , T _ {k} ^ {e} \rangle / \tau\right)} \\ - \sum_ {k = 1} ^ {N} \log \frac {\exp \left(\langle I _ {k} ^ {e} , T _ {k} ^ {e} \rangle / \tau\right)}{\sum_ {j} \exp \left(\langle I _ {j} ^ {e} , T _ {k} ^ {e} \rangle / \tau\right)}, \\ \end{array}
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $\tau$ is a trainable temperature parameter initialized to 0.07 and $\langle \cdot, \cdot \rangle$ computes cosine similarity.
|
| 52 |
+
|
| 53 |
+
CLIP's training objective solely stresses the alignment between the two modalities. CyCLIP (Goel et al., 2022) has improved CLIP (Radford et al., 2021) by additionally optimizing for improved representation space geometry, such that the image and text spaces are more consistent with each other. Concretely, CyCLIP explicitly optimizes two additional objectives for cross-modal and in-modal consistency as well as $\mathcal{L}_{\mathrm{contra}}$ :
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\begin{array}{l} \mathcal {L} _ {\mathrm {C - c y c l i c}} = \sum_ {j} \sum_ {k} \left(\left\langle I _ {j} ^ {e}, T _ {k} ^ {e} \right\rangle - \left\langle I _ {k} ^ {e}, T _ {j} ^ {e} \right\rangle\right) ^ {2}, \\ \mathcal {L} _ {\text {I - c y c l i c}} = \sum_ {j} \sum_ {k} \left(\left\langle I _ {j} ^ {e}, I _ {k} ^ {e} \right\rangle - \left\langle T _ {k} ^ {e}, T _ {j} ^ {e} \right\rangle\right) ^ {2}. \\ \end{array}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
Intuitively, decreasing the cross-modal consistency loss $\mathcal{L}_{\mathrm{C - cyclic}}$ makes the cross-modal similarity matrix more symmetric, as shown in Figure 1. Note that solely optimizing $\mathcal{L}_{\mathrm{contra}}$ is expected to symmetrize the cross-modal similarity matrix because the similarity of non-diagonal pairs are trained to be zero. Goel et al. (2022) showed that this scenario does not occur in practice and explicitly optimizing $\mathcal{L}_{\mathrm{C - cyclic}}$ is beneficial.
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
Figure 1: Cross-modal similarity matrix. Diagonal elements refer to cosine similarity between aligned caption-image pairs while non-diagonal elements refer to mismatched caption-image pairs.
|
| 63 |
+
|
| 64 |
+
Optimizing $\mathcal{L}_{\mathrm{I - cyclic}}$ , however, reduces the inconsistency between the overall geometry of the text and image spaces. Computing $\mathcal{L}_{\mathrm{I - cyclic}}$ requires calculating the similarity between two text captions, i.e., $\langle T_k^e,T_j^e\rangle$ . It is thus reasonable to hypothesize that accurately computing caption similarities is beneficial for optimizing $\mathcal{L}_{\mathrm{I - cyclic}}$ . We use unsupervised and supervised sentence embedding training methods and test this hypothesis (§4).
|
| 65 |
+
|
| 66 |
+
We use the widely used SimCSE (Gao et al., 2021) method for unsupervise learning caption representations. SimCSE also uses contrastive learning: a caption is input to a language encoder twice to obtain two vectors $T^{e}$ and $T_{+}^{e}$ . With dropout (Srivastava et al., 2014) enabled, $T^{e}$ and $T_{+}^{e}$ are generally different. These paired vectors serve as the positive training pairs for contrastive learning, while mismatched captions form negative pairs. We denote the unsupervised SimCSE loss as
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\mathcal {L} _ {\mathrm {s}} (\tau) = - \sum_ {j} \log \frac {\exp \left(\langle T _ {j} ^ {e} , T _ {j , +} ^ {e} \rangle / \tau\right)}{\sum_ {k} \exp \left(\langle T _ {j} ^ {e} , T _ {k , +} ^ {e} \rangle / \tau\right)},
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
$\tau$ is fixed to 0.05 following Gao et al. (2021).
|
| 73 |
+
|
| 74 |
+
Another direction of sentence embedding training is supervised training (Reimers and Gurevych, 2019) on natural language inference (NLI) datasets, e.g., SNLI and MNLI (Bowman et al., 2015; Williams et al., 2018). We denote the objective as $\mathcal{L}_{\mathrm{n}}$ and follow Gao et al. (2021) in using entailment pairs as $T^{e}$ and $T_{+}^{e}$ and the contradiction sentence as a hard negative.
|
| 75 |
+
|
| 76 |
+
As a result, the overall training objective considered is:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\text {c o n t r a .}} + \mathcal {L} _ {\text {C - c y c l i c}} + \mathcal {L} _ {\text {I - c y c l i c}} + \mathcal {L} _ {\mathrm {s} / \mathrm {n}}.
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Table 1 lists various models we use in our experiments as well as their training objectives. During the experiments, we sum up the objectives but
|
| 83 |
+
|
| 84 |
+
<table><tr><td></td><td>\( \mathcal{L}_{\text{contra.}} \)</td><td>\( \mathcal{L}_{\text{C-cyclic}} \)</td><td>\( \mathcal{L}_{\text{I-cyclic}} \)</td><td>\( \mathcal{L}_{\text{s}} \)</td><td>\( \mathcal{L}_{\text{n}} \)</td></tr><tr><td>CLI (A) P</td><td>✓</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>CLI (A) Ps</td><td>✓</td><td>-</td><td>-</td><td>✓</td><td>-</td></tr><tr><td>CLI (A) Pn</td><td>✓</td><td>-</td><td>-</td><td>-</td><td>✓</td></tr><tr><td>CyCLI (A) P</td><td>✓</td><td>✓</td><td>✓</td><td>-</td><td>-</td></tr><tr><td>CyCLI (A) Ps</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>-</td></tr><tr><td>CyCLI (A) Pn</td><td>✓</td><td>✓</td><td>✓</td><td>-</td><td>(✓)</td></tr></table>
|
| 85 |
+
|
| 86 |
+
weight them with different hyperparameters $(\lambda)$ depending on the combinations, which are shown in $\S 4$ . We add a suffix "s" to the name of models trained with $\mathcal{L}_{\mathrm{s}}$ and "n" to models trained with $\mathcal{L}_{\mathrm{n}}$ .
|
| 87 |
+
|
| 88 |
+
# 4 Experiments
|
| 89 |
+
|
| 90 |
+
# 4.1 Datasets
|
| 91 |
+
|
| 92 |
+
To pretrain VL models such as CLIP and CyCLIP, we follow Bugliarello et al. (2021); Goel et al. (2022) and use the Conceptual Captions dataset, which consists of approximately $^{1}$ 3M caption-image pairs (CC3M; Sharma et al. (2018)). CC3M has a reasonable size for pretraining and contains a broad coverage of Web content, making it a good option for learning generic VL representations (Bugliarello et al., 2021).
|
| 93 |
+
|
| 94 |
+
To evaluate the trained VL models, we follow (Radford et al., 2021) and conduct evaluations with zero-shot image-text retrieval on the Karpathy (Karpathy and Fei-Fei, 2015) test splits of Flickr30K (Plummer et al., 2015) and MSCOCO (Chen et al., 2015). We skip the evaluation on Flickr30K when supervised sentence embedding training is used, i.e., when $\mathcal{L}_{\mathrm{n}}$ is considered in training. This is because Flickr30K captions are the premises in the SNLI dataset (Bowman et al., 2015), overlapping with the supervised sentence embedding training data. For zero-shot image classification, we use the standard benchmarks CIFAR10, CIFAR100 (Krizhevsky et al., 2009), and ImageNet1K (Russakovsky et al., 2015). Zero-shot image classification with domain shift, out-of-domain, and adversarial examples are also considered: ImageNetV2 (Recht et al., 2019), ImageNet-Sketch (Wang et al., 2019), ImageNet-O, ImageNet-A, and ImageNet-R (Hendrycks et al., 2021b,a).
|
| 95 |
+
|
| 96 |
+
For training AL models, e.g., CLAP and CyCLAP, we conduct experiments with Clotho
|
| 97 |
+
|
| 98 |
+
Table 1: List of training objectives. We follow Radford et al. (2021) for CLIP, Wu et al. (2023) for CLAP, and Goel et al. (2022) for CyCLIP.
|
| 99 |
+
|
| 100 |
+
<table><tr><td></td><td>Dataset</td><td>Pretraining</td><td>Retrieval</td><td>ZS</td><td>Size</td></tr><tr><td rowspan="11">VL</td><td>CC3M</td><td>✓</td><td>-</td><td>-</td><td>2,806,641</td></tr><tr><td>MSCOCO</td><td>-</td><td>✓</td><td>-</td><td>5,000</td></tr><tr><td>Flickr30K</td><td>-</td><td>✓</td><td>-</td><td>1,000</td></tr><tr><td>CIFAR10</td><td>-</td><td>-</td><td>✓</td><td>10,000</td></tr><tr><td>CIFAR100</td><td>-</td><td>-</td><td>✓</td><td>10,000</td></tr><tr><td>ImageNet1K</td><td>-</td><td>-</td><td>✓</td><td>50,000</td></tr><tr><td>ImageNetV2</td><td>-</td><td>-</td><td>✓</td><td>10,000</td></tr><tr><td>ImageNetSketch</td><td>-</td><td>-</td><td>✓</td><td>5,0889</td></tr><tr><td>ImageNet-O</td><td>-</td><td>-</td><td>✓</td><td>2,000</td></tr><tr><td>ImageNet-A</td><td>-</td><td>-</td><td>✓</td><td>7,500</td></tr><tr><td>ImageNet-R</td><td>-</td><td>-</td><td>✓</td><td>30,000</td></tr><tr><td rowspan="5">AL</td><td>Clotho</td><td>✓</td><td>✓</td><td>-</td><td>5,929</td></tr><tr><td>AudioCaps</td><td>✓</td><td>✓</td><td>-</td><td>50,725</td></tr><tr><td>FreeSound</td><td>✓</td><td>✓</td><td>-</td><td>194,895</td></tr><tr><td>ESC50</td><td>-</td><td>-</td><td>✓</td><td>400</td></tr><tr><td>US8K</td><td>-</td><td>-</td><td>✓</td><td>8,732</td></tr></table>
|
| 101 |
+
|
| 102 |
+
Table 2: Datasets and their amount of examples. We report amount of images for VL datasets and of waveform files for AL datasets. "ZS": zero-shot classification.
|
| 103 |
+
|
| 104 |
+
(Drossos et al., 2020) consisting of $\approx 6\mathrm{K}$ caption-audio pairs, AudioCaps consisting of $\approx 50\mathrm{K}^2$ caption-audio pairs (Kim et al., 2019), and FreeSound (Fonseca et al., 2017; Mei et al., 2023) consisting of $\approx 195\mathrm{K}$ caption-audio pairs. In contrast to the VL scenario, AL pretraining is known to be challenging due to data scarcity (Wu et al., 2023). We explore the effectiveness of sentence embedding training for AL with datasets with various scales of size.
|
| 105 |
+
|
| 106 |
+
To evaluate trained AL models, we conduct cross-modal retrieval and zero-shot audio classification tasks. For Clotho, we train the models on the training split and report retrieval results on the validation split. For AudioCaps and FreeSound, we select the best-performing checkpoint on the validation split and report test split results. We conduct zero-shot classification on the Environmental Sound Classification dataset (ESC50; Piczak (2015)) and UrbanSound8K (US8K; Salamon et al. (2014)), which have been widely used (Wu et al., 2023; Elizalde et al., 2023). ESC50 consists of short audio clips containing the sound of different common events such as cats meowing and dogs barking; the clips are categorized into 50 classes, and US8K contains audio clips of urban event sounds such as drilling and street music; the clips are categorized into ten classes.
|
| 107 |
+
|
| 108 |
+
Table 2 lists all the cross-modal datasets and their usage. We follow Goel et al. (2022) in processing the VL datasets and Wu et al. (2023) in
|
| 109 |
+
|
| 110 |
+
processing the AL datasets; the detailed steps of these processes are shown in Appendix §A.1.
|
| 111 |
+
|
| 112 |
+
# 4.2 Experiment settings
|
| 113 |
+
|
| 114 |
+
To pretrain the VL models, we use the same model architecture as CyCLIP (Goel et al., 2022), i.e., a ResNet-50 as the image encoder and Transformer (Vaswani et al., 2017) as the language encoder. We pretrain the model from scratch and largely reuse CyCLIP's hyperparameters. To weight different training objectives (Table 1) in CyCLIP, we set $\lambda_{\mathrm{I - cyclic}}$ and $\lambda_{\mathrm{C - cyclic}}$ to 0.25, $\lambda_{\mathrm{contra}}$ is set to 1.0, and we empirically set $\lambda_{\mathrm{s}}$ and $\lambda_{\mathrm{n}}$ to 0.1. We use a batch size of 80, and each pretraining trial is run for 64 epochs, taking four days with four A100 GPUs. We enable dropout in the language encoder and use dropout rate of 0.1. Appendix §A.1 lists the details of the hyperparameters.
|
| 115 |
+
|
| 116 |
+
The VL pretraining dataset CC3M has a validation split consisting of $\approx 15\mathrm{K}$ text-image pairs. We select the best-performing checkpoint on this validation split for downstream task evaluations.
|
| 117 |
+
|
| 118 |
+
Due to data scarcity, AL pretraining often leverages pretrained language and audio encoders. We use the same model architecture as LAION-CLAP (Wu et al., 2023): pretrained RoBERTa-base (Liu et al., 2020) as the language encoder and pretrained Hierarchical Token-Semantic Audio Transformer (HTSAT; Chen et al. (2022)) as the audio encoder. HTSAT has shown to outperform CNNs in various audio tasks (Chen et al., 2022). We use the HTSAT-tiny variant with 31M parameters. Due to smaller dataset size, each pretraining experiment takes less than one day on a single A100 GPU. We use the default dropout rate of 0.1 of RoBERTa-base in our experiments when the unsupervised sentence embedding training objective is used. Table 10 lists other hyperparameters used in the experiments.
|
| 119 |
+
|
| 120 |
+
For weighting the training objectives, due to the small model size and dataset size, we grid search the optimal $\lambda_{\mathrm{I - cyclic}}$ , $\lambda_{\mathrm{C - cyclic}}$ , and $\lambda_{\mathrm{s}}$ from [0.1, 0.25, 0.5]; $\lambda_{\mathrm{contra.}}$ is set to 1.0. Supervised sentence embedding training $(\lambda_{\mathrm{n}})$ is not considered due to the small size of the AL datasets.
|
| 121 |
+
|
| 122 |
+
For AL datasets Clotho, AudioCaps, and FreeSound, we select the best-performing checkpoint on the validation splits then conduct evaluation on downstream tasks.
|
| 123 |
+
|
| 124 |
+
<table><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Image Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLIP</td><td>15.70</td><td>37.22</td><td>49.06</td><td>12.48</td><td>31.10</td><td>42.23</td></tr><tr><td>CLIPs</td><td>17.78</td><td>38.92</td><td>50.10</td><td>13.46</td><td>32.93</td><td>44.09</td></tr><tr><td>CLIPn</td><td>15.74</td><td>35.66</td><td>47.38</td><td>13.12</td><td>31.46</td><td>42.55</td></tr><tr><td>CyCLIP</td><td>18.92</td><td>41.46</td><td>54.00</td><td>15.40</td><td>35.61</td><td>46.95</td></tr><tr><td>CyCLIPs</td><td>21.30</td><td>44.34</td><td>56.54</td><td>16.69</td><td>37.75</td><td>49.24</td></tr><tr><td>CyCLIPn</td><td>16.32</td><td>36.76</td><td>48.16</td><td>14.53</td><td>34.07</td><td>45.52</td></tr><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Image Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLIP</td><td>31.80</td><td>62.10</td><td>72.90</td><td>25.50</td><td>52.28</td><td>64.34</td></tr><tr><td>CLIPs</td><td>35.20</td><td>63.20</td><td>75.30</td><td>26.70</td><td>52.34</td><td>64.32</td></tr><tr><td>CyCLIP</td><td>37.30</td><td>66.10</td><td>76.40</td><td>30.22</td><td>56.70</td><td>67.40</td></tr><tr><td>CyCLIPs</td><td>40.00</td><td>69.30</td><td>79.70</td><td>31.74</td><td>58.02</td><td>69.46</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Table 3: Zero-shot VL retrieval results $(\%)$ on MSCOCO (top) and Flickr30K (bottom). Integrating unsupervised sentence embedding learning (CLIPs and CyCLIPs) noticeably improves zero-shot retrieval; supervised embedding training (CLIPn and CyCLIPn) has neutral to negative impacts.
|
| 127 |
+
|
| 128 |
+
# 5 Results and analyses
|
| 129 |
+
|
| 130 |
+
# 5.1 Results
|
| 131 |
+
|
| 132 |
+
Table 3 lists the zero-shot VL retrieval results on MSCOCO and Flickr30K, following the settings in Radford et al. (2021). We first utilize the pretrained image and language encoders in a VL model to encode images and captions into vectors. In text retrieval, we then input the image vector to retrieve the aligned captions and vice-versa for image retrieval. We report Recall@N for N in [1, 5, 10].
|
| 133 |
+
|
| 134 |
+
Comparing CyCLIP and CLIP variants. We see that CyCLIP clearly outperforms CLIP across the board for both datasets, highlighting the significant value of incorporating $\mathcal{L}_{\mathrm{C - cyclic}}$ and $\mathcal{L}_{\mathrm{I - cyclic}}$ in optimizing for consistent geometry of the text and image representation spaces (Goel et al., 2022).
|
| 135 |
+
|
| 136 |
+
When comparing CyCLIPs/CLIPs to CyCLIP/CLIP, we observe the effectiveness of improving the language encoder with unsupervised sentence embedding training $\mathcal{L}_{\mathrm{s}}$ . CyCLIPs/CLIPs clearly surpass CyCLIP/CLIP in all configurations except Flickr30K-CLIPs-ImageRetrieval-R@10. This suggests that, we improve CyCLIP on zero-shot vision-language retrieval tasks through learning better representations of the captions. We also observe more gains in text retrieval than in image retrieval. For example, on Flickr30K@1, CyCLIPs outperforms CyCLIP by $2.70\%$ (absolute) in text retrieval and by $1.52\%$ (absolute) in image retrieval.
|
| 137 |
+
|
| 138 |
+
<table><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>5.54</td><td>18.11</td><td>26.81</td><td>5.71</td><td>18.24</td><td>26.94</td></tr><tr><td>CLAPs</td><td>5.97</td><td>18.74</td><td>27.54</td><td>6.09</td><td>19.10</td><td>27.53</td></tr><tr><td>CyCLAP</td><td>5.69</td><td>18.94</td><td>27.91</td><td>5.95</td><td>19.11</td><td>27.97</td></tr><tr><td>CyCLAPs</td><td>6.05</td><td>19.36</td><td>28.52</td><td>6.29</td><td>19.62</td><td>28.02</td></tr></table>
|
| 139 |
+
|
| 140 |
+
<table><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>13.88</td><td>34.16</td><td>48.90</td><td>11.67</td><td>33.80</td><td>47.10</td></tr><tr><td>CLAPs</td><td>13.49</td><td>35.60</td><td>49.00</td><td>11.92</td><td>32.54</td><td>45.47</td></tr><tr><td>CyCLAP</td><td>14.74</td><td>35.50</td><td>48.52</td><td>11.90</td><td>34.95</td><td>48.61</td></tr><tr><td>CyCLAPs</td><td>14.93</td><td>36.84</td><td>51.00</td><td>12.08</td><td>34.09</td><td>46.76</td></tr></table>
|
| 141 |
+
|
| 142 |
+
<table><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>44.10</td><td>76.80</td><td>87.67</td><td>34.82</td><td>70.62</td><td>82.93</td></tr><tr><td>CLAPs</td><td>42.73</td><td>75.44</td><td>87.57</td><td>34.69</td><td>69.80</td><td>82.99</td></tr><tr><td>CyCLAP</td><td>40.65</td><td>74.19</td><td>86.52</td><td>34.13</td><td>69.24</td><td>82.30</td></tr><tr><td>CyCLAPs</td><td>39.81</td><td>74.40</td><td>85.79</td><td>34.23</td><td>70.24</td><td>82.74</td></tr></table>
|
| 143 |
+
|
| 144 |
+
Table 4: Text-audio retrieval results (\%) on FreeSound (top), Clotho (mid), and AudioCaps (bottom). Adding unsupervised sentence embedding training consistently improves performance of CLAP/CyCLAP on the large dataset FreeSound, while improvements on the two small datasets are less noticeable.
|
| 145 |
+
|
| 146 |
+
This observation reflects the effectiveness of improved caption representations.
|
| 147 |
+
|
| 148 |
+
In contrast to the unsupervised embedding training scenario ( $\mathcal{L}_{\mathrm{s}}$ and CyCLIPs/CLIPs), supervised sentence embedding training ( $\mathcal{L}_{\mathrm{n}}$ and CyCLIPn/CLIPn) results in a neutral to negative impact on the overall retrieval results. Investigating the text and image representation spaces, we find that $\mathcal{L}_{\mathrm{n}}$ extensively enforces a uniform text representation space such that the alignment between the text and image spaces is negatively affected; we provide more in-depth analyses in §5.2.
|
| 149 |
+
|
| 150 |
+
AL retrieval results on Clotho, AudioCaps, and FreeSound are listed in Table 4. Supervised sentence embedding training objective $\mathcal{L}_{\mathrm{n}}$ is not considered because NLI datasets are much larger than AL datasets (e.g., MNLI: 433K; Clotho: 6K); subsampling introduces extra random factors that are difficult to control.
|
| 151 |
+
|
| 152 |
+
On FreeSound, we observe improvements when comparing CyCLAP to CLAP, demonstrating that explicitly optimizing for the consistency between the audio and text spaces as in CyCLIP (Goel et al., 2022) is also promising for improving AL retrieval tasks. We also observe consistent improvements of CLAPs/CyCLAPs to CLAP/CyCLAP,
|
| 153 |
+
|
| 154 |
+
this shows the benefits of integrating unsupervised sentence embedding training objective during AL contrastive learning.
|
| 155 |
+
|
| 156 |
+
On Clotho, we observe overall improvements when comparing CyCLAP to CLAP. We see only one exception on text-retrieval-R@10 (i.e., $48.90\%$ for CLAP and $48.52\%$ for CyCLAP); When comparing CyCLAPs/CLAPs with CyCLAP/CLAP, we see clear improvements on text retrieval. However, this comes with a decreased performance on audio retrieval results of R@5 and R@10.
|
| 157 |
+
|
| 158 |
+
On AudioCaps, CyCLAP falls behind CLAP, showing that optimizing for geometry consistency brings no improvements on AudioCaps. The HTSAT audio encoder has already been pretrained with audio classification tasks on AudioSet (Gemmeke et al., 2017), from which AudioCaps is derived. This may contribute to the noisy results. Similarly, LAION-CLAP (Wu et al., 2023) reported that adding additional 630K AL pairs largely boosts AL retrieval performance on Clotho, but hurts on AudioCaps. We observe similar results when comparing CyCLAPs/CLAPs with CyCLAP/CLAP. We further conduct in-depth analyses (c.f. §5.2) on the audio caption properties of different datasets, and find that AudioCaps captions have a small vocabulary and the language use has very small variations, which likely limits the effectiveness of sentence embedding training.
|
| 159 |
+
|
| 160 |
+
Comparing VL and AL retrieval results in Table 3 and Table 4, we observe that (1) CyCLIP noticeably improves over CLIP than CyCLAP over CLAP; (2) improving the language encoder with sentence embedding training is more beneficial to VL than AL. We hypothesize that this is because AL pretraining starts with pretrained encoders, which have geometry that is difficult to alter due to the small AL dataset size. We further conduct AL pretraining from scratch, where the language and audio encoders are randomly re-initialized. Table 5 shows the results. We observe that sentence embedding training brings more consistent and noticeable results, especially on FreeSound and Clotho. However, not utilizing the pretrained encoders leads to inferior absolute performances due to the small dataset sizes. We believe that resolving the data scarcity issue is still a critical step for future work in AL pretraining.
|
| 161 |
+
|
| 162 |
+
For zero-shot image classification, Table 6 lists the Top1 accuracy on standard image classification datasets (top) and datasets with distribution shifts or adversarial examples (bottom). We fol
|
| 163 |
+
|
| 164 |
+
<table><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>1.42</td><td>5.09</td><td>8.32</td><td>1.54</td><td>5.30</td><td>8.42</td></tr><tr><td>CLAPs</td><td>1.63</td><td>5.17</td><td>8.40</td><td>1.69</td><td>5.46</td><td>8.89</td></tr><tr><td>CyCLAP</td><td>1.21</td><td>5.16</td><td>8.24</td><td>1.49</td><td>5.38</td><td>8.60</td></tr><tr><td>CyCLAPs</td><td>1.73</td><td>5.77</td><td>9.23</td><td>1.94</td><td>6.36</td><td>9.54</td></tr><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>2.30</td><td>7.85</td><td>13.88</td><td>2.28</td><td>7.94</td><td>13.47</td></tr><tr><td>CLAPs</td><td>2.11</td><td>8.32</td><td>15.98</td><td>2.81</td><td>8.84</td><td>14.91</td></tr><tr><td>CyCLAP</td><td>2.97</td><td>9.09</td><td>14.07</td><td>2.07</td><td>7.67</td><td>13.11</td></tr><tr><td>CyCLAPs</td><td>3.54</td><td>10.05</td><td>15.41</td><td>2.64</td><td>8.88</td><td>14.87</td></tr><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>16.30</td><td>43.78</td><td>58.41</td><td>14.19</td><td>40.02</td><td>53.98</td></tr><tr><td>CLAPs</td><td>17.76</td><td>44.10</td><td>57.99</td><td>13.81</td><td>38.60</td><td>52.02</td></tr><tr><td>CyCLAP</td><td>18.81</td><td>44.83</td><td>61.23</td><td>14.96</td><td>39.94</td><td>54.67</td></tr><tr><td>CyCLAPs</td><td>18.18</td><td>47.23</td><td>61.02</td><td>13.96</td><td>40.56</td><td>54.84</td></tr></table>
|
| 165 |
+
|
| 166 |
+
Table 5: Text and audio retrieval results $(\%)$ on FreeSound (top),Clotho (mid) and AudioCaps (bottom) when pretraining AL models from scratch.
|
| 167 |
+
|
| 168 |
+
<table><tr><td></td><td>CLIP</td><td>CLIPn</td><td>CLIPs</td><td>CyCLIP</td><td>CyCLIPn</td><td>CyCLIPs</td></tr><tr><td>CIFAR10</td><td>28.31</td><td>44.06</td><td>36.80</td><td>38.67</td><td>41.16</td><td>44.97</td></tr><tr><td>CIFAR100</td><td>13.23</td><td>17.93</td><td>10.72</td><td>17.44</td><td>19.82</td><td>22.05</td></tr><tr><td>ImageNet1K</td><td>14.94</td><td>15.97</td><td>16.01</td><td>20.99</td><td>18.13</td><td>22.13</td></tr><tr><td>ImageNetV2</td><td>12.85</td><td>13.41</td><td>14.09</td><td>17.77</td><td>15.65</td><td>18.68</td></tr><tr><td>ImageNet-Sk.</td><td>7.72</td><td>7.75</td><td>8.14</td><td>11.67</td><td>9.93</td><td>12.85</td></tr><tr><td>ImageNet-O</td><td>20.75</td><td>21.95</td><td>21.30</td><td>27.05</td><td>24.45</td><td>29.55</td></tr><tr><td>ImageNet-A</td><td>3.59</td><td>3.41</td><td>3.95</td><td>5.03</td><td>4.45</td><td>5.19</td></tr><tr><td>ImageNet-R</td><td>18.39</td><td>18.51</td><td>18.24</td><td>24.37</td><td>23.07</td><td>26.72</td></tr></table>
|
| 169 |
+
|
| 170 |
+
Table 6: Zero-shot image classification (R@1 in %) on standard datasets (top) and datasets with distribution shift or adversarial examples (bottom).
|
| 171 |
+
|
| 172 |
+
low Radford et al. (2021) and use their prompts for zero-shot classification. For an image to be classified, we compute the cosine similarity between its vector and the encoded vector of all classes. Each of the classes is reformulated with various prompts. E.g., the ImageNet class "plane" is reformulated with 80 templates such as "a photo of a" and "a blurry photo of a", resulting in prompts "a photo of a plane" and "a blurry photo of a plane" (Radford et al., 2021). The vectors of encoded prompts of a class are averaged; we select the class with the maximum cosine similarity with the image vector.
|
| 173 |
+
|
| 174 |
+
Similar trends as in the retrieval tasks are observed. CyCLIP variants outperform their CLIP counterparts; unsupervised sentence embedding training benefits both CyCLIP/CLIP while supervised sentence embedding training does not result
|
| 175 |
+
|
| 176 |
+
<table><tr><td></td><td></td><td>CLAP</td><td>CLAPs</td><td>CyCLAP</td><td>CyCLAPs</td></tr><tr><td rowspan="2">FreeSound</td><td>ESC50</td><td>91.00</td><td>91.75</td><td>92.25</td><td>91.25</td></tr><tr><td>US8K</td><td>82.02</td><td>82.56</td><td>82.95</td><td>82.65</td></tr><tr><td rowspan="2">Clotho</td><td>ESC50</td><td>72.25</td><td>74.00</td><td>77.00</td><td>77.50</td></tr><tr><td>US8K</td><td>69.84</td><td>70.58</td><td>71.99</td><td>69.14</td></tr><tr><td rowspan="2">AudioCaps</td><td>ESC50</td><td>80.75</td><td>76.00</td><td>79.00</td><td>79.00</td></tr><tr><td>US8K</td><td>71.66</td><td>66.30</td><td>69.06</td><td>69.31</td></tr></table>
|
| 177 |
+
|
| 178 |
+
Table 7: Zero-shot audio classification (R@1 in %) on ESC50 and US8K of models pretrained on FreeSound, Clotho, and AudioCaps.
|
| 179 |
+
|
| 180 |
+
in consistent improvement or deterioration.
|
| 181 |
+
|
| 182 |
+
For zero-shot audio classification, we follow the VL scenario to write several prompts (c.f. Appendix §A.3) such as "a sound of dog barking" and conduct similar experiments. Table 7 list the Top1 accuracy on ESC50 and US8K of models pretrained on FreeSound, Clotho, and AudioCaps respectively. CyCLAP generally outperforms CLAP, except for AudioCaps-US8K. We observe mixed performance when comparing different model configurations, and CyCLAPs/CLAPs perform on par with CyCLAP/CLAP across different datasets. Prompting inherently leads to performance with large variances (Zhao et al., 2021); we leave the extensive "prompt engineering" of designing more prompts for future work.
|
| 183 |
+
|
| 184 |
+
# 5.2 Analyses
|
| 185 |
+
|
| 186 |
+
Alignment and uniformity of representation spaces. In this section, we take a closer look at the learned representation spaces. Following Wang and Isola (2020), we inspect the alignment and uniformity on the hypersphere of learned spaces. Considering a caption-image dataset $\{(I_i,T_i)\}_{i = 1}^N$ , we can compute the alignment and uniformity scores defined as:
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
\mathcal {L} _ {\mathrm {a l i g n}} \triangleq \underset {(I, T) \sim p _ {\mathrm {p o s}}} {\mathbb {E}} \| I ^ {e} - T ^ {e} \| _ {2} ^ {2},
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
$$
|
| 193 |
+
\mathcal{L}_{\mathrm{T,uniform}}\triangleq \log \operatorname *{\mathbb{E}}_{\substack{T_{i},T_{j}\text{i.i.d.}\\ }}e^{-2\left\| T_{i}^{e} - T_{j}^{e}\right\|_{2}^{2}},
|
| 194 |
+
$$
|
| 195 |
+
|
| 196 |
+
$$
|
| 197 |
+
\mathcal {L} _ {\mathrm {I , u n i f o r m}} \triangleq \log \underset {I _ {i}, I _ {j} \stackrel {\mathrm {i . i . d .}} {\sim} p _ {\mathrm {d a t a}}} {\mathbb {E}} e ^ {- 2 \left\| I _ {i} ^ {e} - I _ {j} ^ {e} \right\| _ {2} ^ {2}},
|
| 198 |
+
$$
|
| 199 |
+
|
| 200 |
+
where $(I,T)\sim p_{\mathrm{pos}}$ refers to aligned text-images pairs, $(T_{i},T_{j})\sim p_{\mathrm{data}}$ refers to independent and identically distributed (IID) sampled text pairs, $(I_i,I_j)\sim p_{\mathrm{data}}$ refers to IID sampled image pairs, and $I^{e}$ , $T^{e}$ respectively refer to the encoded image and text vectors. Recall that the trained models output $\ell -2$ normalized vectors residing on the unit ball.
|
| 201 |
+
|
| 202 |
+

|
| 203 |
+
(a) CLIP/CLIPs
|
| 204 |
+
|
| 205 |
+

|
| 206 |
+
(b) CyCLIP/CyCLIPs
|
| 207 |
+
Figure 2: Visualizing cross-modal alignment w.r.t. text space uniformity of trained VL and AL models. To visualize AL results, we use models pretrained on AudioCaps. We observe that sentence embedding training trades cross-modal alignment for text space uniformity.
|
| 208 |
+
|
| 209 |
+

|
| 210 |
+
(c) CLAP/CLAPs
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
(d) CyCLAP/CyCLAPs
|
| 214 |
+
|
| 215 |
+
Intuitively, we want vectors of aligned pairs of two modalities to be well aligned in the representation space, such that $\mathcal{L}_{\mathrm{align}}$ is close to zero. On the other hand, we want the space of a single modality to be more uniform than anisotropic (Ethayarajh, 2019; Wolfe and Caliskan, 2022), such that the overall representation space capacity is well used. This results in a near minus infinite $\mathcal{L}_{\mathrm{uniform}}$ .
|
| 216 |
+
|
| 217 |
+
Figure 2 illustrates the results. We only show $\mathcal{L}_{\mathrm{align}}$ w.r.t. $\mathcal{L}_{\mathrm{T,uniform}}$ since our main focus is the language encoder. We see that unsupervised sentence embedding training trades cross-modal alignment for improved text space uniformity. For VL pretraining, supervised sentence embedding training (CLIPn/CyCLIPn) overly focuses on text space uniformity while the VL space alignment deteriorates, as evidenced when visualizing them using the Flickr30K (*) dataset in which the captions largely overlap with the dataset for supervised sentence embedding training (§4.1).
|
| 218 |
+
|
| 219 |
+
Another interesting observation is that the text encoder of CyCLIP/CyCLAP outputs representation space less uniform than that of CLIP/CLAP, as shown in Figure 2 (x-axis). Liang et al. (2022) show that randomly initialized encoders output vectors residing in different cones. The in-modal cyclic loss $\mathcal{L}_{\mathrm{I - cyclic}}$ (\$3) stresses consistency between cones; it is thus expected to be challenging to learn a uniform space while simultaneously preserving consistency between two spaces4. Sentence embedding training provides extra training signals.
|
| 220 |
+
|
| 221 |
+
Audio dataset analyses. We show in Table 4 that sentence embedding training consistently improves on the largest AL dataset FreeSound; the benefits diminish on smaller datasets Clotho and AudioCaps. In addition to dataset size, we fur
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
Figure 3: AudioCaps has the smallest vocabulary size; a small amount of frequent words dominate the captions, leading to small variations on the word use. We cut the vocabulary size to $20\mathrm{K}$ for better visualization.
|
| 225 |
+
|
| 226 |
+
ther conduct in-depth analyses on the three AL datasets. We compute word frequency (then normalized by total number of words) of captions in the AL datasets, and then sort the words in decreasing order. Figure 3 shows the results in log scale. AudioCaps has the smallest vocabulary size, and there are little variations on the word use (i.e., a small group of words dominant the captions). This property could hinder improving the uniformity of the text space. Clotho, $\approx 9$ times smaller than AudioCaps, has a larger vocabulary and a more uniform word frequency distribution of its captions. FreeSound has the largest number of and most diverse captions, and integrating sentence embedding training consistently improves the AL tasks. We also show the results of CC3M as a reference.
|
| 227 |
+
|
| 228 |
+
LM quality. We evaluate the language encoder quality of pretrained VL models. Our motivation is two-fold. First, as a sanity check, we want to verify that incorporating sentence embedding training in VL contrastive learning still improves the language encoder's ability of representing general sentences. Second, the evaluation results will help us measure the compatibility and possible interferences among the various training objectives (Pfeiffer et al., 2023).
|
| 229 |
+
|
| 230 |
+
<table><tr><td></td><td>CLIP</td><td>CLIPn</td><td>CLIPs</td><td>CyCLIP</td><td>CyCLIPn</td><td>CyCLIPs</td></tr><tr><td>Intrin.</td><td>55.45</td><td>64.50</td><td>57.58</td><td>53.72</td><td>49.70</td><td>55.67</td></tr><tr><td>Extrin.</td><td>67.03</td><td>68.68</td><td>67.64</td><td>65.82</td><td>69.49</td><td>67.95</td></tr></table>
|
| 231 |
+
|
| 232 |
+
Table 8: Averaged intrinsic and extrinsic SentEval task results of the language encoder in VL models.
|
| 233 |
+
|
| 234 |
+
To this goal, we use the sentence embedding benchmark SentEval (Conneau and Kiela, 2018). Default SentEval configurations are used in all experiments, and we conduct both intrinsic (e.g., semantic textual similarity) and extrinsic tasks (e.g., sentiment analysis). Table 8 lists the averaged results on SentEval (Appendix §A.6 shows individual results). We observe that unsupervised sentence embedding training is generally beneficial for CyCLIP/CLIP on both intrinsic and extrinsic tasks. Supervised sentence embedding training results in more significant improvements<sup>5</sup>, however, it negatively affects CyCLIPn on the sensitive intrinsic tasks.
|
| 235 |
+
|
| 236 |
+
# 6 Conclusion
|
| 237 |
+
|
| 238 |
+
We extensively investigate the effectiveness of sentence embedding training for pretraining contrastive vision-language and audio-language models. We show that it improves vision-language pretraining, resulting in a better CyCLIP. Sentence embedding training also improves audio-language pretraining on large datasets, while the benefits diminish on small datasets. We conduct comprehensive analyses and show that sentence embedding training increases text space uniformity, but with a cost of reduced cross-modal alignment.
|
| 239 |
+
|
| 240 |
+
# 7 Limitations
|
| 241 |
+
|
| 242 |
+
We restrict our scope to cross-modal contrastive models with three most common modalities: language, image, and audio. While contrastive learning has been successfully extended to other modalities such as music, incorporating music poses additional challenges, particularly regarding licensing and the heterogeneity of music sources. Downloading music from the internet and mining reliable music-language pairs are time-consuming tasks, which we did not consider in detail in this study. Nevertheless, we conducted initial experiments on the music modality using MusicCaps (Agostinelli
|
| 243 |
+
|
| 244 |
+
et al., 2023) and show promising results in $\S A.7$ . Another limitation of our work is that models with decoder such as BLIP (Li et al., 2022) and tasks such as visual question answering (Antol et al., 2015) are not considered; we leave them to future work.
|
| 245 |
+
|
| 246 |
+
In our audio-language pretraining experiments, we explored both pretraining from scratch and pretraining from publicly available language and audio encoders. However, we believe that a more promising direction would involve adapting the pretrained language encoder to the audio domain by performing additional pretraining on audio descriptions before engaging in cross-modal contrastive learning. Nevertheless, we chose to follow the current methods in the literature to ensure consistent evaluations and facilitate meaningful comparisons.
|
| 247 |
+
|
| 248 |
+
# References
|
| 249 |
+
|
| 250 |
+
Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Inigo Lopez-Gazpio, Montse Maritxalar, Rada Mihalcea, et al. 2015. Semeval-2015 task 2: Semantic textual similarity, english, spanish and pilot on interpretability. In Proceedings of the 9th international workshop on semantic evaluation (SemEval 2015), pages 252-263.
|
| 251 |
+
Eneko Agirre, Carmen Banea, Claire Cardie, Daniel M Cer, Mona T Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Rada Mihalcea, German Rigau, and Janyce Wiebe. 2014. Semeval-2014 task 10: Multilingual semantic textual similarity. In SemEval@COLING, pages 81-91.
|
| 252 |
+
Eneko Agirre, Carmen Banea, Daniel Cer, Mona Diab, Aitor Gonzalez Agirre, Rada Mihalcea, German Rigau Claramunt, and Janyce Wiebe. 2016. Semeval-2016 task 1: Semantic textual similarity, monolingual and cross-lingual evaluation. In SemEval-2016. 10th International Workshop on Semantic Evaluation; 2016 Jun 16-17; San Diego, CA. Stroudsburg (PA): ACL; 2016. p. 497-511. ACL (Association for Computational Linguistics).
|
| 253 |
+
Eneko Agirre, Daniel Cer, Mona Diab, and Aitor Gonzalez-Agirre. 2012. Semeval-2012 task 6: A pilot on semantic textual similarity. In *SEM 2012: The First Joint Conference on Lexical and Computational Semantics–Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pages 385–393.
|
| 254 |
+
Eneko Agirre, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, and Weiwei Guo. 2013. *SEM 2013 shared task: Semantic textual similarity. In Second joint conference on lexical and computational semantics
|
| 255 |
+
|
| 256 |
+
(\*SEM), volume 1: proceedings of the Main conference and the shared task: semantic textual similarity, pages 32-43.
|
| 257 |
+
Andrea Agostinelli, Timo I Denk, Zalán Borsos, Jesse Engel, Mauro Verzetti, Antoine Caillon, Qingqing Huang, Aren Jansen, Adam Roberts, Marco Tagliasacchi, et al. 2023. MusicLM: Generating music from text. arXiv preprint arXiv:2301.11325.
|
| 258 |
+
Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. 2015. Vqa: Visual question answering. In Proceedings of the IEEE international conference on computer vision, pages 2425-2433.
|
| 259 |
+
Romain Bielawski, Benjamin Devillers, Tim Van De Cruys, and Rufin Vanrullen. 2022. When does CLIP generalize better than unimodal models? when judging human-centric concepts. In Proceedings of the 7th Workshop on Representation Learning for NLP, pages 29-38, Dublin, Ireland. Association for Computational Linguistics.
|
| 260 |
+
Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632-642, Lisbon, Portugal. Association for Computational Linguistics.
|
| 261 |
+
Emanuele Bugliarello, Ryan Cotterell, Naoaki Okazaki, and Desmond Elliott. 2021. Multimodal Pretraining Unmasked: A Meta-Analysis and a Unified Framework of Vision-and-Language BERTs. Transactions of the Association for Computational Linguistics, 9:978-994.
|
| 262 |
+
Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. 2017. SemEval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 1-14, Vancouver, Canada. Association for Computational Linguistics.
|
| 263 |
+
Ke Chen, Xingjian Du, Bilei Zhu, Zejun Ma, Taylor Berg-Kirkpatrick, and Shlomo Dubnov. 2022. HTSAT: A hierarchical token-semantic audio transformer for sound classification and detection. In ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 646-650. IEEE.
|
| 264 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. 2020. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pages 1597-1607. PMLR.
|
| 265 |
+
Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dólar, and C Lawrence Zitnick. 2015. Microsoft coco captions: Data collection and evaluation server. arXiv preprint arXiv:1504.00325.
|
| 266 |
+
|
| 267 |
+
Mehdi Cherti, Romain Beaumont, Ross Wightman, Mitchell Wortsman, Gabriel Ilharco, Cade Gordon, Christoph Schuhmann, Ludwig Schmidt, and Jenia Jitsev. 2023. Reproducible scaling laws for contrastive language-image learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2818-2829.
|
| 268 |
+
Alexis Conneau and Douwe Kiela. 2018. SentEval: An evaluation toolkit for universal sentence representations. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA).
|
| 269 |
+
Alexis Conneau, Douwe Kiela, Holger Schwenk, Loic Barrault, and Antoine Bordes. 2017. Supervised learning of universal sentence representations from natural language inference data. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 670-680, Copenhagen, Denmark. Association for Computational Linguistics.
|
| 270 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. 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 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 271 |
+
Bill Dolan, Chris Quirk, and Chris Brockett. 2004. Unsupervised construction of large paraphrase corpora: Exploiting massively parallel news sources. In COLING 2004: Proceedings of the 20th International Conference on Computational Linguistics, pages 350-356, Geneva, Switzerland. COLING.
|
| 272 |
+
Konstantinos Drossos, Samuel Lipping, and Tuomas Virtanen. 2020. Cloth: an audio captioning dataset. In ICASSP 2020 - 2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 736-740.
|
| 273 |
+
Benjamin Elizalde, Soham Deshmukh, Mahmoud Al Ismail, and Huaming Wang. 2023. Clap learning audio concepts from natural language supervision. In ICASSP 2023 - 2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5.
|
| 274 |
+
Kawin Ethayarajh. 2019. How contextual are contextualized word representations? Comparing the geometry of BERT, ELMo, and GPT-2 embeddings. 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 55–65. Association for Computational Linguistics.
|
| 275 |
+
Eduardo Fonseca, Jordi Pons Puig, Xavier Favory, Frederic Font Corbera, Dmitry Bogdanov, Andres Ferraro,
|
| 276 |
+
|
| 277 |
+
Sergio Oramas, Alastair Porter, and Xavier Serra. 2017. Freesound datasets: a platform for the creation of open audio datasets. In Hu X, Cunningham SJ, Turnbull D, Duan Z, editors. Proceedings of the 18th ISMIR Conference; 2017 oct 23-27; Suzhou, China.[Canada]: International Society for Music Information Retrieval; 2017. p. 486-93. International Society for Music Information Retrieval (ISMIR).
|
| 278 |
+
Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894-6910, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 279 |
+
Gregor Geigle, Jonas Pfeiffer, Nils Reimers, Ivan Vulic, and Iryna Gurevych. 2022. Retrieve Fast, Rerank Smart: Cooperative and Joint Approaches for Improved Cross-Modal Retrieval. Transactions of the Association for Computational Linguistics, 10:503-521.
|
| 280 |
+
Jort F Gemmeke, Daniel PW Ellis, Dylan Freedman, Aren Jansen, Wade Lawrence, R Channing Moore, Manoj Plakal, and Marvin Ritter. 2017. Audio set: An ontology and human-labeled dataset for audio events. In 2017 IEEE international conference on acoustics, speech and signal processing (ICASSP), pages 776-780. IEEE.
|
| 281 |
+
Shashank Goel, Hritik Bansal, Sumit Bhatia, Ryan A. Rossi, Vishwa Vinay, and Aditya Grover. 2022. CyCLIP: Cyclic contrastive language-image pretraining. In Advances in Neural Information Processing Systems.
|
| 282 |
+
Andrey Guzhov, Federico Raue, Jorn Hees, and Andreas Dengel. 2022. Audioclip: Extending clip to image, text and audio. In ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 976-980.
|
| 283 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778.
|
| 284 |
+
Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, et al. 2021a. The many faces of robustness: A critical analysis of out-of-distribution generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8340-8349.
|
| 285 |
+
Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. 2021b. Natural adversarial examples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15262-15271.
|
| 286 |
+
Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735-1780.
|
| 287 |
+
|
| 288 |
+
Minqing Hu and Bing Liu. 2004. Mining and summarizing customer reviews. In Proceedings of the Tenth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD '04, page 168-177, New York, NY, USA. Association for Computing Machinery.
|
| 289 |
+
Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. 2021. Scaling up visual and vision-language representation learning with noisy text supervision. In International Conference on Machine Learning, pages 4904-4916. PMLR.
|
| 290 |
+
Andrej Karpathy and Li Fei-Fei. 2015. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3128-3137.
|
| 291 |
+
Chris Dongjoo Kim, Byeongchang Kim, Hyunmin Lee, and Gunhee Kim. 2019. AudioCaps: Generating captions for audios in the wild. 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 119-132, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 292 |
+
Ryan Kiros, Yukun Zhu, Russ R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Skip-thought vectors. Advances in neural information processing systems, 28.
|
| 293 |
+
Alex Krizhevsky, Geoffrey Hinton, et al. 2009. Learning multiple layers of features from tiny images.
|
| 294 |
+
Bohan Li, Hao Zhou, Junxian He, Mingxuan Wang, Yiming Yang, and Lei Li. 2020. On the sentence embeddings from pre-trained language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9119-9130, Online. Association for Computational Linguistics.
|
| 295 |
+
Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. 2022. Blip: Bootstrapping language-image pretraining for unified vision-language understanding and generation. In International conference on machine learning, pages 12888-12900. PMLR.
|
| 296 |
+
Weixin Liang, Yuhui Zhang, Yongchan Kwon, Serena Yeung, and James Zou. 2022. Mind the gap: Understanding the modality gap in multi-modal contrastive representation learning. In Advances in Neural Information Processing Systems.
|
| 297 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2020. Ro{bert}a: A robustly optimized {bert} pretraining approach.
|
| 298 |
+
Marco Marelli, Stefano Menini, Marco Baroni, Luisa Bentivogli, Raffaella Bernardi, and Roberto Zamparelli. 2014. A SICK cure for the evaluation of
|
| 299 |
+
|
| 300 |
+
compositional distributional semantic models. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC'14), pages 216-223, Reykjavik, Iceland. European Language Resources Association (ELRA).
|
| 301 |
+
Xinhao Mei, Chutong Meng, Haohe Liu, Qiuqiang Kong, Tom Ko, Chengqi Zhao, Mark D. Plumbley, Yuexian Zou, and Wenwu Wang. 2023. WavCaps: A ChatGPT-assisted weakly-labelled audio captioning dataset for audio-language multimodal research. arXiv preprint arXiv:2303.17395.
|
| 302 |
+
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, 26.
|
| 303 |
+
Bo Pang and Lillian Lee. 2004. A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts. In Proceedings of the 42nd Annual Meeting of the Association for Computational Linguistics (ACL-04), pages 271-278, Barcelona, Spain.
|
| 304 |
+
Bo Pang and Lillian Lee. 2005. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL'05), pages 115-124, Ann Arbor, Michigan. Association for Computational Linguistics.
|
| 305 |
+
Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. Glove: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP), pages 1532-1543.
|
| 306 |
+
Jonas Pfeiffer, Sebastian Ruder, Ivan Vulić, and Edoardo Maria Ponti. 2023. Modular deep learning.
|
| 307 |
+
Karol J. Piczak. 2015. ESC: Dataset for Environmental Sound Classification. In Proceedings of the 23rd Annual ACM Conference on Multimedia, pages 1015-1018. ACM Press.
|
| 308 |
+
Bryan A. Plummer, Liwei Wang, Chris M. Cervantes, Juan C. Caicedo, Julia Hockenmaier, and Svetlana Lazebnik. 2015. Flickr30k entities: Collecting region-to-phrase correspondences for richer image-to-sentence models. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 2641-2649.
|
| 309 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. 2021. Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748-8763. PMLR.
|
| 310 |
+
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.
|
| 311 |
+
|
| 312 |
+
Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. 2019. DoImagenet classifiers generalize toImagenet? In International conference on machine learning, pages 5389-5400. PMLR.
|
| 313 |
+
Nils Reimers and Iryna Gurevych. 2019. SentenceBERT: Sentence embeddings using Siamese BERTnetworks. 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 3982-3992. Association for Computational Linguistics.
|
| 314 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. 2015. Imagenet large scale visual recognition challenge. International journal of computer vision, 115:211-252.
|
| 315 |
+
Justin Salamon, Christopher Jacoby, and Juan Pablo Bello. 2014. A dataset and taxonomy for urban sound research. In Proceedings of the 22nd ACM International Conference on Multimedia, MM '14, page 1041-1044, New York, NY, USA. Association for Computing Machinery.
|
| 316 |
+
Shibani Santurkar, Yann Dubois, Rohan Taori, Percy Liang, and Tatsunori Hashimoto. 2023. Is a caption worth a thousand images? a study on representation learning. In International Conference on Learning Representations.
|
| 317 |
+
Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade W Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, Patrick Schramowski, Srivatsa R Kundurthy, Katherine Crowson, Ludwig Schmidt, Robert Kaczmarczyk, and Jenia Jitsev. 2022. LAION-5B: An open large-scale dataset for training next generation image-text models. In Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track.
|
| 318 |
+
Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. 2018. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2556-2565, Melbourne, Australia. Association for Computational Linguistics.
|
| 319 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1631-1642.
|
| 320 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: a simple way to prevent neural networks
|
| 321 |
+
|
| 322 |
+
from overfitting. The journal of machine learning research, 15(1):1929-1958.
|
| 323 |
+
Jianlin Su, Jiarun Cao, Weijie Liu, and Yangyiwen Ou. 2021. Whitening sentence representations for better semantics and faster retrieval. arXiv preprint arXiv:2103.15316.
|
| 324 |
+
Nandan Thakur, Nils Reimers, Andreas Rücklé, Abhishek Srivastava, and Iryna Gurevych. 2021. BEIR: A heterogeneous benchmark for zero-shot evaluation of information retrieval models. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2).
|
| 325 |
+
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.
|
| 326 |
+
Ellen M. Voorhees and Dawn M. Tice. 2000. Building a question answering test collection. In Proceedings of the 23rd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR '00, page 200-207, New York, NY, USA. Association for Computing Machinery.
|
| 327 |
+
Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. 2019. Learning robust global representations by penalizing local predictive power. In Advances in Neural Information Processing Systems, pages 10506-10518.
|
| 328 |
+
Kexin Wang, Nils Reimers, and Iryna Gurevych. 2021. TSDAE: Using transformer-based sequential denoising auto-encoder for unsupervised sentence embedding learning. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 671-688, Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 329 |
+
Tongzhou Wang and Phillip Isola. 2020. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International Conference on Machine Learning, pages 9929-9939. PMLR.
|
| 330 |
+
Janyce Wiebe, Theresa Wilson, and Claire Cardie. 2005. Annotating expressions of opinions and emotions in language. Language resources and evaluation, 39:165-210.
|
| 331 |
+
Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1112–1122. Association for Computational Linguistics.
|
| 332 |
+
Robert Wolfe and Aylin Caliskan. 2022. Contrastive visual semantic pretraining magnifies the semantics of natural language representations. In Proceedings of the 60th Annual Meeting of the Association for
|
| 333 |
+
|
| 334 |
+
Computational Linguistics (Volume 1: Long Papers), pages 3050-3061, Dublin, Ireland. Association for Computational Linguistics.
|
| 335 |
+
Ho-Hsiang Wu, Prem Seetharaman, Kundan Kumar, and Juan Pablo Bello. 2022. Wav2clip: Learning robust audio representations from clip. In ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 4563-4567.
|
| 336 |
+
Yusong Wu, Ke Chen, Tianyu Zhang, Yuchen Hui, Taylor Berg-Kirkpatrick, and Shlomo Dubnov. 2023. Large-scale contrastive language-audio pretraining with feature fusion and keyword-to-caption augmentation. In IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP.
|
| 337 |
+
An Yan, Jiacheng Li, Wanrong Zhu, Yujie Lu, William Yang Wang, and Julian McAuley. 2022. CLIP also understands text: Prompting CLIP for phrase understanding.
|
| 338 |
+
Miaoran Zhang, Marius Mosbach, David Adelani, Michael Hedderich, and Dietrich Klakow. 2022. MCSE: Multimodal contrastive learning of sentence embeddings. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5959-5969, Seattle, United States. Association for Computational Linguistics.
|
| 339 |
+
Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improving few-shot performance of language models. In International Conference on Machine Learning, pages 12697-12706. PMLR.
|
| 340 |
+
|
| 341 |
+
# A Appendix
|
| 342 |
+
|
| 343 |
+
# A.1 Datasets and hyperparameters
|
| 344 |
+
|
| 345 |
+
For VL pretraining, our experiments largely follow those for CyCLIP (Goel et al., 2022) and for CLIP (Radford et al., 2021). We also directly reuse CyCLIP training hyperparameters but with a smaller batch size, as listed in Table 9. We highlight that Goel et al. (2022) use more pretraining data than us. Concretely, Goel et al. (2022) use 2,631,703 text-image pairs from CC3M and randomly sampled 368,297 text-image pairs from CC12M. As a result, 3,000,000 text-image pairs are used. In our case, we only use our version of CC3M without randomly sampling from CC12M (which is difficult to control). Our downloaded CC3M has 2,806,641 images. Thus, our pretraining dataset is $7\%$ smaller than Goel et al. (2022).
|
| 346 |
+
|
| 347 |
+
For AL pretraining, our experiments largely follow that of for LAION-CLAP (Wu et al., 2023). To process the audio data, we sample the wavefiles at a rate of $48\mathrm{kHz}$ and then convert them to FLAC
|
| 348 |
+
|
| 349 |
+
<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Logit scale range</td><td>0 to 4.6052</td></tr><tr><td>Epochs</td><td>64</td></tr><tr><td>Batch size</td><td>80</td></tr><tr><td>Learning rate</td><td>0.0005</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Scheduler</td><td>Cosine</td></tr><tr><td>Learning rate warmup steps</td><td>10000</td></tr><tr><td>Language encoder dropout</td><td>0.1</td></tr></table>
|
| 350 |
+
|
| 351 |
+
Table 9: Hyperparameters used for training VL models.
|
| 352 |
+
|
| 353 |
+
<table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Logit scale range</td><td>0 to 4.6052</td></tr><tr><td>Epochs</td><td>90</td></tr><tr><td>Batch size</td><td>80</td></tr><tr><td>Learning rate</td><td>0.00009</td></tr><tr><td>Optimizer</td><td>AdamW</td></tr><tr><td>Scheduler</td><td>Cosine</td></tr><tr><td>Learning rate warmup steps</td><td>9600</td></tr><tr><td>Language encoder dropout</td><td>0.1</td></tr></table>
|
| 354 |
+
|
| 355 |
+
format using FFmpeg $^6$ . We then use a hop size of 480, window size of 1024, and 64 mel-bins for computing Short-time Fourier transform (STFT) and mel-spectrograms. The audio encoder input thus has a dimension of 1024 for time steps and 64 for frequency bins. We list the hyperparameters in Table 10.
|
| 356 |
+
|
| 357 |
+
# A.2 Text and image space consistency
|
| 358 |
+
|
| 359 |
+
CyCLIP variants ensure cross-modal consistency, such that improving the uniformity of the text space with sentence embedding training also benefits image space uniformity as shown in Figure 4. As expected, this observation does not hold for CLIP.
|
| 360 |
+
|
| 361 |
+
# A.3 Zero-shot audio classification with prompts
|
| 362 |
+
|
| 363 |
+
To resemble zero-shot image classification in VL experiments, we write several prompts for zero-shot audio classification, as listed in Table 11.
|
| 364 |
+
|
| 365 |
+
Table 10: Hyperparameters used for training AL models. For FreeSound, we train for 30 epochs and use warmup steps 3200 due to its larger size.
|
| 366 |
+
|
| 367 |
+
<table><tr><td>A sound of label.</td></tr><tr><td>a sound of label.</td></tr><tr><td>The sound of label.</td></tr><tr><td>the sound of label.</td></tr><tr><td>A constant sound of label.</td></tr><tr><td>a constant sound of label.</td></tr><tr><td>A big sound of label.</td></tr><tr><td>a big sound of label.</td></tr><tr><td>A small sound of label.</td></tr><tr><td>A small sound of label.</td></tr><tr><td>A label is making a sound.</td></tr><tr><td>a label is making a sound.</td></tr><tr><td>An label is making a sound.</td></tr><tr><td>an label is making a sound.</td></tr><tr><td>A sound of label followed by a sound of label.</td></tr><tr><td>A sound of label followed by label.</td></tr><tr><td>A label.</td></tr><tr><td>An label.</td></tr><tr><td>label.</td></tr><tr><td>label and label.</td></tr><tr><td>A label is running.</td></tr><tr><td>A label is happening.</td></tr></table>
|
| 368 |
+
|
| 369 |
+
Table 11: We write several prompts for zero-shot audio classification resembling the VL prompts. "label" refers to the audio class label.
|
| 370 |
+
|
| 371 |
+
# A.4 Extended results of audio-language models
|
| 372 |
+
|
| 373 |
+
We observe that the differences between Table 4 results are smaller than in the VL scenario. As a result, we repeat each experiment three times and then report mean and variance of the results in Table 12. Similar observations as in Table 4 are obtained.
|
| 374 |
+
|
| 375 |
+
# A.5 Unsupervised sentence embedding training with NLI datasets
|
| 376 |
+
|
| 377 |
+
When evaluating the language encoder on SentEval tasks (§5.2), it is possible that the improvements brought by supervised sentence embedding training is due to the fact that NLI datasets have similar domain and language use as the SentEval tasks. We thus condcut a new type of training, where we use sentences in the NLI datasets for unsupervised sentence embedding training with SimCSE, in addition to VL contrastive learning. We name this new training scheme as CLIPe and CyCLIPe.
|
| 378 |
+
|
| 379 |
+
Table 16 shows that the new training schemes, CLIPe and CyCLIPe fall behind the supervised
|
| 380 |
+
|
| 381 |
+

|
| 382 |
+
(a) CLIP: alignment vs. text space uniformity
|
| 383 |
+
|
| 384 |
+

|
| 385 |
+
(b) CLIP: alignment vs. image space uniformity
|
| 386 |
+
|
| 387 |
+

|
| 388 |
+
(c) CyCLIP: alignment vs. text space uniformity
|
| 389 |
+
|
| 390 |
+

|
| 391 |
+
(d) CyCLIP: alignment vs. image space uniformity
|
| 392 |
+
Figure 4: Comparing the text and image space consistency between CLIP and CyCLIP variants. Improving uniformity of the text space also benefits image space in CyCLIP.
|
| 393 |
+
|
| 394 |
+
<table><tr><td rowspan="2"></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>(5.73, 0.04)</td><td>(18.08, 0.00)</td><td>(27.15, 0.09)</td><td>(5.78, 0.02)</td><td>(18.13, 0.01)</td><td>(26.96, 0.01)</td></tr><tr><td>CLAPs</td><td>(5.95, 0.01)</td><td>(18.71, 0.06)</td><td>(27.45, 0.07)</td><td>(6.08, 0.00)</td><td>(18.79, 0.12)</td><td>(27.45, 0.10)</td></tr><tr><td>CyCLAP</td><td>(5.84, 0.01)</td><td>(18.86, 0.01)</td><td>(27.81, 0.06)</td><td>(5.91, 0.01)</td><td>(18.82, 0.05)</td><td>(27.68, 0.05)</td></tr><tr><td>CyCLAPs</td><td>(6.11, 0.00)</td><td>(19.37, 0.00)</td><td>(28.42, 0.06)</td><td>(6.11, 0.02)</td><td>(19.31, 0.11)</td><td>(28.22, 0.05)</td></tr><tr><td rowspan="2"></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>(14.93, 0.55)</td><td>(35.02, 0.41)</td><td>(48.45, 0.12)</td><td>(12.25, 0.21)</td><td>(33.38, 0.23)</td><td>(46.72, 0.59)</td></tr><tr><td>CLAPs</td><td>(14.29, 1.43)</td><td>(35.66, 1.04)</td><td>(49.67, 0.22)</td><td>(12.15, 0.12)</td><td>(32.88, 0.06)</td><td>(46.06, 0.18)</td></tr><tr><td>CyCLAP</td><td>(13.75, 0.49)</td><td>(36.07, 0.46)</td><td>(48.77, 2.00)</td><td>(11.94, 0.07)</td><td>(34.37, 0.29)</td><td>(48.13, 0.51)</td></tr><tr><td>CyCLAPs</td><td>(14.96, 0.01)</td><td>(37.58, 1.74)</td><td>(50.59, 0.10)</td><td>(12.16, 0.24)</td><td>(34.23, 0.08)</td><td>(47.27, 0.18)</td></tr><tr><td rowspan="2"></td><td colspan="3">Text Retrieval</td><td colspan="3">Audio Retrieval</td></tr><tr><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>(42.81, 0.85)</td><td>(76.21, 0.19)</td><td>(86.87, 0.41)</td><td>(34.99, 0.03)</td><td>(70.05, 0.16)</td><td>(82.44, 0.14)</td></tr><tr><td>CLAPs</td><td>(35.08, 0.30)</td><td>(69.89, 0.08)</td><td>(82.47, 0.25)</td><td>(44.26, 1.33)</td><td>(75.65, 0.14)</td><td>(87.39, 0.16)</td></tr><tr><td>CyCLAP</td><td>(42.11, 2.50)</td><td>(74.15, 0.09)</td><td>(86.10, 0.09)</td><td>(34.36, 0.05)</td><td>(69.88, 0.44)</td><td>(82.49, 0.34)</td></tr><tr><td>CyCLAPs</td><td>(41.17, 4.30)</td><td>(74.09, 0.20)</td><td>(85.89, 0.02)</td><td>(33.94, 0.06)</td><td>(70.14, 0.07)</td><td>(82.80, 0.19)</td></tr></table>
|
| 395 |
+
|
| 396 |
+
Table 12: Extended text-audio retrieval results (%) on FreeSound (top), Clotho (mid), and AudioCaps (bottom). We repeat each experiment three times by changing random seeds, and then report the results in format: (mean of performance, variance of performance). Similar observations as Table 4 can be obtained.
|
| 397 |
+
|
| 398 |
+
<table><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Image Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLIP</td><td>15.70</td><td>37.22</td><td>49.06</td><td>12.48</td><td>31.10</td><td>42.23</td></tr><tr><td>CLIPs</td><td>17.78</td><td>38.92</td><td>50.10</td><td>13.46</td><td>32.93</td><td>44.09</td></tr><tr><td>CLIPn</td><td>15.74</td><td>35.66</td><td>47.38</td><td>13.12</td><td>31.46</td><td>42.55</td></tr><tr><td>CLIPe</td><td>16.90</td><td>38.40</td><td>49.92</td><td>13.21</td><td>31.21</td><td>42.26</td></tr><tr><td>CyCLIP</td><td>18.92</td><td>41.46</td><td>54.00</td><td>15.40</td><td>35.61</td><td>46.95</td></tr><tr><td>CyCLIPs</td><td>21.30</td><td>44.34</td><td>56.54</td><td>16.69</td><td>37.75</td><td>49.24</td></tr><tr><td>CyCLIPn</td><td>16.32</td><td>36.76</td><td>48.16</td><td>14.53</td><td>34.07</td><td>45.52</td></tr><tr><td>CLIPe</td><td>16.22</td><td>37.52</td><td>49.22</td><td>14.05</td><td>32.56</td><td>43.15</td></tr></table>
|
| 399 |
+
|
| 400 |
+
sentence embedding training counterparts CLIPn and CyCLIPn on SentEval. This confirms that the gains of supervised sentence embedding trainings is from the NLI task supervision, e.g., premise and hypothesis relations, instead of other factors such as domain. For completeness, we also report CLIPe/CyCLIPe performance on VL retrieval tasks in Table 13 and zero-shot image classification in Table 17.
|
| 401 |
+
|
| 402 |
+
# A.6 Complete results on SentEval
|
| 403 |
+
|
| 404 |
+
Our intrinsic evaluation tasks are the semantic textual similarity tasks: STS12-STS16, STS-B, SICKR (Marelli et al., 2014; Cer et al., 2017; Agirre et al., 2012, 2013, 2014, 2015, 2016). Ex
|
| 405 |
+
|
| 406 |
+
Table 13: Zero-shot VL retrieval results (%) on MSCOCO (top) and Flickr30K (bottom).
|
| 407 |
+
|
| 408 |
+
<table><tr><td></td><td>CLIP</td><td>CLIPn</td><td>CLIPs</td><td>CyCLIP</td><td>CyCLIPn</td><td>CyCLIPs</td></tr><tr><td>STS12</td><td>46.14</td><td>54.25</td><td>50.31</td><td>37.84</td><td>45.60</td><td>40.42</td></tr><tr><td>STS13</td><td>50.24</td><td>59.67</td><td>48.44</td><td>52.35</td><td>37.82</td><td>54.90</td></tr><tr><td>STS14</td><td>48.70</td><td>59.26</td><td>51.73</td><td>46.58</td><td>40.55</td><td>49.46</td></tr><tr><td>STS15</td><td>64.90</td><td>73.81</td><td>66.09</td><td>63.25</td><td>59.62</td><td>67.01</td></tr><tr><td>STS16</td><td>51.94</td><td>63.08</td><td>55.62</td><td>50.96</td><td>46.80</td><td>52.87</td></tr><tr><td>STS-B</td><td>61.54</td><td>68.36</td><td>65.04</td><td>60.30</td><td>54.88</td><td>60.72</td></tr><tr><td>SICKR</td><td>64.70</td><td>73.09</td><td>65.82</td><td>64.78</td><td>62.62</td><td>64.34</td></tr><tr><td>Avg</td><td>55.45</td><td>64.50</td><td>57.58</td><td>53.72</td><td>49.70</td><td>55.67</td></tr><tr><td>MR</td><td>61.07</td><td>63.66</td><td>61.11</td><td>59.51</td><td>62.78</td><td>60.65</td></tr><tr><td>CR</td><td>67.63</td><td>71.07</td><td>68.03</td><td>67.02</td><td>73.67</td><td>66.12</td></tr><tr><td>SUBJ</td><td>76.39</td><td>78.09</td><td>77.52</td><td>74.24</td><td>78.90</td><td>77.36</td></tr><tr><td>MPQA</td><td>74.60</td><td>77.25</td><td>74.80</td><td>74.69</td><td>80.13</td><td>76.16</td></tr><tr><td>SST2</td><td>61.67</td><td>66.89</td><td>63.65</td><td>61.50</td><td>68.42</td><td>64.25</td></tr><tr><td>TREC</td><td>60.80</td><td>56.00</td><td>60.60</td><td>55.80</td><td>53.80</td><td>62.80</td></tr><tr><td>MRPC</td><td>67.07</td><td>67.77</td><td>67.77</td><td>68.00</td><td>68.75</td><td>68.29</td></tr><tr><td>Avg</td><td>67.03</td><td>68.68</td><td>67.64</td><td>65.82</td><td>69.49</td><td>67.95</td></tr></table>
|
| 409 |
+
|
| 410 |
+
Table 14: Intrinsic (top) and extrinsic (bottom) SentEval task performance of the language encoder in VL models.
|
| 411 |
+
|
| 412 |
+
trinsic evaluation tasks are movie review (MR; Pang and Lee (2005)) product review (CR; Hu and Liu (2004)) subjectivity status (SUBJ; Pang and Lee (2004)), opinion polarity (MPQA; Wiebe et al. (2005)), sentiment analysis on SST2 (Socher et al., 2013), question-type classification (TREC; Voorhees and Tice (2000)), and paraphrase detection (MRPC; Dolan et al. (2004)). Table 14 shows individual task performances.
|
| 413 |
+
|
| 414 |
+
<table><tr><td></td><td colspan="3">Text Retrieval</td><td colspan="3">Music Retrieval</td></tr><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>CLAP</td><td>6.05</td><td>18.42</td><td>28.33</td><td>5.46</td><td>18.45</td><td>28.50</td></tr><tr><td>CLAPs</td><td>5.99</td><td>18.66</td><td>28.85</td><td>6.05</td><td>19.01</td><td>28.43</td></tr><tr><td>CyCLAP</td><td>6.37</td><td>18.98</td><td>29.45</td><td>6.69</td><td>18.87</td><td>29.45</td></tr><tr><td>CyCLAPs</td><td>6.34</td><td>20.06</td><td>30.08</td><td>6.62</td><td>19.36</td><td>29.13</td></tr></table>
|
| 415 |
+
|
| 416 |
+
Table 15: Text and music retrieval results $(\%)$ on MusicCaps.
|
| 417 |
+
|
| 418 |
+
# A.7 Preliminary experiments on the music modality
|
| 419 |
+
|
| 420 |
+
We further conducted a new experiment with the music modality: music-text retrieval on the MusicCaps dataset introduced by MusicLM (Agostinelli et al., 2023). MusicCaps consists of 5521 music-caption pairs, of which 2858 pairs are for training and 2663 are for validation. Each music clip is associated with hand-curated English descriptions (including genre, mood, tempo, singer voices etc.) from expert musicians. We use MusicCaps because it is open-sourced and publicly available. Following tables show the retrieval results (the same experiment configurations as the audio modality are used; cf. §A.1).
|
| 421 |
+
|
| 422 |
+
It can be observed from Table 15 that improving the text encoder with unsupervised sentence embedding training also helps music-text retrieval in the music modality, especially in the text retrieval scenario (CLAPs generally outperforms CLAP; CyCLAPs generally outperforms CyCLAP). These music modality results are consistent with our previous findings on the image and audio modalities, and we plan to explore more in this direction in future work.
|
| 423 |
+
|
| 424 |
+
<table><tr><td></td><td>CLIP</td><td>CLIPn</td><td>CLIPe</td><td>CLIPs</td><td>CyCLIP</td><td>CyCLIPn</td><td>CyCLIPe</td><td>CyCLIPs</td></tr><tr><td>STS12</td><td>46.14</td><td>54.25</td><td>46.54</td><td>50.31</td><td>37.84</td><td>45.60</td><td>42.03</td><td>40.42</td></tr><tr><td>STS13</td><td>50.24</td><td>59.67</td><td>46.29</td><td>48.44</td><td>52.35</td><td>37.82</td><td>35.56</td><td>54.90</td></tr><tr><td>STS14</td><td>48.70</td><td>59.26</td><td>47.66</td><td>51.73</td><td>46.58</td><td>40.55</td><td>27.57</td><td>49.46</td></tr><tr><td>STS15</td><td>64.90</td><td>73.81</td><td>65.48</td><td>66.09</td><td>63.25</td><td>59.62</td><td>46.65</td><td>67.01</td></tr><tr><td>STS16</td><td>51.94</td><td>63.08</td><td>52.39</td><td>55.62</td><td>50.96</td><td>46.80</td><td>33.83</td><td>52.87</td></tr><tr><td>STS-B</td><td>61.54</td><td>68.36</td><td>60.99</td><td>65.04</td><td>60.30</td><td>54.88</td><td>44.63</td><td>60.72</td></tr><tr><td>SICKR</td><td>64.70</td><td>73.09</td><td>62.86</td><td>65.82</td><td>64.78</td><td>62.62</td><td>47.53</td><td>64.34</td></tr><tr><td>Avg</td><td>55.45</td><td>64.50</td><td>54.60</td><td>57.58</td><td>53.72</td><td>49.70</td><td>39.69</td><td>55.67</td></tr><tr><td>MR</td><td>61.07</td><td>63.66</td><td>59.91</td><td>61.11</td><td>59.51</td><td>62.78</td><td>59.60</td><td>60.65</td></tr><tr><td>CR</td><td>67.63</td><td>71.07</td><td>68.74</td><td>68.03</td><td>67.02</td><td>73.67</td><td>64.61</td><td>66.12</td></tr><tr><td>SUBJ</td><td>76.39</td><td>78.09</td><td>75.86</td><td>77.52</td><td>74.24</td><td>78.90</td><td>74.16</td><td>77.36</td></tr><tr><td>MPQA</td><td>74.60</td><td>77.25</td><td>73.54</td><td>74.80</td><td>74.69</td><td>80.13</td><td>73.95</td><td>76.16</td></tr><tr><td>SST2</td><td>61.67</td><td>66.89</td><td>60.19</td><td>63.65</td><td>61.50</td><td>68.42</td><td>60.46</td><td>64.25</td></tr><tr><td>TREC</td><td>60.80</td><td>56.00</td><td>56.60</td><td>60.60</td><td>55.80</td><td>53.80</td><td>57.60</td><td>62.80</td></tr><tr><td>MRPC</td><td>67.07</td><td>67.77</td><td>67.83</td><td>67.77</td><td>68.00</td><td>68.75</td><td>67.48</td><td>68.29</td></tr><tr><td>Avg</td><td>67.03</td><td>68.68</td><td>66.10</td><td>67.64</td><td>65.82</td><td>69.49</td><td>65.41</td><td>67.95</td></tr></table>
|
| 425 |
+
|
| 426 |
+
Table 16: Evaluating the language encoder of different VL models with intrinsic (top) and extrinsic (bottom) SentEval tasks.
|
| 427 |
+
|
| 428 |
+
<table><tr><td></td><td>CLIP</td><td>CLIPn</td><td>CLIPe</td><td>CLIPs</td><td>CyCLIP</td><td>CyCLIPn</td><td>CLIPe</td><td>CyCLIPs</td></tr><tr><td>CIFAR10</td><td>28.31</td><td>44.06</td><td>33.97</td><td>36.80</td><td>38.67</td><td>41.16</td><td>50.48</td><td>44.97</td></tr><tr><td>CIFAR100</td><td>13.23</td><td>17.93</td><td>12.30</td><td>10.72</td><td>17.44</td><td>19.82</td><td>21.76</td><td>22.05</td></tr><tr><td>ImageNet1K</td><td>14.94</td><td>15.97</td><td>15.74</td><td>16.01</td><td>20.99</td><td>18.13</td><td>20.07</td><td>22.13</td></tr><tr><td>ImageNetV2</td><td>12.85</td><td>13.41</td><td>13.51</td><td>14.09</td><td>17.77</td><td>15.65</td><td>17.34</td><td>18.68</td></tr><tr><td>ImageNet-Sk.</td><td>7.72</td><td>7.75</td><td>6.36</td><td>8.14</td><td>11.67</td><td>9.93</td><td>11.54</td><td>12.85</td></tr><tr><td>ImageNet-O</td><td>20.75</td><td>21.95</td><td>20.45</td><td>21.30</td><td>27.05</td><td>24.45</td><td>27.20</td><td>29.55</td></tr><tr><td>ImageNet-A</td><td>3.59</td><td>3.41</td><td>3.59</td><td>3.95</td><td>5.03</td><td>4.45</td><td>4.93</td><td>5.19</td></tr><tr><td>ImageNet-R</td><td>18.39</td><td>18.51</td><td>18.25</td><td>18.24</td><td>24.37</td><td>23.07</td><td>24.36</td><td>26.72</td></tr></table>
|
| 429 |
+
|
| 430 |
+
Table 17: Zero-shot image classification (R@1 in %) on standard datasets (top) and datasets with distribution shift or adversarial examples (bottom).
|
2024/On the Language Encoder of Contrastive Cross-modal Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6119712a6effe4c035405272a027f940ed3d9d024da59e943adcbcaa57b180e
|
| 3 |
+
size 918384
|
2024/On the Language Encoder of Contrastive Cross-modal Models/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2024/On the Relationship Between RNN Hidden-State Vectors and Semantic Structures/0b4ae23d-d054-4812-9362-fa28d54e737c_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|