diff --git a/.gitattributes b/.gitattributes index ff679578261e94673ada5d370c3da5e352ab6f9d..8a2c6c4c9ab247a517c12e07cb32b949c98f5c91 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5721,3 +5721,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text 2023/Closed[[:space:]]Boundary[[:space:]]Learning[[:space:]]for[[:space:]]Classification[[:space:]]Tasks[[:space:]]with[[:space:]]the[[:space:]]Universum[[:space:]]Class/db424ebb-4e4d-4c49-b57e-38b53d012857_origin.pdf filter=lfs diff=lfs merge=lfs -text 2023/ClozEx_[[:space:]]A[[:space:]]Task[[:space:]]toward[[:space:]]Generation[[:space:]]of[[:space:]]English[[:space:]]Cloze[[:space:]]Explanation/e2b26955-4bd3-414a-8163-bec8ae60bc7e_origin.pdf filter=lfs diff=lfs merge=lfs -text 2023/ClusterPrompt_[[:space:]]Cluster[[:space:]]Semantic[[:space:]]Enhanced[[:space:]]Prompt[[:space:]]Learning[[:space:]]for[[:space:]]New[[:space:]]Intent[[:space:]]Discovery/7fb52757-8668-4c5f-873f-273e42ce63a2_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Co-training[[:space:]]and[[:space:]]Co-distillation[[:space:]]for[[:space:]]Quality[[:space:]]Improvement[[:space:]]and[[:space:]]Compression[[:space:]]of[[:space:]]Language[[:space:]]Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Co2PT_[[:space:]]Mitigating[[:space:]]Bias[[:space:]]in[[:space:]]Pre-trained[[:space:]]Language[[:space:]]Models[[:space:]]through[[:space:]]Counterfactual[[:space:]]Contrastive[[:space:]]Prompt[[:space:]]Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/CoEdIT_[[:space:]]Text[[:space:]]Editing[[:space:]]by[[:space:]]Task-Specific[[:space:]]Instruction[[:space:]]Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/CoVariance-based[[:space:]]Causal[[:space:]]Debiasing[[:space:]]for[[:space:]]Entity[[:space:]]and[[:space:]]Relation[[:space:]]Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Coarse-to-Fine[[:space:]]Dual[[:space:]]Encoders[[:space:]]are[[:space:]]Better[[:space:]]Frame[[:space:]]Identification[[:space:]]Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Code-Switching[[:space:]]with[[:space:]]Word[[:space:]]Senses[[:space:]]for[[:space:]]Pretraining[[:space:]]in[[:space:]]Neural[[:space:]]Machine[[:space:]]Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/CodeTransOcean_[[:space:]]A[[:space:]]Comprehensive[[:space:]]Multilingual[[:space:]]Benchmark[[:space:]]for[[:space:]]Code[[:space:]]Translation/4840c497-c98d-4886-85a5-c02f7eda3689_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Coherent[[:space:]]Entity[[:space:]]Disambiguation[[:space:]]via[[:space:]]Modeling[[:space:]]Topic[[:space:]]and[[:space:]]Categorical[[:space:]]Dependency/30225b64-d6f3-465d-87d3-fb1ba2bded38_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Combining[[:space:]]Counting[[:space:]]Processes[[:space:]]and[[:space:]]Classification[[:space:]]Improves[[:space:]]a[[:space:]]Stopping[[:space:]]Rule[[:space:]]for[[:space:]]Technology[[:space:]]Assisted[[:space:]]Review/600d5847-b586-4f06-ab3a-4f33c7daaf1d_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Comparing[[:space:]]Prompt-Based[[:space:]]and[[:space:]]Standard[[:space:]]Fine-Tuning[[:space:]]for[[:space:]]Urdu[[:space:]]Text[[:space:]]Classification/15a18752-16d1-4c35-923d-451742ad6d11_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Comparing[[:space:]]the[[:space:]]Evaluation[[:space:]]and[[:space:]]Production[[:space:]]of[[:space:]]Loophole[[:space:]]Behavior[[:space:]]in[[:space:]]Humans[[:space:]]and[[:space:]]Large[[:space:]]Language[[:space:]]Models/c4d9b768-63a0-481e-8443-cf88c057bb6e_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/CompleQA_[[:space:]]Benchmarking[[:space:]]the[[:space:]]Impacts[[:space:]]of[[:space:]]Knowledge[[:space:]]Graph[[:space:]]Completion[[:space:]]Methods[[:space:]]on[[:space:]]Question[[:space:]]Answering/4f07c289-d185-4f35-8531-21e840779f15_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Complex[[:space:]]Event[[:space:]]Schema[[:space:]]Induction[[:space:]]with[[:space:]]Knowledge-Enriched[[:space:]]Diffusion[[:space:]]Model/b50f9568-72f4-46f2-80da-6acca5487d4e_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Complexity-Guided[[:space:]]Curriculum[[:space:]]Learning[[:space:]]for[[:space:]]Text[[:space:]]Graphs/c248f3bc-6768-461e-b776-576cf240c7b4_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Compositional[[:space:]]Generalization[[:space:]]for[[:space:]]Data-to-Text[[:space:]]Generation/5d45254b-1435-4c7f-b362-d2d00fb5fffc_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/ConPrompt_[[:space:]]Pre-training[[:space:]]a[[:space:]]Language[[:space:]]Model[[:space:]]with[[:space:]]Machine-Generated[[:space:]]Data[[:space:]]for[[:space:]]Implicit[[:space:]]Hate[[:space:]]Speech[[:space:]]Detection/47ece091-28f4-49b9-8f99-1f1c6ef7c995_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Conditional[[:space:]]Natural[[:space:]]Language[[:space:]]Inference/3001ef0e-1cbf-4ea2-a402-91ea7eebbc45_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Conditioning[[:space:]]on[[:space:]]Dialog[[:space:]]Acts[[:space:]]improves[[:space:]]Empathy[[:space:]]Style[[:space:]]Transfer/51b53562-6c7f-4b30-aabe-7a9b0246abd1_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Conic10K_[[:space:]]A[[:space:]]Challenging[[:space:]]Math[[:space:]]Problem[[:space:]]Understanding[[:space:]]and[[:space:]]Reasoning[[:space:]]Dataset/4720459f-a31d-4ecd-bbdb-c6fc0cbb44d8_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Connecting[[:space:]]the[[:space:]]Dots_[[:space:]]What[[:space:]]Graph-Based[[:space:]]Text[[:space:]]Representations[[:space:]]Work[[:space:]]Best[[:space:]]for[[:space:]]Text[[:space:]]Classification[[:space:]]using[[:space:]]Graph[[:space:]]Neural[[:space:]]Networks_/bbd34649-1d8b-46db-813f-aaedabc131e9_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Consistency[[:space:]]is[[:space:]]Key_[[:space:]]On[[:space:]]Data-Efficient[[:space:]]Modality[[:space:]]Transfer[[:space:]]in[[:space:]]Speech[[:space:]]Translation/eea021e7-9820-469f-8069-26903958b667_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Consonant[[:space:]]is[[:space:]]all[[:space:]]you[[:space:]]need_[[:space:]]a[[:space:]]compact[[:space:]]representation[[:space:]]of[[:space:]]English[[:space:]]text[[:space:]]for[[:space:]]efficient[[:space:]]NLP/398c5324-ab75-4c21-b6e5-69c4abfe9516_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Context[[:space:]]Quality[[:space:]]Matters[[:space:]]in[[:space:]]Training[[:space:]]Fusion-in-Decoder[[:space:]]for[[:space:]]Extractive[[:space:]]Open-Domain[[:space:]]Question[[:space:]]Answering/26b22de0-998e-4633-94d6-05f7a2a9e637_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Context-faithful[[:space:]]Prompting[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/0b757774-a48f-4455-9bc9-a24164d36f93_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Continual[[:space:]]Generalized[[:space:]]Intent[[:space:]]Discovery_[[:space:]]Marching[[:space:]]Towards[[:space:]]Dynamic[[:space:]]and[[:space:]]Open-world[[:space:]]Intent[[:space:]]Recognition/c369e58d-6533-4449-89f6-0c847771b7d7_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Contrastive[[:space:]]Deterministic[[:space:]]Autoencoders[[:space:]]For[[:space:]]Language[[:space:]]Modeling/46aec0a2-740a-4d43-838d-ae386f46895a_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Contrastive[[:space:]]Distant[[:space:]]Supervision[[:space:]]for[[:space:]]Debiased[[:space:]]and[[:space:]]Denoised[[:space:]]Machine[[:space:]]Reading[[:space:]]Comprehension/d29d2912-c463-4ece-86b5-4a728fa8da36_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Contrastive[[:space:]]Learning-based[[:space:]]Sentence[[:space:]]Encoders[[:space:]]Implicitly[[:space:]]Weight[[:space:]]Informative[[:space:]]Words/704ceb47-b9cf-49c9-b6bd-f187f45cd544_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Contrastive[[:space:]]Pre-training[[:space:]]for[[:space:]]Personalized[[:space:]]Expert[[:space:]]Finding/167cc74c-d4ba-4192-9796-6ebe69a61bf3_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Controllable[[:space:]]Chest[[:space:]]X-Ray[[:space:]]Report[[:space:]]Generation[[:space:]]from[[:space:]]Longitudinal[[:space:]]Representations/88d4fa0f-c1ca-44ab-af79-2a5ce0c5f2ed_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Conversational[[:space:]]Recommender[[:space:]]System[[:space:]]and[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Are[[:space:]]Made[[:space:]]for[[:space:]]Each[[:space:]]Other[[:space:]]in[[:space:]]E-commerce[[:space:]]Pre-sales[[:space:]]Dialogue/1256d31e-a418-4199-8b7a-d428613fbc75_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Counterfactual[[:space:]]Augmentation[[:space:]]for[[:space:]]Multimodal[[:space:]]Learning[[:space:]]Under[[:space:]]Presentation[[:space:]]Bias/ff0029da-242f-4b91-bf20-354a8cb6ef2d_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Coverage-based[[:space:]]Example[[:space:]]Selection[[:space:]]for[[:space:]]In-Context[[:space:]]Learning/d96ec336-ba4a-4724-9d52-58ba08c68fb3_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Cross-modality[[:space:]]Data[[:space:]]Augmentation[[:space:]]for[[:space:]]End-to-End[[:space:]]Sign[[:space:]]Language[[:space:]]Translation/a7f9ecfe-8764-401f-94ee-2f17bd8f2dc3_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Crossing[[:space:]]the[[:space:]]Aisle_[[:space:]]Unveiling[[:space:]]Partisan[[:space:]]and[[:space:]]Counter-Partisan[[:space:]]Events[[:space:]]in[[:space:]]News[[:space:]]Reporting/05d3ff72-74b4-4f59-89fc-d2d2c20db6d8_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Crosslingual[[:space:]]Transfer[[:space:]]Learning[[:space:]]for[[:space:]]Low-Resource[[:space:]]Languages[[:space:]]Based[[:space:]]on[[:space:]]Multilingual[[:space:]]Colexification[[:space:]]Graphs/865e5947-720f-4515-a9c5-7d7988b479d2_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Cue-CoT_[[:space:]]Chain-of-thought[[:space:]]Prompting[[:space:]]for[[:space:]]Responding[[:space:]]to[[:space:]]In-depth[[:space:]]Dialogue[[:space:]]Questions[[:space:]]with[[:space:]]LLMs/5b546b86-7eef-43d1-bad3-bbebe2eb09c0_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Cultural[[:space:]]Compass_[[:space:]]Predicting[[:space:]]Transfer[[:space:]]Learning[[:space:]]Success[[:space:]]in[[:space:]]Offensive[[:space:]]Language[[:space:]]Detection[[:space:]]with[[:space:]]Cultural[[:space:]]Features/17a96ad2-34d6-4824-9096-2a9fa1029dd5_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Culturally[[:space:]]Aware[[:space:]]Natural[[:space:]]Language[[:space:]]Inference/d1fb0e8d-c1c0-4bd7-a3d2-3a73567a7581_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/D2TV_[[:space:]]Dual[[:space:]]Knowledge[[:space:]]Distillation[[:space:]]and[[:space:]]Target-oriented[[:space:]]Vision[[:space:]]Modeling[[:space:]]for[[:space:]]Many-to-Many[[:space:]]Multimodal[[:space:]]Summarization/8d153e37-f31c-46ec-9e21-7f3aa4ac3e64_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DISCO_[[:space:]]A[[:space:]]Large[[:space:]]Scale[[:space:]]Human[[:space:]]Annotated[[:space:]]Corpus[[:space:]]for[[:space:]]Disfluency[[:space:]]Correction[[:space:]]in[[:space:]]Indo-European[[:space:]]Languages/746cdfd7-59d1-4d28-9a10-2fd9a42cb313_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DRAFT_[[:space:]]Dense[[:space:]]Retrieval[[:space:]]Augmented[[:space:]]Few-shot[[:space:]]Topic[[:space:]]classifier[[:space:]]Framework/6beb82d5-56b8-4f9e-be07-49e941fec48f_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Data[[:space:]]Augmentation[[:space:]]Techniques[[:space:]]for[[:space:]]Machine[[:space:]]Translation[[:space:]]of[[:space:]]Code-Switched[[:space:]]Texts_[[:space:]]A[[:space:]]Comparative[[:space:]]Study/36e7fbe8-1255-424f-99e7-449c2e1904b1_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Data[[:space:]]Augmentation[[:space:]]for[[:space:]]Code[[:space:]]Translation[[:space:]]with[[:space:]]Comparable[[:space:]]Corpora[[:space:]]and[[:space:]]Multiple[[:space:]]References/f178d7de-d9cc-494d-8e28-9f3fc42ea5d7_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Data[[:space:]]Pruning[[:space:]]for[[:space:]]Efficient[[:space:]]Model[[:space:]]Pruning[[:space:]]in[[:space:]]Neural[[:space:]]Machine[[:space:]]Translation/79530db6-0c9f-406e-9772-9660628e3172_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Data[[:space:]]Selection[[:space:]]Curriculum[[:space:]]for[[:space:]]Abstractive[[:space:]]Text[[:space:]]Summarization/1ddfa855-0e1a-418c-b38e-d89219c83e53_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Data-efficient[[:space:]]Active[[:space:]]Learning[[:space:]]for[[:space:]]Structured[[:space:]]Prediction[[:space:]]with[[:space:]]Partial[[:space:]]Annotation[[:space:]]and[[:space:]]Self-Training/4a8a969f-e896-4070-ac0f-f47c04509242_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Dataset[[:space:]]Bias[[:space:]]Mitigation[[:space:]]in[[:space:]]Multiple-Choice[[:space:]]Visual[[:space:]]Question[[:space:]]Answering[[:space:]]and[[:space:]]Beyond/ca27ef3a-cf2a-4724-bc6a-c1ff3c372657_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DeCrisisMB_[[:space:]]Debiased[[:space:]]Semi-Supervised[[:space:]]Learning[[:space:]]for[[:space:]]Crisis[[:space:]]Tweet[[:space:]]Classification[[:space:]]via[[:space:]]Memory[[:space:]]Bank/1a785694-f263-49a2-990d-bb0d421a1966_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DeTiME_[[:space:]]Diffusion-Enhanced[[:space:]]Topic[[:space:]]Modeling[[:space:]]using[[:space:]]Encoder-decoder[[:space:]]based[[:space:]]LLM/1dd8876b-a55e-467a-855b-21dba9cac724_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Debias[[:space:]]NLU[[:space:]]Datasets[[:space:]]via[[:space:]]Training-free[[:space:]]Perturbations/f771e7da-de10-4bbd-8703-dbc3051d874c_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Debiasing[[:space:]]Multimodal[[:space:]]Models[[:space:]]via[[:space:]]Causal[[:space:]]Information[[:space:]]Minimization/7fce567d-6609-46c0-9baf-9d49c3f0b438_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Decoding[[:space:]]Stumpers_[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]vs.[[:space:]]Human[[:space:]]Problem-Solvers/bac604db-2799-43ed-ae84-2852b5c29c9f_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Decomposed[[:space:]]Prompt[[:space:]]Tuning[[:space:]]via[[:space:]]Low-Rank[[:space:]]Reparameterization/d70ef92a-241d-491c-b552-1276e339f49f_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Decomposing[[:space:]]Complex[[:space:]]Queries[[:space:]]for[[:space:]]Tip-of-the-tongue[[:space:]]Retrieval/c8fd6958-81b7-4552-9008-e89b6d575c2f_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Defining[[:space:]]a[[:space:]]New[[:space:]]NLP[[:space:]]Playground/b5e3ba61-dd06-4a45-8e68-d11daa04a6bc_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Definitions[[:space:]]Matter_[[:space:]]Guiding[[:space:]]GPT[[:space:]]for[[:space:]]Multi-label[[:space:]]Classification/a17a8549-6457-44a0-9d7b-b99e750314e4_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DeltaScore_[[:space:]]Fine-Grained[[:space:]]Story[[:space:]]Evaluation[[:space:]]with[[:space:]]Perturbations/4f650ed3-5629-4223-b001-c4eb54dcaf34_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DelucionQA_[[:space:]]Detecting[[:space:]]Hallucinations[[:space:]]in[[:space:]]Domain-specific[[:space:]]Question[[:space:]]Answering/abfbf45f-3ac8-40e4-a839-886bba19dfbb_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DemaFormer_[[:space:]]Damped[[:space:]]Exponential[[:space:]]Moving[[:space:]]Average[[:space:]]Transformer[[:space:]]with[[:space:]]Energy-Based[[:space:]]Modeling[[:space:]]for[[:space:]]Temporal[[:space:]]Language[[:space:]]Grounding/2412cf03-7df1-47ed-8664-20d37c7f2cd5_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DemoNSF_[[:space:]]A[[:space:]]Multi-task[[:space:]]Demonstration-based[[:space:]]Generative[[:space:]]Framework[[:space:]]for[[:space:]]Noisy[[:space:]]Slot[[:space:]]Filling[[:space:]]Task/a8271054-21ab-4c9b-81d3-981c2b42aab0_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/DemoSG_[[:space:]]Demonstration-enhanced[[:space:]]Schema-guided[[:space:]]Generation[[:space:]]for[[:space:]]Low-resource[[:space:]]Event[[:space:]]Extraction/aeee44ed-001c-4372-8524-70dccc8b0406_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Democratizing[[:space:]]LLMs_[[:space:]]An[[:space:]]Exploration[[:space:]]of[[:space:]]Cost-Performance[[:space:]]Trade-offs[[:space:]]in[[:space:]]Self-Refined[[:space:]]Open-Source[[:space:]]Models/4770b9fd-de77-4b56-899d-c982de9ae291_origin.pdf filter=lfs diff=lfs merge=lfs -text +2023/Demystifying[[:space:]]Prompts[[:space:]]in[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Perplexity[[:space:]]Estimation/375ed177-07a2-4de2-b0ce-c697ad94dc04_origin.pdf filter=lfs diff=lfs merge=lfs -text diff --git a/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_content_list.json b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8254af6c8ced296d030c8bf09b39a322bfcb316c --- /dev/null +++ b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_content_list.json @@ -0,0 +1,1325 @@ +[ + { + "type": "text", + "text": "Co-training and Co-distillation for Quality Improvement and Compression of Language Models", + "text_level": 1, + "bbox": [ + 184, + 89, + 816, + 130 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Hayeon Lee $^{1*}$ Rui Hou $^{1}$ Jongpil Kim $^{1}$ \nDavis Liang $^{2}$ Hongbo Zhang $^{1}$ Sung Ju Hwang $^{3}$ Alexander Min $^{1}$ \nMeta AI $^{1}$ Abridge AI $^{2}$ KAIST $^{3}$", + "bbox": [ + 208, + 141, + 791, + 192 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "hayeonlee@meta.com rayhou@meta.com jpkim@meta.com \ndavis@abridge.com hbzhang@meta.com sjhwang82@kaist.ac.kr alexmin@meta.com", + "bbox": [ + 161, + 193, + 838, + 225 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 342, + 268 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Knowledge Distillation (KD) compresses computationally expensive pre-trained language models (PLMs) by transferring their knowledge to smaller models, allowing their use in resource-constrained or real-time settings. However, most smaller models fail to surpass the performance of the original larger model, resulting in sacrificing performance to improve inference speed. To address this issue, we propose Co-Training and Co-Distillation (CTCD), a novel framework that improves performance and inference speed together by co-training two models while mutually distilling knowledge. The CTCD framework successfully achieves this based on two significant findings: 1) Distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model. 2) The enhanced performance of the larger model further boosts the performance of the smaller model. The CTCD framework shows promise as it can be combined with existing techniques like architecture design or data augmentation, replacing one-way KD methods, to achieve further performance improvement. Extensive ablation studies demonstrate the effectiveness of CTCD, and the small model distilled by CTCD outperforms the original larger model by a significant margin of 1.66 on the GLUE benchmark.", + "bbox": [ + 144, + 281, + 460, + 693 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 114, + 708, + 260, + 724 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "In recent years, the high computational cost of pretrained language models (PLMs) (Radford et al., 2019; Yang et al., 2019; Dai et al., 2019; Shoeybi et al., 2019; Li et al., 2020; Brown et al., 2020) become a constraint in serving resource-limited or real-time applications. Knowledge Distillation (KD) (Hinton et al., 2015; Romero et al., 2015) is a popular model compression technique to tackle this issue, with a smaller model (student) learning (distilling) from a larger model (teacher).", + "bbox": [ + 112, + 734, + 490, + 896 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "The ideal scenario would involve compressing the teacher to match the size of the small student without any performance drop. However, despite intense research in the area of KD (Turc et al., 2019; Tsai et al., 2019; Tang et al., 2019; Jiao et al., 2020; Sanh et al., 2019a; Sun et al., 2019; Wang et al., 2020b,a), none of the existing methods have successfully avoided performance degradation during the distillation process. Some approaches have attempted to mitigate the performance gap by incorporating external factors. For instance, Jiao et al. (2020) incorporates data augmentation, while Wang et al. (2020b,a) focuses on designing student architecture. However, these approaches have limitations as they only provide supplementary techniques rather than addressing the fundamental issue of performance loss in KD. This raises an interesting question: Can we compress a model without scarifying the performance through KD?", + "bbox": [ + 507, + 252, + 885, + 558 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "In this work, we propose a novel framework called Co-Training and Co-Distillation (CTCD) for improving the performance of a language model while compressing it through KD. CTCD involves jointly training the teacher and the student models, allowing them to transfer knowledge to each other bidirectionally, from the teacher to the student and vice versa. Our work uncovers two key findings within the CTCD framework: Firstly, we demonstrate that transferring knowledge from the smaller model to the larger model during co-training significantly improves the performance of the larger model. In other words, by employing knowledge distillation (KD), we enhance the performance of the teacher model compared to standalone training. This is significantly different from conventional one-way KD, where the teacher model cannot benefit from the distillation process since it is no longer trained or distilled. Secondly, the improved performance of the larger model leads to further enhancements in the performance of the smaller model through KD from the teacher model to the student", + "bbox": [ + 507, + 565, + 885, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_footnote", + "text": "* Work done while interning at Meta AI.", + "bbox": [ + 147, + 904, + 400, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_number", + "text": "7458", + "bbox": [ + 480, + 927, + 521, + 940 + ], + "page_idx": 0 + }, + { + "type": "footer", + "text": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 7458-7467 December 6-10, 2023 ©2023 Association for Computational Linguistics", + "bbox": [ + 216, + 945, + 779, + 972 + ], + "page_idx": 0 + }, + { + "type": "image", + "img_path": "images/d0d292e53efee35483b52cd00a332dd1d5f01ed7dd3d309c7f98be67af4a2f3d.jpg", + "image_caption": [ + "Figure 1: Task-agnostic KD method The proposed framework are task-agnostic KD methods that perform KD during the pre-training stage. This allows the distilled model to be deployed and fine-tuned on various downstream tasks." + ], + "image_footnote": [], + "bbox": [ + 263, + 86, + 724, + 202 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "model. These novel findings enable the smaller model to surpass the independently trained larger model while maintaining its inference efficiency within the CTCD framework. Moreover, the CTCD framework can be combined orthogonally with existing techniques for external factors such as student architecture design Wang et al. (2020b,a) or data augmentation (Jiao et al., 2020). We achieve this by replacing traditional one-way KD methods with the proposed CTCD framework, which holds promise for significant performance improvements in language modeling tasks.", + "bbox": [ + 112, + 256, + 487, + 450 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "In addition to our CTCD framework, we introduce a Community KD that utilizes CTCD framework with the pre-trained teacher model by combining CTCD with conventional KD. Community KD distills knowledge from two students to each other, as well as from the pre-trained teacher to each student, during the co-training of the students. We show that distilling from the other student as well as the pre-trained teacher is better than only one-way distillation from the pre-trained teacher, as is done in conventional KD. Note that the inference cost on a task is the same as in conventional KD, as we take one of the students distilled by Community KD when deploying it to the task.", + "bbox": [ + 112, + 451, + 489, + 676 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "We validate the effectiveness and efficiency of our CTCD on the GLUE benchmark (Wang et al., 2019), which contains different language understanding tasks. As shown in Figure 1, We focus on task-agnostic KD scenarios, where KD occurs during the pre-training stage. Then, we fine-tune the distilled PLMs on each downstream task and evaluate their performance. This is more challenging compared to task-specific KD, as it requires substantial computational resources to train PLMs on a large text corpus, and the distilled knowledge should be transferable across diverse downstream tasks. Our extensive ablation study revealed that the larger model benefits from the distillation of the smaller model, and the performance improvement", + "bbox": [ + 112, + 678, + 489, + 919 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "of the larger model further enhances the performance of the smaller model. In our experiments, the student model compressed by CTCD framework obtained 1.66 higher gain than the original large model trained using a stand-alone method, demonstrating that our approach can improve model quality and inference efficiency concurrently.", + "bbox": [ + 507, + 256, + 884, + 369 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "In summary, our contributions are as follows:", + "bbox": [ + 527, + 370, + 865, + 385 + ], + "page_idx": 1 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- We propose a novel knowledge distillation framework called Co-Training and Co-Distillation (CTCD) framework to improve the performance of models while compressing them through KD.", + "- Through our experiments, we demonstrate that distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model.", + "- Additionally, we highlight that the enhanced performance of the larger model further boosts the performance of the smaller model, resulting in improved performance for both models.", + "- We provide valuable insights into adjusting loss weights and the length of the training phase for the effective application of the CTCD framework through extensive ablation study." + ], + "bbox": [ + 531, + 398, + 884, + 708 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "2 Related Work", + "text_level": 1, + "bbox": [ + 507, + 731, + 665, + 746 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "One-way Knowledge Distillation Knowledge distillation (KD) (Hinton et al., 2015) is a model compression technique in which a smaller student model distills knowledge from a larger, pre-trained teacher model. Recently, many researchers have explored KD to address a high computational complexity of a language model resulting from its increasing size. This includes task-agnostic KD methods for the pre-training stage (Sanh et al., 2019a; Wang et al., 2020b,a), task-specific KD method for", + "bbox": [ + 507, + 758, + 884, + 917 + ], + "page_idx": 1 + }, + { + "type": "page_number", + "text": "7459", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 1 + }, + { + "type": "image", + "img_path": "images/802bc58628f2d24e467622a2b9f73e72a1eb332c43f6f739513283e02d8d1a6f.jpg", + "image_caption": [ + "Figure 2: Co-Training and Co-Distillation (CTCD) During training, the teacher and student models can learn more effectively by comparing their prediction outputs not only against the ground truth but also against each other's predictions. We refer to the former as a \"hard\" loss and the latter as a \"soft\" loss. For example, the student soft loss captures the distance between the student's prediction and the teacher's prediction, and vice versa. This co-training and co-distillation approach improves the performance of the teacher model, which in turn benefits the performance of the student model." + ], + "image_footnote": [], + "bbox": [ + 200, + 82, + 806, + 231 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "the fine-tuning stage (Sun et al., 2019), and both of pre-training and fine-tuning stages (Jiao et al., 2020). Additionally, Wang et al. (2020b,a) have redesigned the architectures of student language models. However, the one-way KD can lead to a loss of knowledge, resulting in smaller models that generally have difficulty matching the performance of larger models, leading to performance degradation. In contrast, our CTCD can improve the quality of both teacher and student models, making it possible for the student to achieve the same quality as the original teacher model.", + "bbox": [ + 112, + 317, + 489, + 511 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Reversed Knowledge Distillation Recently, researchers (Yuan et al., 2020; Qin et al., 2022; Lee et al., 2023) have demonstrated that reversed Knowledge Distillation (reversed KD), which transfers knowledge from a smaller or poorer model to a larger model, can improve the performance of the student model. In particular, Qin et al. (2022); Lee et al. (2023) investigated the application of reversed KD in the PLMs, showing that a larger model can benefit from a poorer and pre-trained model for a specific downstream task. Inspired by the success of reversed KD, we design a co-distillation framework that includes reversed KD to improve the performance of the teacher model by distilling knowledge from the smaller student model. Unlike existing reversed KD methods, which are limited to improving the performance of the larger model, our proposed co-distillation framework can achieve both performance improvement and model compression, by showing a better-quality teacher leads to a better-quality student.", + "bbox": [ + 112, + 514, + 489, + 853 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3 Co-training and Co-distillation", + "text_level": 1, + "bbox": [ + 112, + 863, + 416, + 879 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "We first introduce the concepts of co-training and co-distillation briefly:", + "bbox": [ + 112, + 888, + 487, + 921 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Co-training trains two (different-sized) models (e.g., a teacher and student) concurrently with the goal of achieving similar model quality.", + "bbox": [ + 507, + 317, + 882, + 367 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Co-distillation transfers knowledge in both directions between two models (e.g., a teacher and student), during co-training.", + "bbox": [ + 507, + 370, + 882, + 419 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Figure 2 illustrates how co-trained models learn together by comparing their prediction outputs against predictions from each other and to the hard labels (or \"ground truth\"). We refer to the former as a \"soft\" loss and the latter as a \"hard\" loss. For instance, the soft loss of the student model measures the accuracy of the student's prediction by considering the teacher's prediction as a soft label, and vice versa.", + "bbox": [ + 507, + 419, + 882, + 562 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Task Formulation Suppose that we are given a classification task with $K$ classes. For each training instance $x$ and its ground truth label $y$ , we denote that the ground truth distribution over the labels is $q(k|x)$ ( $q(k)$ for simplicity) where for each label $k \\in \\{1 \\dots K\\}$ , $q(y) = 1$ and $q(k) = 0$ for all $k \\neq y$ . For each $x$ , the teacher model $t_{\\phi}$ parameterized by $\\phi$ and the student model $s_{\\theta}$ parameterized by $\\pmb{\\theta}$ predict the probability of each label $k$ as $p_{\\phi}^{\\tau}(k|x)$ and $p_{\\theta}^{\\tau}(k|x)$ , respectively as follows:", + "bbox": [ + 507, + 573, + 884, + 736 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\np _ {\\phi} ^ {\\tau} (k | x) = f (\\boldsymbol {z} ^ {t}) = \\frac {\\exp (z _ {k} ^ {t} / \\tau)}{\\sum_ {i = 1} ^ {K} \\exp (z _ {i} ^ {t} / \\tau)}\n$$\n", + "text_format": "latex", + "bbox": [ + 549, + 747, + 836, + 785 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\np _ {\\boldsymbol {\\theta}} ^ {\\tau} (k | x) = f \\left(\\boldsymbol {z} ^ {s}\\right) = \\frac {\\exp \\left(z _ {k} ^ {s} / \\tau\\right)}{\\sum_ {i = 1} ^ {K} \\exp \\left(z _ {i} ^ {s} / \\tau\\right)}\n$$\n", + "text_format": "latex", + "bbox": [ + 549, + 795, + 836, + 831 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "where $f$ is the softmax function, $\\boldsymbol{z}^t = \\{z_i^t\\}_{i=1}^K = t_\\phi(x)$ is the output logit of the teacher model, $\\boldsymbol{z}^s = \\{z_i^s\\}_{i=1}^K = s_\\theta(x)$ is the output logit of the student model, and $\\tau$ is the temperature to soften $p_\\phi(k)$ and $p_\\theta(k)$ .", + "bbox": [ + 507, + 838, + 882, + 919 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "7460", + "bbox": [ + 480, + 927, + 521, + 940 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/3cce1d7832d9f9783e4c1498ea96105b0a5d95d1557d91f872033827aeab68d6.jpg", + "image_caption": [ + "Figure 3: Community KD Different from conventional KD, where each student learns from the prediction of the pre-trained teacher only, the proposed approach learns each student from both prediction of the pre-trained teacher and prediction of another student during co-training. Note that since we take one of the pre-trained students to adapt it to downstream tasks, the inference cost is the same as the student training with the conventional KD." + ], + "image_footnote": [], + "bbox": [ + 152, + 80, + 868, + 244 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "The proposed objective $\\mathcal{L}_{CTCD}(\\pmb {\\theta},\\phi)$ consists of a normal KD objective $\\mathcal{L}_{KD:t\\to s}$ to distill knowledge from the teacher model to the student model and a reversed KD objective $\\mathcal{L}_{ReKD:s\\to t}$ to distill knowledge from the student model to the teacher model, during their co-training.", + "bbox": [ + 112, + 321, + 487, + 418 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Teacher $\\rightarrow$ Student The normal KD objective $\\mathcal{L}_{KD:t\\to s}(\\pmb {\\theta},\\pmb {\\phi})$ aims to train the student model by minimizing a weighted sum of the cross-entropy loss $H(q,p_{\\theta})$ between the ground truth $q$ and student prediction $p_{\\theta}$ and Kullback-Leibler divergence (KL divergence) $D(p_{\\phi}^{\\tau},p_{\\theta}^{\\tau})$ between the predictions of the student and the teacher as follows:", + "bbox": [ + 112, + 426, + 489, + 539 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {K D} (\\boldsymbol {\\theta}, \\phi) = \\alpha_ {h} \\cdot H (q, p _ {\\boldsymbol {\\theta}}) + \\alpha_ {s} \\cdot D \\left(p _ {\\phi} ^ {\\tau}, p _ {\\boldsymbol {\\theta}} ^ {\\tau}\\right) \\tag {1}\n$$\n", + "text_format": "latex", + "bbox": [ + 127, + 552, + 485, + 585 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "where", + "bbox": [ + 112, + 587, + 164, + 600 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\nH (q, p _ {\\boldsymbol {\\theta}}) = - \\sum_ {k = 1} ^ {K} q (k) \\log (p _ {\\boldsymbol {\\theta}} (k)),\n$$\n", + "text_format": "latex", + "bbox": [ + 166, + 611, + 433, + 655 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\nD (p _ {\\phi} ^ {\\tau}, p _ {\\pmb {\\theta}} ^ {\\tau}) = \\sum_ {k = 1} ^ {K} p _ {\\phi} ^ {\\tau} (k) \\cdot \\log \\frac {p _ {\\phi} ^ {\\tau} (k)}{p _ {\\pmb {\\theta}} ^ {\\tau} (k)},\n$$\n", + "text_format": "latex", + "bbox": [ + 164, + 658, + 436, + 701 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "$\\alpha_{h}$ and $\\alpha_{s}$ are weighting hyper-parameter values for the cross-entropy loss and KL divergence, respectively. We regard the cross-entropy loss $H(q,p_{\\theta})$ as the hard loss for the student model, KL divergence $D(p_{\\phi}^{\\tau},p_{\\theta}^{\\tau})$ as the soft loss for the student model, and following BERT (Devlin et al., 2019), $H(q,p_{\\theta})$ denotes the Masked Language Modeling loss (MLM loss). In the KD objective, we consider the teacher parameters $\\phi$ as constant since we only train the student parameters $\\theta$ while the teacher model $t_{\\phi}$ is fixed:", + "bbox": [ + 112, + 712, + 489, + 889 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {K D: t \\rightarrow s} (\\boldsymbol {\\theta}, \\operatorname {S t o p G} (\\phi)) \\tag {2}\n$$\n", + "text_format": "latex", + "bbox": [ + 208, + 902, + 487, + 920 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "where $\\operatorname{StopG}(x)$ denotes that we do not compute the gradient of $x$ . In the conventional KD method, Equation (2) is the final objective to learn the student model only with the pre-trained teacher model.", + "bbox": [ + 507, + 321, + 884, + 387 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Student $\\rightarrow$ Teacher Different from such a one-way KD method, we introduce the reversed KD objective $\\mathcal{L}_{ReKD:s\\to t}(\\operatorname {StopG}(\\pmb {\\theta}),\\phi)$ to train the teacher model $t_\\phi$ as follows:", + "bbox": [ + 507, + 397, + 882, + 463 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {R e K D: s \\rightarrow t} (\\operatorname {S t o p G} (\\boldsymbol {\\theta}), \\phi) = \\tag {3}\n$$\n", + "text_format": "latex", + "bbox": [ + 584, + 476, + 882, + 502 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\beta_ {h} \\cdot H (q, p _ {\\phi}) + \\beta_ {s} \\cdot D (p _ {\\boldsymbol {\\theta}} ^ {\\tau}, p _ {\\phi} ^ {\\tau})\n$$\n", + "text_format": "latex", + "bbox": [ + 579, + 499, + 811, + 514 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "where $\\beta_{h}$ and $\\beta_{s}$ are weighting hyper-parameter values of the hard loss $H(q,p_{\\phi})$ and soft loss $D(p_{\\theta}^{\\tau},p_{\\phi}^{\\tau})$ for the teacher model, respectively. By minimizing KL divergence $D(p_{\\theta}^{\\tau},p_{\\phi}^{\\tau})$ between the predictions of the student model $(p_{\\theta}^{\\tau})$ and the teacher model $(p_{\\phi}^{\\tau})$ , the teacher model learns from the student model. In the reversed KD objective, we only train the teacher model by applying $\\operatorname{StopG}(x)$ to the gradient of the student parameters $\\theta$ .", + "bbox": [ + 507, + 527, + 882, + 675 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Co-training With the Equations (2) and (3), we get the final objective $\\mathcal{L}_{CTCD}(\\pmb {\\theta},\\phi)$ as follows:", + "bbox": [ + 507, + 686, + 880, + 718 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\boldsymbol {\\theta} ^ {*}, \\phi^ {*} = \\underset {\\boldsymbol {\\theta}, \\boldsymbol {\\phi}} {\\operatorname {a r g m i n}} \\mathcal {L} _ {C T C D} (\\boldsymbol {\\theta}, \\boldsymbol {\\phi}) =\n$$\n", + "text_format": "latex", + "bbox": [ + 564, + 732, + 826, + 759 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {K D} (\\boldsymbol {\\theta}, \\operatorname {S t o p G} (\\phi)) + \\mathcal {L} _ {R e K D} (\\operatorname {S t o p G} (\\boldsymbol {\\theta}), \\phi) \\tag {4}\n$$\n", + "text_format": "latex", + "bbox": [ + 527, + 762, + 880, + 794 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Adapting to Downstream Task After model cotraining/-distillation, the trained smaller (student) model $s_{\\theta^*}$ with trained parameter $\\theta^*$ can be deployed for multiple downstream tasks to improve inference efficiency. To fine-tune the model for a specific downstream task, we adapt the trained parameter $\\theta^*$ using the dataset for that task.", + "bbox": [ + 507, + 806, + 882, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_number", + "text": "7461", + "bbox": [ + 480, + 927, + 517, + 940 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "4 Community KD", + "text_level": 1, + "bbox": [ + 112, + 84, + 287, + 99 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Furthermore, we introduce an advanced CTCD application named Community KD that can utilize CTCD framework with the pre-trained teacher model, as shown in Figure 3. It consists of a pre-trained teacher $t_{\\phi^*}$ with pre-trained parameters $\\phi^*$ and two students $s_{\\theta_1}$ and $s_{\\theta_2}$ parameterized by $\\theta_1$ and $\\theta_2$ , respectively. During the co-training of two students, each student learns from the hard labels, soft labels generated from the pre-trained teacher predictions, and soft labels generated from other student predictions. In other words, we conduct one-way knowledge distillation from the pre-trained teacher to each student by minimizing KL divergence between the teacher prediction and predictions of each student $D(p_{\\theta_1}^\\tau, p_{\\phi^*}^\\tau)$ and $D(p_{\\theta_2}^\\tau, p_{\\phi^*}^\\tau)$ and co-distillation between students in both directions by minimizing $\\mathcal{L}_{CTCD}(\\pmb{\\theta}_1, \\pmb{\\theta}_2)$ . The final objective $\\mathcal{L}_{CM}(\\pmb{\\theta}_1, \\pmb{\\theta}_2, \\mathrm{StopG}(\\pmb{\\phi}^*))$ is as follows:", + "bbox": [ + 112, + 109, + 489, + 399 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\boldsymbol {\\theta} _ {1} ^ {*}, \\boldsymbol {\\theta} _ {2} ^ {*} = \\underset {\\boldsymbol {\\theta} _ {1}, \\boldsymbol {\\theta} _ {2}} {\\operatorname {a r g m i n}} \\mathcal {L} _ {C M} (\\boldsymbol {\\theta} _ {1}, \\boldsymbol {\\theta} _ {2}, \\operatorname {S t o p G} (\\boldsymbol {\\phi} ^ {*})) =\n$$\n", + "text_format": "latex", + "bbox": [ + 124, + 411, + 475, + 439 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {C T C D} \\left(\\boldsymbol {\\theta} _ {\\mathbf {1}}, \\boldsymbol {\\theta} _ {\\mathbf {2}}\\right) + D \\left(p _ {\\boldsymbol {\\theta} _ {\\mathbf {1}}} ^ {\\tau}, p _ {\\boldsymbol {\\phi} ^ {*}} ^ {\\tau}\\right) + D \\left(p _ {\\boldsymbol {\\theta} _ {\\mathbf {2}}} ^ {\\tau}, p _ {\\boldsymbol {\\phi} ^ {*}} ^ {\\tau}\\right) \\tag {5}\n$$\n", + "text_format": "latex", + "bbox": [ + 124, + 441, + 485, + 473 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We select one of the two students distilled by Community KD $(\\pmb{\\theta}^{*} = \\pmb{\\theta}_{1}^{*}$ or $\\pmb{\\theta}^{*} = \\pmb{\\theta}_{2}^{*})$ and fine-tune the selected single student $s_{\\theta^*}$ for downstream tasks, resulting that the inference cost does not increase compared with the conventional KD method.", + "bbox": [ + 112, + 475, + 489, + 552 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "5 Experiment", + "text_level": 1, + "bbox": [ + 112, + 565, + 252, + 583 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We present a comprehensive analysis of the proposed CTCD method through empirical experiments. In Section 5.1, we validate our CTCD method by comparing the performance of small models distilled by CTCD to the original large model on the GLUE benchmark (Wang et al., 2019). In Section 5.2, we analyze the impact of co-distillation by adjusting loss weights for the soft losses of a student and a teacher. In Section 5.3, we study the impact of training length on CTCD method, allowing us to determine the optimal training length for CTCD method. In Section 5.4, we demonstrate the efficacy of Community KD by comparing the performance of a model distilled by the Community KD to a model distilled by the one-way KD.", + "bbox": [ + 112, + 592, + 489, + 833 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Implementation details We use a learning rate of 5e-4, linear warm-up of $5\\%$ , AdamW optimizer (Loshchilov and Hutter, 2019), and batch size of 128 with A100 GPUs for pre-training. We train the teacher and student models from scratch", + "bbox": [ + 112, + 839, + 489, + 917 + ], + "page_idx": 4 + }, + { + "type": "image", + "img_path": "images/629d3c08e3879383bed68ff8467013bbf2893270749e28a009430cf698ef1b8e.jpg", + "image_caption": [ + "Figure 4: Average performance on dev sets of GLUE benchmark after training 10 epochs Learning from the student improves the performance of the teacher by an average of 1.88. Such improvement in teacher performance leads to improvement in student quality from 77.46 to 77.94." + ], + "image_footnote": [], + "bbox": [ + 521, + 86, + 858, + 247 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "for 20 epochs in Section 5.1. To analyze the effectiveness of CTCD method, we train the teacher and student models for 10 epochs and 20 epochs in Section 5.2 and Section 5.3, respectively. In Section 5.4, we train the models for 3 epochs after parameter remapping, which is the same as in conventional one-way KD method (Sanh et al., 2019a).", + "bbox": [ + 507, + 328, + 884, + 441 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Training Time For the one-way distillation, we need 1 GPU day to train the teacher for 10 epochs and 1.3 GPU days to distill knowledge from the pre-trained teacher to the student for another 10 epochs, which consumes a total of 2.3 days. For CTCD, it takes 3 GPU days to train both teacher and student models from scratch for 10 epochs. We use the automatic mixed precision (AMP) of PyTorch (Paszke et al., 2019) to accelerate training for all our models.", + "bbox": [ + 507, + 458, + 882, + 619 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Dataset To validate our CTCD method, we use a reduced dataset (30M) created by uniformly sampling 1 out of every 4 sentences from the original pre-training dataset (BookCorpus (Zhu et al., 2015) + Wikipedia (Foundation)) used in the conventional one-way KD method (Sanh et al., 2019a). We evaluate our distilled models on the dev sets of the GLUE benchmark (Wang et al., 2019), which consists of nine sentence-level classification tasks. In Section 5.4, we use the original pre-training dataset to train Community KD method.", + "bbox": [ + 505, + 625, + 882, + 801 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Model Architecture We use a 6-layer BERT (Devlin et al., 2019) model as the teacher and a 4-layer BERT model as the student to analyze the effectiveness and efficiency of our CTCD method. In Section 5.4, we use a pre-trained BERT-base model as the teacher and a 6-layer BERT model as the student.", + "bbox": [ + 507, + 806, + 884, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_number", + "text": "7462", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 4 + }, + { + "type": "table", + "img_path": "images/01530bdb71c4abc46e2bdd858c96e147b404d03b043f4261fc969ea6c957c000.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
PerformanceGAP w/ Teacher
Original Teacher78.06-
StudentOne-way Distil. (10 epoch)77.46-0.60
CTCD (10 epoch)77.94-0.12
One-way Distil. (20 epoch)78.39+0.33
CTCD (20 epoch)79.12+1.66
", + "bbox": [ + 221, + 80, + 774, + 204 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Table 1: Average performance on dev sets of GLUE benchmark The student distilled by CTCD significantly outperforms the original teacher trained using the stand-alone method, achieving a higher gain of 1.66.", + "bbox": [ + 112, + 215, + 882, + 242 + ], + "page_idx": 5 + }, + { + "type": "image", + "img_path": "images/e6477641fb7d72bfd604577452fd871da7a702da233fd9d17fa1cad1dae7cd3a.jpg", + "image_caption": [ + "(a) Teacher Performance" + ], + "image_footnote": [], + "bbox": [ + 132, + 253, + 490, + 420 + ], + "page_idx": 5 + }, + { + "type": "image", + "img_path": "images/95465e08b4a98da6f7b866e96302ddfeb989b9d903d367a69600010ece7b5758.jpg", + "image_caption": [ + "(b) Student Performance" + ], + "image_footnote": [], + "bbox": [ + 500, + 253, + 860, + 420 + ], + "page_idx": 5 + }, + { + "type": "image", + "img_path": "images/534e57ab140f7df0befb22ca0566a646b9d631174dfe28b45dcbdee40e11bd61.jpg", + "image_caption": [ + "Figure 5: Adjusting Loss Weight We investigate the impact of the distillation for the teacher model and student model by adjusting loss weights $(\\alpha_{h},\\alpha_{s},\\beta_{h},\\beta_{s})$ for hard loss and soft loss. (a) We (co-)train the teacher model distilling knowledge from the student by fixing $\\alpha_{h}:\\alpha_{s} = 1:1$ and varying $\\beta_{h}:\\beta_{s}$ on the large text corpus. (b) We (co-)train the student model distilling knowledge from the teacher by fixing $\\beta_{h}:\\beta_{s} = 1:1$ and varying $\\alpha_{h}:\\alpha_{s}$ on the large text corpus. Then we report the average performance of each pre-trained model after fine-tuning it on downstream tasks (dev sets) of GLUE benchmark.", + "Figure 6: Length of Training We pre-trained student models under two different training lengths 10/20 epochs while distilling knowledge from teacher models via ours or the conventional KD method. Then we adapt pre-trained student models on CoLA task. With enough longer training (20 epoch), the student model distilled by ours significantly outperforms the student model distilled by the conventional KD method, with a higher gain of 5.22." + ], + "image_footnote": [], + "bbox": [ + 117, + 521, + 478, + 690 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "5.1 Could Knowledge Distillation Help Improve Performance?", + "text_level": 1, + "bbox": [ + 112, + 816, + 435, + 848 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "In Table 1 and Figure 4, we show the average performance of models trained using different methods on a large text corpus and fine-tuned against the GLUE benchmark. Stand-alone trains a model", + "bbox": [ + 112, + 854, + 487, + 917 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "without using any knowledge distillation. Co-training & One-way distillation trains teacher and student models together from scratch, with knowledge only flowing from the teacher to the student. Co-training & Co-distillation (Ours) is CTCD method, which trains both teacher and student models together from scratch and distills knowledge between each other in both directions. For distillation methods, we set the weights of the hard losses for the teacher and student to 1. The weights of the soft losses are chosen from the set $\\{0.5, 1, 2, 4\\}$ , and the results are reported with the best-performing weights.", + "bbox": [ + 507, + 521, + 884, + 731 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "1) Overall Results As shown in Table 1, the student distilled by CTCD method significantly outperforms the original teacher trained using the stand-alone method on the average performance of the GLUE benchmark, achieving a higher gain of 1.66. Furthermore, the student model distilled by our CTCD method outperforms the student distilled by the one-way distillation method on the average performance of the GLUE benchmark. After training for 10 and 20 epochs, the student distilled by our CTCD method consistently has higher gains", + "bbox": [ + 507, + 741, + 884, + 919 + ], + "page_idx": 5 + }, + { + "type": "page_number", + "text": "7463", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "than the student distilled by one-way distillation, as 77.46 vs. 77.94 and 78.39 vs. 79.12, respectively.", + "bbox": [ + 112, + 84, + 485, + 116 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "2) Does learning from a small and weak student provide a performance benefit to the teacher?", + "text_level": 1, + "bbox": [ + 112, + 124, + 485, + 155 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "As shown in Figure 4, the distillation of knowledge from the student model to the teacher model has been shown to significantly improve the quality of the teacher model, with an average increase of 1.88 compared to teacher training methods that do not incorporate such distillation process (such as Stand-alone and Co-training & one-way distillation).", + "bbox": [ + 112, + 156, + 487, + 269 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "3) Is the teacher's performance improvement reflected in the student's performance improvement? Furthermore, we find that a better teacher leads to further performance improvement of the student from 77.46 to 77.94. The results demonstrate that the distillation process successfully improves the performance of both the teacher and student. The student trained with our CTCD method achieves better performance than students trained with the Stand-alone or Co-training & one-way distillation methods, with an average improvement of 0.88 and 0.47, respectively.", + "bbox": [ + 112, + 273, + 489, + 464 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "5.2 In-depth Study 1: Adjusting Loss Weights", + "text_level": 1, + "bbox": [ + 112, + 476, + 485, + 492 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "In this Section, we investigate the impact of distillation on the performance of both the student and the teacher by adjusting loss weights $(\\alpha_{h},\\alpha_{s},\\beta_{h},\\beta_{s})$ for hard loss and soft loss. For example, setting $\\alpha_{h}:\\alpha_{s} = 1:4$ emphasizes learning from the teacher's knowledge (i.e., the soft loss for the student) $4\\times$ more than the ground truth label distribution (i.e., the hard loss for the student), during co-training. This allows us to better understand the effect of distillation on each model and optimize their performance.", + "bbox": [ + 112, + 497, + 487, + 673 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Teacher side In Figure 5(a), we co-train the teacher model using distillation to transfer knowledge from the student model. We fix the weighting values for the losses of the student to $\\alpha_{h}:\\alpha_{s} = 1:1$ and vary the weighting values for the losses of the teacher, $\\beta_{h}:\\beta_{s}$ , while training on a large text corpus. We then evaluate the average performance of the pre-trained teacher models on downstream tasks from the dev sets of GLUE benchmark.", + "bbox": [ + 112, + 678, + 487, + 820 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Our results show that co-training the teacher with distillation outperforms training the teacher alone, regardless of the weighting values for the soft loss, by obtaining higher gains of 0.36, 0.77, 1.80, and 1.02 for $\\beta_h: \\beta_s = 1:1, 1:2, 1:4,$ and $4:4$ , respectively. Additionally, we find that giving more", + "bbox": [ + 112, + 822, + 487, + 917 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "weight to the soft loss of the teacher during training $(\\alpha_{h}:\\alpha_{s}:\\beta_{h}:\\beta_{\\mathbf{s}} = 1:1:1:\\mathbf{1}\\to 1:1:1:$ $2\\rightarrow 1:1:1:4)$ leads to improved performance, with an average score of $78.42\\to 78.83\\to 79.86$ Furthermore, we observe that emphasizing only the soft loss of the teacher $(1:1:1:4)$ yields better performance than emphasizing both the hard and soft losses of the teacher $(1:1:4:4)$ , with an average score of 79.86 vs. 79.09.", + "bbox": [ + 507, + 84, + 882, + 227 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Student side We find that the student model's performance is not sensitive to the weighting values for the hard and soft losses of the student, $(\\alpha_h:\\alpha_s)$ . Regardless of the chosen values, co-training the student with distillation consistently improves its performance compared to training the student alone. For instance, when we emphasize the soft loss of the student by increasing the weighting value for $(\\alpha_{s})$ as $1:1:1:1\\to 1:2:1:1\\to 1:4:1:1$ , we observe similar levels of performance for the student model.", + "bbox": [ + 507, + 235, + 884, + 411 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "5.3 In-depth Study 2: Length of Training", + "text_level": 1, + "bbox": [ + 507, + 423, + 848, + 439 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "We studied the impact of co-training length on the effectiveness of the CTCD method (see Figure 6). We find that longer training leads to improved performance, as demonstrated by our experiments using two different training lengths: 10 epochs and 20 epochs. After pre-training the student models with these different lengths, we adapted them to the CoLA downstream tasks and evaluated their performance using Matthew Correlation.", + "bbox": [ + 507, + 445, + 882, + 589 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Results By increasing the (co-)training length from 10 epochs to 20 epochs, CTCD (Ours) significantly improves the performance of the student model from 35.02 to 46.23, with a gain of 11.21. This outperforms the conventional KD method, which only achieves a gain of 0.07 from 40.94 to 41.01, despite a longer training time. The conventional KD method relies on a pre-trained teacher model to train the student model, which allows for fast convergence but limits the learning of the student model. In contrast, the CTCD method allows for additional performance gains for both the teacher and student models by enabling them to learn and grow together during co-training. This can provide further benefits to the student model's performance with longer co-training.", + "bbox": [ + 507, + 596, + 882, + 853 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "5.4 Efficacy of Community KD", + "text_level": 1, + "bbox": [ + 507, + 865, + 769, + 881 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "We compare the proposed Community KD with the conventional one-way KD method (Sanh et al.,", + "bbox": [ + 507, + 887, + 882, + 917 + ], + "page_idx": 6 + }, + { + "type": "page_number", + "text": "7464", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/9128fccd690d8d9f87e505f97fbec79fc86ec1d26ed9e4e4b7eb412ba296ca1c.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Downstream TaskMetricDataset SizeAMPMNLI Acc. 392.7kQQP Acc. 363.8kQNLI Acc. 104.7kSST-2 Acc. 67.3kCoLA Matthew. 8.5kSTSB Pearson. 5.7kMRPC F1 3.7kAcc. 2.5kRTE Acc.
TeacherBERT (109M)84.1790.8990.6891.8657.5488.8488.5689.3185.0465.3483.23
Student(67M)One-way KD (Sanh et al., 2019b)FP3281.9390.0587.7290.9452.0386.2886.0787.9482.5957.7680.33
Ours: Student 1FP1681.8890.1788.2491.5154.8286.7086.4989.7685.2959.2181.40
Ours: Student 2FP1681.3489.7588.3790.7156.0886.4286.4489.8085.2959.2081.34
", + "bbox": [ + 114, + 80, + 880, + 173 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Table 2: Efficacy of Community KD The pre-trained BERT and 6-layer BERT is the teacher model and student architecture, respectively, for both ours and the conventional one-way KD method. We fine-tune the distilled students on dev sets of GLUE benchmark. We observe that learning from the soft knowledge of different student models improves performance over the conventional one-way KD method on most downstream tasks.", + "bbox": [ + 112, + 181, + 884, + 233 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "2019a). To ensure a fair comparison, we use the pre-trained BERT-base as the teacher model for both methods and the 6-layer BERT as the student, which is the same architecture used in the conventional one-way KD method. As described in Section 4, we train two student models concurrently and they learn from the pre-trained BERT, the ground truth labels, and each other's knowledge. Note that since we fine-tune one of the two students distilled by Community KD for downstream tasks, the inference cost is the same as the conventional one-way KD method. In Table 2, we report the results of BERT and the conventional one-way KD method using checkpoints provided by Hugging Face (HuggingFace) and both students (Ours: Student 1 and Ours: Student 2) on the dev sets of the GLUE benchmark. We apply Automatic Mixed Precision (AMP) (Paszke et al., 2019) to Community KD, which typically speeds up training but may hurt performance.", + "bbox": [ + 115, + 247, + 490, + 570 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Results The results presented in Table 2 show that Community KD, leads to improved performance on downstream tasks such as QQP, QNLI, SST-2, CoLA, STSB, MRPC, and RTE, even when applying quantization techniques. Specifically, the average performance gain of the student model distilled using our Community KD method is 1.04 (1.2%) higher than that of the student model distilled by the conventional one-way KD method. This suggests that incorporating knowledge distillation from both a student model and a pre-trained teacher model is more effective than only using knowledge distillation from the pre-trained teacher model.", + "bbox": [ + 112, + 575, + 489, + 800 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "6 Limitations & Future Work", + "text_level": 1, + "bbox": [ + 112, + 813, + 389, + 829 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Limitations The proposed method co-train models from scratch and may require a longer pretraining time than the conventional KD method. However, as we described in Section 5.3, when the student model is trained long enough with its", + "bbox": [ + 112, + 838, + 489, + 919 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "teacher, it can outperform the models trained with the conventional KD on the downstream task. The proposed co-training method may increase the overall training cost compared with one-way distillation, and it may become a performance bottleneck depending on training resource constraints. However, note that CTCD can improve model quality while having the same inference cost as the one-way distillation on downstream tasks.", + "bbox": [ + 507, + 248, + 884, + 393 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Future Work 1) Architecture Sharing. Models can share some of their architectures by reusing the output of such architectures and updating them together during back-propagation. This may help reduce the additional computing and memory overhead incurred by model co-training, while improving the model quality, especially for the student model. 2) Integration of Student Architecture Design and Data Augmentation. Future research can focus on effectively combining the CTCD framework with student architecture design and data augmentation techniques. This integration provides a promising alternative to traditional one-way knowledge distillation methods, leading to significant improvements in language modeling tasks.", + "bbox": [ + 507, + 401, + 884, + 643 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "7 Conclusion", + "text_level": 1, + "bbox": [ + 509, + 653, + 640, + 668 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "The size and complexity of pre-trained language models (PLMs) can hinder their practicality for online downstream tasks. To address this, we introduced a novel framework called co-training and co-distillation (CTCD). By training models of different sizes together and extracting inter-model knowledge in both directions, the proposed CTCD framework improves both model efficiency and performance. The proposed framework overcomes the trade-off between efficiency and performance in traditional one-way knowledge distillation methods. Notably, our compressed models achieved an impressive gain of 1.66 on the GLUE benchmark, outperforming large models trained using standalone methods.", + "bbox": [ + 507, + 677, + 884, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_number", + "text": "7465", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "References", + "text_level": 1, + "bbox": [ + 115, + 84, + 213, + 98 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. In NeurIPS.", + "Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. 2019. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2978-2988, Florence, Italy. Association for Computational Linguistics.", + "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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186.", + "Wikipedia Foundation. Wikipedia downloads.", + "Geoffrey Hinton, Oriol Vinyals, Jeff Dean, et al. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2(7).", + "HuggingFace. Huggingface.", + "Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. 2020. TinyBERT: Distilling BERT for natural language understanding. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 4163-4174, Online. Association for Computational Linguistics.", + "Hayeon Lee, Rui Hou, Jongpil Kim, Davis Liang, Sung Ju Hwang, and Alexander Min. 2023. A study on knowledge distillation from weak teacher for scaling up pre-trained language models. arXiv preprint arXiv:2305.18239.", + "Chunyuan Li, Xiang Gao, Yuan Li, Xiujun Li, Baolin Peng, Yizhe Zhang, and Jianfeng Gao. 2020. Optimus: Organizing sentences via pre-trained modeling of a latent space. In EMNLP.", + "Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.", + "Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch:" + ], + "bbox": [ + 115, + 105, + 487, + 917 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc.", + "Yujia Qin, Yankai Lin, Jing Yi, Jiajie Zhang, Xu Han, Zhengyan Zhang, Yusheng Su, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2022. Knowledge inheritance for pre-trained language models. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3921-3937, Seattle, United States. Association for Computational Linguistics.", + "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.", + "Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. 2015. Fitnets: Hints for thin deep nets. In *In Proceedings of ICLR*.", + "Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019a. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.", + "Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019b. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.", + "Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. 2019. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053.", + "Siqi Sun, Yu Cheng, Zhe Gan, and Jingjing Liu. 2019. Patient knowledge distillation for BERT model compression. 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 4323-4332, Hong Kong, China. Association for Computational Linguistics.", + "Raphael Tang, Yao Lu, Linqing Liu, Lili Mou, Olga Vechtomova, and Jimmy Lin. 2019. Distilling task-specific knowledge from bert into simple neural networks. arXiv preprint arXiv:1903.12136.", + "Henry Tsai, Jason Riesa, Melvin Johnson, Naveen Arivazhagan, Xin Li, and Amelia Archer. 2019. Small and practical BERT models for sequence labeling. 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 3632-3636, Hong Kong, China. Association for Computational Linguistics." + ], + "bbox": [ + 510, + 85, + 880, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_number", + "text": "7466", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: The impact of student initialization on knowledge distillation. arXiv preprint arXiv:1908.08962, 13.", + "Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations.", + "Wenhui Wang, Hangbo Bao, Shaohan Huang, Li Dong, and Furu Wei. 2020a. Minilmv2: Multi-head self-attention relation distillation for compressing pretrained transformers. arXiv preprint arXiv:2012.15828.", + "Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. 2020b. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in Neural Information Processing Systems, 33:5776-5788.", + "Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc.", + "Li Yuan, Francis EH Tay, Guilin Li, Tao Wang, and Jiashi Feng. 2020. Revisiting knowledge distillation via label smoothing regularization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3903-3911.", + "Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pages 19-27." + ], + "bbox": [ + 115, + 85, + 487, + 630 + ], + "page_idx": 9 + }, + { + "type": "page_number", + "text": "7467", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 9 + } +] \ No newline at end of file diff --git a/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_model.json b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d21f8e35f74d7a7f3a8c587eb7cdde263f1bd51b --- /dev/null +++ b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_model.json @@ -0,0 +1,1683 @@ +[ + [ + { + "type": "title", + "bbox": [ + 0.185, + 0.09, + 0.817, + 0.131 + ], + "angle": 0, + "content": "Co-training and Co-distillation for Quality Improvement and Compression of Language Models" + }, + { + "type": "text", + "bbox": [ + 0.21, + 0.142, + 0.792, + 0.193 + ], + "angle": 0, + "content": "Hayeon Lee\\(^{1*}\\) Rui Hou\\(^{1}\\) Jongpil Kim\\(^{1}\\) \nDavis Liang\\(^{2}\\) Hongbo Zhang\\(^{1}\\) Sung Ju Hwang\\(^{3}\\) Alexander Min\\(^{1}\\) \nMeta AI\\(^{1}\\) Abridge AI\\(^{2}\\) KAIST\\(^{3}\\)" + }, + { + "type": "text", + "bbox": [ + 0.163, + 0.195, + 0.84, + 0.227 + ], + "angle": 0, + "content": "hayeonlee@meta.com rayhou@meta.com jpkim@meta.com \ndavis@abridge.com hbzhang@meta.com sjhwang82@kaist.ac.kr alexmin@meta.com" + }, + { + "type": "title", + "bbox": [ + 0.261, + 0.253, + 0.343, + 0.269 + ], + "angle": 0, + "content": "Abstract" + }, + { + "type": "text", + "bbox": [ + 0.145, + 0.282, + 0.461, + 0.694 + ], + "angle": 0, + "content": "Knowledge Distillation (KD) compresses computationally expensive pre-trained language models (PLMs) by transferring their knowledge to smaller models, allowing their use in resource-constrained or real-time settings. However, most smaller models fail to surpass the performance of the original larger model, resulting in sacrificing performance to improve inference speed. To address this issue, we propose Co-Training and Co-Distillation (CTCD), a novel framework that improves performance and inference speed together by co-training two models while mutually distilling knowledge. The CTCD framework successfully achieves this based on two significant findings: 1) Distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model. 2) The enhanced performance of the larger model further boosts the performance of the smaller model. The CTCD framework shows promise as it can be combined with existing techniques like architecture design or data augmentation, replacing one-way KD methods, to achieve further performance improvement. Extensive ablation studies demonstrate the effectiveness of CTCD, and the small model distilled by CTCD outperforms the original larger model by a significant margin of 1.66 on the GLUE benchmark." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.709, + 0.262, + 0.725 + ], + "angle": 0, + "content": "1 Introduction" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.736, + 0.491, + 0.897 + ], + "angle": 0, + "content": "In recent years, the high computational cost of pretrained language models (PLMs) (Radford et al., 2019; Yang et al., 2019; Dai et al., 2019; Shoeybi et al., 2019; Li et al., 2020; Brown et al., 2020) become a constraint in serving resource-limited or real-time applications. Knowledge Distillation (KD) (Hinton et al., 2015; Romero et al., 2015) is a popular model compression technique to tackle this issue, with a smaller model (student) learning (distilling) from a larger model (teacher)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.253, + 0.886, + 0.56 + ], + "angle": 0, + "content": "The ideal scenario would involve compressing the teacher to match the size of the small student without any performance drop. However, despite intense research in the area of KD (Turc et al., 2019; Tsai et al., 2019; Tang et al., 2019; Jiao et al., 2020; Sanh et al., 2019a; Sun et al., 2019; Wang et al., 2020b,a), none of the existing methods have successfully avoided performance degradation during the distillation process. Some approaches have attempted to mitigate the performance gap by incorporating external factors. For instance, Jiao et al. (2020) incorporates data augmentation, while Wang et al. (2020b,a) focuses on designing student architecture. However, these approaches have limitations as they only provide supplementary techniques rather than addressing the fundamental issue of performance loss in KD. This raises an interesting question: Can we compress a model without scarifying the performance through KD?" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.567, + 0.886, + 0.919 + ], + "angle": 0, + "content": "In this work, we propose a novel framework called Co-Training and Co-Distillation (CTCD) for improving the performance of a language model while compressing it through KD. CTCD involves jointly training the teacher and the student models, allowing them to transfer knowledge to each other bidirectionally, from the teacher to the student and vice versa. Our work uncovers two key findings within the CTCD framework: Firstly, we demonstrate that transferring knowledge from the smaller model to the larger model during co-training significantly improves the performance of the larger model. In other words, by employing knowledge distillation (KD), we enhance the performance of the teacher model compared to standalone training. This is significantly different from conventional one-way KD, where the teacher model cannot benefit from the distillation process since it is no longer trained or distilled. Secondly, the improved performance of the larger model leads to further enhancements in the performance of the smaller model through KD from the teacher model to the student" + }, + { + "type": "page_footnote", + "bbox": [ + 0.148, + 0.905, + 0.401, + 0.919 + ], + "angle": 0, + "content": "* Work done while interning at Meta AI." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.522, + 0.941 + ], + "angle": 0, + "content": "7458" + }, + { + "type": "footer", + "bbox": [ + 0.218, + 0.946, + 0.78, + 0.973 + ], + "angle": 0, + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 7458-7467 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.264, + 0.087, + 0.725, + 0.203 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.216, + 0.884, + 0.243 + ], + "angle": 0, + "content": "Figure 1: Task-agnostic KD method The proposed framework are task-agnostic KD methods that perform KD during the pre-training stage. This allows the distilled model to be deployed and fine-tuned on various downstream tasks." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.258, + 0.489, + 0.451 + ], + "angle": 0, + "content": "model. These novel findings enable the smaller model to surpass the independently trained larger model while maintaining its inference efficiency within the CTCD framework. Moreover, the CTCD framework can be combined orthogonally with existing techniques for external factors such as student architecture design Wang et al. (2020b,a) or data augmentation (Jiao et al., 2020). We achieve this by replacing traditional one-way KD methods with the proposed CTCD framework, which holds promise for significant performance improvements in language modeling tasks." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.453, + 0.49, + 0.677 + ], + "angle": 0, + "content": "In addition to our CTCD framework, we introduce a Community KD that utilizes CTCD framework with the pre-trained teacher model by combining CTCD with conventional KD. Community KD distills knowledge from two students to each other, as well as from the pre-trained teacher to each student, during the co-training of the students. We show that distilling from the other student as well as the pre-trained teacher is better than only one-way distillation from the pre-trained teacher, as is done in conventional KD. Note that the inference cost on a task is the same as in conventional KD, as we take one of the students distilled by Community KD when deploying it to the task." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.679, + 0.49, + 0.92 + ], + "angle": 0, + "content": "We validate the effectiveness and efficiency of our CTCD on the GLUE benchmark (Wang et al., 2019), which contains different language understanding tasks. As shown in Figure 1, We focus on task-agnostic KD scenarios, where KD occurs during the pre-training stage. Then, we fine-tune the distilled PLMs on each downstream task and evaluate their performance. This is more challenging compared to task-specific KD, as it requires substantial computational resources to train PLMs on a large text corpus, and the distilled knowledge should be transferable across diverse downstream tasks. Our extensive ablation study revealed that the larger model benefits from the distillation of the smaller model, and the performance improvement" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.258, + 0.885, + 0.37 + ], + "angle": 0, + "content": "of the larger model further enhances the performance of the smaller model. In our experiments, the student model compressed by CTCD framework obtained 1.66 higher gain than the original large model trained using a stand-alone method, demonstrating that our approach can improve model quality and inference efficiency concurrently." + }, + { + "type": "text", + "bbox": [ + 0.528, + 0.372, + 0.866, + 0.386 + ], + "angle": 0, + "content": "In summary, our contributions are as follows:" + }, + { + "type": "text", + "bbox": [ + 0.532, + 0.399, + 0.884, + 0.479 + ], + "angle": 0, + "content": "- We propose a novel knowledge distillation framework called Co-Training and Co-Distillation (CTCD) framework to improve the performance of models while compressing them through KD." + }, + { + "type": "text", + "bbox": [ + 0.532, + 0.492, + 0.885, + 0.556 + ], + "angle": 0, + "content": "- Through our experiments, we demonstrate that distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model." + }, + { + "type": "text", + "bbox": [ + 0.532, + 0.568, + 0.884, + 0.632 + ], + "angle": 0, + "content": "- Additionally, we highlight that the enhanced performance of the larger model further boosts the performance of the smaller model, resulting in improved performance for both models." + }, + { + "type": "text", + "bbox": [ + 0.532, + 0.644, + 0.883, + 0.709 + ], + "angle": 0, + "content": "- We provide valuable insights into adjusting loss weights and the length of the training phase for the effective application of the CTCD framework through extensive ablation study." + }, + { + "type": "list", + "bbox": [ + 0.532, + 0.399, + 0.885, + 0.709 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.732, + 0.666, + 0.747 + ], + "angle": 0, + "content": "2 Related Work" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.759, + 0.885, + 0.919 + ], + "angle": 0, + "content": "One-way Knowledge Distillation Knowledge distillation (KD) (Hinton et al., 2015) is a model compression technique in which a smaller student model distills knowledge from a larger, pre-trained teacher model. Recently, many researchers have explored KD to address a high computational complexity of a language model resulting from its increasing size. This includes task-agnostic KD methods for the pre-training stage (Sanh et al., 2019a; Wang et al., 2020b,a), task-specific KD method for" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "7459" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.2, + 0.083, + 0.808, + 0.232 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.24, + 0.885, + 0.304 + ], + "angle": 0, + "content": "Figure 2: Co-Training and Co-Distillation (CTCD) During training, the teacher and student models can learn more effectively by comparing their prediction outputs not only against the ground truth but also against each other's predictions. We refer to the former as a \"hard\" loss and the latter as a \"soft\" loss. For example, the student soft loss captures the distance between the student's prediction and the teacher's prediction, and vice versa. This co-training and co-distillation approach improves the performance of the teacher model, which in turn benefits the performance of the student model." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.318, + 0.49, + 0.512 + ], + "angle": 0, + "content": "the fine-tuning stage (Sun et al., 2019), and both of pre-training and fine-tuning stages (Jiao et al., 2020). Additionally, Wang et al. (2020b,a) have redesigned the architectures of student language models. However, the one-way KD can lead to a loss of knowledge, resulting in smaller models that generally have difficulty matching the performance of larger models, leading to performance degradation. In contrast, our CTCD can improve the quality of both teacher and student models, making it possible for the student to achieve the same quality as the original teacher model." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.516, + 0.49, + 0.854 + ], + "angle": 0, + "content": "Reversed Knowledge Distillation Recently, researchers (Yuan et al., 2020; Qin et al., 2022; Lee et al., 2023) have demonstrated that reversed Knowledge Distillation (reversed KD), which transfers knowledge from a smaller or poorer model to a larger model, can improve the performance of the student model. In particular, Qin et al. (2022); Lee et al. (2023) investigated the application of reversed KD in the PLMs, showing that a larger model can benefit from a poorer and pre-trained model for a specific downstream task. Inspired by the success of reversed KD, we design a co-distillation framework that includes reversed KD to improve the performance of the teacher model by distilling knowledge from the smaller student model. Unlike existing reversed KD methods, which are limited to improving the performance of the larger model, our proposed co-distillation framework can achieve both performance improvement and model compression, by showing a better-quality teacher leads to a better-quality student." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.864, + 0.418, + 0.881 + ], + "angle": 0, + "content": "3 Co-training and Co-distillation" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.889, + 0.489, + 0.922 + ], + "angle": 0, + "content": "We first introduce the concepts of co-training and co-distillation briefly:" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.318, + 0.883, + 0.368 + ], + "angle": 0, + "content": "Co-training trains two (different-sized) models (e.g., a teacher and student) concurrently with the goal of achieving similar model quality." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.372, + 0.884, + 0.42 + ], + "angle": 0, + "content": "Co-distillation transfers knowledge in both directions between two models (e.g., a teacher and student), during co-training." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.42, + 0.884, + 0.563 + ], + "angle": 0, + "content": "Figure 2 illustrates how co-trained models learn together by comparing their prediction outputs against predictions from each other and to the hard labels (or \"ground truth\"). We refer to the former as a \"soft\" loss and the latter as a \"hard\" loss. For instance, the soft loss of the student model measures the accuracy of the student's prediction by considering the teacher's prediction as a soft label, and vice versa." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.574, + 0.885, + 0.737 + ], + "angle": 0, + "content": "Task Formulation Suppose that we are given a classification task with \\(K\\) classes. For each training instance \\(x\\) and its ground truth label \\(y\\), we denote that the ground truth distribution over the labels is \\(q(k|x)\\) (\\(q(k)\\) for simplicity) where for each label \\(k \\in \\{1 \\dots K\\}\\), \\(q(y) = 1\\) and \\(q(k) = 0\\) for all \\(k \\neq y\\). For each \\(x\\), the teacher model \\(t_{\\phi}\\) parameterized by \\(\\phi\\) and the student model \\(s_{\\theta}\\) parameterized by \\(\\pmb{\\theta}\\) predict the probability of each label \\(k\\) as \\(p_{\\phi}^{\\tau}(k|x)\\) and \\(p_{\\theta}^{\\tau}(k|x)\\), respectively as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.55, + 0.748, + 0.838, + 0.786 + ], + "angle": 0, + "content": "\\[\np _ {\\phi} ^ {\\tau} (k | x) = f (\\boldsymbol {z} ^ {t}) = \\frac {\\exp (z _ {k} ^ {t} / \\tau)}{\\sum_ {i = 1} ^ {K} \\exp (z _ {i} ^ {t} / \\tau)}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.551, + 0.796, + 0.838, + 0.832 + ], + "angle": 0, + "content": "\\[\np _ {\\boldsymbol {\\theta}} ^ {\\tau} (k | x) = f \\left(\\boldsymbol {z} ^ {s}\\right) = \\frac {\\exp \\left(z _ {k} ^ {s} / \\tau\\right)}{\\sum_ {i = 1} ^ {K} \\exp \\left(z _ {i} ^ {s} / \\tau\\right)}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.839, + 0.883, + 0.92 + ], + "angle": 0, + "content": "where \\(f\\) is the softmax function, \\(\\boldsymbol{z}^t = \\{z_i^t\\}_{i=1}^K = t_\\phi(x)\\) is the output logit of the teacher model, \\(\\boldsymbol{z}^s = \\{z_i^s\\}_{i=1}^K = s_\\theta(x)\\) is the output logit of the student model, and \\(\\tau\\) is the temperature to soften \\(p_\\phi(k)\\) and \\(p_\\theta(k)\\)." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.522, + 0.941 + ], + "angle": 0, + "content": "7460" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.154, + 0.082, + 0.87, + 0.245 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.112, + 0.252, + 0.885, + 0.304 + ], + "angle": 0, + "content": "Figure 3: Community KD Different from conventional KD, where each student learns from the prediction of the pre-trained teacher only, the proposed approach learns each student from both prediction of the pre-trained teacher and prediction of another student during co-training. Note that since we take one of the pre-trained students to adapt it to downstream tasks, the inference cost is the same as the student training with the conventional KD." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.322, + 0.489, + 0.419 + ], + "angle": 0, + "content": "The proposed objective \\(\\mathcal{L}_{CTCD}(\\pmb {\\theta},\\phi)\\) consists of a normal KD objective \\(\\mathcal{L}_{KD:t\\to s}\\) to distill knowledge from the teacher model to the student model and a reversed KD objective \\(\\mathcal{L}_{ReKD:s\\to t}\\) to distill knowledge from the student model to the teacher model, during their co-training." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.428, + 0.49, + 0.541 + ], + "angle": 0, + "content": "Teacher \\(\\rightarrow\\) Student The normal KD objective \\(\\mathcal{L}_{KD:t\\to s}(\\pmb {\\theta},\\pmb {\\phi})\\) aims to train the student model by minimizing a weighted sum of the cross-entropy loss \\(H(q,p_{\\theta})\\) between the ground truth \\(q\\) and student prediction \\(p_{\\theta}\\) and Kullback-Leibler divergence (KL divergence) \\(D(p_{\\phi}^{\\tau},p_{\\theta}^{\\tau})\\) between the predictions of the student and the teacher as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.128, + 0.553, + 0.487, + 0.586 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {K D} (\\boldsymbol {\\theta}, \\phi) = \\alpha_ {h} \\cdot H (q, p _ {\\boldsymbol {\\theta}}) + \\alpha_ {s} \\cdot D \\left(p _ {\\phi} ^ {\\tau}, p _ {\\boldsymbol {\\theta}} ^ {\\tau}\\right) \\tag {1}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.588, + 0.166, + 0.601 + ], + "angle": 0, + "content": "where" + }, + { + "type": "equation", + "bbox": [ + 0.168, + 0.612, + 0.435, + 0.656 + ], + "angle": 0, + "content": "\\[\nH (q, p _ {\\boldsymbol {\\theta}}) = - \\sum_ {k = 1} ^ {K} q (k) \\log (p _ {\\boldsymbol {\\theta}} (k)),\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.165, + 0.659, + 0.438, + 0.702 + ], + "angle": 0, + "content": "\\[\nD (p _ {\\phi} ^ {\\tau}, p _ {\\pmb {\\theta}} ^ {\\tau}) = \\sum_ {k = 1} ^ {K} p _ {\\phi} ^ {\\tau} (k) \\cdot \\log \\frac {p _ {\\phi} ^ {\\tau} (k)}{p _ {\\pmb {\\theta}} ^ {\\tau} (k)},\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.713, + 0.49, + 0.89 + ], + "angle": 0, + "content": "\\(\\alpha_{h}\\) and \\(\\alpha_{s}\\) are weighting hyper-parameter values for the cross-entropy loss and KL divergence, respectively. We regard the cross-entropy loss \\(H(q,p_{\\theta})\\) as the hard loss for the student model, KL divergence \\(D(p_{\\phi}^{\\tau},p_{\\theta}^{\\tau})\\) as the soft loss for the student model, and following BERT (Devlin et al., 2019), \\(H(q,p_{\\theta})\\) denotes the Masked Language Modeling loss (MLM loss). In the KD objective, we consider the teacher parameters \\(\\phi\\) as constant since we only train the student parameters \\(\\theta\\) while the teacher model \\(t_{\\phi}\\) is fixed:" + }, + { + "type": "equation", + "bbox": [ + 0.21, + 0.903, + 0.488, + 0.921 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {K D: t \\rightarrow s} (\\boldsymbol {\\theta}, \\operatorname {S t o p G} (\\phi)) \\tag {2}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.322, + 0.885, + 0.388 + ], + "angle": 0, + "content": "where \\(\\operatorname{StopG}(x)\\) denotes that we do not compute the gradient of \\(x\\). In the conventional KD method, Equation (2) is the final objective to learn the student model only with the pre-trained teacher model." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.398, + 0.884, + 0.464 + ], + "angle": 0, + "content": "Student \\(\\rightarrow\\) Teacher Different from such a one-way KD method, we introduce the reversed KD objective \\(\\mathcal{L}_{ReKD:s\\to t}(\\operatorname {StopG}(\\pmb {\\theta}),\\phi)\\) to train the teacher model \\(t_\\phi\\) as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.586, + 0.478, + 0.884, + 0.504 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {R e K D: s \\rightarrow t} (\\operatorname {S t o p G} (\\boldsymbol {\\theta}), \\phi) = \\tag {3}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.58, + 0.5, + 0.813, + 0.516 + ], + "angle": 0, + "content": "\\[\n\\beta_ {h} \\cdot H (q, p _ {\\phi}) + \\beta_ {s} \\cdot D (p _ {\\boldsymbol {\\theta}} ^ {\\tau}, p _ {\\phi} ^ {\\tau})\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.529, + 0.883, + 0.676 + ], + "angle": 0, + "content": "where \\(\\beta_{h}\\) and \\(\\beta_{s}\\) are weighting hyper-parameter values of the hard loss \\(H(q,p_{\\phi})\\) and soft loss \\(D(p_{\\theta}^{\\tau},p_{\\phi}^{\\tau})\\) for the teacher model, respectively. By minimizing KL divergence \\(D(p_{\\theta}^{\\tau},p_{\\phi}^{\\tau})\\) between the predictions of the student model \\((p_{\\theta}^{\\tau})\\) and the teacher model \\((p_{\\phi}^{\\tau})\\), the teacher model learns from the student model. In the reversed KD objective, we only train the teacher model by applying \\(\\operatorname{StopG}(x)\\) to the gradient of the student parameters \\(\\theta\\)." + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.687, + 0.882, + 0.719 + ], + "angle": 0, + "content": "Co-training With the Equations (2) and (3), we get the final objective \\(\\mathcal{L}_{CTCD}(\\pmb {\\theta},\\phi)\\) as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.565, + 0.733, + 0.828, + 0.76 + ], + "angle": 0, + "content": "\\[\n\\boldsymbol {\\theta} ^ {*}, \\phi^ {*} = \\underset {\\boldsymbol {\\theta}, \\boldsymbol {\\phi}} {\\operatorname {a r g m i n}} \\mathcal {L} _ {C T C D} (\\boldsymbol {\\theta}, \\boldsymbol {\\phi}) =\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.528, + 0.763, + 0.882, + 0.795 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {K D} (\\boldsymbol {\\theta}, \\operatorname {S t o p G} (\\phi)) + \\mathcal {L} _ {R e K D} (\\operatorname {S t o p G} (\\boldsymbol {\\theta}), \\phi) \\tag {4}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.807, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Adapting to Downstream Task After model cotraining/-distillation, the trained smaller (student) model \\( s_{\\theta^*} \\) with trained parameter \\( \\theta^* \\) can be deployed for multiple downstream tasks to improve inference efficiency. To fine-tune the model for a specific downstream task, we adapt the trained parameter \\( \\theta^* \\) using the dataset for that task." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.519, + 0.941 + ], + "angle": 0, + "content": "7461" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.114, + 0.085, + 0.289, + 0.1 + ], + "angle": 0, + "content": "4 Community KD" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.11, + 0.49, + 0.4 + ], + "angle": 0, + "content": "Furthermore, we introduce an advanced CTCD application named Community KD that can utilize CTCD framework with the pre-trained teacher model, as shown in Figure 3. It consists of a pre-trained teacher \\(t_{\\phi^*}\\) with pre-trained parameters \\(\\phi^*\\) and two students \\(s_{\\theta_1}\\) and \\(s_{\\theta_2}\\) parameterized by \\(\\theta_1\\) and \\(\\theta_2\\), respectively. During the co-training of two students, each student learns from the hard labels, soft labels generated from the pre-trained teacher predictions, and soft labels generated from other student predictions. In other words, we conduct one-way knowledge distillation from the pre-trained teacher to each student by minimizing KL divergence between the teacher prediction and predictions of each student \\(D(p_{\\theta_1}^\\tau, p_{\\phi^*}^\\tau)\\) and \\(D(p_{\\theta_2}^\\tau, p_{\\phi^*}^\\tau)\\) and co-distillation between students in both directions by minimizing \\(\\mathcal{L}_{CTCD}(\\pmb{\\theta}_1, \\pmb{\\theta}_2)\\). The final objective \\(\\mathcal{L}_{CM}(\\pmb{\\theta}_1, \\pmb{\\theta}_2, \\mathrm{StopG}(\\pmb{\\phi}^*))\\) is as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.126, + 0.412, + 0.476, + 0.44 + ], + "angle": 0, + "content": "\\[\n\\boldsymbol {\\theta} _ {1} ^ {*}, \\boldsymbol {\\theta} _ {2} ^ {*} = \\underset {\\boldsymbol {\\theta} _ {1}, \\boldsymbol {\\theta} _ {2}} {\\operatorname {a r g m i n}} \\mathcal {L} _ {C M} (\\boldsymbol {\\theta} _ {1}, \\boldsymbol {\\theta} _ {2}, \\operatorname {S t o p G} (\\boldsymbol {\\phi} ^ {*})) =\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.126, + 0.442, + 0.487, + 0.474 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {C T C D} \\left(\\boldsymbol {\\theta} _ {\\mathbf {1}}, \\boldsymbol {\\theta} _ {\\mathbf {2}}\\right) + D \\left(p _ {\\boldsymbol {\\theta} _ {\\mathbf {1}}} ^ {\\tau}, p _ {\\boldsymbol {\\phi} ^ {*}} ^ {\\tau}\\right) + D \\left(p _ {\\boldsymbol {\\theta} _ {\\mathbf {2}}} ^ {\\tau}, p _ {\\boldsymbol {\\phi} ^ {*}} ^ {\\tau}\\right) \\tag {5}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.476, + 0.49, + 0.554 + ], + "angle": 0, + "content": "We select one of the two students distilled by Community KD \\((\\pmb{\\theta}^{*} = \\pmb{\\theta}_{1}^{*}\\) or \\(\\pmb{\\theta}^{*} = \\pmb{\\theta}_{2}^{*})\\) and fine-tune the selected single student \\(s_{\\theta^*}\\) for downstream tasks, resulting that the inference cost does not increase compared with the conventional KD method." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.567, + 0.253, + 0.584 + ], + "angle": 0, + "content": "5 Experiment" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.593, + 0.49, + 0.834 + ], + "angle": 0, + "content": "We present a comprehensive analysis of the proposed CTCD method through empirical experiments. In Section 5.1, we validate our CTCD method by comparing the performance of small models distilled by CTCD to the original large model on the GLUE benchmark (Wang et al., 2019). In Section 5.2, we analyze the impact of co-distillation by adjusting loss weights for the soft losses of a student and a teacher. In Section 5.3, we study the impact of training length on CTCD method, allowing us to determine the optimal training length for CTCD method. In Section 5.4, we demonstrate the efficacy of Community KD by comparing the performance of a model distilled by the Community KD to a model distilled by the one-way KD." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.84, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Implementation details We use a learning rate of 5e-4, linear warm-up of \\(5\\%\\), AdamW optimizer (Loshchilov and Hutter, 2019), and batch size of 128 with A100 GPUs for pre-training. We train the teacher and student models from scratch" + }, + { + "type": "image", + "bbox": [ + 0.522, + 0.087, + 0.86, + 0.248 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.508, + 0.251, + 0.885, + 0.313 + ], + "angle": 0, + "content": "Figure 4: Average performance on dev sets of GLUE benchmark after training 10 epochs Learning from the student improves the performance of the teacher by an average of 1.88. Such improvement in teacher performance leads to improvement in student quality from 77.46 to 77.94." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.329, + 0.885, + 0.442 + ], + "angle": 0, + "content": "for 20 epochs in Section 5.1. To analyze the effectiveness of CTCD method, we train the teacher and student models for 10 epochs and 20 epochs in Section 5.2 and Section 5.3, respectively. In Section 5.4, we train the models for 3 epochs after parameter remapping, which is the same as in conventional one-way KD method (Sanh et al., 2019a)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.46, + 0.884, + 0.62 + ], + "angle": 0, + "content": "Training Time For the one-way distillation, we need 1 GPU day to train the teacher for 10 epochs and 1.3 GPU days to distill knowledge from the pre-trained teacher to the student for another 10 epochs, which consumes a total of 2.3 days. For CTCD, it takes 3 GPU days to train both teacher and student models from scratch for 10 epochs. We use the automatic mixed precision (AMP) of PyTorch (Paszke et al., 2019) to accelerate training for all our models." + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.626, + 0.884, + 0.802 + ], + "angle": 0, + "content": "Dataset To validate our CTCD method, we use a reduced dataset (30M) created by uniformly sampling 1 out of every 4 sentences from the original pre-training dataset (BookCorpus (Zhu et al., 2015) + Wikipedia (Foundation)) used in the conventional one-way KD method (Sanh et al., 2019a). We evaluate our distilled models on the dev sets of the GLUE benchmark (Wang et al., 2019), which consists of nine sentence-level classification tasks. In Section 5.4, we use the original pre-training dataset to train Community KD method." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.807, + 0.885, + 0.918 + ], + "angle": 0, + "content": "Model Architecture We use a 6-layer BERT (Devlin et al., 2019) model as the teacher and a 4-layer BERT model as the student to analyze the effectiveness and efficiency of our CTCD method. In Section 5.4, we use a pre-trained BERT-base model as the teacher and a 6-layer BERT model as the student." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "7462" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.222, + 0.082, + 0.775, + 0.205 + ], + "angle": 0, + "content": "
PerformanceGAP w/ Teacher
Original Teacher78.06-
StudentOne-way Distil. (10 epoch)77.46-0.60
CTCD (10 epoch)77.94-0.12
One-way Distil. (20 epoch)78.39+0.33
CTCD (20 epoch)79.12+1.66
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.216, + 0.884, + 0.243 + ], + "angle": 0, + "content": "Table 1: Average performance on dev sets of GLUE benchmark The student distilled by CTCD significantly outperforms the original teacher trained using the stand-alone method, achieving a higher gain of 1.66." + }, + { + "type": "image", + "bbox": [ + 0.134, + 0.254, + 0.492, + 0.421 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.237, + 0.425, + 0.39, + 0.437 + ], + "angle": 0, + "content": "(a) Teacher Performance" + }, + { + "type": "image", + "bbox": [ + 0.502, + 0.254, + 0.861, + 0.421 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.605, + 0.425, + 0.759, + 0.437 + ], + "angle": 0, + "content": "(b) Student Performance" + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.445, + 0.884, + 0.507 + ], + "angle": 0, + "content": "Figure 5: Adjusting Loss Weight We investigate the impact of the distillation for the teacher model and student model by adjusting loss weights \\((\\alpha_{h},\\alpha_{s},\\beta_{h},\\beta_{s})\\) for hard loss and soft loss. (a) We (co-)train the teacher model distilling knowledge from the student by fixing \\(\\alpha_{h}:\\alpha_{s} = 1:1\\) and varying \\(\\beta_{h}:\\beta_{s}\\) on the large text corpus. (b) We (co-)train the student model distilling knowledge from the teacher by fixing \\(\\beta_{h}:\\beta_{s} = 1:1\\) and varying \\(\\alpha_{h}:\\alpha_{s}\\) on the large text corpus. Then we report the average performance of each pre-trained model after fine-tuning it on downstream tasks (dev sets) of GLUE benchmark." + }, + { + "type": "image", + "bbox": [ + 0.119, + 0.522, + 0.48, + 0.692 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.704, + 0.49, + 0.801 + ], + "angle": 0, + "content": "Figure 6: Length of Training We pre-trained student models under two different training lengths 10/20 epochs while distilling knowledge from teacher models via ours or the conventional KD method. Then we adapt pre-trained student models on CoLA task. With enough longer training (20 epoch), the student model distilled by ours significantly outperforms the student model distilled by the conventional KD method, with a higher gain of 5.22." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.818, + 0.436, + 0.85 + ], + "angle": 0, + "content": "5.1 Could Knowledge Distillation Help Improve Performance?" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.855, + 0.489, + 0.919 + ], + "angle": 0, + "content": "In Table 1 and Figure 4, we show the average performance of models trained using different methods on a large text corpus and fine-tuned against the GLUE benchmark. Stand-alone trains a model" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.522, + 0.885, + 0.732 + ], + "angle": 0, + "content": "without using any knowledge distillation. Co-training & One-way distillation trains teacher and student models together from scratch, with knowledge only flowing from the teacher to the student. Co-training & Co-distillation (Ours) is CTCD method, which trains both teacher and student models together from scratch and distills knowledge between each other in both directions. For distillation methods, we set the weights of the hard losses for the teacher and student to 1. The weights of the soft losses are chosen from the set \\(\\{0.5, 1, 2, 4\\}\\), and the results are reported with the best-performing weights." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.743, + 0.885, + 0.92 + ], + "angle": 0, + "content": "1) Overall Results As shown in Table 1, the student distilled by CTCD method significantly outperforms the original teacher trained using the stand-alone method on the average performance of the GLUE benchmark, achieving a higher gain of 1.66. Furthermore, the student model distilled by our CTCD method outperforms the student distilled by the one-way distillation method on the average performance of the GLUE benchmark. After training for 10 and 20 epochs, the student distilled by our CTCD method consistently has higher gains" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "7463" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.114, + 0.085, + 0.486, + 0.117 + ], + "angle": 0, + "content": "than the student distilled by one-way distillation, as 77.46 vs. 77.94 and 78.39 vs. 79.12, respectively." + }, + { + "type": "title", + "bbox": [ + 0.113, + 0.125, + 0.486, + 0.156 + ], + "angle": 0, + "content": "2) Does learning from a small and weak student provide a performance benefit to the teacher?" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.158, + 0.488, + 0.27 + ], + "angle": 0, + "content": "As shown in Figure 4, the distillation of knowledge from the student model to the teacher model has been shown to significantly improve the quality of the teacher model, with an average increase of 1.88 compared to teacher training methods that do not incorporate such distillation process (such as Stand-alone and Co-training & one-way distillation)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.274, + 0.49, + 0.466 + ], + "angle": 0, + "content": "3) Is the teacher's performance improvement reflected in the student's performance improvement? Furthermore, we find that a better teacher leads to further performance improvement of the student from 77.46 to 77.94. The results demonstrate that the distillation process successfully improves the performance of both the teacher and student. The student trained with our CTCD method achieves better performance than students trained with the Stand-alone or Co-training & one-way distillation methods, with an average improvement of 0.88 and 0.47, respectively." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.477, + 0.486, + 0.493 + ], + "angle": 0, + "content": "5.2 In-depth Study 1: Adjusting Loss Weights" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.498, + 0.488, + 0.674 + ], + "angle": 0, + "content": "In this Section, we investigate the impact of distillation on the performance of both the student and the teacher by adjusting loss weights \\((\\alpha_{h},\\alpha_{s},\\beta_{h},\\beta_{s})\\) for hard loss and soft loss. For example, setting \\(\\alpha_{h}:\\alpha_{s} = 1:4\\) emphasizes learning from the teacher's knowledge (i.e., the soft loss for the student) \\(4\\times\\) more than the ground truth label distribution (i.e., the hard loss for the student), during co-training. This allows us to better understand the effect of distillation on each model and optimize their performance." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.679, + 0.488, + 0.821 + ], + "angle": 0, + "content": "Teacher side In Figure 5(a), we co-train the teacher model using distillation to transfer knowledge from the student model. We fix the weighting values for the losses of the student to \\(\\alpha_{h}:\\alpha_{s} = 1:1\\) and vary the weighting values for the losses of the teacher, \\(\\beta_{h}:\\beta_{s}\\), while training on a large text corpus. We then evaluate the average performance of the pre-trained teacher models on downstream tasks from the dev sets of GLUE benchmark." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.824, + 0.489, + 0.919 + ], + "angle": 0, + "content": "Our results show that co-training the teacher with distillation outperforms training the teacher alone, regardless of the weighting values for the soft loss, by obtaining higher gains of 0.36, 0.77, 1.80, and 1.02 for \\(\\beta_h: \\beta_s = 1:1, 1:2, 1:4,\\) and \\(4:4\\), respectively. Additionally, we find that giving more" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.883, + 0.228 + ], + "angle": 0, + "content": "weight to the soft loss of the teacher during training \\((\\alpha_{h}:\\alpha_{s}:\\beta_{h}:\\beta_{\\mathbf{s}} = 1:1:1:\\mathbf{1}\\to 1:1:1:\\) \\(2\\rightarrow 1:1:1:4)\\) leads to improved performance, with an average score of \\(78.42\\to 78.83\\to 79.86\\) Furthermore, we observe that emphasizing only the soft loss of the teacher \\((1:1:1:4)\\) yields better performance than emphasizing both the hard and soft losses of the teacher \\((1:1:4:4)\\), with an average score of 79.86 vs. 79.09." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.236, + 0.885, + 0.412 + ], + "angle": 0, + "content": "Student side We find that the student model's performance is not sensitive to the weighting values for the hard and soft losses of the student, \\((\\alpha_h:\\alpha_s)\\). Regardless of the chosen values, co-training the student with distillation consistently improves its performance compared to training the student alone. For instance, when we emphasize the soft loss of the student by increasing the weighting value for \\((\\alpha_{s})\\) as \\(1:1:1:1\\to 1:2:1:1\\to 1:4:1:1\\), we observe similar levels of performance for the student model." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.424, + 0.85, + 0.44 + ], + "angle": 0, + "content": "5.3 In-depth Study 2: Length of Training" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.446, + 0.884, + 0.59 + ], + "angle": 0, + "content": "We studied the impact of co-training length on the effectiveness of the CTCD method (see Figure 6). We find that longer training leads to improved performance, as demonstrated by our experiments using two different training lengths: 10 epochs and 20 epochs. After pre-training the student models with these different lengths, we adapted them to the CoLA downstream tasks and evaluated their performance using Matthew Correlation." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.597, + 0.884, + 0.854 + ], + "angle": 0, + "content": "Results By increasing the (co-)training length from 10 epochs to 20 epochs, CTCD (Ours) significantly improves the performance of the student model from 35.02 to 46.23, with a gain of 11.21. This outperforms the conventional KD method, which only achieves a gain of 0.07 from 40.94 to 41.01, despite a longer training time. The conventional KD method relies on a pre-trained teacher model to train the student model, which allows for fast convergence but limits the learning of the student model. In contrast, the CTCD method allows for additional performance gains for both the teacher and student models by enabling them to learn and grow together during co-training. This can provide further benefits to the student model's performance with longer co-training." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.866, + 0.771, + 0.882 + ], + "angle": 0, + "content": "5.4 Efficacy of Community KD" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.888, + 0.884, + 0.919 + ], + "angle": 0, + "content": "We compare the proposed Community KD with the conventional one-way KD method (Sanh et al.," + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "7464" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.115, + 0.082, + 0.882, + 0.174 + ], + "angle": 0, + "content": "
Downstream TaskMetricDataset SizeAMPMNLI Acc. 392.7kQQP Acc. 363.8kQNLI Acc. 104.7kSST-2 Acc. 67.3kCoLA Matthew. 8.5kSTSB Pearson. 5.7kMRPC F1 3.7kAcc. 2.5kRTE Acc.
TeacherBERT (109M)84.1790.8990.6891.8657.5488.8488.5689.3185.0465.3483.23
Student(67M)One-way KD (Sanh et al., 2019b)FP3281.9390.0587.7290.9452.0386.2886.0787.9482.5957.7680.33
Ours: Student 1FP1681.8890.1788.2491.5154.8286.7086.4989.7685.2959.2181.40
Ours: Student 2FP1681.3489.7588.3790.7156.0886.4286.4489.8085.2959.2081.34
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.183, + 0.885, + 0.234 + ], + "angle": 0, + "content": "Table 2: Efficacy of Community KD The pre-trained BERT and 6-layer BERT is the teacher model and student architecture, respectively, for both ours and the conventional one-way KD method. We fine-tune the distilled students on dev sets of GLUE benchmark. We observe that learning from the soft knowledge of different student models improves performance over the conventional one-way KD method on most downstream tasks." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.248, + 0.491, + 0.571 + ], + "angle": 0, + "content": "2019a). To ensure a fair comparison, we use the pre-trained BERT-base as the teacher model for both methods and the 6-layer BERT as the student, which is the same architecture used in the conventional one-way KD method. As described in Section 4, we train two student models concurrently and they learn from the pre-trained BERT, the ground truth labels, and each other's knowledge. Note that since we fine-tune one of the two students distilled by Community KD for downstream tasks, the inference cost is the same as the conventional one-way KD method. In Table 2, we report the results of BERT and the conventional one-way KD method using checkpoints provided by Hugging Face (HuggingFace) and both students (Ours: Student 1 and Ours: Student 2) on the dev sets of the GLUE benchmark. We apply Automatic Mixed Precision (AMP) (Paszke et al., 2019) to Community KD, which typically speeds up training but may hurt performance." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.576, + 0.49, + 0.801 + ], + "angle": 0, + "content": "Results The results presented in Table 2 show that Community KD, leads to improved performance on downstream tasks such as QQP, QNLI, SST-2, CoLA, STSB, MRPC, and RTE, even when applying quantization techniques. Specifically, the average performance gain of the student model distilled using our Community KD method is 1.04 (1.2%) higher than that of the student model distilled by the conventional one-way KD method. This suggests that incorporating knowledge distillation from both a student model and a pre-trained teacher model is more effective than only using knowledge distillation from the pre-trained teacher model." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.814, + 0.391, + 0.83 + ], + "angle": 0, + "content": "6 Limitations & Future Work" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.839, + 0.49, + 0.92 + ], + "angle": 0, + "content": "Limitations The proposed method co-train models from scratch and may require a longer pretraining time than the conventional KD method. However, as we described in Section 5.3, when the student model is trained long enough with its" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.249, + 0.885, + 0.394 + ], + "angle": 0, + "content": "teacher, it can outperform the models trained with the conventional KD on the downstream task. The proposed co-training method may increase the overall training cost compared with one-way distillation, and it may become a performance bottleneck depending on training resource constraints. However, note that CTCD can improve model quality while having the same inference cost as the one-way distillation on downstream tasks." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.402, + 0.885, + 0.644 + ], + "angle": 0, + "content": "Future Work 1) Architecture Sharing. Models can share some of their architectures by reusing the output of such architectures and updating them together during back-propagation. This may help reduce the additional computing and memory overhead incurred by model co-training, while improving the model quality, especially for the student model. 2) Integration of Student Architecture Design and Data Augmentation. Future research can focus on effectively combining the CTCD framework with student architecture design and data augmentation techniques. This integration provides a promising alternative to traditional one-way knowledge distillation methods, leading to significant improvements in language modeling tasks." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.654, + 0.642, + 0.669 + ], + "angle": 0, + "content": "7 Conclusion" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.678, + 0.885, + 0.919 + ], + "angle": 0, + "content": "The size and complexity of pre-trained language models (PLMs) can hinder their practicality for online downstream tasks. To address this, we introduced a novel framework called co-training and co-distillation (CTCD). By training models of different sizes together and extracting inter-model knowledge in both directions, the proposed CTCD framework improves both model efficiency and performance. The proposed framework overcomes the trade-off between efficiency and performance in traditional one-way knowledge distillation methods. Notably, our compressed models achieved an impressive gain of 1.66 on the GLUE benchmark, outperforming large models trained using standalone methods." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "7465" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.116, + 0.085, + 0.214, + 0.099 + ], + "angle": 0, + "content": "References" + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.107, + 0.487, + 0.172 + ], + "angle": 0, + "content": "Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. In NeurIPS." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.183, + 0.488, + 0.276 + ], + "angle": 0, + "content": "Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. 2019. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2978-2988, Florence, Italy. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.285, + 0.488, + 0.403 + ], + "angle": 0, + "content": "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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.413, + 0.437, + 0.426 + ], + "angle": 0, + "content": "Wikipedia Foundation. Wikipedia downloads." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.436, + 0.487, + 0.476 + ], + "angle": 0, + "content": "Geoffrey Hinton, Oriol Vinyals, Jeff Dean, et al. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2(7)." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.487, + 0.309, + 0.501 + ], + "angle": 0, + "content": "HuggingFace. Huggingface." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.51, + 0.488, + 0.602 + ], + "angle": 0, + "content": "Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. 2020. TinyBERT: Distilling BERT for natural language understanding. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 4163-4174, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.612, + 0.488, + 0.677 + ], + "angle": 0, + "content": "Hayeon Lee, Rui Hou, Jongpil Kim, Davis Liang, Sung Ju Hwang, and Alexander Min. 2023. A study on knowledge distillation from weak teacher for scaling up pre-trained language models. arXiv preprint arXiv:2305.18239." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.687, + 0.488, + 0.74 + ], + "angle": 0, + "content": "Chunyuan Li, Xiang Gao, Yuan Li, Xiujun Li, Baolin Peng, Yizhe Zhang, and Jianfeng Gao. 2020. Optimus: Organizing sentences via pre-trained modeling of a latent space. In EMNLP." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.75, + 0.488, + 0.816 + ], + "angle": 0, + "content": "Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.826, + 0.488, + 0.918 + ], + "angle": 0, + "content": "Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch:" + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.107, + 0.488, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.529, + 0.086, + 0.882, + 0.138 + ], + "angle": 0, + "content": "An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.15, + 0.882, + 0.269 + ], + "angle": 0, + "content": "Yujia Qin, Yankai Lin, Jing Yi, Jiajie Zhang, Xu Han, Zhengyan Zhang, Yusheng Su, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2022. Knowledge inheritance for pre-trained language models. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3921-3937, Seattle, United States. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.281, + 0.882, + 0.334 + ], + "angle": 0, + "content": "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." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.346, + 0.882, + 0.399 + ], + "angle": 0, + "content": "Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. 2015. Fitnets: Hints for thin deep nets. In *In Proceedings of ICLR*." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.411, + 0.882, + 0.464 + ], + "angle": 0, + "content": "Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019a. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.476, + 0.882, + 0.528 + ], + "angle": 0, + "content": "Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019b. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.541, + 0.882, + 0.606 + ], + "angle": 0, + "content": "Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. 2019. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.618, + 0.882, + 0.724 + ], + "angle": 0, + "content": "Siqi Sun, Yu Cheng, Zhe Gan, and Jingjing Liu. 2019. Patient knowledge distillation for BERT model compression. 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 4323-4332, Hong Kong, China. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.736, + 0.882, + 0.789 + ], + "angle": 0, + "content": "Raphael Tang, Yao Lu, Linqing Liu, Lili Mou, Olga Vechtomova, and Jimmy Lin. 2019. Distilling task-specific knowledge from bert into simple neural networks. arXiv preprint arXiv:1903.12136." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.8, + 0.882, + 0.918 + ], + "angle": 0, + "content": "Henry Tsai, Jason Riesa, Melvin Johnson, Naveen Arivazhagan, Xin Li, and Amelia Archer. 2019. Small and practical BERT models for sequence labeling. 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 3632-3636, Hong Kong, China. Association for Computational Linguistics." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.882, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "7466" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.086, + 0.487, + 0.139 + ], + "angle": 0, + "content": "Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: The impact of student initialization on knowledge distillation. arXiv preprint arXiv:1908.08962, 13." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.149, + 0.488, + 0.215 + ], + "angle": 0, + "content": "Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.224, + 0.488, + 0.289 + ], + "angle": 0, + "content": "Wenhui Wang, Hangbo Bao, Shaohan Huang, Li Dong, and Furu Wei. 2020a. Minilmv2: Multi-head self-attention relation distillation for compressing pretrained transformers. arXiv preprint arXiv:2012.15828." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.3, + 0.488, + 0.366 + ], + "angle": 0, + "content": "Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. 2020b. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in Neural Information Processing Systems, 33:5776-5788." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.376, + 0.488, + 0.454 + ], + "angle": 0, + "content": "Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.465, + 0.488, + 0.531 + ], + "angle": 0, + "content": "Li Yuan, Francis EH Tay, Guilin Li, Tao Wang, and Jiashi Feng. 2020. Revisiting knowledge distillation via label smoothing regularization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3903-3911." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.54, + 0.488, + 0.631 + ], + "angle": 0, + "content": "Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pages 19-27." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.488, + 0.631 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "7467" + } + ] +] \ No newline at end of file diff --git a/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_origin.pdf b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bbe52662803945d6d328dce195ac511604ea1aee --- /dev/null +++ b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/3ef52946-1f2d-4cf9-99c7-6dfb1783f816_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebc91d56dc39e533f4e64191fb06a1df223ddcea428be48ba7d9dd7c1bda0536 +size 1973768 diff --git a/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/full.md b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/full.md new file mode 100644 index 0000000000000000000000000000000000000000..18d8b77b5db56e190a815baf1a1b8ca43ab770f4 --- /dev/null +++ b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/full.md @@ -0,0 +1,260 @@ +# Co-training and Co-distillation for Quality Improvement and Compression of Language Models + +Hayeon Lee $^{1*}$ Rui Hou $^{1}$ Jongpil Kim $^{1}$ +Davis Liang $^{2}$ Hongbo Zhang $^{1}$ Sung Ju Hwang $^{3}$ Alexander Min $^{1}$ +Meta AI $^{1}$ Abridge AI $^{2}$ KAIST $^{3}$ + +hayeonlee@meta.com rayhou@meta.com jpkim@meta.com +davis@abridge.com hbzhang@meta.com sjhwang82@kaist.ac.kr alexmin@meta.com + +# Abstract + +Knowledge Distillation (KD) compresses computationally expensive pre-trained language models (PLMs) by transferring their knowledge to smaller models, allowing their use in resource-constrained or real-time settings. However, most smaller models fail to surpass the performance of the original larger model, resulting in sacrificing performance to improve inference speed. To address this issue, we propose Co-Training and Co-Distillation (CTCD), a novel framework that improves performance and inference speed together by co-training two models while mutually distilling knowledge. The CTCD framework successfully achieves this based on two significant findings: 1) Distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model. 2) The enhanced performance of the larger model further boosts the performance of the smaller model. The CTCD framework shows promise as it can be combined with existing techniques like architecture design or data augmentation, replacing one-way KD methods, to achieve further performance improvement. Extensive ablation studies demonstrate the effectiveness of CTCD, and the small model distilled by CTCD outperforms the original larger model by a significant margin of 1.66 on the GLUE benchmark. + +# 1 Introduction + +In recent years, the high computational cost of pretrained language models (PLMs) (Radford et al., 2019; Yang et al., 2019; Dai et al., 2019; Shoeybi et al., 2019; Li et al., 2020; Brown et al., 2020) become a constraint in serving resource-limited or real-time applications. Knowledge Distillation (KD) (Hinton et al., 2015; Romero et al., 2015) is a popular model compression technique to tackle this issue, with a smaller model (student) learning (distilling) from a larger model (teacher). + +The ideal scenario would involve compressing the teacher to match the size of the small student without any performance drop. However, despite intense research in the area of KD (Turc et al., 2019; Tsai et al., 2019; Tang et al., 2019; Jiao et al., 2020; Sanh et al., 2019a; Sun et al., 2019; Wang et al., 2020b,a), none of the existing methods have successfully avoided performance degradation during the distillation process. Some approaches have attempted to mitigate the performance gap by incorporating external factors. For instance, Jiao et al. (2020) incorporates data augmentation, while Wang et al. (2020b,a) focuses on designing student architecture. However, these approaches have limitations as they only provide supplementary techniques rather than addressing the fundamental issue of performance loss in KD. This raises an interesting question: Can we compress a model without scarifying the performance through KD? + +In this work, we propose a novel framework called Co-Training and Co-Distillation (CTCD) for improving the performance of a language model while compressing it through KD. CTCD involves jointly training the teacher and the student models, allowing them to transfer knowledge to each other bidirectionally, from the teacher to the student and vice versa. Our work uncovers two key findings within the CTCD framework: Firstly, we demonstrate that transferring knowledge from the smaller model to the larger model during co-training significantly improves the performance of the larger model. In other words, by employing knowledge distillation (KD), we enhance the performance of the teacher model compared to standalone training. This is significantly different from conventional one-way KD, where the teacher model cannot benefit from the distillation process since it is no longer trained or distilled. Secondly, the improved performance of the larger model leads to further enhancements in the performance of the smaller model through KD from the teacher model to the student + +![](images/d0d292e53efee35483b52cd00a332dd1d5f01ed7dd3d309c7f98be67af4a2f3d.jpg) +Figure 1: Task-agnostic KD method The proposed framework are task-agnostic KD methods that perform KD during the pre-training stage. This allows the distilled model to be deployed and fine-tuned on various downstream tasks. + +model. These novel findings enable the smaller model to surpass the independently trained larger model while maintaining its inference efficiency within the CTCD framework. Moreover, the CTCD framework can be combined orthogonally with existing techniques for external factors such as student architecture design Wang et al. (2020b,a) or data augmentation (Jiao et al., 2020). We achieve this by replacing traditional one-way KD methods with the proposed CTCD framework, which holds promise for significant performance improvements in language modeling tasks. + +In addition to our CTCD framework, we introduce a Community KD that utilizes CTCD framework with the pre-trained teacher model by combining CTCD with conventional KD. Community KD distills knowledge from two students to each other, as well as from the pre-trained teacher to each student, during the co-training of the students. We show that distilling from the other student as well as the pre-trained teacher is better than only one-way distillation from the pre-trained teacher, as is done in conventional KD. Note that the inference cost on a task is the same as in conventional KD, as we take one of the students distilled by Community KD when deploying it to the task. + +We validate the effectiveness and efficiency of our CTCD on the GLUE benchmark (Wang et al., 2019), which contains different language understanding tasks. As shown in Figure 1, We focus on task-agnostic KD scenarios, where KD occurs during the pre-training stage. Then, we fine-tune the distilled PLMs on each downstream task and evaluate their performance. This is more challenging compared to task-specific KD, as it requires substantial computational resources to train PLMs on a large text corpus, and the distilled knowledge should be transferable across diverse downstream tasks. Our extensive ablation study revealed that the larger model benefits from the distillation of the smaller model, and the performance improvement + +of the larger model further enhances the performance of the smaller model. In our experiments, the student model compressed by CTCD framework obtained 1.66 higher gain than the original large model trained using a stand-alone method, demonstrating that our approach can improve model quality and inference efficiency concurrently. + +In summary, our contributions are as follows: + +- We propose a novel knowledge distillation framework called Co-Training and Co-Distillation (CTCD) framework to improve the performance of models while compressing them through KD. +- Through our experiments, we demonstrate that distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model. +- Additionally, we highlight that the enhanced performance of the larger model further boosts the performance of the smaller model, resulting in improved performance for both models. +- We provide valuable insights into adjusting loss weights and the length of the training phase for the effective application of the CTCD framework through extensive ablation study. + +# 2 Related Work + +One-way Knowledge Distillation Knowledge distillation (KD) (Hinton et al., 2015) is a model compression technique in which a smaller student model distills knowledge from a larger, pre-trained teacher model. Recently, many researchers have explored KD to address a high computational complexity of a language model resulting from its increasing size. This includes task-agnostic KD methods for the pre-training stage (Sanh et al., 2019a; Wang et al., 2020b,a), task-specific KD method for + +![](images/802bc58628f2d24e467622a2b9f73e72a1eb332c43f6f739513283e02d8d1a6f.jpg) +Figure 2: Co-Training and Co-Distillation (CTCD) During training, the teacher and student models can learn more effectively by comparing their prediction outputs not only against the ground truth but also against each other's predictions. We refer to the former as a "hard" loss and the latter as a "soft" loss. For example, the student soft loss captures the distance between the student's prediction and the teacher's prediction, and vice versa. This co-training and co-distillation approach improves the performance of the teacher model, which in turn benefits the performance of the student model. + +the fine-tuning stage (Sun et al., 2019), and both of pre-training and fine-tuning stages (Jiao et al., 2020). Additionally, Wang et al. (2020b,a) have redesigned the architectures of student language models. However, the one-way KD can lead to a loss of knowledge, resulting in smaller models that generally have difficulty matching the performance of larger models, leading to performance degradation. In contrast, our CTCD can improve the quality of both teacher and student models, making it possible for the student to achieve the same quality as the original teacher model. + +Reversed Knowledge Distillation Recently, researchers (Yuan et al., 2020; Qin et al., 2022; Lee et al., 2023) have demonstrated that reversed Knowledge Distillation (reversed KD), which transfers knowledge from a smaller or poorer model to a larger model, can improve the performance of the student model. In particular, Qin et al. (2022); Lee et al. (2023) investigated the application of reversed KD in the PLMs, showing that a larger model can benefit from a poorer and pre-trained model for a specific downstream task. Inspired by the success of reversed KD, we design a co-distillation framework that includes reversed KD to improve the performance of the teacher model by distilling knowledge from the smaller student model. Unlike existing reversed KD methods, which are limited to improving the performance of the larger model, our proposed co-distillation framework can achieve both performance improvement and model compression, by showing a better-quality teacher leads to a better-quality student. + +# 3 Co-training and Co-distillation + +We first introduce the concepts of co-training and co-distillation briefly: + +Co-training trains two (different-sized) models (e.g., a teacher and student) concurrently with the goal of achieving similar model quality. + +Co-distillation transfers knowledge in both directions between two models (e.g., a teacher and student), during co-training. + +Figure 2 illustrates how co-trained models learn together by comparing their prediction outputs against predictions from each other and to the hard labels (or "ground truth"). We refer to the former as a "soft" loss and the latter as a "hard" loss. For instance, the soft loss of the student model measures the accuracy of the student's prediction by considering the teacher's prediction as a soft label, and vice versa. + +Task Formulation Suppose that we are given a classification task with $K$ classes. For each training instance $x$ and its ground truth label $y$ , we denote that the ground truth distribution over the labels is $q(k|x)$ ( $q(k)$ for simplicity) where for each label $k \in \{1 \dots K\}$ , $q(y) = 1$ and $q(k) = 0$ for all $k \neq y$ . For each $x$ , the teacher model $t_{\phi}$ parameterized by $\phi$ and the student model $s_{\theta}$ parameterized by $\pmb{\theta}$ predict the probability of each label $k$ as $p_{\phi}^{\tau}(k|x)$ and $p_{\theta}^{\tau}(k|x)$ , respectively as follows: + +$$ +p _ {\phi} ^ {\tau} (k | x) = f (\boldsymbol {z} ^ {t}) = \frac {\exp (z _ {k} ^ {t} / \tau)}{\sum_ {i = 1} ^ {K} \exp (z _ {i} ^ {t} / \tau)} +$$ + +$$ +p _ {\boldsymbol {\theta}} ^ {\tau} (k | x) = f \left(\boldsymbol {z} ^ {s}\right) = \frac {\exp \left(z _ {k} ^ {s} / \tau\right)}{\sum_ {i = 1} ^ {K} \exp \left(z _ {i} ^ {s} / \tau\right)} +$$ + +where $f$ is the softmax function, $\boldsymbol{z}^t = \{z_i^t\}_{i=1}^K = t_\phi(x)$ is the output logit of the teacher model, $\boldsymbol{z}^s = \{z_i^s\}_{i=1}^K = s_\theta(x)$ is the output logit of the student model, and $\tau$ is the temperature to soften $p_\phi(k)$ and $p_\theta(k)$ . + +![](images/3cce1d7832d9f9783e4c1498ea96105b0a5d95d1557d91f872033827aeab68d6.jpg) +Figure 3: Community KD Different from conventional KD, where each student learns from the prediction of the pre-trained teacher only, the proposed approach learns each student from both prediction of the pre-trained teacher and prediction of another student during co-training. Note that since we take one of the pre-trained students to adapt it to downstream tasks, the inference cost is the same as the student training with the conventional KD. + +The proposed objective $\mathcal{L}_{CTCD}(\pmb {\theta},\phi)$ consists of a normal KD objective $\mathcal{L}_{KD:t\to s}$ to distill knowledge from the teacher model to the student model and a reversed KD objective $\mathcal{L}_{ReKD:s\to t}$ to distill knowledge from the student model to the teacher model, during their co-training. + +Teacher $\rightarrow$ Student The normal KD objective $\mathcal{L}_{KD:t\to s}(\pmb {\theta},\pmb {\phi})$ aims to train the student model by minimizing a weighted sum of the cross-entropy loss $H(q,p_{\theta})$ between the ground truth $q$ and student prediction $p_{\theta}$ and Kullback-Leibler divergence (KL divergence) $D(p_{\phi}^{\tau},p_{\theta}^{\tau})$ between the predictions of the student and the teacher as follows: + +$$ +\mathcal {L} _ {K D} (\boldsymbol {\theta}, \phi) = \alpha_ {h} \cdot H (q, p _ {\boldsymbol {\theta}}) + \alpha_ {s} \cdot D \left(p _ {\phi} ^ {\tau}, p _ {\boldsymbol {\theta}} ^ {\tau}\right) \tag {1} +$$ + +where + +$$ +H (q, p _ {\boldsymbol {\theta}}) = - \sum_ {k = 1} ^ {K} q (k) \log (p _ {\boldsymbol {\theta}} (k)), +$$ + +$$ +D (p _ {\phi} ^ {\tau}, p _ {\pmb {\theta}} ^ {\tau}) = \sum_ {k = 1} ^ {K} p _ {\phi} ^ {\tau} (k) \cdot \log \frac {p _ {\phi} ^ {\tau} (k)}{p _ {\pmb {\theta}} ^ {\tau} (k)}, +$$ + +$\alpha_{h}$ and $\alpha_{s}$ are weighting hyper-parameter values for the cross-entropy loss and KL divergence, respectively. We regard the cross-entropy loss $H(q,p_{\theta})$ as the hard loss for the student model, KL divergence $D(p_{\phi}^{\tau},p_{\theta}^{\tau})$ as the soft loss for the student model, and following BERT (Devlin et al., 2019), $H(q,p_{\theta})$ denotes the Masked Language Modeling loss (MLM loss). In the KD objective, we consider the teacher parameters $\phi$ as constant since we only train the student parameters $\theta$ while the teacher model $t_{\phi}$ is fixed: + +$$ +\mathcal {L} _ {K D: t \rightarrow s} (\boldsymbol {\theta}, \operatorname {S t o p G} (\phi)) \tag {2} +$$ + +where $\operatorname{StopG}(x)$ denotes that we do not compute the gradient of $x$ . In the conventional KD method, Equation (2) is the final objective to learn the student model only with the pre-trained teacher model. + +Student $\rightarrow$ Teacher Different from such a one-way KD method, we introduce the reversed KD objective $\mathcal{L}_{ReKD:s\to t}(\operatorname {StopG}(\pmb {\theta}),\phi)$ to train the teacher model $t_\phi$ as follows: + +$$ +\mathcal {L} _ {R e K D: s \rightarrow t} (\operatorname {S t o p G} (\boldsymbol {\theta}), \phi) = \tag {3} +$$ + +$$ +\beta_ {h} \cdot H (q, p _ {\phi}) + \beta_ {s} \cdot D (p _ {\boldsymbol {\theta}} ^ {\tau}, p _ {\phi} ^ {\tau}) +$$ + +where $\beta_{h}$ and $\beta_{s}$ are weighting hyper-parameter values of the hard loss $H(q,p_{\phi})$ and soft loss $D(p_{\theta}^{\tau},p_{\phi}^{\tau})$ for the teacher model, respectively. By minimizing KL divergence $D(p_{\theta}^{\tau},p_{\phi}^{\tau})$ between the predictions of the student model $(p_{\theta}^{\tau})$ and the teacher model $(p_{\phi}^{\tau})$ , the teacher model learns from the student model. In the reversed KD objective, we only train the teacher model by applying $\operatorname{StopG}(x)$ to the gradient of the student parameters $\theta$ . + +Co-training With the Equations (2) and (3), we get the final objective $\mathcal{L}_{CTCD}(\pmb {\theta},\phi)$ as follows: + +$$ +\boldsymbol {\theta} ^ {*}, \phi^ {*} = \underset {\boldsymbol {\theta}, \boldsymbol {\phi}} {\operatorname {a r g m i n}} \mathcal {L} _ {C T C D} (\boldsymbol {\theta}, \boldsymbol {\phi}) = +$$ + +$$ +\mathcal {L} _ {K D} (\boldsymbol {\theta}, \operatorname {S t o p G} (\phi)) + \mathcal {L} _ {R e K D} (\operatorname {S t o p G} (\boldsymbol {\theta}), \phi) \tag {4} +$$ + +Adapting to Downstream Task After model cotraining/-distillation, the trained smaller (student) model $s_{\theta^*}$ with trained parameter $\theta^*$ can be deployed for multiple downstream tasks to improve inference efficiency. To fine-tune the model for a specific downstream task, we adapt the trained parameter $\theta^*$ using the dataset for that task. + +# 4 Community KD + +Furthermore, we introduce an advanced CTCD application named Community KD that can utilize CTCD framework with the pre-trained teacher model, as shown in Figure 3. It consists of a pre-trained teacher $t_{\phi^*}$ with pre-trained parameters $\phi^*$ and two students $s_{\theta_1}$ and $s_{\theta_2}$ parameterized by $\theta_1$ and $\theta_2$ , respectively. During the co-training of two students, each student learns from the hard labels, soft labels generated from the pre-trained teacher predictions, and soft labels generated from other student predictions. In other words, we conduct one-way knowledge distillation from the pre-trained teacher to each student by minimizing KL divergence between the teacher prediction and predictions of each student $D(p_{\theta_1}^\tau, p_{\phi^*}^\tau)$ and $D(p_{\theta_2}^\tau, p_{\phi^*}^\tau)$ and co-distillation between students in both directions by minimizing $\mathcal{L}_{CTCD}(\pmb{\theta}_1, \pmb{\theta}_2)$ . The final objective $\mathcal{L}_{CM}(\pmb{\theta}_1, \pmb{\theta}_2, \mathrm{StopG}(\pmb{\phi}^*))$ is as follows: + +$$ +\boldsymbol {\theta} _ {1} ^ {*}, \boldsymbol {\theta} _ {2} ^ {*} = \underset {\boldsymbol {\theta} _ {1}, \boldsymbol {\theta} _ {2}} {\operatorname {a r g m i n}} \mathcal {L} _ {C M} (\boldsymbol {\theta} _ {1}, \boldsymbol {\theta} _ {2}, \operatorname {S t o p G} (\boldsymbol {\phi} ^ {*})) = +$$ + +$$ +\mathcal {L} _ {C T C D} \left(\boldsymbol {\theta} _ {\mathbf {1}}, \boldsymbol {\theta} _ {\mathbf {2}}\right) + D \left(p _ {\boldsymbol {\theta} _ {\mathbf {1}}} ^ {\tau}, p _ {\boldsymbol {\phi} ^ {*}} ^ {\tau}\right) + D \left(p _ {\boldsymbol {\theta} _ {\mathbf {2}}} ^ {\tau}, p _ {\boldsymbol {\phi} ^ {*}} ^ {\tau}\right) \tag {5} +$$ + +We select one of the two students distilled by Community KD $(\pmb{\theta}^{*} = \pmb{\theta}_{1}^{*}$ or $\pmb{\theta}^{*} = \pmb{\theta}_{2}^{*})$ and fine-tune the selected single student $s_{\theta^*}$ for downstream tasks, resulting that the inference cost does not increase compared with the conventional KD method. + +# 5 Experiment + +We present a comprehensive analysis of the proposed CTCD method through empirical experiments. In Section 5.1, we validate our CTCD method by comparing the performance of small models distilled by CTCD to the original large model on the GLUE benchmark (Wang et al., 2019). In Section 5.2, we analyze the impact of co-distillation by adjusting loss weights for the soft losses of a student and a teacher. In Section 5.3, we study the impact of training length on CTCD method, allowing us to determine the optimal training length for CTCD method. In Section 5.4, we demonstrate the efficacy of Community KD by comparing the performance of a model distilled by the Community KD to a model distilled by the one-way KD. + +Implementation details We use a learning rate of 5e-4, linear warm-up of $5\%$ , AdamW optimizer (Loshchilov and Hutter, 2019), and batch size of 128 with A100 GPUs for pre-training. We train the teacher and student models from scratch + +![](images/629d3c08e3879383bed68ff8467013bbf2893270749e28a009430cf698ef1b8e.jpg) +Figure 4: Average performance on dev sets of GLUE benchmark after training 10 epochs Learning from the student improves the performance of the teacher by an average of 1.88. Such improvement in teacher performance leads to improvement in student quality from 77.46 to 77.94. + +for 20 epochs in Section 5.1. To analyze the effectiveness of CTCD method, we train the teacher and student models for 10 epochs and 20 epochs in Section 5.2 and Section 5.3, respectively. In Section 5.4, we train the models for 3 epochs after parameter remapping, which is the same as in conventional one-way KD method (Sanh et al., 2019a). + +Training Time For the one-way distillation, we need 1 GPU day to train the teacher for 10 epochs and 1.3 GPU days to distill knowledge from the pre-trained teacher to the student for another 10 epochs, which consumes a total of 2.3 days. For CTCD, it takes 3 GPU days to train both teacher and student models from scratch for 10 epochs. We use the automatic mixed precision (AMP) of PyTorch (Paszke et al., 2019) to accelerate training for all our models. + +Dataset To validate our CTCD method, we use a reduced dataset (30M) created by uniformly sampling 1 out of every 4 sentences from the original pre-training dataset (BookCorpus (Zhu et al., 2015) + Wikipedia (Foundation)) used in the conventional one-way KD method (Sanh et al., 2019a). We evaluate our distilled models on the dev sets of the GLUE benchmark (Wang et al., 2019), which consists of nine sentence-level classification tasks. In Section 5.4, we use the original pre-training dataset to train Community KD method. + +Model Architecture We use a 6-layer BERT (Devlin et al., 2019) model as the teacher and a 4-layer BERT model as the student to analyze the effectiveness and efficiency of our CTCD method. In Section 5.4, we use a pre-trained BERT-base model as the teacher and a 6-layer BERT model as the student. + +
PerformanceGAP w/ Teacher
Original Teacher78.06-
StudentOne-way Distil. (10 epoch)77.46-0.60
CTCD (10 epoch)77.94-0.12
One-way Distil. (20 epoch)78.39+0.33
CTCD (20 epoch)79.12+1.66
+ +Table 1: Average performance on dev sets of GLUE benchmark The student distilled by CTCD significantly outperforms the original teacher trained using the stand-alone method, achieving a higher gain of 1.66. + +![](images/e6477641fb7d72bfd604577452fd871da7a702da233fd9d17fa1cad1dae7cd3a.jpg) +(a) Teacher Performance + +![](images/95465e08b4a98da6f7b866e96302ddfeb989b9d903d367a69600010ece7b5758.jpg) +(b) Student Performance + +![](images/534e57ab140f7df0befb22ca0566a646b9d631174dfe28b45dcbdee40e11bd61.jpg) +Figure 5: Adjusting Loss Weight We investigate the impact of the distillation for the teacher model and student model by adjusting loss weights $(\alpha_{h},\alpha_{s},\beta_{h},\beta_{s})$ for hard loss and soft loss. (a) We (co-)train the teacher model distilling knowledge from the student by fixing $\alpha_{h}:\alpha_{s} = 1:1$ and varying $\beta_{h}:\beta_{s}$ on the large text corpus. (b) We (co-)train the student model distilling knowledge from the teacher by fixing $\beta_{h}:\beta_{s} = 1:1$ and varying $\alpha_{h}:\alpha_{s}$ on the large text corpus. Then we report the average performance of each pre-trained model after fine-tuning it on downstream tasks (dev sets) of GLUE benchmark. +Figure 6: Length of Training We pre-trained student models under two different training lengths 10/20 epochs while distilling knowledge from teacher models via ours or the conventional KD method. Then we adapt pre-trained student models on CoLA task. With enough longer training (20 epoch), the student model distilled by ours significantly outperforms the student model distilled by the conventional KD method, with a higher gain of 5.22. + +# 5.1 Could Knowledge Distillation Help Improve Performance? + +In Table 1 and Figure 4, we show the average performance of models trained using different methods on a large text corpus and fine-tuned against the GLUE benchmark. Stand-alone trains a model + +without using any knowledge distillation. Co-training & One-way distillation trains teacher and student models together from scratch, with knowledge only flowing from the teacher to the student. Co-training & Co-distillation (Ours) is CTCD method, which trains both teacher and student models together from scratch and distills knowledge between each other in both directions. For distillation methods, we set the weights of the hard losses for the teacher and student to 1. The weights of the soft losses are chosen from the set $\{0.5, 1, 2, 4\}$ , and the results are reported with the best-performing weights. + +1) Overall Results As shown in Table 1, the student distilled by CTCD method significantly outperforms the original teacher trained using the stand-alone method on the average performance of the GLUE benchmark, achieving a higher gain of 1.66. Furthermore, the student model distilled by our CTCD method outperforms the student distilled by the one-way distillation method on the average performance of the GLUE benchmark. After training for 10 and 20 epochs, the student distilled by our CTCD method consistently has higher gains + +than the student distilled by one-way distillation, as 77.46 vs. 77.94 and 78.39 vs. 79.12, respectively. + +# 2) Does learning from a small and weak student provide a performance benefit to the teacher? + +As shown in Figure 4, the distillation of knowledge from the student model to the teacher model has been shown to significantly improve the quality of the teacher model, with an average increase of 1.88 compared to teacher training methods that do not incorporate such distillation process (such as Stand-alone and Co-training & one-way distillation). + +3) Is the teacher's performance improvement reflected in the student's performance improvement? Furthermore, we find that a better teacher leads to further performance improvement of the student from 77.46 to 77.94. The results demonstrate that the distillation process successfully improves the performance of both the teacher and student. The student trained with our CTCD method achieves better performance than students trained with the Stand-alone or Co-training & one-way distillation methods, with an average improvement of 0.88 and 0.47, respectively. + +# 5.2 In-depth Study 1: Adjusting Loss Weights + +In this Section, we investigate the impact of distillation on the performance of both the student and the teacher by adjusting loss weights $(\alpha_{h},\alpha_{s},\beta_{h},\beta_{s})$ for hard loss and soft loss. For example, setting $\alpha_{h}:\alpha_{s} = 1:4$ emphasizes learning from the teacher's knowledge (i.e., the soft loss for the student) $4\times$ more than the ground truth label distribution (i.e., the hard loss for the student), during co-training. This allows us to better understand the effect of distillation on each model and optimize their performance. + +Teacher side In Figure 5(a), we co-train the teacher model using distillation to transfer knowledge from the student model. We fix the weighting values for the losses of the student to $\alpha_{h}:\alpha_{s} = 1:1$ and vary the weighting values for the losses of the teacher, $\beta_{h}:\beta_{s}$ , while training on a large text corpus. We then evaluate the average performance of the pre-trained teacher models on downstream tasks from the dev sets of GLUE benchmark. + +Our results show that co-training the teacher with distillation outperforms training the teacher alone, regardless of the weighting values for the soft loss, by obtaining higher gains of 0.36, 0.77, 1.80, and 1.02 for $\beta_h: \beta_s = 1:1, 1:2, 1:4,$ and $4:4$ , respectively. Additionally, we find that giving more + +weight to the soft loss of the teacher during training $(\alpha_{h}:\alpha_{s}:\beta_{h}:\beta_{\mathbf{s}} = 1:1:1:\mathbf{1}\to 1:1:1:$ $2\rightarrow 1:1:1:4)$ leads to improved performance, with an average score of $78.42\to 78.83\to 79.86$ Furthermore, we observe that emphasizing only the soft loss of the teacher $(1:1:1:4)$ yields better performance than emphasizing both the hard and soft losses of the teacher $(1:1:4:4)$ , with an average score of 79.86 vs. 79.09. + +Student side We find that the student model's performance is not sensitive to the weighting values for the hard and soft losses of the student, $(\alpha_h:\alpha_s)$ . Regardless of the chosen values, co-training the student with distillation consistently improves its performance compared to training the student alone. For instance, when we emphasize the soft loss of the student by increasing the weighting value for $(\alpha_{s})$ as $1:1:1:1\to 1:2:1:1\to 1:4:1:1$ , we observe similar levels of performance for the student model. + +# 5.3 In-depth Study 2: Length of Training + +We studied the impact of co-training length on the effectiveness of the CTCD method (see Figure 6). We find that longer training leads to improved performance, as demonstrated by our experiments using two different training lengths: 10 epochs and 20 epochs. After pre-training the student models with these different lengths, we adapted them to the CoLA downstream tasks and evaluated their performance using Matthew Correlation. + +Results By increasing the (co-)training length from 10 epochs to 20 epochs, CTCD (Ours) significantly improves the performance of the student model from 35.02 to 46.23, with a gain of 11.21. This outperforms the conventional KD method, which only achieves a gain of 0.07 from 40.94 to 41.01, despite a longer training time. The conventional KD method relies on a pre-trained teacher model to train the student model, which allows for fast convergence but limits the learning of the student model. In contrast, the CTCD method allows for additional performance gains for both the teacher and student models by enabling them to learn and grow together during co-training. This can provide further benefits to the student model's performance with longer co-training. + +# 5.4 Efficacy of Community KD + +We compare the proposed Community KD with the conventional one-way KD method (Sanh et al., + +
Downstream TaskMetricDataset SizeAMPMNLI Acc. 392.7kQQP Acc. 363.8kQNLI Acc. 104.7kSST-2 Acc. 67.3kCoLA Matthew. 8.5kSTSB Pearson. 5.7kMRPC F1 3.7kAcc. 2.5kRTE Acc.
TeacherBERT (109M)84.1790.8990.6891.8657.5488.8488.5689.3185.0465.3483.23
Student(67M)One-way KD (Sanh et al., 2019b)FP3281.9390.0587.7290.9452.0386.2886.0787.9482.5957.7680.33
Ours: Student 1FP1681.8890.1788.2491.5154.8286.7086.4989.7685.2959.2181.40
Ours: Student 2FP1681.3489.7588.3790.7156.0886.4286.4489.8085.2959.2081.34
+ +Table 2: Efficacy of Community KD The pre-trained BERT and 6-layer BERT is the teacher model and student architecture, respectively, for both ours and the conventional one-way KD method. We fine-tune the distilled students on dev sets of GLUE benchmark. We observe that learning from the soft knowledge of different student models improves performance over the conventional one-way KD method on most downstream tasks. + +2019a). To ensure a fair comparison, we use the pre-trained BERT-base as the teacher model for both methods and the 6-layer BERT as the student, which is the same architecture used in the conventional one-way KD method. As described in Section 4, we train two student models concurrently and they learn from the pre-trained BERT, the ground truth labels, and each other's knowledge. Note that since we fine-tune one of the two students distilled by Community KD for downstream tasks, the inference cost is the same as the conventional one-way KD method. In Table 2, we report the results of BERT and the conventional one-way KD method using checkpoints provided by Hugging Face (HuggingFace) and both students (Ours: Student 1 and Ours: Student 2) on the dev sets of the GLUE benchmark. We apply Automatic Mixed Precision (AMP) (Paszke et al., 2019) to Community KD, which typically speeds up training but may hurt performance. + +Results The results presented in Table 2 show that Community KD, leads to improved performance on downstream tasks such as QQP, QNLI, SST-2, CoLA, STSB, MRPC, and RTE, even when applying quantization techniques. Specifically, the average performance gain of the student model distilled using our Community KD method is 1.04 (1.2%) higher than that of the student model distilled by the conventional one-way KD method. This suggests that incorporating knowledge distillation from both a student model and a pre-trained teacher model is more effective than only using knowledge distillation from the pre-trained teacher model. + +# 6 Limitations & Future Work + +Limitations The proposed method co-train models from scratch and may require a longer pretraining time than the conventional KD method. However, as we described in Section 5.3, when the student model is trained long enough with its + +teacher, it can outperform the models trained with the conventional KD on the downstream task. The proposed co-training method may increase the overall training cost compared with one-way distillation, and it may become a performance bottleneck depending on training resource constraints. However, note that CTCD can improve model quality while having the same inference cost as the one-way distillation on downstream tasks. + +Future Work 1) Architecture Sharing. Models can share some of their architectures by reusing the output of such architectures and updating them together during back-propagation. This may help reduce the additional computing and memory overhead incurred by model co-training, while improving the model quality, especially for the student model. 2) Integration of Student Architecture Design and Data Augmentation. Future research can focus on effectively combining the CTCD framework with student architecture design and data augmentation techniques. This integration provides a promising alternative to traditional one-way knowledge distillation methods, leading to significant improvements in language modeling tasks. + +# 7 Conclusion + +The size and complexity of pre-trained language models (PLMs) can hinder their practicality for online downstream tasks. To address this, we introduced a novel framework called co-training and co-distillation (CTCD). By training models of different sizes together and extracting inter-model knowledge in both directions, the proposed CTCD framework improves both model efficiency and performance. The proposed framework overcomes the trade-off between efficiency and performance in traditional one-way knowledge distillation methods. Notably, our compressed models achieved an impressive gain of 1.66 on the GLUE benchmark, outperforming large models trained using standalone methods. + +# References + +Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. In NeurIPS. +Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. 2019. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2978-2988, Florence, Italy. Association for Computational Linguistics. +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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. +Wikipedia Foundation. Wikipedia downloads. +Geoffrey Hinton, Oriol Vinyals, Jeff Dean, et al. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2(7). +HuggingFace. Huggingface. +Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. 2020. TinyBERT: Distilling BERT for natural language understanding. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 4163-4174, Online. Association for Computational Linguistics. +Hayeon Lee, Rui Hou, Jongpil Kim, Davis Liang, Sung Ju Hwang, and Alexander Min. 2023. A study on knowledge distillation from weak teacher for scaling up pre-trained language models. arXiv preprint arXiv:2305.18239. +Chunyuan Li, Xiang Gao, Yuan Li, Xiujun Li, Baolin Peng, Yizhe Zhang, and Jianfeng Gao. 2020. Optimus: Organizing sentences via pre-trained modeling of a latent space. In EMNLP. +Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net. +Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: + +An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc. +Yujia Qin, Yankai Lin, Jing Yi, Jiajie Zhang, Xu Han, Zhengyan Zhang, Yusheng Su, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2022. Knowledge inheritance for pre-trained language models. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3921-3937, Seattle, United States. Association for Computational Linguistics. +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. +Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. 2015. Fitnets: Hints for thin deep nets. In *In Proceedings of ICLR*. +Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019a. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108. +Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019b. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108. +Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. 2019. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053. +Siqi Sun, Yu Cheng, Zhe Gan, and Jingjing Liu. 2019. Patient knowledge distillation for BERT model compression. 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 4323-4332, Hong Kong, China. Association for Computational Linguistics. +Raphael Tang, Yao Lu, Linqing Liu, Lili Mou, Olga Vechtomova, and Jimmy Lin. 2019. Distilling task-specific knowledge from bert into simple neural networks. arXiv preprint arXiv:1903.12136. +Henry Tsai, Jason Riesa, Melvin Johnson, Naveen Arivazhagan, Xin Li, and Amelia Archer. 2019. Small and practical BERT models for sequence labeling. 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 3632-3636, Hong Kong, China. Association for Computational Linguistics. + +Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: The impact of student initialization on knowledge distillation. arXiv preprint arXiv:1908.08962, 13. +Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations. +Wenhui Wang, Hangbo Bao, Shaohan Huang, Li Dong, and Furu Wei. 2020a. Minilmv2: Multi-head self-attention relation distillation for compressing pretrained transformers. arXiv preprint arXiv:2012.15828. +Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. 2020b. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in Neural Information Processing Systems, 33:5776-5788. +Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc. +Li Yuan, Francis EH Tay, Guilin Li, Tao Wang, and Jiashi Feng. 2020. Revisiting knowledge distillation via label smoothing regularization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3903-3911. +Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pages 19-27. \ No newline at end of file diff --git a/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/images.zip b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..48facec5bc113a8e5ed08f394695d2a4eba0cc38 --- /dev/null +++ b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:271e513ca11348f1f3ad48b6b93523a8f17248302438448f7c974b042f0d11c7 +size 376635 diff --git a/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/layout.json b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e45c7ecdeb4c8eeff9baf70ab97fc8283d8aa3b3 --- /dev/null +++ b/2023/Co-training and Co-distillation for Quality Improvement and Compression of Language Models/layout.json @@ -0,0 +1,7175 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 110, + 75, + 486, + 110 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 110, + 75, + 486, + 110 + ], + "spans": [ + { + "bbox": [ + 110, + 75, + 486, + 110 + ], + "type": "text", + "content": "Co-training and Co-distillation for Quality Improvement and Compression of Language Models" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "spans": [ + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": "Hayeon Lee" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{1*}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " Rui Hou" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " Jongpil Kim" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " \nDavis Liang" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{2}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " Hongbo Zhang" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " Sung Ju Hwang" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{3}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " Alexander Min" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " \nMeta AI" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " Abridge AI" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{2}" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "text", + "content": " KAIST" + }, + { + "bbox": [ + 124, + 119, + 471, + 162 + ], + "type": "inline_equation", + "content": "^{3}" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 96, + 163, + 499, + 190 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 96, + 163, + 499, + 190 + ], + "spans": [ + { + "bbox": [ + 96, + 163, + 499, + 190 + ], + "type": "text", + "content": "hayeonlee@meta.com rayhou@meta.com jpkim@meta.com \ndavis@abridge.com hbzhang@meta.com sjhwang82@kaist.ac.kr alexmin@meta.com" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 155, + 212, + 204, + 226 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 212, + 204, + 226 + ], + "spans": [ + { + "bbox": [ + 155, + 212, + 204, + 226 + ], + "type": "text", + "content": "Abstract" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 86, + 237, + 274, + 583 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 237, + 274, + 583 + ], + "spans": [ + { + "bbox": [ + 86, + 237, + 274, + 583 + ], + "type": "text", + "content": "Knowledge Distillation (KD) compresses computationally expensive pre-trained language models (PLMs) by transferring their knowledge to smaller models, allowing their use in resource-constrained or real-time settings. However, most smaller models fail to surpass the performance of the original larger model, resulting in sacrificing performance to improve inference speed. To address this issue, we propose Co-Training and Co-Distillation (CTCD), a novel framework that improves performance and inference speed together by co-training two models while mutually distilling knowledge. The CTCD framework successfully achieves this based on two significant findings: 1) Distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model. 2) The enhanced performance of the larger model further boosts the performance of the smaller model. The CTCD framework shows promise as it can be combined with existing techniques like architecture design or data augmentation, replacing one-way KD methods, to achieve further performance improvement. Extensive ablation studies demonstrate the effectiveness of CTCD, and the small model distilled by CTCD outperforms the original larger model by a significant margin of 1.66 on the GLUE benchmark." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 596, + 155, + 609 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 596, + 155, + 609 + ], + "spans": [ + { + "bbox": [ + 68, + 596, + 155, + 609 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 618, + 292, + 754 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 618, + 292, + 754 + ], + "spans": [ + { + "bbox": [ + 67, + 618, + 292, + 754 + ], + "type": "text", + "content": "In recent years, the high computational cost of pretrained language models (PLMs) (Radford et al., 2019; Yang et al., 2019; Dai et al., 2019; Shoeybi et al., 2019; Li et al., 2020; Brown et al., 2020) become a constraint in serving resource-limited or real-time applications. Knowledge Distillation (KD) (Hinton et al., 2015; Romero et al., 2015) is a popular model compression technique to tackle this issue, with a smaller model (student) learning (distilling) from a larger model (teacher)." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 212, + 527, + 470 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 212, + 527, + 470 + ], + "spans": [ + { + "bbox": [ + 302, + 212, + 527, + 470 + ], + "type": "text", + "content": "The ideal scenario would involve compressing the teacher to match the size of the small student without any performance drop. However, despite intense research in the area of KD (Turc et al., 2019; Tsai et al., 2019; Tang et al., 2019; Jiao et al., 2020; Sanh et al., 2019a; Sun et al., 2019; Wang et al., 2020b,a), none of the existing methods have successfully avoided performance degradation during the distillation process. Some approaches have attempted to mitigate the performance gap by incorporating external factors. For instance, Jiao et al. (2020) incorporates data augmentation, while Wang et al. (2020b,a) focuses on designing student architecture. However, these approaches have limitations as they only provide supplementary techniques rather than addressing the fundamental issue of performance loss in KD. This raises an interesting question: Can we compress a model without scarifying the performance through KD?" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 476, + 527, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 476, + 527, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 476, + 527, + 772 + ], + "type": "text", + "content": "In this work, we propose a novel framework called Co-Training and Co-Distillation (CTCD) for improving the performance of a language model while compressing it through KD. CTCD involves jointly training the teacher and the student models, allowing them to transfer knowledge to each other bidirectionally, from the teacher to the student and vice versa. Our work uncovers two key findings within the CTCD framework: Firstly, we demonstrate that transferring knowledge from the smaller model to the larger model during co-training significantly improves the performance of the larger model. In other words, by employing knowledge distillation (KD), we enhance the performance of the teacher model compared to standalone training. This is significantly different from conventional one-way KD, where the teacher model cannot benefit from the distillation process since it is no longer trained or distilled. Secondly, the improved performance of the larger model leads to further enhancements in the performance of the smaller model through KD from the teacher model to the student" + } + ] + } + ], + "index": 8 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 88, + 761, + 238, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 88, + 761, + 238, + 772 + ], + "spans": [ + { + "bbox": [ + 88, + 761, + 238, + 772 + ], + "type": "text", + "content": "* Work done while interning at Meta AI." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "text", + "content": "7458" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "type": "footer", + "angle": 0, + "lines": [ + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "spans": [ + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "type": "text", + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 7458-7467 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 0 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 157, + 73, + 431, + 170 + ], + "blocks": [ + { + "bbox": [ + 157, + 73, + 431, + 170 + ], + "lines": [ + { + "bbox": [ + 157, + 73, + 431, + 170 + ], + "spans": [ + { + "bbox": [ + 157, + 73, + 431, + 170 + ], + "type": "image", + "image_path": "d0d292e53efee35483b52cd00a332dd1d5f01ed7dd3d309c7f98be67af4a2f3d.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 181, + 525, + 204 + ], + "lines": [ + { + "bbox": [ + 67, + 181, + 525, + 204 + ], + "spans": [ + { + "bbox": [ + 67, + 181, + 525, + 204 + ], + "type": "text", + "content": "Figure 1: Task-agnostic KD method The proposed framework are task-agnostic KD methods that perform KD during the pre-training stage. This allows the distilled model to be deployed and fine-tuned on various downstream tasks." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 216, + 290, + 379 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 216, + 290, + 379 + ], + "spans": [ + { + "bbox": [ + 67, + 216, + 290, + 379 + ], + "type": "text", + "content": "model. These novel findings enable the smaller model to surpass the independently trained larger model while maintaining its inference efficiency within the CTCD framework. Moreover, the CTCD framework can be combined orthogonally with existing techniques for external factors such as student architecture design Wang et al. (2020b,a) or data augmentation (Jiao et al., 2020). We achieve this by replacing traditional one-way KD methods with the proposed CTCD framework, which holds promise for significant performance improvements in language modeling tasks." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 380, + 291, + 569 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 380, + 291, + 569 + ], + "spans": [ + { + "bbox": [ + 67, + 380, + 291, + 569 + ], + "type": "text", + "content": "In addition to our CTCD framework, we introduce a Community KD that utilizes CTCD framework with the pre-trained teacher model by combining CTCD with conventional KD. Community KD distills knowledge from two students to each other, as well as from the pre-trained teacher to each student, during the co-training of the students. We show that distilling from the other student as well as the pre-trained teacher is better than only one-way distillation from the pre-trained teacher, as is done in conventional KD. Note that the inference cost on a task is the same as in conventional KD, as we take one of the students distilled by Community KD when deploying it to the task." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 571, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 571, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 571, + 291, + 773 + ], + "type": "text", + "content": "We validate the effectiveness and efficiency of our CTCD on the GLUE benchmark (Wang et al., 2019), which contains different language understanding tasks. As shown in Figure 1, We focus on task-agnostic KD scenarios, where KD occurs during the pre-training stage. Then, we fine-tune the distilled PLMs on each downstream task and evaluate their performance. This is more challenging compared to task-specific KD, as it requires substantial computational resources to train PLMs on a large text corpus, and the distilled knowledge should be transferable across diverse downstream tasks. Our extensive ablation study revealed that the larger model benefits from the distillation of the smaller model, and the performance improvement" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 216, + 526, + 311 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 216, + 526, + 311 + ], + "spans": [ + { + "bbox": [ + 302, + 216, + 526, + 311 + ], + "type": "text", + "content": "of the larger model further enhances the performance of the smaller model. In our experiments, the student model compressed by CTCD framework obtained 1.66 higher gain than the original large model trained using a stand-alone method, demonstrating that our approach can improve model quality and inference efficiency concurrently." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 314, + 312, + 515, + 324 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 312, + 515, + 324 + ], + "spans": [ + { + "bbox": [ + 314, + 312, + 515, + 324 + ], + "type": "text", + "content": "In summary, our contributions are as follows:" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 316, + 335, + 526, + 596 + ], + "type": "list", + "angle": 0, + "index": 11, + "blocks": [ + { + "bbox": [ + 316, + 335, + 525, + 402 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 316, + 335, + 525, + 402 + ], + "spans": [ + { + "bbox": [ + 316, + 335, + 525, + 402 + ], + "type": "text", + "content": "- We propose a novel knowledge distillation framework called Co-Training and Co-Distillation (CTCD) framework to improve the performance of models while compressing them through KD." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 316, + 413, + 526, + 467 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 316, + 413, + 526, + 467 + ], + "spans": [ + { + "bbox": [ + 316, + 413, + 526, + 467 + ], + "type": "text", + "content": "- Through our experiments, we demonstrate that distilling knowledge from the smaller model to the larger model during co-training improves the performance of the larger model." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 316, + 477, + 525, + 531 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 316, + 477, + 525, + 531 + ], + "spans": [ + { + "bbox": [ + 316, + 477, + 525, + 531 + ], + "type": "text", + "content": "- Additionally, we highlight that the enhanced performance of the larger model further boosts the performance of the smaller model, resulting in improved performance for both models." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 316, + 541, + 525, + 596 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 316, + 541, + 525, + 596 + ], + "spans": [ + { + "bbox": [ + 316, + 541, + 525, + 596 + ], + "type": "text", + "content": "- We provide valuable insights into adjusting loss weights and the length of the training phase for the effective application of the CTCD framework through extensive ablation study." + } + ] + } + ], + "index": 10 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 302, + 615, + 396, + 628 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 615, + 396, + 628 + ], + "spans": [ + { + "bbox": [ + 302, + 615, + 396, + 628 + ], + "type": "text", + "content": "2 Related Work" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "type": "text", + "content": "One-way Knowledge Distillation Knowledge distillation (KD) (Hinton et al., 2015) is a model compression technique in which a smaller student model distills knowledge from a larger, pre-trained teacher model. Recently, many researchers have explored KD to address a high computational complexity of a language model resulting from its increasing size. This includes task-agnostic KD methods for the pre-training stage (Sanh et al., 2019a; Wang et al., 2020b,a), task-specific KD method for" + } + ] + } + ], + "index": 13 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "7459" + } + ] + } + ], + "index": 14 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 1 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 119, + 69, + 480, + 195 + ], + "blocks": [ + { + "bbox": [ + 119, + 69, + 480, + 195 + ], + "lines": [ + { + "bbox": [ + 119, + 69, + 480, + 195 + ], + "spans": [ + { + "bbox": [ + 119, + 69, + 480, + 195 + ], + "type": "image", + "image_path": "802bc58628f2d24e467622a2b9f73e72a1eb332c43f6f739513283e02d8d1a6f.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 201, + 526, + 255 + ], + "lines": [ + { + "bbox": [ + 67, + 201, + 526, + 255 + ], + "spans": [ + { + "bbox": [ + 67, + 201, + 526, + 255 + ], + "type": "text", + "content": "Figure 2: Co-Training and Co-Distillation (CTCD) During training, the teacher and student models can learn more effectively by comparing their prediction outputs not only against the ground truth but also against each other's predictions. We refer to the former as a \"hard\" loss and the latter as a \"soft\" loss. For example, the student soft loss captures the distance between the student's prediction and the teacher's prediction, and vice versa. This co-training and co-distillation approach improves the performance of the teacher model, which in turn benefits the performance of the student model." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 267, + 291, + 430 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 267, + 291, + 430 + ], + "spans": [ + { + "bbox": [ + 67, + 267, + 291, + 430 + ], + "type": "text", + "content": "the fine-tuning stage (Sun et al., 2019), and both of pre-training and fine-tuning stages (Jiao et al., 2020). Additionally, Wang et al. (2020b,a) have redesigned the architectures of student language models. However, the one-way KD can lead to a loss of knowledge, resulting in smaller models that generally have difficulty matching the performance of larger models, leading to performance degradation. In contrast, our CTCD can improve the quality of both teacher and student models, making it possible for the student to achieve the same quality as the original teacher model." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 433, + 291, + 718 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 433, + 291, + 718 + ], + "spans": [ + { + "bbox": [ + 67, + 433, + 291, + 718 + ], + "type": "text", + "content": "Reversed Knowledge Distillation Recently, researchers (Yuan et al., 2020; Qin et al., 2022; Lee et al., 2023) have demonstrated that reversed Knowledge Distillation (reversed KD), which transfers knowledge from a smaller or poorer model to a larger model, can improve the performance of the student model. In particular, Qin et al. (2022); Lee et al. (2023) investigated the application of reversed KD in the PLMs, showing that a larger model can benefit from a poorer and pre-trained model for a specific downstream task. Inspired by the success of reversed KD, we design a co-distillation framework that includes reversed KD to improve the performance of the teacher model by distilling knowledge from the smaller student model. Unlike existing reversed KD methods, which are limited to improving the performance of the larger model, our proposed co-distillation framework can achieve both performance improvement and model compression, by showing a better-quality teacher leads to a better-quality student." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 726, + 248, + 740 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 726, + 248, + 740 + ], + "spans": [ + { + "bbox": [ + 67, + 726, + 248, + 740 + ], + "type": "text", + "content": "3 Co-training and Co-distillation" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 747, + 290, + 775 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 747, + 290, + 775 + ], + "spans": [ + { + "bbox": [ + 67, + 747, + 290, + 775 + ], + "type": "text", + "content": "We first introduce the concepts of co-training and co-distillation briefly:" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 267, + 525, + 309 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 267, + 525, + 309 + ], + "spans": [ + { + "bbox": [ + 302, + 267, + 525, + 309 + ], + "type": "text", + "content": "Co-training trains two (different-sized) models (e.g., a teacher and student) concurrently with the goal of achieving similar model quality." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 312, + 525, + 353 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 312, + 525, + 353 + ], + "spans": [ + { + "bbox": [ + 302, + 312, + 525, + 353 + ], + "type": "text", + "content": "Co-distillation transfers knowledge in both directions between two models (e.g., a teacher and student), during co-training." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 353, + 525, + 473 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 353, + 525, + 473 + ], + "spans": [ + { + "bbox": [ + 302, + 353, + 525, + 473 + ], + "type": "text", + "content": "Figure 2 illustrates how co-trained models learn together by comparing their prediction outputs against predictions from each other and to the hard labels (or \"ground truth\"). We refer to the former as a \"soft\" loss and the latter as a \"hard\" loss. For instance, the soft loss of the student model measures the accuracy of the student's prediction by considering the teacher's prediction as a soft label, and vice versa." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "spans": [ + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": "Task Formulation Suppose that we are given a classification task with " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "K" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " classes. For each training instance " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "x" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " and its ground truth label " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "y" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": ", we denote that the ground truth distribution over the labels is " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "q(k|x)" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " (" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "q(k)" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " for simplicity) where for each label " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "k \\in \\{1 \\dots K\\}" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "q(y) = 1" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "q(k) = 0" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " for all " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "k \\neq y" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": ". For each " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "x" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": ", the teacher model " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "t_{\\phi}" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " parameterized by " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "\\phi" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " and the student model " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "s_{\\theta}" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " parameterized by " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "\\pmb{\\theta}" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " predict the probability of each label " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "k" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " as " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "p_{\\phi}^{\\tau}(k|x)" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "inline_equation", + "content": "p_{\\theta}^{\\tau}(k|x)" + }, + { + "bbox": [ + 302, + 482, + 526, + 619 + ], + "type": "text", + "content": ", respectively as follows:" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 327, + 629, + 498, + 661 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 327, + 629, + 498, + 661 + ], + "spans": [ + { + "bbox": [ + 327, + 629, + 498, + 661 + ], + "type": "interline_equation", + "content": "p _ {\\phi} ^ {\\tau} (k | x) = f (\\boldsymbol {z} ^ {t}) = \\frac {\\exp (z _ {k} ^ {t} / \\tau)}{\\sum_ {i = 1} ^ {K} \\exp (z _ {i} ^ {t} / \\tau)}", + "image_path": "705d569c6331d7a452cce43e0feef2d95f2c2465ec5a3f21bb7daeaf4cedbefc.jpg" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 327, + 669, + 498, + 699 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 327, + 669, + 498, + 699 + ], + "spans": [ + { + "bbox": [ + 327, + 669, + 498, + 699 + ], + "type": "interline_equation", + "content": "p _ {\\boldsymbol {\\theta}} ^ {\\tau} (k | x) = f \\left(\\boldsymbol {z} ^ {s}\\right) = \\frac {\\exp \\left(z _ {k} ^ {s} / \\tau\\right)}{\\sum_ {i = 1} ^ {K} \\exp \\left(z _ {i} ^ {s} / \\tau\\right)}", + "image_path": "608afbd1be8674c530bdcd0015defb3e94b7d9dc6a9c6443712dc8aa206f8093.jpg" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "spans": [ + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "content": "where " + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "inline_equation", + "content": "f" + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "content": " is the softmax function, " + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "inline_equation", + "content": "\\boldsymbol{z}^t = \\{z_i^t\\}_{i=1}^K = t_\\phi(x)" + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "content": " is the output logit of the teacher model, " + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "inline_equation", + "content": "\\boldsymbol{z}^s = \\{z_i^s\\}_{i=1}^K = s_\\theta(x)" + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "content": " is the output logit of the student model, and " + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "content": " is the temperature to soften " + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "inline_equation", + "content": "p_\\phi(k)" + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "inline_equation", + "content": "p_\\theta(k)" + }, + { + "bbox": [ + 302, + 705, + 525, + 773 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "text", + "content": "7460" + } + ] + } + ], + "index": 13 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 91, + 68, + 517, + 206 + ], + "blocks": [ + { + "bbox": [ + 91, + 68, + 517, + 206 + ], + "lines": [ + { + "bbox": [ + 91, + 68, + 517, + 206 + ], + "spans": [ + { + "bbox": [ + 91, + 68, + 517, + 206 + ], + "type": "image", + "image_path": "3cce1d7832d9f9783e4c1498ea96105b0a5d95d1557d91f872033827aeab68d6.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 66, + 211, + 526, + 255 + ], + "lines": [ + { + "bbox": [ + 66, + 211, + 526, + 255 + ], + "spans": [ + { + "bbox": [ + 66, + 211, + 526, + 255 + ], + "type": "text", + "content": "Figure 3: Community KD Different from conventional KD, where each student learns from the prediction of the pre-trained teacher only, the proposed approach learns each student from both prediction of the pre-trained teacher and prediction of another student during co-training. Note that since we take one of the pre-trained students to adapt it to downstream tasks, the inference cost is the same as the student training with the conventional KD." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "spans": [ + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "text", + "content": "The proposed objective " + }, + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{CTCD}(\\pmb {\\theta},\\phi)" + }, + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "text", + "content": " consists of a normal KD objective " + }, + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{KD:t\\to s}" + }, + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "text", + "content": " to distill knowledge from the teacher model to the student model and a reversed KD objective " + }, + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{ReKD:s\\to t}" + }, + { + "bbox": [ + 67, + 270, + 290, + 352 + ], + "type": "text", + "content": " to distill knowledge from the student model to the teacher model, during their co-training." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "spans": [ + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "content": "Teacher " + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "inline_equation", + "content": "\\rightarrow" + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "content": " Student The normal KD objective " + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{KD:t\\to s}(\\pmb {\\theta},\\pmb {\\phi})" + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "content": " aims to train the student model by minimizing a weighted sum of the cross-entropy loss " + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "inline_equation", + "content": "H(q,p_{\\theta})" + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "content": " between the ground truth " + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "inline_equation", + "content": "q" + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "content": " and student prediction " + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "inline_equation", + "content": "p_{\\theta}" + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "content": " and Kullback-Leibler divergence (KL divergence) " + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "inline_equation", + "content": "D(p_{\\phi}^{\\tau},p_{\\theta}^{\\tau})" + }, + { + "bbox": [ + 67, + 359, + 291, + 454 + ], + "type": "text", + "content": " between the predictions of the student and the teacher as follows:" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 76, + 465, + 289, + 492 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 76, + 465, + 289, + 492 + ], + "spans": [ + { + "bbox": [ + 76, + 465, + 289, + 492 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {K D} (\\boldsymbol {\\theta}, \\phi) = \\alpha_ {h} \\cdot H (q, p _ {\\boldsymbol {\\theta}}) + \\alpha_ {s} \\cdot D \\left(p _ {\\phi} ^ {\\tau}, p _ {\\boldsymbol {\\theta}} ^ {\\tau}\\right) \\tag {1}", + "image_path": "0faabad372e490ef3ff49d74b9603a3829dfc5a226002f8a7d8c440aabef00c9.jpg" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 494, + 98, + 505 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 494, + 98, + 505 + ], + "spans": [ + { + "bbox": [ + 67, + 494, + 98, + 505 + ], + "type": "text", + "content": "where" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 99, + 514, + 258, + 551 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 99, + 514, + 258, + 551 + ], + "spans": [ + { + "bbox": [ + 99, + 514, + 258, + 551 + ], + "type": "interline_equation", + "content": "H (q, p _ {\\boldsymbol {\\theta}}) = - \\sum_ {k = 1} ^ {K} q (k) \\log (p _ {\\boldsymbol {\\theta}} (k)),", + "image_path": "089d83e554414892739fcfe31ca3797148461fd6c15a845baa8adcbefa14c1f1.jpg" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 98, + 554, + 260, + 590 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 98, + 554, + 260, + 590 + ], + "spans": [ + { + "bbox": [ + 98, + 554, + 260, + 590 + ], + "type": "interline_equation", + "content": "D (p _ {\\phi} ^ {\\tau}, p _ {\\pmb {\\theta}} ^ {\\tau}) = \\sum_ {k = 1} ^ {K} p _ {\\phi} ^ {\\tau} (k) \\cdot \\log \\frac {p _ {\\phi} ^ {\\tau} (k)}{p _ {\\pmb {\\theta}} ^ {\\tau} (k)},", + "image_path": "d09c38f56d75eaf268667d434617951a5b5ce6dc1cd7166457a0b0e3bc730741.jpg" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "spans": [ + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "\\alpha_{h}" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "\\alpha_{s}" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " are weighting hyper-parameter values for the cross-entropy loss and KL divergence, respectively. We regard the cross-entropy loss " + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "H(q,p_{\\theta})" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " as the hard loss for the student model, KL divergence " + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "D(p_{\\phi}^{\\tau},p_{\\theta}^{\\tau})" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " as the soft loss for the student model, and following BERT (Devlin et al., 2019), " + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "H(q,p_{\\theta})" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " denotes the Masked Language Modeling loss (MLM loss). In the KD objective, we consider the teacher parameters " + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "\\phi" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " as constant since we only train the student parameters " + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "\\theta" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " while the teacher model " + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "inline_equation", + "content": "t_{\\phi}" + }, + { + "bbox": [ + 67, + 599, + 291, + 748 + ], + "type": "text", + "content": " is fixed:" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 124, + 759, + 290, + 774 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 124, + 759, + 290, + 774 + ], + "spans": [ + { + "bbox": [ + 124, + 759, + 290, + 774 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {K D: t \\rightarrow s} (\\boldsymbol {\\theta}, \\operatorname {S t o p G} (\\phi)) \\tag {2}", + "image_path": "91af49c370006339f0e65d16fb08810d1a9bcf0c6f6e364e641cce59180a00f9.jpg" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 270, + 526, + 326 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 270, + 526, + 326 + ], + "spans": [ + { + "bbox": [ + 302, + 270, + 526, + 326 + ], + "type": "text", + "content": "where " + }, + { + "bbox": [ + 302, + 270, + 526, + 326 + ], + "type": "inline_equation", + "content": "\\operatorname{StopG}(x)" + }, + { + "bbox": [ + 302, + 270, + 526, + 326 + ], + "type": "text", + "content": " denotes that we do not compute the gradient of " + }, + { + "bbox": [ + 302, + 270, + 526, + 326 + ], + "type": "inline_equation", + "content": "x" + }, + { + "bbox": [ + 302, + 270, + 526, + 326 + ], + "type": "text", + "content": ". In the conventional KD method, Equation (2) is the final objective to learn the student model only with the pre-trained teacher model." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "spans": [ + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "text", + "content": "Student " + }, + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "inline_equation", + "content": "\\rightarrow" + }, + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "text", + "content": " Teacher Different from such a one-way KD method, we introduce the reversed KD objective " + }, + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{ReKD:s\\to t}(\\operatorname {StopG}(\\pmb {\\theta}),\\phi)" + }, + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "text", + "content": " to train the teacher model " + }, + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "inline_equation", + "content": "t_\\phi" + }, + { + "bbox": [ + 302, + 334, + 525, + 390 + ], + "type": "text", + "content": " as follows:" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 348, + 401, + 525, + 423 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 348, + 401, + 525, + 423 + ], + "spans": [ + { + "bbox": [ + 348, + 401, + 525, + 423 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {R e K D: s \\rightarrow t} (\\operatorname {S t o p G} (\\boldsymbol {\\theta}), \\phi) = \\tag {3}", + "image_path": "37bb07df79c1ab3ab672514040e45767d9c5147a5c15c7b2e522bcc7830bfe9b.jpg" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 345, + 420, + 483, + 433 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 345, + 420, + 483, + 433 + ], + "spans": [ + { + "bbox": [ + 345, + 420, + 483, + 433 + ], + "type": "interline_equation", + "content": "\\beta_ {h} \\cdot H (q, p _ {\\phi}) + \\beta_ {s} \\cdot D (p _ {\\boldsymbol {\\theta}} ^ {\\tau}, p _ {\\phi} ^ {\\tau})", + "image_path": "a0d13b4c0b33f5846eadbab1dab62cce23e54bcdcbe75d013feb31943b8382a4.jpg" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "spans": [ + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": "where " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "\\beta_{h}" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "\\beta_{s}" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": " are weighting hyper-parameter values of the hard loss " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "H(q,p_{\\phi})" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": " and soft loss " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "D(p_{\\theta}^{\\tau},p_{\\phi}^{\\tau})" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": " for the teacher model, respectively. By minimizing KL divergence " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "D(p_{\\theta}^{\\tau},p_{\\phi}^{\\tau})" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": " between the predictions of the student model " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "(p_{\\theta}^{\\tau})" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": " and the teacher model " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "(p_{\\phi}^{\\tau})" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": ", the teacher model learns from the student model. In the reversed KD objective, we only train the teacher model by applying " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "\\operatorname{StopG}(x)" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": " to the gradient of the student parameters " + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "inline_equation", + "content": "\\theta" + }, + { + "bbox": [ + 302, + 444, + 525, + 568 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 577, + 524, + 604 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 577, + 524, + 604 + ], + "spans": [ + { + "bbox": [ + 302, + 577, + 524, + 604 + ], + "type": "text", + "content": "Co-training With the Equations (2) and (3), we get the final objective " + }, + { + "bbox": [ + 302, + 577, + 524, + 604 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{CTCD}(\\pmb {\\theta},\\phi)" + }, + { + "bbox": [ + 302, + 577, + 524, + 604 + ], + "type": "text", + "content": " as follows:" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 336, + 616, + 492, + 639 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 336, + 616, + 492, + 639 + ], + "spans": [ + { + "bbox": [ + 336, + 616, + 492, + 639 + ], + "type": "interline_equation", + "content": "\\boldsymbol {\\theta} ^ {*}, \\phi^ {*} = \\underset {\\boldsymbol {\\theta}, \\boldsymbol {\\phi}} {\\operatorname {a r g m i n}} \\mathcal {L} _ {C T C D} (\\boldsymbol {\\theta}, \\boldsymbol {\\phi}) =", + "image_path": "b707fb315535ade8f4f81844785182e9b8997fde80ac2f0896112eacf8ea2257.jpg" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 314, + 641, + 524, + 668 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 641, + 524, + 668 + ], + "spans": [ + { + "bbox": [ + 314, + 641, + 524, + 668 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {K D} (\\boldsymbol {\\theta}, \\operatorname {S t o p G} (\\phi)) + \\mathcal {L} _ {R e K D} (\\operatorname {S t o p G} (\\boldsymbol {\\theta}), \\phi) \\tag {4}", + "image_path": "ae19b635bf76ee26c037081dedb5f081b9a9292cc7f609ddd224997a48473726.jpg" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "text", + "content": "Adapting to Downstream Task After model cotraining/-distillation, the trained smaller (student) model " + }, + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "inline_equation", + "content": "s_{\\theta^*}" + }, + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "text", + "content": " with trained parameter " + }, + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "inline_equation", + "content": "\\theta^*" + }, + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "text", + "content": " can be deployed for multiple downstream tasks to improve inference efficiency. To fine-tune the model for a specific downstream task, we adapt the trained parameter " + }, + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "inline_equation", + "content": "\\theta^*" + }, + { + "bbox": [ + 302, + 678, + 525, + 772 + ], + "type": "text", + "content": " using the dataset for that task." + } + ] + } + ], + "index": 18 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "type": "text", + "content": "7461" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 171, + 84 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 171, + 84 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 171, + 84 + ], + "type": "text", + "content": "4 Community KD" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "spans": [ + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": "Furthermore, we introduce an advanced CTCD application named Community KD that can utilize CTCD framework with the pre-trained teacher model, as shown in Figure 3. It consists of a pre-trained teacher " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "t_{\\phi^*}" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " with pre-trained parameters " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "\\phi^*" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " and two students " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "s_{\\theta_1}" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "s_{\\theta_2}" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " parameterized by " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "\\theta_1" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "\\theta_2" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": ", respectively. During the co-training of two students, each student learns from the hard labels, soft labels generated from the pre-trained teacher predictions, and soft labels generated from other student predictions. In other words, we conduct one-way knowledge distillation from the pre-trained teacher to each student by minimizing KL divergence between the teacher prediction and predictions of each student " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "D(p_{\\theta_1}^\\tau, p_{\\phi^*}^\\tau)" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "D(p_{\\theta_2}^\\tau, p_{\\phi^*}^\\tau)" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " and co-distillation between students in both directions by minimizing " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{CTCD}(\\pmb{\\theta}_1, \\pmb{\\theta}_2)" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": ". The final objective " + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{CM}(\\pmb{\\theta}_1, \\pmb{\\theta}_2, \\mathrm{StopG}(\\pmb{\\phi}^*))" + }, + { + "bbox": [ + 67, + 92, + 291, + 336 + ], + "type": "text", + "content": " is as follows:" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 74, + 346, + 283, + 370 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 74, + 346, + 283, + 370 + ], + "spans": [ + { + "bbox": [ + 74, + 346, + 283, + 370 + ], + "type": "interline_equation", + "content": "\\boldsymbol {\\theta} _ {1} ^ {*}, \\boldsymbol {\\theta} _ {2} ^ {*} = \\underset {\\boldsymbol {\\theta} _ {1}, \\boldsymbol {\\theta} _ {2}} {\\operatorname {a r g m i n}} \\mathcal {L} _ {C M} (\\boldsymbol {\\theta} _ {1}, \\boldsymbol {\\theta} _ {2}, \\operatorname {S t o p G} (\\boldsymbol {\\phi} ^ {*})) =", + "image_path": "a9649bfaadff9424c7160dce9d6cc38598b5ea12589ffdbe388a2664986ca12e.jpg" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 74, + 371, + 289, + 398 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 74, + 371, + 289, + 398 + ], + "spans": [ + { + "bbox": [ + 74, + 371, + 289, + 398 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {C T C D} \\left(\\boldsymbol {\\theta} _ {\\mathbf {1}}, \\boldsymbol {\\theta} _ {\\mathbf {2}}\\right) + D \\left(p _ {\\boldsymbol {\\theta} _ {\\mathbf {1}}} ^ {\\tau}, p _ {\\boldsymbol {\\phi} ^ {*}} ^ {\\tau}\\right) + D \\left(p _ {\\boldsymbol {\\theta} _ {\\mathbf {2}}} ^ {\\tau}, p _ {\\boldsymbol {\\phi} ^ {*}} ^ {\\tau}\\right) \\tag {5}", + "image_path": "34af84bafddc4fbcf8db1f29e6b2773f31a2bb38dad07f8dc9698e4b90891645.jpg" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "spans": [ + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "text", + "content": "We select one of the two students distilled by Community KD " + }, + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "inline_equation", + "content": "(\\pmb{\\theta}^{*} = \\pmb{\\theta}_{1}^{*}" + }, + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "text", + "content": " or " + }, + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "inline_equation", + "content": "\\pmb{\\theta}^{*} = \\pmb{\\theta}_{2}^{*})" + }, + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "text", + "content": " and fine-tune the selected single student " + }, + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "inline_equation", + "content": "s_{\\theta^*}" + }, + { + "bbox": [ + 67, + 400, + 291, + 465 + ], + "type": "text", + "content": " for downstream tasks, resulting that the inference cost does not increase compared with the conventional KD method." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 476, + 150, + 491 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 476, + 150, + 491 + ], + "spans": [ + { + "bbox": [ + 67, + 476, + 150, + 491 + ], + "type": "text", + "content": "5 Experiment" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 498, + 291, + 701 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 498, + 291, + 701 + ], + "spans": [ + { + "bbox": [ + 67, + 498, + 291, + 701 + ], + "type": "text", + "content": "We present a comprehensive analysis of the proposed CTCD method through empirical experiments. In Section 5.1, we validate our CTCD method by comparing the performance of small models distilled by CTCD to the original large model on the GLUE benchmark (Wang et al., 2019). In Section 5.2, we analyze the impact of co-distillation by adjusting loss weights for the soft losses of a student and a teacher. In Section 5.3, we study the impact of training length on CTCD method, allowing us to determine the optimal training length for CTCD method. In Section 5.4, we demonstrate the efficacy of Community KD by comparing the performance of a model distilled by the Community KD to a model distilled by the one-way KD." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "type": "text", + "content": "Implementation details We use a learning rate of 5e-4, linear warm-up of " + }, + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "type": "inline_equation", + "content": "5\\%" + }, + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "type": "text", + "content": ", AdamW optimizer (Loshchilov and Hutter, 2019), and batch size of 128 with A100 GPUs for pre-training. We train the teacher and student models from scratch" + } + ] + } + ], + "index": 7 + }, + { + "type": "image", + "bbox": [ + 310, + 73, + 511, + 208 + ], + "blocks": [ + { + "bbox": [ + 310, + 73, + 511, + 208 + ], + "lines": [ + { + "bbox": [ + 310, + 73, + 511, + 208 + ], + "spans": [ + { + "bbox": [ + 310, + 73, + 511, + 208 + ], + "type": "image", + "image_path": "629d3c08e3879383bed68ff8467013bbf2893270749e28a009430cf698ef1b8e.jpg" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 211, + 526, + 263 + ], + "lines": [ + { + "bbox": [ + 302, + 211, + 526, + 263 + ], + "spans": [ + { + "bbox": [ + 302, + 211, + 526, + 263 + ], + "type": "text", + "content": "Figure 4: Average performance on dev sets of GLUE benchmark after training 10 epochs Learning from the student improves the performance of the teacher by an average of 1.88. Such improvement in teacher performance leads to improvement in student quality from 77.46 to 77.94." + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_caption" + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 276, + 526, + 371 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 276, + 526, + 371 + ], + "spans": [ + { + "bbox": [ + 302, + 276, + 526, + 371 + ], + "type": "text", + "content": "for 20 epochs in Section 5.1. To analyze the effectiveness of CTCD method, we train the teacher and student models for 10 epochs and 20 epochs in Section 5.2 and Section 5.3, respectively. In Section 5.4, we train the models for 3 epochs after parameter remapping, which is the same as in conventional one-way KD method (Sanh et al., 2019a)." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 386, + 525, + 521 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 386, + 525, + 521 + ], + "spans": [ + { + "bbox": [ + 302, + 386, + 525, + 521 + ], + "type": "text", + "content": "Training Time For the one-way distillation, we need 1 GPU day to train the teacher for 10 epochs and 1.3 GPU days to distill knowledge from the pre-trained teacher to the student for another 10 epochs, which consumes a total of 2.3 days. For CTCD, it takes 3 GPU days to train both teacher and student models from scratch for 10 epochs. We use the automatic mixed precision (AMP) of PyTorch (Paszke et al., 2019) to accelerate training for all our models." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 301, + 526, + 525, + 674 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 526, + 525, + 674 + ], + "spans": [ + { + "bbox": [ + 301, + 526, + 525, + 674 + ], + "type": "text", + "content": "Dataset To validate our CTCD method, we use a reduced dataset (30M) created by uniformly sampling 1 out of every 4 sentences from the original pre-training dataset (BookCorpus (Zhu et al., 2015) + Wikipedia (Foundation)) used in the conventional one-way KD method (Sanh et al., 2019a). We evaluate our distilled models on the dev sets of the GLUE benchmark (Wang et al., 2019), which consists of nine sentence-level classification tasks. In Section 5.4, we use the original pre-training dataset to train Community KD method." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 678, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 678, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 678, + 526, + 772 + ], + "type": "text", + "content": "Model Architecture We use a 6-layer BERT (Devlin et al., 2019) model as the teacher and a 4-layer BERT model as the student to analyze the effectiveness and efficiency of our CTCD method. In Section 5.4, we use a pre-trained BERT-base model as the teacher and a 6-layer BERT model as the student." + } + ] + } + ], + "index": 13 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "7462" + } + ] + } + ], + "index": 14 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 132, + 68, + 461, + 172 + ], + "blocks": [ + { + "bbox": [ + 132, + 68, + 461, + 172 + ], + "lines": [ + { + "bbox": [ + 132, + 68, + 461, + 172 + ], + "spans": [ + { + "bbox": [ + 132, + 68, + 461, + 172 + ], + "type": "table", + "html": "
PerformanceGAP w/ Teacher
Original Teacher78.06-
StudentOne-way Distil. (10 epoch)77.46-0.60
CTCD (10 epoch)77.94-0.12
One-way Distil. (20 epoch)78.39+0.33
CTCD (20 epoch)79.12+1.66
", + "image_path": "01530bdb71c4abc46e2bdd858c96e147b404d03b043f4261fc969ea6c957c000.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 181, + 525, + 204 + ], + "lines": [ + { + "bbox": [ + 67, + 181, + 525, + 204 + ], + "spans": [ + { + "bbox": [ + 67, + 181, + 525, + 204 + ], + "type": "text", + "content": "Table 1: Average performance on dev sets of GLUE benchmark The student distilled by CTCD significantly outperforms the original teacher trained using the stand-alone method, achieving a higher gain of 1.66." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "type": "image", + "bbox": [ + 79, + 213, + 292, + 354 + ], + "blocks": [ + { + "bbox": [ + 79, + 213, + 292, + 354 + ], + "lines": [ + { + "bbox": [ + 79, + 213, + 292, + 354 + ], + "spans": [ + { + "bbox": [ + 79, + 213, + 292, + 354 + ], + "type": "image", + "image_path": "e6477641fb7d72bfd604577452fd871da7a702da233fd9d17fa1cad1dae7cd3a.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 141, + 357, + 232, + 367 + ], + "lines": [ + { + "bbox": [ + 141, + 357, + 232, + 367 + ], + "spans": [ + { + "bbox": [ + 141, + 357, + 232, + 367 + ], + "type": "text", + "content": "(a) Teacher Performance" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "type": "image", + "bbox": [ + 298, + 213, + 512, + 354 + ], + "blocks": [ + { + "bbox": [ + 298, + 213, + 512, + 354 + ], + "lines": [ + { + "bbox": [ + 298, + 213, + 512, + 354 + ], + "spans": [ + { + "bbox": [ + 298, + 213, + 512, + 354 + ], + "type": "image", + "image_path": "95465e08b4a98da6f7b866e96302ddfeb989b9d903d367a69600010ece7b5758.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 359, + 357, + 451, + 367 + ], + "lines": [ + { + "bbox": [ + 359, + 357, + 451, + 367 + ], + "spans": [ + { + "bbox": [ + 359, + 357, + 451, + 367 + ], + "type": "text", + "content": "(b) Student Performance" + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "image_caption" + } + ], + "index": 4 + }, + { + "type": "image", + "bbox": [ + 70, + 439, + 285, + 581 + ], + "blocks": [ + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "lines": [ + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "spans": [ + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "text", + "content": "Figure 5: Adjusting Loss Weight We investigate the impact of the distillation for the teacher model and student model by adjusting loss weights " + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "inline_equation", + "content": "(\\alpha_{h},\\alpha_{s},\\beta_{h},\\beta_{s})" + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "text", + "content": " for hard loss and soft loss. (a) We (co-)train the teacher model distilling knowledge from the student by fixing " + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "inline_equation", + "content": "\\alpha_{h}:\\alpha_{s} = 1:1" + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "text", + "content": " and varying " + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "inline_equation", + "content": "\\beta_{h}:\\beta_{s}" + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "text", + "content": " on the large text corpus. (b) We (co-)train the student model distilling knowledge from the teacher by fixing " + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "inline_equation", + "content": "\\beta_{h}:\\beta_{s} = 1:1" + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "text", + "content": " and varying " + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "inline_equation", + "content": "\\alpha_{h}:\\alpha_{s}" + }, + { + "bbox": [ + 67, + 374, + 525, + 426 + ], + "type": "text", + "content": " on the large text corpus. Then we report the average performance of each pre-trained model after fine-tuning it on downstream tasks (dev sets) of GLUE benchmark." + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "image_caption" + }, + { + "bbox": [ + 70, + 439, + 285, + 581 + ], + "lines": [ + { + "bbox": [ + 70, + 439, + 285, + 581 + ], + "spans": [ + { + "bbox": [ + 70, + 439, + 285, + 581 + ], + "type": "image", + "image_path": "534e57ab140f7df0befb22ca0566a646b9d631174dfe28b45dcbdee40e11bd61.jpg" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 592, + 291, + 673 + ], + "lines": [ + { + "bbox": [ + 67, + 592, + 291, + 673 + ], + "spans": [ + { + "bbox": [ + 67, + 592, + 291, + 673 + ], + "type": "text", + "content": "Figure 6: Length of Training We pre-trained student models under two different training lengths 10/20 epochs while distilling knowledge from teacher models via ours or the conventional KD method. Then we adapt pre-trained student models on CoLA task. With enough longer training (20 epoch), the student model distilled by ours significantly outperforms the student model distilled by the conventional KD method, with a higher gain of 5.22." + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_caption" + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 687, + 259, + 714 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 687, + 259, + 714 + ], + "spans": [ + { + "bbox": [ + 67, + 687, + 259, + 714 + ], + "type": "text", + "content": "5.1 Could Knowledge Distillation Help Improve Performance?" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 719, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 719, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 719, + 290, + 772 + ], + "type": "text", + "content": "In Table 1 and Figure 4, we show the average performance of models trained using different methods on a large text corpus and fine-tuned against the GLUE benchmark. Stand-alone trains a model" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 439, + 526, + 615 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 439, + 526, + 615 + ], + "spans": [ + { + "bbox": [ + 302, + 439, + 526, + 615 + ], + "type": "text", + "content": "without using any knowledge distillation. Co-training & One-way distillation trains teacher and student models together from scratch, with knowledge only flowing from the teacher to the student. Co-training & Co-distillation (Ours) is CTCD method, which trains both teacher and student models together from scratch and distills knowledge between each other in both directions. For distillation methods, we set the weights of the hard losses for the teacher and student to 1. The weights of the soft losses are chosen from the set " + }, + { + "bbox": [ + 302, + 439, + 526, + 615 + ], + "type": "inline_equation", + "content": "\\{0.5, 1, 2, 4\\}" + }, + { + "bbox": [ + 302, + 439, + 526, + 615 + ], + "type": "text", + "content": ", and the results are reported with the best-performing weights." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 624, + 526, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 624, + 526, + 773 + ], + "spans": [ + { + "bbox": [ + 302, + 624, + 526, + 773 + ], + "type": "text", + "content": "1) Overall Results As shown in Table 1, the student distilled by CTCD method significantly outperforms the original teacher trained using the stand-alone method on the average performance of the GLUE benchmark, achieving a higher gain of 1.66. Furthermore, the student model distilled by our CTCD method outperforms the student distilled by the one-way distillation method on the average performance of the GLUE benchmark. After training for 10 and 20 epochs, the student distilled by our CTCD method consistently has higher gains" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "7463" + } + ] + } + ], + "index": 13 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 289, + 98 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 289, + 98 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 289, + 98 + ], + "type": "text", + "content": "than the student distilled by one-way distillation, as 77.46 vs. 77.94 and 78.39 vs. 79.12, respectively." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 105, + 289, + 131 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 105, + 289, + 131 + ], + "spans": [ + { + "bbox": [ + 67, + 105, + 289, + 131 + ], + "type": "text", + "content": "2) Does learning from a small and weak student provide a performance benefit to the teacher?" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 132, + 290, + 227 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 132, + 290, + 227 + ], + "spans": [ + { + "bbox": [ + 67, + 132, + 290, + 227 + ], + "type": "text", + "content": "As shown in Figure 4, the distillation of knowledge from the student model to the teacher model has been shown to significantly improve the quality of the teacher model, with an average increase of 1.88 compared to teacher training methods that do not incorporate such distillation process (such as Stand-alone and Co-training & one-way distillation)." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 230, + 291, + 391 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 230, + 291, + 391 + ], + "spans": [ + { + "bbox": [ + 67, + 230, + 291, + 391 + ], + "type": "text", + "content": "3) Is the teacher's performance improvement reflected in the student's performance improvement? Furthermore, we find that a better teacher leads to further performance improvement of the student from 77.46 to 77.94. The results demonstrate that the distillation process successfully improves the performance of both the teacher and student. The student trained with our CTCD method achieves better performance than students trained with the Stand-alone or Co-training & one-way distillation methods, with an average improvement of 0.88 and 0.47, respectively." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 401, + 289, + 414 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 401, + 289, + 414 + ], + "spans": [ + { + "bbox": [ + 67, + 401, + 289, + 414 + ], + "type": "text", + "content": "5.2 In-depth Study 1: Adjusting Loss Weights" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "spans": [ + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "text", + "content": "In this Section, we investigate the impact of distillation on the performance of both the student and the teacher by adjusting loss weights " + }, + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "inline_equation", + "content": "(\\alpha_{h},\\alpha_{s},\\beta_{h},\\beta_{s})" + }, + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "text", + "content": " for hard loss and soft loss. For example, setting " + }, + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "inline_equation", + "content": "\\alpha_{h}:\\alpha_{s} = 1:4" + }, + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "text", + "content": " emphasizes learning from the teacher's knowledge (i.e., the soft loss for the student) " + }, + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "inline_equation", + "content": "4\\times" + }, + { + "bbox": [ + 67, + 418, + 290, + 566 + ], + "type": "text", + "content": " more than the ground truth label distribution (i.e., the hard loss for the student), during co-training. This allows us to better understand the effect of distillation on each model and optimize their performance." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 571, + 290, + 690 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 571, + 290, + 690 + ], + "spans": [ + { + "bbox": [ + 67, + 571, + 290, + 690 + ], + "type": "text", + "content": "Teacher side In Figure 5(a), we co-train the teacher model using distillation to transfer knowledge from the student model. We fix the weighting values for the losses of the student to " + }, + { + "bbox": [ + 67, + 571, + 290, + 690 + ], + "type": "inline_equation", + "content": "\\alpha_{h}:\\alpha_{s} = 1:1" + }, + { + "bbox": [ + 67, + 571, + 290, + 690 + ], + "type": "text", + "content": " and vary the weighting values for the losses of the teacher, " + }, + { + "bbox": [ + 67, + 571, + 290, + 690 + ], + "type": "inline_equation", + "content": "\\beta_{h}:\\beta_{s}" + }, + { + "bbox": [ + 67, + 571, + 290, + 690 + ], + "type": "text", + "content": ", while training on a large text corpus. We then evaluate the average performance of the pre-trained teacher models on downstream tasks from the dev sets of GLUE benchmark." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": "Our results show that co-training the teacher with distillation outperforms training the teacher alone, regardless of the weighting values for the soft loss, by obtaining higher gains of 0.36, 0.77, 1.80, and 1.02 for " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "\\beta_h: \\beta_s = 1:1, 1:2, 1:4," + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "4:4" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": ", respectively. Additionally, we find that giving more" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "text", + "content": "weight to the soft loss of the teacher during training " + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "inline_equation", + "content": "(\\alpha_{h}:\\alpha_{s}:\\beta_{h}:\\beta_{\\mathbf{s}} = 1:1:1:\\mathbf{1}\\to 1:1:1:" + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "inline_equation", + "content": "2\\rightarrow 1:1:1:4)" + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "text", + "content": " leads to improved performance, with an average score of " + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "inline_equation", + "content": "78.42\\to 78.83\\to 79.86" + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "text", + "content": " Furthermore, we observe that emphasizing only the soft loss of the teacher " + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "inline_equation", + "content": "(1:1:1:4)" + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "text", + "content": " yields better performance than emphasizing both the hard and soft losses of the teacher " + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "inline_equation", + "content": "(1:1:4:4)" + }, + { + "bbox": [ + 302, + 71, + 525, + 191 + ], + "type": "text", + "content": ", with an average score of 79.86 vs. 79.09." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "spans": [ + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "text", + "content": "Student side We find that the student model's performance is not sensitive to the weighting values for the hard and soft losses of the student, " + }, + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "inline_equation", + "content": "(\\alpha_h:\\alpha_s)" + }, + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "text", + "content": ". Regardless of the chosen values, co-training the student with distillation consistently improves its performance compared to training the student alone. For instance, when we emphasize the soft loss of the student by increasing the weighting value for " + }, + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "inline_equation", + "content": "(\\alpha_{s})" + }, + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "text", + "content": " as " + }, + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "inline_equation", + "content": "1:1:1:1\\to 1:2:1:1\\to 1:4:1:1" + }, + { + "bbox": [ + 302, + 198, + 526, + 346 + ], + "type": "text", + "content": ", we observe similar levels of performance for the student model." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 356, + 505, + 370 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 356, + 505, + 370 + ], + "spans": [ + { + "bbox": [ + 302, + 356, + 505, + 370 + ], + "type": "text", + "content": "5.3 In-depth Study 2: Length of Training" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 375, + 525, + 496 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 375, + 525, + 496 + ], + "spans": [ + { + "bbox": [ + 302, + 375, + 525, + 496 + ], + "type": "text", + "content": "We studied the impact of co-training length on the effectiveness of the CTCD method (see Figure 6). We find that longer training leads to improved performance, as demonstrated by our experiments using two different training lengths: 10 epochs and 20 epochs. After pre-training the student models with these different lengths, we adapted them to the CoLA downstream tasks and evaluated their performance using Matthew Correlation." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 502, + 525, + 718 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 502, + 525, + 718 + ], + "spans": [ + { + "bbox": [ + 302, + 502, + 525, + 718 + ], + "type": "text", + "content": "Results By increasing the (co-)training length from 10 epochs to 20 epochs, CTCD (Ours) significantly improves the performance of the student model from 35.02 to 46.23, with a gain of 11.21. This outperforms the conventional KD method, which only achieves a gain of 0.07 from 40.94 to 41.01, despite a longer training time. The conventional KD method relies on a pre-trained teacher model to train the student model, which allows for fast convergence but limits the learning of the student model. In contrast, the CTCD method allows for additional performance gains for both the teacher and student models by enabling them to learn and grow together during co-training. This can provide further benefits to the student model's performance with longer co-training." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 728, + 458, + 741 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 728, + 458, + 741 + ], + "spans": [ + { + "bbox": [ + 302, + 728, + 458, + 741 + ], + "type": "text", + "content": "5.4 Efficacy of Community KD" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "content": "We compare the proposed Community KD with the conventional one-way KD method (Sanh et al.," + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "7464" + } + ] + } + ], + "index": 15 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 68, + 68, + 524, + 146 + ], + "blocks": [ + { + "bbox": [ + 68, + 68, + 524, + 146 + ], + "lines": [ + { + "bbox": [ + 68, + 68, + 524, + 146 + ], + "spans": [ + { + "bbox": [ + 68, + 68, + 524, + 146 + ], + "type": "table", + "html": "
Downstream TaskMetricDataset SizeAMPMNLI Acc. 392.7kQQP Acc. 363.8kQNLI Acc. 104.7kSST-2 Acc. 67.3kCoLA Matthew. 8.5kSTSB Pearson. 5.7kMRPC F1 3.7kAcc. 2.5kRTE Acc.
TeacherBERT (109M)84.1790.8990.6891.8657.5488.8488.5689.3185.0465.3483.23
Student(67M)One-way KD (Sanh et al., 2019b)FP3281.9390.0587.7290.9452.0386.2886.0787.9482.5957.7680.33
Ours: Student 1FP1681.8890.1788.2491.5154.8286.7086.4989.7685.2959.2181.40
Ours: Student 2FP1681.3489.7588.3790.7156.0886.4286.4489.8085.2959.2081.34
", + "image_path": "9128fccd690d8d9f87e505f97fbec79fc86ec1d26ed9e4e4b7eb412ba296ca1c.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 153, + 526, + 196 + ], + "lines": [ + { + "bbox": [ + 67, + 153, + 526, + 196 + ], + "spans": [ + { + "bbox": [ + 67, + 153, + 526, + 196 + ], + "type": "text", + "content": "Table 2: Efficacy of Community KD The pre-trained BERT and 6-layer BERT is the teacher model and student architecture, respectively, for both ours and the conventional one-way KD method. We fine-tune the distilled students on dev sets of GLUE benchmark. We observe that learning from the soft knowledge of different student models improves performance over the conventional one-way KD method on most downstream tasks." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 69, + 208, + 292, + 480 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 208, + 292, + 480 + ], + "spans": [ + { + "bbox": [ + 69, + 208, + 292, + 480 + ], + "type": "text", + "content": "2019a). To ensure a fair comparison, we use the pre-trained BERT-base as the teacher model for both methods and the 6-layer BERT as the student, which is the same architecture used in the conventional one-way KD method. As described in Section 4, we train two student models concurrently and they learn from the pre-trained BERT, the ground truth labels, and each other's knowledge. Note that since we fine-tune one of the two students distilled by Community KD for downstream tasks, the inference cost is the same as the conventional one-way KD method. In Table 2, we report the results of BERT and the conventional one-way KD method using checkpoints provided by Hugging Face (HuggingFace) and both students (Ours: Student 1 and Ours: Student 2) on the dev sets of the GLUE benchmark. We apply Automatic Mixed Precision (AMP) (Paszke et al., 2019) to Community KD, which typically speeds up training but may hurt performance." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 484, + 291, + 673 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 484, + 291, + 673 + ], + "spans": [ + { + "bbox": [ + 67, + 484, + 291, + 673 + ], + "type": "text", + "content": "Results The results presented in Table 2 show that Community KD, leads to improved performance on downstream tasks such as QQP, QNLI, SST-2, CoLA, STSB, MRPC, and RTE, even when applying quantization techniques. Specifically, the average performance gain of the student model distilled using our Community KD method is 1.04 (1.2%) higher than that of the student model distilled by the conventional one-way KD method. This suggests that incorporating knowledge distillation from both a student model and a pre-trained teacher model is more effective than only using knowledge distillation from the pre-trained teacher model." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 684, + 232, + 698 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 684, + 232, + 698 + ], + "spans": [ + { + "bbox": [ + 67, + 684, + 232, + 698 + ], + "type": "text", + "content": "6 Limitations & Future Work" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 705, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 705, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 705, + 291, + 773 + ], + "type": "text", + "content": "Limitations The proposed method co-train models from scratch and may require a longer pretraining time than the conventional KD method. However, as we described in Section 5.3, when the student model is trained long enough with its" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 209, + 526, + 331 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 209, + 526, + 331 + ], + "spans": [ + { + "bbox": [ + 302, + 209, + 526, + 331 + ], + "type": "text", + "content": "teacher, it can outperform the models trained with the conventional KD on the downstream task. The proposed co-training method may increase the overall training cost compared with one-way distillation, and it may become a performance bottleneck depending on training resource constraints. However, note that CTCD can improve model quality while having the same inference cost as the one-way distillation on downstream tasks." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 338, + 526, + 541 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 338, + 526, + 541 + ], + "spans": [ + { + "bbox": [ + 302, + 338, + 526, + 541 + ], + "type": "text", + "content": "Future Work 1) Architecture Sharing. Models can share some of their architectures by reusing the output of such architectures and updating them together during back-propagation. This may help reduce the additional computing and memory overhead incurred by model co-training, while improving the model quality, especially for the student model. 2) Integration of Student Architecture Design and Data Augmentation. Future research can focus on effectively combining the CTCD framework with student architecture design and data augmentation techniques. This integration provides a promising alternative to traditional one-way knowledge distillation methods, leading to significant improvements in language modeling tasks." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 303, + 550, + 381, + 562 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 550, + 381, + 562 + ], + "spans": [ + { + "bbox": [ + 303, + 550, + 381, + 562 + ], + "type": "text", + "content": "7 Conclusion" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 570, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 570, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 570, + 526, + 772 + ], + "type": "text", + "content": "The size and complexity of pre-trained language models (PLMs) can hinder their practicality for online downstream tasks. To address this, we introduced a novel framework called co-training and co-distillation (CTCD). By training models of different sizes together and extracting inter-model knowledge in both directions, the proposed CTCD framework improves both model efficiency and performance. The proposed framework overcomes the trade-off between efficiency and performance in traditional one-way knowledge distillation methods. Notably, our compressed models achieved an impressive gain of 1.66 on the GLUE benchmark, outperforming large models trained using standalone methods." + } + ] + } + ], + "index": 9 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "7465" + } + ] + } + ], + "index": 10 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 71, + 127, + 83 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 71, + 127, + 83 + ], + "spans": [ + { + "bbox": [ + 69, + 71, + 127, + 83 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 89, + 290, + 772 + ], + "type": "list", + "angle": 0, + "index": 12, + "blocks": [ + { + "bbox": [ + 69, + 89, + 289, + 144 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 89, + 289, + 144 + ], + "spans": [ + { + "bbox": [ + 69, + 89, + 289, + 144 + ], + "type": "text", + "content": "Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. In NeurIPS." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 153, + 290, + 232 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 153, + 290, + 232 + ], + "spans": [ + { + "bbox": [ + 69, + 153, + 290, + 232 + ], + "type": "text", + "content": "Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. 2019. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2978-2988, Florence, Italy. Association for Computational Linguistics." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 239, + 290, + 338 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 239, + 290, + 338 + ], + "spans": [ + { + "bbox": [ + 69, + 239, + 290, + 338 + ], + "type": "text", + "content": "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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 347, + 260, + 358 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 347, + 260, + 358 + ], + "spans": [ + { + "bbox": [ + 69, + 347, + 260, + 358 + ], + "type": "text", + "content": "Wikipedia Foundation. Wikipedia downloads." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 366, + 289, + 400 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 366, + 289, + 400 + ], + "spans": [ + { + "bbox": [ + 69, + 366, + 289, + 400 + ], + "type": "text", + "content": "Geoffrey Hinton, Oriol Vinyals, Jeff Dean, et al. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2(7)." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 409, + 183, + 421 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 409, + 183, + 421 + ], + "spans": [ + { + "bbox": [ + 69, + 409, + 183, + 421 + ], + "type": "text", + "content": "HuggingFace. Huggingface." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 428, + 290, + 506 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 428, + 290, + 506 + ], + "spans": [ + { + "bbox": [ + 69, + 428, + 290, + 506 + ], + "type": "text", + "content": "Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. 2020. TinyBERT: Distilling BERT for natural language understanding. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 4163-4174, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 514, + 290, + 569 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 514, + 290, + 569 + ], + "spans": [ + { + "bbox": [ + 69, + 514, + 290, + 569 + ], + "type": "text", + "content": "Hayeon Lee, Rui Hou, Jongpil Kim, Davis Liang, Sung Ju Hwang, and Alexander Min. 2023. A study on knowledge distillation from weak teacher for scaling up pre-trained language models. arXiv preprint arXiv:2305.18239." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 69, + 577, + 290, + 622 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 577, + 290, + 622 + ], + "spans": [ + { + "bbox": [ + 69, + 577, + 290, + 622 + ], + "type": "text", + "content": "Chunyuan Li, Xiang Gao, Yuan Li, Xiujun Li, Baolin Peng, Yizhe Zhang, and Jianfeng Gao. 2020. Optimus: Organizing sentences via pre-trained modeling of a latent space. In EMNLP." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 69, + 630, + 290, + 686 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 630, + 290, + 686 + ], + "spans": [ + { + "bbox": [ + 69, + 630, + 290, + 686 + ], + "type": "text", + "content": "Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 69, + 694, + 290, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 694, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 694, + 290, + 772 + ], + "type": "text", + "content": "Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch:" + } + ] + } + ], + "index": 11 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 524, + 772 + ], + "type": "list", + "angle": 0, + "index": 23, + "blocks": [ + { + "bbox": [ + 314, + 72, + 524, + 116 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 72, + 524, + 116 + ], + "spans": [ + { + "bbox": [ + 314, + 72, + 524, + 116 + ], + "type": "text", + "content": "An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 126, + 524, + 226 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 126, + 524, + 226 + ], + "spans": [ + { + "bbox": [ + 304, + 126, + 524, + 226 + ], + "type": "text", + "content": "Yujia Qin, Yankai Lin, Jing Yi, Jiajie Zhang, Xu Han, Zhengyan Zhang, Yusheng Su, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2022. Knowledge inheritance for pre-trained language models. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3921-3937, Seattle, United States. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 236, + 524, + 280 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 236, + 524, + 280 + ], + "spans": [ + { + "bbox": [ + 304, + 236, + 524, + 280 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 290, + 524, + 335 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 290, + 524, + 335 + ], + "spans": [ + { + "bbox": [ + 304, + 290, + 524, + 335 + ], + "type": "text", + "content": "Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. 2015. Fitnets: Hints for thin deep nets. In *In Proceedings of ICLR*." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 345, + 524, + 390 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 345, + 524, + 390 + ], + "spans": [ + { + "bbox": [ + 304, + 345, + 524, + 390 + ], + "type": "text", + "content": "Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019a. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 400, + 524, + 444 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 400, + 524, + 444 + ], + "spans": [ + { + "bbox": [ + 304, + 400, + 524, + 444 + ], + "type": "text", + "content": "Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019b. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 454, + 524, + 509 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 454, + 524, + 509 + ], + "spans": [ + { + "bbox": [ + 304, + 454, + 524, + 509 + ], + "type": "text", + "content": "Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. 2019. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053." + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 304, + 519, + 524, + 608 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 519, + 524, + 608 + ], + "spans": [ + { + "bbox": [ + 304, + 519, + 524, + 608 + ], + "type": "text", + "content": "Siqi Sun, Yu Cheng, Zhe Gan, and Jingjing Liu. 2019. Patient knowledge distillation for BERT model compression. 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 4323-4332, Hong Kong, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 304, + 618, + 524, + 663 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 618, + 524, + 663 + ], + "spans": [ + { + "bbox": [ + 304, + 618, + 524, + 663 + ], + "type": "text", + "content": "Raphael Tang, Yao Lu, Linqing Liu, Lili Mou, Olga Vechtomova, and Jimmy Lin. 2019. Distilling task-specific knowledge from bert into simple neural networks. arXiv preprint arXiv:1903.12136." + } + ] + } + ], + "index": 21 + }, + { + "bbox": [ + 304, + 672, + 524, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 672, + 524, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 672, + 524, + 772 + ], + "type": "text", + "content": "Henry Tsai, Jason Riesa, Melvin Johnson, Naveen Arivazhagan, Xin Li, and Amelia Archer. 2019. Small and practical BERT models for sequence labeling. 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 3632-3636, Hong Kong, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 22 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "7466" + } + ] + } + ], + "index": 24 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 290, + 530 + ], + "type": "list", + "angle": 0, + "index": 7, + "blocks": [ + { + "bbox": [ + 69, + 72, + 289, + 116 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 289, + 116 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 289, + 116 + ], + "type": "text", + "content": "Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: The impact of student initialization on knowledge distillation. arXiv preprint arXiv:1908.08962, 13." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 125, + 290, + 180 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 125, + 290, + 180 + ], + "spans": [ + { + "bbox": [ + 69, + 125, + 290, + 180 + ], + "type": "text", + "content": "Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 188, + 290, + 243 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 188, + 290, + 243 + ], + "spans": [ + { + "bbox": [ + 69, + 188, + 290, + 243 + ], + "type": "text", + "content": "Wenhui Wang, Hangbo Bao, Shaohan Huang, Li Dong, and Furu Wei. 2020a. Minilmv2: Multi-head self-attention relation distillation for compressing pretrained transformers. arXiv preprint arXiv:2012.15828." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 252, + 290, + 307 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 252, + 290, + 307 + ], + "spans": [ + { + "bbox": [ + 69, + 252, + 290, + 307 + ], + "type": "text", + "content": "Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. 2020b. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in Neural Information Processing Systems, 33:5776-5788." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 316, + 290, + 381 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 316, + 290, + 381 + ], + "spans": [ + { + "bbox": [ + 69, + 316, + 290, + 381 + ], + "type": "text", + "content": "Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 391, + 290, + 446 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 391, + 290, + 446 + ], + "spans": [ + { + "bbox": [ + 69, + 391, + 290, + 446 + ], + "type": "text", + "content": "Li Yuan, Francis EH Tay, Guilin Li, Tao Wang, and Jiashi Feng. 2020. Revisiting knowledge distillation via label smoothing regularization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3903-3911." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 454, + 290, + 530 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 454, + 290, + 530 + ], + "spans": [ + { + "bbox": [ + 69, + 454, + 290, + 530 + ], + "type": "text", + "content": "Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pages 19-27." + } + ] + } + ], + "index": 6 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "7467" + } + ] + } + ], + "index": 8 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 9 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file diff --git a/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_content_list.json b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0924e8a37b443a91723b6f3e75fc4740f5e56dec --- /dev/null +++ b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_content_list.json @@ -0,0 +1,1836 @@ +[ + { + "type": "text", + "text": "$\\mathrm{Co}^{2}\\mathrm{PT}$ : Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning", + "text_level": 1, + "bbox": [ + 163, + 90, + 836, + 131 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Xiangjue Dong $^{1}$ Ziwei Zhu $^{2}$ Zhuoer Wang $^{1}$ Maria Teleki $^{1}$ James Caverlee $^{1}$", + "bbox": [ + 147, + 155, + 850, + 172 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "$^{1}$ Texas A&M University $^{2}$ George Mason University", + "bbox": [ + 277, + 173, + 724, + 189 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "{xj.dong, wang, mariateleki, caverlee}@tamu.edu zzhu20@gmu.edu", + "bbox": [ + 260, + 191, + 741, + 205 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 339, + 268 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Pre-trained Language Models are widely used in many important real-world applications. However, recent studies show that these models can encode social biases from large pre-training corpora and even amplify biases in downstream applications. To address this challenge, we propose $\\mathrm{Co}^2\\mathrm{PT}$ , an efficient and effective debiaswhile-prompt tuning method for mitigating biases via counterfactual contrastive prompt tuning on downstream tasks. Our experiments conducted on three extrinsic bias benchmarks demonstrate the effectiveness of $\\mathrm{Co}^2\\mathrm{PT}$ on bias mitigation during the prompt tuning process and its adaptability to existing upstream debiased language models. These findings indicate the strength of $\\mathrm{Co}^2\\mathrm{PT}$ and provide promising avenues for further enhancement in bias mitigation on downstream tasks.", + "bbox": [ + 144, + 282, + 460, + 539 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 115, + 552, + 258, + 569 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Pre-trained language models (PLMs) are widely used in many real-world applications, demonstrating remarkable performance (Devlin et al., 2019; Brown et al., 2020). However, it has been demonstrated that PLMs encode unfair social biases in their parameters based on their pre-training step over large-scale text corpora (May et al., 2019). Furthermore, these biases – for example, based on gender, race, or religion – can easily propagate to the downstream tasks that use these PLMs (Kaneko and Bollegala, 2021). For example, “She is a nurse” can have a higher conditional likelihood than “He is a nurse” in the language modeling task, and “nurse” can have higher coreference scores to “she” than “he” in the coreference resolution task (Lu et al., 2020). Considering that NLP applications like machine translation systems, resume filtering systems, dialogue systems, and speech recognition (Tatman, 2017) are widely used by millions of users globally, it is crucial to mitigate the social biases present in PLMs and strive for models that", + "bbox": [ + 114, + 581, + 489, + 917 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "will not propagate discriminatory predictions or offensive outputs towards specific groups before being deployed.", + "bbox": [ + 510, + 253, + 882, + 300 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Much prior effort has focused primarily on debiasing the representations learned during the pretraining process, e.g., through projection (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), further pre-training on unbiased external corpora (Webster et al., 2020; Lauscher et al., 2021; He et al., 2022), or finetuning to debias (Cheng et al., 2021; Guo et al., 2022). The effectiveness of such debiasing efforts is typically measured on intrinsic benchmarks like SEAT (Sentence Encoding Association Test) which computes the association between demographic terms (e.g., woman, man) and stereotype terms (e.g., science, art). An unbiased model should display no difference in the similarity between the representations of these terms (May et al., 2019).", + "bbox": [ + 510, + 303, + 884, + 558 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "While these existing approaches help reduce social biases under intrinsic measures, these debias-then-finetune methods are based on the hypothesis that if an upstream model is unbiased, it will also preserve its fairness effects on downstream tasks during the fine-tuning process. However, recent research investigating the relationship between intrinsic and extrinsic benchmarks (which evaluate fairness in downstream applications) finds these two benchmarks correlate weakly (Kaneko et al., 2022). Furthermore, they observe that models, even after being debiased, tend to re-acquire or even amplify biases (e.g., instance-related biases and label-related biases) during the fine-tuning process on downstream tasks (Zhao et al., 2017; Leino et al., 2019). Thus, this mismatch leads to our motivating research question - How can we develop an efficient and effective method to mitigate bias on downstream tasks?", + "bbox": [ + 510, + 563, + 882, + 866 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "To answer the aforementioned question, we propose $\\mathrm{Co}^2\\mathrm{PT}$ , a debias-while-prompt tuning approach through Counterfactual Contrastive Prompt", + "bbox": [ + 512, + 871, + 882, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_number", + "text": "5859", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 0 + }, + { + "type": "footer", + "text": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5859-5871 December 6-10, 2023 ©2023 Association for Computational Linguistics", + "bbox": [ + 216, + 945, + 778, + 972 + ], + "page_idx": 0 + }, + { + "type": "image", + "img_path": "images/f1bdc1048544f22ab384b3e44a74cf3ebb9736aa301305e8d34de80a85d97230.jpg", + "image_caption": [ + "Figure 1: The overview of $\\mathrm{Co}^2\\mathrm{PT}$ . First, we construct counterfactual pairs from the training data. Then, we learn debiased continuous prompts by simultaneously optimizing prompt tuning loss $\\mathcal{L}_{pt}$ on downstream tasks and contrastive loss $\\mathcal{L}_{cl}$ between the counterfactual pairs." + ], + "image_footnote": [], + "bbox": [ + 218, + 84, + 788, + 236 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Tuning. In this method, we first freeze all parameters of the PLM and add tunable continuous prompts for every layer. Unlike the previous debias-then-finetune methods that require expensive re-training of the original PLM and risk knowledge forgetting, this deep prompt tuning framework saves computational and memory resources while preserving the original pre-trained knowledge and language modeling ability (Li and Liang, 2021; Liu et al., 2022). To ensure that a fair system generates unbiased results regardless of the demographic terms used, we construct counterfactual pairs directly from the training data, eliminating the need for external corpora that heavily depend on their quality for debiasing. Specifically, we replace demographic terms associated with either the dominant or minoritized group in the training data with terms representing the opposite group. Then, we integrate the ability to mitigate bias into the prompt parameters through a contrastive objective between counterfactual pairs while maintaining the parameters of PLMs frozen. $\\mathrm{Co}^2\\mathrm{PT}$ can be integrated into existing debiased models to help them mitigate biases on downstream tasks and offer flexibility in addressing different kinds of bias. These advantages establish $\\mathrm{Co}^2\\mathrm{PT}$ as an efficient and effective method for mitigating bias in downstream tasks.", + "bbox": [ + 115, + 313, + 489, + 747 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "In conclusion, the proposed $\\mathrm{Co}^2\\mathrm{PT}$ mitigates bias on downstream tasks through prompt tuning, making the following contributions:", + "bbox": [ + 112, + 749, + 487, + 797 + ], + "page_idx": 1 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- $\\mathrm{Co}^{2}\\mathrm{PT}$ achieves time and memory efficiency without requiring access to an external corpus or retraining the entire model.", + "- Over three extrinsic bias benchmarks, we show that $\\mathrm{Co}^{2}\\mathrm{PT}$ effectively mitigates bias amplified during the prompt tuning process on downstream tasks." + ], + "bbox": [ + 122, + 802, + 489, + 917 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "- Furthermore, $\\mathrm{Co}^{2}\\mathrm{PT}$ can be extended to existing debiased language models, effectively bridging the gap between debiased upstream models and downstream tasks.", + "bbox": [ + 517, + 313, + 882, + 376 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "2 Related Work", + "text_level": 1, + "bbox": [ + 507, + 392, + 665, + 407 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Several approaches have been proposed for debiasing pre-trained language models such as projection-based methods (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), post-hoc text generation techniques (Schick et al., 2021), adversarial methods (Han et al., 2021), fin-tuning on biased prompts (Guo et al., 2022), with contrastive objective (Cheng et al., 2021) or with augmented data (Zhao et al., 2018), additional pretraining methods on re-balanced corpus through counterfactual data augmentation (Webster et al., 2020; Lauscher et al., 2021; Meade et al., 2022) or with a contrastive objective on gender-balanced entailment pairs (He et al., 2022), using dropout regularization (Webster et al., 2020), through parameter-efficient methods (Lauscher et al., 2021; Yang et al., 2022; Xie and Lukasiewicz, 2023) or with a contrastive objective (Li et al., 2023). While some works do not require access to an external corpus or do not require retraining the entire model, most prior methods primarily focus on mitigating bias within the model's intrinsic characteristics and evaluate the effectiveness of bias mitigation through intrinsic bias benchmarks, e.g., SEAT (May et al., 2019), StereoSet (Nadeem et al., 2021), and CrowS-Pairs (Nangia et al., 2020). Subsequently, they fine-tune the debiased models on downstream tasks and demonstrate that their debiased models retain the language modeling ability and the performance on downstream tasks or extrinsic bias benchmarks, which evaluate fairness in downstream tasks by", + "bbox": [ + 505, + 420, + 885, + 917 + ], + "page_idx": 1 + }, + { + "type": "page_number", + "text": "5860", + "bbox": [ + 480, + 927, + 521, + 940 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "testing whether the models exhibit different performances among different populations.", + "bbox": [ + 112, + 84, + 489, + 116 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Nevertheless, recent research shows that these debias-then-finetune methods will re-acquire or even amplify biases during the fine-tuning process on downstream tasks and that intrinsic and extrinsic evaluation bias benchmarks correlate poorly (Goldfarb-Tarrant et al., 2021; Cao et al., 2022; Kaneko et al., 2022). They encourage researchers to focus directly on extrinsic measures of bias of specific applications when addressing bias mitigation (Goldfarb-Tarrant et al., 2021).", + "bbox": [ + 112, + 117, + 489, + 277 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Thus, we focus in this paper on mitigating bias on downstream tasks and evaluate using extrinsic evaluation benchmarks directly. In addition, different from the previous methods requiring further pre-training on the counterfactually augmented sentences from an external corpus, e.g., English Wikipedia (Zmigrod et al., 2019; Webster et al., 2020; Meade et al., 2022), BookCorpus (Lauscher et al., 2021), News-Commentary v15 (Yang et al., 2022) or NLI (He et al., 2022), our methods achieve time and memory efficiency by eliminating the need for external corpus access or model retraining.", + "bbox": [ + 112, + 278, + 489, + 472 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3 Co²PT: Debiasing via Counterfactual Contrastive Prompt Tuning", + "text_level": 1, + "bbox": [ + 112, + 483, + 470, + 519 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "We propose $\\mathrm{Co}^2\\mathrm{PT}$ , a debias-while-prompt tuning parameter-efficient method for mitigating biases on downstream tasks via counterfactual contrastive prompt tuning, presented in Figure 1. Concretely, $\\mathrm{Co}^2\\mathrm{PT}$ mitigates bias in PLMs by leveraging counterfactual pairs from training data to produce debiased representations during prompt tuning.", + "bbox": [ + 112, + 527, + 489, + 642 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Deep Prompt Tuning. First, we introduce the backbone framework of $\\mathrm{Co}^2\\mathrm{PT}$ - deep prompt tuning. We incorporate continuous prompts as prefix tokens in every layer of the PLM. By doing this, we have more tunable task-specific parameters to enhance per-task capacity while maintaining parameter efficiency (Li and Liang, 2021; Liu et al., 2022; Wang et al., 2022; Dong et al., 2023a). Besides, it can achieve comparable performance to fine-tuning, outperforming methods that only add trainable continuous prompts into the input embedding layer (Lester et al., 2021; Liu et al., 2021), which underperform the fine-tuning methods, especially when the model size is not large (Liu et al., 2022). The prompt tuning loss of proposed $\\mathrm{Co}^2\\mathrm{PT}$ on the downstream task is represented as $\\mathcal{L}_{pt}$ , e.g., cross-entropy loss for a classification task.", + "bbox": [ + 112, + 645, + 490, + 917 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Counterfactual Pairs Construction. Then, the first key question is: how to interject the debiasing capability into the continuous prompts? An unbiased model should make the same predictions independent of the bias-attribute term, thus we apply counterfactual data augmentation to generate counterparts of training examples from the training data during prompt tuning. Concretely, let $S$ represent the training corpus and let $W = \\{(w_{1}, w_{2}, \\ldots, w_{m})^{i}\\}_{i=1}^{N}$ be a set of $N$ bias-attribute term pairs. For each sentence $s_{i}$ in $S$ and each pair $(w_{1}, w_{2}, \\ldots, w_{m})$ in $W$ , for any $w_{i}$ in $s$ , we replace it with the term along the opposite bias direction. Take the binary-gender debiasing task shown in Figure 1 for example, the bias-attribute terms are { (man, woman), (he, she), ... } . The \"man\" is in the input sentence \"The man is playing the piano\". We replace it with \"woman\" while leaving non-attribute words unchanged. Then the counterfactually augmented sentence is \"The woman is playing the piano\", and vice versa. The obtained counterfactual sentence of the original sentence $s_{i}$ is denoted as $s_{i}'$ .", + "bbox": [ + 505, + 84, + 884, + 455 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Counterfactual Contrastive Learning. The counterfactual pairs construction allows us to achieve a balance in inputs containing bias-attribute terms. However, how can we ensure that our model generates consistent predictions for both $s_i$ and $s_i'$ , which possess similar semantic meaning but differ in bias direction? To make the model generate predictions independent of biased attributes, it is important for sentences with similar semantics but along different bias directions to be closer (Cheng et al., 2021; He et al., 2022). We apply contrastive learning, of which the objective is to obtain meaningful representations by bringing semantically similar neighbors closer and pushing apart the dissimilar neighbors (Gao et al., 2021; Dong et al., 2023b; Li et al., 2023). In this work, input sentence $s_i$ and its counterpart $s_i'$ are semantically related but in opposite bias directions. We let $\\mathbf{h}_i$ and $\\mathbf{h}_i'$ denote the representations of $s_i$ and $s_i'$ and then concatenate with the continuous prompt representation $\\mathbf{p}$ as positive pairs. Then we take the cross-entropy objective with in-batch negatives (Gao et al., 2021). The training objective for $(\\mathbf{h}_i, \\mathbf{h}_i')$ with a mini-batch of $N$ pairs is:", + "bbox": [ + 507, + 458, + 884, + 843 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {c l} = - \\log \\frac {e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} , \\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {\\prime}\\right) / \\tau}}{\\sum_ {j = 1} ^ {N} e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} , \\mathbf {p} \\oplus \\mathbf {h} _ {j} ^ {\\prime}\\right) / \\tau}}, \\tag {1}\n$$\n", + "text_format": "latex", + "bbox": [ + 556, + 852, + 882, + 895 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "where $\\mathrm{sim}(\\mathbf{x}_i,\\mathbf{y}_i)$ is the cosine similarity of $\\mathbf{x}_i$ and", + "bbox": [ + 507, + 903, + 882, + 919 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "5861", + "bbox": [ + 480, + 927, + 517, + 940 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "$\\mathbf{y}_i$ : $\\mathrm{sim}(\\mathbf{x}_i,\\mathbf{y}_i) = \\mathbf{x}_i^\\top \\mathbf{y}_i / \\| \\mathbf{x}_i\\| \\| \\mathbf{y}_i\\|$ , $\\oplus$ is the concatenation of two representations, and $\\tau$ is a temperature hyperparameter.", + "bbox": [ + 112, + 83, + 489, + 133 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "For counterfactual pairs $(s_i, s_i')$ in the single-sentence classification task, $s_i$ is the original sentence from the training data and $s_i'$ is the augmented sentence that has the same semantic meaning as $s_i$ but in a different bias direction. For sentence-pair classification, like in the SNLI task, with $x_i$ as the premise and $y_i$ as the hypothesis, $s_i$ is the original premise-hypothesis pair $(x_i, y_i)$ while $s_i'$ is the counterfactual augmented premise-hypothesis pair $(x_i', y_i')$ . Similarly, the sentence representations are concatenated with continuous prompts to calculate the contrastive loss through Equation 1.", + "bbox": [ + 115, + 134, + 489, + 326 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Learning Objectives. Finally, the continuous prompts learn-to-debias by simultaneously optimizing the prompt tuning loss $\\mathcal{L}_{pt}$ on downstream tasks and contrastive loss $\\mathcal{L}_{cl}$ between the counterfactual pairs:", + "bbox": [ + 112, + 332, + 489, + 411 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} = \\mathcal {L} _ {p t} + \\alpha \\mathcal {L} _ {c l}, \\tag {2}\n$$\n", + "text_format": "latex", + "bbox": [ + 233, + 428, + 487, + 445 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "where $\\alpha$ is a tunable coefficient hyperparameter. As stated before, we only tune the parameters of the debiasing continuous prompts while maintaining the parameters of PLMs frozen throughout the training. After the counterfactual contrastive prompt tuning, the debiasing knowledge is stored in the prompt parameters. This approach not only retains the knowledge within the original parameters of PLMs but is also flexible and adaptable to different downstream tasks. For example, we can train different prompts for different bias dimensions such as gender, race, and religion. These prompts can then be combined and applied to downstream tasks. Moreover, considering that prior research primarily concentrates on binary gender, it is more efficient to extend its application to non-binary gender without requiring re-training new debiased models.", + "bbox": [ + 112, + 458, + 489, + 732 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "4 Experimental Setup", + "text_level": 1, + "bbox": [ + 112, + 747, + 321, + 764 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "We design experiments to test the effectiveness of our proposed $\\mathrm{Co}^2\\mathrm{PT}$ approach toward answering four questions: RQ1: Will $\\mathrm{Co}^2\\mathrm{PT}$ mitigate bias on downstream tasks effectively? RQ2: How will the existing intrinsic debiased methods perform on the downstream tasks when they are combined with $\\mathrm{Co}^2\\mathrm{PT}$ ? RQ3: What impact do different modules have on the design of $\\mathrm{Co}^2\\mathrm{PT}$ ? RQ4: How do hyperparameters affect $\\mathrm{Co}^2\\mathrm{PT}$ ?", + "bbox": [ + 112, + 774, + 489, + 917 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "4.1 Bias Evaluation", + "text_level": 1, + "bbox": [ + 507, + 84, + 680, + 98 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Extrinsic bias benchmarks assess bias via performance gap between different groups in downstream tasks. In this work, we evaluate $\\mathrm{Co}^2\\mathrm{PT}$ on three widely used extrinsic bias benchmarks: Bias-STSB, Bias-NLI, and Bias-in-Bios.", + "bbox": [ + 507, + 105, + 884, + 184 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Bias-STS-B (Webster et al., 2020) is adapted from the STS-B task to evaluate gendered correlations, which requires models to predict the semantic similarity between pairs of sentences. Specifically, 276 sentences are collected from the test set as templates and then gendered terms (man, woman) and professional terms from Rudinger et al. (2018) are inserted into each template, forming 16,980 sentence pairs. For instance, if the template is \"A man is walking\", then the sentence pairs are (\"A man is walking\", \"A nurse is walking\") and (\"A woman is walking\", \"A nurse is walking\"). If a model is unbiased towards gender terms, it should assign equal similarity scores to both pairs. We calculate the average absolute difference between the similarity scores of sentence pairs containing male and female terms, and how often the difference between \"male\" and \"female\" sentence pairs $> \\tau$ , where we report the results for $\\tau = 0.1$ and $\\tau = 0.3$ (Webster et al., 2020). A lower value indicates less bias.", + "bbox": [ + 507, + 187, + 884, + 508 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Bias-NLI (Dev et al., 2020) is a natural language inference dataset consisting of neutral sentence pairs to evaluate the gender-occupation bias. It is constructed by populating the template: \"The subject verb a/an object\", leading to 1,936,512 instances. Concretely, the verb and object slots are filled with activities, e.g., ate a bagel. Then they create neutral entailment pairs by filling the subject slot with an occupation term with a strong gender correlation, e.g., \"nurse\", for the hypothesis, and \"woman\", for the premise, resulting in the instance: The woman ate a bagel; The nurse ate a bagel. neutral. Bias is defined as deviation from neutrality and measured by three metrics: (1) Net Neutral (NN): the average probability that the model assigns a neutral label for all instances, (2) Fraction Neutral (FN): the percentage of instances that the model predicts the neutral label and (3) Threshold: $\\tau$ (T: $\\tau$ ): the fraction of examples whose probability of neutral are above $\\tau$ . We report the results for $\\tau = 0.5$ and $\\tau = 0.7$ following (Lauscher et al., 2021; He et al., 2022). All three metrics will attain 1 for a bias-free model.", + "bbox": [ + 507, + 514, + 884, + 882 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Bias-in-Bios (De-Arteaga et al., 2019) is a large-scale English dataset studying gender bias in oc", + "bbox": [ + 507, + 887, + 884, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_number", + "text": "5862", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "cupation classification from the Common Crawl corpus. We report the overall accuracy of the task as well as the accuracy breakdown based on gender. To quantify gender bias, we compute the difference in true positive rates (TPR) between genders across various occupations, denoted as $\\mathrm{GAP}_{g}^{\\mathrm{TPR}}$ and defined as follows:", + "bbox": [ + 112, + 84, + 489, + 197 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathrm {G A P} _ {g} ^ {\\mathrm {T P R}} = \\left| \\mathrm {T P R} _ {g} - \\mathrm {T P R} _ {\\sim g} \\right|, \\tag {3}\n$$\n", + "text_format": "latex", + "bbox": [ + 184, + 205, + 489, + 227 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "where $\\mathrm{TPR}_g$ represents the proportion of individuals correctly predicted given their gender $g$ , and $g$ and $\\sim g$ are binary genders. Following (Romanov et al., 2019; Ravfogel et al., 2020; He et al., 2022), we also calculate the root mean square of the per-occupation TPR gender gap $\\mathrm{GAP}_{g,o}^{\\mathrm{TPR}}$ over all occupations $o$ :", + "bbox": [ + 112, + 233, + 490, + 344 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathrm {G A P} _ {g} ^ {\\mathrm {R M S}} = \\sqrt {\\frac {1}{| O |} \\sum_ {o \\in O} \\left(\\mathrm {G A P} _ {g , o} ^ {\\mathrm {T P R}}\\right) ^ {2}}. \\tag {4}\n$$\n", + "text_format": "latex", + "bbox": [ + 164, + 354, + 487, + 395 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "A value closer to 0 indicates a lower degree of bias.", + "bbox": [ + 112, + 404, + 489, + 420 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.2 Datasets and Setup", + "text_level": 1, + "bbox": [ + 112, + 430, + 312, + 445 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "STS-B and SNLI. We fine-tune the models on SNLI and STS-B training sets and pick the one that performs best on the validation set and then evaluate bias using Bias-STS-B and Bias-NLI, respectively. Bias-in-Bios. We use the same data as Ravfogel et al. (2020) which contains 393,423 biographies and 28 profession classes. We split train/validation/test by 65/25/10 following (De-Arteaga et al., 2019; Ravfogel et al., 2020). The dataset statistics are shown in Table 1. For SNLI and Bias-in-Bios, we report accuracy over classification while we report the Pearson and Spearman correlations for STS-B.", + "bbox": [ + 112, + 451, + 489, + 659 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.3 Baseline Models", + "text_level": 1, + "bbox": [ + 112, + 670, + 289, + 684 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We compare $\\mathrm{Co}^2\\mathrm{PT}$ with six upstream debiased models fine-tuned on the downstream tasks, and three baselines fine-tune or prompt-tune BERT models on the downstream tasks: ZariCDA (Webster et al., 2020) is pre-trained from scratch over counterfactual data augmented from English Wikipedia and ZariDO (Webster et al., 2020) is additionally pre-trained with increased dropout rate.", + "bbox": [ + 112, + 690, + 490, + 820 + ], + "page_idx": 4 + }, + { + "type": "table", + "img_path": "images/5cfc0cf405775cbbd0ee11cc5afeec7c8f5979770cd50d4776f9f4ea77d49385.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
TrainValidationBias-Test
STS-B5,7491,50016,980
SNLI550,15210,0001,936,512
Bias-in-Bios255,71039,36998,344
", + "bbox": [ + 132, + 837, + 468, + 890 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Table 1: Dataset statistics.", + "bbox": [ + 208, + 898, + 389, + 913 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "ADELE and its variant ADELE-TA (Lauscher et al., 2021) inject and train debiased adapters via masked language modeling on the counterfactually augmented corpus. Context-Debias (Kaneko and Bollegala, 2021) is fine-tuned via an inner-product loss and squared distance loss. Auto-Debias (Guo et al., 2022) uses a beam search to search for biased prompts and then uses these biased prompts to finetune PLMs by minimizing the disagreement between predicted [MASK] token distributions. MA-BEL (He et al., 2022) is additionally pre-trained on all entailment pairs that contain gendered terms from SNLI and MNLI data with a contrastive loss, an alignment loss, and an optional masked language modeling loss. BERT (Devlin et al., 2019) is a fine-tuned BERT model on the downstream tasks while BERT+CDA is a fine-tuned BERT model on the counterfactually augmented data from the training sets. PT (Liu et al., 2022) adds continuous prompts to each layer of the models and then tunes the prompts on downstream tasks. The backbone models for ZariCDA and ZariDO are BERT-large-uncased whereas other baselines are BERT-base-uncased (Devlin et al., 2019).1", + "bbox": [ + 507, + 84, + 884, + 470 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.4 Implementation Details", + "text_level": 1, + "bbox": [ + 507, + 493, + 741, + 508 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "For fine-tuning debiased baselines and vanilla BERT, we use the models released by the authors. We set the max length of the sentence to be 128, the learning rate to be $2e - 5$ , the batch size to be 64, and train for 10 epochs. For $\\mathrm{AT + CDA}$ , learning rate is 2e-5 and batch size is 128. For PT and $\\mathrm{Co}^2\\mathrm{PT}$ , the backbone models are bert-base-uncased with the learning rate set to $1e - 2$ and the prompt length set to 20 and are trained for 30 epochs. The batch size is set to 32. For hyperparameters $\\tau$ and $\\alpha$ in Equation 1 and 2, we set $\\tau = 0.05$ and $\\alpha = 1.0$ . All experiments are run on a single NVIDIA RTX A5000 24GB GPU. For each run, we save the model that performs the best on the development set and evaluate it on extrinsic benchmarks. We report the average results across three runs. All code and data are available at https://github.com/dongxiangjue/Co2PT; additional experimental details and standard deviations are in Appendix A and Appendix C, respectively.", + "bbox": [ + 507, + 520, + 882, + 859 + ], + "page_idx": 4 + }, + { + "type": "page_footnote", + "text": "1We keep the results of these two BERT-large-uncased checkpoints since Lauscher et al. (2021) also compares these methods with their BERT-base-uncased method.", + "bbox": [ + 507, + 879, + 882, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_number", + "text": "5863", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "5 Debiasing Effectiveness (RQ1)", + "text_level": 1, + "bbox": [ + 114, + 83, + 410, + 99 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We now investigate the effectiveness of $\\mathrm{Co}^2\\mathrm{PT}$ in mitigating bias on three extrinsic bias benchmarks.", + "bbox": [ + 112, + 108, + 489, + 142 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Bias-STS-B. First, we focus on the Bias-STS-B benchmark. As Table 2 indicates, $\\mathrm{Co}^2\\mathrm{PT}$ shows the lowest bias scores across all metrics and achieves similar model performance on downstream tasks as the other debiased baselines. We observe that some debiased models exhibit higher bias scores than the original BERT, indicating that debiased language models can relearn biases during fine-tuning on downstream tasks. For example, AutoDebias, one of the state-of-the-art debiased models, demonstrates strong fairness on intrinsic benchmarks, such as SEAT, scores 0.312 in average absolute difference, showing a higher bias level than the original BERT and most of the other baselines. On the other hand, MABEL, which shows strong performance in debiasing downstream tasks, achieves a competitive score of 0.081. Furthermore, compared to fine-tuning the original BERT model on the STS-B training set, PT results in a higher bias score of 0.321 compared to 0.282. This suggests that while fine-tuning only the number of prompt tokens may be parameter efficient, it can result in increased bias due to the presence of an unbalanced dataset. For $\\mathrm{Co}^2\\mathrm{PT}$ , we observe a significant reduction in the bias score with the average absolute difference decreasing from 0.321 to 0.058, from 0.749 to 0.167 when the difference exceeds 0.1, and from 0.369 to 0.005 when the difference exceeds 0.3. These findings indicate a substantial improvement in the ability to mitigate bias.", + "bbox": [ + 112, + 161, + 490, + 643 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Bias-NLI. Next, we focus on the Bias-NLI extrinsic benchmark shown in Table 3. BERT+CDA, Context-Debias, and MABEL achieve lower bias", + "bbox": [ + 112, + 646, + 489, + 697 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/acc8ff244e723cb4d2b3a6500def379c6af3b4e3c46eb935d1fdd8fe258e2ac7.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.2820.8670.4170.883 / 0.879
BERT+CDA0.1310.5110.0800.885 / 0.881
ZariCDA*0.1120.4450.0480.892 / 0.889
ZariDO*0.3470.9220.5850.880 / 0.878
ADELE†0.121--0.889 / -
Context-Debias0.3320.9160.5390.879 / 0.876
Auto-Debias0.3120.9020.5020.884 / 0.880
MABEL0.0660.2040.0130.889 / 0.885
PT0.3210.7490.3690.889 / 0.885
Co2PT (ours)0.0580.1670.0050.884 / 0.880
", + "bbox": [ + 115, + 715, + 487, + 860 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/0553720a6c0c3cc891943982d80e60975b598b451424f14dedfa0280a4deac03.jpg", + "table_caption": [ + "Table 2: Evaluation on Bias-STS-B. †: results are reported from the ADELE model in the original paper; $\\star$ : backbone model is BERT-large-uncased." + ], + "table_footnote": [], + "table_body": "
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.8240.8680.8670.8110.909
BERT+CDA0.8730.9420.9410.8940.905
ZariCDA*0.7860.8280.8260.7650.912
ZariDO*0.7470.7820.7790.7110.913
Context-Debias0.8730.9190.9190.8770.910
ADELE-TA†0.5040.557--0.813
AT+CDA‡0.6590.7990.7580.5100.849
Auto-Debias0.8130.8490.8480.7950.908
MABEL0.8530.8920.8910.8460.911
PT0.7410.8120.8080.7290.898
Co2PT (ours)0.8770.9650.9620.9050.886
", + "bbox": [ + 510, + 80, + 884, + 241 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "scores than the original BERT across all metrics while the other baseline methods amplify biases during the fine-tuning. Similarly, Auto-Debias performs well on the SEAT benchmark but experiences an increase in bias when applied to downstream tasks, mirroring the trend observed in the Bias-STS-B extrinsic benchmark. Moreover, ADELE, another parameter-efficient method, performs poorly in both bias mitigation and model accuracy. Similar to Bias-STS-B extrinsic benchmark, PT amplifies biases during the tuning process, resulting in a decline in the NN score from 0.824 to 0.741 and the FN score from 0.868 to 0.812. By employing $\\mathrm{Co}^2\\mathrm{PT}$ , we observe significant improvements with the NN score rising to 0.877 (from 0.741) and the FN score reaching 0.965 (from 0.812), indicating the effectiveness of $\\mathrm{Co}^2\\mathrm{PT}$ on bias mitigation.", + "bbox": [ + 505, + 356, + 884, + 645 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Bias-in-Bios. Next we show the performance on the Bias-in-Bios benchmark in Table 4. Among all the baselines, the ZariCDA achieves the lowest $\\mathrm{GAP^{TPR}}$ score of 2.667 while the BERT+CDA", + "bbox": [ + 507, + 653, + 882, + 717 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/1decd59c07758eb8f45a9714ca042c3a695e509251e07a0663705866720b7226.jpg", + "table_caption": [ + "Table 3: Evaluation on Bias-NLI. †: results are fine-tuned on MNLI and reported from the ADELE-TA model in the original paper; ‡: adapter tuning on counterfactually augmented data; ★: backbone model is BERT-large-uncased. Other baselines are fine-tuned on SNLI." + ], + "table_footnote": [], + "table_body": "
ModelGAPTPR↓GAPRMS↓Acc.
BERT2.8220.1190.830
BERT+CDA2.7580.1130.841
ZariCDA*2.6670.1350.848
ZariDO*2.7200.1350.847
Context-Debias3.0310.1190.831
Auto-Debias2.6900.1250.831
MABEL2.8390.1260.826
PT3.1710.1290.820
Co2PT (ours)2.5370.1230.824
", + "bbox": [ + 527, + 734, + 865, + 860 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Table 4: Evaluation on Bias-in-Bios. $\\star$ : backbone model is BERT-large-uncased. The results of ADELE on this benchmark are not reported in the original paper.", + "bbox": [ + 507, + 871, + 882, + 914 + ], + "page_idx": 5 + }, + { + "type": "page_number", + "text": "5864", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "achieves the lowest $\\mathrm{GAP^{RMS}}$ score of 0.113. Furthermore, PT exacerbates bias and results in an increase in the $\\mathrm{GAP^{TPR}}$ score from 2.822 to 3.171 and $\\mathrm{GAP^{RMS}}$ from 0.119 to 0.129. In contrast, $\\mathrm{Co^{2}PT}$ reduces the $\\mathrm{GAP^{TPR}}$ score from 3.171 to 2.537 and $\\mathrm{GAP^{RMS}}$ from 0.129 to 0.123, demonstrating its effectiveness in mitigating bias in the occupation classification task.", + "bbox": [ + 112, + 83, + 489, + 212 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "6 Integrating $\\mathrm{Co}^2\\mathrm{PT}$ with Existing Debiased Models (RQ2)", + "text_level": 1, + "bbox": [ + 112, + 224, + 430, + 258 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "One benefit of a prompt-then-finetune model like $\\mathrm{Co}^2\\mathrm{PT}$ is that it can be easily integrated with existing upstream debiasing methods. Here we investigate the applicability of $\\mathrm{Co}^2\\mathrm{PT}$ to three existing debiased models to bridge the gap in utilizing upstream debiased models for downstream tasks. Based on the comparison results – before and after applying $\\mathrm{Co}^2\\mathrm{PT}$ – shown in Table 5, $\\mathrm{Co}^2\\mathrm{PT}$ significantly reduces the bias scores for Context-Debias and Auto-Debias: 0.088 versus 0.332, and 0.068 versus 0.312, respectively. For MABEL, which achieves low bias scores, there is no significant effect on the bias score. Additionally, $\\mathrm{Co}^2\\mathrm{PT}$ improves the model performance on the downstream tasks. These results clearly demonstrate the effectiveness of integrating $\\mathrm{Co}^2\\mathrm{PT}$ into established debiased models for downstream tasks. This ability enables the existing debiased models to achieve strong performance on downstream tasks while simultaneously maintaining a low bias level.", + "bbox": [ + 115, + 267, + 489, + 589 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/820c24ca992f96cf07aea870822737fd1646fa5eebc767776f7407629e997e94.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.3320.9160.5390.879 / 0.876
+ Co2PT0.0880.3610.0100.885 / 0.881
Auto-Debias0.3120.9020.5020.884 / 0.880
+ Co2PT0.0680.2310.0050.883 / 0.878
MABEL0.0660.2040.0130.889 / 0.885
+ Co2PT0.0680.2280.0050.892 / 0.889
", + "bbox": [ + 115, + 599, + 487, + 697 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "7 Impact of Design (RQ3)", + "text_level": 1, + "bbox": [ + 112, + 744, + 354, + 762 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "We perform an extensive ablation study to show how different components affect $\\mathrm{Co}^{2}\\mathrm{PT}$ in Table 6. We use Bias-STS-B as the representative task for computational efficiency.", + "bbox": [ + 112, + 770, + 487, + 834 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Impact of counterfactual module. First, we perform counterfactual data augmentation on the training data containing bias-attribute terms. Then we conduct prompt tuning only on these augmented pairs (denoted as PT+CDA). PT+CDA reduces", + "bbox": [ + 112, + 839, + 489, + 917 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "the bias score from 0.321 in PT to 0.291, showing the effectiveness of the straightforward counterfactual data augmentation approach. However, the improvement is less than $\\mathrm{Co}^2\\mathrm{PT}$ , implying the necessity of the contrastive learning module.", + "bbox": [ + 507, + 84, + 884, + 165 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Impact of contrastive module. To investigate the impact of the contrastive module, instead of employing constructed counterfactual sentence pairs as positive pairs for contrastive loss, we use unsupervised contrastive loss by encoding the same input twice and get two embeddings with different dropout masks $z$ , $z'$ (Gao et al., 2021). Then the contrastive objective becomes:", + "bbox": [ + 507, + 168, + 884, + 297 + ], + "page_idx": 6 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {s c l} = - \\log \\frac {e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i}} , \\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i} ^ {\\prime}}\\right) / \\tau}}{\\sum_ {j = 1} ^ {N} e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i}} , \\mathbf {p} \\oplus \\mathbf {h} _ {j} ^ {z _ {j} ^ {\\prime}}\\right) / \\tau}}, \\tag {5}\n$$\n", + "text_format": "latex", + "bbox": [ + 536, + 306, + 882, + 362 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "which is optimized with the prompt tuning loss $\\mathcal{L}_{pt}$ together (denoted as PT+SCL). PT+SCL surpasses both PT and PT+CDA by achieving a large reduction in bias score to 0.161, demonstrating the effectiveness of the contrastive module.", + "bbox": [ + 507, + 370, + 882, + 449 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Impact of adding contrastive loss for non-augmented inputs. In $\\mathrm{Co}^2\\mathrm{PT}$ , we only consider counterfactually augmented pairs in the contrastive module. To explore the necessity of including inputs without demographic terms in the contrastive module, we incorporate unsupervised contrastive loss for non-augmented input like Equation 5 as $\\mathcal{L}_{scl}'$ and tuned with contrastive loss $\\mathcal{L}_{cl}$ for counter-factly augmented pairs (Equation 1) and $\\mathcal{L}_{pt}'$ (denoted as $\\mathrm{Co}^2\\mathrm{PT} + \\mathrm{SCL}_n$ ). The bias score of 0.117 achieved by $\\mathrm{Co}^2\\mathrm{PT} + \\mathrm{SCL}_n$ is higher than $\\mathrm{Co}^2\\mathrm{PT}$ and this indicates that incorporating a contrastive loss for non-augmented inputs in the training set is unnecessary.", + "bbox": [ + 507, + 454, + 882, + 678 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Compare $\\mathrm{Co}^2\\mathrm{PT}$ with task-agnostic counterfactual pairs. To investigate whether integrating task-agnostic neutral entailment pairs can benefit debiasing on the task, we use 142,158 gender-balanced entailment pairs augmented from SNLI and MNLI", + "bbox": [ + 507, + 682, + 884, + 763 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/bb56d7f851ec299ef1076e1cf9e22192d901ad1fd7731019e8797cc73004931c.jpg", + "table_caption": [ + "Table 5: Performance of integrating $\\mathrm{Co}^2\\mathrm{PT}$ with debiased models on Bias-STS-B." + ], + "table_footnote": [], + "table_body": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
PT+CDA0.2910.7470.3510.890 / 0.886
PT+SCL0.1610.5480.1330.883 / 0.878
Co2PT+SCLn0.1170.4670.0560.884 / 0.878
PT+NLI+CL0.0800.2800.0220.881 / 0.876
PT+NLI+CLp0.2070.6870.2220.884 / 0.881
PT+CDA+CLp0.2710.7250.3380.886 / 0.883
Co2PT (PT+CDA+CL)0.0580.1670.0050.884 / 0.880
", + "bbox": [ + 510, + 781, + 882, + 890 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Table 6: Impact of different components.", + "bbox": [ + 554, + 898, + 833, + 914 + ], + "page_idx": 6 + }, + { + "type": "page_number", + "text": "5865", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "datasets in He et al. (2022) as task-agnostic entailment pairs for STS-B task instead of using the task-specific counterfactual pairs augmented from the training set (denoted as $\\mathbf{PT} + \\mathbf{NLI} + \\mathbf{CL}$ ). We notice that although $\\mathrm{PT} + \\mathrm{NLI} + \\mathrm{CL}$ does not outperform $\\mathrm{Co}^2\\mathrm{PT}$ , it shows a strong ability to mitigate bias compared to other baseline methods. Thus, when working on a moderate amount of training data, it is better to use counterfactually augmented pairs from the training data.", + "bbox": [ + 112, + 84, + 489, + 244 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Compare $\\mathrm{Co}^2\\mathrm{PT}$ with other contrastive objective. For sentence-pair classification tasks, we also explore the contrastive loss that encourages the inter-association of entailment pairs (He et al., 2022). For the original input pair $(s_{i1}, s_{i2})$ and its augmented pair $(s_{i1}'', s_{i2}')$ , $s_{i1}$ and $s_{i2}$ are treated as positive pairs while $s_{i1}$ and $s_{i2}'$ and other in-batch $s_{j2}$ are negatives, and vice versa (denoted as $\\mathbf{CL_p}$ ). When using task-specific counterfactual pairs, $\\mathrm{PT + CDA + CL_p}$ decreases the bias score to 0.271. Similarly, using task-agnostic counterfactual pairs, $\\mathrm{PT + NLI + CL_p}$ also reduces the bias score to 0.271. However, the bias mitigation effect is not as significant as that achieved by $\\mathrm{Co}^2\\mathrm{PT}$ , which indicates the effectiveness of the contrastive module in $\\mathrm{Co}^2\\mathrm{PT}$ .", + "bbox": [ + 115, + 249, + 489, + 506 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "8 Impact of Hyperparameters (RQ4)", + "text_level": 1, + "bbox": [ + 112, + 520, + 448, + 538 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Finally, we investigate the impact of three hyperparameters: (i) the continuous prompt length; (ii) the temperature $\\tau$ of contrastive loss $\\mathcal{L}_{cl}$ ; and (iii) the coefficient $\\alpha$ of total learning objective $\\mathcal{L}$ .", + "bbox": [ + 112, + 548, + 489, + 612 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Impact of prompt length. First, we experiment with the prompt length varying in $\\{10,20,50\\}$ , as illustrated in Figure 2. Generally speaking, with more tunable prompt parameters, the model performs better on downstream tasks. In addition, when the prompt length is $10$ , $\\mathrm{Co}^2\\mathrm{PT}$ shows a higher increase in bias score compared to the prompt length of 20 and 50. This indicates that a", + "bbox": [ + 112, + 617, + 489, + 746 + ], + "page_idx": 7 + }, + { + "type": "image", + "img_path": "images/897ef13ff3cffd359f7e9993c5e4b85eba83c26cba597c98bb4d89185f489205.jpg", + "image_caption": [ + "Figure 2: Impact of prompt length." + ], + "image_footnote": [], + "bbox": [ + 119, + 763, + 482, + 887 + ], + "page_idx": 7 + }, + { + "type": "image", + "img_path": "images/cf61ad18743b6131a257e5515d94e70c4303acd02ef194c7f1ac7f5a06d85991.jpg", + "image_caption": [ + "Figure 3: $\\tau$ in $\\{0.005, 0.05, 0.5\\}$ while $\\alpha = 1.0$ ." + ], + "image_footnote": [], + "bbox": [ + 514, + 84, + 877, + 206 + ], + "page_idx": 7 + }, + { + "type": "image", + "img_path": "images/9cea2a3eb3163472276911af06c1b6a8e3b4fbb950dc18755b2a3dfa0fcb0158.jpg", + "image_caption": [ + "Figure 4: $\\alpha$ in $\\{0.1, 0.5, 1.0\\}$ while $\\tau = 0.05$ ." + ], + "image_footnote": [], + "bbox": [ + 514, + 243, + 877, + 368 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "larger prompt length enables the model to achieve better model performance on downstream tasks more rapidly while still maintaining a lower bias score. However, it is important to consider that using larger prompt lengths means tuning more parameters, thus posing a trade-off.", + "bbox": [ + 507, + 409, + 882, + 505 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Impact of $\\tau$ . Then, we vary temperature $\\tau$ in $\\{0.005, 0.05, 0.5\\}$ . Figure 3 shows close significant bias mitigation effects when $\\tau$ is set to 0.005 and 0.05 while exhibiting less effectiveness when $\\tau$ is 0.5. This observation implies that a higher temperature value corresponds to less weight of the cosine similarity calculation, resulting in decreased effectiveness in bias mitigation.", + "bbox": [ + 507, + 508, + 882, + 637 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Impact of $\\alpha$ . Last, we study the impact of coefficient $\\alpha$ and vary the value in $\\{0.1, 0.5, 1.0\\}$ . Figure 4 emphasizes that reducing the value of $\\alpha$ at a constant $\\tau$ , thus assigning less weight to the contrastive module, leads to decreased bias mitigation effects. This analysis underscores the importance of carefully selecting appropriate hyperparameters.", + "bbox": [ + 507, + 640, + 884, + 753 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "9 Conclusion and Future Work", + "text_level": 1, + "bbox": [ + 507, + 765, + 796, + 780 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "We propose $\\mathrm{Co}^2\\mathrm{PT}$ , an efficient and effective debiasing method for mitigating bias in downstream tasks. We evaluate its effectiveness on bias mitigation and applicability to existing debiased upstream models, and investigate how the design of each component and the selection of hyperparameters impact both its bias reduction capabilities and downstream task performance.", + "bbox": [ + 507, + 790, + 884, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_number", + "text": "5866", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Mitigating non-gender and intersectional bias. Mitigating non-gender biases is challenging as some debiasing methods work well on reducing gender biases but show poor generalization capabilities in addressing biases beyond gender (Meade et al., 2022). Without re-training the model, $\\mathrm{Co}^2\\mathrm{PT}$ is flexible to apply in order to mitigate different bias types in downstream applications. One can train different debiasing prompts to tackle different bias dimensions such as gender, race, and religion. Furthermore, these debiasing prompts can be applied to mitigate intersectional bias by simply combining the corresponding prompts in downstream tasks.", + "bbox": [ + 112, + 84, + 490, + 294 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Limitations", + "text_level": 1, + "bbox": [ + 112, + 306, + 220, + 322 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "While this work primarily addresses bias in English, we acknowledge the presence of more complicated bias cases in other languages. Therefore, future exploration of existing methods or the development of new techniques to mitigate bias in other languages would be valuable. Furthermore, despite the efficiency and comparable performance of deep prompt tuning compared to fine-tuning, it still underperforms fine-tuning on certain datasets when the model size is small. This will also limit the model performance of our method.", + "bbox": [ + 112, + 332, + 489, + 511 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Ethics Statement", + "text_level": 1, + "bbox": [ + 114, + 523, + 265, + 539 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "In this work, when investigating gender bias in pre-trained language models, we focus on the binary definition of gender as the targeted attribute of discrimination. However, it is important to acknowledge that future research should also consider non-binary genders and other multi-class scenarios to comprehensively address bias.", + "bbox": [ + 112, + 550, + 489, + 663 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Acknowledgements", + "text_level": 1, + "bbox": [ + 114, + 676, + 285, + 693 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We thank Nicholas Meade for the initial discussion and anonymous reviewers for valuable feedback.", + "bbox": [ + 112, + 702, + 487, + 736 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "References", + "text_level": 1, + "bbox": [ + 114, + 763, + 213, + 778 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877-1901.", + "Yang Trista Cao, Yada Pruksachatkun, Kai-Wei Chang, Rahul Gupta, Varun Kumar, Jwala Dhamala, and Aram Galstyan. 2022. On the intrinsic and extrinsic" + ], + "bbox": [ + 115, + 785, + 489, + 917 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "fairness evaluation metrics for contextualized language representations. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 561-570, Dublin, Ireland. Association for Computational Linguistics.", + "Pengyu Cheng, Weituo Hao, Siyang Yuan, Shijing Si, and Lawrence Carin. 2021. FairFil: Contrastive Neural Debiasing Method for Pretrained Text Encoders. In International Conference on Learning Representations.", + "Maria De-Arteaga, Alexey Romanov, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, and Adam Tauman Kalai. 2019. Bias in bios: A case study of semantic representation bias in a high-stakes setting. In Proceedings of the Conference on Fairness, Accountability, and Transparency, pages 120-128.", + "Sunipa Dev, Tao Li, Jeff M Phillips, and Vivek Srikumar. 2020. On measuring and mitigating biased inferences of word embeddings. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 7659-7666.", + "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.", + "Xiangjue Dong, Yun He, Ziwei Zhu, and James Caverlee. 2023a. PromptAttack: Probing dialogue state trackers with adversarial prompts. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 10651-10666, Toronto, Canada. Association for Computational Linguistics.", + "Xiangjue Dong, Jiaying Lu, Jianling Wang, and James Caverlee. 2023b. Closed-book question generation via contrastive learning. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 3150-3162, Dubrovnik, Croatia. Association for Computational Linguistics.", + "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.", + "Seraphina Goldfarb-Tarrant, Rebecca Marchant, Ricardo Muñoz Sánchez, Mugdha Pandya, and Adam Lopez. 2021. Intrinsic bias metrics do not correlate with application bias. In Proceedings of the 59th Annual Meeting of the Association for Computational" + ], + "bbox": [ + 510, + 85, + 885, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_number", + "text": "5867", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1926-1940, Online. Association for Computational Linguistics.", + "Yue Guo, Yi Yang, and Ahmed Abbasi. 2022. Autodebias: Debiasing masked language models with automated biased prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1012-1023, Dublin, Ireland. Association for Computational Linguistics.", + "Xudong Han, Timothy Baldwin, and Trevor Cohn. 2021. Diverse adversaries for mitigating bias in training. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2760-2765, Online. Association for Computational Linguistics.", + "Jacqueline He, Mengzhou Xia, Christiane Fellbaum, and Danqi Chen. 2022. MABEL: Attenuating gender bias using textual entailment data. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9681-9702, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.", + "Masahiro Kaneko and Danushka Bollegala. 2021. Debiasing pre-trained contextualised embeddings. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1256-1266, Online. Association for Computational Linguistics.", + "Masahiro Kaneko, Danushka Bollegala, and Naoaki Okazaki. 2022. Debiasing isn't enough! - on the effectiveness of debiasing MLMs and their social biases in downstream tasks. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1299-1310, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.", + "Anne Lauscher, Tobias Lueken, and Goran Glavš. 2021. Sustainable modular debiasing of language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 4782-4797, Punta Cana, Dominican Republic. Association for Computational Linguistics.", + "Klas Leino, Matt Fredrikson, Emily Black, Shayak Sen, and Anupam Datta. 2019. Feature-Wise Bias Amplification. In International Conference on Learning Representations (ICLR).", + "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 9 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Quentin Lhoest, Albert Villanova del Moral, Yacine Jernite, Abhishek Thakur, Patrick von Platen, Suraj Patil, Julien Chaumont, Mariama Drame, Julien Plu, Lewis Tunstall, Joe Davison, Mario Šaško, Gunjan Chhablani, Bhavitvya Malik, Simon Brandeis, Teven Le Scao, Victor Sanh, Canwen Xu, Nicolas Patry, Angelina McMillan-Major, Philipp Schmid, Sylvain Gugger, Clément Delangue, Théo Matussière, Lysandre Debut, Stas Bekman, Pierrick Cistac, Thibault Goehringer, Victor Mustar, François Lagunas, Alexander Rush, and Thomas Wolf. 2021. Datasets: A community library for natural language processing. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 175-184, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.", + "Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. 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 4582-4597, Online. Association for Computational Linguistics.", + "Yingji Li, Mengnan Du, Xin Wang, and Ying Wang. 2023. Prompt tuning pushes farther, contrastive learning pulls closer: A two-stage approach to mitigate social biases. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14254-14267, Toronto, Canada. Association for Computational Linguistics.", + "Paul Pu Liang, Irene Mengze Li, Emily Zheng, Yao Chong Lim, Ruslan Salakhutdinov, and Louis-Philippe Morency. 2020. Towards debiasing sentence representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5502-5515, Online. Association for Computational Linguistics.", + "Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. 2022. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 61-68, Dublin, Ireland. Association for Computational Linguistics.", + "Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. arXiv preprint arXiv:2103.10385.", + "Kaiji Lu, Piotr Mardziel, Fangjing Wu, Preetam Amancharla, and Anupam Datta. 2020. Gender bias in neural natural language processing. *Logic, Language, and Security: Essays Dedicated to Andre Scedrov on the Occasion of His 65th Birthday*, pages 189-202.", + "Chandler May, Alex Wang, Shikha Bordia, Samuel R. Bowman, and Rachel Rudinger. 2019. On measuring" + ], + "bbox": [ + 510, + 85, + 884, + 917 + ], + "page_idx": 9 + }, + { + "type": "page_number", + "text": "5868", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 9 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "social biases in sentence encoders. 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 622-628, Minneapolis, Minnesota. Association for Computational Linguistics.", + "Nicholas Meade, Elinor Poole-Dayan, and Siva Reddy. 2022. An empirical survey of the effectiveness of debiasing techniques for pre-trained language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1878-1898, Dublin, Ireland. Association for Computational Linguistics.", + "Moin Nadeem, Anna Bethke, and Siva Reddy. 2021. StereoSet: Measuring stereotypical bias in pretrained language models. 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 5356-5371, Online. Association for Computational Linguistics.", + "Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. 2020. CrowS-pairs: A challenge dataset for measuring social biases in masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1953-1967, Online. Association for Computational Linguistics.", + "Shauli Ravfogel, Yanai Elazar, Hila Gonen, Michael Twiton, and Yoav Goldberg. 2020. Null it out: Guarding protected attributes by iterative nullspace projection. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7237-7256, Online. Association for Computational Linguistics.", + "Alexey Romanov, Maria De-Arteaga, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, Anna Rumshisky, and Adam Kalai. 2019. What's in a name? Reducing bias in bios without access to protected attributes. 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 4187-4195, Minneapolis, Minnesota. Association for Computational Linguistics.", + "Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. 2018. Gender bias in coreference resolution. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 8-14, New Orleans, Louisiana. Association for Computational Linguistics.", + "Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in NLP. Transactions of the Association for Computational Linguistics, 9:1408-1424." + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Rachael Tatman. 2017. Gender and dialect bias in YouTube's automatic captions. In Proceedings of the First ACL Workshop on Ethics in Natural Language Processing, pages 53-59, Valencia, Spain. Association for Computational Linguistics.", + "Yibo Wang, Congying Xia, Guan Wang, and Philip S. Yu. 2022. Continuous Prompt Tuning Based Textual Entailment Model for E-commerce Entity Typing. In 2022 IEEE International Conference on Big Data (Big Data), pages 1383-1388.", + "Kellie Webster, Xuezhi Wang, Ian Tenney, Alex Beutel, Emily Pittler, Ellie Pavlick, Jilin Chen, Ed Chi, and Slav Petrov. 2020. Measuring and reducing gendered correlations in pre-trained models. arXiv preprint arXiv:2010.06032.", + "Zhongbin Xie and Thomas Lukasiewicz. 2023. An empirical analysis of parameter-efficient methods for debiasing pre-trained language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15730-15745, Toronto, Canada. Association for Computational Linguistics.", + "Ke Yang, Charles Yu, Yi Fung, Manling Li, and Heng Ji. 2022. ADEPT: A DEbiasing Prompt Framework. arXiv preprint arXiv:2211.05414.", + "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2017. Men also like shopping: Reducing gender bias amplification using corpus-level constraints. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2979–2989, Copenhagen, Denmark. Association for Computational Linguistics.", + "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 15–20, New Orleans, Louisiana. Association for Computational Linguistics.", + "Ran Zmigrod, Sabrina J. Mielke, Hanna Wallach, and Ryan Cotterell. 2019. Counterfactual data augmentation for mitigating gender stereotypes in languages with rich morphology. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1651-1661, Florence, Italy. Association for Computational Linguistics." + ], + "bbox": [ + 510, + 85, + 884, + 797 + ], + "page_idx": 10 + }, + { + "type": "page_number", + "text": "5869", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Appendix", + "text_level": 1, + "bbox": [ + 257, + 84, + 346, + 99 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "A More Implementation Details", + "text_level": 1, + "bbox": [ + 114, + 112, + 406, + 128 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "A.1 Dataset and Extrinsic Bias Benchmarks", + "text_level": 1, + "bbox": [ + 114, + 140, + 475, + 154 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "STS-B and SNLI datasets are from the Hugging Face Datasets library (Lhoest et al., 2021). We use the same Bias-in-Bios dataset used in Ravfogel et al. (2020), the Bias-STS-B used in Lauscher et al. (2021) and the Bias-NLI used in He et al. (2022). The code used to assess Bias-STS-B is modified from Lauscher et al. (2021), while the code for evaluating Bias-NLI and Bias-in-Bios is adapted from He et al. (2022). Different from the code employed in He et al. (2022), we conduct our evaluation on the entire Bias-NLI dataset rather than just the top $10\\%$ of it.", + "bbox": [ + 112, + 162, + 487, + 355 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "A.2 Debiased Baselines", + "text_level": 1, + "bbox": [ + 114, + 370, + 312, + 384 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Please refer to the footnotes here for the source of released debiased models - ZariCDA, ZariDO $^4$ (Webster et al., 2020), Context-Debias $^5$ (Kaneko and Bollegala, 2021), AutoDebias $^6$ (Guo et al., 2022), MABEL $^7$ (He et al., 2022) - used on downstream tasks.", + "bbox": [ + 112, + 393, + 489, + 488 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "A.3 Implementation Details", + "text_level": 1, + "bbox": [ + 114, + 504, + 349, + 519 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "We use BERT-base-uncased in our experiments. For the single-sentence classification task, we preprocess the [CLS] token before the input sentences and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. For the sentence-pair classification task, e.g., SNLI task, we preprocess [CLS] before the premise $x$ and [SEP] token to separate premise $x$ and hypothesis $y$ and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. Fine-tuning and prompt tuning code rely on the Huggingface implementation. $^{8}$", + "bbox": [ + 112, + 527, + 489, + 720 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "B More Ablation Studies", + "text_level": 1, + "bbox": [ + 509, + 83, + 742, + 98 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Pooling method. Besides using pooled output, we also conduct experiments that use the average token representation from the model's last hidden state as sentence representation, shown in Table 7. However, upon analyzing the results, $\\mathrm{Co}^2\\mathrm{PT}_{\\mathrm{avg}}$ is considerably more challenging for the prompts to acquire the debiasing capability when using the average token representation compared to when utilizing the CLS token as the sentence representation.", + "bbox": [ + 507, + 109, + 885, + 253 + ], + "page_idx": 11 + }, + { + "type": "table", + "img_path": "images/81e245a4c748c815a9580a0a7633846a6d4073f1338204f1b4554cc9ea40f79b.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
Co2PTavg.0.3900.8230.4970.891 / 0.886
Co2PTcls (ours)0.0580.1670.0050.884 / 0.880
", + "bbox": [ + 510, + 263, + 880, + 315 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "C Standard Deviation of Results", + "text_level": 1, + "bbox": [ + 507, + 366, + 806, + 382 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "The standard deviation of evaluation results on extrinsic bias benchmarks – Bias-STS-B, Bias-NLI, and Bias-in-Bios – are presented in Tables 8 to 10, respectively. In addition, the results of integrating $\\mathrm{Co}^2\\mathrm{PT}$ with existing debiased models and ablation study are shown in Table 11 and Table 12. These results indicate that $\\mathrm{Co}^2\\mathrm{PT}$ consistently performs well with relatively low variability, demonstrating its effectiveness and reliability.", + "bbox": [ + 507, + 392, + 882, + 536 + ], + "page_idx": 11 + }, + { + "type": "table", + "img_path": "images/b255e037cba621ae3575b0099f01359f23a51e94024049f0ee5ddf6b2219b702.jpg", + "table_caption": [ + "Table 7: More ablation results." + ], + "table_footnote": [], + "table_body": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.0180.0240.0560.002 / 0.001
BERT+CDA0.0200.0580.0420.001 / 0.000
ZariCDA*0.0300.1460.0310.004 / 0.003
ZariDO*0.0200.0110.0440.003 / 0.003
Context-Debias0.0420.0520.0980.005 / 0.005
Auto-Debias0.0060.0180.0200.002 / 0.001
MABEL0.0110.0460.0130.004 / 0.004
PT0.0180.0160.0240.001 / 0.001
Co2PT (ours)0.0090.0560.0010.001 / 0.000
", + "bbox": [ + 510, + 546, + 880, + 681 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Table 8: Results standard deviation on Bias-STS-B. $\\star$ : the backbone models are BERT-large-uncased.", + "bbox": [ + 507, + 690, + 882, + 720 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "D Visualization of Bias Mitigation Effects along Epochs", + "text_level": 1, + "bbox": [ + 507, + 747, + 880, + 780 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "We visualize the changes of bias scores along epochs in Figure 5. The bias score of PT keeps increasing as the Pearson score increases, while $\\mathrm{Co}^2\\mathrm{PT}$ consistently maintains a low bias score, which indicates the effectiveness of $\\mathrm{Co}^2\\mathrm{PT}$ on bias mitigation.", + "bbox": [ + 507, + 789, + 880, + 885 + ], + "page_idx": 11 + }, + { + "type": "page_footnote", + "text": "$^{2}$ https://github.com/huggingface/datasets. Apache License 2.0.", + "bbox": [ + 112, + 731, + 443, + 756 + ], + "page_idx": 11 + }, + { + "type": "page_footnote", + "text": "3The data is downloaded through https://github. com/shauli-ravfogel/nullspace_projection/blob/ master/download_data.sh MIT License.", + "bbox": [ + 112, + 757, + 487, + 793 + ], + "page_idx": 11 + }, + { + "type": "page_footnote", + "text": "4The checkpoints of these two models are from https:// github.com/google-research-datasets/Zari. Apache2.0 license.", + "bbox": [ + 112, + 794, + 487, + 829 + ], + "page_idx": 11 + }, + { + "type": "page_footnote", + "text": "5The checkpoints are from https://github.com/kanekomasahiro/context-debias.MIT license.", + "bbox": [ + 112, + 831, + 485, + 854 + ], + "page_idx": 11 + }, + { + "type": "page_footnote", + "text": "6The checkpoints are from https://github.com/Irenehere/Auto-Debias.", + "bbox": [ + 112, + 856, + 485, + 879 + ], + "page_idx": 11 + }, + { + "type": "page_footnote", + "text": "7The checkpoints are from https://huggingface.co/princeton-nlp/mabel-bert-base-uncased MIT License.", + "bbox": [ + 112, + 879, + 485, + 904 + ], + "page_idx": 11 + }, + { + "type": "page_footnote", + "text": "8https://github.com/huggingface", + "bbox": [ + 134, + 904, + 371, + 917 + ], + "page_idx": 11 + }, + { + "type": "page_number", + "text": "5870", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 11 + }, + { + "type": "table", + "img_path": "images/c13ff4c4c6a70d1aa5e222b79f169317ba19c9ecfce9c6723c51c2c796b6af88.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.0270.0420.0410.0360.002
BERT+CDA0.0120.0100.0100.0020.003
ZariCDA*0.0820.0810.0820.0970.001
ZariDO*0.0780.0830.0830.0930.001
Context-Debias0.0300.0460.0460.0500.001
Auto-Debias0.0100.0190.0190.0120.002
MABEL0.0180.0030.0020.0140.001
PT0.0230.0320.0310.0280.001
Co2PT (ours)0.0160.0210.0220.0270.004
", + "bbox": [ + 115, + 86, + 485, + 219 + ], + "page_idx": 12 + }, + { + "type": "table", + "img_path": "images/f0d3961ee9c9eca7805ef2427e488d506f1b0c24c913d2cfff76ac98db81cebd.jpg", + "table_caption": [ + "Table 9: Results standard deviation on Bias-NLI. $\\star$ : the backbone models are BERT-large-uncased." + ], + "table_footnote": [], + "table_body": "
ModelGAPTPR↓GAPRMS↓Acc.
BERT0.1380.0040.001
BERT+CDA0.0340.0010.002
ZariCDA*0.0690.0060.000
ZariDO*0.0740.0100.003
Context-Debias0.0530.0060.003
Auto-Debias0.1460.0040.002
MABEL0.1140.0060.001
PT0.0660.0050.001
Co2PT (ours)0.0250.0050.007
", + "bbox": [ + 132, + 274, + 468, + 400 + ], + "page_idx": 12 + }, + { + "type": "table", + "img_path": "images/2df71c9a5a48c52104a29ab512482c8dc7dbe749222f4fb6f1513064fb022fdb.jpg", + "table_caption": [ + "Table 10: Results standard deviation on Bias-in-Bios. $\\star$ : the backbone models are BERT-large-uncased." + ], + "table_footnote": [], + "table_body": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.0420.0520.0980.005 / 0.005
+ Co2PT0.0310.1940.0110.000 / 0.001
Auto-Debias0.0060.0180.0200.002 / 0.001
+ Co2PT0.0080.0370.0050.002 / 0.002
MABEL0.0110.0460.0130.004 / 0.004
+ Co2PT0.0210.1030.0230.000 / 0.000
", + "bbox": [ + 115, + 456, + 485, + 550 + ], + "page_idx": 12 + }, + { + "type": "table", + "img_path": "images/5e5ccdf3be3b20f9f3cd0eefcb57e9da042bf3e6d6492bb1f60a2c46e51d09f0.jpg", + "table_caption": [ + "Table 11: Performance of integrating $\\mathrm{Co}^2\\mathrm{PT}$ with debiased models on Bias-STS-B." + ], + "table_footnote": [], + "table_body": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.0180.0160.0240.001 / 0.001
PT+CDA0.0080.0080.0070.000 / 0.000
PT+SCL0.0250.0560.0390.000 / 0.000
Co2PT+SCLn0.0230.0940.0330.001 / 0.001
PT+NLI+CL0.0130.0700.0120.001 / 0.001
PT+NLI+CLp0.0250.0420.0530.001 / 0.001
PT+CDA+CLp0.0300.0310.0510.001 / 0.002
Co2PT (avg.)0.0320.0220.0400.001 / 0.000
Co2PT (PT+CDA+CL)0.0090.0560.0010.001 / 0.000
", + "bbox": [ + 115, + 607, + 485, + 726 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Table 12: Results standard deviation of ablation study.", + "bbox": [ + 115, + 736, + 484, + 751 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/a9a868c80c17f215d1b0942e00cc044b97b695427562aed0245759b6282e1229.jpg", + "image_caption": [ + "Figure 5: Visualization of bias mitigation effects and model performance along epochs." + ], + "image_footnote": [], + "bbox": [ + 119, + 770, + 480, + 868 + ], + "page_idx": 12 + }, + { + "type": "page_number", + "text": "5871", + "bbox": [ + 480, + 928, + 517, + 940 + ], + "page_idx": 12 + } +] \ No newline at end of file diff --git a/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_model.json b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7a170133bc05edcc148392739ee7489a06c9de6a --- /dev/null +++ b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_model.json @@ -0,0 +1,2349 @@ +[ + [ + { + "type": "title", + "bbox": [ + 0.164, + 0.091, + 0.838, + 0.133 + ], + "angle": 0, + "content": "\\(\\mathrm{Co}^{2}\\mathrm{PT}\\): Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning" + }, + { + "type": "text", + "bbox": [ + 0.149, + 0.156, + 0.852, + 0.173 + ], + "angle": 0, + "content": "Xiangjue Dong\\(^{1}\\) Ziwei Zhu\\(^{2}\\) Zhuoer Wang\\(^{1}\\) Maria Teleki\\(^{1}\\) James Caverlee\\(^{1}\\)" + }, + { + "type": "text", + "bbox": [ + 0.278, + 0.174, + 0.725, + 0.19 + ], + "angle": 0, + "content": "\\(^{1}\\) Texas A&M University \\(^{2}\\) George Mason University" + }, + { + "type": "text", + "bbox": [ + 0.262, + 0.192, + 0.742, + 0.206 + ], + "angle": 0, + "content": "{xj.dong, wang, mariateleki, caverlee}@tamu.edu zzhu20@gmu.edu" + }, + { + "type": "title", + "bbox": [ + 0.262, + 0.253, + 0.341, + 0.269 + ], + "angle": 0, + "content": "Abstract" + }, + { + "type": "text", + "bbox": [ + 0.145, + 0.283, + 0.461, + 0.54 + ], + "angle": 0, + "content": "Pre-trained Language Models are widely used in many important real-world applications. However, recent studies show that these models can encode social biases from large pre-training corpora and even amplify biases in downstream applications. To address this challenge, we propose \\(\\mathrm{Co}^2\\mathrm{PT}\\), an efficient and effective debiaswhile-prompt tuning method for mitigating biases via counterfactual contrastive prompt tuning on downstream tasks. Our experiments conducted on three extrinsic bias benchmarks demonstrate the effectiveness of \\(\\mathrm{Co}^2\\mathrm{PT}\\) on bias mitigation during the prompt tuning process and its adaptability to existing upstream debiased language models. These findings indicate the strength of \\(\\mathrm{Co}^2\\mathrm{PT}\\) and provide promising avenues for further enhancement in bias mitigation on downstream tasks." + }, + { + "type": "title", + "bbox": [ + 0.116, + 0.554, + 0.26, + 0.57 + ], + "angle": 0, + "content": "1 Introduction" + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.582, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Pre-trained language models (PLMs) are widely used in many real-world applications, demonstrating remarkable performance (Devlin et al., 2019; Brown et al., 2020). However, it has been demonstrated that PLMs encode unfair social biases in their parameters based on their pre-training step over large-scale text corpora (May et al., 2019). Furthermore, these biases – for example, based on gender, race, or religion – can easily propagate to the downstream tasks that use these PLMs (Kaneko and Bollegala, 2021). For example, “She is a nurse” can have a higher conditional likelihood than “He is a nurse” in the language modeling task, and “nurse” can have higher coreference scores to “she” than “he” in the coreference resolution task (Lu et al., 2020). Considering that NLP applications like machine translation systems, resume filtering systems, dialogue systems, and speech recognition (Tatman, 2017) are widely used by millions of users globally, it is crucial to mitigate the social biases present in PLMs and strive for models that" + }, + { + "type": "text", + "bbox": [ + 0.511, + 0.254, + 0.883, + 0.301 + ], + "angle": 0, + "content": "will not propagate discriminatory predictions or offensive outputs towards specific groups before being deployed." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.304, + 0.885, + 0.56 + ], + "angle": 0, + "content": "Much prior effort has focused primarily on debiasing the representations learned during the pretraining process, e.g., through projection (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), further pre-training on unbiased external corpora (Webster et al., 2020; Lauscher et al., 2021; He et al., 2022), or finetuning to debias (Cheng et al., 2021; Guo et al., 2022). The effectiveness of such debiasing efforts is typically measured on intrinsic benchmarks like SEAT (Sentence Encoding Association Test) which computes the association between demographic terms (e.g., woman, man) and stereotype terms (e.g., science, art). An unbiased model should display no difference in the similarity between the representations of these terms (May et al., 2019)." + }, + { + "type": "text", + "bbox": [ + 0.511, + 0.564, + 0.884, + 0.868 + ], + "angle": 0, + "content": "While these existing approaches help reduce social biases under intrinsic measures, these debias-then-finetune methods are based on the hypothesis that if an upstream model is unbiased, it will also preserve its fairness effects on downstream tasks during the fine-tuning process. However, recent research investigating the relationship between intrinsic and extrinsic benchmarks (which evaluate fairness in downstream applications) finds these two benchmarks correlate weakly (Kaneko et al., 2022). Furthermore, they observe that models, even after being debiased, tend to re-acquire or even amplify biases (e.g., instance-related biases and label-related biases) during the fine-tuning process on downstream tasks (Zhao et al., 2017; Leino et al., 2019). Thus, this mismatch leads to our motivating research question - How can we develop an efficient and effective method to mitigate bias on downstream tasks?" + }, + { + "type": "text", + "bbox": [ + 0.513, + 0.872, + 0.884, + 0.919 + ], + "angle": 0, + "content": "To answer the aforementioned question, we propose \\(\\mathrm{Co}^2\\mathrm{PT}\\), a debias-while-prompt tuning approach through Counterfactual Contrastive Prompt" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5859" + }, + { + "type": "footer", + "bbox": [ + 0.218, + 0.946, + 0.779, + 0.973 + ], + "angle": 0, + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5859-5871 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.219, + 0.085, + 0.789, + 0.237 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.112, + 0.252, + 0.883, + 0.296 + ], + "angle": 0, + "content": "Figure 1: The overview of \\(\\mathrm{Co}^2\\mathrm{PT}\\). First, we construct counterfactual pairs from the training data. Then, we learn debiased continuous prompts by simultaneously optimizing prompt tuning loss \\(\\mathcal{L}_{pt}\\) on downstream tasks and contrastive loss \\(\\mathcal{L}_{cl}\\) between the counterfactual pairs." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.314, + 0.49, + 0.748 + ], + "angle": 0, + "content": "Tuning. In this method, we first freeze all parameters of the PLM and add tunable continuous prompts for every layer. Unlike the previous debias-then-finetune methods that require expensive re-training of the original PLM and risk knowledge forgetting, this deep prompt tuning framework saves computational and memory resources while preserving the original pre-trained knowledge and language modeling ability (Li and Liang, 2021; Liu et al., 2022). To ensure that a fair system generates unbiased results regardless of the demographic terms used, we construct counterfactual pairs directly from the training data, eliminating the need for external corpora that heavily depend on their quality for debiasing. Specifically, we replace demographic terms associated with either the dominant or minoritized group in the training data with terms representing the opposite group. Then, we integrate the ability to mitigate bias into the prompt parameters through a contrastive objective between counterfactual pairs while maintaining the parameters of PLMs frozen. \\(\\mathrm{Co}^2\\mathrm{PT}\\) can be integrated into existing debiased models to help them mitigate biases on downstream tasks and offer flexibility in addressing different kinds of bias. These advantages establish \\(\\mathrm{Co}^2\\mathrm{PT}\\) as an efficient and effective method for mitigating bias in downstream tasks." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.75, + 0.489, + 0.799 + ], + "angle": 0, + "content": "In conclusion, the proposed \\(\\mathrm{Co}^2\\mathrm{PT}\\) mitigates bias on downstream tasks through prompt tuning, making the following contributions:" + }, + { + "type": "text", + "bbox": [ + 0.123, + 0.803, + 0.486, + 0.851 + ], + "angle": 0, + "content": "- \\(\\mathrm{Co}^{2}\\mathrm{PT}\\) achieves time and memory efficiency without requiring access to an external corpus or retraining the entire model." + }, + { + "type": "text", + "bbox": [ + 0.124, + 0.855, + 0.49, + 0.918 + ], + "angle": 0, + "content": "- Over three extrinsic bias benchmarks, we show that \\(\\mathrm{Co}^{2}\\mathrm{PT}\\) effectively mitigates bias amplified during the prompt tuning process on downstream tasks." + }, + { + "type": "list", + "bbox": [ + 0.123, + 0.803, + 0.49, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.314, + 0.883, + 0.378 + ], + "angle": 0, + "content": "- Furthermore, \\(\\mathrm{Co}^{2}\\mathrm{PT}\\) can be extended to existing debiased language models, effectively bridging the gap between debiased upstream models and downstream tasks." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.393, + 0.666, + 0.408 + ], + "angle": 0, + "content": "2 Related Work" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.421, + 0.886, + 0.919 + ], + "angle": 0, + "content": "Several approaches have been proposed for debiasing pre-trained language models such as projection-based methods (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), post-hoc text generation techniques (Schick et al., 2021), adversarial methods (Han et al., 2021), fin-tuning on biased prompts (Guo et al., 2022), with contrastive objective (Cheng et al., 2021) or with augmented data (Zhao et al., 2018), additional pretraining methods on re-balanced corpus through counterfactual data augmentation (Webster et al., 2020; Lauscher et al., 2021; Meade et al., 2022) or with a contrastive objective on gender-balanced entailment pairs (He et al., 2022), using dropout regularization (Webster et al., 2020), through parameter-efficient methods (Lauscher et al., 2021; Yang et al., 2022; Xie and Lukasiewicz, 2023) or with a contrastive objective (Li et al., 2023). While some works do not require access to an external corpus or do not require retraining the entire model, most prior methods primarily focus on mitigating bias within the model's intrinsic characteristics and evaluate the effectiveness of bias mitigation through intrinsic bias benchmarks, e.g., SEAT (May et al., 2019), StereoSet (Nadeem et al., 2021), and CrowS-Pairs (Nangia et al., 2020). Subsequently, they fine-tune the debiased models on downstream tasks and demonstrate that their debiased models retain the language modeling ability and the performance on downstream tasks or extrinsic bias benchmarks, which evaluate fairness in downstream tasks by" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.522, + 0.941 + ], + "angle": 0, + "content": "5860" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.49, + 0.117 + ], + "angle": 0, + "content": "testing whether the models exhibit different performances among different populations." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.118, + 0.49, + 0.278 + ], + "angle": 0, + "content": "Nevertheless, recent research shows that these debias-then-finetune methods will re-acquire or even amplify biases during the fine-tuning process on downstream tasks and that intrinsic and extrinsic evaluation bias benchmarks correlate poorly (Goldfarb-Tarrant et al., 2021; Cao et al., 2022; Kaneko et al., 2022). They encourage researchers to focus directly on extrinsic measures of bias of specific applications when addressing bias mitigation (Goldfarb-Tarrant et al., 2021)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.279, + 0.49, + 0.473 + ], + "angle": 0, + "content": "Thus, we focus in this paper on mitigating bias on downstream tasks and evaluate using extrinsic evaluation benchmarks directly. In addition, different from the previous methods requiring further pre-training on the counterfactually augmented sentences from an external corpus, e.g., English Wikipedia (Zmigrod et al., 2019; Webster et al., 2020; Meade et al., 2022), BookCorpus (Lauscher et al., 2021), News-Commentary v15 (Yang et al., 2022) or NLI (He et al., 2022), our methods achieve time and memory efficiency by eliminating the need for external corpus access or model retraining." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.485, + 0.472, + 0.52 + ], + "angle": 0, + "content": "3 Co²PT: Debiasing via Counterfactual Contrastive Prompt Tuning" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.529, + 0.49, + 0.643 + ], + "angle": 0, + "content": "We propose \\(\\mathrm{Co}^2\\mathrm{PT}\\), a debias-while-prompt tuning parameter-efficient method for mitigating biases on downstream tasks via counterfactual contrastive prompt tuning, presented in Figure 1. Concretely, \\(\\mathrm{Co}^2\\mathrm{PT}\\) mitigates bias in PLMs by leveraging counterfactual pairs from training data to produce debiased representations during prompt tuning." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.646, + 0.491, + 0.919 + ], + "angle": 0, + "content": "Deep Prompt Tuning. First, we introduce the backbone framework of \\(\\mathrm{Co}^2\\mathrm{PT}\\) - deep prompt tuning. We incorporate continuous prompts as prefix tokens in every layer of the PLM. By doing this, we have more tunable task-specific parameters to enhance per-task capacity while maintaining parameter efficiency (Li and Liang, 2021; Liu et al., 2022; Wang et al., 2022; Dong et al., 2023a). Besides, it can achieve comparable performance to fine-tuning, outperforming methods that only add trainable continuous prompts into the input embedding layer (Lester et al., 2021; Liu et al., 2021), which underperform the fine-tuning methods, especially when the model size is not large (Liu et al., 2022). The prompt tuning loss of proposed \\(\\mathrm{Co}^2\\mathrm{PT}\\) on the downstream task is represented as \\(\\mathcal{L}_{pt}\\), e.g., cross-entropy loss for a classification task." + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.085, + 0.885, + 0.456 + ], + "angle": 0, + "content": "Counterfactual Pairs Construction. Then, the first key question is: how to interject the debiasing capability into the continuous prompts? An unbiased model should make the same predictions independent of the bias-attribute term, thus we apply counterfactual data augmentation to generate counterparts of training examples from the training data during prompt tuning. Concretely, let \\( S \\) represent the training corpus and let \\( W = \\{(w_{1}, w_{2}, \\ldots, w_{m})^{i}\\}_{i=1}^{N} \\) be a set of \\( N \\) bias-attribute term pairs. For each sentence \\( s_{i} \\) in \\( S \\) and each pair \\( (w_{1}, w_{2}, \\ldots, w_{m}) \\) in \\( W \\), for any \\( w_{i} \\) in \\( s \\), we replace it with the term along the opposite bias direction. Take the binary-gender debiasing task shown in Figure 1 for example, the bias-attribute terms are { (man, woman), (he, she), ... } . The \"man\" is in the input sentence \"The man is playing the piano\". We replace it with \"woman\" while leaving non-attribute words unchanged. Then the counterfactually augmented sentence is \"The woman is playing the piano\", and vice versa. The obtained counterfactual sentence of the original sentence \\( s_{i} \\) is denoted as \\( s_{i}' \\)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.459, + 0.885, + 0.844 + ], + "angle": 0, + "content": "Counterfactual Contrastive Learning. The counterfactual pairs construction allows us to achieve a balance in inputs containing bias-attribute terms. However, how can we ensure that our model generates consistent predictions for both \\( s_i \\) and \\( s_i' \\), which possess similar semantic meaning but differ in bias direction? To make the model generate predictions independent of biased attributes, it is important for sentences with similar semantics but along different bias directions to be closer (Cheng et al., 2021; He et al., 2022). We apply contrastive learning, of which the objective is to obtain meaningful representations by bringing semantically similar neighbors closer and pushing apart the dissimilar neighbors (Gao et al., 2021; Dong et al., 2023b; Li et al., 2023). In this work, input sentence \\( s_i \\) and its counterpart \\( s_i' \\) are semantically related but in opposite bias directions. We let \\( \\mathbf{h}_i \\) and \\( \\mathbf{h}_i' \\) denote the representations of \\( s_i \\) and \\( s_i' \\) and then concatenate with the continuous prompt representation \\( \\mathbf{p} \\) as positive pairs. Then we take the cross-entropy objective with in-batch negatives (Gao et al., 2021). The training objective for \\( (\\mathbf{h}_i, \\mathbf{h}_i') \\) with a mini-batch of \\( N \\) pairs is:" + }, + { + "type": "equation", + "bbox": [ + 0.557, + 0.853, + 0.884, + 0.896 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {c l} = - \\log \\frac {e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} , \\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {\\prime}\\right) / \\tau}}{\\sum_ {j = 1} ^ {N} e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} , \\mathbf {p} \\oplus \\mathbf {h} _ {j} ^ {\\prime}\\right) / \\tau}}, \\tag {1}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.904, + 0.883, + 0.92 + ], + "angle": 0, + "content": "where \\(\\mathrm{sim}(\\mathbf{x}_i,\\mathbf{y}_i)\\) is the cosine similarity of \\(\\mathbf{x}_i\\) and" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.519, + 0.941 + ], + "angle": 0, + "content": "5861" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.084, + 0.49, + 0.134 + ], + "angle": 0, + "content": "\\(\\mathbf{y}_i\\): \\(\\mathrm{sim}(\\mathbf{x}_i,\\mathbf{y}_i) = \\mathbf{x}_i^\\top \\mathbf{y}_i / \\| \\mathbf{x}_i\\| \\| \\mathbf{y}_i\\|\\), \\(\\oplus\\) is the concatenation of two representations, and \\(\\tau\\) is a temperature hyperparameter." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.135, + 0.49, + 0.327 + ], + "angle": 0, + "content": "For counterfactual pairs \\((s_i, s_i')\\) in the single-sentence classification task, \\(s_i\\) is the original sentence from the training data and \\(s_i'\\) is the augmented sentence that has the same semantic meaning as \\(s_i\\) but in a different bias direction. For sentence-pair classification, like in the SNLI task, with \\(x_i\\) as the premise and \\(y_i\\) as the hypothesis, \\(s_i\\) is the original premise-hypothesis pair \\((x_i, y_i)\\) while \\(s_i'\\) is the counterfactual augmented premise-hypothesis pair \\((x_i', y_i')\\). Similarly, the sentence representations are concatenated with continuous prompts to calculate the contrastive loss through Equation 1." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.333, + 0.49, + 0.412 + ], + "angle": 0, + "content": "Learning Objectives. Finally, the continuous prompts learn-to-debias by simultaneously optimizing the prompt tuning loss \\(\\mathcal{L}_{pt}\\) on downstream tasks and contrastive loss \\(\\mathcal{L}_{cl}\\) between the counterfactual pairs:" + }, + { + "type": "equation", + "bbox": [ + 0.235, + 0.429, + 0.488, + 0.446 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} = \\mathcal {L} _ {p t} + \\alpha \\mathcal {L} _ {c l}, \\tag {2}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.46, + 0.49, + 0.733 + ], + "angle": 0, + "content": "where \\(\\alpha\\) is a tunable coefficient hyperparameter. As stated before, we only tune the parameters of the debiasing continuous prompts while maintaining the parameters of PLMs frozen throughout the training. After the counterfactual contrastive prompt tuning, the debiasing knowledge is stored in the prompt parameters. This approach not only retains the knowledge within the original parameters of PLMs but is also flexible and adaptable to different downstream tasks. For example, we can train different prompts for different bias dimensions such as gender, race, and religion. These prompts can then be combined and applied to downstream tasks. Moreover, considering that prior research primarily concentrates on binary gender, it is more efficient to extend its application to non-binary gender without requiring re-training new debiased models." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.748, + 0.322, + 0.765 + ], + "angle": 0, + "content": "4 Experimental Setup" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.775, + 0.49, + 0.919 + ], + "angle": 0, + "content": "We design experiments to test the effectiveness of our proposed \\(\\mathrm{Co}^2\\mathrm{PT}\\) approach toward answering four questions: RQ1: Will \\(\\mathrm{Co}^2\\mathrm{PT}\\) mitigate bias on downstream tasks effectively? RQ2: How will the existing intrinsic debiased methods perform on the downstream tasks when they are combined with \\(\\mathrm{Co}^2\\mathrm{PT}\\)? RQ3: What impact do different modules have on the design of \\(\\mathrm{Co}^2\\mathrm{PT}\\)? RQ4: How do hyperparameters affect \\(\\mathrm{Co}^2\\mathrm{PT}\\)?" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.085, + 0.681, + 0.099 + ], + "angle": 0, + "content": "4.1 Bias Evaluation" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.106, + 0.885, + 0.185 + ], + "angle": 0, + "content": "Extrinsic bias benchmarks assess bias via performance gap between different groups in downstream tasks. In this work, we evaluate \\(\\mathrm{Co}^2\\mathrm{PT}\\) on three widely used extrinsic bias benchmarks: Bias-STSB, Bias-NLI, and Bias-in-Bios." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.189, + 0.885, + 0.51 + ], + "angle": 0, + "content": "Bias-STS-B (Webster et al., 2020) is adapted from the STS-B task to evaluate gendered correlations, which requires models to predict the semantic similarity between pairs of sentences. Specifically, 276 sentences are collected from the test set as templates and then gendered terms (man, woman) and professional terms from Rudinger et al. (2018) are inserted into each template, forming 16,980 sentence pairs. For instance, if the template is \"A man is walking\", then the sentence pairs are (\"A man is walking\", \"A nurse is walking\") and (\"A woman is walking\", \"A nurse is walking\"). If a model is unbiased towards gender terms, it should assign equal similarity scores to both pairs. We calculate the average absolute difference between the similarity scores of sentence pairs containing male and female terms, and how often the difference between \"male\" and \"female\" sentence pairs \\(> \\tau\\), where we report the results for \\(\\tau = 0.1\\) and \\(\\tau = 0.3\\) (Webster et al., 2020). A lower value indicates less bias." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.515, + 0.885, + 0.883 + ], + "angle": 0, + "content": "Bias-NLI (Dev et al., 2020) is a natural language inference dataset consisting of neutral sentence pairs to evaluate the gender-occupation bias. It is constructed by populating the template: \"The subject verb a/an object\", leading to 1,936,512 instances. Concretely, the verb and object slots are filled with activities, e.g., ate a bagel. Then they create neutral entailment pairs by filling the subject slot with an occupation term with a strong gender correlation, e.g., \"nurse\", for the hypothesis, and \"woman\", for the premise, resulting in the instance: The woman ate a bagel; The nurse ate a bagel. neutral. Bias is defined as deviation from neutrality and measured by three metrics: (1) Net Neutral (NN): the average probability that the model assigns a neutral label for all instances, (2) Fraction Neutral (FN): the percentage of instances that the model predicts the neutral label and (3) Threshold: \\(\\tau\\) (T: \\(\\tau\\)): the fraction of examples whose probability of neutral are above \\(\\tau\\). We report the results for \\(\\tau = 0.5\\) and \\(\\tau = 0.7\\) following (Lauscher et al., 2021; He et al., 2022). All three metrics will attain 1 for a bias-free model." + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.888, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Bias-in-Bios (De-Arteaga et al., 2019) is a large-scale English dataset studying gender bias in oc" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5862" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.49, + 0.198 + ], + "angle": 0, + "content": "cupation classification from the Common Crawl corpus. We report the overall accuracy of the task as well as the accuracy breakdown based on gender. To quantify gender bias, we compute the difference in true positive rates (TPR) between genders across various occupations, denoted as \\(\\mathrm{GAP}_{g}^{\\mathrm{TPR}}\\) and defined as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.186, + 0.206, + 0.49, + 0.228 + ], + "angle": 0, + "content": "\\[\n\\mathrm {G A P} _ {g} ^ {\\mathrm {T P R}} = \\left| \\mathrm {T P R} _ {g} - \\mathrm {T P R} _ {\\sim g} \\right|, \\tag {3}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.234, + 0.491, + 0.346 + ], + "angle": 0, + "content": "where \\(\\mathrm{TPR}_g\\) represents the proportion of individuals correctly predicted given their gender \\(g\\), and \\(g\\) and \\(\\sim g\\) are binary genders. Following (Romanov et al., 2019; Ravfogel et al., 2020; He et al., 2022), we also calculate the root mean square of the per-occupation TPR gender gap \\(\\mathrm{GAP}_{g,o}^{\\mathrm{TPR}}\\) over all occupations \\(o\\):" + }, + { + "type": "equation", + "bbox": [ + 0.166, + 0.355, + 0.489, + 0.397 + ], + "angle": 0, + "content": "\\[\n\\mathrm {G A P} _ {g} ^ {\\mathrm {R M S}} = \\sqrt {\\frac {1}{| O |} \\sum_ {o \\in O} \\left(\\mathrm {G A P} _ {g , o} ^ {\\mathrm {T P R}}\\right) ^ {2}}. \\tag {4}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.405, + 0.49, + 0.421 + ], + "angle": 0, + "content": "A value closer to 0 indicates a lower degree of bias." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.431, + 0.313, + 0.447 + ], + "angle": 0, + "content": "4.2 Datasets and Setup" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.452, + 0.49, + 0.66 + ], + "angle": 0, + "content": "STS-B and SNLI. We fine-tune the models on SNLI and STS-B training sets and pick the one that performs best on the validation set and then evaluate bias using Bias-STS-B and Bias-NLI, respectively. Bias-in-Bios. We use the same data as Ravfogel et al. (2020) which contains 393,423 biographies and 28 profession classes. We split train/validation/test by 65/25/10 following (De-Arteaga et al., 2019; Ravfogel et al., 2020). The dataset statistics are shown in Table 1. For SNLI and Bias-in-Bios, we report accuracy over classification while we report the Pearson and Spearman correlations for STS-B." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.671, + 0.29, + 0.685 + ], + "angle": 0, + "content": "4.3 Baseline Models" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.691, + 0.491, + 0.821 + ], + "angle": 0, + "content": "We compare \\(\\mathrm{Co}^2\\mathrm{PT}\\) with six upstream debiased models fine-tuned on the downstream tasks, and three baselines fine-tune or prompt-tune BERT models on the downstream tasks: ZariCDA (Webster et al., 2020) is pre-trained from scratch over counterfactual data augmented from English Wikipedia and ZariDO (Webster et al., 2020) is additionally pre-trained with increased dropout rate." + }, + { + "type": "table", + "bbox": [ + 0.134, + 0.838, + 0.47, + 0.891 + ], + "angle": 0, + "content": "
TrainValidationBias-Test
STS-B5,7491,50016,980
SNLI550,15210,0001,936,512
Bias-in-Bios255,71039,36998,344
" + }, + { + "type": "table_caption", + "bbox": [ + 0.21, + 0.9, + 0.39, + 0.914 + ], + "angle": 0, + "content": "Table 1: Dataset statistics." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.472 + ], + "angle": 0, + "content": "ADELE and its variant ADELE-TA (Lauscher et al., 2021) inject and train debiased adapters via masked language modeling on the counterfactually augmented corpus. Context-Debias (Kaneko and Bollegala, 2021) is fine-tuned via an inner-product loss and squared distance loss. Auto-Debias (Guo et al., 2022) uses a beam search to search for biased prompts and then uses these biased prompts to finetune PLMs by minimizing the disagreement between predicted [MASK] token distributions. MA-BEL (He et al., 2022) is additionally pre-trained on all entailment pairs that contain gendered terms from SNLI and MNLI data with a contrastive loss, an alignment loss, and an optional masked language modeling loss. BERT (Devlin et al., 2019) is a fine-tuned BERT model on the downstream tasks while BERT+CDA is a fine-tuned BERT model on the counterfactually augmented data from the training sets. PT (Liu et al., 2022) adds continuous prompts to each layer of the models and then tunes the prompts on downstream tasks. The backbone models for ZariCDA and ZariDO are BERT-large-uncased whereas other baselines are BERT-base-uncased (Devlin et al., 2019).1" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.494, + 0.742, + 0.51 + ], + "angle": 0, + "content": "4.4 Implementation Details" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.521, + 0.884, + 0.86 + ], + "angle": 0, + "content": "For fine-tuning debiased baselines and vanilla BERT, we use the models released by the authors. We set the max length of the sentence to be 128, the learning rate to be \\(2e - 5\\), the batch size to be 64, and train for 10 epochs. For \\(\\mathrm{AT + CDA}\\), learning rate is 2e-5 and batch size is 128. For PT and \\(\\mathrm{Co}^2\\mathrm{PT}\\), the backbone models are bert-base-uncased with the learning rate set to \\(1e - 2\\) and the prompt length set to 20 and are trained for 30 epochs. The batch size is set to 32. For hyperparameters \\(\\tau\\) and \\(\\alpha\\) in Equation 1 and 2, we set \\(\\tau = 0.05\\) and \\(\\alpha = 1.0\\). All experiments are run on a single NVIDIA RTX A5000 24GB GPU. For each run, we save the model that performs the best on the development set and evaluate it on extrinsic benchmarks. We report the average results across three runs. All code and data are available at https://github.com/dongxiangjue/Co2PT; additional experimental details and standard deviations are in Appendix A and Appendix C, respectively." + }, + { + "type": "page_footnote", + "bbox": [ + 0.509, + 0.881, + 0.883, + 0.918 + ], + "angle": 0, + "content": "1We keep the results of these two BERT-large-uncased checkpoints since Lauscher et al. (2021) also compares these methods with their BERT-base-uncased method." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5863" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.115, + 0.084, + 0.411, + 0.101 + ], + "angle": 0, + "content": "5 Debiasing Effectiveness (RQ1)" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.109, + 0.49, + 0.143 + ], + "angle": 0, + "content": "We now investigate the effectiveness of \\(\\mathrm{Co}^2\\mathrm{PT}\\) in mitigating bias on three extrinsic bias benchmarks." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.162, + 0.492, + 0.644 + ], + "angle": 0, + "content": "Bias-STS-B. First, we focus on the Bias-STS-B benchmark. As Table 2 indicates, \\(\\mathrm{Co}^2\\mathrm{PT}\\) shows the lowest bias scores across all metrics and achieves similar model performance on downstream tasks as the other debiased baselines. We observe that some debiased models exhibit higher bias scores than the original BERT, indicating that debiased language models can relearn biases during fine-tuning on downstream tasks. For example, AutoDebias, one of the state-of-the-art debiased models, demonstrates strong fairness on intrinsic benchmarks, such as SEAT, scores 0.312 in average absolute difference, showing a higher bias level than the original BERT and most of the other baselines. On the other hand, MABEL, which shows strong performance in debiasing downstream tasks, achieves a competitive score of 0.081. Furthermore, compared to fine-tuning the original BERT model on the STS-B training set, PT results in a higher bias score of 0.321 compared to 0.282. This suggests that while fine-tuning only the number of prompt tokens may be parameter efficient, it can result in increased bias due to the presence of an unbalanced dataset. For \\(\\mathrm{Co}^2\\mathrm{PT}\\), we observe a significant reduction in the bias score with the average absolute difference decreasing from 0.321 to 0.058, from 0.749 to 0.167 when the difference exceeds 0.1, and from 0.369 to 0.005 when the difference exceeds 0.3. These findings indicate a substantial improvement in the ability to mitigate bias." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.648, + 0.49, + 0.698 + ], + "angle": 0, + "content": "Bias-NLI. Next, we focus on the Bias-NLI extrinsic benchmark shown in Table 3. BERT+CDA, Context-Debias, and MABEL achieve lower bias" + }, + { + "type": "table", + "bbox": [ + 0.117, + 0.716, + 0.489, + 0.862 + ], + "angle": 0, + "content": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.2820.8670.4170.883 / 0.879
BERT+CDA0.1310.5110.0800.885 / 0.881
ZariCDA*0.1120.4450.0480.892 / 0.889
ZariDO*0.3470.9220.5850.880 / 0.878
ADELE†0.121--0.889 / -
Context-Debias0.3320.9160.5390.879 / 0.876
Auto-Debias0.3120.9020.5020.884 / 0.880
MABEL0.0660.2040.0130.889 / 0.885
PT0.3210.7490.3690.889 / 0.885
Co2PT (ours)0.0580.1670.0050.884 / 0.880
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.872, + 0.49, + 0.915 + ], + "angle": 0, + "content": "Table 2: Evaluation on Bias-STS-B. †: results are reported from the ADELE model in the original paper; \\(\\star\\): backbone model is BERT-large-uncased." + }, + { + "type": "table", + "bbox": [ + 0.512, + 0.081, + 0.885, + 0.242 + ], + "angle": 0, + "content": "
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.8240.8680.8670.8110.909
BERT+CDA0.8730.9420.9410.8940.905
ZariCDA*0.7860.8280.8260.7650.912
ZariDO*0.7470.7820.7790.7110.913
Context-Debias0.8730.9190.9190.8770.910
ADELE-TA†0.5040.557--0.813
AT+CDA‡0.6590.7990.7580.5100.849
Auto-Debias0.8130.8490.8480.7950.908
MABEL0.8530.8920.8910.8460.911
PT0.7410.8120.8080.7290.898
Co2PT (ours)0.8770.9650.9620.9050.886
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.251, + 0.885, + 0.336 + ], + "angle": 0, + "content": "Table 3: Evaluation on Bias-NLI. †: results are fine-tuned on MNLI and reported from the ADELE-TA model in the original paper; ‡: adapter tuning on counterfactually augmented data; ★: backbone model is BERT-large-uncased. Other baselines are fine-tuned on SNLI." + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.357, + 0.885, + 0.646 + ], + "angle": 0, + "content": "scores than the original BERT across all metrics while the other baseline methods amplify biases during the fine-tuning. Similarly, Auto-Debias performs well on the SEAT benchmark but experiences an increase in bias when applied to downstream tasks, mirroring the trend observed in the Bias-STS-B extrinsic benchmark. Moreover, ADELE, another parameter-efficient method, performs poorly in both bias mitigation and model accuracy. Similar to Bias-STS-B extrinsic benchmark, PT amplifies biases during the tuning process, resulting in a decline in the NN score from 0.824 to 0.741 and the FN score from 0.868 to 0.812. By employing \\(\\mathrm{Co}^2\\mathrm{PT}\\), we observe significant improvements with the NN score rising to 0.877 (from 0.741) and the FN score reaching 0.965 (from 0.812), indicating the effectiveness of \\(\\mathrm{Co}^2\\mathrm{PT}\\) on bias mitigation." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.654, + 0.884, + 0.718 + ], + "angle": 0, + "content": "Bias-in-Bios. Next we show the performance on the Bias-in-Bios benchmark in Table 4. Among all the baselines, the ZariCDA achieves the lowest \\(\\mathrm{GAP^{TPR}}\\) score of 2.667 while the BERT+CDA" + }, + { + "type": "table", + "bbox": [ + 0.528, + 0.736, + 0.866, + 0.862 + ], + "angle": 0, + "content": "
ModelGAPTPR↓GAPRMS↓Acc.
BERT2.8220.1190.830
BERT+CDA2.7580.1130.841
ZariCDA*2.6670.1350.848
ZariDO*2.7200.1350.847
Context-Debias3.0310.1190.831
Auto-Debias2.6900.1250.831
MABEL2.8390.1260.826
PT3.1710.1290.820
Co2PT (ours)2.5370.1230.824
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.872, + 0.883, + 0.915 + ], + "angle": 0, + "content": "Table 4: Evaluation on Bias-in-Bios. \\(\\star\\): backbone model is BERT-large-uncased. The results of ADELE on this benchmark are not reported in the original paper." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5864" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.084, + 0.49, + 0.213 + ], + "angle": 0, + "content": "achieves the lowest \\(\\mathrm{GAP^{RMS}}\\) score of 0.113. Furthermore, PT exacerbates bias and results in an increase in the \\(\\mathrm{GAP^{TPR}}\\) score from 2.822 to 3.171 and \\(\\mathrm{GAP^{RMS}}\\) from 0.119 to 0.129. In contrast, \\(\\mathrm{Co^{2}PT}\\) reduces the \\(\\mathrm{GAP^{TPR}}\\) score from 3.171 to 2.537 and \\(\\mathrm{GAP^{RMS}}\\) from 0.129 to 0.123, demonstrating its effectiveness in mitigating bias in the occupation classification task." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.225, + 0.431, + 0.259 + ], + "angle": 0, + "content": "6 Integrating \\(\\mathrm{Co}^2\\mathrm{PT}\\) with Existing Debiased Models (RQ2)" + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.268, + 0.49, + 0.59 + ], + "angle": 0, + "content": "One benefit of a prompt-then-finetune model like \\(\\mathrm{Co}^2\\mathrm{PT}\\) is that it can be easily integrated with existing upstream debiasing methods. Here we investigate the applicability of \\(\\mathrm{Co}^2\\mathrm{PT}\\) to three existing debiased models to bridge the gap in utilizing upstream debiased models for downstream tasks. Based on the comparison results – before and after applying \\(\\mathrm{Co}^2\\mathrm{PT}\\) – shown in Table 5, \\(\\mathrm{Co}^2\\mathrm{PT}\\) significantly reduces the bias scores for Context-Debias and Auto-Debias: 0.088 versus 0.332, and 0.068 versus 0.312, respectively. For MABEL, which achieves low bias scores, there is no significant effect on the bias score. Additionally, \\(\\mathrm{Co}^2\\mathrm{PT}\\) improves the model performance on the downstream tasks. These results clearly demonstrate the effectiveness of integrating \\(\\mathrm{Co}^2\\mathrm{PT}\\) into established debiased models for downstream tasks. This ability enables the existing debiased models to achieve strong performance on downstream tasks while simultaneously maintaining a low bias level." + }, + { + "type": "table", + "bbox": [ + 0.116, + 0.6, + 0.488, + 0.698 + ], + "angle": 0, + "content": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.3320.9160.5390.879 / 0.876
+ Co2PT0.0880.3610.0100.885 / 0.881
Auto-Debias0.3120.9020.5020.884 / 0.880
+ Co2PT0.0680.2310.0050.883 / 0.878
MABEL0.0660.2040.0130.889 / 0.885
+ Co2PT0.0680.2280.0050.892 / 0.889
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.705, + 0.49, + 0.734 + ], + "angle": 0, + "content": "Table 5: Performance of integrating \\(\\mathrm{Co}^2\\mathrm{PT}\\) with debiased models on Bias-STS-B." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.745, + 0.355, + 0.763 + ], + "angle": 0, + "content": "7 Impact of Design (RQ3)" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.771, + 0.489, + 0.835 + ], + "angle": 0, + "content": "We perform an extensive ablation study to show how different components affect \\(\\mathrm{Co}^{2}\\mathrm{PT}\\) in Table 6. We use Bias-STS-B as the representative task for computational efficiency." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.84, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Impact of counterfactual module. First, we perform counterfactual data augmentation on the training data containing bias-attribute terms. Then we conduct prompt tuning only on these augmented pairs (denoted as PT+CDA). PT+CDA reduces" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.166 + ], + "angle": 0, + "content": "the bias score from 0.321 in PT to 0.291, showing the effectiveness of the straightforward counterfactual data augmentation approach. However, the improvement is less than \\(\\mathrm{Co}^2\\mathrm{PT}\\), implying the necessity of the contrastive learning module." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.169, + 0.885, + 0.298 + ], + "angle": 0, + "content": "Impact of contrastive module. To investigate the impact of the contrastive module, instead of employing constructed counterfactual sentence pairs as positive pairs for contrastive loss, we use unsupervised contrastive loss by encoding the same input twice and get two embeddings with different dropout masks \\( z \\), \\( z' \\) (Gao et al., 2021). Then the contrastive objective becomes:" + }, + { + "type": "equation", + "bbox": [ + 0.537, + 0.307, + 0.884, + 0.363 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {s c l} = - \\log \\frac {e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i}} , \\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i} ^ {\\prime}}\\right) / \\tau}}{\\sum_ {j = 1} ^ {N} e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i}} , \\mathbf {p} \\oplus \\mathbf {h} _ {j} ^ {z _ {j} ^ {\\prime}}\\right) / \\tau}}, \\tag {5}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.371, + 0.884, + 0.45 + ], + "angle": 0, + "content": "which is optimized with the prompt tuning loss \\(\\mathcal{L}_{pt}\\) together (denoted as PT+SCL). PT+SCL surpasses both PT and PT+CDA by achieving a large reduction in bias score to 0.161, demonstrating the effectiveness of the contrastive module." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.455, + 0.884, + 0.679 + ], + "angle": 0, + "content": "Impact of adding contrastive loss for non-augmented inputs. In \\(\\mathrm{Co}^2\\mathrm{PT}\\), we only consider counterfactually augmented pairs in the contrastive module. To explore the necessity of including inputs without demographic terms in the contrastive module, we incorporate unsupervised contrastive loss for non-augmented input like Equation 5 as \\(\\mathcal{L}_{scl}'\\) and tuned with contrastive loss \\(\\mathcal{L}_{cl}\\) for counter-factly augmented pairs (Equation 1) and \\(\\mathcal{L}_{pt}'\\) (denoted as \\(\\mathrm{Co}^2\\mathrm{PT} + \\mathrm{SCL}_n\\)). The bias score of 0.117 achieved by \\(\\mathrm{Co}^2\\mathrm{PT} + \\mathrm{SCL}_n\\) is higher than \\(\\mathrm{Co}^2\\mathrm{PT}\\) and this indicates that incorporating a contrastive loss for non-augmented inputs in the training set is unnecessary." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.683, + 0.885, + 0.764 + ], + "angle": 0, + "content": "Compare \\(\\mathrm{Co}^2\\mathrm{PT}\\) with task-agnostic counterfactual pairs. To investigate whether integrating task-agnostic neutral entailment pairs can benefit debiasing on the task, we use 142,158 gender-balanced entailment pairs augmented from SNLI and MNLI" + }, + { + "type": "table", + "bbox": [ + 0.512, + 0.782, + 0.884, + 0.891 + ], + "angle": 0, + "content": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
PT+CDA0.2910.7470.3510.890 / 0.886
PT+SCL0.1610.5480.1330.883 / 0.878
Co2PT+SCLn0.1170.4670.0560.884 / 0.878
PT+NLI+CL0.0800.2800.0220.881 / 0.876
PT+NLI+CLp0.2070.6870.2220.884 / 0.881
PT+CDA+CLp0.2710.7250.3380.886 / 0.883
Co2PT (PT+CDA+CL)0.0580.1670.0050.884 / 0.880
" + }, + { + "type": "table_caption", + "bbox": [ + 0.556, + 0.9, + 0.835, + 0.915 + ], + "angle": 0, + "content": "Table 6: Impact of different components." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5865" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.49, + 0.246 + ], + "angle": 0, + "content": "datasets in He et al. (2022) as task-agnostic entailment pairs for STS-B task instead of using the task-specific counterfactual pairs augmented from the training set (denoted as \\(\\mathbf{PT} + \\mathbf{NLI} + \\mathbf{CL}\\)). We notice that although \\(\\mathrm{PT} + \\mathrm{NLI} + \\mathrm{CL}\\) does not outperform \\(\\mathrm{Co}^2\\mathrm{PT}\\), it shows a strong ability to mitigate bias compared to other baseline methods. Thus, when working on a moderate amount of training data, it is better to use counterfactually augmented pairs from the training data." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.25, + 0.49, + 0.507 + ], + "angle": 0, + "content": "Compare \\(\\mathrm{Co}^2\\mathrm{PT}\\) with other contrastive objective. For sentence-pair classification tasks, we also explore the contrastive loss that encourages the inter-association of entailment pairs (He et al., 2022). For the original input pair \\((s_{i1}, s_{i2})\\) and its augmented pair \\((s_{i1}'', s_{i2}')\\), \\(s_{i1}\\) and \\(s_{i2}\\) are treated as positive pairs while \\(s_{i1}\\) and \\(s_{i2}'\\) and other in-batch \\(s_{j2}\\) are negatives, and vice versa (denoted as \\(\\mathbf{CL_p}\\)). When using task-specific counterfactual pairs, \\(\\mathrm{PT + CDA + CL_p}\\) decreases the bias score to 0.271. Similarly, using task-agnostic counterfactual pairs, \\(\\mathrm{PT + NLI + CL_p}\\) also reduces the bias score to 0.271. However, the bias mitigation effect is not as significant as that achieved by \\(\\mathrm{Co}^2\\mathrm{PT}\\), which indicates the effectiveness of the contrastive module in \\(\\mathrm{Co}^2\\mathrm{PT}\\)." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.521, + 0.45, + 0.539 + ], + "angle": 0, + "content": "8 Impact of Hyperparameters (RQ4)" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.549, + 0.49, + 0.613 + ], + "angle": 0, + "content": "Finally, we investigate the impact of three hyperparameters: (i) the continuous prompt length; (ii) the temperature \\(\\tau\\) of contrastive loss \\(\\mathcal{L}_{cl}\\); and (iii) the coefficient \\(\\alpha\\) of total learning objective \\(\\mathcal{L}\\)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.618, + 0.49, + 0.747 + ], + "angle": 0, + "content": "Impact of prompt length. First, we experiment with the prompt length varying in \\(\\{10,20,50\\}\\), as illustrated in Figure 2. Generally speaking, with more tunable prompt parameters, the model performs better on downstream tasks. In addition, when the prompt length is \\(10\\), \\(\\mathrm{Co}^2\\mathrm{PT}\\) shows a higher increase in bias score compared to the prompt length of 20 and 50. This indicates that a" + }, + { + "type": "image", + "bbox": [ + 0.12, + 0.764, + 0.483, + 0.888 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.181, + 0.9, + 0.42, + 0.915 + ], + "angle": 0, + "content": "Figure 2: Impact of prompt length." + }, + { + "type": "image", + "bbox": [ + 0.515, + 0.085, + 0.878, + 0.208 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.532, + 0.22, + 0.86, + 0.236 + ], + "angle": 0, + "content": "Figure 3: \\(\\tau\\) in \\(\\{0.005, 0.05, 0.5\\}\\) while \\(\\alpha = 1.0\\)." + }, + { + "type": "image", + "bbox": [ + 0.515, + 0.244, + 0.878, + 0.369 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.54, + 0.381, + 0.851, + 0.396 + ], + "angle": 0, + "content": "Figure 4: \\(\\alpha\\) in \\(\\{0.1, 0.5, 1.0\\}\\) while \\(\\tau = 0.05\\)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.41, + 0.884, + 0.506 + ], + "angle": 0, + "content": "larger prompt length enables the model to achieve better model performance on downstream tasks more rapidly while still maintaining a lower bias score. However, it is important to consider that using larger prompt lengths means tuning more parameters, thus posing a trade-off." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.51, + 0.884, + 0.638 + ], + "angle": 0, + "content": "Impact of \\(\\tau\\). Then, we vary temperature \\(\\tau\\) in \\(\\{0.005, 0.05, 0.5\\}\\). Figure 3 shows close significant bias mitigation effects when \\(\\tau\\) is set to 0.005 and 0.05 while exhibiting less effectiveness when \\(\\tau\\) is 0.5. This observation implies that a higher temperature value corresponds to less weight of the cosine similarity calculation, resulting in decreased effectiveness in bias mitigation." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.642, + 0.885, + 0.755 + ], + "angle": 0, + "content": "Impact of \\(\\alpha\\). Last, we study the impact of coefficient \\(\\alpha\\) and vary the value in \\(\\{0.1, 0.5, 1.0\\}\\). Figure 4 emphasizes that reducing the value of \\(\\alpha\\) at a constant \\(\\tau\\), thus assigning less weight to the contrastive module, leads to decreased bias mitigation effects. This analysis underscores the importance of carefully selecting appropriate hyperparameters." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.766, + 0.797, + 0.781 + ], + "angle": 0, + "content": "9 Conclusion and Future Work" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.791, + 0.885, + 0.919 + ], + "angle": 0, + "content": "We propose \\(\\mathrm{Co}^2\\mathrm{PT}\\), an efficient and effective debiasing method for mitigating bias in downstream tasks. We evaluate its effectiveness on bias mitigation and applicability to existing debiased upstream models, and investigate how the design of each component and the selection of hyperparameters impact both its bias reduction capabilities and downstream task performance." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5866" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.491, + 0.295 + ], + "angle": 0, + "content": "Mitigating non-gender and intersectional bias. Mitigating non-gender biases is challenging as some debiasing methods work well on reducing gender biases but show poor generalization capabilities in addressing biases beyond gender (Meade et al., 2022). Without re-training the model, \\(\\mathrm{Co}^2\\mathrm{PT}\\) is flexible to apply in order to mitigate different bias types in downstream applications. One can train different debiasing prompts to tackle different bias dimensions such as gender, race, and religion. Furthermore, these debiasing prompts can be applied to mitigate intersectional bias by simply combining the corresponding prompts in downstream tasks." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.307, + 0.221, + 0.323 + ], + "angle": 0, + "content": "Limitations" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.334, + 0.49, + 0.512 + ], + "angle": 0, + "content": "While this work primarily addresses bias in English, we acknowledge the presence of more complicated bias cases in other languages. Therefore, future exploration of existing methods or the development of new techniques to mitigate bias in other languages would be valuable. Furthermore, despite the efficiency and comparable performance of deep prompt tuning compared to fine-tuning, it still underperforms fine-tuning on certain datasets when the model size is small. This will also limit the model performance of our method." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.524, + 0.267, + 0.54 + ], + "angle": 0, + "content": "Ethics Statement" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.551, + 0.49, + 0.664 + ], + "angle": 0, + "content": "In this work, when investigating gender bias in pre-trained language models, we focus on the binary definition of gender as the targeted attribute of discrimination. However, it is important to acknowledge that future research should also consider non-binary genders and other multi-class scenarios to comprehensively address bias." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.677, + 0.287, + 0.694 + ], + "angle": 0, + "content": "Acknowledgements" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.703, + 0.488, + 0.737 + ], + "angle": 0, + "content": "We thank Nicholas Meade for the initial discussion and anonymous reviewers for valuable feedback." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.764, + 0.215, + 0.779 + ], + "angle": 0, + "content": "References" + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.787, + 0.489, + 0.868 + ], + "angle": 0, + "content": "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877-1901." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.878, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Yang Trista Cao, Yada Pruksachatkun, Kai-Wei Chang, Rahul Gupta, Varun Kumar, Jwala Dhamala, and Aram Galstyan. 2022. On the intrinsic and extrinsic" + }, + { + "type": "list", + "bbox": [ + 0.116, + 0.787, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.527, + 0.086, + 0.885, + 0.166 + ], + "angle": 0, + "content": "fairness evaluation metrics for contextualized language representations. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 561-570, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.173, + 0.886, + 0.24 + ], + "angle": 0, + "content": "Pengyu Cheng, Weituo Hao, Siyang Yuan, Shijing Si, and Lawrence Carin. 2021. FairFil: Contrastive Neural Debiasing Method for Pretrained Text Encoders. In International Conference on Learning Representations." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.248, + 0.885, + 0.352 + ], + "angle": 0, + "content": "Maria De-Arteaga, Alexey Romanov, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, and Adam Tauman Kalai. 2019. Bias in bios: A case study of semantic representation bias in a high-stakes setting. In Proceedings of the Conference on Fairness, Accountability, and Transparency, pages 120-128." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.362, + 0.885, + 0.429 + ], + "angle": 0, + "content": "Sunipa Dev, Tao Li, Jeff M Phillips, and Vivek Srikumar. 2020. On measuring and mitigating biased inferences of word embeddings. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 7659-7666." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.437, + 0.885, + 0.555 + ], + "angle": 0, + "content": "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." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.563, + 0.885, + 0.643 + ], + "angle": 0, + "content": "Xiangjue Dong, Yun He, Ziwei Zhu, and James Caverlee. 2023a. PromptAttack: Probing dialogue state trackers with adversarial prompts. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 10651-10666, Toronto, Canada. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.651, + 0.885, + 0.743 + ], + "angle": 0, + "content": "Xiangjue Dong, Jiaying Lu, Jianling Wang, and James Caverlee. 2023b. Closed-book question generation via contrastive learning. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 3150-3162, Dubrovnik, Croatia. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.752, + 0.885, + 0.844 + ], + "angle": 0, + "content": "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." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.853, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Seraphina Goldfarb-Tarrant, Rebecca Marchant, Ricardo Muñoz Sánchez, Mugdha Pandya, and Adam Lopez. 2021. Intrinsic bias metrics do not correlate with application bias. In Proceedings of the 59th Annual Meeting of the Association for Computational" + }, + { + "type": "list", + "bbox": [ + 0.511, + 0.086, + 0.886, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5867" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.135, + 0.086, + 0.49, + 0.14 + ], + "angle": 0, + "content": "Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1926-1940, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.118, + 0.153, + 0.49, + 0.245 + ], + "angle": 0, + "content": "Yue Guo, Yi Yang, and Ahmed Abbasi. 2022. Autodebias: Debiasing masked language models with automated biased prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1012-1023, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.258, + 0.49, + 0.338 + ], + "angle": 0, + "content": "Xudong Han, Timothy Baldwin, and Trevor Cohn. 2021. Diverse adversaries for mitigating bias in training. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2760-2765, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.35, + 0.49, + 0.444 + ], + "angle": 0, + "content": "Jacqueline He, Mengzhou Xia, Christiane Fellbaum, and Danqi Chen. 2022. MABEL: Attenuating gender bias using textual entailment data. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9681-9702, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.456, + 0.49, + 0.536 + ], + "angle": 0, + "content": "Masahiro Kaneko and Danushka Bollegala. 2021. Debiasing pre-trained contextualised embeddings. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1256-1266, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.549, + 0.49, + 0.655 + ], + "angle": 0, + "content": "Masahiro Kaneko, Danushka Bollegala, and Naoaki Okazaki. 2022. Debiasing isn't enough! - on the effectiveness of debiasing MLMs and their social biases in downstream tasks. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1299-1310, Gyeongju, Republic of Korea. International Committee on Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.667, + 0.49, + 0.747 + ], + "angle": 0, + "content": "Anne Lauscher, Tobias Lueken, and Goran Glavš. 2021. Sustainable modular debiasing of language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 4782-4797, Punta Cana, Dominican Republic. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.76, + 0.49, + 0.813 + ], + "angle": 0, + "content": "Klas Leino, Matt Fredrikson, Emily Black, Shayak Sen, and Anupam Datta. 2019. Feature-Wise Bias Amplification. In International Conference on Learning Representations (ICLR)." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.826, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.309 + ], + "angle": 0, + "content": "Quentin Lhoest, Albert Villanova del Moral, Yacine Jernite, Abhishek Thakur, Patrick von Platen, Suraj Patil, Julien Chaumont, Mariama Drame, Julien Plu, Lewis Tunstall, Joe Davison, Mario Šaško, Gunjan Chhablani, Bhavitvya Malik, Simon Brandeis, Teven Le Scao, Victor Sanh, Canwen Xu, Nicolas Patry, Angelina McMillan-Major, Philipp Schmid, Sylvain Gugger, Clément Delangue, Théo Matussière, Lysandre Debut, Stas Bekman, Pierrick Cistac, Thibault Goehringer, Victor Mustar, François Lagunas, Alexander Rush, and Thomas Wolf. 2021. Datasets: A community library for natural language processing. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 175-184, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.318, + 0.885, + 0.424 + ], + "angle": 0, + "content": "Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. 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 4582-4597, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.433, + 0.885, + 0.539 + ], + "angle": 0, + "content": "Yingji Li, Mengnan Du, Xin Wang, and Ying Wang. 2023. Prompt tuning pushes farther, contrastive learning pulls closer: A two-stage approach to mitigate social biases. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14254-14267, Toronto, Canada. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.549, + 0.885, + 0.641 + ], + "angle": 0, + "content": "Paul Pu Liang, Irene Mengze Li, Emily Zheng, Yao Chong Lim, Ruslan Salakhutdinov, and Louis-Philippe Morency. 2020. Towards debiasing sentence representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5502-5515, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.651, + 0.885, + 0.756 + ], + "angle": 0, + "content": "Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. 2022. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 61-68, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.766, + 0.885, + 0.806 + ], + "angle": 0, + "content": "Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. arXiv preprint arXiv:2103.10385." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.816, + 0.885, + 0.882 + ], + "angle": 0, + "content": "Kaiji Lu, Piotr Mardziel, Fangjing Wu, Preetam Amancharla, and Anupam Datta. 2020. Gender bias in neural natural language processing. *Logic, Language, and Security: Essays Dedicated to Andre Scedrov on the Occasion of His 65th Birthday*, pages 189-202." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.892, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Chandler May, Alex Wang, Shikha Bordia, Samuel R. Bowman, and Rachel Rudinger. 2019. On measuring" + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5868" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.135, + 0.086, + 0.49, + 0.166 + ], + "angle": 0, + "content": "social biases in sentence encoders. 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 622-628, Minneapolis, Minnesota. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.173, + 0.49, + 0.266 + ], + "angle": 0, + "content": "Nicholas Meade, Elinor Poole-Dayan, and Siva Reddy. 2022. An empirical survey of the effectiveness of debiasing techniques for pre-trained language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1878-1898, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.274, + 0.49, + 0.379 + ], + "angle": 0, + "content": "Moin Nadeem, Anna Bethke, and Siva Reddy. 2021. StereoSet: Measuring stereotypical bias in pretrained language models. 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 5356-5371, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.387, + 0.49, + 0.479 + ], + "angle": 0, + "content": "Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. 2020. CrowS-pairs: A challenge dataset for measuring social biases in masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1953-1967, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.487, + 0.49, + 0.579 + ], + "angle": 0, + "content": "Shauli Ravfogel, Yanai Elazar, Hila Gonen, Michael Twiton, and Yoav Goldberg. 2020. Null it out: Guarding protected attributes by iterative nullspace projection. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7237-7256, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.587, + 0.49, + 0.731 + ], + "angle": 0, + "content": "Alexey Romanov, Maria De-Arteaga, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, Anna Rumshisky, and Adam Kalai. 2019. What's in a name? Reducing bias in bios without access to protected attributes. 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 4187-4195, Minneapolis, Minnesota. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.74, + 0.49, + 0.845 + ], + "angle": 0, + "content": "Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. 2018. Gender bias in coreference resolution. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 8-14, New Orleans, Louisiana. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.853, + 0.49, + 0.918 + ], + "angle": 0, + "content": "Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in NLP. Transactions of the Association for Computational Linguistics, 9:1408-1424." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.152 + ], + "angle": 0, + "content": "Rachael Tatman. 2017. Gender and dialect bias in YouTube's automatic captions. In Proceedings of the First ACL Workshop on Ethics in Natural Language Processing, pages 53-59, Valencia, Spain. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.162, + 0.885, + 0.228 + ], + "angle": 0, + "content": "Yibo Wang, Congying Xia, Guan Wang, and Philip S. Yu. 2022. Continuous Prompt Tuning Based Textual Entailment Model for E-commerce Entity Typing. In 2022 IEEE International Conference on Big Data (Big Data), pages 1383-1388." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.238, + 0.885, + 0.303 + ], + "angle": 0, + "content": "Kellie Webster, Xuezhi Wang, Ian Tenney, Alex Beutel, Emily Pittler, Ellie Pavlick, Jilin Chen, Ed Chi, and Slav Petrov. 2020. Measuring and reducing gendered correlations in pre-trained models. arXiv preprint arXiv:2010.06032." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.313, + 0.885, + 0.405 + ], + "angle": 0, + "content": "Zhongbin Xie and Thomas Lukasiewicz. 2023. An empirical analysis of parameter-efficient methods for debiasing pre-trained language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15730-15745, Toronto, Canada. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.416, + 0.885, + 0.455 + ], + "angle": 0, + "content": "Ke Yang, Charles Yu, Yi Fung, Manling Li, and Heng Ji. 2022. ADEPT: A DEbiasing Prompt Framework. arXiv preprint arXiv:2211.05414." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.465, + 0.885, + 0.569 + ], + "angle": 0, + "content": "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2017. Men also like shopping: Reducing gender bias amplification using corpus-level constraints. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2979–2989, Copenhagen, Denmark. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.58, + 0.885, + 0.698 + ], + "angle": 0, + "content": "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 15–20, New Orleans, Louisiana. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.707, + 0.885, + 0.799 + ], + "angle": 0, + "content": "Ran Zmigrod, Sabrina J. Mielke, Hanna Wallach, and Ryan Cotterell. 2019. Counterfactual data augmentation for mitigating gender stereotypes in languages with rich morphology. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1651-1661, Florence, Italy. Association for Computational Linguistics." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.799 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5869" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.258, + 0.085, + 0.347, + 0.101 + ], + "angle": 0, + "content": "Appendix" + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.113, + 0.408, + 0.129 + ], + "angle": 0, + "content": "A More Implementation Details" + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.141, + 0.477, + 0.155 + ], + "angle": 0, + "content": "A.1 Dataset and Extrinsic Bias Benchmarks" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.164, + 0.489, + 0.356 + ], + "angle": 0, + "content": "STS-B and SNLI datasets are from the Hugging Face Datasets library (Lhoest et al., 2021). We use the same Bias-in-Bios dataset used in Ravfogel et al. (2020), the Bias-STS-B used in Lauscher et al. (2021) and the Bias-NLI used in He et al. (2022). The code used to assess Bias-STS-B is modified from Lauscher et al. (2021), while the code for evaluating Bias-NLI and Bias-in-Bios is adapted from He et al. (2022). Different from the code employed in He et al. (2022), we conduct our evaluation on the entire Bias-NLI dataset rather than just the top \\(10\\%\\) of it." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.371, + 0.314, + 0.385 + ], + "angle": 0, + "content": "A.2 Debiased Baselines" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.394, + 0.49, + 0.489 + ], + "angle": 0, + "content": "Please refer to the footnotes here for the source of released debiased models - ZariCDA, ZariDO\\(^4\\) (Webster et al., 2020), Context-Debias\\(^5\\) (Kaneko and Bollegala, 2021), AutoDebias\\(^6\\) (Guo et al., 2022), MABEL\\(^7\\) (He et al., 2022) - used on downstream tasks." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.505, + 0.35, + 0.52 + ], + "angle": 0, + "content": "A.3 Implementation Details" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.528, + 0.49, + 0.721 + ], + "angle": 0, + "content": "We use BERT-base-uncased in our experiments. For the single-sentence classification task, we preprocess the [CLS] token before the input sentences and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. For the sentence-pair classification task, e.g., SNLI task, we preprocess [CLS] before the premise \\( x \\) and [SEP] token to separate premise \\( x \\) and hypothesis \\( y \\) and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. Fine-tuning and prompt tuning code rely on the Huggingface implementation.\\(^{8}\\)" + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.084, + 0.743, + 0.099 + ], + "angle": 0, + "content": "B More Ablation Studies" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.11, + 0.886, + 0.254 + ], + "angle": 0, + "content": "Pooling method. Besides using pooled output, we also conduct experiments that use the average token representation from the model's last hidden state as sentence representation, shown in Table 7. However, upon analyzing the results, \\(\\mathrm{Co}^2\\mathrm{PT}_{\\mathrm{avg}}\\) is considerably more challenging for the prompts to acquire the debiasing capability when using the average token representation compared to when utilizing the CLS token as the sentence representation." + }, + { + "type": "table", + "bbox": [ + 0.512, + 0.265, + 0.882, + 0.316 + ], + "angle": 0, + "content": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
Co2PTavg.0.3900.8230.4970.891 / 0.886
Co2PTcls (ours)0.0580.1670.0050.884 / 0.880
" + }, + { + "type": "table_caption", + "bbox": [ + 0.59, + 0.325, + 0.8, + 0.338 + ], + "angle": 0, + "content": "Table 7: More ablation results." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.367, + 0.807, + 0.383 + ], + "angle": 0, + "content": "C Standard Deviation of Results" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.393, + 0.884, + 0.537 + ], + "angle": 0, + "content": "The standard deviation of evaluation results on extrinsic bias benchmarks – Bias-STS-B, Bias-NLI, and Bias-in-Bios – are presented in Tables 8 to 10, respectively. In addition, the results of integrating \\(\\mathrm{Co}^2\\mathrm{PT}\\) with existing debiased models and ablation study are shown in Table 11 and Table 12. These results indicate that \\(\\mathrm{Co}^2\\mathrm{PT}\\) consistently performs well with relatively low variability, demonstrating its effectiveness and reliability." + }, + { + "type": "table", + "bbox": [ + 0.512, + 0.548, + 0.882, + 0.682 + ], + "angle": 0, + "content": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.0180.0240.0560.002 / 0.001
BERT+CDA0.0200.0580.0420.001 / 0.000
ZariCDA*0.0300.1460.0310.004 / 0.003
ZariDO*0.0200.0110.0440.003 / 0.003
Context-Debias0.0420.0520.0980.005 / 0.005
Auto-Debias0.0060.0180.0200.002 / 0.001
MABEL0.0110.0460.0130.004 / 0.004
PT0.0180.0160.0240.001 / 0.001
Co2PT (ours)0.0090.0560.0010.001 / 0.000
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.692, + 0.884, + 0.721 + ], + "angle": 0, + "content": "Table 8: Results standard deviation on Bias-STS-B. \\(\\star\\) : the backbone models are BERT-large-uncased." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.748, + 0.882, + 0.781 + ], + "angle": 0, + "content": "D Visualization of Bias Mitigation Effects along Epochs" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.79, + 0.882, + 0.886 + ], + "angle": 0, + "content": "We visualize the changes of bias scores along epochs in Figure 5. The bias score of PT keeps increasing as the Pearson score increases, while \\(\\mathrm{Co}^2\\mathrm{PT}\\) consistently maintains a low bias score, which indicates the effectiveness of \\(\\mathrm{Co}^2\\mathrm{PT}\\) on bias mitigation." + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.732, + 0.444, + 0.757 + ], + "angle": 0, + "content": "\\(^{2}\\)https://github.com/huggingface/datasets. Apache License 2.0." + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.758, + 0.488, + 0.794 + ], + "angle": 0, + "content": "3The data is downloaded through https://github. com/shauli-ravfogel/nullspace_projection/blob/ master/download_data.sh MIT License." + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.795, + 0.488, + 0.83 + ], + "angle": 0, + "content": "4The checkpoints of these two models are from https:// github.com/google-research-datasets/Zari. Apache2.0 license." + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.832, + 0.487, + 0.856 + ], + "angle": 0, + "content": "5The checkpoints are from https://github.com/kanekomasahiro/context-debias.MIT license." + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.857, + 0.487, + 0.88 + ], + "angle": 0, + "content": "6The checkpoints are from https://github.com/Irenehere/Auto-Debias." + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.881, + 0.487, + 0.905 + ], + "angle": 0, + "content": "7The checkpoints are from https://huggingface.co/princeton-nlp/mabel-bert-base-uncased MIT License." + }, + { + "type": "page_footnote", + "bbox": [ + 0.136, + 0.905, + 0.373, + 0.918 + ], + "angle": 0, + "content": "8https://github.com/huggingface" + }, + { + "type": "list", + "bbox": [ + 0.114, + 0.732, + 0.488, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5870" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.117, + 0.087, + 0.486, + 0.22 + ], + "angle": 0, + "content": "
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.0270.0420.0410.0360.002
BERT+CDA0.0120.0100.0100.0020.003
ZariCDA*0.0820.0810.0820.0970.001
ZariDO*0.0780.0830.0830.0930.001
Context-Debias0.0300.0460.0460.0500.001
Auto-Debias0.0100.0190.0190.0120.002
MABEL0.0180.0030.0020.0140.001
PT0.0230.0320.0310.0280.001
Co2PT (ours)0.0160.0210.0220.0270.004
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.23, + 0.486, + 0.258 + ], + "angle": 0, + "content": "Table 9: Results standard deviation on Bias-NLI. \\(\\star\\): the backbone models are BERT-large-uncased." + }, + { + "type": "table", + "bbox": [ + 0.134, + 0.275, + 0.469, + 0.401 + ], + "angle": 0, + "content": "
ModelGAPTPR↓GAPRMS↓Acc.
BERT0.1380.0040.001
BERT+CDA0.0340.0010.002
ZariCDA*0.0690.0060.000
ZariDO*0.0740.0100.003
Context-Debias0.0530.0060.003
Auto-Debias0.1460.0040.002
MABEL0.1140.0060.001
PT0.0660.0050.001
Co2PT (ours)0.0250.0050.007
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.412, + 0.489, + 0.44 + ], + "angle": 0, + "content": "Table 10: Results standard deviation on Bias-in-Bios. \\(\\star\\) : the backbone models are BERT-large-uncased." + }, + { + "type": "table", + "bbox": [ + 0.117, + 0.457, + 0.486, + 0.551 + ], + "angle": 0, + "content": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.0420.0520.0980.005 / 0.005
+ Co2PT0.0310.1940.0110.000 / 0.001
Auto-Debias0.0060.0180.0200.002 / 0.001
+ Co2PT0.0080.0370.0050.002 / 0.002
MABEL0.0110.0460.0130.004 / 0.004
+ Co2PT0.0210.1030.0230.000 / 0.000
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.562, + 0.489, + 0.59 + ], + "angle": 0, + "content": "Table 11: Performance of integrating \\(\\mathrm{Co}^2\\mathrm{PT}\\) with debiased models on Bias-STS-B." + }, + { + "type": "table", + "bbox": [ + 0.117, + 0.608, + 0.486, + 0.727 + ], + "angle": 0, + "content": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.0180.0160.0240.001 / 0.001
PT+CDA0.0080.0080.0070.000 / 0.000
PT+SCL0.0250.0560.0390.000 / 0.000
Co2PT+SCLn0.0230.0940.0330.001 / 0.001
PT+NLI+CL0.0130.0700.0120.001 / 0.001
PT+NLI+CLp0.0250.0420.0530.001 / 0.001
PT+CDA+CLp0.0300.0310.0510.001 / 0.002
Co2PT (avg.)0.0320.0220.0400.001 / 0.000
Co2PT (PT+CDA+CL)0.0090.0560.0010.001 / 0.000
" + }, + { + "type": "table_caption", + "bbox": [ + 0.116, + 0.737, + 0.485, + 0.752 + ], + "angle": 0, + "content": "Table 12: Results standard deviation of ablation study." + }, + { + "type": "image", + "bbox": [ + 0.12, + 0.771, + 0.482, + 0.869 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.114, + 0.881, + 0.486, + 0.91 + ], + "angle": 0, + "content": "Figure 5: Visualization of bias mitigation effects and model performance along epochs." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.519, + 0.941 + ], + "angle": 0, + "content": "5871" + } + ] +] \ No newline at end of file diff --git a/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_origin.pdf b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0991a809aa604f0709f80850a9e5833d2c45e345 --- /dev/null +++ b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/0fce549f-022f-4a65-9e88-c37cfebfa37e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ecc731bfad0c02b20a74b316cab5f95b25e913d247f292a92357a3f14aabdfc +size 489499 diff --git a/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/full.md b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..53530e549cf48d1b8e81785034596985a2145af0 --- /dev/null +++ b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/full.md @@ -0,0 +1,327 @@ +# $\mathrm{Co}^{2}\mathrm{PT}$ : Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning + +Xiangjue Dong $^{1}$ Ziwei Zhu $^{2}$ Zhuoer Wang $^{1}$ Maria Teleki $^{1}$ James Caverlee $^{1}$ + +$^{1}$ Texas A&M University $^{2}$ George Mason University + +{xj.dong, wang, mariateleki, caverlee}@tamu.edu zzhu20@gmu.edu + +# Abstract + +Pre-trained Language Models are widely used in many important real-world applications. However, recent studies show that these models can encode social biases from large pre-training corpora and even amplify biases in downstream applications. To address this challenge, we propose $\mathrm{Co}^2\mathrm{PT}$ , an efficient and effective debiaswhile-prompt tuning method for mitigating biases via counterfactual contrastive prompt tuning on downstream tasks. Our experiments conducted on three extrinsic bias benchmarks demonstrate the effectiveness of $\mathrm{Co}^2\mathrm{PT}$ on bias mitigation during the prompt tuning process and its adaptability to existing upstream debiased language models. These findings indicate the strength of $\mathrm{Co}^2\mathrm{PT}$ and provide promising avenues for further enhancement in bias mitigation on downstream tasks. + +# 1 Introduction + +Pre-trained language models (PLMs) are widely used in many real-world applications, demonstrating remarkable performance (Devlin et al., 2019; Brown et al., 2020). However, it has been demonstrated that PLMs encode unfair social biases in their parameters based on their pre-training step over large-scale text corpora (May et al., 2019). Furthermore, these biases – for example, based on gender, race, or religion – can easily propagate to the downstream tasks that use these PLMs (Kaneko and Bollegala, 2021). For example, “She is a nurse” can have a higher conditional likelihood than “He is a nurse” in the language modeling task, and “nurse” can have higher coreference scores to “she” than “he” in the coreference resolution task (Lu et al., 2020). Considering that NLP applications like machine translation systems, resume filtering systems, dialogue systems, and speech recognition (Tatman, 2017) are widely used by millions of users globally, it is crucial to mitigate the social biases present in PLMs and strive for models that + +will not propagate discriminatory predictions or offensive outputs towards specific groups before being deployed. + +Much prior effort has focused primarily on debiasing the representations learned during the pretraining process, e.g., through projection (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), further pre-training on unbiased external corpora (Webster et al., 2020; Lauscher et al., 2021; He et al., 2022), or finetuning to debias (Cheng et al., 2021; Guo et al., 2022). The effectiveness of such debiasing efforts is typically measured on intrinsic benchmarks like SEAT (Sentence Encoding Association Test) which computes the association between demographic terms (e.g., woman, man) and stereotype terms (e.g., science, art). An unbiased model should display no difference in the similarity between the representations of these terms (May et al., 2019). + +While these existing approaches help reduce social biases under intrinsic measures, these debias-then-finetune methods are based on the hypothesis that if an upstream model is unbiased, it will also preserve its fairness effects on downstream tasks during the fine-tuning process. However, recent research investigating the relationship between intrinsic and extrinsic benchmarks (which evaluate fairness in downstream applications) finds these two benchmarks correlate weakly (Kaneko et al., 2022). Furthermore, they observe that models, even after being debiased, tend to re-acquire or even amplify biases (e.g., instance-related biases and label-related biases) during the fine-tuning process on downstream tasks (Zhao et al., 2017; Leino et al., 2019). Thus, this mismatch leads to our motivating research question - How can we develop an efficient and effective method to mitigate bias on downstream tasks? + +To answer the aforementioned question, we propose $\mathrm{Co}^2\mathrm{PT}$ , a debias-while-prompt tuning approach through Counterfactual Contrastive Prompt + +![](images/f1bdc1048544f22ab384b3e44a74cf3ebb9736aa301305e8d34de80a85d97230.jpg) +Figure 1: The overview of $\mathrm{Co}^2\mathrm{PT}$ . First, we construct counterfactual pairs from the training data. Then, we learn debiased continuous prompts by simultaneously optimizing prompt tuning loss $\mathcal{L}_{pt}$ on downstream tasks and contrastive loss $\mathcal{L}_{cl}$ between the counterfactual pairs. + +Tuning. In this method, we first freeze all parameters of the PLM and add tunable continuous prompts for every layer. Unlike the previous debias-then-finetune methods that require expensive re-training of the original PLM and risk knowledge forgetting, this deep prompt tuning framework saves computational and memory resources while preserving the original pre-trained knowledge and language modeling ability (Li and Liang, 2021; Liu et al., 2022). To ensure that a fair system generates unbiased results regardless of the demographic terms used, we construct counterfactual pairs directly from the training data, eliminating the need for external corpora that heavily depend on their quality for debiasing. Specifically, we replace demographic terms associated with either the dominant or minoritized group in the training data with terms representing the opposite group. Then, we integrate the ability to mitigate bias into the prompt parameters through a contrastive objective between counterfactual pairs while maintaining the parameters of PLMs frozen. $\mathrm{Co}^2\mathrm{PT}$ can be integrated into existing debiased models to help them mitigate biases on downstream tasks and offer flexibility in addressing different kinds of bias. These advantages establish $\mathrm{Co}^2\mathrm{PT}$ as an efficient and effective method for mitigating bias in downstream tasks. + +In conclusion, the proposed $\mathrm{Co}^2\mathrm{PT}$ mitigates bias on downstream tasks through prompt tuning, making the following contributions: + +- $\mathrm{Co}^{2}\mathrm{PT}$ achieves time and memory efficiency without requiring access to an external corpus or retraining the entire model. +- Over three extrinsic bias benchmarks, we show that $\mathrm{Co}^{2}\mathrm{PT}$ effectively mitigates bias amplified during the prompt tuning process on downstream tasks. + +- Furthermore, $\mathrm{Co}^{2}\mathrm{PT}$ can be extended to existing debiased language models, effectively bridging the gap between debiased upstream models and downstream tasks. + +# 2 Related Work + +Several approaches have been proposed for debiasing pre-trained language models such as projection-based methods (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), post-hoc text generation techniques (Schick et al., 2021), adversarial methods (Han et al., 2021), fin-tuning on biased prompts (Guo et al., 2022), with contrastive objective (Cheng et al., 2021) or with augmented data (Zhao et al., 2018), additional pretraining methods on re-balanced corpus through counterfactual data augmentation (Webster et al., 2020; Lauscher et al., 2021; Meade et al., 2022) or with a contrastive objective on gender-balanced entailment pairs (He et al., 2022), using dropout regularization (Webster et al., 2020), through parameter-efficient methods (Lauscher et al., 2021; Yang et al., 2022; Xie and Lukasiewicz, 2023) or with a contrastive objective (Li et al., 2023). While some works do not require access to an external corpus or do not require retraining the entire model, most prior methods primarily focus on mitigating bias within the model's intrinsic characteristics and evaluate the effectiveness of bias mitigation through intrinsic bias benchmarks, e.g., SEAT (May et al., 2019), StereoSet (Nadeem et al., 2021), and CrowS-Pairs (Nangia et al., 2020). Subsequently, they fine-tune the debiased models on downstream tasks and demonstrate that their debiased models retain the language modeling ability and the performance on downstream tasks or extrinsic bias benchmarks, which evaluate fairness in downstream tasks by + +testing whether the models exhibit different performances among different populations. + +Nevertheless, recent research shows that these debias-then-finetune methods will re-acquire or even amplify biases during the fine-tuning process on downstream tasks and that intrinsic and extrinsic evaluation bias benchmarks correlate poorly (Goldfarb-Tarrant et al., 2021; Cao et al., 2022; Kaneko et al., 2022). They encourage researchers to focus directly on extrinsic measures of bias of specific applications when addressing bias mitigation (Goldfarb-Tarrant et al., 2021). + +Thus, we focus in this paper on mitigating bias on downstream tasks and evaluate using extrinsic evaluation benchmarks directly. In addition, different from the previous methods requiring further pre-training on the counterfactually augmented sentences from an external corpus, e.g., English Wikipedia (Zmigrod et al., 2019; Webster et al., 2020; Meade et al., 2022), BookCorpus (Lauscher et al., 2021), News-Commentary v15 (Yang et al., 2022) or NLI (He et al., 2022), our methods achieve time and memory efficiency by eliminating the need for external corpus access or model retraining. + +# 3 Co²PT: Debiasing via Counterfactual Contrastive Prompt Tuning + +We propose $\mathrm{Co}^2\mathrm{PT}$ , a debias-while-prompt tuning parameter-efficient method for mitigating biases on downstream tasks via counterfactual contrastive prompt tuning, presented in Figure 1. Concretely, $\mathrm{Co}^2\mathrm{PT}$ mitigates bias in PLMs by leveraging counterfactual pairs from training data to produce debiased representations during prompt tuning. + +Deep Prompt Tuning. First, we introduce the backbone framework of $\mathrm{Co}^2\mathrm{PT}$ - deep prompt tuning. We incorporate continuous prompts as prefix tokens in every layer of the PLM. By doing this, we have more tunable task-specific parameters to enhance per-task capacity while maintaining parameter efficiency (Li and Liang, 2021; Liu et al., 2022; Wang et al., 2022; Dong et al., 2023a). Besides, it can achieve comparable performance to fine-tuning, outperforming methods that only add trainable continuous prompts into the input embedding layer (Lester et al., 2021; Liu et al., 2021), which underperform the fine-tuning methods, especially when the model size is not large (Liu et al., 2022). The prompt tuning loss of proposed $\mathrm{Co}^2\mathrm{PT}$ on the downstream task is represented as $\mathcal{L}_{pt}$ , e.g., cross-entropy loss for a classification task. + +Counterfactual Pairs Construction. Then, the first key question is: how to interject the debiasing capability into the continuous prompts? An unbiased model should make the same predictions independent of the bias-attribute term, thus we apply counterfactual data augmentation to generate counterparts of training examples from the training data during prompt tuning. Concretely, let $S$ represent the training corpus and let $W = \{(w_{1}, w_{2}, \ldots, w_{m})^{i}\}_{i=1}^{N}$ be a set of $N$ bias-attribute term pairs. For each sentence $s_{i}$ in $S$ and each pair $(w_{1}, w_{2}, \ldots, w_{m})$ in $W$ , for any $w_{i}$ in $s$ , we replace it with the term along the opposite bias direction. Take the binary-gender debiasing task shown in Figure 1 for example, the bias-attribute terms are { (man, woman), (he, she), ... } . The "man" is in the input sentence "The man is playing the piano". We replace it with "woman" while leaving non-attribute words unchanged. Then the counterfactually augmented sentence is "The woman is playing the piano", and vice versa. The obtained counterfactual sentence of the original sentence $s_{i}$ is denoted as $s_{i}'$ . + +Counterfactual Contrastive Learning. The counterfactual pairs construction allows us to achieve a balance in inputs containing bias-attribute terms. However, how can we ensure that our model generates consistent predictions for both $s_i$ and $s_i'$ , which possess similar semantic meaning but differ in bias direction? To make the model generate predictions independent of biased attributes, it is important for sentences with similar semantics but along different bias directions to be closer (Cheng et al., 2021; He et al., 2022). We apply contrastive learning, of which the objective is to obtain meaningful representations by bringing semantically similar neighbors closer and pushing apart the dissimilar neighbors (Gao et al., 2021; Dong et al., 2023b; Li et al., 2023). In this work, input sentence $s_i$ and its counterpart $s_i'$ are semantically related but in opposite bias directions. We let $\mathbf{h}_i$ and $\mathbf{h}_i'$ denote the representations of $s_i$ and $s_i'$ and then concatenate with the continuous prompt representation $\mathbf{p}$ as positive pairs. Then we take the cross-entropy objective with in-batch negatives (Gao et al., 2021). The training objective for $(\mathbf{h}_i, \mathbf{h}_i')$ with a mini-batch of $N$ pairs is: + +$$ +\mathcal {L} _ {c l} = - \log \frac {e ^ {\operatorname {s i m} \left(\mathbf {p} \oplus \mathbf {h} _ {i} , \mathbf {p} \oplus \mathbf {h} _ {i} ^ {\prime}\right) / \tau}}{\sum_ {j = 1} ^ {N} e ^ {\operatorname {s i m} \left(\mathbf {p} \oplus \mathbf {h} _ {i} , \mathbf {p} \oplus \mathbf {h} _ {j} ^ {\prime}\right) / \tau}}, \tag {1} +$$ + +where $\mathrm{sim}(\mathbf{x}_i,\mathbf{y}_i)$ is the cosine similarity of $\mathbf{x}_i$ and + +$\mathbf{y}_i$ : $\mathrm{sim}(\mathbf{x}_i,\mathbf{y}_i) = \mathbf{x}_i^\top \mathbf{y}_i / \| \mathbf{x}_i\| \| \mathbf{y}_i\|$ , $\oplus$ is the concatenation of two representations, and $\tau$ is a temperature hyperparameter. + +For counterfactual pairs $(s_i, s_i')$ in the single-sentence classification task, $s_i$ is the original sentence from the training data and $s_i'$ is the augmented sentence that has the same semantic meaning as $s_i$ but in a different bias direction. For sentence-pair classification, like in the SNLI task, with $x_i$ as the premise and $y_i$ as the hypothesis, $s_i$ is the original premise-hypothesis pair $(x_i, y_i)$ while $s_i'$ is the counterfactual augmented premise-hypothesis pair $(x_i', y_i')$ . Similarly, the sentence representations are concatenated with continuous prompts to calculate the contrastive loss through Equation 1. + +Learning Objectives. Finally, the continuous prompts learn-to-debias by simultaneously optimizing the prompt tuning loss $\mathcal{L}_{pt}$ on downstream tasks and contrastive loss $\mathcal{L}_{cl}$ between the counterfactual pairs: + +$$ +\mathcal {L} = \mathcal {L} _ {p t} + \alpha \mathcal {L} _ {c l}, \tag {2} +$$ + +where $\alpha$ is a tunable coefficient hyperparameter. As stated before, we only tune the parameters of the debiasing continuous prompts while maintaining the parameters of PLMs frozen throughout the training. After the counterfactual contrastive prompt tuning, the debiasing knowledge is stored in the prompt parameters. This approach not only retains the knowledge within the original parameters of PLMs but is also flexible and adaptable to different downstream tasks. For example, we can train different prompts for different bias dimensions such as gender, race, and religion. These prompts can then be combined and applied to downstream tasks. Moreover, considering that prior research primarily concentrates on binary gender, it is more efficient to extend its application to non-binary gender without requiring re-training new debiased models. + +# 4 Experimental Setup + +We design experiments to test the effectiveness of our proposed $\mathrm{Co}^2\mathrm{PT}$ approach toward answering four questions: RQ1: Will $\mathrm{Co}^2\mathrm{PT}$ mitigate bias on downstream tasks effectively? RQ2: How will the existing intrinsic debiased methods perform on the downstream tasks when they are combined with $\mathrm{Co}^2\mathrm{PT}$ ? RQ3: What impact do different modules have on the design of $\mathrm{Co}^2\mathrm{PT}$ ? RQ4: How do hyperparameters affect $\mathrm{Co}^2\mathrm{PT}$ ? + +# 4.1 Bias Evaluation + +Extrinsic bias benchmarks assess bias via performance gap between different groups in downstream tasks. In this work, we evaluate $\mathrm{Co}^2\mathrm{PT}$ on three widely used extrinsic bias benchmarks: Bias-STSB, Bias-NLI, and Bias-in-Bios. + +Bias-STS-B (Webster et al., 2020) is adapted from the STS-B task to evaluate gendered correlations, which requires models to predict the semantic similarity between pairs of sentences. Specifically, 276 sentences are collected from the test set as templates and then gendered terms (man, woman) and professional terms from Rudinger et al. (2018) are inserted into each template, forming 16,980 sentence pairs. For instance, if the template is "A man is walking", then the sentence pairs are ("A man is walking", "A nurse is walking") and ("A woman is walking", "A nurse is walking"). If a model is unbiased towards gender terms, it should assign equal similarity scores to both pairs. We calculate the average absolute difference between the similarity scores of sentence pairs containing male and female terms, and how often the difference between "male" and "female" sentence pairs $> \tau$ , where we report the results for $\tau = 0.1$ and $\tau = 0.3$ (Webster et al., 2020). A lower value indicates less bias. + +Bias-NLI (Dev et al., 2020) is a natural language inference dataset consisting of neutral sentence pairs to evaluate the gender-occupation bias. It is constructed by populating the template: "The subject verb a/an object", leading to 1,936,512 instances. Concretely, the verb and object slots are filled with activities, e.g., ate a bagel. Then they create neutral entailment pairs by filling the subject slot with an occupation term with a strong gender correlation, e.g., "nurse", for the hypothesis, and "woman", for the premise, resulting in the instance: The woman ate a bagel; The nurse ate a bagel. neutral. Bias is defined as deviation from neutrality and measured by three metrics: (1) Net Neutral (NN): the average probability that the model assigns a neutral label for all instances, (2) Fraction Neutral (FN): the percentage of instances that the model predicts the neutral label and (3) Threshold: $\tau$ (T: $\tau$ ): the fraction of examples whose probability of neutral are above $\tau$ . We report the results for $\tau = 0.5$ and $\tau = 0.7$ following (Lauscher et al., 2021; He et al., 2022). All three metrics will attain 1 for a bias-free model. + +Bias-in-Bios (De-Arteaga et al., 2019) is a large-scale English dataset studying gender bias in oc + +cupation classification from the Common Crawl corpus. We report the overall accuracy of the task as well as the accuracy breakdown based on gender. To quantify gender bias, we compute the difference in true positive rates (TPR) between genders across various occupations, denoted as $\mathrm{GAP}_{g}^{\mathrm{TPR}}$ and defined as follows: + +$$ +\mathrm {G A P} _ {g} ^ {\mathrm {T P R}} = \left| \mathrm {T P R} _ {g} - \mathrm {T P R} _ {\sim g} \right|, \tag {3} +$$ + +where $\mathrm{TPR}_g$ represents the proportion of individuals correctly predicted given their gender $g$ , and $g$ and $\sim g$ are binary genders. Following (Romanov et al., 2019; Ravfogel et al., 2020; He et al., 2022), we also calculate the root mean square of the per-occupation TPR gender gap $\mathrm{GAP}_{g,o}^{\mathrm{TPR}}$ over all occupations $o$ : + +$$ +\mathrm {G A P} _ {g} ^ {\mathrm {R M S}} = \sqrt {\frac {1}{| O |} \sum_ {o \in O} \left(\mathrm {G A P} _ {g , o} ^ {\mathrm {T P R}}\right) ^ {2}}. \tag {4} +$$ + +A value closer to 0 indicates a lower degree of bias. + +# 4.2 Datasets and Setup + +STS-B and SNLI. We fine-tune the models on SNLI and STS-B training sets and pick the one that performs best on the validation set and then evaluate bias using Bias-STS-B and Bias-NLI, respectively. Bias-in-Bios. We use the same data as Ravfogel et al. (2020) which contains 393,423 biographies and 28 profession classes. We split train/validation/test by 65/25/10 following (De-Arteaga et al., 2019; Ravfogel et al., 2020). The dataset statistics are shown in Table 1. For SNLI and Bias-in-Bios, we report accuracy over classification while we report the Pearson and Spearman correlations for STS-B. + +# 4.3 Baseline Models + +We compare $\mathrm{Co}^2\mathrm{PT}$ with six upstream debiased models fine-tuned on the downstream tasks, and three baselines fine-tune or prompt-tune BERT models on the downstream tasks: ZariCDA (Webster et al., 2020) is pre-trained from scratch over counterfactual data augmented from English Wikipedia and ZariDO (Webster et al., 2020) is additionally pre-trained with increased dropout rate. + +
TrainValidationBias-Test
STS-B5,7491,50016,980
SNLI550,15210,0001,936,512
Bias-in-Bios255,71039,36998,344
+ +Table 1: Dataset statistics. + +ADELE and its variant ADELE-TA (Lauscher et al., 2021) inject and train debiased adapters via masked language modeling on the counterfactually augmented corpus. Context-Debias (Kaneko and Bollegala, 2021) is fine-tuned via an inner-product loss and squared distance loss. Auto-Debias (Guo et al., 2022) uses a beam search to search for biased prompts and then uses these biased prompts to finetune PLMs by minimizing the disagreement between predicted [MASK] token distributions. MA-BEL (He et al., 2022) is additionally pre-trained on all entailment pairs that contain gendered terms from SNLI and MNLI data with a contrastive loss, an alignment loss, and an optional masked language modeling loss. BERT (Devlin et al., 2019) is a fine-tuned BERT model on the downstream tasks while BERT+CDA is a fine-tuned BERT model on the counterfactually augmented data from the training sets. PT (Liu et al., 2022) adds continuous prompts to each layer of the models and then tunes the prompts on downstream tasks. The backbone models for ZariCDA and ZariDO are BERT-large-uncased whereas other baselines are BERT-base-uncased (Devlin et al., 2019).1 + +# 4.4 Implementation Details + +For fine-tuning debiased baselines and vanilla BERT, we use the models released by the authors. We set the max length of the sentence to be 128, the learning rate to be $2e - 5$ , the batch size to be 64, and train for 10 epochs. For $\mathrm{AT + CDA}$ , learning rate is 2e-5 and batch size is 128. For PT and $\mathrm{Co}^2\mathrm{PT}$ , the backbone models are bert-base-uncased with the learning rate set to $1e - 2$ and the prompt length set to 20 and are trained for 30 epochs. The batch size is set to 32. For hyperparameters $\tau$ and $\alpha$ in Equation 1 and 2, we set $\tau = 0.05$ and $\alpha = 1.0$ . All experiments are run on a single NVIDIA RTX A5000 24GB GPU. For each run, we save the model that performs the best on the development set and evaluate it on extrinsic benchmarks. We report the average results across three runs. All code and data are available at https://github.com/dongxiangjue/Co2PT; additional experimental details and standard deviations are in Appendix A and Appendix C, respectively. + +# 5 Debiasing Effectiveness (RQ1) + +We now investigate the effectiveness of $\mathrm{Co}^2\mathrm{PT}$ in mitigating bias on three extrinsic bias benchmarks. + +Bias-STS-B. First, we focus on the Bias-STS-B benchmark. As Table 2 indicates, $\mathrm{Co}^2\mathrm{PT}$ shows the lowest bias scores across all metrics and achieves similar model performance on downstream tasks as the other debiased baselines. We observe that some debiased models exhibit higher bias scores than the original BERT, indicating that debiased language models can relearn biases during fine-tuning on downstream tasks. For example, AutoDebias, one of the state-of-the-art debiased models, demonstrates strong fairness on intrinsic benchmarks, such as SEAT, scores 0.312 in average absolute difference, showing a higher bias level than the original BERT and most of the other baselines. On the other hand, MABEL, which shows strong performance in debiasing downstream tasks, achieves a competitive score of 0.081. Furthermore, compared to fine-tuning the original BERT model on the STS-B training set, PT results in a higher bias score of 0.321 compared to 0.282. This suggests that while fine-tuning only the number of prompt tokens may be parameter efficient, it can result in increased bias due to the presence of an unbalanced dataset. For $\mathrm{Co}^2\mathrm{PT}$ , we observe a significant reduction in the bias score with the average absolute difference decreasing from 0.321 to 0.058, from 0.749 to 0.167 when the difference exceeds 0.1, and from 0.369 to 0.005 when the difference exceeds 0.3. These findings indicate a substantial improvement in the ability to mitigate bias. + +Bias-NLI. Next, we focus on the Bias-NLI extrinsic benchmark shown in Table 3. BERT+CDA, Context-Debias, and MABEL achieve lower bias + +
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.2820.8670.4170.883 / 0.879
BERT+CDA0.1310.5110.0800.885 / 0.881
ZariCDA*0.1120.4450.0480.892 / 0.889
ZariDO*0.3470.9220.5850.880 / 0.878
ADELE†0.121--0.889 / -
Context-Debias0.3320.9160.5390.879 / 0.876
Auto-Debias0.3120.9020.5020.884 / 0.880
MABEL0.0660.2040.0130.889 / 0.885
PT0.3210.7490.3690.889 / 0.885
Co2PT (ours)0.0580.1670.0050.884 / 0.880
+ +Table 2: Evaluation on Bias-STS-B. †: results are reported from the ADELE model in the original paper; $\star$ : backbone model is BERT-large-uncased. + +
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.8240.8680.8670.8110.909
BERT+CDA0.8730.9420.9410.8940.905
ZariCDA*0.7860.8280.8260.7650.912
ZariDO*0.7470.7820.7790.7110.913
Context-Debias0.8730.9190.9190.8770.910
ADELE-TA†0.5040.557--0.813
AT+CDA‡0.6590.7990.7580.5100.849
Auto-Debias0.8130.8490.8480.7950.908
MABEL0.8530.8920.8910.8460.911
PT0.7410.8120.8080.7290.898
Co2PT (ours)0.8770.9650.9620.9050.886
+ +scores than the original BERT across all metrics while the other baseline methods amplify biases during the fine-tuning. Similarly, Auto-Debias performs well on the SEAT benchmark but experiences an increase in bias when applied to downstream tasks, mirroring the trend observed in the Bias-STS-B extrinsic benchmark. Moreover, ADELE, another parameter-efficient method, performs poorly in both bias mitigation and model accuracy. Similar to Bias-STS-B extrinsic benchmark, PT amplifies biases during the tuning process, resulting in a decline in the NN score from 0.824 to 0.741 and the FN score from 0.868 to 0.812. By employing $\mathrm{Co}^2\mathrm{PT}$ , we observe significant improvements with the NN score rising to 0.877 (from 0.741) and the FN score reaching 0.965 (from 0.812), indicating the effectiveness of $\mathrm{Co}^2\mathrm{PT}$ on bias mitigation. + +Bias-in-Bios. Next we show the performance on the Bias-in-Bios benchmark in Table 4. Among all the baselines, the ZariCDA achieves the lowest $\mathrm{GAP^{TPR}}$ score of 2.667 while the BERT+CDA + +Table 3: Evaluation on Bias-NLI. †: results are fine-tuned on MNLI and reported from the ADELE-TA model in the original paper; ‡: adapter tuning on counterfactually augmented data; ★: backbone model is BERT-large-uncased. Other baselines are fine-tuned on SNLI. + +
ModelGAPTPR↓GAPRMS↓Acc.
BERT2.8220.1190.830
BERT+CDA2.7580.1130.841
ZariCDA*2.6670.1350.848
ZariDO*2.7200.1350.847
Context-Debias3.0310.1190.831
Auto-Debias2.6900.1250.831
MABEL2.8390.1260.826
PT3.1710.1290.820
Co2PT (ours)2.5370.1230.824
+ +Table 4: Evaluation on Bias-in-Bios. $\star$ : backbone model is BERT-large-uncased. The results of ADELE on this benchmark are not reported in the original paper. + +achieves the lowest $\mathrm{GAP^{RMS}}$ score of 0.113. Furthermore, PT exacerbates bias and results in an increase in the $\mathrm{GAP^{TPR}}$ score from 2.822 to 3.171 and $\mathrm{GAP^{RMS}}$ from 0.119 to 0.129. In contrast, $\mathrm{Co^{2}PT}$ reduces the $\mathrm{GAP^{TPR}}$ score from 3.171 to 2.537 and $\mathrm{GAP^{RMS}}$ from 0.129 to 0.123, demonstrating its effectiveness in mitigating bias in the occupation classification task. + +# 6 Integrating $\mathrm{Co}^2\mathrm{PT}$ with Existing Debiased Models (RQ2) + +One benefit of a prompt-then-finetune model like $\mathrm{Co}^2\mathrm{PT}$ is that it can be easily integrated with existing upstream debiasing methods. Here we investigate the applicability of $\mathrm{Co}^2\mathrm{PT}$ to three existing debiased models to bridge the gap in utilizing upstream debiased models for downstream tasks. Based on the comparison results – before and after applying $\mathrm{Co}^2\mathrm{PT}$ – shown in Table 5, $\mathrm{Co}^2\mathrm{PT}$ significantly reduces the bias scores for Context-Debias and Auto-Debias: 0.088 versus 0.332, and 0.068 versus 0.312, respectively. For MABEL, which achieves low bias scores, there is no significant effect on the bias score. Additionally, $\mathrm{Co}^2\mathrm{PT}$ improves the model performance on the downstream tasks. These results clearly demonstrate the effectiveness of integrating $\mathrm{Co}^2\mathrm{PT}$ into established debiased models for downstream tasks. This ability enables the existing debiased models to achieve strong performance on downstream tasks while simultaneously maintaining a low bias level. + +
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.3320.9160.5390.879 / 0.876
+ Co2PT0.0880.3610.0100.885 / 0.881
Auto-Debias0.3120.9020.5020.884 / 0.880
+ Co2PT0.0680.2310.0050.883 / 0.878
MABEL0.0660.2040.0130.889 / 0.885
+ Co2PT0.0680.2280.0050.892 / 0.889
+ +# 7 Impact of Design (RQ3) + +We perform an extensive ablation study to show how different components affect $\mathrm{Co}^{2}\mathrm{PT}$ in Table 6. We use Bias-STS-B as the representative task for computational efficiency. + +Impact of counterfactual module. First, we perform counterfactual data augmentation on the training data containing bias-attribute terms. Then we conduct prompt tuning only on these augmented pairs (denoted as PT+CDA). PT+CDA reduces + +the bias score from 0.321 in PT to 0.291, showing the effectiveness of the straightforward counterfactual data augmentation approach. However, the improvement is less than $\mathrm{Co}^2\mathrm{PT}$ , implying the necessity of the contrastive learning module. + +Impact of contrastive module. To investigate the impact of the contrastive module, instead of employing constructed counterfactual sentence pairs as positive pairs for contrastive loss, we use unsupervised contrastive loss by encoding the same input twice and get two embeddings with different dropout masks $z$ , $z'$ (Gao et al., 2021). Then the contrastive objective becomes: + +$$ +\mathcal {L} _ {s c l} = - \log \frac {e ^ {\operatorname {s i m} \left(\mathbf {p} \oplus \mathbf {h} _ {i} ^ {z _ {i}} , \mathbf {p} \oplus \mathbf {h} _ {i} ^ {z _ {i} ^ {\prime}}\right) / \tau}}{\sum_ {j = 1} ^ {N} e ^ {\operatorname {s i m} \left(\mathbf {p} \oplus \mathbf {h} _ {i} ^ {z _ {i}} , \mathbf {p} \oplus \mathbf {h} _ {j} ^ {z _ {j} ^ {\prime}}\right) / \tau}}, \tag {5} +$$ + +which is optimized with the prompt tuning loss $\mathcal{L}_{pt}$ together (denoted as PT+SCL). PT+SCL surpasses both PT and PT+CDA by achieving a large reduction in bias score to 0.161, demonstrating the effectiveness of the contrastive module. + +Impact of adding contrastive loss for non-augmented inputs. In $\mathrm{Co}^2\mathrm{PT}$ , we only consider counterfactually augmented pairs in the contrastive module. To explore the necessity of including inputs without demographic terms in the contrastive module, we incorporate unsupervised contrastive loss for non-augmented input like Equation 5 as $\mathcal{L}_{scl}'$ and tuned with contrastive loss $\mathcal{L}_{cl}$ for counter-factly augmented pairs (Equation 1) and $\mathcal{L}_{pt}'$ (denoted as $\mathrm{Co}^2\mathrm{PT} + \mathrm{SCL}_n$ ). The bias score of 0.117 achieved by $\mathrm{Co}^2\mathrm{PT} + \mathrm{SCL}_n$ is higher than $\mathrm{Co}^2\mathrm{PT}$ and this indicates that incorporating a contrastive loss for non-augmented inputs in the training set is unnecessary. + +Compare $\mathrm{Co}^2\mathrm{PT}$ with task-agnostic counterfactual pairs. To investigate whether integrating task-agnostic neutral entailment pairs can benefit debiasing on the task, we use 142,158 gender-balanced entailment pairs augmented from SNLI and MNLI + +Table 5: Performance of integrating $\mathrm{Co}^2\mathrm{PT}$ with debiased models on Bias-STS-B. + +
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
PT+CDA0.2910.7470.3510.890 / 0.886
PT+SCL0.1610.5480.1330.883 / 0.878
Co2PT+SCLn0.1170.4670.0560.884 / 0.878
PT+NLI+CL0.0800.2800.0220.881 / 0.876
PT+NLI+CLp0.2070.6870.2220.884 / 0.881
PT+CDA+CLp0.2710.7250.3380.886 / 0.883
Co2PT (PT+CDA+CL)0.0580.1670.0050.884 / 0.880
+ +Table 6: Impact of different components. + +datasets in He et al. (2022) as task-agnostic entailment pairs for STS-B task instead of using the task-specific counterfactual pairs augmented from the training set (denoted as $\mathbf{PT} + \mathbf{NLI} + \mathbf{CL}$ ). We notice that although $\mathrm{PT} + \mathrm{NLI} + \mathrm{CL}$ does not outperform $\mathrm{Co}^2\mathrm{PT}$ , it shows a strong ability to mitigate bias compared to other baseline methods. Thus, when working on a moderate amount of training data, it is better to use counterfactually augmented pairs from the training data. + +Compare $\mathrm{Co}^2\mathrm{PT}$ with other contrastive objective. For sentence-pair classification tasks, we also explore the contrastive loss that encourages the inter-association of entailment pairs (He et al., 2022). For the original input pair $(s_{i1}, s_{i2})$ and its augmented pair $(s_{i1}'', s_{i2}')$ , $s_{i1}$ and $s_{i2}$ are treated as positive pairs while $s_{i1}$ and $s_{i2}'$ and other in-batch $s_{j2}$ are negatives, and vice versa (denoted as $\mathbf{CL_p}$ ). When using task-specific counterfactual pairs, $\mathrm{PT + CDA + CL_p}$ decreases the bias score to 0.271. Similarly, using task-agnostic counterfactual pairs, $\mathrm{PT + NLI + CL_p}$ also reduces the bias score to 0.271. However, the bias mitigation effect is not as significant as that achieved by $\mathrm{Co}^2\mathrm{PT}$ , which indicates the effectiveness of the contrastive module in $\mathrm{Co}^2\mathrm{PT}$ . + +# 8 Impact of Hyperparameters (RQ4) + +Finally, we investigate the impact of three hyperparameters: (i) the continuous prompt length; (ii) the temperature $\tau$ of contrastive loss $\mathcal{L}_{cl}$ ; and (iii) the coefficient $\alpha$ of total learning objective $\mathcal{L}$ . + +Impact of prompt length. First, we experiment with the prompt length varying in $\{10,20,50\}$ , as illustrated in Figure 2. Generally speaking, with more tunable prompt parameters, the model performs better on downstream tasks. In addition, when the prompt length is $10$ , $\mathrm{Co}^2\mathrm{PT}$ shows a higher increase in bias score compared to the prompt length of 20 and 50. This indicates that a + +![](images/897ef13ff3cffd359f7e9993c5e4b85eba83c26cba597c98bb4d89185f489205.jpg) +Figure 2: Impact of prompt length. + +![](images/cf61ad18743b6131a257e5515d94e70c4303acd02ef194c7f1ac7f5a06d85991.jpg) +Figure 3: $\tau$ in $\{0.005, 0.05, 0.5\}$ while $\alpha = 1.0$ . + +![](images/9cea2a3eb3163472276911af06c1b6a8e3b4fbb950dc18755b2a3dfa0fcb0158.jpg) +Figure 4: $\alpha$ in $\{0.1, 0.5, 1.0\}$ while $\tau = 0.05$ . + +larger prompt length enables the model to achieve better model performance on downstream tasks more rapidly while still maintaining a lower bias score. However, it is important to consider that using larger prompt lengths means tuning more parameters, thus posing a trade-off. + +Impact of $\tau$ . Then, we vary temperature $\tau$ in $\{0.005, 0.05, 0.5\}$ . Figure 3 shows close significant bias mitigation effects when $\tau$ is set to 0.005 and 0.05 while exhibiting less effectiveness when $\tau$ is 0.5. This observation implies that a higher temperature value corresponds to less weight of the cosine similarity calculation, resulting in decreased effectiveness in bias mitigation. + +Impact of $\alpha$ . Last, we study the impact of coefficient $\alpha$ and vary the value in $\{0.1, 0.5, 1.0\}$ . Figure 4 emphasizes that reducing the value of $\alpha$ at a constant $\tau$ , thus assigning less weight to the contrastive module, leads to decreased bias mitigation effects. This analysis underscores the importance of carefully selecting appropriate hyperparameters. + +# 9 Conclusion and Future Work + +We propose $\mathrm{Co}^2\mathrm{PT}$ , an efficient and effective debiasing method for mitigating bias in downstream tasks. We evaluate its effectiveness on bias mitigation and applicability to existing debiased upstream models, and investigate how the design of each component and the selection of hyperparameters impact both its bias reduction capabilities and downstream task performance. + +Mitigating non-gender and intersectional bias. Mitigating non-gender biases is challenging as some debiasing methods work well on reducing gender biases but show poor generalization capabilities in addressing biases beyond gender (Meade et al., 2022). Without re-training the model, $\mathrm{Co}^2\mathrm{PT}$ is flexible to apply in order to mitigate different bias types in downstream applications. One can train different debiasing prompts to tackle different bias dimensions such as gender, race, and religion. Furthermore, these debiasing prompts can be applied to mitigate intersectional bias by simply combining the corresponding prompts in downstream tasks. + +# Limitations + +While this work primarily addresses bias in English, we acknowledge the presence of more complicated bias cases in other languages. Therefore, future exploration of existing methods or the development of new techniques to mitigate bias in other languages would be valuable. Furthermore, despite the efficiency and comparable performance of deep prompt tuning compared to fine-tuning, it still underperforms fine-tuning on certain datasets when the model size is small. This will also limit the model performance of our method. + +# Ethics Statement + +In this work, when investigating gender bias in pre-trained language models, we focus on the binary definition of gender as the targeted attribute of discrimination. However, it is important to acknowledge that future research should also consider non-binary genders and other multi-class scenarios to comprehensively address bias. + +# Acknowledgements + +We thank Nicholas Meade for the initial discussion and anonymous reviewers for valuable feedback. + +# References + +Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877-1901. +Yang Trista Cao, Yada Pruksachatkun, Kai-Wei Chang, Rahul Gupta, Varun Kumar, Jwala Dhamala, and Aram Galstyan. 2022. On the intrinsic and extrinsic + +fairness evaluation metrics for contextualized language representations. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 561-570, Dublin, Ireland. Association for Computational Linguistics. +Pengyu Cheng, Weituo Hao, Siyang Yuan, Shijing Si, and Lawrence Carin. 2021. FairFil: Contrastive Neural Debiasing Method for Pretrained Text Encoders. In International Conference on Learning Representations. +Maria De-Arteaga, Alexey Romanov, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, and Adam Tauman Kalai. 2019. Bias in bios: A case study of semantic representation bias in a high-stakes setting. In Proceedings of the Conference on Fairness, Accountability, and Transparency, pages 120-128. +Sunipa Dev, Tao Li, Jeff M Phillips, and Vivek Srikumar. 2020. On measuring and mitigating biased inferences of word embeddings. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 7659-7666. +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. +Xiangjue Dong, Yun He, Ziwei Zhu, and James Caverlee. 2023a. PromptAttack: Probing dialogue state trackers with adversarial prompts. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 10651-10666, Toronto, Canada. Association for Computational Linguistics. +Xiangjue Dong, Jiaying Lu, Jianling Wang, and James Caverlee. 2023b. Closed-book question generation via contrastive learning. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 3150-3162, Dubrovnik, Croatia. Association for Computational Linguistics. +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. +Seraphina Goldfarb-Tarrant, Rebecca Marchant, Ricardo Muñoz Sánchez, Mugdha Pandya, and Adam Lopez. 2021. Intrinsic bias metrics do not correlate with application bias. 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 1926-1940, Online. Association for Computational Linguistics. +Yue Guo, Yi Yang, and Ahmed Abbasi. 2022. Autodebias: Debiasing masked language models with automated biased prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1012-1023, Dublin, Ireland. Association for Computational Linguistics. +Xudong Han, Timothy Baldwin, and Trevor Cohn. 2021. Diverse adversaries for mitigating bias in training. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2760-2765, Online. Association for Computational Linguistics. +Jacqueline He, Mengzhou Xia, Christiane Fellbaum, and Danqi Chen. 2022. MABEL: Attenuating gender bias using textual entailment data. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9681-9702, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. +Masahiro Kaneko and Danushka Bollegala. 2021. Debiasing pre-trained contextualised embeddings. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1256-1266, Online. Association for Computational Linguistics. +Masahiro Kaneko, Danushka Bollegala, and Naoaki Okazaki. 2022. Debiasing isn't enough! - on the effectiveness of debiasing MLMs and their social biases in downstream tasks. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1299-1310, Gyeongju, Republic of Korea. International Committee on Computational Linguistics. +Anne Lauscher, Tobias Lueken, and Goran Glavš. 2021. Sustainable modular debiasing of language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 4782-4797, Punta Cana, Dominican Republic. Association for Computational Linguistics. +Klas Leino, Matt Fredrikson, Emily Black, Shayak Sen, and Anupam Datta. 2019. Feature-Wise Bias Amplification. In International Conference on Learning Representations (ICLR). +Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. + +Quentin Lhoest, Albert Villanova del Moral, Yacine Jernite, Abhishek Thakur, Patrick von Platen, Suraj Patil, Julien Chaumont, Mariama Drame, Julien Plu, Lewis Tunstall, Joe Davison, Mario Šaško, Gunjan Chhablani, Bhavitvya Malik, Simon Brandeis, Teven Le Scao, Victor Sanh, Canwen Xu, Nicolas Patry, Angelina McMillan-Major, Philipp Schmid, Sylvain Gugger, Clément Delangue, Théo Matussière, Lysandre Debut, Stas Bekman, Pierrick Cistac, Thibault Goehringer, Victor Mustar, François Lagunas, Alexander Rush, and Thomas Wolf. 2021. Datasets: A community library for natural language processing. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 175-184, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. +Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. 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 4582-4597, Online. Association for Computational Linguistics. +Yingji Li, Mengnan Du, Xin Wang, and Ying Wang. 2023. Prompt tuning pushes farther, contrastive learning pulls closer: A two-stage approach to mitigate social biases. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14254-14267, Toronto, Canada. Association for Computational Linguistics. +Paul Pu Liang, Irene Mengze Li, Emily Zheng, Yao Chong Lim, Ruslan Salakhutdinov, and Louis-Philippe Morency. 2020. Towards debiasing sentence representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5502-5515, Online. Association for Computational Linguistics. +Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. 2022. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 61-68, Dublin, Ireland. Association for Computational Linguistics. +Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. arXiv preprint arXiv:2103.10385. +Kaiji Lu, Piotr Mardziel, Fangjing Wu, Preetam Amancharla, and Anupam Datta. 2020. Gender bias in neural natural language processing. *Logic, Language, and Security: Essays Dedicated to Andre Scedrov on the Occasion of His 65th Birthday*, pages 189-202. +Chandler May, Alex Wang, Shikha Bordia, Samuel R. Bowman, and Rachel Rudinger. 2019. On measuring + +social biases in sentence encoders. 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 622-628, Minneapolis, Minnesota. Association for Computational Linguistics. +Nicholas Meade, Elinor Poole-Dayan, and Siva Reddy. 2022. An empirical survey of the effectiveness of debiasing techniques for pre-trained language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1878-1898, Dublin, Ireland. Association for Computational Linguistics. +Moin Nadeem, Anna Bethke, and Siva Reddy. 2021. StereoSet: Measuring stereotypical bias in pretrained language models. 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 5356-5371, Online. Association for Computational Linguistics. +Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. 2020. CrowS-pairs: A challenge dataset for measuring social biases in masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1953-1967, Online. Association for Computational Linguistics. +Shauli Ravfogel, Yanai Elazar, Hila Gonen, Michael Twiton, and Yoav Goldberg. 2020. Null it out: Guarding protected attributes by iterative nullspace projection. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7237-7256, Online. Association for Computational Linguistics. +Alexey Romanov, Maria De-Arteaga, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, Anna Rumshisky, and Adam Kalai. 2019. What's in a name? Reducing bias in bios without access to protected attributes. 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 4187-4195, Minneapolis, Minnesota. Association for Computational Linguistics. +Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. 2018. Gender bias in coreference resolution. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 8-14, New Orleans, Louisiana. Association for Computational Linguistics. +Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in NLP. Transactions of the Association for Computational Linguistics, 9:1408-1424. + +Rachael Tatman. 2017. Gender and dialect bias in YouTube's automatic captions. In Proceedings of the First ACL Workshop on Ethics in Natural Language Processing, pages 53-59, Valencia, Spain. Association for Computational Linguistics. +Yibo Wang, Congying Xia, Guan Wang, and Philip S. Yu. 2022. Continuous Prompt Tuning Based Textual Entailment Model for E-commerce Entity Typing. In 2022 IEEE International Conference on Big Data (Big Data), pages 1383-1388. +Kellie Webster, Xuezhi Wang, Ian Tenney, Alex Beutel, Emily Pittler, Ellie Pavlick, Jilin Chen, Ed Chi, and Slav Petrov. 2020. Measuring and reducing gendered correlations in pre-trained models. arXiv preprint arXiv:2010.06032. +Zhongbin Xie and Thomas Lukasiewicz. 2023. An empirical analysis of parameter-efficient methods for debiasing pre-trained language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15730-15745, Toronto, Canada. Association for Computational Linguistics. +Ke Yang, Charles Yu, Yi Fung, Manling Li, and Heng Ji. 2022. ADEPT: A DEbiasing Prompt Framework. arXiv preprint arXiv:2211.05414. +Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2017. Men also like shopping: Reducing gender bias amplification using corpus-level constraints. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2979–2989, Copenhagen, Denmark. Association for Computational Linguistics. +Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 15–20, New Orleans, Louisiana. Association for Computational Linguistics. +Ran Zmigrod, Sabrina J. Mielke, Hanna Wallach, and Ryan Cotterell. 2019. Counterfactual data augmentation for mitigating gender stereotypes in languages with rich morphology. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1651-1661, Florence, Italy. Association for Computational Linguistics. + +# Appendix + +# A More Implementation Details + +# A.1 Dataset and Extrinsic Bias Benchmarks + +STS-B and SNLI datasets are from the Hugging Face Datasets library (Lhoest et al., 2021). We use the same Bias-in-Bios dataset used in Ravfogel et al. (2020), the Bias-STS-B used in Lauscher et al. (2021) and the Bias-NLI used in He et al. (2022). The code used to assess Bias-STS-B is modified from Lauscher et al. (2021), while the code for evaluating Bias-NLI and Bias-in-Bios is adapted from He et al. (2022). Different from the code employed in He et al. (2022), we conduct our evaluation on the entire Bias-NLI dataset rather than just the top $10\%$ of it. + +# A.2 Debiased Baselines + +Please refer to the footnotes here for the source of released debiased models - ZariCDA, ZariDO $^4$ (Webster et al., 2020), Context-Debias $^5$ (Kaneko and Bollegala, 2021), AutoDebias $^6$ (Guo et al., 2022), MABEL $^7$ (He et al., 2022) - used on downstream tasks. + +# A.3 Implementation Details + +We use BERT-base-uncased in our experiments. For the single-sentence classification task, we preprocess the [CLS] token before the input sentences and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. For the sentence-pair classification task, e.g., SNLI task, we preprocess [CLS] before the premise $x$ and [SEP] token to separate premise $x$ and hypothesis $y$ and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. Fine-tuning and prompt tuning code rely on the Huggingface implementation. $^{8}$ + +# B More Ablation Studies + +Pooling method. Besides using pooled output, we also conduct experiments that use the average token representation from the model's last hidden state as sentence representation, shown in Table 7. However, upon analyzing the results, $\mathrm{Co}^2\mathrm{PT}_{\mathrm{avg}}$ is considerably more challenging for the prompts to acquire the debiasing capability when using the average token representation compared to when utilizing the CLS token as the sentence representation. + +
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
Co2PTavg.0.3900.8230.4970.891 / 0.886
Co2PTcls (ours)0.0580.1670.0050.884 / 0.880
+ +# C Standard Deviation of Results + +The standard deviation of evaluation results on extrinsic bias benchmarks – Bias-STS-B, Bias-NLI, and Bias-in-Bios – are presented in Tables 8 to 10, respectively. In addition, the results of integrating $\mathrm{Co}^2\mathrm{PT}$ with existing debiased models and ablation study are shown in Table 11 and Table 12. These results indicate that $\mathrm{Co}^2\mathrm{PT}$ consistently performs well with relatively low variability, demonstrating its effectiveness and reliability. + +Table 7: More ablation results. + +
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.0180.0240.0560.002 / 0.001
BERT+CDA0.0200.0580.0420.001 / 0.000
ZariCDA*0.0300.1460.0310.004 / 0.003
ZariDO*0.0200.0110.0440.003 / 0.003
Context-Debias0.0420.0520.0980.005 / 0.005
Auto-Debias0.0060.0180.0200.002 / 0.001
MABEL0.0110.0460.0130.004 / 0.004
PT0.0180.0160.0240.001 / 0.001
Co2PT (ours)0.0090.0560.0010.001 / 0.000
+ +Table 8: Results standard deviation on Bias-STS-B. $\star$ : the backbone models are BERT-large-uncased. + +# D Visualization of Bias Mitigation Effects along Epochs + +We visualize the changes of bias scores along epochs in Figure 5. The bias score of PT keeps increasing as the Pearson score increases, while $\mathrm{Co}^2\mathrm{PT}$ consistently maintains a low bias score, which indicates the effectiveness of $\mathrm{Co}^2\mathrm{PT}$ on bias mitigation. + +
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.0270.0420.0410.0360.002
BERT+CDA0.0120.0100.0100.0020.003
ZariCDA*0.0820.0810.0820.0970.001
ZariDO*0.0780.0830.0830.0930.001
Context-Debias0.0300.0460.0460.0500.001
Auto-Debias0.0100.0190.0190.0120.002
MABEL0.0180.0030.0020.0140.001
PT0.0230.0320.0310.0280.001
Co2PT (ours)0.0160.0210.0220.0270.004
+ +Table 9: Results standard deviation on Bias-NLI. $\star$ : the backbone models are BERT-large-uncased. + +
ModelGAPTPR↓GAPRMS↓Acc.
BERT0.1380.0040.001
BERT+CDA0.0340.0010.002
ZariCDA*0.0690.0060.000
ZariDO*0.0740.0100.003
Context-Debias0.0530.0060.003
Auto-Debias0.1460.0040.002
MABEL0.1140.0060.001
PT0.0660.0050.001
Co2PT (ours)0.0250.0050.007
+ +Table 10: Results standard deviation on Bias-in-Bios. $\star$ : the backbone models are BERT-large-uncased. + +
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.0420.0520.0980.005 / 0.005
+ Co2PT0.0310.1940.0110.000 / 0.001
Auto-Debias0.0060.0180.0200.002 / 0.001
+ Co2PT0.0080.0370.0050.002 / 0.002
MABEL0.0110.0460.0130.004 / 0.004
+ Co2PT0.0210.1030.0230.000 / 0.000
+ +Table 11: Performance of integrating $\mathrm{Co}^2\mathrm{PT}$ with debiased models on Bias-STS-B. + +
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.0180.0160.0240.001 / 0.001
PT+CDA0.0080.0080.0070.000 / 0.000
PT+SCL0.0250.0560.0390.000 / 0.000
Co2PT+SCLn0.0230.0940.0330.001 / 0.001
PT+NLI+CL0.0130.0700.0120.001 / 0.001
PT+NLI+CLp0.0250.0420.0530.001 / 0.001
PT+CDA+CLp0.0300.0310.0510.001 / 0.002
Co2PT (avg.)0.0320.0220.0400.001 / 0.000
Co2PT (PT+CDA+CL)0.0090.0560.0010.001 / 0.000
+ +Table 12: Results standard deviation of ablation study. + +![](images/a9a868c80c17f215d1b0942e00cc044b97b695427562aed0245759b6282e1229.jpg) +Figure 5: Visualization of bias mitigation effects and model performance along epochs. \ No newline at end of file diff --git a/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/images.zip b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..40bd60f932ef69b6c6b39616f56dc3d5eee59c65 --- /dev/null +++ b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7c0f3f2e66ec458a5c76c9a942649d2b06c6264f00d772408a41e38056f336b +size 575266 diff --git a/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/layout.json b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..39ceab598d9b7cce6c034c984f0d7bdcde25a2dc --- /dev/null +++ b/2023/Co2PT_ Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning/layout.json @@ -0,0 +1,10947 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 97, + 76, + 498, + 111 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 97, + 76, + 498, + 111 + ], + "spans": [ + { + "bbox": [ + 97, + 76, + 498, + 111 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^{2}\\mathrm{PT}" + }, + { + "bbox": [ + 97, + 76, + 498, + 111 + ], + "type": "text", + "content": ": Mitigating Bias in Pre-trained Language Models through Counterfactual Contrastive Prompt Tuning" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "spans": [ + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "text", + "content": "Xiangjue Dong" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "text", + "content": " Ziwei Zhu" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "inline_equation", + "content": "^{2}" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "text", + "content": " Zhuoer Wang" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "text", + "content": " Maria Teleki" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "text", + "content": " James Caverlee" + }, + { + "bbox": [ + 88, + 131, + 506, + 145 + ], + "type": "inline_equation", + "content": "^{1}" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 165, + 146, + 431, + 159 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 165, + 146, + 431, + 159 + ], + "spans": [ + { + "bbox": [ + 165, + 146, + 431, + 159 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 165, + 146, + 431, + 159 + ], + "type": "text", + "content": " Texas A&M University " + }, + { + "bbox": [ + 165, + 146, + 431, + 159 + ], + "type": "inline_equation", + "content": "^{2}" + }, + { + "bbox": [ + 165, + 146, + 431, + 159 + ], + "type": "text", + "content": " George Mason University" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 155, + 161, + 441, + 173 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 161, + 441, + 173 + ], + "spans": [ + { + "bbox": [ + 155, + 161, + 441, + 173 + ], + "type": "text", + "content": "{xj.dong, wang, mariateleki, caverlee}@tamu.edu zzhu20@gmu.edu" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 155, + 212, + 202, + 226 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 212, + 202, + 226 + ], + "spans": [ + { + "bbox": [ + 155, + 212, + 202, + 226 + ], + "type": "text", + "content": "Abstract" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "spans": [ + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "text", + "content": "Pre-trained Language Models are widely used in many important real-world applications. However, recent studies show that these models can encode social biases from large pre-training corpora and even amplify biases in downstream applications. To address this challenge, we propose " + }, + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "text", + "content": ", an efficient and effective debiaswhile-prompt tuning method for mitigating biases via counterfactual contrastive prompt tuning on downstream tasks. Our experiments conducted on three extrinsic bias benchmarks demonstrate the effectiveness of " + }, + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "text", + "content": " on bias mitigation during the prompt tuning process and its adaptability to existing upstream debiased language models. These findings indicate the strength of " + }, + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 86, + 238, + 274, + 454 + ], + "type": "text", + "content": " and provide promising avenues for further enhancement in bias mitigation on downstream tasks." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 465, + 154, + 479 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 465, + 154, + 479 + ], + "spans": [ + { + "bbox": [ + 69, + 465, + 154, + 479 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 68, + 489, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 489, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 68, + 489, + 291, + 772 + ], + "type": "text", + "content": "Pre-trained language models (PLMs) are widely used in many real-world applications, demonstrating remarkable performance (Devlin et al., 2019; Brown et al., 2020). However, it has been demonstrated that PLMs encode unfair social biases in their parameters based on their pre-training step over large-scale text corpora (May et al., 2019). Furthermore, these biases – for example, based on gender, race, or religion – can easily propagate to the downstream tasks that use these PLMs (Kaneko and Bollegala, 2021). For example, “She is a nurse” can have a higher conditional likelihood than “He is a nurse” in the language modeling task, and “nurse” can have higher coreference scores to “she” than “he” in the coreference resolution task (Lu et al., 2020). Considering that NLP applications like machine translation systems, resume filtering systems, dialogue systems, and speech recognition (Tatman, 2017) are widely used by millions of users globally, it is crucial to mitigate the social biases present in PLMs and strive for models that" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 304, + 213, + 525, + 253 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 213, + 525, + 253 + ], + "spans": [ + { + "bbox": [ + 304, + 213, + 525, + 253 + ], + "type": "text", + "content": "will not propagate discriminatory predictions or offensive outputs towards specific groups before being deployed." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 304, + 255, + 526, + 470 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 255, + 526, + 470 + ], + "spans": [ + { + "bbox": [ + 304, + 255, + 526, + 470 + ], + "type": "text", + "content": "Much prior effort has focused primarily on debiasing the representations learned during the pretraining process, e.g., through projection (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), further pre-training on unbiased external corpora (Webster et al., 2020; Lauscher et al., 2021; He et al., 2022), or finetuning to debias (Cheng et al., 2021; Guo et al., 2022). The effectiveness of such debiasing efforts is typically measured on intrinsic benchmarks like SEAT (Sentence Encoding Association Test) which computes the association between demographic terms (e.g., woman, man) and stereotype terms (e.g., science, art). An unbiased model should display no difference in the similarity between the representations of these terms (May et al., 2019)." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 304, + 474, + 525, + 729 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 474, + 525, + 729 + ], + "spans": [ + { + "bbox": [ + 304, + 474, + 525, + 729 + ], + "type": "text", + "content": "While these existing approaches help reduce social biases under intrinsic measures, these debias-then-finetune methods are based on the hypothesis that if an upstream model is unbiased, it will also preserve its fairness effects on downstream tasks during the fine-tuning process. However, recent research investigating the relationship between intrinsic and extrinsic benchmarks (which evaluate fairness in downstream applications) finds these two benchmarks correlate weakly (Kaneko et al., 2022). Furthermore, they observe that models, even after being debiased, tend to re-acquire or even amplify biases (e.g., instance-related biases and label-related biases) during the fine-tuning process on downstream tasks (Zhao et al., 2017; Leino et al., 2019). Thus, this mismatch leads to our motivating research question - How can we develop an efficient and effective method to mitigate bias on downstream tasks?" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 305, + 733, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 305, + 733, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 305, + 733, + 525, + 772 + ], + "type": "text", + "content": "To answer the aforementioned question, we propose " + }, + { + "bbox": [ + 305, + 733, + 525, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 305, + 733, + 525, + 772 + ], + "type": "text", + "content": ", a debias-while-prompt tuning approach through Counterfactual Contrastive Prompt" + } + ] + } + ], + "index": 11 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5859" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 129, + 795, + 463, + 818 + ], + "type": "footer", + "angle": 0, + "lines": [ + { + "bbox": [ + 129, + 795, + 463, + 818 + ], + "spans": [ + { + "bbox": [ + 129, + 795, + 463, + 818 + ], + "type": "text", + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5859-5871 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ] + } + ], + "index": 13 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 0 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 130, + 71, + 469, + 199 + ], + "blocks": [ + { + "bbox": [ + 130, + 71, + 469, + 199 + ], + "lines": [ + { + "bbox": [ + 130, + 71, + 469, + 199 + ], + "spans": [ + { + "bbox": [ + 130, + 71, + 469, + 199 + ], + "type": "image", + "image_path": "f1bdc1048544f22ab384b3e44a74cf3ebb9736aa301305e8d34de80a85d97230.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "lines": [ + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "spans": [ + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "type": "text", + "content": "Figure 1: The overview of " + }, + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "type": "text", + "content": ". First, we construct counterfactual pairs from the training data. Then, we learn debiased continuous prompts by simultaneously optimizing prompt tuning loss " + }, + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{pt}" + }, + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "type": "text", + "content": " on downstream tasks and contrastive loss " + }, + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{cl}" + }, + { + "bbox": [ + 66, + 211, + 525, + 248 + ], + "type": "text", + "content": " between the counterfactual pairs." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 264, + 291, + 629 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 264, + 291, + 629 + ], + "spans": [ + { + "bbox": [ + 69, + 264, + 291, + 629 + ], + "type": "text", + "content": "Tuning. In this method, we first freeze all parameters of the PLM and add tunable continuous prompts for every layer. Unlike the previous debias-then-finetune methods that require expensive re-training of the original PLM and risk knowledge forgetting, this deep prompt tuning framework saves computational and memory resources while preserving the original pre-trained knowledge and language modeling ability (Li and Liang, 2021; Liu et al., 2022). To ensure that a fair system generates unbiased results regardless of the demographic terms used, we construct counterfactual pairs directly from the training data, eliminating the need for external corpora that heavily depend on their quality for debiasing. Specifically, we replace demographic terms associated with either the dominant or minoritized group in the training data with terms representing the opposite group. Then, we integrate the ability to mitigate bias into the prompt parameters through a contrastive objective between counterfactual pairs while maintaining the parameters of PLMs frozen. " + }, + { + "bbox": [ + 69, + 264, + 291, + 629 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 264, + 291, + 629 + ], + "type": "text", + "content": " can be integrated into existing debiased models to help them mitigate biases on downstream tasks and offer flexibility in addressing different kinds of bias. These advantages establish " + }, + { + "bbox": [ + 69, + 264, + 291, + 629 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 264, + 291, + 629 + ], + "type": "text", + "content": " as an efficient and effective method for mitigating bias in downstream tasks." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 630, + 290, + 671 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 630, + 290, + 671 + ], + "spans": [ + { + "bbox": [ + 67, + 630, + 290, + 671 + ], + "type": "text", + "content": "In conclusion, the proposed " + }, + { + "bbox": [ + 67, + 630, + 290, + 671 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 630, + 290, + 671 + ], + "type": "text", + "content": " mitigates bias on downstream tasks through prompt tuning, making the following contributions:" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 73, + 675, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 6, + "blocks": [ + { + "bbox": [ + 73, + 675, + 289, + 715 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 675, + 289, + 715 + ], + "spans": [ + { + "bbox": [ + 73, + 675, + 289, + 715 + ], + "type": "text", + "content": "- " + }, + { + "bbox": [ + 73, + 675, + 289, + 715 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^{2}\\mathrm{PT}" + }, + { + "bbox": [ + 73, + 675, + 289, + 715 + ], + "type": "text", + "content": " achieves time and memory efficiency without requiring access to an external corpus or retraining the entire model." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 73, + 719, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 719, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 73, + 719, + 291, + 772 + ], + "type": "text", + "content": "- Over three extrinsic bias benchmarks, we show that " + }, + { + "bbox": [ + 73, + 719, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^{2}\\mathrm{PT}" + }, + { + "bbox": [ + 73, + 719, + 291, + 772 + ], + "type": "text", + "content": " effectively mitigates bias amplified during the prompt tuning process on downstream tasks." + } + ] + } + ], + "index": 5 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 308, + 264, + 525, + 317 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 264, + 525, + 317 + ], + "spans": [ + { + "bbox": [ + 308, + 264, + 525, + 317 + ], + "type": "text", + "content": "- Furthermore, " + }, + { + "bbox": [ + 308, + 264, + 525, + 317 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^{2}\\mathrm{PT}" + }, + { + "bbox": [ + 308, + 264, + 525, + 317 + ], + "type": "text", + "content": " can be extended to existing debiased language models, effectively bridging the gap between debiased upstream models and downstream tasks." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 330, + 396, + 343 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 330, + 396, + 343 + ], + "spans": [ + { + "bbox": [ + 302, + 330, + 396, + 343 + ], + "type": "text", + "content": "2 Related Work" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 301, + 354, + 527, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 354, + 527, + 772 + ], + "spans": [ + { + "bbox": [ + 301, + 354, + 527, + 772 + ], + "type": "text", + "content": "Several approaches have been proposed for debiasing pre-trained language models such as projection-based methods (Dev et al., 2020; Liang et al., 2020; Ravfogel et al., 2020; Kaneko and Bollegala, 2021), post-hoc text generation techniques (Schick et al., 2021), adversarial methods (Han et al., 2021), fin-tuning on biased prompts (Guo et al., 2022), with contrastive objective (Cheng et al., 2021) or with augmented data (Zhao et al., 2018), additional pretraining methods on re-balanced corpus through counterfactual data augmentation (Webster et al., 2020; Lauscher et al., 2021; Meade et al., 2022) or with a contrastive objective on gender-balanced entailment pairs (He et al., 2022), using dropout regularization (Webster et al., 2020), through parameter-efficient methods (Lauscher et al., 2021; Yang et al., 2022; Xie and Lukasiewicz, 2023) or with a contrastive objective (Li et al., 2023). While some works do not require access to an external corpus or do not require retraining the entire model, most prior methods primarily focus on mitigating bias within the model's intrinsic characteristics and evaluate the effectiveness of bias mitigation through intrinsic bias benchmarks, e.g., SEAT (May et al., 2019), StereoSet (Nadeem et al., 2021), and CrowS-Pairs (Nangia et al., 2020). Subsequently, they fine-tune the debiased models on downstream tasks and demonstrate that their debiased models retain the language modeling ability and the performance on downstream tasks or extrinsic bias benchmarks, which evaluate fairness in downstream tasks by" + } + ] + } + ], + "index": 9 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "text", + "content": "5860" + } + ] + } + ], + "index": 10 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 1 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 291, + 98 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 291, + 98 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 291, + 98 + ], + "type": "text", + "content": "testing whether the models exhibit different performances among different populations." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 99, + 291, + 233 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 99, + 291, + 233 + ], + "spans": [ + { + "bbox": [ + 67, + 99, + 291, + 233 + ], + "type": "text", + "content": "Nevertheless, recent research shows that these debias-then-finetune methods will re-acquire or even amplify biases during the fine-tuning process on downstream tasks and that intrinsic and extrinsic evaluation bias benchmarks correlate poorly (Goldfarb-Tarrant et al., 2021; Cao et al., 2022; Kaneko et al., 2022). They encourage researchers to focus directly on extrinsic measures of bias of specific applications when addressing bias mitigation (Goldfarb-Tarrant et al., 2021)." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 234, + 291, + 397 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 234, + 291, + 397 + ], + "spans": [ + { + "bbox": [ + 67, + 234, + 291, + 397 + ], + "type": "text", + "content": "Thus, we focus in this paper on mitigating bias on downstream tasks and evaluate using extrinsic evaluation benchmarks directly. In addition, different from the previous methods requiring further pre-training on the counterfactually augmented sentences from an external corpus, e.g., English Wikipedia (Zmigrod et al., 2019; Webster et al., 2020; Meade et al., 2022), BookCorpus (Lauscher et al., 2021), News-Commentary v15 (Yang et al., 2022) or NLI (He et al., 2022), our methods achieve time and memory efficiency by eliminating the need for external corpus access or model retraining." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 407, + 280, + 437 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 407, + 280, + 437 + ], + "spans": [ + { + "bbox": [ + 67, + 407, + 280, + 437 + ], + "type": "text", + "content": "3 Co²PT: Debiasing via Counterfactual Contrastive Prompt Tuning" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 444, + 291, + 540 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 444, + 291, + 540 + ], + "spans": [ + { + "bbox": [ + 67, + 444, + 291, + 540 + ], + "type": "text", + "content": "We propose " + }, + { + "bbox": [ + 67, + 444, + 291, + 540 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 444, + 291, + 540 + ], + "type": "text", + "content": ", a debias-while-prompt tuning parameter-efficient method for mitigating biases on downstream tasks via counterfactual contrastive prompt tuning, presented in Figure 1. Concretely, " + }, + { + "bbox": [ + 67, + 444, + 291, + 540 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 444, + 291, + 540 + ], + "type": "text", + "content": " mitigates bias in PLMs by leveraging counterfactual pairs from training data to produce debiased representations during prompt tuning." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "text", + "content": "Deep Prompt Tuning. First, we introduce the backbone framework of " + }, + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "text", + "content": " - deep prompt tuning. We incorporate continuous prompts as prefix tokens in every layer of the PLM. By doing this, we have more tunable task-specific parameters to enhance per-task capacity while maintaining parameter efficiency (Li and Liang, 2021; Liu et al., 2022; Wang et al., 2022; Dong et al., 2023a). Besides, it can achieve comparable performance to fine-tuning, outperforming methods that only add trainable continuous prompts into the input embedding layer (Lester et al., 2021; Liu et al., 2021), which underperform the fine-tuning methods, especially when the model size is not large (Liu et al., 2022). The prompt tuning loss of proposed " + }, + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "text", + "content": " on the downstream task is represented as " + }, + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{pt}" + }, + { + "bbox": [ + 67, + 543, + 292, + 772 + ], + "type": "text", + "content": ", e.g., cross-entropy loss for a classification task." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "spans": [ + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": "Counterfactual Pairs Construction. Then, the first key question is: how to interject the debiasing capability into the continuous prompts? An unbiased model should make the same predictions independent of the bias-attribute term, thus we apply counterfactual data augmentation to generate counterparts of training examples from the training data during prompt tuning. Concretely, let " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "S" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " represent the training corpus and let " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "W = \\{(w_{1}, w_{2}, \\ldots, w_{m})^{i}\\}_{i=1}^{N}" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " be a set of " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "N" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " bias-attribute term pairs. For each sentence " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "s_{i}" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " in " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "S" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " and each pair " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "(w_{1}, w_{2}, \\ldots, w_{m})" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " in " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "W" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": ", for any " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "w_{i}" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " in " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "s" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": ", we replace it with the term along the opposite bias direction. Take the binary-gender debiasing task shown in Figure 1 for example, the bias-attribute terms are { (man, woman), (he, she), ... } . The \"man\" is in the input sentence \"The man is playing the piano\". We replace it with \"woman\" while leaving non-attribute words unchanged. Then the counterfactually augmented sentence is \"The woman is playing the piano\", and vice versa. The obtained counterfactual sentence of the original sentence " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "s_{i}" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": " is denoted as " + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "inline_equation", + "content": "s_{i}'" + }, + { + "bbox": [ + 301, + 71, + 526, + 383 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "spans": [ + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": "Counterfactual Contrastive Learning. The counterfactual pairs construction allows us to achieve a balance in inputs containing bias-attribute terms. However, how can we ensure that our model generates consistent predictions for both " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "s_i" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "s_i'" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": ", which possess similar semantic meaning but differ in bias direction? To make the model generate predictions independent of biased attributes, it is important for sentences with similar semantics but along different bias directions to be closer (Cheng et al., 2021; He et al., 2022). We apply contrastive learning, of which the objective is to obtain meaningful representations by bringing semantically similar neighbors closer and pushing apart the dissimilar neighbors (Gao et al., 2021; Dong et al., 2023b; Li et al., 2023). In this work, input sentence " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "s_i" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " and its counterpart " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "s_i'" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " are semantically related but in opposite bias directions. We let " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "\\mathbf{h}_i" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "\\mathbf{h}_i'" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " denote the representations of " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "s_i" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "s_i'" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " and then concatenate with the continuous prompt representation " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "\\mathbf{p}" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " as positive pairs. Then we take the cross-entropy objective with in-batch negatives (Gao et al., 2021). The training objective for " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "(\\mathbf{h}_i, \\mathbf{h}_i')" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " with a mini-batch of " + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "inline_equation", + "content": "N" + }, + { + "bbox": [ + 302, + 386, + 526, + 709 + ], + "type": "text", + "content": " pairs is:" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 331, + 717, + 525, + 753 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 331, + 717, + 525, + 753 + ], + "spans": [ + { + "bbox": [ + 331, + 717, + 525, + 753 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {c l} = - \\log \\frac {e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} , \\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {\\prime}\\right) / \\tau}}{\\sum_ {j = 1} ^ {N} e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} , \\mathbf {p} \\oplus \\mathbf {h} _ {j} ^ {\\prime}\\right) / \\tau}}, \\tag {1}", + "image_path": "34b1029ac7064dd34bfa6f26b71978a9cddd84921218274738a8843a03d058f4.jpg" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 760, + 525, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 760, + 525, + 773 + ], + "spans": [ + { + "bbox": [ + 302, + 760, + 525, + 773 + ], + "type": "text", + "content": "where " + }, + { + "bbox": [ + 302, + 760, + 525, + 773 + ], + "type": "inline_equation", + "content": "\\mathrm{sim}(\\mathbf{x}_i,\\mathbf{y}_i)" + }, + { + "bbox": [ + 302, + 760, + 525, + 773 + ], + "type": "text", + "content": " is the cosine similarity of " + }, + { + "bbox": [ + 302, + 760, + 525, + 773 + ], + "type": "inline_equation", + "content": "\\mathbf{x}_i" + }, + { + "bbox": [ + 302, + 760, + 525, + 773 + ], + "type": "text", + "content": " and" + } + ] + } + ], + "index": 9 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "type": "text", + "content": "5861" + } + ] + } + ], + "index": 10 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "spans": [ + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "inline_equation", + "content": "\\mathbf{y}_i" + }, + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "text", + "content": ": " + }, + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "inline_equation", + "content": "\\mathrm{sim}(\\mathbf{x}_i,\\mathbf{y}_i) = \\mathbf{x}_i^\\top \\mathbf{y}_i / \\| \\mathbf{x}_i\\| \\| \\mathbf{y}_i\\|" + }, + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "inline_equation", + "content": "\\oplus" + }, + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "text", + "content": " is the concatenation of two representations, and " + }, + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 67, + 70, + 291, + 112 + ], + "type": "text", + "content": " is a temperature hyperparameter." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "spans": [ + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": "For counterfactual pairs " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "(s_i, s_i')" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " in the single-sentence classification task, " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "s_i" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " is the original sentence from the training data and " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "s_i'" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " is the augmented sentence that has the same semantic meaning as " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "s_i" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " but in a different bias direction. For sentence-pair classification, like in the SNLI task, with " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "x_i" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " as the premise and " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "y_i" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " as the hypothesis, " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "s_i" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " is the original premise-hypothesis pair " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "(x_i, y_i)" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " while " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "s_i'" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": " is the counterfactual augmented premise-hypothesis pair " + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "inline_equation", + "content": "(x_i', y_i')" + }, + { + "bbox": [ + 69, + 113, + 291, + 275 + ], + "type": "text", + "content": ". Similarly, the sentence representations are concatenated with continuous prompts to calculate the contrastive loss through Equation 1." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 280, + 291, + 346 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 280, + 291, + 346 + ], + "spans": [ + { + "bbox": [ + 67, + 280, + 291, + 346 + ], + "type": "text", + "content": "Learning Objectives. Finally, the continuous prompts learn-to-debias by simultaneously optimizing the prompt tuning loss " + }, + { + "bbox": [ + 67, + 280, + 291, + 346 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{pt}" + }, + { + "bbox": [ + 67, + 280, + 291, + 346 + ], + "type": "text", + "content": " on downstream tasks and contrastive loss " + }, + { + "bbox": [ + 67, + 280, + 291, + 346 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{cl}" + }, + { + "bbox": [ + 67, + 280, + 291, + 346 + ], + "type": "text", + "content": " between the counterfactual pairs:" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 139, + 360, + 290, + 375 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 139, + 360, + 290, + 375 + ], + "spans": [ + { + "bbox": [ + 139, + 360, + 290, + 375 + ], + "type": "interline_equation", + "content": "\\mathcal {L} = \\mathcal {L} _ {p t} + \\alpha \\mathcal {L} _ {c l}, \\tag {2}", + "image_path": "2c582dcbfcd1c68d919f0519dbec7bb1d2d9d4f6cab715b23de3cb381999b1f9.jpg" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 386, + 291, + 616 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 386, + 291, + 616 + ], + "spans": [ + { + "bbox": [ + 67, + 386, + 291, + 616 + ], + "type": "text", + "content": "where " + }, + { + "bbox": [ + 67, + 386, + 291, + 616 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 67, + 386, + 291, + 616 + ], + "type": "text", + "content": " is a tunable coefficient hyperparameter. As stated before, we only tune the parameters of the debiasing continuous prompts while maintaining the parameters of PLMs frozen throughout the training. After the counterfactual contrastive prompt tuning, the debiasing knowledge is stored in the prompt parameters. This approach not only retains the knowledge within the original parameters of PLMs but is also flexible and adaptable to different downstream tasks. For example, we can train different prompts for different bias dimensions such as gender, race, and religion. These prompts can then be combined and applied to downstream tasks. Moreover, considering that prior research primarily concentrates on binary gender, it is more efficient to extend its application to non-binary gender without requiring re-training new debiased models." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 629, + 191, + 643 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 629, + 191, + 643 + ], + "spans": [ + { + "bbox": [ + 67, + 629, + 191, + 643 + ], + "type": "text", + "content": "4 Experimental Setup" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": "We design experiments to test the effectiveness of our proposed " + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": " approach toward answering four questions: RQ1: Will " + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": " mitigate bias on downstream tasks effectively? RQ2: How will the existing intrinsic debiased methods perform on the downstream tasks when they are combined with " + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": "? RQ3: What impact do different modules have on the design of " + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": "? RQ4: How do hyperparameters affect " + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": "?" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 71, + 405, + 83 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 405, + 83 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 405, + 83 + ], + "type": "text", + "content": "4.1 Bias Evaluation" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 89, + 526, + 155 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 89, + 526, + 155 + ], + "spans": [ + { + "bbox": [ + 302, + 89, + 526, + 155 + ], + "type": "text", + "content": "Extrinsic bias benchmarks assess bias via performance gap between different groups in downstream tasks. In this work, we evaluate " + }, + { + "bbox": [ + 302, + 89, + 526, + 155 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 89, + 526, + 155 + ], + "type": "text", + "content": " on three widely used extrinsic bias benchmarks: Bias-STSB, Bias-NLI, and Bias-in-Bios." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "spans": [ + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "text", + "content": "Bias-STS-B (Webster et al., 2020) is adapted from the STS-B task to evaluate gendered correlations, which requires models to predict the semantic similarity between pairs of sentences. Specifically, 276 sentences are collected from the test set as templates and then gendered terms (man, woman) and professional terms from Rudinger et al. (2018) are inserted into each template, forming 16,980 sentence pairs. For instance, if the template is \"A man is walking\", then the sentence pairs are (\"A man is walking\", \"A nurse is walking\") and (\"A woman is walking\", \"A nurse is walking\"). If a model is unbiased towards gender terms, it should assign equal similarity scores to both pairs. We calculate the average absolute difference between the similarity scores of sentence pairs containing male and female terms, and how often the difference between \"male\" and \"female\" sentence pairs " + }, + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "inline_equation", + "content": "> \\tau" + }, + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "text", + "content": ", where we report the results for " + }, + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "inline_equation", + "content": "\\tau = 0.1" + }, + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "inline_equation", + "content": "\\tau = 0.3" + }, + { + "bbox": [ + 302, + 158, + 526, + 428 + ], + "type": "text", + "content": " (Webster et al., 2020). A lower value indicates less bias." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "spans": [ + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "text", + "content": "Bias-NLI (Dev et al., 2020) is a natural language inference dataset consisting of neutral sentence pairs to evaluate the gender-occupation bias. It is constructed by populating the template: \"The subject verb a/an object\", leading to 1,936,512 instances. Concretely, the verb and object slots are filled with activities, e.g., ate a bagel. Then they create neutral entailment pairs by filling the subject slot with an occupation term with a strong gender correlation, e.g., \"nurse\", for the hypothesis, and \"woman\", for the premise, resulting in the instance: The woman ate a bagel; The nurse ate a bagel. neutral. Bias is defined as deviation from neutrality and measured by three metrics: (1) Net Neutral (NN): the average probability that the model assigns a neutral label for all instances, (2) Fraction Neutral (FN): the percentage of instances that the model predicts the neutral label and (3) Threshold: " + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "text", + "content": " (T: " + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "text", + "content": "): the fraction of examples whose probability of neutral are above " + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "text", + "content": ". We report the results for " + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "inline_equation", + "content": "\\tau = 0.5" + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "inline_equation", + "content": "\\tau = 0.7" + }, + { + "bbox": [ + 302, + 433, + 526, + 742 + ], + "type": "text", + "content": " following (Lauscher et al., 2021; He et al., 2022). All three metrics will attain 1 for a bias-free model." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 746, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 746, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 746, + 526, + 772 + ], + "type": "text", + "content": "Bias-in-Bios (De-Arteaga et al., 2019) is a large-scale English dataset studying gender bias in oc" + } + ] + } + ], + "index": 11 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5862" + } + ] + } + ], + "index": 12 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 291, + 166 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 291, + 166 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 291, + 166 + ], + "type": "text", + "content": "cupation classification from the Common Crawl corpus. We report the overall accuracy of the task as well as the accuracy breakdown based on gender. To quantify gender bias, we compute the difference in true positive rates (TPR) between genders across various occupations, denoted as " + }, + { + "bbox": [ + 67, + 71, + 291, + 166 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP}_{g}^{\\mathrm{TPR}}" + }, + { + "bbox": [ + 67, + 71, + 291, + 166 + ], + "type": "text", + "content": " and defined as follows:" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 110, + 173, + 291, + 191 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 110, + 173, + 291, + 191 + ], + "spans": [ + { + "bbox": [ + 110, + 173, + 291, + 191 + ], + "type": "interline_equation", + "content": "\\mathrm {G A P} _ {g} ^ {\\mathrm {T P R}} = \\left| \\mathrm {T P R} _ {g} - \\mathrm {T P R} _ {\\sim g} \\right|, \\tag {3}", + "image_path": "43ae3d0873fdabfb609058ea81ca53a08a776afbc5333bb7e24d216596f2b5f6.jpg" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "spans": [ + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "content": "where " + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "inline_equation", + "content": "\\mathrm{TPR}_g" + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "content": " represents the proportion of individuals correctly predicted given their gender " + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "inline_equation", + "content": "g" + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "content": ", and " + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "inline_equation", + "content": "g" + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "inline_equation", + "content": "\\sim g" + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "content": " are binary genders. Following (Romanov et al., 2019; Ravfogel et al., 2020; He et al., 2022), we also calculate the root mean square of the per-occupation TPR gender gap " + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP}_{g,o}^{\\mathrm{TPR}}" + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "content": " over all occupations " + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "inline_equation", + "content": "o" + }, + { + "bbox": [ + 67, + 196, + 292, + 290 + ], + "type": "text", + "content": ":" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 98, + 298, + 290, + 333 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 98, + 298, + 290, + 333 + ], + "spans": [ + { + "bbox": [ + 98, + 298, + 290, + 333 + ], + "type": "interline_equation", + "content": "\\mathrm {G A P} _ {g} ^ {\\mathrm {R M S}} = \\sqrt {\\frac {1}{| O |} \\sum_ {o \\in O} \\left(\\mathrm {G A P} _ {g , o} ^ {\\mathrm {T P R}}\\right) ^ {2}}. \\tag {4}", + "image_path": "b1622c563b596590e4c29ce41cf4c1d0f98ca696bb8cc666430f6ec3e3d1a36d.jpg" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 340, + 291, + 354 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 340, + 291, + 354 + ], + "spans": [ + { + "bbox": [ + 67, + 340, + 291, + 354 + ], + "type": "text", + "content": "A value closer to 0 indicates a lower degree of bias." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 362, + 186, + 375 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 362, + 186, + 375 + ], + "spans": [ + { + "bbox": [ + 67, + 362, + 186, + 375 + ], + "type": "text", + "content": "4.2 Datasets and Setup" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 380, + 291, + 555 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 380, + 291, + 555 + ], + "spans": [ + { + "bbox": [ + 67, + 380, + 291, + 555 + ], + "type": "text", + "content": "STS-B and SNLI. We fine-tune the models on SNLI and STS-B training sets and pick the one that performs best on the validation set and then evaluate bias using Bias-STS-B and Bias-NLI, respectively. Bias-in-Bios. We use the same data as Ravfogel et al. (2020) which contains 393,423 biographies and 28 profession classes. We split train/validation/test by 65/25/10 following (De-Arteaga et al., 2019; Ravfogel et al., 2020). The dataset statistics are shown in Table 1. For SNLI and Bias-in-Bios, we report accuracy over classification while we report the Pearson and Spearman correlations for STS-B." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 564, + 172, + 576 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 564, + 172, + 576 + ], + "spans": [ + { + "bbox": [ + 67, + 564, + 172, + 576 + ], + "type": "text", + "content": "4.3 Baseline Models" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 581, + 292, + 690 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 581, + 292, + 690 + ], + "spans": [ + { + "bbox": [ + 67, + 581, + 292, + 690 + ], + "type": "text", + "content": "We compare " + }, + { + "bbox": [ + 67, + 581, + 292, + 690 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 581, + 292, + 690 + ], + "type": "text", + "content": " with six upstream debiased models fine-tuned on the downstream tasks, and three baselines fine-tune or prompt-tune BERT models on the downstream tasks: ZariCDA (Webster et al., 2020) is pre-trained from scratch over counterfactual data augmented from English Wikipedia and ZariDO (Webster et al., 2020) is additionally pre-trained with increased dropout rate." + } + ] + } + ], + "index": 8 + }, + { + "type": "table", + "bbox": [ + 79, + 704, + 279, + 749 + ], + "blocks": [ + { + "bbox": [ + 79, + 704, + 279, + 749 + ], + "lines": [ + { + "bbox": [ + 79, + 704, + 279, + 749 + ], + "spans": [ + { + "bbox": [ + 79, + 704, + 279, + 749 + ], + "type": "table", + "html": "
TrainValidationBias-Test
STS-B5,7491,50016,980
SNLI550,15210,0001,936,512
Bias-in-Bios255,71039,36998,344
", + "image_path": "5cfc0cf405775cbbd0ee11cc5afeec7c8f5979770cd50d4776f9f4ea77d49385.jpg" + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "table_body" + } + ], + "index": 9 + }, + { + "bbox": [ + 124, + 756, + 232, + 768 + ], + "lines": [ + { + "bbox": [ + 124, + 756, + 232, + 768 + ], + "spans": [ + { + "bbox": [ + 124, + 756, + 232, + 768 + ], + "type": "text", + "content": "Table 1: Dataset statistics." + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 71, + 526, + 396 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 396 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 396 + ], + "type": "text", + "content": "ADELE and its variant ADELE-TA (Lauscher et al., 2021) inject and train debiased adapters via masked language modeling on the counterfactually augmented corpus. Context-Debias (Kaneko and Bollegala, 2021) is fine-tuned via an inner-product loss and squared distance loss. Auto-Debias (Guo et al., 2022) uses a beam search to search for biased prompts and then uses these biased prompts to finetune PLMs by minimizing the disagreement between predicted [MASK] token distributions. MA-BEL (He et al., 2022) is additionally pre-trained on all entailment pairs that contain gendered terms from SNLI and MNLI data with a contrastive loss, an alignment loss, and an optional masked language modeling loss. BERT (Devlin et al., 2019) is a fine-tuned BERT model on the downstream tasks while BERT+CDA is a fine-tuned BERT model on the counterfactually augmented data from the training sets. PT (Liu et al., 2022) adds continuous prompts to each layer of the models and then tunes the prompts on downstream tasks. The backbone models for ZariCDA and ZariDO are BERT-large-uncased whereas other baselines are BERT-base-uncased (Devlin et al., 2019).1" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 415, + 441, + 428 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 415, + 441, + 428 + ], + "spans": [ + { + "bbox": [ + 302, + 415, + 441, + 428 + ], + "type": "text", + "content": "4.4 Implementation Details" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "spans": [ + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": "For fine-tuning debiased baselines and vanilla BERT, we use the models released by the authors. We set the max length of the sentence to be 128, the learning rate to be " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "2e - 5" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": ", the batch size to be 64, and train for 10 epochs. For " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "\\mathrm{AT + CDA}" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": ", learning rate is 2e-5 and batch size is 128. For PT and " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": ", the backbone models are bert-base-uncased with the learning rate set to " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "1e - 2" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": " and the prompt length set to 20 and are trained for 30 epochs. The batch size is set to 32. For hyperparameters " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": " in Equation 1 and 2, we set " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "\\tau = 0.05" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "inline_equation", + "content": "\\alpha = 1.0" + }, + { + "bbox": [ + 302, + 438, + 525, + 723 + ], + "type": "text", + "content": ". All experiments are run on a single NVIDIA RTX A5000 24GB GPU. For each run, we save the model that performs the best on the development set and evaluate it on extrinsic benchmarks. We report the average results across three runs. All code and data are available at https://github.com/dongxiangjue/Co2PT; additional experimental details and standard deviations are in Appendix A and Appendix C, respectively." + } + ] + } + ], + "index": 13 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 302, + 740, + 525, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 740, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 740, + 525, + 772 + ], + "type": "text", + "content": "1We keep the results of these two BERT-large-uncased checkpoints since Lauscher et al. (2021) also compares these methods with their BERT-base-uncased method." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5863" + } + ] + } + ], + "index": 15 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "bbox": [ + 68, + 70, + 244, + 84 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 70, + 244, + 84 + ], + "spans": [ + { + "bbox": [ + 68, + 70, + 244, + 84 + ], + "type": "text", + "content": "5 Debiasing Effectiveness (RQ1)" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 91, + 291, + 120 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 91, + 291, + 120 + ], + "spans": [ + { + "bbox": [ + 67, + 91, + 291, + 120 + ], + "type": "text", + "content": "We now investigate the effectiveness of " + }, + { + "bbox": [ + 67, + 91, + 291, + 120 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 91, + 291, + 120 + ], + "type": "text", + "content": " in mitigating bias on three extrinsic bias benchmarks." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 136, + 292, + 541 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 136, + 292, + 541 + ], + "spans": [ + { + "bbox": [ + 67, + 136, + 292, + 541 + ], + "type": "text", + "content": "Bias-STS-B. First, we focus on the Bias-STS-B benchmark. As Table 2 indicates, " + }, + { + "bbox": [ + 67, + 136, + 292, + 541 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 136, + 292, + 541 + ], + "type": "text", + "content": " shows the lowest bias scores across all metrics and achieves similar model performance on downstream tasks as the other debiased baselines. We observe that some debiased models exhibit higher bias scores than the original BERT, indicating that debiased language models can relearn biases during fine-tuning on downstream tasks. For example, AutoDebias, one of the state-of-the-art debiased models, demonstrates strong fairness on intrinsic benchmarks, such as SEAT, scores 0.312 in average absolute difference, showing a higher bias level than the original BERT and most of the other baselines. On the other hand, MABEL, which shows strong performance in debiasing downstream tasks, achieves a competitive score of 0.081. Furthermore, compared to fine-tuning the original BERT model on the STS-B training set, PT results in a higher bias score of 0.321 compared to 0.282. This suggests that while fine-tuning only the number of prompt tokens may be parameter efficient, it can result in increased bias due to the presence of an unbalanced dataset. For " + }, + { + "bbox": [ + 67, + 136, + 292, + 541 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 136, + 292, + 541 + ], + "type": "text", + "content": ", we observe a significant reduction in the bias score with the average absolute difference decreasing from 0.321 to 0.058, from 0.749 to 0.167 when the difference exceeds 0.1, and from 0.369 to 0.005 when the difference exceeds 0.3. These findings indicate a substantial improvement in the ability to mitigate bias." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 544, + 291, + 587 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 544, + 291, + 587 + ], + "spans": [ + { + "bbox": [ + 67, + 544, + 291, + 587 + ], + "type": "text", + "content": "Bias-NLI. Next, we focus on the Bias-NLI extrinsic benchmark shown in Table 3. BERT+CDA, Context-Debias, and MABEL achieve lower bias" + } + ] + } + ], + "index": 3 + }, + { + "type": "table", + "bbox": [ + 69, + 602, + 290, + 724 + ], + "blocks": [ + { + "bbox": [ + 69, + 602, + 290, + 724 + ], + "lines": [ + { + "bbox": [ + 69, + 602, + 290, + 724 + ], + "spans": [ + { + "bbox": [ + 69, + 602, + 290, + 724 + ], + "type": "table", + "html": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.2820.8670.4170.883 / 0.879
BERT+CDA0.1310.5110.0800.885 / 0.881
ZariCDA*0.1120.4450.0480.892 / 0.889
ZariDO*0.3470.9220.5850.880 / 0.878
ADELE†0.121--0.889 / -
Context-Debias0.3320.9160.5390.879 / 0.876
Auto-Debias0.3120.9020.5020.884 / 0.880
MABEL0.0660.2040.0130.889 / 0.885
PT0.3210.7490.3690.889 / 0.885
Co2PT (ours)0.0580.1670.0050.884 / 0.880
", + "image_path": "acc8ff244e723cb4d2b3a6500def379c6af3b4e3c46eb935d1fdd8fe258e2ac7.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "table_body" + } + ], + "index": 4 + }, + { + "type": "table", + "bbox": [ + 304, + 68, + 526, + 203 + ], + "blocks": [ + { + "bbox": [ + 67, + 733, + 291, + 769 + ], + "lines": [ + { + "bbox": [ + 67, + 733, + 291, + 769 + ], + "spans": [ + { + "bbox": [ + 67, + 733, + 291, + 769 + ], + "type": "text", + "content": "Table 2: Evaluation on Bias-STS-B. †: results are reported from the ADELE model in the original paper; " + }, + { + "bbox": [ + 67, + 733, + 291, + 769 + ], + "type": "inline_equation", + "content": "\\star" + }, + { + "bbox": [ + 67, + 733, + 291, + 769 + ], + "type": "text", + "content": ": backbone model is BERT-large-uncased." + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 304, + 68, + 526, + 203 + ], + "lines": [ + { + "bbox": [ + 304, + 68, + 526, + 203 + ], + "spans": [ + { + "bbox": [ + 304, + 68, + 526, + 203 + ], + "type": "table", + "html": "
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.8240.8680.8670.8110.909
BERT+CDA0.8730.9420.9410.8940.905
ZariCDA*0.7860.8280.8260.7650.912
ZariDO*0.7470.7820.7790.7110.913
Context-Debias0.8730.9190.9190.8770.910
ADELE-TA†0.5040.557--0.813
AT+CDA‡0.6590.7990.7580.5100.849
Auto-Debias0.8130.8490.8480.7950.908
MABEL0.8530.8920.8910.8460.911
PT0.7410.8120.8080.7290.898
Co2PT (ours)0.8770.9650.9620.9050.886
", + "image_path": "0553720a6c0c3cc891943982d80e60975b598b451424f14dedfa0280a4deac03.jpg" + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "table_body" + } + ], + "index": 6 + }, + { + "bbox": [ + 301, + 300, + 526, + 543 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 300, + 526, + 543 + ], + "spans": [ + { + "bbox": [ + 301, + 300, + 526, + 543 + ], + "type": "text", + "content": "scores than the original BERT across all metrics while the other baseline methods amplify biases during the fine-tuning. Similarly, Auto-Debias performs well on the SEAT benchmark but experiences an increase in bias when applied to downstream tasks, mirroring the trend observed in the Bias-STS-B extrinsic benchmark. Moreover, ADELE, another parameter-efficient method, performs poorly in both bias mitigation and model accuracy. Similar to Bias-STS-B extrinsic benchmark, PT amplifies biases during the tuning process, resulting in a decline in the NN score from 0.824 to 0.741 and the FN score from 0.868 to 0.812. By employing " + }, + { + "bbox": [ + 301, + 300, + 526, + 543 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 301, + 300, + 526, + 543 + ], + "type": "text", + "content": ", we observe significant improvements with the NN score rising to 0.877 (from 0.741) and the FN score reaching 0.965 (from 0.812), indicating the effectiveness of " + }, + { + "bbox": [ + 301, + 300, + 526, + 543 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 301, + 300, + 526, + 543 + ], + "type": "text", + "content": " on bias mitigation." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 550, + 525, + 603 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 550, + 525, + 603 + ], + "spans": [ + { + "bbox": [ + 302, + 550, + 525, + 603 + ], + "type": "text", + "content": "Bias-in-Bios. Next we show the performance on the Bias-in-Bios benchmark in Table 4. Among all the baselines, the ZariCDA achieves the lowest " + }, + { + "bbox": [ + 302, + 550, + 525, + 603 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP^{TPR}}" + }, + { + "bbox": [ + 302, + 550, + 525, + 603 + ], + "type": "text", + "content": " score of 2.667 while the BERT+CDA" + } + ] + } + ], + "index": 9 + }, + { + "type": "table", + "bbox": [ + 314, + 618, + 515, + 724 + ], + "blocks": [ + { + "bbox": [ + 302, + 211, + 526, + 282 + ], + "lines": [ + { + "bbox": [ + 302, + 211, + 526, + 282 + ], + "spans": [ + { + "bbox": [ + 302, + 211, + 526, + 282 + ], + "type": "text", + "content": "Table 3: Evaluation on Bias-NLI. †: results are fine-tuned on MNLI and reported from the ADELE-TA model in the original paper; ‡: adapter tuning on counterfactually augmented data; ★: backbone model is BERT-large-uncased. Other baselines are fine-tuned on SNLI." + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 314, + 618, + 515, + 724 + ], + "lines": [ + { + "bbox": [ + 314, + 618, + 515, + 724 + ], + "spans": [ + { + "bbox": [ + 314, + 618, + 515, + 724 + ], + "type": "table", + "html": "
ModelGAPTPR↓GAPRMS↓Acc.
BERT2.8220.1190.830
BERT+CDA2.7580.1130.841
ZariCDA*2.6670.1350.848
ZariDO*2.7200.1350.847
Context-Debias3.0310.1190.831
Auto-Debias2.6900.1250.831
MABEL2.8390.1260.826
PT3.1710.1290.820
Co2PT (ours)2.5370.1230.824
", + "image_path": "1decd59c07758eb8f45a9714ca042c3a695e509251e07a0663705866720b7226.jpg" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "table_body" + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 733, + 525, + 769 + ], + "lines": [ + { + "bbox": [ + 302, + 733, + 525, + 769 + ], + "spans": [ + { + "bbox": [ + 302, + 733, + 525, + 769 + ], + "type": "text", + "content": "Table 4: Evaluation on Bias-in-Bios. " + }, + { + "bbox": [ + 302, + 733, + 525, + 769 + ], + "type": "inline_equation", + "content": "\\star" + }, + { + "bbox": [ + 302, + 733, + 525, + 769 + ], + "type": "text", + "content": ": backbone model is BERT-large-uncased. The results of ADELE on this benchmark are not reported in the original paper." + } + ] + } + ], + "index": 11, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5864" + } + ] + } + ], + "index": 12 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "spans": [ + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "content": "achieves the lowest " + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP^{RMS}}" + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "content": " score of 0.113. Furthermore, PT exacerbates bias and results in an increase in the " + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP^{TPR}}" + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "content": " score from 2.822 to 3.171 and " + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP^{RMS}}" + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "content": " from 0.119 to 0.129. In contrast, " + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "inline_equation", + "content": "\\mathrm{Co^{2}PT}" + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "content": " reduces the " + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP^{TPR}}" + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "content": " score from 3.171 to 2.537 and " + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "inline_equation", + "content": "\\mathrm{GAP^{RMS}}" + }, + { + "bbox": [ + 67, + 70, + 291, + 179 + ], + "type": "text", + "content": " from 0.129 to 0.123, demonstrating its effectiveness in mitigating bias in the occupation classification task." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 189, + 256, + 217 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 189, + 256, + 217 + ], + "spans": [ + { + "bbox": [ + 67, + 189, + 256, + 217 + ], + "type": "text", + "content": "6 Integrating " + }, + { + "bbox": [ + 67, + 189, + 256, + 217 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 189, + 256, + 217 + ], + "type": "text", + "content": " with Existing Debiased Models (RQ2)" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "spans": [ + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "content": "One benefit of a prompt-then-finetune model like " + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "content": " is that it can be easily integrated with existing upstream debiasing methods. Here we investigate the applicability of " + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "content": " to three existing debiased models to bridge the gap in utilizing upstream debiased models for downstream tasks. Based on the comparison results – before and after applying " + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "content": " – shown in Table 5, " + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "content": " significantly reduces the bias scores for Context-Debias and Auto-Debias: 0.088 versus 0.332, and 0.068 versus 0.312, respectively. For MABEL, which achieves low bias scores, there is no significant effect on the bias score. Additionally, " + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "content": " improves the model performance on the downstream tasks. These results clearly demonstrate the effectiveness of integrating " + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 225, + 291, + 496 + ], + "type": "text", + "content": " into established debiased models for downstream tasks. This ability enables the existing debiased models to achieve strong performance on downstream tasks while simultaneously maintaining a low bias level." + } + ] + } + ], + "index": 2 + }, + { + "type": "table", + "bbox": [ + 69, + 504, + 290, + 587 + ], + "blocks": [ + { + "bbox": [ + 69, + 504, + 290, + 587 + ], + "lines": [ + { + "bbox": [ + 69, + 504, + 290, + 587 + ], + "spans": [ + { + "bbox": [ + 69, + 504, + 290, + 587 + ], + "type": "table", + "html": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.3320.9160.5390.879 / 0.876
+ Co2PT0.0880.3610.0100.885 / 0.881
Auto-Debias0.3120.9020.5020.884 / 0.880
+ Co2PT0.0680.2310.0050.883 / 0.878
MABEL0.0660.2040.0130.889 / 0.885
+ Co2PT0.0680.2280.0050.892 / 0.889
", + "image_path": "820c24ca992f96cf07aea870822737fd1646fa5eebc767776f7407629e997e94.jpg" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "table_body" + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 626, + 211, + 641 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 626, + 211, + 641 + ], + "spans": [ + { + "bbox": [ + 67, + 626, + 211, + 641 + ], + "type": "text", + "content": "7 Impact of Design (RQ3)" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 648, + 290, + 702 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 648, + 290, + 702 + ], + "spans": [ + { + "bbox": [ + 67, + 648, + 290, + 702 + ], + "type": "text", + "content": "We perform an extensive ablation study to show how different components affect " + }, + { + "bbox": [ + 67, + 648, + 290, + 702 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^{2}\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 648, + 290, + 702 + ], + "type": "text", + "content": " in Table 6. We use Bias-STS-B as the representative task for computational efficiency." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 706, + 291, + 772 + ], + "type": "text", + "content": "Impact of counterfactual module. First, we perform counterfactual data augmentation on the training data containing bias-attribute terms. Then we conduct prompt tuning only on these augmented pairs (denoted as PT+CDA). PT+CDA reduces" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 71, + 526, + 139 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 139 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 139 + ], + "type": "text", + "content": "the bias score from 0.321 in PT to 0.291, showing the effectiveness of the straightforward counterfactual data augmentation approach. However, the improvement is less than " + }, + { + "bbox": [ + 302, + 71, + 526, + 139 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 71, + 526, + 139 + ], + "type": "text", + "content": ", implying the necessity of the contrastive learning module." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 142, + 526, + 250 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 142, + 526, + 250 + ], + "spans": [ + { + "bbox": [ + 302, + 142, + 526, + 250 + ], + "type": "text", + "content": "Impact of contrastive module. To investigate the impact of the contrastive module, instead of employing constructed counterfactual sentence pairs as positive pairs for contrastive loss, we use unsupervised contrastive loss by encoding the same input twice and get two embeddings with different dropout masks " + }, + { + "bbox": [ + 302, + 142, + 526, + 250 + ], + "type": "inline_equation", + "content": "z" + }, + { + "bbox": [ + 302, + 142, + 526, + 250 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 302, + 142, + 526, + 250 + ], + "type": "inline_equation", + "content": "z'" + }, + { + "bbox": [ + 302, + 142, + 526, + 250 + ], + "type": "text", + "content": " (Gao et al., 2021). Then the contrastive objective becomes:" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 319, + 258, + 525, + 305 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 319, + 258, + 525, + 305 + ], + "spans": [ + { + "bbox": [ + 319, + 258, + 525, + 305 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {s c l} = - \\log \\frac {e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i}} , \\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i} ^ {\\prime}}\\right) / \\tau}}{\\sum_ {j = 1} ^ {N} e ^ {\\operatorname {s i m} \\left(\\mathbf {p} \\oplus \\mathbf {h} _ {i} ^ {z _ {i}} , \\mathbf {p} \\oplus \\mathbf {h} _ {j} ^ {z _ {j} ^ {\\prime}}\\right) / \\tau}}, \\tag {5}", + "image_path": "9c7c862de0e67b7a64918f85f41276da5fec2ca4acb54b5577f77217f375be56.jpg" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 312, + 525, + 378 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 312, + 525, + 378 + ], + "spans": [ + { + "bbox": [ + 302, + 312, + 525, + 378 + ], + "type": "text", + "content": "which is optimized with the prompt tuning loss " + }, + { + "bbox": [ + 302, + 312, + 525, + 378 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{pt}" + }, + { + "bbox": [ + 302, + 312, + 525, + 378 + ], + "type": "text", + "content": " together (denoted as PT+SCL). PT+SCL surpasses both PT and PT+CDA by achieving a large reduction in bias score to 0.161, demonstrating the effectiveness of the contrastive module." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "spans": [ + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": "Impact of adding contrastive loss for non-augmented inputs. In " + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": ", we only consider counterfactually augmented pairs in the contrastive module. To explore the necessity of including inputs without demographic terms in the contrastive module, we incorporate unsupervised contrastive loss for non-augmented input like Equation 5 as " + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{scl}'" + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": " and tuned with contrastive loss " + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{cl}" + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": " for counter-factly augmented pairs (Equation 1) and " + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{pt}'" + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": " (denoted as " + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT} + \\mathrm{SCL}_n" + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": "). The bias score of 0.117 achieved by " + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT} + \\mathrm{SCL}_n" + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": " is higher than " + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 382, + 525, + 571 + ], + "type": "text", + "content": " and this indicates that incorporating a contrastive loss for non-augmented inputs in the training set is unnecessary." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 574, + 526, + 642 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 574, + 526, + 642 + ], + "spans": [ + { + "bbox": [ + 302, + 574, + 526, + 642 + ], + "type": "text", + "content": "Compare " + }, + { + "bbox": [ + 302, + 574, + 526, + 642 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 574, + 526, + 642 + ], + "type": "text", + "content": " with task-agnostic counterfactual pairs. To investigate whether integrating task-agnostic neutral entailment pairs can benefit debiasing on the task, we use 142,158 gender-balanced entailment pairs augmented from SNLI and MNLI" + } + ] + } + ], + "index": 13 + }, + { + "type": "table", + "bbox": [ + 304, + 657, + 525, + 749 + ], + "blocks": [ + { + "bbox": [ + 67, + 592, + 291, + 617 + ], + "lines": [ + { + "bbox": [ + 67, + 592, + 291, + 617 + ], + "spans": [ + { + "bbox": [ + 67, + 592, + 291, + 617 + ], + "type": "text", + "content": "Table 5: Performance of integrating " + }, + { + "bbox": [ + 67, + 592, + 291, + 617 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 592, + 291, + 617 + ], + "type": "text", + "content": " with debiased models on Bias-STS-B." + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 304, + 657, + 525, + 749 + ], + "lines": [ + { + "bbox": [ + 304, + 657, + 525, + 749 + ], + "spans": [ + { + "bbox": [ + 304, + 657, + 525, + 749 + ], + "type": "table", + "html": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
PT+CDA0.2910.7470.3510.890 / 0.886
PT+SCL0.1610.5480.1330.883 / 0.878
Co2PT+SCLn0.1170.4670.0560.884 / 0.878
PT+NLI+CL0.0800.2800.0220.881 / 0.876
PT+NLI+CLp0.2070.6870.2220.884 / 0.881
PT+CDA+CLp0.2710.7250.3380.886 / 0.883
Co2PT (PT+CDA+CL)0.0580.1670.0050.884 / 0.880
", + "image_path": "bb56d7f851ec299ef1076e1cf9e22192d901ad1fd7731019e8797cc73004931c.jpg" + } + ] + } + ], + "index": 14, + "angle": 0, + "type": "table_body" + } + ], + "index": 14 + }, + { + "bbox": [ + 330, + 756, + 496, + 769 + ], + "lines": [ + { + "bbox": [ + 330, + 756, + 496, + 769 + ], + "spans": [ + { + "bbox": [ + 330, + 756, + 496, + 769 + ], + "type": "text", + "content": "Table 6: Impact of different components." + } + ] + } + ], + "index": 15, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5865" + } + ] + } + ], + "index": 16 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "text", + "content": "datasets in He et al. (2022) as task-agnostic entailment pairs for STS-B task instead of using the task-specific counterfactual pairs augmented from the training set (denoted as " + }, + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "inline_equation", + "content": "\\mathbf{PT} + \\mathbf{NLI} + \\mathbf{CL}" + }, + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "text", + "content": "). We notice that although " + }, + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "inline_equation", + "content": "\\mathrm{PT} + \\mathrm{NLI} + \\mathrm{CL}" + }, + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "text", + "content": " does not outperform " + }, + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 71, + 291, + 206 + ], + "type": "text", + "content": ", it shows a strong ability to mitigate bias compared to other baseline methods. Thus, when working on a moderate amount of training data, it is better to use counterfactually augmented pairs from the training data." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "spans": [ + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": "Compare " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " with other contrastive objective. For sentence-pair classification tasks, we also explore the contrastive loss that encourages the inter-association of entailment pairs (He et al., 2022). For the original input pair " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "(s_{i1}, s_{i2})" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " and its augmented pair " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "(s_{i1}'', s_{i2}')" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "s_{i1}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "s_{i2}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " are treated as positive pairs while " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "s_{i1}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "s_{i2}'" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " and other in-batch " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "s_{j2}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " are negatives, and vice versa (denoted as " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "\\mathbf{CL_p}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": "). When using task-specific counterfactual pairs, " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "\\mathrm{PT + CDA + CL_p}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " decreases the bias score to 0.271. Similarly, using task-agnostic counterfactual pairs, " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "\\mathrm{PT + NLI + CL_p}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": " also reduces the bias score to 0.271. However, the bias mitigation effect is not as significant as that achieved by " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": ", which indicates the effectiveness of the contrastive module in " + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 69, + 210, + 291, + 426 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 438, + 267, + 453 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 438, + 267, + 453 + ], + "spans": [ + { + "bbox": [ + 67, + 438, + 267, + 453 + ], + "type": "text", + "content": "8 Impact of Hyperparameters (RQ4)" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "spans": [ + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "text", + "content": "Finally, we investigate the impact of three hyperparameters: (i) the continuous prompt length; (ii) the temperature " + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "text", + "content": " of contrastive loss " + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{cl}" + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "text", + "content": "; and (iii) the coefficient " + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "text", + "content": " of total learning objective " + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "inline_equation", + "content": "\\mathcal{L}" + }, + { + "bbox": [ + 67, + 461, + 291, + 515 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "spans": [ + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "text", + "content": "Impact of prompt length. First, we experiment with the prompt length varying in " + }, + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "inline_equation", + "content": "\\{10,20,50\\}" + }, + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "text", + "content": ", as illustrated in Figure 2. Generally speaking, with more tunable prompt parameters, the model performs better on downstream tasks. In addition, when the prompt length is " + }, + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "inline_equation", + "content": "10" + }, + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 519, + 291, + 628 + ], + "type": "text", + "content": " shows a higher increase in bias score compared to the prompt length of 20 and 50. This indicates that a" + } + ] + } + ], + "index": 4 + }, + { + "type": "image", + "bbox": [ + 71, + 642, + 287, + 746 + ], + "blocks": [ + { + "bbox": [ + 71, + 642, + 287, + 746 + ], + "lines": [ + { + "bbox": [ + 71, + 642, + 287, + 746 + ], + "spans": [ + { + "bbox": [ + 71, + 642, + 287, + 746 + ], + "type": "image", + "image_path": "897ef13ff3cffd359f7e9993c5e4b85eba83c26cba597c98bb4d89185f489205.jpg" + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 107, + 756, + 249, + 769 + ], + "lines": [ + { + "bbox": [ + 107, + 756, + 249, + 769 + ], + "spans": [ + { + "bbox": [ + 107, + 756, + 249, + 769 + ], + "type": "text", + "content": "Figure 2: Impact of prompt length." + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "image_caption" + } + ], + "index": 5 + }, + { + "type": "image", + "bbox": [ + 306, + 71, + 522, + 174 + ], + "blocks": [ + { + "bbox": [ + 306, + 71, + 522, + 174 + ], + "lines": [ + { + "bbox": [ + 306, + 71, + 522, + 174 + ], + "spans": [ + { + "bbox": [ + 306, + 71, + 522, + 174 + ], + "type": "image", + "image_path": "cf61ad18743b6131a257e5515d94e70c4303acd02ef194c7f1ac7f5a06d85991.jpg" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "lines": [ + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "spans": [ + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "type": "text", + "content": "Figure 3: " + }, + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "type": "text", + "content": " in " + }, + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "type": "inline_equation", + "content": "\\{0.005, 0.05, 0.5\\}" + }, + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "type": "text", + "content": " while " + }, + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "type": "inline_equation", + "content": "\\alpha = 1.0" + }, + { + "bbox": [ + 316, + 185, + 511, + 198 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_caption" + } + ], + "index": 7 + }, + { + "type": "image", + "bbox": [ + 306, + 205, + 522, + 310 + ], + "blocks": [ + { + "bbox": [ + 306, + 205, + 522, + 310 + ], + "lines": [ + { + "bbox": [ + 306, + 205, + 522, + 310 + ], + "spans": [ + { + "bbox": [ + 306, + 205, + 522, + 310 + ], + "type": "image", + "image_path": "9cea2a3eb3163472276911af06c1b6a8e3b4fbb950dc18755b2a3dfa0fcb0158.jpg" + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "lines": [ + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "spans": [ + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "type": "text", + "content": "Figure 4: " + }, + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "type": "text", + "content": " in " + }, + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "type": "inline_equation", + "content": "\\{0.1, 0.5, 1.0\\}" + }, + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "type": "text", + "content": " while " + }, + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "type": "inline_equation", + "content": "\\tau = 0.05" + }, + { + "bbox": [ + 321, + 320, + 506, + 333 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "image_caption" + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 344, + 525, + 425 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 344, + 525, + 425 + ], + "spans": [ + { + "bbox": [ + 302, + 344, + 525, + 425 + ], + "type": "text", + "content": "larger prompt length enables the model to achieve better model performance on downstream tasks more rapidly while still maintaining a lower bias score. However, it is important to consider that using larger prompt lengths means tuning more parameters, thus posing a trade-off." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "spans": [ + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "text", + "content": "Impact of " + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "text", + "content": ". Then, we vary temperature " + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "text", + "content": " in " + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "inline_equation", + "content": "\\{0.005, 0.05, 0.5\\}" + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "text", + "content": ". Figure 3 shows close significant bias mitigation effects when " + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "text", + "content": " is set to 0.005 and 0.05 while exhibiting less effectiveness when " + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 428, + 525, + 536 + ], + "type": "text", + "content": " is 0.5. This observation implies that a higher temperature value corresponds to less weight of the cosine similarity calculation, resulting in decreased effectiveness in bias mitigation." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "spans": [ + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "text", + "content": "Impact of " + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "text", + "content": ". Last, we study the impact of coefficient " + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "text", + "content": " and vary the value in " + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "inline_equation", + "content": "\\{0.1, 0.5, 1.0\\}" + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "text", + "content": ". Figure 4 emphasizes that reducing the value of " + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "text", + "content": " at a constant " + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 302, + 539, + 526, + 634 + ], + "type": "text", + "content": ", thus assigning less weight to the contrastive module, leads to decreased bias mitigation effects. This analysis underscores the importance of carefully selecting appropriate hyperparameters." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 644, + 474, + 656 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 644, + 474, + 656 + ], + "spans": [ + { + "bbox": [ + 302, + 644, + 474, + 656 + ], + "type": "text", + "content": "9 Conclusion and Future Work" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 665, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 665, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 665, + 526, + 772 + ], + "type": "text", + "content": "We propose " + }, + { + "bbox": [ + 302, + 665, + 526, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 665, + 526, + 772 + ], + "type": "text", + "content": ", an efficient and effective debiasing method for mitigating bias in downstream tasks. We evaluate its effectiveness on bias mitigation and applicability to existing debiased upstream models, and investigate how the design of each component and the selection of hyperparameters impact both its bias reduction capabilities and downstream task performance." + } + ] + } + ], + "index": 15 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5866" + } + ] + } + ], + "index": 16 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 292, + 248 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 292, + 248 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 292, + 248 + ], + "type": "text", + "content": "Mitigating non-gender and intersectional bias. Mitigating non-gender biases is challenging as some debiasing methods work well on reducing gender biases but show poor generalization capabilities in addressing biases beyond gender (Meade et al., 2022). Without re-training the model, " + }, + { + "bbox": [ + 67, + 71, + 292, + 248 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 71, + 292, + 248 + ], + "type": "text", + "content": " is flexible to apply in order to mitigate different bias types in downstream applications. One can train different debiasing prompts to tackle different bias dimensions such as gender, race, and religion. Furthermore, these debiasing prompts can be applied to mitigate intersectional bias by simply combining the corresponding prompts in downstream tasks." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 258, + 131, + 271 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 258, + 131, + 271 + ], + "spans": [ + { + "bbox": [ + 67, + 258, + 131, + 271 + ], + "type": "text", + "content": "Limitations" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 280, + 291, + 430 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 280, + 291, + 430 + ], + "spans": [ + { + "bbox": [ + 67, + 280, + 291, + 430 + ], + "type": "text", + "content": "While this work primarily addresses bias in English, we acknowledge the presence of more complicated bias cases in other languages. Therefore, future exploration of existing methods or the development of new techniques to mitigate bias in other languages would be valuable. Furthermore, despite the efficiency and comparable performance of deep prompt tuning compared to fine-tuning, it still underperforms fine-tuning on certain datasets when the model size is small. This will also limit the model performance of our method." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 68, + 440, + 158, + 454 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 440, + 158, + 454 + ], + "spans": [ + { + "bbox": [ + 68, + 440, + 158, + 454 + ], + "type": "text", + "content": "Ethics Statement" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 463, + 291, + 558 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 463, + 291, + 558 + ], + "spans": [ + { + "bbox": [ + 67, + 463, + 291, + 558 + ], + "type": "text", + "content": "In this work, when investigating gender bias in pre-trained language models, we focus on the binary definition of gender as the targeted attribute of discrimination. However, it is important to acknowledge that future research should also consider non-binary genders and other multi-class scenarios to comprehensively address bias." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 569, + 170, + 583 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 569, + 170, + 583 + ], + "spans": [ + { + "bbox": [ + 68, + 569, + 170, + 583 + ], + "type": "text", + "content": "Acknowledgements" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 591, + 290, + 619 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 591, + 290, + 619 + ], + "spans": [ + { + "bbox": [ + 67, + 591, + 290, + 619 + ], + "type": "text", + "content": "We thank Nicholas Meade for the initial discussion and anonymous reviewers for valuable feedback." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 68, + 642, + 127, + 655 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 642, + 127, + 655 + ], + "spans": [ + { + "bbox": [ + 68, + 642, + 127, + 655 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 661, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 10, + "blocks": [ + { + "bbox": [ + 69, + 661, + 290, + 729 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 661, + 290, + 729 + ], + "spans": [ + { + "bbox": [ + 69, + 661, + 290, + 729 + ], + "type": "text", + "content": "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in Neural Information Processing Systems, 33:1877-1901." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 69, + 738, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 738, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 738, + 291, + 772 + ], + "type": "text", + "content": "Yang Trista Cao, Yada Pruksachatkun, Kai-Wei Chang, Rahul Gupta, Varun Kumar, Jwala Dhamala, and Aram Galstyan. 2022. On the intrinsic and extrinsic" + } + ] + } + ], + "index": 9 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 527, + 772 + ], + "type": "list", + "angle": 0, + "index": 20, + "blocks": [ + { + "bbox": [ + 313, + 72, + 526, + 139 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 313, + 72, + 526, + 139 + ], + "spans": [ + { + "bbox": [ + 313, + 72, + 526, + 139 + ], + "type": "text", + "content": "fairness evaluation metrics for contextualized language representations. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 561-570, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 145, + 527, + 201 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 145, + 527, + 201 + ], + "spans": [ + { + "bbox": [ + 304, + 145, + 527, + 201 + ], + "type": "text", + "content": "Pengyu Cheng, Weituo Hao, Siyang Yuan, Shijing Si, and Lawrence Carin. 2021. FairFil: Contrastive Neural Debiasing Method for Pretrained Text Encoders. In International Conference on Learning Representations." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 208, + 526, + 296 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 208, + 526, + 296 + ], + "spans": [ + { + "bbox": [ + 304, + 208, + 526, + 296 + ], + "type": "text", + "content": "Maria De-Arteaga, Alexey Romanov, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, and Adam Tauman Kalai. 2019. Bias in bios: A case study of semantic representation bias in a high-stakes setting. In Proceedings of the Conference on Fairness, Accountability, and Transparency, pages 120-128." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 304, + 526, + 360 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 304, + 526, + 360 + ], + "spans": [ + { + "bbox": [ + 304, + 304, + 526, + 360 + ], + "type": "text", + "content": "Sunipa Dev, Tao Li, Jeff M Phillips, and Vivek Srikumar. 2020. On measuring and mitigating biased inferences of word embeddings. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 7659-7666." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 367, + 526, + 466 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 367, + 526, + 466 + ], + "spans": [ + { + "bbox": [ + 304, + 367, + 526, + 466 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 473, + 526, + 540 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 473, + 526, + 540 + ], + "spans": [ + { + "bbox": [ + 304, + 473, + 526, + 540 + ], + "type": "text", + "content": "Xiangjue Dong, Yun He, Ziwei Zhu, and James Caverlee. 2023a. PromptAttack: Probing dialogue state trackers with adversarial prompts. In *Findings of the Association for Computational Linguistics: ACL* 2023, pages 10651-10666, Toronto, Canada. Association for Computational Linguistics." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 547, + 526, + 624 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 547, + 526, + 624 + ], + "spans": [ + { + "bbox": [ + 304, + 547, + 526, + 624 + ], + "type": "text", + "content": "Xiangjue Dong, Jiaying Lu, Jianling Wang, and James Caverlee. 2023b. Closed-book question generation via contrastive learning. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 3150-3162, Dubrovnik, Croatia. Association for Computational Linguistics." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 632, + 526, + 709 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 632, + 526, + 709 + ], + "spans": [ + { + "bbox": [ + 304, + 632, + 526, + 709 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 717, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 717, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 717, + 526, + 772 + ], + "type": "text", + "content": "Seraphina Goldfarb-Tarrant, Rebecca Marchant, Ricardo Muñoz Sánchez, Mugdha Pandya, and Adam Lopez. 2021. Intrinsic bias metrics do not correlate with application bias. In Proceedings of the 59th Annual Meeting of the Association for Computational" + } + ] + } + ], + "index": 19 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5867" + } + ] + } + ], + "index": 21 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 9, + "blocks": [ + { + "bbox": [ + 80, + 72, + 291, + 117 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 72, + 291, + 117 + ], + "spans": [ + { + "bbox": [ + 80, + 72, + 291, + 117 + ], + "type": "text", + "content": "Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1926-1940, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 70, + 128, + 291, + 206 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 70, + 128, + 291, + 206 + ], + "spans": [ + { + "bbox": [ + 70, + 128, + 291, + 206 + ], + "type": "text", + "content": "Yue Guo, Yi Yang, and Ahmed Abbasi. 2022. Autodebias: Debiasing masked language models with automated biased prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1012-1023, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 216, + 291, + 284 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 216, + 291, + 284 + ], + "spans": [ + { + "bbox": [ + 69, + 216, + 291, + 284 + ], + "type": "text", + "content": "Xudong Han, Timothy Baldwin, and Trevor Cohn. 2021. Diverse adversaries for mitigating bias in training. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2760-2765, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 294, + 291, + 373 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 294, + 291, + 373 + ], + "spans": [ + { + "bbox": [ + 69, + 294, + 291, + 373 + ], + "type": "text", + "content": "Jacqueline He, Mengzhou Xia, Christiane Fellbaum, and Danqi Chen. 2022. MABEL: Attenuating gender bias using textual entailment data. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9681-9702, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 383, + 291, + 450 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 383, + 291, + 450 + ], + "spans": [ + { + "bbox": [ + 69, + 383, + 291, + 450 + ], + "type": "text", + "content": "Masahiro Kaneko and Danushka Bollegala. 2021. Debiasing pre-trained contextualised embeddings. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1256-1266, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 461, + 291, + 550 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 461, + 291, + 550 + ], + "spans": [ + { + "bbox": [ + 69, + 461, + 291, + 550 + ], + "type": "text", + "content": "Masahiro Kaneko, Danushka Bollegala, and Naoaki Okazaki. 2022. Debiasing isn't enough! - on the effectiveness of debiasing MLMs and their social biases in downstream tasks. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1299-1310, Gyeongju, Republic of Korea. International Committee on Computational Linguistics." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 560, + 291, + 628 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 560, + 291, + 628 + ], + "spans": [ + { + "bbox": [ + 69, + 560, + 291, + 628 + ], + "type": "text", + "content": "Anne Lauscher, Tobias Lueken, and Goran Glavš. 2021. Sustainable modular debiasing of language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 4782-4797, Punta Cana, Dominican Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 639, + 291, + 683 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 639, + 291, + 683 + ], + "spans": [ + { + "bbox": [ + 69, + 639, + 291, + 683 + ], + "type": "text", + "content": "Klas Leino, Matt Fredrikson, Emily Black, Shayak Sen, and Anupam Datta. 2019. Feature-Wise Bias Amplification. In International Conference on Learning Representations (ICLR)." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 694, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 694, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 694, + 291, + 772 + ], + "type": "text", + "content": "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 8 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 18, + "blocks": [ + { + "bbox": [ + 304, + 72, + 526, + 259 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 526, + 259 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 526, + 259 + ], + "type": "text", + "content": "Quentin Lhoest, Albert Villanova del Moral, Yacine Jernite, Abhishek Thakur, Patrick von Platen, Suraj Patil, Julien Chaumont, Mariama Drame, Julien Plu, Lewis Tunstall, Joe Davison, Mario Šaško, Gunjan Chhablani, Bhavitvya Malik, Simon Brandeis, Teven Le Scao, Victor Sanh, Canwen Xu, Nicolas Patry, Angelina McMillan-Major, Philipp Schmid, Sylvain Gugger, Clément Delangue, Théo Matussière, Lysandre Debut, Stas Bekman, Pierrick Cistac, Thibault Goehringer, Victor Mustar, François Lagunas, Alexander Rush, and Thomas Wolf. 2021. Datasets: A community library for natural language processing. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 175-184, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 267, + 526, + 356 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 267, + 526, + 356 + ], + "spans": [ + { + "bbox": [ + 304, + 267, + 526, + 356 + ], + "type": "text", + "content": "Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. 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 4582-4597, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 364, + 526, + 453 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 364, + 526, + 453 + ], + "spans": [ + { + "bbox": [ + 304, + 364, + 526, + 453 + ], + "type": "text", + "content": "Yingji Li, Mengnan Du, Xin Wang, and Ying Wang. 2023. Prompt tuning pushes farther, contrastive learning pulls closer: A two-stage approach to mitigate social biases. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14254-14267, Toronto, Canada. Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 461, + 526, + 539 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 461, + 526, + 539 + ], + "spans": [ + { + "bbox": [ + 304, + 461, + 526, + 539 + ], + "type": "text", + "content": "Paul Pu Liang, Irene Mengze Li, Emily Zheng, Yao Chong Lim, Ruslan Salakhutdinov, and Louis-Philippe Morency. 2020. Towards debiasing sentence representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5502-5515, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 547, + 526, + 635 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 547, + 526, + 635 + ], + "spans": [ + { + "bbox": [ + 304, + 547, + 526, + 635 + ], + "type": "text", + "content": "Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. 2022. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 61-68, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 644, + 526, + 677 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 644, + 526, + 677 + ], + "spans": [ + { + "bbox": [ + 304, + 644, + 526, + 677 + ], + "type": "text", + "content": "Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. arXiv preprint arXiv:2103.10385." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 686, + 526, + 741 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 686, + 526, + 741 + ], + "spans": [ + { + "bbox": [ + 304, + 686, + 526, + 741 + ], + "type": "text", + "content": "Kaiji Lu, Piotr Mardziel, Fangjing Wu, Preetam Amancharla, and Anupam Datta. 2020. Gender bias in neural natural language processing. *Logic, Language, and Security: Essays Dedicated to Andre Scedrov on the Occasion of His 65th Birthday*, pages 189-202." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "type": "text", + "content": "Chandler May, Alex Wang, Shikha Bordia, Samuel R. Bowman, and Rachel Rudinger. 2019. On measuring" + } + ] + } + ], + "index": 17 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5868" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 9 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 8, + "blocks": [ + { + "bbox": [ + 80, + 72, + 291, + 139 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 72, + 291, + 139 + ], + "spans": [ + { + "bbox": [ + 80, + 72, + 291, + 139 + ], + "type": "text", + "content": "social biases in sentence encoders. 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 622-628, Minneapolis, Minnesota. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 145, + 291, + 223 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 145, + 291, + 223 + ], + "spans": [ + { + "bbox": [ + 69, + 145, + 291, + 223 + ], + "type": "text", + "content": "Nicholas Meade, Elinor Poole-Dayan, and Siva Reddy. 2022. An empirical survey of the effectiveness of debiasing techniques for pre-trained language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1878-1898, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 230, + 291, + 318 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 230, + 291, + 318 + ], + "spans": [ + { + "bbox": [ + 69, + 230, + 291, + 318 + ], + "type": "text", + "content": "Moin Nadeem, Anna Bethke, and Siva Reddy. 2021. StereoSet: Measuring stereotypical bias in pretrained language models. 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 5356-5371, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 325, + 291, + 402 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 325, + 291, + 402 + ], + "spans": [ + { + "bbox": [ + 69, + 325, + 291, + 402 + ], + "type": "text", + "content": "Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. 2020. CrowS-pairs: A challenge dataset for measuring social biases in masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1953-1967, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 409, + 291, + 486 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 409, + 291, + 486 + ], + "spans": [ + { + "bbox": [ + 69, + 409, + 291, + 486 + ], + "type": "text", + "content": "Shauli Ravfogel, Yanai Elazar, Hila Gonen, Michael Twiton, and Yoav Goldberg. 2020. Null it out: Guarding protected attributes by iterative nullspace projection. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7237-7256, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 493, + 291, + 614 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 493, + 291, + 614 + ], + "spans": [ + { + "bbox": [ + 69, + 493, + 291, + 614 + ], + "type": "text", + "content": "Alexey Romanov, Maria De-Arteaga, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, Anna Rumshisky, and Adam Kalai. 2019. What's in a name? Reducing bias in bios without access to protected attributes. 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 4187-4195, Minneapolis, Minnesota. Association for Computational Linguistics." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 622, + 291, + 710 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 622, + 291, + 710 + ], + "spans": [ + { + "bbox": [ + 69, + 622, + 291, + 710 + ], + "type": "text", + "content": "Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. 2018. Gender bias in coreference resolution. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 8-14, New Orleans, Louisiana. Association for Computational Linguistics." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 717, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 717, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 717, + 291, + 772 + ], + "type": "text", + "content": "Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in NLP. Transactions of the Association for Computational Linguistics, 9:1408-1424." + } + ] + } + ], + "index": 7 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 671 + ], + "type": "list", + "angle": 0, + "index": 17, + "blocks": [ + { + "bbox": [ + 304, + 72, + 526, + 127 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 526, + 127 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 526, + 127 + ], + "type": "text", + "content": "Rachael Tatman. 2017. Gender and dialect bias in YouTube's automatic captions. In Proceedings of the First ACL Workshop on Ethics in Natural Language Processing, pages 53-59, Valencia, Spain. Association for Computational Linguistics." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 304, + 136, + 526, + 191 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 136, + 526, + 191 + ], + "spans": [ + { + "bbox": [ + 304, + 136, + 526, + 191 + ], + "type": "text", + "content": "Yibo Wang, Congying Xia, Guan Wang, and Philip S. Yu. 2022. Continuous Prompt Tuning Based Textual Entailment Model for E-commerce Entity Typing. In 2022 IEEE International Conference on Big Data (Big Data), pages 1383-1388." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 200, + 526, + 254 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 200, + 526, + 254 + ], + "spans": [ + { + "bbox": [ + 304, + 200, + 526, + 254 + ], + "type": "text", + "content": "Kellie Webster, Xuezhi Wang, Ian Tenney, Alex Beutel, Emily Pittler, Ellie Pavlick, Jilin Chen, Ed Chi, and Slav Petrov. 2020. Measuring and reducing gendered correlations in pre-trained models. arXiv preprint arXiv:2010.06032." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 263, + 526, + 340 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 263, + 526, + 340 + ], + "spans": [ + { + "bbox": [ + 304, + 263, + 526, + 340 + ], + "type": "text", + "content": "Zhongbin Xie and Thomas Lukasiewicz. 2023. An empirical analysis of parameter-efficient methods for debiasing pre-trained language models. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15730-15745, Toronto, Canada. Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 349, + 526, + 382 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 349, + 526, + 382 + ], + "spans": [ + { + "bbox": [ + 304, + 349, + 526, + 382 + ], + "type": "text", + "content": "Ke Yang, Charles Yu, Yi Fung, Manling Li, and Heng Ji. 2022. ADEPT: A DEbiasing Prompt Framework. arXiv preprint arXiv:2211.05414." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 391, + 526, + 478 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 391, + 526, + 478 + ], + "spans": [ + { + "bbox": [ + 304, + 391, + 526, + 478 + ], + "type": "text", + "content": "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2017. Men also like shopping: Reducing gender bias amplification using corpus-level constraints. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2979–2989, Copenhagen, Denmark. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 487, + 526, + 587 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 487, + 526, + 587 + ], + "spans": [ + { + "bbox": [ + 304, + 487, + 526, + 587 + ], + "type": "text", + "content": "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 15–20, New Orleans, Louisiana. Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 594, + 526, + 671 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 594, + 526, + 671 + ], + "spans": [ + { + "bbox": [ + 304, + 594, + 526, + 671 + ], + "type": "text", + "content": "Ran Zmigrod, Sabrina J. Mielke, Hanna Wallach, and Ryan Cotterell. 2019. Counterfactual data augmentation for mitigating gender stereotypes in languages with rich morphology. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1651-1661, Florence, Italy. Association for Computational Linguistics." + } + ] + } + ], + "index": 16 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5869" + } + ] + } + ], + "index": 18 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 10 + }, + { + "para_blocks": [ + { + "bbox": [ + 153, + 71, + 206, + 84 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 153, + 71, + 206, + 84 + ], + "spans": [ + { + "bbox": [ + 153, + 71, + 206, + 84 + ], + "type": "text", + "content": "Appendix" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 68, + 95, + 242, + 108 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 95, + 242, + 108 + ], + "spans": [ + { + "bbox": [ + 68, + 95, + 242, + 108 + ], + "type": "text", + "content": "A More Implementation Details" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 68, + 118, + 283, + 130 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 118, + 283, + 130 + ], + "spans": [ + { + "bbox": [ + 68, + 118, + 283, + 130 + ], + "type": "text", + "content": "A.1 Dataset and Extrinsic Bias Benchmarks" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 137, + 290, + 299 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 137, + 290, + 299 + ], + "spans": [ + { + "bbox": [ + 67, + 137, + 290, + 299 + ], + "type": "text", + "content": "STS-B and SNLI datasets are from the Hugging Face Datasets library (Lhoest et al., 2021). We use the same Bias-in-Bios dataset used in Ravfogel et al. (2020), the Bias-STS-B used in Lauscher et al. (2021) and the Bias-NLI used in He et al. (2022). The code used to assess Bias-STS-B is modified from Lauscher et al. (2021), while the code for evaluating Bias-NLI and Bias-in-Bios is adapted from He et al. (2022). Different from the code employed in He et al. (2022), we conduct our evaluation on the entire Bias-NLI dataset rather than just the top " + }, + { + "bbox": [ + 67, + 137, + 290, + 299 + ], + "type": "inline_equation", + "content": "10\\%" + }, + { + "bbox": [ + 67, + 137, + 290, + 299 + ], + "type": "text", + "content": " of it." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 68, + 312, + 186, + 323 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 312, + 186, + 323 + ], + "spans": [ + { + "bbox": [ + 68, + 312, + 186, + 323 + ], + "type": "text", + "content": "A.2 Debiased Baselines" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "spans": [ + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "text", + "content": "Please refer to the footnotes here for the source of released debiased models - ZariCDA, ZariDO" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "inline_equation", + "content": "^4" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "text", + "content": " (Webster et al., 2020), Context-Debias" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "inline_equation", + "content": "^5" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "text", + "content": " (Kaneko and Bollegala, 2021), AutoDebias" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "inline_equation", + "content": "^6" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "text", + "content": " (Guo et al., 2022), MABEL" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "inline_equation", + "content": "^7" + }, + { + "bbox": [ + 67, + 331, + 291, + 411 + ], + "type": "text", + "content": " (He et al., 2022) - used on downstream tasks." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 68, + 424, + 208, + 437 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 424, + 208, + 437 + ], + "spans": [ + { + "bbox": [ + 68, + 424, + 208, + 437 + ], + "type": "text", + "content": "A.3 Implementation Details" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "spans": [ + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "text", + "content": "We use BERT-base-uncased in our experiments. For the single-sentence classification task, we preprocess the [CLS] token before the input sentences and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. For the sentence-pair classification task, e.g., SNLI task, we preprocess [CLS] before the premise " + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "inline_equation", + "content": "x" + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "text", + "content": " and [SEP] token to separate premise " + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "inline_equation", + "content": "x" + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "text", + "content": " and hypothesis " + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "inline_equation", + "content": "y" + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "text", + "content": " and feed it into the BERT model to get the embedding of the [CLS] token as the sentence representation. Fine-tuning and prompt tuning code rely on the Huggingface implementation." + }, + { + "bbox": [ + 67, + 444, + 291, + 606 + ], + "type": "inline_equation", + "content": "^{8}" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 303, + 70, + 442, + 83 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 70, + 442, + 83 + ], + "spans": [ + { + "bbox": [ + 303, + 70, + 442, + 83 + ], + "type": "text", + "content": "B More Ablation Studies" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 92, + 527, + 213 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 92, + 527, + 213 + ], + "spans": [ + { + "bbox": [ + 302, + 92, + 527, + 213 + ], + "type": "text", + "content": "Pooling method. Besides using pooled output, we also conduct experiments that use the average token representation from the model's last hidden state as sentence representation, shown in Table 7. However, upon analyzing the results, " + }, + { + "bbox": [ + 302, + 92, + 527, + 213 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}_{\\mathrm{avg}}" + }, + { + "bbox": [ + 302, + 92, + 527, + 213 + ], + "type": "text", + "content": " is considerably more challenging for the prompts to acquire the debiasing capability when using the average token representation compared to when utilizing the CLS token as the sentence representation." + } + ] + } + ], + "index": 9 + }, + { + "type": "table", + "bbox": [ + 304, + 222, + 524, + 265 + ], + "blocks": [ + { + "bbox": [ + 304, + 222, + 524, + 265 + ], + "lines": [ + { + "bbox": [ + 304, + 222, + 524, + 265 + ], + "spans": [ + { + "bbox": [ + 304, + 222, + 524, + 265 + ], + "type": "table", + "html": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.3210.7490.3690.889 / 0.885
Co2PTavg.0.3900.8230.4970.891 / 0.886
Co2PTcls (ours)0.0580.1670.0050.884 / 0.880
", + "image_path": "81e245a4c748c815a9580a0a7633846a6d4073f1338204f1b4554cc9ea40f79b.jpg" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "table_body" + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 308, + 480, + 322 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 308, + 480, + 322 + ], + "spans": [ + { + "bbox": [ + 302, + 308, + 480, + 322 + ], + "type": "text", + "content": "C Standard Deviation of Results" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 330, + 525, + 451 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 330, + 525, + 451 + ], + "spans": [ + { + "bbox": [ + 302, + 330, + 525, + 451 + ], + "type": "text", + "content": "The standard deviation of evaluation results on extrinsic bias benchmarks – Bias-STS-B, Bias-NLI, and Bias-in-Bios – are presented in Tables 8 to 10, respectively. In addition, the results of integrating " + }, + { + "bbox": [ + 302, + 330, + 525, + 451 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 330, + 525, + 451 + ], + "type": "text", + "content": " with existing debiased models and ablation study are shown in Table 11 and Table 12. These results indicate that " + }, + { + "bbox": [ + 302, + 330, + 525, + 451 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 330, + 525, + 451 + ], + "type": "text", + "content": " consistently performs well with relatively low variability, demonstrating its effectiveness and reliability." + } + ] + } + ], + "index": 13 + }, + { + "type": "table", + "bbox": [ + 304, + 460, + 524, + 573 + ], + "blocks": [ + { + "bbox": [ + 351, + 273, + 476, + 284 + ], + "lines": [ + { + "bbox": [ + 351, + 273, + 476, + 284 + ], + "spans": [ + { + "bbox": [ + 351, + 273, + 476, + 284 + ], + "type": "text", + "content": "Table 7: More ablation results." + } + ] + } + ], + "index": 11, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 304, + 460, + 524, + 573 + ], + "lines": [ + { + "bbox": [ + 304, + 460, + 524, + 573 + ], + "spans": [ + { + "bbox": [ + 304, + 460, + 524, + 573 + ], + "type": "table", + "html": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
BERT0.0180.0240.0560.002 / 0.001
BERT+CDA0.0200.0580.0420.001 / 0.000
ZariCDA*0.0300.1460.0310.004 / 0.003
ZariDO*0.0200.0110.0440.003 / 0.003
Context-Debias0.0420.0520.0980.005 / 0.005
Auto-Debias0.0060.0180.0200.002 / 0.001
MABEL0.0110.0460.0130.004 / 0.004
PT0.0180.0160.0240.001 / 0.001
Co2PT (ours)0.0090.0560.0010.001 / 0.000
", + "image_path": "b255e037cba621ae3575b0099f01359f23a51e94024049f0ee5ddf6b2219b702.jpg" + } + ] + } + ], + "index": 14, + "angle": 0, + "type": "table_body" + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 581, + 525, + 606 + ], + "lines": [ + { + "bbox": [ + 302, + 581, + 525, + 606 + ], + "spans": [ + { + "bbox": [ + 302, + 581, + 525, + 606 + ], + "type": "text", + "content": "Table 8: Results standard deviation on Bias-STS-B. " + }, + { + "bbox": [ + 302, + 581, + 525, + 606 + ], + "type": "inline_equation", + "content": "\\star" + }, + { + "bbox": [ + 302, + 581, + 525, + 606 + ], + "type": "text", + "content": " : the backbone models are BERT-large-uncased." + } + ] + } + ], + "index": 15, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 629, + 524, + 656 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 629, + 524, + 656 + ], + "spans": [ + { + "bbox": [ + 302, + 629, + 524, + 656 + ], + "type": "text", + "content": "D Visualization of Bias Mitigation Effects along Epochs" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 664, + 524, + 745 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 664, + 524, + 745 + ], + "spans": [ + { + "bbox": [ + 302, + 664, + 524, + 745 + ], + "type": "text", + "content": "We visualize the changes of bias scores along epochs in Figure 5. The bias score of PT keeps increasing as the Pearson score increases, while " + }, + { + "bbox": [ + 302, + 664, + 524, + 745 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 664, + 524, + 745 + ], + "type": "text", + "content": " consistently maintains a low bias score, which indicates the effectiveness of " + }, + { + "bbox": [ + 302, + 664, + 524, + 745 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 302, + 664, + 524, + 745 + ], + "type": "text", + "content": " on bias mitigation." + } + ] + } + ], + "index": 17 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 615, + 264, + 636 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 615, + 264, + 636 + ], + "spans": [ + { + "bbox": [ + 67, + 615, + 264, + 636 + ], + "type": "inline_equation", + "content": "^{2}" + }, + { + "bbox": [ + 67, + 615, + 264, + 636 + ], + "type": "text", + "content": "https://github.com/huggingface/datasets. Apache License 2.0." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 67, + 637, + 290, + 667 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 637, + 290, + 667 + ], + "spans": [ + { + "bbox": [ + 67, + 637, + 290, + 667 + ], + "type": "text", + "content": "3The data is downloaded through https://github. com/shauli-ravfogel/nullspace_projection/blob/ master/download_data.sh MIT License." + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 67, + 668, + 290, + 698 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 668, + 290, + 698 + ], + "spans": [ + { + "bbox": [ + 67, + 668, + 290, + 698 + ], + "type": "text", + "content": "4The checkpoints of these two models are from https:// github.com/google-research-datasets/Zari. Apache2.0 license." + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 67, + 699, + 289, + 719 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 699, + 289, + 719 + ], + "spans": [ + { + "bbox": [ + 67, + 699, + 289, + 719 + ], + "type": "text", + "content": "5The checkpoints are from https://github.com/kanekomasahiro/context-debias.MIT license." + } + ] + } + ], + "index": 21 + }, + { + "bbox": [ + 67, + 720, + 289, + 740 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 720, + 289, + 740 + ], + "spans": [ + { + "bbox": [ + 67, + 720, + 289, + 740 + ], + "type": "text", + "content": "6The checkpoints are from https://github.com/Irenehere/Auto-Debias." + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 67, + 740, + 289, + 761 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 740, + 289, + 761 + ], + "spans": [ + { + "bbox": [ + 67, + 740, + 289, + 761 + ], + "type": "text", + "content": "7The checkpoints are from https://huggingface.co/princeton-nlp/mabel-bert-base-uncased MIT License." + } + ] + } + ], + "index": 23 + }, + { + "bbox": [ + 80, + 761, + 221, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 761, + 221, + 772 + ], + "spans": [ + { + "bbox": [ + 80, + 761, + 221, + 772 + ], + "type": "text", + "content": "8https://github.com/huggingface" + } + ] + } + ], + "index": 24 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5870" + } + ] + } + ], + "index": 26 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 11 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 69, + 73, + 289, + 185 + ], + "blocks": [ + { + "bbox": [ + 69, + 73, + 289, + 185 + ], + "lines": [ + { + "bbox": [ + 69, + 73, + 289, + 185 + ], + "spans": [ + { + "bbox": [ + 69, + 73, + 289, + 185 + ], + "type": "table", + "html": "
ModelNN↑FN↑T:0.5↑T:0.7↑Acc.
BERT0.0270.0420.0410.0360.002
BERT+CDA0.0120.0100.0100.0020.003
ZariCDA*0.0820.0810.0820.0970.001
ZariDO*0.0780.0830.0830.0930.001
Context-Debias0.0300.0460.0460.0500.001
Auto-Debias0.0100.0190.0190.0120.002
MABEL0.0180.0030.0020.0140.001
PT0.0230.0320.0310.0280.001
Co2PT (ours)0.0160.0210.0220.0270.004
", + "image_path": "c13ff4c4c6a70d1aa5e222b79f169317ba19c9ecfce9c6723c51c2c796b6af88.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 79, + 231, + 279, + 337 + ], + "blocks": [ + { + "bbox": [ + 67, + 193, + 289, + 216 + ], + "lines": [ + { + "bbox": [ + 67, + 193, + 289, + 216 + ], + "spans": [ + { + "bbox": [ + 67, + 193, + 289, + 216 + ], + "type": "text", + "content": "Table 9: Results standard deviation on Bias-NLI. " + }, + { + "bbox": [ + 67, + 193, + 289, + 216 + ], + "type": "inline_equation", + "content": "\\star" + }, + { + "bbox": [ + 67, + 193, + 289, + 216 + ], + "type": "text", + "content": ": the backbone models are BERT-large-uncased." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 79, + 231, + 279, + 337 + ], + "lines": [ + { + "bbox": [ + 79, + 231, + 279, + 337 + ], + "spans": [ + { + "bbox": [ + 79, + 231, + 279, + 337 + ], + "type": "table", + "html": "
ModelGAPTPR↓GAPRMS↓Acc.
BERT0.1380.0040.001
BERT+CDA0.0340.0010.002
ZariCDA*0.0690.0060.000
ZariDO*0.0740.0100.003
Context-Debias0.0530.0060.003
Auto-Debias0.1460.0040.002
MABEL0.1140.0060.001
PT0.0660.0050.001
Co2PT (ours)0.0250.0050.007
", + "image_path": "f0d3961ee9c9eca7805ef2427e488d506f1b0c24c913d2cfff76ac98db81cebd.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "type": "table", + "bbox": [ + 69, + 384, + 289, + 463 + ], + "blocks": [ + { + "bbox": [ + 67, + 346, + 290, + 370 + ], + "lines": [ + { + "bbox": [ + 67, + 346, + 290, + 370 + ], + "spans": [ + { + "bbox": [ + 67, + 346, + 290, + 370 + ], + "type": "text", + "content": "Table 10: Results standard deviation on Bias-in-Bios. " + }, + { + "bbox": [ + 67, + 346, + 290, + 370 + ], + "type": "inline_equation", + "content": "\\star" + }, + { + "bbox": [ + 67, + 346, + 290, + 370 + ], + "type": "text", + "content": " : the backbone models are BERT-large-uncased." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 69, + 384, + 289, + 463 + ], + "lines": [ + { + "bbox": [ + 69, + 384, + 289, + 463 + ], + "spans": [ + { + "bbox": [ + 69, + 384, + 289, + 463 + ], + "type": "table", + "html": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
Context-Debias0.0420.0520.0980.005 / 0.005
+ Co2PT0.0310.1940.0110.000 / 0.001
Auto-Debias0.0060.0180.0200.002 / 0.001
+ Co2PT0.0080.0370.0050.002 / 0.002
MABEL0.0110.0460.0130.004 / 0.004
+ Co2PT0.0210.1030.0230.000 / 0.000
", + "image_path": "2df71c9a5a48c52104a29ab512482c8dc7dbe749222f4fb6f1513064fb022fdb.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "table_body" + } + ], + "index": 4 + }, + { + "type": "table", + "bbox": [ + 69, + 511, + 289, + 611 + ], + "blocks": [ + { + "bbox": [ + 67, + 472, + 290, + 496 + ], + "lines": [ + { + "bbox": [ + 67, + 472, + 290, + 496 + ], + "spans": [ + { + "bbox": [ + 67, + 472, + 290, + 496 + ], + "type": "text", + "content": "Table 11: Performance of integrating " + }, + { + "bbox": [ + 67, + 472, + 290, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{Co}^2\\mathrm{PT}" + }, + { + "bbox": [ + 67, + 472, + 290, + 496 + ], + "type": "text", + "content": " with debiased models on Bias-STS-B." + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 69, + 511, + 289, + 611 + ], + "lines": [ + { + "bbox": [ + 69, + 511, + 289, + 611 + ], + "spans": [ + { + "bbox": [ + 69, + 511, + 289, + 611 + ], + "type": "table", + "html": "
ModelDiff.↓τ:0.1↓τ:0.3↓Pear. / Spear.
PT0.0180.0160.0240.001 / 0.001
PT+CDA0.0080.0080.0070.000 / 0.000
PT+SCL0.0250.0560.0390.000 / 0.000
Co2PT+SCLn0.0230.0940.0330.001 / 0.001
PT+NLI+CL0.0130.0700.0120.001 / 0.001
PT+NLI+CLp0.0250.0420.0530.001 / 0.001
PT+CDA+CLp0.0300.0310.0510.001 / 0.002
Co2PT (avg.)0.0320.0220.0400.001 / 0.000
Co2PT (PT+CDA+CL)0.0090.0560.0010.001 / 0.000
", + "image_path": "5e5ccdf3be3b20f9f3cd0eefcb57e9da042bf3e6d6492bb1f60a2c46e51d09f0.jpg" + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "table_body" + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 619, + 288, + 632 + ], + "lines": [ + { + "bbox": [ + 69, + 619, + 288, + 632 + ], + "spans": [ + { + "bbox": [ + 69, + 619, + 288, + 632 + ], + "type": "text", + "content": "Table 12: Results standard deviation of ablation study." + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "text" + }, + { + "type": "image", + "bbox": [ + 71, + 648, + 286, + 730 + ], + "blocks": [ + { + "bbox": [ + 71, + 648, + 286, + 730 + ], + "lines": [ + { + "bbox": [ + 71, + 648, + 286, + 730 + ], + "spans": [ + { + "bbox": [ + 71, + 648, + 286, + 730 + ], + "type": "image", + "image_path": "a9a868c80c17f215d1b0942e00cc044b97b695427562aed0245759b6282e1229.jpg" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 740, + 289, + 765 + ], + "lines": [ + { + "bbox": [ + 67, + 740, + 289, + 765 + ], + "spans": [ + { + "bbox": [ + 67, + 740, + 289, + 765 + ], + "type": "text", + "content": "Figure 5: Visualization of bias mitigation effects and model performance along epochs." + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_caption" + } + ], + "index": 8 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "text", + "content": "5871" + } + ] + } + ], + "index": 10 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 12 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file diff --git a/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_content_list.json b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dc741df16736bc9d3458d4e7f974f25f9a561e81 --- /dev/null +++ b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_content_list.json @@ -0,0 +1,2389 @@ +[ + { + "type": "text", + "text": "CoEdit: Text Editing by Task-Specific Instruction Tuning", + "text_level": 1, + "bbox": [ + 191, + 89, + 808, + 112 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Vipul Raheja\\* Dhruv Kumar\\* Ryan Koo\\* Dongyeop Kang", + "bbox": [ + 191, + 137, + 806, + 159 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "$\\spadesuit$ Grammarly $\\diamond$ University of Minnesota", + "bbox": [ + 361, + 159, + 702, + 178 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "\\*first.last@grammarly.com $\\diamondsuit$ {koo0017, dongyeop}@umn.edu", + "bbox": [ + 213, + 179, + 789, + 198 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 339, + 266 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "We introduce CoEDIT, a state-of-the-art text editing system for writing assistance. CoEdit takes instructions from the user specifying the attributes of the desired text, such as \"Make the sentence simpler\" or \"Write it in a more neutral style,\" and outputs the edited text. We present a large language model fine-tuned on a diverse collection of task-specific instructions for text editing (a total of 82K instructions). Our model (1) achieves state-of-the-art performance on various text editing benchmarks, (2) is competitive with publicly available largest-sized LLMs trained on instructions while being $\\sim 60\\mathrm{x}$ smaller, (3) is capable of generalizing to unseen edit instructions, and (4) exhibits abilities to generalize to composite instructions containing different combinations of edit actions. Through extensive qualitative and quantitative analysis, we show that writers prefer the edits suggested by CoEDIT, relative to other state-of-the-art text editing models1.", + "bbox": [ + 141, + 275, + 460, + 577 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 114, + 586, + 258, + 600 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Large language models (LLMs) have made remarkable progress toward generating coherent text in a wide variety of tasks and domains to support writing assistance (Du et al., 2022a; Mallinson et al., 2022; Schick et al., 2023), such as grammatical error correction (Wu et al., 2023), text simplification (Stajner et al., 2022), paraphrasing (Chowdhury et al., 2022), and style transfer (Reif et al., 2022). One of the emergent abilities of LLMs is the capability to generalize to unseen tasks by following new or composed instructions. Instruction-tuning, where LLMs are fine-tuned on a collection of tasks phrased as instructions, makes the models more adept at interpreting and following instructions, reducing the need for few-shot exemplars (Sanh et al., 2022; Ouyang et al., 2022b; Wei et al., 2022; Chung et al., 2022b).", + "bbox": [ + 112, + 611, + 489, + 883 + ], + "page_idx": 0 + }, + { + "type": "image", + "img_path": "images/665e413a764ba4bd23ae3c61ac7001fff200f3ab98ac4248b55399135a23076c.jpg", + "image_caption": [ + "Figure 1: Model comparison according to training parameters vs. average performance across all text editing benchmarks reported in Tables 2 and 11. Publicly available models are denoted with $(^{*})$ ." + ], + "image_footnote": [], + "bbox": [ + 547, + 249, + 823, + 434 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Text editing is a complex task because human writers cannot simultaneously grasp multiple demands and constraints of the task and tend to iterate and revise their work multiple times (Flower, 1980; Collins and Gentner, 1980; Vaughan and McDonald, 1986). This poses a significant challenge for intelligent writing assistants.", + "bbox": [ + 507, + 516, + 882, + 627 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "In this work, we aim to improve the capabilities of instruction-tuned models for text editing by leveraging instruction-tuning from diverse tasks of text editing benchmarks. While multiple previous works have attempted to develop general-purpose text editing models using LLMs, they are either not trained with instruction-tuning (Du et al., 2022c; Kim et al., 2022), trained on much smaller models or not trained on task-specific datasets (Mallinson et al., 2022; Schick et al., 2023), or are not publicly available (Schick et al., 2023), which limits their effectiveness, performance, or usability.", + "bbox": [ + 507, + 629, + 882, + 821 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "We introduce CoEDIT, a text editing system designed to provide writing assistance with a natural language interface. A user can employ CoEDIT by providing natural language instructions such as \"Paraphrase the sentence\" or \"Fix the grammar\". Our experiments demonstrate that fine-tuning in", + "bbox": [ + 507, + 822, + 884, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_footnote", + "text": "$^{1}$ Code, data, and models available at https://github.com/vipulraheja/coedit", + "bbox": [ + 112, + 891, + 487, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_number", + "text": "5274", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 0 + }, + { + "type": "footer", + "text": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5274-5291 December 6-10, 2023 ©2023 Association for Computational Linguistics", + "bbox": [ + 216, + 945, + 778, + 972 + ], + "page_idx": 0 + }, + { + "type": "image", + "img_path": "images/bd643d55e590b7046d1994e71e3854be9c4026b9c7836cb0d9e8b9836d46c7c5.jpg", + "image_caption": [ + "Figure 2: General-purpose (left) vs Task-specific (right) Instruction Tuning." + ], + "image_footnote": [], + "bbox": [ + 132, + 80, + 458, + 195 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "strictions for specific tasks is more effective than multi-task learning and general-purpose instruction tuning. We conjecture that task-specific instructions increase the density of the instruction space, reinforcing the complementary effects of multiple tasks and facilitating their generalization to composite and new text editing tasks, as shown in Fig. 2.", + "bbox": [ + 112, + 237, + 487, + 363 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "To build CoEdit, we fine-tune a pre-trained sequence-to-sequence model on a parallel corpus of instruction-based 82K input-output pairs. The inputs and outputs are sourced from publicly available corpora for different text editing tasks, and the instructions are constructed based on rules that introduce lexical and semantic variations.", + "bbox": [ + 112, + 366, + 487, + 476 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Our main contributions are as follows:", + "bbox": [ + 129, + 480, + 418, + 493 + ], + "page_idx": 1 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- We achieve state-of-the-art performance on multiple text editing tasks: grammatical error correction, text simplification, sentence fusion, iterative text editing, and three stylistic editing tasks (formality style transfer, neutralization, and paraphrasing).", + "- We find that even our smallest instruction-tuned model outperforms other supervised text editing models, instruction-tuned models, and general-purpose LLMs with nearly $60\\mathrm{x}$ greater parameters, on both manual and automatic evaluations.", + "- CoEdit generalizes well to new, adjacent tasks not seen while fine-tuning, as well as composite instructions with multiple task specifications.", + "- Our data and models will be publicly available." + ], + "bbox": [ + 122, + 495, + 487, + 736 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "2 Related Work", + "text_level": 1, + "bbox": [ + 114, + 747, + 270, + 764 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Large Language Models for Text Editing In general, our work is related to many prior works that leverage LLMs; for instance, finetuning T5 (Raffel et al., 2020a) on pairs of original and edited text (Faltings et al., 2021; Reid and Neubig, 2022; Mallinson et al., 2022; Du et al., 2022a,b; Kim et al., 2022). However, these aforementioned works are either not based on instruction tuning, use different modeling techniques such as tag-based se", + "bbox": [ + 112, + 774, + 489, + 917 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "quence labeling, or are not general enough to work on multiple text editing tasks. Moreover, several LLMs are trained to solve specific tasks only, such as grammar errors (Mallinson et al., 2022; Fang et al., 2023), text simplification (Stajner et al., 2022), paraphrase generation (Chowdhury et al., 2022), or style transfer (Reif et al., 2022), which limits their generalizability.", + "bbox": [ + 507, + 84, + 882, + 212 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Instruction Tuning for Writing Assistance Explicitly teaching models how to follow natural language instructions is closely related to recent work for fine-tuning models using large datasets of human-written instructions (Wei et al., 2022; Mishra et al., 2022; Sanh et al., 2022; Ouyang et al., 2022a; Wang et al., 2022; Iyer et al., 2022; Bach et al., 2022; Longpre et al., 2023). Recently, advanced data augmentation and instruction tuning, starting with the Flan models (Chung et al., 2022b), have shown that strong results stem both from the larger and more diverse set of tasks. Additionally, enriching task diversity and balancing task sources (Sanh et al., 2022) are shown to be critical to performance, suggesting instruction-tuned models offer a more computationally-efficient starting checkpoint for downstream applications, corroborating Liu et al. (2022) and Aribandi et al. (2022).", + "bbox": [ + 507, + 222, + 884, + 511 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "On instruction tuning for writing assistance, our work is closely related to PEER (Schick et al., 2023), who fine-tuned T5-based LLMs by following user-provided text-editing plans to perform the said edits. There are a few significant differences in our approach compared to PEER. While PEER attempts to either create or leverage a user-provided plan, realize the edits conditioned on the plan, and try to explain the plan, we focus only on the plan and edit parts of the pipeline. Even when it comes to handling editing plans in the form of natural language instructions, our work focuses on edits that do not add new information. Therefore, we compare our models only against PEER-Edit models.", + "bbox": [ + 507, + 512, + 882, + 737 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Finally, no prior works, to the best of our knowledge, have investigated the ability of instruction-tuned LLMs for text editing to generalize to composite instructions.", + "bbox": [ + 507, + 738, + 882, + 801 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "3 CoEdit", + "text_level": 1, + "bbox": [ + 509, + 810, + 623, + 825 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "3.1 Training Dataset", + "text_level": 1, + "bbox": [ + 509, + 834, + 687, + 848 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Our dataset creation is based on the ITERER+ dataset proposed by Kim et al. (2022) who combined datasets from various text editing tasks (See Table 1). Their work, in turn, is based on Du et al.", + "bbox": [ + 507, + 854, + 882, + 917 + ], + "page_idx": 1 + }, + { + "type": "page_number", + "text": "5275", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 1 + }, + { + "type": "table", + "img_path": "images/751e945c475e4996eacbb4eab026371559605ff0db2b7a7520727e94c94819e6.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Edit IntentionDatasetsSizeExample InputExample Output
FLUENCYNUCLE-14, Lang-8, BEA-1920kFix the grammar: When I grow up, I start to understand what he said is quite right.When I grew up, I started to understand what he said was quite right.
COHERENCEDiscoFuse11kMake this text coherent: Their flight is weak. They run quickly through the tree canopy.Their flight is weak, but they run quickly through the tree canopy.
CLARITY (Simplification)NEWSELA,WikiAuto, WikiLarge, ParabankV2, ITERER-CLARITY13kRewrite to make this easier to understand: A storm surge is what forecasters consider a hurricane's most treacherous aspect.A storm surge is considered a hurricane's most dangerous aspect.
STYLE (Paraphrase)ParabankV215kParaphrase this: Do you know where I was born?Do you know my birthplace?
STYLE (Formalize)GYAFC12kWrite this more formally: OMG i love that song im listening to it right nowI love that song and I am listening to it at this moment.
STYLE (Neutralize)WNC11kWrite in a more neutral way: The authors' exposé on nutrition studies.The authors' statements on nutrition stud-ies.
", + "bbox": [ + 117, + 80, + 878, + 275 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Table 1: Example data instances in the COEDIT dataset. Instructions in the inputs are italicized.", + "bbox": [ + 169, + 284, + 818, + 299 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "(2022b), who categorized each edit into MEANING-CHANGED or NON-MEANING-CHANGED. Edits that belong to the latter group are further assigned to FLUENCY, COHERENCE, CLARITY, or STYLE. The aforementioned taxonomy of edit intents from ITERER reflects writers' general intention behind their revision, providing more in-depth information than just superficial edit operations, such as ADD and DELETE.", + "bbox": [ + 112, + 318, + 487, + 461 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Similar to Kim et al. (2022), our work focuses on non-MEANING-CHANGED edits. We consider those edits to be ones that do not add new information or perform fact updates. Since the STYLE edits are quite subjective in nature, we allow for the possibility of meaning change so as to fulfill the needs of making stylistic edits, but we constrain the editing tasks to ensure the edited texts are semantically similar to the sources, but not to the extent of adding new information or fact updates. With this in mind, we expand the STYLE edit intention category from ITERATER+ to include three new sub-intentions: Paraphrasing, Formality Style Transfer (or Formalization), and Neutralization.", + "bbox": [ + 112, + 464, + 487, + 690 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "The aforementioned ITERER dataset taxonomy lends itself conveniently to be articulated as natural language instructions and allows us to naturally formulate them into instructional prompts (See Table 1). We rewrite each edit intention as a set of natural language instruction prompts to create the COEDIT dataset. To allow models to adapt to linguistic variations of the instructions, we also include paraphrases of the instruction templates, e.g., instead of \"Write\" we also use \"Generate\" or \"Rewrite,\" or instead of \"Paraphrase the text\" we use \"Rewrite the text with different wording,\" and so on. For each task, we develop a variety of such diverse instructional prompts and ran", + "bbox": [ + 112, + 694, + 489, + 917 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "domly sample an instruction from the aforementioned group of task-specific instruction candidates to be pre-pended to the source in order to form an data pair. We provide the full list of our instructional prompts in §C. In total, our training dataset consists of around 82K pairs. We keep the original train-validation-test splits consistent as the original datasets but diversify the train and validation splits with the paraphrasing augmentations. The details of datasets and instructions used to train our models are described in §A.", + "bbox": [ + 505, + 318, + 884, + 510 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.2 Text Editing Models", + "text_level": 1, + "bbox": [ + 507, + 526, + 714, + 542 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "We fine-tune different versions of pre-trained FLANT5 (Chung et al., 2022a) models on the COEDIT dataset. Specifically, we use FLANT5-L (770M parameters), FLANT5-XL (3B parameters), FLANT5-XXL (11B parameters) models, which are henceforth referred to as COEDIT-L, COEDIT-XL, and COEDIT-XXL respectively. The training details are summarized in $\\S D$ .", + "bbox": [ + 507, + 550, + 882, + 678 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "4 Experimental Setup", + "text_level": 1, + "bbox": [ + 507, + 695, + 717, + 712 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "We conduct experiments to determine if a standard instruction-tuned language model fine-tuned using task-specific data can improve text editing performance and if it can further generalize into a general-purpose text editing model capable of following human-written instructions and handling a wider array of editing tasks, such as unseen and composite instructions. Specifically, we aim to answer the following research questions:", + "bbox": [ + 505, + 724, + 882, + 869 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "- RQ1: Can COEdit follow text editing instructions and perform high-quality edits across a wide variety of tasks?", + "bbox": [ + 517, + 871, + 882, + 917 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "5276", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 2 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- RQ2: Is CoEdit generalizable to perform high-quality edits for new types of text editing instructions?", + "- RQ3: Does CoEdit make the writing process more efficient and effective for human writers?" + ], + "bbox": [ + 122, + 84, + 485, + 162 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "We answer these questions via quantitative analyses of model outputs (Section 5) and via qualitative analyses and human evaluations of model outputs (Section 6). Further, we investigate RQ2 along two dimensions: (1) generalization to composite instructions containing combinations of multiple different kinds of edits and (2) out-of-domain generalization to instructions with new task requirements on previously unseen data.", + "bbox": [ + 112, + 165, + 487, + 309 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "4.1 Models", + "text_level": 1, + "bbox": [ + 112, + 319, + 218, + 332 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "No-Edits Baseline We first evaluate a no-edits baseline, where the output is simply a copy of the source input without the instruction. This strategy performs reasonably well on tasks where the target output largely overlaps with the input (e.g., GEC).", + "bbox": [ + 112, + 340, + 485, + 420 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Supervised Text Editing Models We also evaluate existing LLMs for text editing that are not finetuned with instruction-specific data. Specifically, to understand the effect of task-specific fine-tuning, we evaluate against $\\mathrm{T5}^2$ (Raffel et al., 2020b) models as primary alternatives of our FLAN-T5 models. We also compare our models against ITERER (Du et al., 2022b) and DELITERATER (Kim et al., 2022), which have shown strong performance on a variety of text editing tasks. $^3$", + "bbox": [ + 112, + 429, + 489, + 589 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Instruction-tuned LLMs A major group of our comparisons is against instruction-tuned LLMs:", + "bbox": [ + 112, + 598, + 485, + 630 + ], + "page_idx": 3 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- Our main comparison is against PEER (Schick et al., 2023), which is primarily based on the LM Adapted variant of T5. As the focus of our work is on improving revision quality (Section 2), we compare against PEER-EDIT (both 3B and 11B versions).", + "- T0, T0++ (Sanh et al., 2022) and Tk-Instruct (Wang et al., 2022), which are all initialized from the LM Adapted variant of T5, and finetuned using PromptSource (Bach et al., 2022), and Super-NaturalInstructions (Wang et al., 2022) datasets, respectively." + ], + "bbox": [ + 122, + 631, + 487, + 822 + ], + "page_idx": 3 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- Alpaca (Taori et al., 2023) is an instruction-tuned version of the LLaMA-7B model (Touvron et al., 2023) trained on 52K instruction-following demonstrations generated by GPT3.", + "- We also compare InstructGPT (Ouyang et al., 2022a), a variant of GPT3 fine-tuned via reinforcement learning on a large dataset of instructions and human-written outputs.", + "- GPT3.5 (henceforth referred to as ChatGPT), is an improved version of InstructGPT optimized for chat. We utilize OpenAI's API for all inference tasks.5", + "- GPT3 also offers a text Editing $\\mathbf{A}\\mathbf{P}\\mathbf{I}^6$ (we refer to as GPT3-Edit), which is usable for editing tasks rather than completion, making it directly comparable to the tasks we train COEDIT on." + ], + "bbox": [ + 517, + 84, + 882, + 341 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Large-Pretrained Decoder-only Models We compare against LLMs with no instruction tuning in two settings – zero-shot and few-shot (details in Section 5.1):", + "bbox": [ + 507, + 351, + 880, + 414 + ], + "page_idx": 3 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- The 175B GPT3 (Brown et al., 2020) model that is not instruction-tuned demonstrates strong general-purpose text revision capabilities.", + "- LLaMA (Touvron et al., 2023) is Meta AI's general-purpose language model trained only on publicly available data. We utilize the 7B model due to computing constraints." + ], + "bbox": [ + 517, + 416, + 880, + 527 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Outputs of all models were generated using greedy decoding unless specified otherwise.", + "bbox": [ + 507, + 529, + 880, + 561 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "4.2 Test Datasets", + "text_level": 1, + "bbox": [ + 507, + 573, + 660, + 586 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "To assess the editing capabilities of CoEDIT, we perform evaluations on standard test sets sourced from a variety of text editing task benchmarks, most notably, EDITEVAL (Dwivedi-Yu et al., 2022). Owing to the overlap of our work with PEER, we keep our evaluation datasets and evaluation metrics as close to theirs as possible for consistency: We used JFLEG (Napoles et al., 2017) for grammatical error collection, TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) for text simplification, Coherence split of ITER (Du et al., 2022b) and the DISCOFUSE dataset (Geva et al., 2019) for coherence, and ITER (Du et al., 2022b) for iterative text revision. For Style-related edits, we used GYAFC (Rao and Tetreault, 2018) for formality style, WNC (Pryzant et al., 2020) for neutralization, and MRPC (Dolan and", + "bbox": [ + 505, + 593, + 882, + 866 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "2The original T5 model cannot continue text well due to its infilling pre-training objective. Hence, similar to Schick et al. (2023), we evaluate its LM Adapted versions (Lester et al., 2021), which are trained with a language modeling objective.", + "bbox": [ + 112, + 829, + 487, + 879 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "3We are unable to make full comparisons against EdiT5 (Mallinson et al., 2022) and PEER (Schick et al., 2023) as the models are not publicly available.", + "bbox": [ + 112, + 879, + 485, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "4We use text-davinci-003", + "bbox": [ + 529, + 876, + 709, + 888 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "5We use gpt-3.5-turbo", + "bbox": [ + 532, + 889, + 685, + 903 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "6We use text-davinci-edit-001", + "bbox": [ + 532, + 904, + 744, + 916 + ], + "page_idx": 3 + }, + { + "type": "page_number", + "text": "5277", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Brockett, 2005), STS (Cer et al., 2017), and QQP for paraphrasing. Detailed descriptions of each dataset and its evaluation metrics are in $\\S \\mathbf{B}$", + "bbox": [ + 112, + 84, + 487, + 131 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "5 Quantitative Results", + "text_level": 1, + "bbox": [ + 114, + 149, + 326, + 165 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "5.1 Text Editing Performance", + "text_level": 1, + "bbox": [ + 114, + 178, + 361, + 193 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Table 2 helps us answer RQ1 by comparing the performance of CoEdit to other models across various text editing tasks. We first present results from the more well-known evaluation sets here and present additional results (i.e., sub-tasks and additional datasets) in Table 11.", + "bbox": [ + 112, + 200, + 487, + 297 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We segregate the models into seven groups. The first group (a) consists of the copy baseline and T5-LARGE baseline fine-tuned with prefix-tuning (each data point is prefixed with task-specific tags rather than instructions), while the second group (b) consists of instruction-fine-tuned T5-based models on non-text-editing tasks. We find that CoEdit substantially outperforms these models across all tasks.", + "bbox": [ + 112, + 299, + 485, + 443 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "The next two groups (c, d) show different LLMs varying from 7B to 176B parameters in size, evaluated in a zero-shot setting. Those in group (c) are decoder-only models, while those in group (d) are instruction-tuned. We find that CoEdit outperforms all LLMs comparable to its model size (e.g., Alpaca and LLaMA) across all tasks, as well as on most tasks compared to models several times larger, such as ChatGPT and InstructGPT. This indicates that current general-purpose and instruction-tuned models are underfitted, and it is beneficial to densify the task/instruction space rather than to scale model size.", + "bbox": [ + 112, + 445, + 489, + 653 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Although models such as Alpaca and T5-based models (Tk-instruct, T0, $\\mathrm{T0 + + }$ ) have previously shown strong capabilities for zero-shot tasks, they show weaker performance compared to CoEDIT. We also see that the decoder-only models (e.g., GPT3 and LLaMA) often repeat the input for more complex tasks, such as ones under the Style intent group. This can be attributed to difficulty understanding the prompted task, resulting in the models either repeating the input sentence or generating a continuation unrelated to the task.", + "bbox": [ + 112, + 656, + 489, + 833 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Next, in the fifth group (e), we evaluate the LLMs under a few-shot setting. As mentioned in Section 4.1, we conduct these experiments in a 4-shot evaluation setting, where example inputs were constructed by randomly sampling four inputs for each task from the CoEDIT dataset such that all examples chosen would fit in the input window for all models as seen in (Brown et al., 2020). The input sentence and its corresponding revised reference were pre-pended to the instructional prompt. We conduct few-shot evaluations for decoder-only LLMs (GPT3) and three instruction-tuned LLMs (InstructGPT, ChatGPT, and Alpaca). Outputs of all models were generated using greedy decoding unless specified otherwise.", + "bbox": [ + 507, + 84, + 884, + 325 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We observe that giving specific examples improves performance in all models for all tasks except MRPC for GPT3. This may be because GPT3 still exhibits some similar behavior in repeating its generations continuously, resulting in a low BLEU score but low semantic similarity as well. We don't present any experiments for GPT3-Edit under the few-shot setting, as scores tended to stay the same across all tasks – implying that GPT3-Edit may not have as good in-context learning capabilities. Overall, we find that even our smallest 770M parameter model is competitive against LLMs evaluated in a few-shot setting in most tasks.", + "bbox": [ + 507, + 326, + 884, + 535 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "In the final group (f), we compare our models against task-specific text editing models such as ITERER, DELITERATER, and PEER. ITERER and DELITERATER perform comparatively worse than the scores reported in the original paper as we present different and more difficult inputs, only pre-pending instructions to the inputs while ITERER and DELITERATER were trained with task-specific tags. Furthermore, they were trained using BART and Pegasus, respectively, both of which have a summarization pre-training objective, and were not trained to follow instructions. On average, COEDIT beats PEER across all reported evaluations except the ITERATER benchmark. This can primarily be attributed to the difference in task-specific fine-tuning since PEER uses Wikipedia as the source of instructional edit data.", + "bbox": [ + 507, + 536, + 884, + 809 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "5.2 Ablation Studies", + "text_level": 1, + "bbox": [ + 507, + 822, + 687, + 835 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Table 3 shows the performance of various baselines, which we discuss in detail in this section.", + "bbox": [ + 507, + 844, + 882, + 875 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Instruction Tuning. To understand the effectiveness of instruction-tuning, we fine-tune the 3B pa", + "bbox": [ + 507, + 887, + 882, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_footnote", + "text": "7Since PEER had several scores missing, and due to the high scores of paraphrasing transfer, for fairness, it was left out of the Overall score calculations. For results with multiple metrics, the best-performing method is calculated by taking the average. For the MRPC average, we subtract the Self-BLEU score from 100 since lower is better.", + "bbox": [ + 112, + 844, + 487, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_number", + "text": "5278", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 4 + }, + { + "type": "table", + "img_path": "images/ee90b1a5e64238ca45ad436a1c54b3125dc40e22bda7eb8e603a252d02018c16.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelSizeOverallIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
(a)COPY-27.629.826.7 / 40.520.730.817.6 / 10.631.85 / 047.4 / 100
T5-LARGE770M24.721.132.7 / 22.935.828.0130.9 / 4.8913.2 / 027.6 / 62.8
(b)TO*3B29.726.142.2 / 36.133.232.437.9 / 39.319.4 / 028.3 / 84.1
Tk-INSTRUCT*3B27.321.035.2 / 26.836.928.935.7 / 43.0124.2 / 0.120.4 / 48.9
T0++*11B32.631.539.4 / 40.533.135.536.8 / 43.721.2 / 042.9 / 94.9
(c)LLAMA7B28.230.127.7 / 3.3421.831.118.8 / 89.131.9 / 05.29 / 64.2
GPT3175B27.423.338.1 / 2.834.826.236.6 / 87.923.4 / 00 / 51.7
(d)ALPACA7B28.430.428.5 / 6.422.031.118.9 / 94.431.9 / 00 / 77.9
GPT3-EDIT175B41.836.152.4 / 50.632.954.035.7 / 52.350.7 / 17.122.6 / 98.7
INSTRUCTGPT175B41.632.662.4 / 57.244.647.447.8 / 98.233.7 / 0.116.03 / 98.9
CHATGPT-36.928.257.6 / 49.445.940.240.7 / 99.628.5 / 0.113.4 / 99.0
(e)ALPACA (FS)7B30.030.833.03 / 11.323.233.120.6 / 95.432.04 / 00.1 / 66.7
GPT3 (FS)175B38.432.450.1 / 4.139.245.143.1 / 97.236.7 / 00 / 14.5
INSTRUCTGPT (FS)175B45.136.264.5 / 55.746.355.247.3 / 98.842.8 / 015.9 / 99.5
CHATGPT (FS)-40.130.858 / 50.645.451.242.3 / 99.634.1 / 013.3 / 96.1
(f)ITERATER570M31.032.835.9 / 34.321.830.122.7 / 54.134.2 / 040.5 / 97.8
DELITERATER570M28.029.927.5 / 31.221.232.218.1 / 57.831.9 / 039.1 / 100
PEER-3B*3B41.737.155.5 / 54.330.5--53.3 / 21.6-
PEER-11B*11B42.137.855.8 / 54.329.5--54.5 / 22.8-
(g)CoEdit-L770M49.835.262.4 / 59.342.475.354.6 / 98.069.3 / 46.423.3 / 99.1
CoEdit-XL3B51.436.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
CoEdit-XXL11B51.537.165.0 / 61.541.778.655.1 / 97.271.0 / 51.421.8 / 99.0
", + "bbox": [ + 114, + 80, + 884, + 409 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/2fb23cd17fa9e3b10538e8b482f1fc75f89c6c7b711950644d53b2204db575d1.jpg", + "table_caption": [ + "Table 2: Comparison of CoEDIT against various baselines: (a) copy baseline and T5-LARGE baseline with task-specific prefixes (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs (zero-shot), (d) Instruction-tuned LLMs (zero-shot), (e) Few-shot evaluations of pre-trained LLMs, (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first score for each task (excluding MRPC style task) is SARI. The second scores for Fluency, GYAFC, and WNC are GLEU, Formality Transfer accuracy (%), and EM. For MRPC, the first score is Self-BLEU, while the second score is semantic similarity. The best-performing models7 for each dataset are highlighted in boxes. Results with (*) are ones reported in prior works. (FS) denotes few-shot evaluation. Results on other datasets are in Table 11." + ], + "table_footnote": [], + "table_body": "
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER↑JFLEG↑ASSET↑DiscoFuse-Wiki↑GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
CoEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
(a) T5-XL (prefix)3B34.361.8 / 58.641.071.450.7 / 94.662.7 / 3330.6 / 87.4
(b) FLANT5-XL3B30.228.3 / 41.325.537.925.0 / 27.833.5 / 0.046.6 / 92.5
(c) CoEDIT-XL-R3B33.963.8 / 60.236.269.752.6 / 48.769.2 / 25.435.4 / 92.6
", + "bbox": [ + 114, + 545, + 882, + 644 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Table 3: Ablation results for CoEdit to evaluate the impact of (a) instruction tuning (b) task-specific training, and (c) quality of instructions. The scores from left to right follow exactly as Table 2.", + "bbox": [ + 110, + 652, + 882, + 682 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "rameter T5 model (T5-XL) and compare it with CoEDIT-XL, its FLANT5 counterpart on the same training and validation sets. The only change is that the instructional prompts for the training datasets are replaced by task-specific prefixes. Specifically, the $82k$ pairs in the training dataset used to train the CoEDIT models were modified to . We observe (Table 3(a)) that the instruction-tuned CoEDIT models consistently outperform prefix-tuned T5 models, showing the ef", + "bbox": [ + 112, + 707, + 489, + 885 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "fectiveness of instruction-tuning over prefix-tuning.", + "bbox": [ + 507, + 707, + 882, + 722 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Task-Specific Training. A core contribution of this work is to push the performance of small- (<1B parameters) to medium-sized (1-10B parameters) LLMs for common text editing tasks. This drives the need for fine-tuning on task-specific datasets. The impact of this task-specific data augmentation for text editing tasks has already been shown in Kim et al. (2022). For this work, we compare our task-specific fine-tuned models against their FLANT5 un-tuned counterparts referred to as FLANT5-XL (Table 3(b)). We see a substantial gap", + "bbox": [ + 507, + 741, + 884, + 919 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "${}^{8}$ task was one of gec, simplify, clarify, coherence, formalize, neutralize and paraphrase", + "bbox": [ + 112, + 891, + 487, + 917 + ], + "page_idx": 5 + }, + { + "type": "page_number", + "text": "5279", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/745b3f3b30d25599b74bcca590f8efc4e5fc7a189b25a213fc6ad18d9f49f31d.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
COEDIT-xLGPT3-EditTieNeither
64%10%4%22%
", + "bbox": [ + 156, + 82, + 445, + 122 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "between the two for all datasets and model sizes, thus, confirming prior findings.", + "bbox": [ + 112, + 229, + 487, + 261 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Quality of Instructions. While we developed with a limited set of task-specific instructional prompts, there has been widespread work on the prompt sensitivity of LLMs, especially with growing model capacity (Lu et al., 2022). To assess the robustness of CoEDIT models on instructional prompts, we train another baseline CoEDIT-xL model with randomized task-specific instructions (henceforth referred to as CoEDIT-xL-R). Specifically, the entire training dataset was randomized, where an instruction from one task was replaced randomly by an instruction from another task. Table 3(c) shows the results for this experiment. We observe that while CoEDIT-xL-R achieves scores that are higher than the non-task-specific tuned FLANT5-xL (especially on edit-based metrics such as SARI), it significantly falls behind CoEDIT-xL on those, as well as on the style accuracy metrics such as formality transfer accuracy and paraphrasing semantic similarity. This indicates that while the instructional structure of the inputs and task-specific training makes the model learn how to make edits (which drives up the SARI scores), however, the accuracy of those edits suffers since they are trained with the wrong instructions most of the time. Overall, the improvements highlight the positive impact of task-specific training, and the gaps in performance highlight the negative impact of lack of proper instruction tuning.", + "bbox": [ + 115, + 275, + 489, + 741 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "6 Qualitative Results", + "text_level": 1, + "bbox": [ + 112, + 760, + 312, + 776 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "We now address RQ2 and RQ3 (Section 4). We show that CoEDIT shows generalization abilities to adjacent tasks not seen during fine-tuning and can generalize to composite instructions containing a combination of tasks. Further, our human evaluation studies show that expert human evaluators find the text generated by CoEDIT to be of higher quality than a much larger instruction-tuned LLM.", + "bbox": [ + 112, + 790, + 489, + 917 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/da268024a377722c310f71bc2168675a0b160a73fada18cc96463cab6c561ed1.jpg", + "table_caption": [ + "Table 4: Human evaluation results: Pair-wise comparison of CoEDIT-XL against the best-performing 175B-parameter instruction-tuned LLM for text editing (GPT3-EDIT). Scores indicate the % of test inputs for which the human annotators preferred the said model." + ], + "table_footnote": [], + "table_body": "
ModelSentence CompressionPoliteness Transfer
SARI†/ CR(%)†S-BLEU‡/ TA(%)†
GPT3-EDIT23.98 / 6.0963.31 / 63.11
T5-xL (prefix)31.47 / 7.6681.43 / 58.82
FLANT5-XL33.21 / 15.2991.91 / 52.69
CoEdit-XL35.17 / 22.7860.32 / 64.45
", + "bbox": [ + 510, + 82, + 884, + 189 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Table 5: Comparison of CoEDIT-xL against the best-performing non-instruction-tuned model (T5-xL), nontask-specific-tuned model (FLANT5-xL) and GPT3-EDIT on out-of-domain generalization.", + "bbox": [ + 507, + 199, + 885, + 256 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "6.1 Text Editing Quality", + "text_level": 1, + "bbox": [ + 507, + 281, + 717, + 297 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Since text editing is often subjective, and automatic metrics are not always accurate in measuring if an instruction is satisfied, we conduct human evaluations for our model outputs by linguistic experts on 50 test inputs to ensure they meet the instructional constraints. Given the automatic evaluation results in Section 5, we compare our 3B-parameter CoEDIT-XL model against the largest comparable 175B instruction-tuned LLM for text editing GPT3-EDIT. Specifically, we conducted a pairwise comparison: each annotator was shown an instructional input and outputs from both models (they were not aware which output was generated by which model). They were then asked to evaluate the fluency, accuracy, and meaning preservation of the edited texts and choose the higher-quality output (\"neither\" and \"tie\" are also valid options). We collect three annotations for each question and use the majority vote as the final judgment.", + "bbox": [ + 505, + 303, + 884, + 609 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Table 4 shows the results of the evaluation. The annotators prefer our CoEdit model for $64\\%$ of the inputs, whereas, for $10\\%$ of the inputs, GPT3-EDIT's output is preferred. In $4\\%$ cases, both models produce equally good outputs, whereas, for $22\\%$ of the inputs, both models generate unacceptable outputs. Table 12 provides a side-by-side comparison of the outputs generated by the two models.", + "bbox": [ + 507, + 611, + 885, + 740 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "6.2 Generalizability to Adjacent Tasks", + "text_level": 1, + "bbox": [ + 507, + 751, + 828, + 766 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "We analyze the generalization capabilities of our models by evaluating them on a few related tasks that do not exist in the fine-tuning data. Specifically, we chose two standard NLP tasks – sentence compression (SC) (Filippova and Altun, 2013) and politeness transfer (PT) (Madaan and Yang, 2021). It is noteworthy that while our models were not fine-tuned on these exact tasks, we chose them so that the models could still comprehend them based", + "bbox": [ + 507, + 774, + 884, + 917 + ], + "page_idx": 6 + }, + { + "type": "page_number", + "text": "5280", + "bbox": [ + 480, + 927, + 521, + 940 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/b377d9baa65d3b1d0efb8a6681194f06fe3a0dc3251a523c8f65bfd35f24c5ff.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
COEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
COEDIT-XL-C3B36.565.1 / 61.342.074.855.9 / 97.269.7 / 48.520.7 / 98.8
", + "bbox": [ + 115, + 80, + 885, + 159 + ], + "page_idx": 7 + }, + { + "type": "table", + "img_path": "images/c976982eb6c160f447064c3525e645f574d0e31497c8a33a1da5b8c12ac62cc3.jpg", + "table_caption": [ + "Table 6: Results for composite prompt training on single-task performance. Scores follow exactly as Table 2." + ], + "table_footnote": [], + "table_body": "
CoEDIT-xL-CGPT3-EditTieNeither
38%34%3%25%
CoEDIT-xL-CCoEDIT-xLTieNeither
34%21%14%31%
", + "bbox": [ + 137, + 200, + 463, + 275 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Table 7: Human evaluation results: Pair-wise comparison of CoEDIT-XL-C against GPT3-EDIT and equivalent CoEDIT-XL (with chaining pipeline). Human annotators preferred the said model for % of test inputs.", + "bbox": [ + 112, + 285, + 489, + 343 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "on other tasks they were fine-tuned on. We define them as being adjacent tasks, which still exist within the scope of existing tasks but have not been seen during fine-tuning (blue lines in Fig. 2).", + "bbox": [ + 112, + 366, + 487, + 430 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Similar to the previous experiment, in addition to GPT3-EDIT, we compare COEDIT-XL against the similarly-sized prefix-tuned (T5-XL) model and the non-task-specific trained FLANT5-XL model (same models as the ones used in Table 3 (a) and (b)). For evaluation, we curated a set of new instructional prompts geared towards both the new tasks (details in Appendix C). We evaluated the models on the respective test datasets from Filippova and Altun (2013) and Madaan and Yang (2021).", + "bbox": [ + 112, + 431, + 487, + 590 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Table 5 shows the results of CoEDIT-XL against various models on the sentence compression and politeness transfer tasks. For SC, we report the SARI metric for rewrite quality and compression ratio (CR) for task-specific quality. For PT, we report Self-BLEU (Zhu et al., 2018) for the rewrite quality and Transfer Accuracy (TA) for the task-specific quality. We observe that CoEDIT consistently outperforms other models on both tasks, which indicates its generalization abilities on these new and unseen adjacent tasks. It is noteworthy that GPT3-EDIT performs quite well out-of-the-box on PT, but not so much on the SC task.", + "bbox": [ + 112, + 592, + 489, + 800 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "6.3 Generalizability to Composite Instructions", + "text_level": 1, + "bbox": [ + 112, + 813, + 394, + 841 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Finally, we also explore the capability of our model to understand composite natural language instruc", + "bbox": [ + 112, + 850, + 487, + 882 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "tions. Composite instructions are made up of a combination of tasks. For example, for the composite instruction, \"Make the text simpler, paraphrase it, and make it formal\", the model needs to simultaneously perform simplification, paraphrasing and formalization of the input sentence.", + "bbox": [ + 507, + 204, + 884, + 299 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Since there is no publicly available dataset for composite instructions, we create the CoEDIT-COMPOSITE dataset by expanding the CoEDIT dataset to a total of 90k pairs. In addition to the single-task instructions, we use seven new combinations of instructions as part of our training set, with each composite instruction having either two or three tasks. Specifically, these are GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification, Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification, and Paraphrasing-Simplification (more details in §A). We then fine-tune the FLANT5-xL model on CoEDIT-COMPOSITE (referred as CoEDIT-XL-C). The training details are summarized in §D.", + "bbox": [ + 507, + 307, + 884, + 580 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "We evaluate CoEDIT-XL-C on both single and composite instructions. For the single instructions, we use the same evaluation setup as in Table 2 and find that the overall performance of CoEDIT-XL-C is on par with that of CoEDIT-XL (Table 6). This shows that training the model additionally on composite prompts has no negative impact on single-task performance.", + "bbox": [ + 507, + 589, + 882, + 717 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "For composite instructions, we conduct human evaluations since there is no standard test dataset available. We use three new task combinations in addition to the seven seen during training to evaluate the model's generalizability. These are Coherence-Paraphrase, Coherence-Simplify, and Coherence-Simplify-Paraphrase. Specifically, we conduct two sets of pairwise annotations (similar setup as the one in Section 6.1) comparing CoEDIT-xL-C with GPT3-Edit and CoEDIT-XL (shown in Table 7) on 30 composite instructions. For a fair comparison against CoEDIT-xL, we pre", + "bbox": [ + 507, + 726, + 884, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_footnote", + "text": "9We report Self-BLEU based on the original PT paper since there are no references provided in the dataset.", + "bbox": [ + 112, + 891, + 487, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_number", + "text": "5281", + "bbox": [ + 480, + 928, + 517, + 940 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "pare a chaining pipeline $^{10}$ by decomposing composite instructions into a sequence of multiple single instructions and executing them one-by-one. In $38\\%$ of cases, experts show a preference for CoEDIT-XL-C, compared to $34\\%$ for GPT3-EDIT. In $3\\%$ cases, both models are preferred equally, whereas, for $25\\%$ of the cases, none of them are preferred. The experts prefer CoEDIT-XL-C for $34\\%$ of the cases versus $21\\%$ for the chaining baseline. Both outputs are preferred equally in $14\\%$ cases, whereas, for $31\\%$ of the cases, both models generate unacceptable predictions. Table 13 provides a side-by-side comparison of outputs generated by these models.", + "bbox": [ + 112, + 83, + 492, + 311 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "7 Conclusions", + "text_level": 1, + "bbox": [ + 112, + 324, + 253, + 338 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We present CoEdit – an open-sourced dataset and set of instruction-tuned large language models that can act as a writing assistant by following natural language instructions to perform various textual edits by removing, updating, or adding words, phrases, and sentences. CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, spanning syntactic, semantic, and stylistic edit requirements. Through extensive experiments, we have shown that CoEdit is capable of further generalizing to unseen, adjacent, and composite instructions to perform edits along multiple dimensions in a single turn. In our human evaluations, we observe that CoEdit can assist writers with various aspects of the text revision process at scale by following natural language instructions.", + "bbox": [ + 112, + 351, + 489, + 609 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Limitations", + "text_level": 1, + "bbox": [ + 112, + 623, + 218, + 638 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Although CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, we acknowledge some limitations to our approach and evaluation methods. Our task-specific fine-tuning (like most other works) mainly focuses on sentence-level editing tasks, and its effectiveness on much longer sequences of texts that are more appropriate to real-world editing settings remains to be seen. Additionally, our system mainly focuses on nonmeaning-changing text edits, thus, which could potentially limit the utility of our model to more real-world scenarios where fact-based editing or corrections are needed. Another limitation of our", + "bbox": [ + 112, + 650, + 489, + 860 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "work involves prompt sensitivity. While we construct our inputs by randomly choosing from a pool of verbalizers for every task, we acknowledge that different prompts may induce better or worse edits, and as we evaluate each input with a random verbalizer, a fully controlled comparison for each available prompt across all models is not done. Furthermore, the prompting format was kept uniform across all evaluated models, whereas some models may perform better with a different prompting format. We plan to address this in future work. Finally, computing resource requirements could pose some difficulty in replicating the results (which we try to address by sharing our models publicly).", + "bbox": [ + 507, + 84, + 885, + 311 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Ethics Statement", + "text_level": 1, + "bbox": [ + 509, + 321, + 660, + 336 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Since our work mainly focuses on non-meaning-changing text edits, we are able to avoid many issues involving generating harmful text. Although, there is still a possibility of small meaning changes for stylistic tasks, we try to reduce the chance of hallucinations by constraining the generation to strictly edit tasks in order to reduce the chance of adding any new information, or perpetuating biases.", + "bbox": [ + 507, + 347, + 885, + 491 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Acknowledgements", + "text_level": 1, + "bbox": [ + 509, + 502, + 680, + 519 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We sincerely thank Alice Kaiser-Schatzlein, Robyn Perry, Maya Barzilai, and Claudia Leacock for providing their invaluable linguistic expertise and insightful feedback with the evaluations. We also thank Max Gubin, Leonardo Neves, and Vivek Kulkarni for their helpful suggestions.", + "bbox": [ + 507, + 527, + 885, + 626 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "References", + "text_level": 1, + "bbox": [ + 510, + 652, + 608, + 667 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Fernando Alva-Manchego, Louis Martin, Antoine Bordes, Carolina Scarton, Benoit Sagot, and Lucia Specia. 2020. ASSET: A dataset for tuning and evaluation of sentence simplification models with multiple rewriting transformations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4668-4679, Online. Association for Computational Linguistics.", + "Vamsi Aribandi, Yi Tay, Tal Schuster, Jinfeng Rao, Huaixiu Steven Zheng, Sanket Vaibhav Mehta, Honglei Zhuang, Vinh Q. Tran, Dara Bahri, Jianmo Ni, Jai Gupta, Kai Hui, Sebastian Ruder, and Donald Metzler. 2022. Ext5: Towards extreme multi-task scaling for transfer learning. In International Conference on Learning Representations.", + "Stephen Bach, Victor Sanh, Zheng Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht" + ], + "bbox": [ + 509, + 674, + 885, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_footnote", + "text": "10 Chaining increases the inference time, and the ordering of the tasks in the sequence is also likely to result in different outputs. We leave the optimal ordering of the tasks in prompt chaining for future work.", + "bbox": [ + 112, + 866, + 489, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_number", + "text": "5282", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-david, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Fries, Maged Alshaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Dragomir Radev, Mike Tian-jian Jiang, and Alexander Rush. 2022. Prompt-Source: An integrated development environment and repository for natural language prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 93-104, Dublin, Ireland. Association for Computational Linguistics.", + "bbox": [ + 132, + 85, + 489, + 255 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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.", + "bbox": [ + 115, + 267, + 489, + 411 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Christopher Bryant, Mariano Felice, Øistein E. Andersen, and Ted Briscoe. 2019. The BEA-2019 shared task on grammatical error correction. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 52-75, Florence, Italy. Association for Computational Linguistics.", + "bbox": [ + 115, + 423, + 489, + 514 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "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.", + "bbox": [ + 115, + 527, + 489, + 619 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Jishnu Ray Chowdhury, Yong Zhuang, and Shuyi Wang. 2022. Novelty controlled paraphrase generation with retrieval augmented conditional prompt tuning. Proceedings of the AAAI Conference on Artificial Intelligence, 36(10):10535-10544.", + "bbox": [ + 115, + 631, + 489, + 697 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Hyung Won Chung, Le Hou, S. Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Wei Yu, Vincent Zhao, Yanping Huang, Andrew M. Dai, Hongkun Yu, Slav Petrov, Ed Huai hsin Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc Le, and Jason Wei. 2022a. Scaling instructionfinetuned language models. ArXiv, abs/2210.11416.", + "bbox": [ + 115, + 709, + 489, + 853 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai,", + "bbox": [ + 115, + 865, + 489, + 917 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. 2022b. Scaling instruction-finetuned language models.", + "bbox": [ + 527, + 85, + 884, + 190 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Allan Collins and Dedre Gentner. 1980. A framework for a cognitive theory of writing. In Cognitive processes in writing, pages 51-72. Erlbaum.", + "bbox": [ + 510, + 204, + 882, + 244 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Daniel Dahlmeier, Hwee Tou Ng, and Siew Mei Wu. 2013. Building a large annotated corpus of learner English: The NUS corpus of learner English. In Proceedings of the Eighth Workshop on Innovative Use of NLP for Building Educational Applications, pages 22-31, Atlanta, Georgia. Association for Computational Linguistics.", + "bbox": [ + 510, + 256, + 884, + 350 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005).", + "bbox": [ + 510, + 363, + 882, + 414 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Wanyu Du, Zae Myung Kim, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022a. Read, revise, repeat: A system demonstration for human-in-the-loop iterative text revision. In Proceedings of the First Workshop on Intelligent and Interactive Writing Assistants (In2Writing 2022), pages 96-108, Dublin, Ireland. Association for Computational Linguistics.", + "bbox": [ + 510, + 429, + 882, + 521 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Wanyu Du, Vipul Raheja, Dhruv Kumar, Zae Myung Kim, Melissa Lopez, and Dongyeop Kang. 2022b. Understanding iterative revision from human-written text. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3573-3590, Dublin, Ireland. Association for Computational Linguistics.", + "bbox": [ + 510, + 535, + 882, + 627 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Yupei Du, Qi Zheng, Yuanbin Wu, Man Lan, Yan Yang, and Meirong Ma. 2022c. Understanding gender bias in knowledge base embeddings. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1381-1395, Dublin, Ireland. Association for Computational Linguistics.", + "bbox": [ + 510, + 640, + 882, + 733 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Jane Dwivedi-Yu, Timo Schick, Zhengbao Jiang, Maria Lomeli, Patrick Lewis, Gautier Izacard, Edouard Grave, Sebastian Riedel, and Fabio Petroni. 2022. Editeval: An instruction-based benchmark for text improvements. arXiv.", + "bbox": [ + 510, + 746, + 882, + 812 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Felix Faltings, Michel Galley, Gerald Hintz, Chris Brockett, Chris Quirk, Jianfeng Gao, and Bill Dolan. 2021. Text editing by command. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5259-5274, Online. Association for Computational Linguistics.", + "bbox": [ + 510, + 825, + 882, + 917 + ], + "page_idx": 9 + }, + { + "type": "page_number", + "text": "5283", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 9 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Tao Fang, Shu Yang, Kaixin Lan, Derek F. Wong, Jinpeng Hu, Lidia S. Chao, and Yue Zhang. 2023. Is chatgpt a highly fluent grammatical error correction system? a comprehensive evaluation.", + "Katja Filippova and Yasemin Altun. 2013. Overcoming the lack of parallel data in sentence compression. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1481-1491, Seattle, Washington, USA. Association for Computational Linguistics.", + "Linda Flower. 1980. The dynamics of composing: Making plans and juggling constraints. Cognitive processes in writing, pages 31-50.", + "Mor Geva, Eric Malmi, Idan Szpektor, and Jonathan Berant. 2019. DiscoFuse: A large-scale dataset for discourse-based sentence fusion. 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 3443-3455, Minneapolis, Minnesota. Association for Computational Linguistics.", + "J. Edward Hu, Abhinav Singh, Nils Holzenberger, Matt Post, and Benjamin Van Durme. 2019. Large-scale, diverse, paraphrastic bittexts via sampling and clustering. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pages 44-54, Hong Kong, China. Association for Computational Linguistics.", + "Srinivasan Iyer, Xi Victoria Lin, Ramakanth Pasunuru, Todor Mihaylov, Daniel Simig, Ping Yu, Kurt Shuster, Tianlu Wang, Qing Liu, Punit Singh Koura, et al. 2022. Opt-ilm: Scaling language model instruction meta learning through the lens of generalization. arXiv preprint arXiv:2212.12017.", + "Chao Jiang, Mounica Maddela, Wuwei Lan, Yang Zhong, and Wei Xu. 2020. Neural CRF model for sentence alignment in text simplification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7943-7960, Online. Association for Computational Linguistics.", + "David Kauchak. 2013. Improving text simplification language modeling using unsimplified text data. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1537-1546, Sofia, Bulgaria. Association for Computational Linguistics.", + "Zae Myung Kim, Wanyu Du, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022. Improving iterative text revision by learning where to edit from other revision tasks. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9986-9999, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.", + "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on" + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.", + "Haokun Liu, Derek Tam, Muqeeth Mohammed, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. In Advances in Neural Information Processing Systems.", + "Shayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V Le, Barret Zoph, Jason Wei, et al. 2023. The flan collection: Designing data and methods for effective instruction tuning. arXiv preprint arXiv:2301.13688.", + "Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086-8098, Dublin, Ireland. Association for Computational Linguistics.", + "Aman Madaan and Yiming Yang. 2021. Neural language modeling for contextualized temporal graph generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 864-881, Online. Association for Computational Linguistics.", + "Jonathan Mallinson, Jakub Adamek, Eric Malmi, and Aliaksei Severyn. 2022. EdiT5: Semi-autoregressive text editing with t5 warm-start. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 2126-2138, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.", + "Swaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. 2022. Cross-task generalization via natural language crowdsourcing instructions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3470-3487, Dublin, Ireland. Association for Computational Linguistics.", + "Courtney Naples, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2015. Ground truth for grammatical error correction metrics. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 588-593, Beijing, China. Association for Computational Linguistics.", + "Courtney Naples, Keisuke Sakaguchi, and Joel Tetreault. 2017. JFLEG: A fluency corpus and benchmark for grammatical error correction. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 229-234, Valencia, Spain. Association for Computational Linguistics." + ], + "bbox": [ + 510, + 85, + 884, + 917 + ], + "page_idx": 10 + }, + { + "type": "page_number", + "text": "5284", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Gray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022a. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems.", + "Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F Christiano, Jan Leike, and Ryan Lowe. 2022b. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pages 27730-27744. Curran Associates, Inc.", + "Reid Pryzant, Richard Diehl Martinez, Nathan Dass, Sadao Kurohashi, Dan Jurafsky, and Diyi Yang. 2020. Automatically neutralizing subjective bias in text. Proceedings of the AAAI Conference on Artificial Intelligence, 34(01):480-489.", + "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020a. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.", + "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020b. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(1).", + "Sudha Rao and Joel Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. 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 129-140, New Orleans, Louisiana. Association for Computational Linguistics.", + "Jeff Rasley, Samyam Rajbhandari, Olatunj Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD '20, page 3505-3506, New York, NY, USA. Association for Computing Machinery.", + "Machel Reid and Graham Neubig. 2022. Learning to model editing processes. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 3822-3832, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 11 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Emily Reif, Daphne Ippolito, Ann Yuan, Andy Coenen, Chris Callison-Burch, and Jason Wei. 2022. A recipe for arbitrary text style transfer with large language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 837-848, Dublin, Ireland. Association for Computational Linguistics.", + "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, Hong Kong, China. Association for Computational Linguistics.", + "Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le Scao, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander M Rush. 2022. Multitask prompted training enables zero-shot task generalization. In International Conference on Learning Representations.", + "Timo Schick, Jane A. Yu, Zhengbao Jiang, Fabio Petroni, Patrick Lewis, Gautier Izacard, Qingfei You, Christoforos Nalmpantis, Edouard Grave, and Sebastian Riedel. 2023. PEER: A collaborative language model. In International Conference on Learning Representations.", + "Sanja Šajner, Kim Cheng Sheang, and Horacio Saggion. 2022. Sentence simplification capabilities of transfer-based models. Proceedings of the AAAI Conference on Artificial Intelligence, 36(11):12172-12180.", + "Toshikazu Tajiri, Mamoru Komachi, and Yuji Matsumoto. 2012. Tense and aspect error correction for ESL learners using global context. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 198-202, Jeju Island, Korea. Association for Computational Linguistics.", + "Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca.", + "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models." + ], + "bbox": [ + 510, + 85, + 884, + 917 + ], + "page_idx": 11 + }, + { + "type": "page_number", + "text": "5285", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 11 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Marie M. Vaughan and David D. McDonald. 1986. A model of revision in natural language generation. In 24th Annual Meeting of the Association for Computational Linguistics, pages 90-96, New York, New York, USA. Association for Computational Linguistics.", + "Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Atharva Naik, Arjun Ashok, Arut Selvan Dhanasekaran, Anjana Arunkumar, David Stap, Eshaan Pathak, 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.", + "Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V Le. 2022. Finetuned language models are zero-shot learners. In International Conference on Learning Representations.", + "Kristian Woodsend and Mirella Lapata. 2011. Learning to simplify sentences with quasi-synchronous grammar and integer programming. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 409-420, Edinburgh, Scotland, UK. Association for Computational Linguistics.", + "Haoran Wu, Wenxuan Wang, Yuxuan Wan, Wenxiang Jiao, and Michael Lyu. 2023. Chatgpt or grammarly? evaluating chatgpt on grammatical error correction benchmark.", + "Wei Xu, Chris Callison-Burch, and Courtney Naples. 2015. Problems in current text simplification research: New data can help. Transactions of the Association for Computational Linguistics, 3:283-297.", + "Wei Xu, Courtney Naples, Ellie Pavlick, Quanze Chen, and Chris Callison-Burch. 2016. Optimizing statistical machine translation for text simplification. Transactions of the Association for Computational Linguistics, 4:401-415.", + "Xingxing Zhang and Mirella Lapata. 2017. Sentence simplification with deep reinforcement learning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 584-594, Copenhagen, Denmark. Association for Computational Linguistics.", + "Yaoming Zhu, Sidi Lu, Lei Zheng, Jiaxian Guo, Weinan Zhang, Jun Wang, and Yong Yu. 2018. Texygen: A" + ], + "bbox": [ + 115, + 85, + 490, + 917 + ], + "page_idx": 12 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "benchmarking platform for text generation models. In The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, SIGIR '18, page 1097-1100, New York, NY, USA. Association for Computing Machinery.", + "Zhemin Zhu, Delphine Bernhard, and Iryna Gurevych. 2010. A monolingual tree-based translation model for sentence simplification. In Proceedings of the 23rd International Conference on Computational Linguistics (Coling 2010), pages 1353-1361, Beijing, China. Coling 2010 Organizing Committee." + ], + "bbox": [ + 509, + 85, + 884, + 244 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "A Training Dataset Description", + "text_level": 1, + "bbox": [ + 509, + 261, + 798, + 278 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "In this section, we discuss the details of the datasets used to create our training datasets and also expand on the dataset creation pipeline. For both CoEDIT and CoEDIT-COMPOSITE, we use the following datasets:", + "bbox": [ + 507, + 288, + 882, + 367 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Fluency: We use three prominent corpora for GEC: the NUS Corpus of Learner English (NUCLE) (Dahlmeier et al., 2013), the W&I-LOCNESS (Bryant et al., 2019), and the NAIST LANG-8 Corpus of Learner English (Tajiri et al., 2012), which is one of the largest and most widely used datasets for GEC.", + "bbox": [ + 507, + 370, + 884, + 481 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Clarity: We split Clarity into two sub-tasks, one focused on Text Simplification, and the other category focused on the set of edits outside of Simplification. In total, we use five corpora for Clarity tasks: Four of them - the NEWSELA corpus (Xu et al., 2015), WIKILARGE (Zhu et al., 2010; Woodsend and Lapata, 2011; Kauchak, 2013), WIKIAUTO (Jiang et al., 2020) and a subset from PARABANKV2 corpus (Hu et al., 2019) focus on text simplification, and the last one comes from the Clarity split of ITER (Du et al., 2022b).", + "bbox": [ + 507, + 483, + 884, + 659 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Coherence: We use the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives.", + "bbox": [ + 507, + 662, + 882, + 726 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Style: Owing to the subjective nature of STYLE edits based on different sub-intentions (eg. conveying writers' writing preferences, including emotions, tone, and voice, etc.). We use the following datasets for making different stylistic edits to reflect those distinctions:", + "bbox": [ + 507, + 728, + 882, + 822 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "- Formality: We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018) which is a parallel corpus of informal and formal sentence pairs from two different domains.", + "bbox": [ + 531, + 839, + 882, + 917 + ], + "page_idx": 12 + }, + { + "type": "page_number", + "text": "5286", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 12 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- Neutralization: We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task, where the objective is to remove or mitigate biased words to make sentences more neutral;", + "- Paraphrasing: For paraphrase generation, we used the PARABANKV2 corpus (Hu et al., 2019), since it is a large-scale corpus that contains multiple diverse sentential paraphrases." + ], + "bbox": [ + 136, + 84, + 490, + 237 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Once the raw datasets were collected, we randomly sampled them to the quantities mentioned in Table 1 based on a few heuristics such as old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. The sampled pairs were then modified by prefixing the source texts with task-specific verbalizers (Appendix C) to convert a pair to a pair. All our models were then fine-tuned on the verbalized dataset.", + "bbox": [ + 112, + 243, + 489, + 403 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Composite instructions: Table 8 shows the composition of the COEDIT-COMPOSITE dataset, in addition to the details about datasets and prompts. We use seven such composite instructions during model training. For the first three composite prompts (GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification), we use GEC datasets to extract datapoints that show simplification and paraphrasing edits in addition to GEC. For the next three prompts (Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification), we use the formality dataset (GYAFC) to extract pairs which exhibit paraphrasing and simplification edits in addition to formality. Lastly, for the last prompt (Paraphrasing-Simplification), we use the ParabankV2 paraphrasing dataset to extract data points which show a simplification of the source text in addition to paraphrasing.", + "bbox": [ + 115, + 404, + 489, + 709 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "To select the appropriate source-target pairs for a composite instruction, we use similar heuristics as with single-task instructions, i.e. old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. For example, a source-target pair from a GEC dataset can be used for the composite instruction involving GEC, paraphrasing and simplification if the target and source sentence has a high edit distance and low complexity ratio, character length and word retention scores. The exact details can be found in the code.", + "bbox": [ + 112, + 709, + 489, + 885 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Finally, for building the prompts for the composite instructions, we randomly sample from the", + "bbox": [ + 112, + 887, + 489, + 919 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "task-specific verbalizers and concatenate them. The ordering of the single tasks in a composite instruction is also chosen randomly to ensure better generalization.", + "bbox": [ + 507, + 84, + 884, + 148 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "B Testing Dataset Description", + "text_level": 1, + "bbox": [ + 507, + 165, + 784, + 181 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Specifically, we consider the following datasets:", + "bbox": [ + 507, + 193, + 867, + 209 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Grammatical Error Correction We use the JF-LEG (Napoles et al., 2017) corpus of English sentences that represents a range of language proficiency levels and comprehensive fluency edits. For evaluation, we use the GLEU (Napoles et al., 2015) score as the primary metric and also report results using the SARI (Xu et al., 2016) metric.", + "bbox": [ + 507, + 216, + 884, + 328 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Text Simplification We use the TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) datasets, which were both created from WikiLarge data (Zhang and Lapata, 2017), where each complex sentence consists of multiple crowdsourced reference simplifications. We report results using the SARI metric.", + "bbox": [ + 507, + 335, + 884, + 447 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Coherence We use the Coherence split of ITER (Du et al., 2022b), and the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives. We report results using the SARI metric.", + "bbox": [ + 507, + 454, + 884, + 551 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Iterative Text Editing We use ITERER (Du et al., 2022b), an iterative text revision dataset spanning five edit intentions (Section 3) across three different domains (ArXiv, News, Wikipedia). We evaluate our models using the SARI metric. We report the performance on individual intentions - Fluency, Clarity, and Coherence, and also aggregated scores on the full dataset, which includes Style edits.", + "bbox": [ + 507, + 557, + 884, + 702 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "The rest of the section describes the evaluation setups for Style-related edits:", + "bbox": [ + 507, + 712, + 857, + 744 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Formality Style Transfer We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018), a parallel corpus of informal and formal sentence pairs from two different domains. Similar to prior works, we evaluate the quality of rewriting using SARI, and the accuracy of style transfer using a formality classification model11.", + "bbox": [ + 507, + 758, + 884, + 885 + ], + "page_idx": 13 + }, + { + "type": "page_footnote", + "text": "11https://huggingface.co/s-nlp/xlmr_formality classifier", + "bbox": [ + 507, + 891, + 873, + 917 + ], + "page_idx": 13 + }, + { + "type": "page_number", + "text": "5287", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 13 + }, + { + "type": "table", + "img_path": "images/4130c8081a6c7f4235d794b323f8c9693c3fbb5a7604bbf0651963611836f2aa.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Edit IntentionDatasetsSizeExample InputExample Output
GEC-PARAPHRASENUCLE-14 Lang-8 BEA-191kFix grammar in this sentence, and rewrite this sentence: How about taking account of psychology?One such perspective is to take psychology into account.
GEC-SIMPLIFYNUCLE-14 Lang-8 BEA-191kMake this easier to understand, and remove grammatical mistakes: So it was not like enjoying the tasteful gardens.So it was not as if I could enjoy the pretty gardens.
GEC-PARAPHRASE-SIMPLIFYNUCLE-14 Lang-8 BEA-191kRewrite this sentence, change to simpler wording, and fix the grammar mistakes: Due to ageing, some of the people may suffer from physical and mental depreciation.Due to the effects of aging, some people may suffer.
FORMALITY-PARAPHRASEGYAFC5kMake this sound more formal, and paraphrase: writers dont think about what they will write, they just write!!!Some writers can write freely without putting too much thought to it.
FORMALITY-SIMPLIFYGYAFC2kRewrite more formally, and make this text less complex: Not to my knowledge...I'm a little curious myself now though.I do not think so.
FORMALITY-PARAPHRASE-SIMPLIFYGYAFC4kRewrite the sentence to be simpler, make this sound more formal, and paraphrase this sentence: my answer is what...very clever riddle!!Your riddle was very clever, and I am unsure how to re-spond.
PARAPHRASE-SIMPLIFYParabankV25kUse simpler wording, and write a paraphrased version of the sentence: In your second communication, you requested reinforcements.You asked for backup in your second report
", + "bbox": [ + 117, + 80, + 878, + 588 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Table 8: Example data instances with composite instructions in the COEDIT-COMPOSITE dataset (90K pairs). Instructional prompts in the inputs are italicized.", + "bbox": [ + 112, + 596, + 882, + 627 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Neutralization We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task. Based on prior works, we use Exact-Match (EM) for evaluations, which is the percentage of examples for which the edited text exactly matches the reference(s).", + "bbox": [ + 112, + 637, + 489, + 733 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Paraphrasing We use the widely-used Microsoft Research Paraphrase Corpus (MRPC) (Dolan and Brockett, 2005), the STS benchmark from SemEval-2017 (STS) (Cer et al., 2017), and the Quora Question Pairs $^{12}$ (QQP) datasets. We evaluate paraphrasing on two criteria and metrics: Self-BLEU (Zhu et al., 2018) to measure the diversity of the paraphrases relative to the given source and ref", + "bbox": [ + 112, + 747, + 489, + 876 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "erence texts, and Semantic Similarity13 to measure meaning preservation.", + "bbox": [ + 507, + 636, + 882, + 670 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "C Task Verbalizers", + "text_level": 1, + "bbox": [ + 509, + 684, + 692, + 699 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "We manually curated a variety of task-specific verbalizers to construct the instructional inputs. Table 9 shows the full list of the verbalizers used for training and evaluations. Table 10 shows the verbalizers used for the experiments conducted in Section 6.2.", + "bbox": [ + 507, + 711, + 884, + 791 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "D Training Details", + "text_level": 1, + "bbox": [ + 507, + 821, + 690, + 838 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "We used the Adam optimizer with a learning rate of $1e - 4$ . Each model is trained for 5 epochs", + "bbox": [ + 507, + 848, + 882, + 881 + ], + "page_idx": 14 + }, + { + "type": "page_footnote", + "text": "$^{12}$ https://quoradata.quora.com/ First-Quora-Dataset-Release-Question-Pairs", + "bbox": [ + 112, + 890, + 440, + 917 + ], + "page_idx": 14 + }, + { + "type": "page_footnote", + "text": "13We use the paraphrase-mpnet-base-v2 model from SentenceTransformers (Reimers and Gurevych, 2019)", + "bbox": [ + 507, + 891, + 882, + 917 + ], + "page_idx": 14 + }, + { + "type": "page_number", + "text": "5288", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 14 + }, + { + "type": "table", + "img_path": "images/8ba42ada2eb5457a55f9a7ffe48dfc4e870c237ff23dba6e8e71a28e801d89ce.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Edit Intention / TaskVerbalizers
GECFix grammar, Fix grammar in this sentence, Fix grammar in the sentence, Fix grammar errors, Fix grammatical errors, Fix grammaticality, Fix all grammatical errors, Fix grammatical errors in this sentence, Fix grammar errors in this sentence, Fix grammatical mistakes in this sentence, Fix grammaticality in this sentence, Fix grammaticality of the sentence, Fix disfluencies in the sentence, Make the sentence grammatical, Make the sentence fluent, Fix errors in this text, Update to remove grammar errors, Remove all grammatical errors from this text, Improve the grammar of this text, Improve the grammaticality, Improve the grammaticality of this text, Improve the grammaticality of this sentence, Grammar improvements, Remove grammar mistakes, Remove grammatical mistakes, Fix the grammar mistakes, Fix grammatical mistakes
ClarityClarify the sentence, Clarify this sentence, Clarify this text, Write a clearer version for the sentence, Write a clarified version of the sentence, Write a readable version of the sentence, Write a better readable version of the sentence, Rewrite the sentence more clearly, Rewrite this sentence clearly, Rewrite this sentence for clarity, Rewrite this sentence for readability, Improve this sentence for readability, Make this sentence better readable, Make this sentence more readable, Make this sentence readable, Make the sentence clear, Make the sentence clearer, Clarify, Make the text more understandable, Make this easier to read, Clarification, Change to clearer wording, Clarify this paragraph, Use clearer wording
SimplificationSimplify the sentence, Simplify this sentence, Simplify this text, Write a simpler version for the sentence, Rewrite the sentence to be simpler, Rewrite this sentence in a simpler manner, Rewrite this sentence for simplicity, Rewrite this with simpler wording, Make the sentence simple, Make the sentence simpler, Make this text less complex, Make this simpler, Simplify, Simplification, Change to simpler wording, Simplify this paragraph, Simplify this text, Use simpler wording, Make this easier to understand
CoherenceFix coherence, Fix coherence in this sentence, Fix coherence in the sentence, Fix coherence in this text, Fix coherence in the text, Fix coherence errors, Fix sentence flow, Fix sentence transition, Fix coherence errors in this sentence, Fix coherence mistakes in this sentence, Fix coherence in this sentence, Fix coherence of the sentence, Fix lack of coherence in the sentence, Make the text more coherent, Make the text coherent, Make the text more cohesive, logically linked and consistent as a whole, Make the text more cohesive, Improve the cohesiveness of the text, Make the text more logical, Make the text more consistent, Improve the consistency of the text, Make the text clearer, Improve the coherence of the text
Formality Style TransferFormalize, Improve formality, Formalize the sentence, Formalize this sentence, Formalize the text, Formalize this text, Make this formal, Make this more formal, Make this sound more formal, Make the sentence formal, Make the sentence more formal, Make the sentence sound more formal, Write more formally, Write less informally, Rewrite more formally, Write this more formally, Rewrite this more formally, Write in a formal manner, Write in a more formal manner, Rewrite in a more formal manner
NeutralizationRemove POV, Remove POVs, Remove POV in this text, Remove POVs in this text, Neutralize this text, Neutralize the text, Neutralize this sentence, Neutralize the sentence, Make this more neutral, Make this text more neutral, Make this sentence more neutral, Make this paragraph more neutral, Remove unsourced opinions, Remove unsourced opinions from this text, Remove non-neutral POVs, Remove non-neutral POV, Remove non-neutral points of view, Remove points of view, Make this text less biased
ParaphrasingParaphrase the sentence, Paraphrase this sentence, Paraphrase this text, Paraphrase, Write a paraphrase for the sentence, Write a paraphrased version of the sentence, Rewrite the sentence with different wording, Use different wording, Rewrite this sentence, Reward this sentence, Rephrase this sentence, Rewrite this text, Reward this text, Rephrase this text
", + "bbox": [ + 124, + 85, + 872, + 706 + ], + "page_idx": 15 + }, + { + "type": "table", + "img_path": "images/1c662f047c698e194c46027d49b751661f04e0b7593d9f1152c8a4e3ac6f0e92.jpg", + "table_caption": [ + "Table 9: Complete list of task-specific verbalizers used in our training and test datasets." + ], + "table_footnote": [], + "table_body": "
Edit Intention / TaskVerbalizers
Sentence Com-pressionShorten the sentence, Shorten this sentence, Compress this sentence, Shorten this text, Compress this text, Write a shorter version for the sentence, Rewrite the sentence to be shorter, Rewrite this sentence in a shorter manner, Rewrite this sentence for shorter length, Make the sentence short, Make the sentence shorter, Make this shorter, Shorten, Compress, Shorten this paragraph, Shorten this text
PolitenessIncrease politeness, Make this polite, Make this more polite, Make this sound more polite, Make the sentence polite, Make the sentence more polite, Make the sentence sound more polite, Write more politely, Rewrite more politely, Write this more politely, Rewrite this more politely, Write in a polite manner, Write in a more polite manner, Rewrite in a more polite manner
", + "bbox": [ + 126, + 746, + 870, + 885 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Table 10: List of task-specific verbalizers used for generalizability experiments.", + "bbox": [ + 226, + 896, + 766, + 910 + ], + "page_idx": 15 + }, + { + "type": "page_number", + "text": "5289", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 15 + }, + { + "type": "table", + "img_path": "images/acf8b36612c81deec4f00c90766ca5e5da5ea70f3f2bb8d119b88fa662c3a7f7.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelSizeIteraTeRClarityCoherenceStyle (Paraphrasing)
ITERATER-FLU†ITERATER-CLA†ITERATER-COH†TURK†DiscoFuse-Sport†STS(↓/↑)QQP(↓/↑)
(a)COPY-31.928.630.826.330.539.6 / 10030.1 / 100
T5-LARGE770M15.123.821.734.228.418.0 / 50.518.2 / 62.5
(b)TO*3B27.128.021.234.833.627.7 / 88.710.2 / 63.4
Tk-INSTRUCT*3B22.320.921.232.329.112.3 / 49.519.1 / 79.6
T0++*11B37.930.227.534.135.129.9 / 99.016.6 / 79.1
(c)LLAMA7B32.428.831.427.230.81.4 / 14.41.5 / 35.8
GPT3175B20.921.821.234.627.00 / 8.20 / 13.1
(d)ALPACA7B33.028.931.027.430.80 / 25.80 / 64.4
CHATGPT-36.423.131.437.439.17.9 / 96.98.17 / 96.5
INSTRUCTGPT175B43.728.133.938.945.811.6 / 88.79.3 / 95.5
GPT3-EDIT176B48.331.834.234.748.014.0 / 86.66.4 / 94.5
(e)ALPACA (FS)7B33.028.931.028.432.10 / 39.20 / 63.4
GPT3 (FS)175B33.930.833.938.746.40 / 2.10 / 5.9
CHATGPT (FS)-36.227.035.637.349.40 / 88.70 / 96.8
INSTRUCTGPT (FS)175B44.731.737.539.556.90 / 91.80 / 96.1
(f)ITERATER570M36.730.434.727.240.924.1 / 81.420.6 / 94.3
DELITERATER570M32.028.930.627.831.724.7 / 87.620.4 / 96.6
PEER-3B*3B51.432.132.132.5---
PEER-11B*11B52.132.532.734.1---
(g)CoEdit-L770M46.830.931.538.570.522.4 / 92.815.7 / 97.2
CoEdit-XL3B50.431.331.538.574.620.8 / 94.815.4 / 97.8
CoEdit-XXL11B51.631.831.538.276.221.8 / 93.815.4 / 98.2
", + "bbox": [ + 114, + 82, + 884, + 470 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Table 11: Comparison of CoEDIT against various baselines (on sub-tasks and additional datasets to Table 2), divided into seven groups: (a) a copy baseline and T5-LARGE baseline prefixed only with task-specific tags (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs, (d) Instruction-tuned LLMs, (e) Few-shot evaluations of large pre-trained models (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first scores for each task (excluding STS and QQP style tasks) are SARI scores. For STS and QQP, the first scores are Self-BLEU scores, and the second is semantic similarity. ( $\\uparrow$ ) indicates higher is better, and ( $\\downarrow$ ) indicates lower is better. The best-performing models for each dataset are highlighted in bolded boxes. (FS) denotes few-shot evaluation.", + "bbox": [ + 110, + 480, + 882, + 595 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "with early stopping. All models were fine-tuned on A100 GPUs using Deepspeed (Rasley et al., 2020). Maximum sequence lengths for both the source and the target were set to 256 tokens (via filtering). The best-performing checkpoints were chosen based the validation loss.", + "bbox": [ + 112, + 619, + 489, + 715 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "E Model Performance", + "text_level": 1, + "bbox": [ + 112, + 728, + 324, + 741 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Table 11 compares the performance of CoEDIT with the other models on the remaining test datasets. We observe similar trends as the ones observed in Table 2, where CoEDIT outperforms most models we compare against.", + "bbox": [ + 112, + 753, + 487, + 834 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "F Data Examples", + "text_level": 1, + "bbox": [ + 112, + 845, + 282, + 862 + ], + "page_idx": 16 + }, + { + "type": "page_number", + "text": "5290", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 16 + }, + { + "type": "table", + "img_path": "images/4dbc955386a92ed6a628132b70b7c8a470cd21f4d56ece75c82e085a47106a38.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
InstructionGPT3-EditCoEdit-xl (ours)
Fix all grammatical errors: Every one would expect to leave his owns and secrets dreams like to be a painter, a writer ...Every one would expect to leave his owns and secrets dreams like the painting and the write ...Every one would expect to leave his own and secret dreams like to be a painter, a writer...
Make this simpler: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British racquet sport.Fives is a British sport. It is thought to have come from the same place as many racquet sports.
Fix coherence in this text: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful fighting technique. Spike is yet to fully develop it .Phantom Budo is an incredibly pow-erful ability, but Spike has yet to fully develop it.
Use different wording: Judge Gerald W. Heaney, in dissent, said the authorities should have allowed the prisoner to be medicated without the consequence of execution.Judge Gerald W. Heaney, who dis-agreed with the majority decision, said the prisoner should be medicated after important testimony is received.In his dissent, Gerald W. Heaney said the authorities should have allowed the prisoner to be treated without execu-tion.
", + "bbox": [ + 132, + 84, + 867, + 323 + ], + "page_idx": 17 + }, + { + "type": "table", + "img_path": "images/73168c75636054f8ee5fa665b16faaa71ef27f8dcf423ca6183f5a0d7693bedc.jpg", + "table_caption": [ + "Table 12: A sample of text revisions generated by GPT3-EDIT and CoEDIT-XL (ours)." + ], + "table_footnote": [], + "table_body": "
InstructionGPT3-EDITCOEDIT-XL (chaining)COEDIT-XL-C
Remove all grammatical errors from this text, and make this text less complex: They follow the way the Sun goes from the east to the west.The Sun rises in the east and sets in the west.They move with the sun as it goes from east to west.They follow the sun as it goes from east to west.
Make the sentence grammatical, rewrite the sentence with different wording, and make this text less complex: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British sport that is believed to derive from the same origins as many racquet sports.It is thought to have come from the same sources as other racquet sports.Fives is a British sport that is believed to have originated from racquet sports.
Make the text coherent, and rewrite this text: Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous wasn't too worried about the fact that he couldn't finish his cheese sandwich, but soon realized that this was an endless sandwich and an endless amount of condiments.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich, but soon realizes he is dealing with an endless sandwich and an endless supply of condiments.
Make the text more coherent, simplification, and rewrite this sentence: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful ability. It is an awesome fighting technique that Spike has yet to fully develop.This fighting technique of Spike is still in development.Spike has yet to fully develop his Phantom Budo ability.
Rewrite the sentence to be simpler, and paraphrase this text: The jury asked for transcripts of Quattrone's testimony about his role in the initial public offering allocation process.The jury asked for transcripts of Frank Quattrone's testimony about his role in the initial public offering allocation process.The jury requested a copy of Quattrone's testimony.Transcriptions of Quattrone's testimony were requested by the jury.
Rewrite more formally, and make this easier to understand: Brian, he asked the coolest questions, they suspended him though, i dont know what's up with that!Brian, he asked the coolest questions, they suspended him though, I don't know what's up with that! He was a cool guy, and I liked his questions.I do not understand why Brian was suspended. He had some great questions.I do not know why they suspended Brian.
", + "bbox": [ + 117, + 360, + 878, + 883 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Table 13: A sample of text revisions generated by GPT3-EDIT, COEDIT-XL (chaining) and COEDIT-XL-C for composite instructions.", + "bbox": [ + 112, + 892, + 882, + 922 + ], + "page_idx": 17 + }, + { + "type": "page_number", + "text": "5291", + "bbox": [ + 480, + 928, + 517, + 940 + ], + "page_idx": 17 + } +] \ No newline at end of file diff --git a/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_model.json b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1868e1699563075d21f270a8063f3bd00b486cfb --- /dev/null +++ b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_model.json @@ -0,0 +1,3063 @@ +[ + [ + { + "type": "title", + "bbox": [ + 0.192, + 0.09, + 0.809, + 0.113 + ], + "angle": 0, + "content": "CoEdit: Text Editing by Task-Specific Instruction Tuning" + }, + { + "type": "text", + "bbox": [ + 0.192, + 0.139, + 0.808, + 0.16 + ], + "angle": 0, + "content": "Vipul Raheja\\* Dhruv Kumar\\* Ryan Koo\\* Dongyeop Kang" + }, + { + "type": "text", + "bbox": [ + 0.363, + 0.16, + 0.704, + 0.179 + ], + "angle": 0, + "content": "\\(\\spadesuit\\)Grammarly \\(\\diamond\\)University of Minnesota" + }, + { + "type": "text", + "bbox": [ + 0.214, + 0.18, + 0.79, + 0.199 + ], + "angle": 0, + "content": "\\*first.last@grammarly.com \\(\\diamondsuit\\) {koo0017, dongyeop}@umn.edu" + }, + { + "type": "title", + "bbox": [ + 0.261, + 0.253, + 0.341, + 0.267 + ], + "angle": 0, + "content": "Abstract" + }, + { + "type": "text", + "bbox": [ + 0.142, + 0.277, + 0.461, + 0.578 + ], + "angle": 0, + "content": "We introduce CoEDIT, a state-of-the-art text editing system for writing assistance. CoEdit takes instructions from the user specifying the attributes of the desired text, such as \"Make the sentence simpler\" or \"Write it in a more neutral style,\" and outputs the edited text. We present a large language model fine-tuned on a diverse collection of task-specific instructions for text editing (a total of 82K instructions). Our model (1) achieves state-of-the-art performance on various text editing benchmarks, (2) is competitive with publicly available largest-sized LLMs trained on instructions while being \\(\\sim 60\\mathrm{x}\\) smaller, (3) is capable of generalizing to unseen edit instructions, and (4) exhibits abilities to generalize to composite instructions containing different combinations of edit actions. Through extensive qualitative and quantitative analysis, we show that writers prefer the edits suggested by CoEDIT, relative to other state-of-the-art text editing models1." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.587, + 0.26, + 0.601 + ], + "angle": 0, + "content": "1 Introduction" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.612, + 0.49, + 0.884 + ], + "angle": 0, + "content": "Large language models (LLMs) have made remarkable progress toward generating coherent text in a wide variety of tasks and domains to support writing assistance (Du et al., 2022a; Mallinson et al., 2022; Schick et al., 2023), such as grammatical error correction (Wu et al., 2023), text simplification (Stajner et al., 2022), paraphrasing (Chowdhury et al., 2022), and style transfer (Reif et al., 2022). One of the emergent abilities of LLMs is the capability to generalize to unseen tasks by following new or composed instructions. Instruction-tuning, where LLMs are fine-tuned on a collection of tasks phrased as instructions, makes the models more adept at interpreting and following instructions, reducing the need for few-shot exemplars (Sanh et al., 2022; Ouyang et al., 2022b; Wei et al., 2022; Chung et al., 2022b)." + }, + { + "type": "image", + "bbox": [ + 0.548, + 0.25, + 0.825, + 0.435 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.509, + 0.441, + 0.885, + 0.498 + ], + "angle": 0, + "content": "Figure 1: Model comparison according to training parameters vs. average performance across all text editing benchmarks reported in Tables 2 and 11. Publicly available models are denoted with \\((^{*})\\)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.517, + 0.884, + 0.629 + ], + "angle": 0, + "content": "Text editing is a complex task because human writers cannot simultaneously grasp multiple demands and constraints of the task and tend to iterate and revise their work multiple times (Flower, 1980; Collins and Gentner, 1980; Vaughan and McDonald, 1986). This poses a significant challenge for intelligent writing assistants." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.63, + 0.884, + 0.822 + ], + "angle": 0, + "content": "In this work, we aim to improve the capabilities of instruction-tuned models for text editing by leveraging instruction-tuning from diverse tasks of text editing benchmarks. While multiple previous works have attempted to develop general-purpose text editing models using LLMs, they are either not trained with instruction-tuning (Du et al., 2022c; Kim et al., 2022), trained on much smaller models or not trained on task-specific datasets (Mallinson et al., 2022; Schick et al., 2023), or are not publicly available (Schick et al., 2023), which limits their effectiveness, performance, or usability." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.823, + 0.885, + 0.919 + ], + "angle": 0, + "content": "We introduce CoEDIT, a text editing system designed to provide writing assistance with a natural language interface. A user can employ CoEDIT by providing natural language instructions such as \"Paraphrase the sentence\" or \"Fix the grammar\". Our experiments demonstrate that fine-tuning in" + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.892, + 0.489, + 0.919 + ], + "angle": 0, + "content": "\\(^{1}\\)Code, data, and models available at https://github.com/vipulraheja/coedit" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5274" + }, + { + "type": "footer", + "bbox": [ + 0.218, + 0.946, + 0.779, + 0.973 + ], + "angle": 0, + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5274-5291 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.133, + 0.082, + 0.46, + 0.196 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.114, + 0.201, + 0.489, + 0.23 + ], + "angle": 0, + "content": "Figure 2: General-purpose (left) vs Task-specific (right) Instruction Tuning." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.239, + 0.489, + 0.364 + ], + "angle": 0, + "content": "strictions for specific tasks is more effective than multi-task learning and general-purpose instruction tuning. We conjecture that task-specific instructions increase the density of the instruction space, reinforcing the complementary effects of multiple tasks and facilitating their generalization to composite and new text editing tasks, as shown in Fig. 2." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.367, + 0.489, + 0.478 + ], + "angle": 0, + "content": "To build CoEdit, we fine-tune a pre-trained sequence-to-sequence model on a parallel corpus of instruction-based 82K input-output pairs. The inputs and outputs are sourced from publicly available corpora for different text editing tasks, and the instructions are constructed based on rules that introduce lexical and semantic variations." + }, + { + "type": "text", + "bbox": [ + 0.131, + 0.481, + 0.42, + 0.494 + ], + "angle": 0, + "content": "Our main contributions are as follows:" + }, + { + "type": "text", + "bbox": [ + 0.123, + 0.497, + 0.489, + 0.592 + ], + "angle": 0, + "content": "- We achieve state-of-the-art performance on multiple text editing tasks: grammatical error correction, text simplification, sentence fusion, iterative text editing, and three stylistic editing tasks (formality style transfer, neutralization, and paraphrasing)." + }, + { + "type": "text", + "bbox": [ + 0.124, + 0.593, + 0.489, + 0.671 + ], + "angle": 0, + "content": "- We find that even our smallest instruction-tuned model outperforms other supervised text editing models, instruction-tuned models, and general-purpose LLMs with nearly \\(60\\mathrm{x}\\) greater parameters, on both manual and automatic evaluations." + }, + { + "type": "text", + "bbox": [ + 0.124, + 0.673, + 0.488, + 0.72 + ], + "angle": 0, + "content": "- CoEdit generalizes well to new, adjacent tasks not seen while fine-tuning, as well as composite instructions with multiple task specifications." + }, + { + "type": "text", + "bbox": [ + 0.124, + 0.722, + 0.488, + 0.737 + ], + "angle": 0, + "content": "- Our data and models will be publicly available." + }, + { + "type": "list", + "bbox": [ + 0.123, + 0.497, + 0.489, + 0.737 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.749, + 0.271, + 0.765 + ], + "angle": 0, + "content": "2 Related Work" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.775, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Large Language Models for Text Editing In general, our work is related to many prior works that leverage LLMs; for instance, finetuning T5 (Raffel et al., 2020a) on pairs of original and edited text (Faltings et al., 2021; Reid and Neubig, 2022; Mallinson et al., 2022; Du et al., 2022a,b; Kim et al., 2022). However, these aforementioned works are either not based on instruction tuning, use different modeling techniques such as tag-based se" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.883, + 0.214 + ], + "angle": 0, + "content": "quence labeling, or are not general enough to work on multiple text editing tasks. Moreover, several LLMs are trained to solve specific tasks only, such as grammar errors (Mallinson et al., 2022; Fang et al., 2023), text simplification (Stajner et al., 2022), paraphrase generation (Chowdhury et al., 2022), or style transfer (Reif et al., 2022), which limits their generalizability." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.223, + 0.885, + 0.512 + ], + "angle": 0, + "content": "Instruction Tuning for Writing Assistance Explicitly teaching models how to follow natural language instructions is closely related to recent work for fine-tuning models using large datasets of human-written instructions (Wei et al., 2022; Mishra et al., 2022; Sanh et al., 2022; Ouyang et al., 2022a; Wang et al., 2022; Iyer et al., 2022; Bach et al., 2022; Longpre et al., 2023). Recently, advanced data augmentation and instruction tuning, starting with the Flan models (Chung et al., 2022b), have shown that strong results stem both from the larger and more diverse set of tasks. Additionally, enriching task diversity and balancing task sources (Sanh et al., 2022) are shown to be critical to performance, suggesting instruction-tuned models offer a more computationally-efficient starting checkpoint for downstream applications, corroborating Liu et al. (2022) and Aribandi et al. (2022)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.513, + 0.884, + 0.738 + ], + "angle": 0, + "content": "On instruction tuning for writing assistance, our work is closely related to PEER (Schick et al., 2023), who fine-tuned T5-based LLMs by following user-provided text-editing plans to perform the said edits. There are a few significant differences in our approach compared to PEER. While PEER attempts to either create or leverage a user-provided plan, realize the edits conditioned on the plan, and try to explain the plan, we focus only on the plan and edit parts of the pipeline. Even when it comes to handling editing plans in the form of natural language instructions, our work focuses on edits that do not add new information. Therefore, we compare our models only against PEER-Edit models." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.739, + 0.884, + 0.802 + ], + "angle": 0, + "content": "Finally, no prior works, to the best of our knowledge, have investigated the ability of instruction-tuned LLMs for text editing to generalize to composite instructions." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.812, + 0.625, + 0.826 + ], + "angle": 0, + "content": "3 CoEdit" + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.835, + 0.689, + 0.85 + ], + "angle": 0, + "content": "3.1 Training Dataset" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.855, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Our dataset creation is based on the ITERER+ dataset proposed by Kim et al. (2022) who combined datasets from various text editing tasks (See Table 1). Their work, in turn, is based on Du et al." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5275" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.118, + 0.082, + 0.88, + 0.276 + ], + "angle": 0, + "content": "
Edit IntentionDatasetsSizeExample InputExample Output
FLUENCYNUCLE-14, Lang-8, BEA-1920kFix the grammar: When I grow up, I start to understand what he said is quite right.When I grew up, I started to understand what he said was quite right.
COHERENCEDiscoFuse11kMake this text coherent: Their flight is weak. They run quickly through the tree canopy.Their flight is weak, but they run quickly through the tree canopy.
CLARITY (Simplification)NEWSELA,WikiAuto, WikiLarge, ParabankV2, ITERER-CLARITY13kRewrite to make this easier to understand: A storm surge is what forecasters consider a hurricane's most treacherous aspect.A storm surge is considered a hurricane's most dangerous aspect.
STYLE (Paraphrase)ParabankV215kParaphrase this: Do you know where I was born?Do you know my birthplace?
STYLE (Formalize)GYAFC12kWrite this more formally: OMG i love that song im listening to it right nowI love that song and I am listening to it at this moment.
STYLE (Neutralize)WNC11kWrite in a more neutral way: The authors' exposé on nutrition studies.The authors' statements on nutrition stud-ies.
" + }, + { + "type": "table_caption", + "bbox": [ + 0.17, + 0.285, + 0.82, + 0.3 + ], + "angle": 0, + "content": "Table 1: Example data instances in the COEDIT dataset. Instructions in the inputs are italicized." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.319, + 0.489, + 0.462 + ], + "angle": 0, + "content": "(2022b), who categorized each edit into MEANING-CHANGED or NON-MEANING-CHANGED. Edits that belong to the latter group are further assigned to FLUENCY, COHERENCE, CLARITY, or STYLE. The aforementioned taxonomy of edit intents from ITERER reflects writers' general intention behind their revision, providing more in-depth information than just superficial edit operations, such as ADD and DELETE." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.466, + 0.489, + 0.691 + ], + "angle": 0, + "content": "Similar to Kim et al. (2022), our work focuses on non-MEANING-CHANGED edits. We consider those edits to be ones that do not add new information or perform fact updates. Since the STYLE edits are quite subjective in nature, we allow for the possibility of meaning change so as to fulfill the needs of making stylistic edits, but we constrain the editing tasks to ensure the edited texts are semantically similar to the sources, but not to the extent of adding new information or fact updates. With this in mind, we expand the STYLE edit intention category from ITERATER+ to include three new sub-intentions: Paraphrasing, Formality Style Transfer (or Formalization), and Neutralization." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.695, + 0.49, + 0.919 + ], + "angle": 0, + "content": "The aforementioned ITERER dataset taxonomy lends itself conveniently to be articulated as natural language instructions and allows us to naturally formulate them into instructional prompts (See Table 1). We rewrite each edit intention as a set of natural language instruction prompts to create the COEDIT dataset. To allow models to adapt to linguistic variations of the instructions, we also include paraphrases of the instruction templates, e.g., instead of \"Write\" we also use \"Generate\" or \"Rewrite,\" or instead of \"Paraphrase the text\" we use \"Rewrite the text with different wording,\" and so on. For each task, we develop a variety of such diverse instructional prompts and ran" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.319, + 0.885, + 0.511 + ], + "angle": 0, + "content": "domly sample an instruction from the aforementioned group of task-specific instruction candidates to be pre-pended to the source in order to form an data pair. We provide the full list of our instructional prompts in §C. In total, our training dataset consists of around 82K pairs. We keep the original train-validation-test splits consistent as the original datasets but diversify the train and validation splits with the paraphrasing augmentations. The details of datasets and instructions used to train our models are described in §A." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.527, + 0.715, + 0.543 + ], + "angle": 0, + "content": "3.2 Text Editing Models" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.551, + 0.884, + 0.679 + ], + "angle": 0, + "content": "We fine-tune different versions of pre-trained FLANT5 (Chung et al., 2022a) models on the COEDIT dataset. Specifically, we use FLANT5-L (770M parameters), FLANT5-XL (3B parameters), FLANT5-XXL (11B parameters) models, which are henceforth referred to as COEDIT-L, COEDIT-XL, and COEDIT-XXL respectively. The training details are summarized in \\(\\S D\\)." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.696, + 0.719, + 0.713 + ], + "angle": 0, + "content": "4 Experimental Setup" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.725, + 0.883, + 0.87 + ], + "angle": 0, + "content": "We conduct experiments to determine if a standard instruction-tuned language model fine-tuned using task-specific data can improve text editing performance and if it can further generalize into a general-purpose text editing model capable of following human-written instructions and handling a wider array of editing tasks, such as unseen and composite instructions. Specifically, we aim to answer the following research questions:" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.872, + 0.884, + 0.919 + ], + "angle": 0, + "content": "- RQ1: Can COEdit follow text editing instructions and perform high-quality edits across a wide variety of tasks?" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5276" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.123, + 0.085, + 0.486, + 0.131 + ], + "angle": 0, + "content": "- RQ2: Is CoEdit generalizable to perform high-quality edits for new types of text editing instructions?" + }, + { + "type": "text", + "bbox": [ + 0.123, + 0.133, + 0.487, + 0.164 + ], + "angle": 0, + "content": "- RQ3: Does CoEdit make the writing process more efficient and effective for human writers?" + }, + { + "type": "list", + "bbox": [ + 0.123, + 0.085, + 0.487, + 0.164 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.166, + 0.489, + 0.31 + ], + "angle": 0, + "content": "We answer these questions via quantitative analyses of model outputs (Section 5) and via qualitative analyses and human evaluations of model outputs (Section 6). Further, we investigate RQ2 along two dimensions: (1) generalization to composite instructions containing combinations of multiple different kinds of edits and (2) out-of-domain generalization to instructions with new task requirements on previously unseen data." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.32, + 0.219, + 0.334 + ], + "angle": 0, + "content": "4.1 Models" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.341, + 0.487, + 0.422 + ], + "angle": 0, + "content": "No-Edits Baseline We first evaluate a no-edits baseline, where the output is simply a copy of the source input without the instruction. This strategy performs reasonably well on tasks where the target output largely overlaps with the input (e.g., GEC)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.43, + 0.49, + 0.59 + ], + "angle": 0, + "content": "Supervised Text Editing Models We also evaluate existing LLMs for text editing that are not finetuned with instruction-specific data. Specifically, to understand the effect of task-specific fine-tuning, we evaluate against \\(\\mathrm{T5}^2\\) (Raffel et al., 2020b) models as primary alternatives of our FLAN-T5 models. We also compare our models against ITERER (Du et al., 2022b) and DELITERATER (Kim et al., 2022), which have shown strong performance on a variety of text editing tasks.\\(^3\\)" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.599, + 0.487, + 0.631 + ], + "angle": 0, + "content": "Instruction-tuned LLMs A major group of our comparisons is against instruction-tuned LLMs:" + }, + { + "type": "text", + "bbox": [ + 0.123, + 0.632, + 0.486, + 0.726 + ], + "angle": 0, + "content": "- Our main comparison is against PEER (Schick et al., 2023), which is primarily based on the LM Adapted variant of T5. As the focus of our work is on improving revision quality (Section 2), we compare against PEER-EDIT (both 3B and 11B versions)." + }, + { + "type": "text", + "bbox": [ + 0.124, + 0.728, + 0.488, + 0.823 + ], + "angle": 0, + "content": "- T0, T0++ (Sanh et al., 2022) and Tk-Instruct (Wang et al., 2022), which are all initialized from the LM Adapted variant of T5, and finetuned using PromptSource (Bach et al., 2022), and Super-NaturalInstructions (Wang et al., 2022) datasets, respectively." + }, + { + "type": "list", + "bbox": [ + 0.123, + 0.632, + 0.488, + 0.823 + ], + "angle": 0, + "content": null + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.831, + 0.488, + 0.881 + ], + "angle": 0, + "content": "2The original T5 model cannot continue text well due to its infilling pre-training objective. Hence, similar to Schick et al. (2023), we evaluate its LM Adapted versions (Lester et al., 2021), which are trained with a language modeling objective." + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.881, + 0.487, + 0.919 + ], + "angle": 0, + "content": "3We are unable to make full comparisons against EdiT5 (Mallinson et al., 2022) and PEER (Schick et al., 2023) as the models are not publicly available." + }, + { + "type": "list", + "bbox": [ + 0.113, + 0.831, + 0.488, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.085, + 0.884, + 0.149 + ], + "angle": 0, + "content": "- Alpaca (Taori et al., 2023) is an instruction-tuned version of the LLaMA-7B model (Touvron et al., 2023) trained on 52K instruction-following demonstrations generated by GPT3." + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.15, + 0.884, + 0.213 + ], + "angle": 0, + "content": "- We also compare InstructGPT (Ouyang et al., 2022a), a variant of GPT3 fine-tuned via reinforcement learning on a large dataset of instructions and human-written outputs." + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.214, + 0.883, + 0.276 + ], + "angle": 0, + "content": "- GPT3.5 (henceforth referred to as ChatGPT), is an improved version of InstructGPT optimized for chat. We utilize OpenAI's API for all inference tasks.5" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.277, + 0.882, + 0.342 + ], + "angle": 0, + "content": "- GPT3 also offers a text Editing \\(\\mathbf{A}\\mathbf{P}\\mathbf{I}^6\\) (we refer to as GPT3-Edit), which is usable for editing tasks rather than completion, making it directly comparable to the tasks we train COEDIT on." + }, + { + "type": "list", + "bbox": [ + 0.518, + 0.085, + 0.884, + 0.342 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.352, + 0.882, + 0.415 + ], + "angle": 0, + "content": "Large-Pretrained Decoder-only Models We compare against LLMs with no instruction tuning in two settings – zero-shot and few-shot (details in Section 5.1):" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.417, + 0.882, + 0.464 + ], + "angle": 0, + "content": "- The 175B GPT3 (Brown et al., 2020) model that is not instruction-tuned demonstrates strong general-purpose text revision capabilities." + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.465, + 0.882, + 0.529 + ], + "angle": 0, + "content": "- LLaMA (Touvron et al., 2023) is Meta AI's general-purpose language model trained only on publicly available data. We utilize the 7B model due to computing constraints." + }, + { + "type": "list", + "bbox": [ + 0.518, + 0.417, + 0.882, + 0.529 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.53, + 0.882, + 0.562 + ], + "angle": 0, + "content": "Outputs of all models were generated using greedy decoding unless specified otherwise." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.574, + 0.661, + 0.587 + ], + "angle": 0, + "content": "4.2 Test Datasets" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.594, + 0.884, + 0.867 + ], + "angle": 0, + "content": "To assess the editing capabilities of CoEDIT, we perform evaluations on standard test sets sourced from a variety of text editing task benchmarks, most notably, EDITEVAL (Dwivedi-Yu et al., 2022). Owing to the overlap of our work with PEER, we keep our evaluation datasets and evaluation metrics as close to theirs as possible for consistency: We used JFLEG (Napoles et al., 2017) for grammatical error collection, TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) for text simplification, Coherence split of ITER (Du et al., 2022b) and the DISCOFUSE dataset (Geva et al., 2019) for coherence, and ITER (Du et al., 2022b) for iterative text revision. For Style-related edits, we used GYAFC (Rao and Tetreault, 2018) for formality style, WNC (Pryzant et al., 2020) for neutralization, and MRPC (Dolan and" + }, + { + "type": "page_footnote", + "bbox": [ + 0.53, + 0.877, + 0.71, + 0.889 + ], + "angle": 0, + "content": "4We use text-davinci-003" + }, + { + "type": "page_footnote", + "bbox": [ + 0.533, + 0.89, + 0.687, + 0.904 + ], + "angle": 0, + "content": "5We use gpt-3.5-turbo" + }, + { + "type": "page_footnote", + "bbox": [ + 0.533, + 0.905, + 0.745, + 0.917 + ], + "angle": 0, + "content": "6We use text-davinci-edit-001" + }, + { + "type": "list", + "bbox": [ + 0.53, + 0.877, + 0.745, + 0.917 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5277" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.114, + 0.085, + 0.488, + 0.133 + ], + "angle": 0, + "content": "Brockett, 2005), STS (Cer et al., 2017), and QQP for paraphrasing. Detailed descriptions of each dataset and its evaluation metrics are in \\(\\S \\mathbf{B}\\)" + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.15, + 0.327, + 0.166 + ], + "angle": 0, + "content": "5 Quantitative Results" + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.179, + 0.363, + 0.194 + ], + "angle": 0, + "content": "5.1 Text Editing Performance" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.202, + 0.488, + 0.298 + ], + "angle": 0, + "content": "Table 2 helps us answer RQ1 by comparing the performance of CoEdit to other models across various text editing tasks. We first present results from the more well-known evaluation sets here and present additional results (i.e., sub-tasks and additional datasets) in Table 11." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.3, + 0.487, + 0.444 + ], + "angle": 0, + "content": "We segregate the models into seven groups. The first group (a) consists of the copy baseline and T5-LARGE baseline fine-tuned with prefix-tuning (each data point is prefixed with task-specific tags rather than instructions), while the second group (b) consists of instruction-fine-tuned T5-based models on non-text-editing tasks. We find that CoEdit substantially outperforms these models across all tasks." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.447, + 0.49, + 0.655 + ], + "angle": 0, + "content": "The next two groups (c, d) show different LLMs varying from 7B to 176B parameters in size, evaluated in a zero-shot setting. Those in group (c) are decoder-only models, while those in group (d) are instruction-tuned. We find that CoEdit outperforms all LLMs comparable to its model size (e.g., Alpaca and LLaMA) across all tasks, as well as on most tasks compared to models several times larger, such as ChatGPT and InstructGPT. This indicates that current general-purpose and instruction-tuned models are underfitted, and it is beneficial to densify the task/instruction space rather than to scale model size." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.657, + 0.49, + 0.834 + ], + "angle": 0, + "content": "Although models such as Alpaca and T5-based models (Tk-instruct, T0, \\(\\mathrm{T0 + + }\\) ) have previously shown strong capabilities for zero-shot tasks, they show weaker performance compared to CoEDIT. We also see that the decoder-only models (e.g., GPT3 and LLaMA) often repeat the input for more complex tasks, such as ones under the Style intent group. This can be attributed to difficulty understanding the prompted task, resulting in the models either repeating the input sentence or generating a continuation unrelated to the task." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.326 + ], + "angle": 0, + "content": "Next, in the fifth group (e), we evaluate the LLMs under a few-shot setting. As mentioned in Section 4.1, we conduct these experiments in a 4-shot evaluation setting, where example inputs were constructed by randomly sampling four inputs for each task from the CoEDIT dataset such that all examples chosen would fit in the input window for all models as seen in (Brown et al., 2020). The input sentence and its corresponding revised reference were pre-pended to the instructional prompt. We conduct few-shot evaluations for decoder-only LLMs (GPT3) and three instruction-tuned LLMs (InstructGPT, ChatGPT, and Alpaca). Outputs of all models were generated using greedy decoding unless specified otherwise." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.327, + 0.885, + 0.536 + ], + "angle": 0, + "content": "We observe that giving specific examples improves performance in all models for all tasks except MRPC for GPT3. This may be because GPT3 still exhibits some similar behavior in repeating its generations continuously, resulting in a low BLEU score but low semantic similarity as well. We don't present any experiments for GPT3-Edit under the few-shot setting, as scores tended to stay the same across all tasks – implying that GPT3-Edit may not have as good in-context learning capabilities. Overall, we find that even our smallest 770M parameter model is competitive against LLMs evaluated in a few-shot setting in most tasks." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.537, + 0.885, + 0.81 + ], + "angle": 0, + "content": "In the final group (f), we compare our models against task-specific text editing models such as ITERER, DELITERATER, and PEER. ITERER and DELITERATER perform comparatively worse than the scores reported in the original paper as we present different and more difficult inputs, only pre-pending instructions to the inputs while ITERER and DELITERATER were trained with task-specific tags. Furthermore, they were trained using BART and Pegasus, respectively, both of which have a summarization pre-training objective, and were not trained to follow instructions. On average, COEDIT beats PEER across all reported evaluations except the ITERATER benchmark. This can primarily be attributed to the difference in task-specific fine-tuning since PEER uses Wikipedia as the source of instructional edit data." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.823, + 0.688, + 0.837 + ], + "angle": 0, + "content": "5.2 Ablation Studies" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.845, + 0.884, + 0.876 + ], + "angle": 0, + "content": "Table 3 shows the performance of various baselines, which we discuss in detail in this section." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.888, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Instruction Tuning. To understand the effectiveness of instruction-tuning, we fine-tune the 3B pa" + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.845, + 0.488, + 0.918 + ], + "angle": 0, + "content": "7Since PEER had several scores missing, and due to the high scores of paraphrasing transfer, for fairness, it was left out of the Overall score calculations. For results with multiple metrics, the best-performing method is calculated by taking the average. For the MRPC average, we subtract the Self-BLEU score from 100 since lower is better." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5278" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.115, + 0.082, + 0.885, + 0.41 + ], + "angle": 0, + "content": "
ModelSizeOverallIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
(a)COPY-27.629.826.7 / 40.520.730.817.6 / 10.631.85 / 047.4 / 100
T5-LARGE770M24.721.132.7 / 22.935.828.0130.9 / 4.8913.2 / 027.6 / 62.8
(b)TO*3B29.726.142.2 / 36.133.232.437.9 / 39.319.4 / 028.3 / 84.1
Tk-INSTRUCT*3B27.321.035.2 / 26.836.928.935.7 / 43.0124.2 / 0.120.4 / 48.9
T0++*11B32.631.539.4 / 40.533.135.536.8 / 43.721.2 / 042.9 / 94.9
(c)LLAMA7B28.230.127.7 / 3.3421.831.118.8 / 89.131.9 / 05.29 / 64.2
GPT3175B27.423.338.1 / 2.834.826.236.6 / 87.923.4 / 00 / 51.7
(d)ALPACA7B28.430.428.5 / 6.422.031.118.9 / 94.431.9 / 00 / 77.9
GPT3-EDIT175B41.836.152.4 / 50.632.954.035.7 / 52.350.7 / 17.122.6 / 98.7
INSTRUCTGPT175B41.632.662.4 / 57.244.647.447.8 / 98.233.7 / 0.116.03 / 98.9
CHATGPT-36.928.257.6 / 49.445.940.240.7 / 99.628.5 / 0.113.4 / 99.0
(e)ALPACA (FS)7B30.030.833.03 / 11.323.233.120.6 / 95.432.04 / 00.1 / 66.7
GPT3 (FS)175B38.432.450.1 / 4.139.245.143.1 / 97.236.7 / 00 / 14.5
INSTRUCTGPT (FS)175B45.136.264.5 / 55.746.355.247.3 / 98.842.8 / 015.9 / 99.5
CHATGPT (FS)-40.130.858 / 50.645.451.242.3 / 99.634.1 / 013.3 / 96.1
(f)ITERATER570M31.032.835.9 / 34.321.830.122.7 / 54.134.2 / 040.5 / 97.8
DELITERATER570M28.029.927.5 / 31.221.232.218.1 / 57.831.9 / 039.1 / 100
PEER-3B*3B41.737.155.5 / 54.330.5--53.3 / 21.6-
PEER-11B*11B42.137.855.8 / 54.329.5--54.5 / 22.8-
(g)CoEdit-L770M49.835.262.4 / 59.342.475.354.6 / 98.069.3 / 46.423.3 / 99.1
CoEdit-XL3B51.436.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
CoEdit-XXL11B51.537.165.0 / 61.541.778.655.1 / 97.271.0 / 51.421.8 / 99.0
" + }, + { + "type": "table_caption", + "bbox": [ + 0.112, + 0.419, + 0.884, + 0.533 + ], + "angle": 0, + "content": "Table 2: Comparison of CoEDIT against various baselines: (a) copy baseline and T5-LARGE baseline with task-specific prefixes (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs (zero-shot), (d) Instruction-tuned LLMs (zero-shot), (e) Few-shot evaluations of pre-trained LLMs, (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first score for each task (excluding MRPC style task) is SARI. The second scores for Fluency, GYAFC, and WNC are GLEU, Formality Transfer accuracy (%), and EM. For MRPC, the first score is Self-BLEU, while the second score is semantic similarity. The best-performing models7 for each dataset are highlighted in boxes. Results with (*) are ones reported in prior works. (FS) denotes few-shot evaluation. Results on other datasets are in Table 11." + }, + { + "type": "table", + "bbox": [ + 0.115, + 0.546, + 0.884, + 0.645 + ], + "angle": 0, + "content": "
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER↑JFLEG↑ASSET↑DiscoFuse-Wiki↑GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
CoEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
(a) T5-XL (prefix)3B34.361.8 / 58.641.071.450.7 / 94.662.7 / 3330.6 / 87.4
(b) FLANT5-XL3B30.228.3 / 41.325.537.925.0 / 27.833.5 / 0.046.6 / 92.5
(c) CoEDIT-XL-R3B33.963.8 / 60.236.269.752.6 / 48.769.2 / 25.435.4 / 92.6
" + }, + { + "type": "table_caption", + "bbox": [ + 0.112, + 0.653, + 0.883, + 0.683 + ], + "angle": 0, + "content": "Table 3: Ablation results for CoEdit to evaluate the impact of (a) instruction tuning (b) task-specific training, and (c) quality of instructions. The scores from left to right follow exactly as Table 2." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.708, + 0.49, + 0.886 + ], + "angle": 0, + "content": "rameter T5 model (T5-XL) and compare it with CoEDIT-XL, its FLANT5 counterpart on the same training and validation sets. The only change is that the instructional prompts for the training datasets are replaced by task-specific prefixes. Specifically, the \\(82k\\) pairs in the training dataset used to train the CoEDIT models were modified to . We observe (Table 3(a)) that the instruction-tuned CoEDIT models consistently outperform prefix-tuned T5 models, showing the ef" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.708, + 0.884, + 0.724 + ], + "angle": 0, + "content": "fectiveness of instruction-tuning over prefix-tuning." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.742, + 0.885, + 0.92 + ], + "angle": 0, + "content": "Task-Specific Training. A core contribution of this work is to push the performance of small- (<1B parameters) to medium-sized (1-10B parameters) LLMs for common text editing tasks. This drives the need for fine-tuning on task-specific datasets. The impact of this task-specific data augmentation for text editing tasks has already been shown in Kim et al. (2022). For this work, we compare our task-specific fine-tuned models against their FLANT5 un-tuned counterparts referred to as FLANT5-XL (Table 3(b)). We see a substantial gap" + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.892, + 0.489, + 0.919 + ], + "angle": 0, + "content": "\\( {}^{8} \\) task was one of gec, simplify, clarify, coherence, formalize, neutralize and paraphrase" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5279" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.157, + 0.083, + 0.447, + 0.123 + ], + "angle": 0, + "content": "
COEDIT-xLGPT3-EditTieNeither
64%10%4%22%
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.133, + 0.49, + 0.204 + ], + "angle": 0, + "content": "Table 4: Human evaluation results: Pair-wise comparison of CoEDIT-XL against the best-performing 175B-parameter instruction-tuned LLM for text editing (GPT3-EDIT). Scores indicate the % of test inputs for which the human annotators preferred the said model." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.23, + 0.489, + 0.262 + ], + "angle": 0, + "content": "between the two for all datasets and model sizes, thus, confirming prior findings." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.276, + 0.49, + 0.743 + ], + "angle": 0, + "content": "Quality of Instructions. While we developed with a limited set of task-specific instructional prompts, there has been widespread work on the prompt sensitivity of LLMs, especially with growing model capacity (Lu et al., 2022). To assess the robustness of CoEDIT models on instructional prompts, we train another baseline CoEDIT-xL model with randomized task-specific instructions (henceforth referred to as CoEDIT-xL-R). Specifically, the entire training dataset was randomized, where an instruction from one task was replaced randomly by an instruction from another task. Table 3(c) shows the results for this experiment. We observe that while CoEDIT-xL-R achieves scores that are higher than the non-task-specific tuned FLANT5-xL (especially on edit-based metrics such as SARI), it significantly falls behind CoEDIT-xL on those, as well as on the style accuracy metrics such as formality transfer accuracy and paraphrasing semantic similarity. This indicates that while the instructional structure of the inputs and task-specific training makes the model learn how to make edits (which drives up the SARI scores), however, the accuracy of those edits suffers since they are trained with the wrong instructions most of the time. Overall, the improvements highlight the positive impact of task-specific training, and the gaps in performance highlight the negative impact of lack of proper instruction tuning." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.761, + 0.314, + 0.777 + ], + "angle": 0, + "content": "6 Qualitative Results" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.791, + 0.49, + 0.919 + ], + "angle": 0, + "content": "We now address RQ2 and RQ3 (Section 4). We show that CoEDIT shows generalization abilities to adjacent tasks not seen during fine-tuning and can generalize to composite instructions containing a combination of tasks. Further, our human evaluation studies show that expert human evaluators find the text generated by CoEDIT to be of higher quality than a much larger instruction-tuned LLM." + }, + { + "type": "table", + "bbox": [ + 0.511, + 0.083, + 0.885, + 0.19 + ], + "angle": 0, + "content": "
ModelSentence CompressionPoliteness Transfer
SARI†/ CR(%)†S-BLEU‡/ TA(%)†
GPT3-EDIT23.98 / 6.0963.31 / 63.11
T5-xL (prefix)31.47 / 7.6681.43 / 58.82
FLANT5-XL33.21 / 15.2991.91 / 52.69
CoEdit-XL35.17 / 22.7860.32 / 64.45
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.2, + 0.886, + 0.258 + ], + "angle": 0, + "content": "Table 5: Comparison of CoEDIT-xL against the best-performing non-instruction-tuned model (T5-xL), nontask-specific-tuned model (FLANT5-xL) and GPT3-EDIT on out-of-domain generalization." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.282, + 0.719, + 0.298 + ], + "angle": 0, + "content": "6.1 Text Editing Quality" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.304, + 0.885, + 0.61 + ], + "angle": 0, + "content": "Since text editing is often subjective, and automatic metrics are not always accurate in measuring if an instruction is satisfied, we conduct human evaluations for our model outputs by linguistic experts on 50 test inputs to ensure they meet the instructional constraints. Given the automatic evaluation results in Section 5, we compare our 3B-parameter CoEDIT-XL model against the largest comparable 175B instruction-tuned LLM for text editing GPT3-EDIT. Specifically, we conducted a pairwise comparison: each annotator was shown an instructional input and outputs from both models (they were not aware which output was generated by which model). They were then asked to evaluate the fluency, accuracy, and meaning preservation of the edited texts and choose the higher-quality output (\"neither\" and \"tie\" are also valid options). We collect three annotations for each question and use the majority vote as the final judgment." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.612, + 0.886, + 0.741 + ], + "angle": 0, + "content": "Table 4 shows the results of the evaluation. The annotators prefer our CoEdit model for \\(64\\%\\) of the inputs, whereas, for \\(10\\%\\) of the inputs, GPT3-EDIT's output is preferred. In \\(4\\%\\) cases, both models produce equally good outputs, whereas, for \\(22\\%\\) of the inputs, both models generate unacceptable outputs. Table 12 provides a side-by-side comparison of the outputs generated by the two models." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.752, + 0.829, + 0.768 + ], + "angle": 0, + "content": "6.2 Generalizability to Adjacent Tasks" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.775, + 0.885, + 0.919 + ], + "angle": 0, + "content": "We analyze the generalization capabilities of our models by evaluating them on a few related tasks that do not exist in the fine-tuning data. Specifically, we chose two standard NLP tasks – sentence compression (SC) (Filippova and Altun, 2013) and politeness transfer (PT) (Madaan and Yang, 2021). It is noteworthy that while our models were not fine-tuned on these exact tasks, we chose them so that the models could still comprehend them based" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.522, + 0.941 + ], + "angle": 0, + "content": "5280" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.116, + 0.082, + 0.886, + 0.16 + ], + "angle": 0, + "content": "
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
COEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
COEDIT-XL-C3B36.565.1 / 61.342.074.855.9 / 97.269.7 / 48.520.7 / 98.8
" + }, + { + "type": "table_caption", + "bbox": [ + 0.13, + 0.168, + 0.866, + 0.182 + ], + "angle": 0, + "content": "Table 6: Results for composite prompt training on single-task performance. Scores follow exactly as Table 2." + }, + { + "type": "table", + "bbox": [ + 0.138, + 0.201, + 0.465, + 0.277 + ], + "angle": 0, + "content": "
CoEDIT-xL-CGPT3-EditTieNeither
38%34%3%25%
CoEDIT-xL-CCoEDIT-xLTieNeither
34%21%14%31%
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.286, + 0.49, + 0.344 + ], + "angle": 0, + "content": "Table 7: Human evaluation results: Pair-wise comparison of CoEDIT-XL-C against GPT3-EDIT and equivalent CoEDIT-XL (with chaining pipeline). Human annotators preferred the said model for % of test inputs." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.367, + 0.489, + 0.431 + ], + "angle": 0, + "content": "on other tasks they were fine-tuned on. We define them as being adjacent tasks, which still exist within the scope of existing tasks but have not been seen during fine-tuning (blue lines in Fig. 2)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.432, + 0.489, + 0.591 + ], + "angle": 0, + "content": "Similar to the previous experiment, in addition to GPT3-EDIT, we compare COEDIT-XL against the similarly-sized prefix-tuned (T5-XL) model and the non-task-specific trained FLANT5-XL model (same models as the ones used in Table 3 (a) and (b)). For evaluation, we curated a set of new instructional prompts geared towards both the new tasks (details in Appendix C). We evaluated the models on the respective test datasets from Filippova and Altun (2013) and Madaan and Yang (2021)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.593, + 0.49, + 0.801 + ], + "angle": 0, + "content": "Table 5 shows the results of CoEDIT-XL against various models on the sentence compression and politeness transfer tasks. For SC, we report the SARI metric for rewrite quality and compression ratio (CR) for task-specific quality. For PT, we report Self-BLEU (Zhu et al., 2018) for the rewrite quality and Transfer Accuracy (TA) for the task-specific quality. We observe that CoEDIT consistently outperforms other models on both tasks, which indicates its generalization abilities on these new and unseen adjacent tasks. It is noteworthy that GPT3-EDIT performs quite well out-of-the-box on PT, but not so much on the SC task." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.814, + 0.396, + 0.843 + ], + "angle": 0, + "content": "6.3 Generalizability to Composite Instructions" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.851, + 0.489, + 0.883 + ], + "angle": 0, + "content": "Finally, we also explore the capability of our model to understand composite natural language instruc" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.205, + 0.885, + 0.3 + ], + "angle": 0, + "content": "tions. Composite instructions are made up of a combination of tasks. For example, for the composite instruction, \"Make the text simpler, paraphrase it, and make it formal\", the model needs to simultaneously perform simplification, paraphrasing and formalization of the input sentence." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.308, + 0.885, + 0.581 + ], + "angle": 0, + "content": "Since there is no publicly available dataset for composite instructions, we create the CoEDIT-COMPOSITE dataset by expanding the CoEDIT dataset to a total of 90k pairs. In addition to the single-task instructions, we use seven new combinations of instructions as part of our training set, with each composite instruction having either two or three tasks. Specifically, these are GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification, Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification, and Paraphrasing-Simplification (more details in §A). We then fine-tune the FLANT5-xL model on CoEDIT-COMPOSITE (referred as CoEDIT-XL-C). The training details are summarized in §D." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.59, + 0.884, + 0.718 + ], + "angle": 0, + "content": "We evaluate CoEDIT-XL-C on both single and composite instructions. For the single instructions, we use the same evaluation setup as in Table 2 and find that the overall performance of CoEDIT-XL-C is on par with that of CoEDIT-XL (Table 6). This shows that training the model additionally on composite prompts has no negative impact on single-task performance." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.727, + 0.885, + 0.919 + ], + "angle": 0, + "content": "For composite instructions, we conduct human evaluations since there is no standard test dataset available. We use three new task combinations in addition to the seven seen during training to evaluate the model's generalizability. These are Coherence-Paraphrase, Coherence-Simplify, and Coherence-Simplify-Paraphrase. Specifically, we conduct two sets of pairwise annotations (similar setup as the one in Section 6.1) comparing CoEDIT-xL-C with GPT3-Edit and CoEDIT-XL (shown in Table 7) on 30 composite instructions. For a fair comparison against CoEDIT-xL, we pre" + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.892, + 0.488, + 0.919 + ], + "angle": 0, + "content": "9We report Self-BLEU based on the original PT paper since there are no references provided in the dataset." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.519, + 0.941 + ], + "angle": 0, + "content": "5281" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.084, + 0.493, + 0.312 + ], + "angle": 0, + "content": "pare a chaining pipeline\\(^{10}\\) by decomposing composite instructions into a sequence of multiple single instructions and executing them one-by-one. In \\(38\\%\\) of cases, experts show a preference for CoEDIT-XL-C, compared to \\(34\\%\\) for GPT3-EDIT. In \\(3\\%\\) cases, both models are preferred equally, whereas, for \\(25\\%\\) of the cases, none of them are preferred. The experts prefer CoEDIT-XL-C for \\(34\\%\\) of the cases versus \\(21\\%\\) for the chaining baseline. Both outputs are preferred equally in \\(14\\%\\) cases, whereas, for \\(31\\%\\) of the cases, both models generate unacceptable predictions. Table 13 provides a side-by-side comparison of outputs generated by these models." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.325, + 0.255, + 0.34 + ], + "angle": 0, + "content": "7 Conclusions" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.352, + 0.49, + 0.611 + ], + "angle": 0, + "content": "We present CoEdit – an open-sourced dataset and set of instruction-tuned large language models that can act as a writing assistant by following natural language instructions to perform various textual edits by removing, updating, or adding words, phrases, and sentences. CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, spanning syntactic, semantic, and stylistic edit requirements. Through extensive experiments, we have shown that CoEdit is capable of further generalizing to unseen, adjacent, and composite instructions to perform edits along multiple dimensions in a single turn. In our human evaluations, we observe that CoEdit can assist writers with various aspects of the text revision process at scale by following natural language instructions." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.624, + 0.22, + 0.639 + ], + "angle": 0, + "content": "Limitations" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.651, + 0.49, + 0.862 + ], + "angle": 0, + "content": "Although CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, we acknowledge some limitations to our approach and evaluation methods. Our task-specific fine-tuning (like most other works) mainly focuses on sentence-level editing tasks, and its effectiveness on much longer sequences of texts that are more appropriate to real-world editing settings remains to be seen. Additionally, our system mainly focuses on nonmeaning-changing text edits, thus, which could potentially limit the utility of our model to more real-world scenarios where fact-based editing or corrections are needed. Another limitation of our" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.887, + 0.312 + ], + "angle": 0, + "content": "work involves prompt sensitivity. While we construct our inputs by randomly choosing from a pool of verbalizers for every task, we acknowledge that different prompts may induce better or worse edits, and as we evaluate each input with a random verbalizer, a fully controlled comparison for each available prompt across all models is not done. Furthermore, the prompting format was kept uniform across all evaluated models, whereas some models may perform better with a different prompting format. We plan to address this in future work. Finally, computing resource requirements could pose some difficulty in replicating the results (which we try to address by sharing our models publicly)." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.322, + 0.662, + 0.337 + ], + "angle": 0, + "content": "Ethics Statement" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.348, + 0.886, + 0.492 + ], + "angle": 0, + "content": "Since our work mainly focuses on non-meaning-changing text edits, we are able to avoid many issues involving generating harmful text. Although, there is still a possibility of small meaning changes for stylistic tasks, we try to reduce the chance of hallucinations by constraining the generation to strictly edit tasks in order to reduce the chance of adding any new information, or perpetuating biases." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.504, + 0.682, + 0.52 + ], + "angle": 0, + "content": "Acknowledgements" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.529, + 0.886, + 0.627 + ], + "angle": 0, + "content": "We sincerely thank Alice Kaiser-Schatzlein, Robyn Perry, Maya Barzilai, and Claudia Leacock for providing their invaluable linguistic expertise and insightful feedback with the evaluations. We also thank Max Gubin, Leonardo Neves, and Vivek Kulkarni for their helpful suggestions." + }, + { + "type": "title", + "bbox": [ + 0.511, + 0.653, + 0.61, + 0.668 + ], + "angle": 0, + "content": "References" + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.675, + 0.886, + 0.782 + ], + "angle": 0, + "content": "Fernando Alva-Manchego, Louis Martin, Antoine Bordes, Carolina Scarton, Benoit Sagot, and Lucia Specia. 2020. ASSET: A dataset for tuning and evaluation of sentence simplification models with multiple rewriting transformations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4668-4679, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.79, + 0.887, + 0.884 + ], + "angle": 0, + "content": "Vamsi Aribandi, Yi Tay, Tal Schuster, Jinfeng Rao, Huaixiu Steven Zheng, Sanket Vaibhav Mehta, Honglei Zhuang, Vinh Q. Tran, Dara Bahri, Jianmo Ni, Jai Gupta, Kai Hui, Sebastian Ruder, and Donald Metzler. 2022. Ext5: Towards extreme multi-task scaling for transfer learning. In International Conference on Learning Representations." + }, + { + "type": "ref_text", + "bbox": [ + 0.51, + 0.892, + 0.886, + 0.919 + ], + "angle": 0, + "content": "Stephen Bach, Victor Sanh, Zheng Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht" + }, + { + "type": "list", + "bbox": [ + 0.51, + 0.675, + 0.887, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.868, + 0.49, + 0.919 + ], + "angle": 0, + "content": "10 Chaining increases the inference time, and the ordering of the tasks in the sequence is also likely to result in different outputs. We leave the optimal ordering of the tasks in prompt chaining for future work." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5282" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.133, + 0.086, + 0.49, + 0.256 + ], + "angle": 0, + "content": "Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-david, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Fries, Maged Alshaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Dragomir Radev, Mike Tian-jian Jiang, and Alexander Rush. 2022. Prompt-Source: An integrated development environment and repository for natural language prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 93-104, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.268, + 0.49, + 0.412 + ], + "angle": 0, + "content": "Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.424, + 0.49, + 0.516 + ], + "angle": 0, + "content": "Christopher Bryant, Mariano Felice, Øistein E. Andersen, and Ted Briscoe. 2019. The BEA-2019 shared task on grammatical error correction. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 52-75, Florence, Italy. Association for Computational Linguistics." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.528, + 0.49, + 0.62 + ], + "angle": 0, + "content": "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." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.632, + 0.49, + 0.698 + ], + "angle": 0, + "content": "Jishnu Ray Chowdhury, Yong Zhuang, and Shuyi Wang. 2022. Novelty controlled paraphrase generation with retrieval augmented conditional prompt tuning. Proceedings of the AAAI Conference on Artificial Intelligence, 36(10):10535-10544." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.71, + 0.49, + 0.854 + ], + "angle": 0, + "content": "Hyung Won Chung, Le Hou, S. Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Wei Yu, Vincent Zhao, Yanping Huang, Andrew M. Dai, Hongkun Yu, Slav Petrov, Ed Huai hsin Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc Le, and Jason Wei. 2022a. Scaling instructionfinetuned language models. ArXiv, abs/2210.11416." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.866, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai," + }, + { + "type": "text", + "bbox": [ + 0.529, + 0.086, + 0.885, + 0.191 + ], + "angle": 0, + "content": "Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. 2022b. Scaling instruction-finetuned language models." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.205, + 0.884, + 0.245 + ], + "angle": 0, + "content": "Allan Collins and Dedre Gentner. 1980. A framework for a cognitive theory of writing. In Cognitive processes in writing, pages 51-72. Erlbaum." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.258, + 0.885, + 0.351 + ], + "angle": 0, + "content": "Daniel Dahlmeier, Hwee Tou Ng, and Siew Mei Wu. 2013. Building a large annotated corpus of learner English: The NUS corpus of learner English. In Proceedings of the Eighth Workshop on Innovative Use of NLP for Building Educational Applications, pages 22-31, Atlanta, Georgia. Association for Computational Linguistics." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.364, + 0.884, + 0.416 + ], + "angle": 0, + "content": "William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005)." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.43, + 0.884, + 0.522 + ], + "angle": 0, + "content": "Wanyu Du, Zae Myung Kim, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022a. Read, revise, repeat: A system demonstration for human-in-the-loop iterative text revision. In Proceedings of the First Workshop on Intelligent and Interactive Writing Assistants (In2Writing 2022), pages 96-108, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.536, + 0.884, + 0.628 + ], + "angle": 0, + "content": "Wanyu Du, Vipul Raheja, Dhruv Kumar, Zae Myung Kim, Melissa Lopez, and Dongyeop Kang. 2022b. Understanding iterative revision from human-written text. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3573-3590, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.641, + 0.884, + 0.734 + ], + "angle": 0, + "content": "Yupei Du, Qi Zheng, Yuanbin Wu, Man Lan, Yan Yang, and Meirong Ma. 2022c. Understanding gender bias in knowledge base embeddings. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1381-1395, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.747, + 0.884, + 0.813 + ], + "angle": 0, + "content": "Jane Dwivedi-Yu, Timo Schick, Zhengbao Jiang, Maria Lomeli, Patrick Lewis, Gautier Izacard, Edouard Grave, Sebastian Riedel, and Fabio Petroni. 2022. Editeval: An instruction-based benchmark for text improvements. arXiv." + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.826, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Felix Faltings, Michel Galley, Gerald Hintz, Chris Brockett, Chris Quirk, Jianfeng Gao, and Bill Dolan. 2021. Text editing by command. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5259-5274, Online. Association for Computational Linguistics." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5283" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.14 + ], + "angle": 0, + "content": "Tao Fang, Shu Yang, Kaixin Lan, Derek F. Wong, Jinpeng Hu, Lidia S. Chao, and Yue Zhang. 2023. Is chatgpt a highly fluent grammatical error correction system? a comprehensive evaluation." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.149, + 0.49, + 0.23 + ], + "angle": 0, + "content": "Katja Filippova and Yasemin Altun. 2013. Overcoming the lack of parallel data in sentence compression. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1481-1491, Seattle, Washington, USA. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.239, + 0.49, + 0.28 + ], + "angle": 0, + "content": "Linda Flower. 1980. The dynamics of composing: Making plans and juggling constraints. Cognitive processes in writing, pages 31-50." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.289, + 0.49, + 0.395 + ], + "angle": 0, + "content": "Mor Geva, Eric Malmi, Idan Szpektor, and Jonathan Berant. 2019. DiscoFuse: A large-scale dataset for discourse-based sentence fusion. 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 3443-3455, Minneapolis, Minnesota. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.404, + 0.49, + 0.498 + ], + "angle": 0, + "content": "J. Edward Hu, Abhinav Singh, Nils Holzenberger, Matt Post, and Benjamin Van Durme. 2019. Large-scale, diverse, paraphrastic bittexts via sampling and clustering. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pages 44-54, Hong Kong, China. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.507, + 0.49, + 0.587 + ], + "angle": 0, + "content": "Srinivasan Iyer, Xi Victoria Lin, Ramakanth Pasunuru, Todor Mihaylov, Daniel Simig, Ping Yu, Kurt Shuster, Tianlu Wang, Qing Liu, Punit Singh Koura, et al. 2022. Opt-ilm: Scaling language model instruction meta learning through the lens of generalization. arXiv preprint arXiv:2212.12017." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.597, + 0.49, + 0.676 + ], + "angle": 0, + "content": "Chao Jiang, Mounica Maddela, Wuwei Lan, Yang Zhong, and Wei Xu. 2020. Neural CRF model for sentence alignment in text simplification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7943-7960, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.686, + 0.49, + 0.766 + ], + "angle": 0, + "content": "David Kauchak. 2013. Improving text simplification language modeling using unsimplified text data. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1537-1546, Sofia, Bulgaria. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.775, + 0.49, + 0.869 + ], + "angle": 0, + "content": "Zae Myung Kim, Wanyu Du, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022. Improving iterative text revision by learning where to edit from other revision tasks. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9986-9999, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.878, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on" + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.529, + 0.086, + 0.885, + 0.14 + ], + "angle": 0, + "content": "Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.149, + 0.885, + 0.216 + ], + "angle": 0, + "content": "Haokun Liu, Derek Tam, Muqeeth Mohammed, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. In Advances in Neural Information Processing Systems." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.226, + 0.885, + 0.292 + ], + "angle": 0, + "content": "Shayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V Le, Barret Zoph, Jason Wei, et al. 2023. The flan collection: Designing data and methods for effective instruction tuning. arXiv preprint arXiv:2301.13688." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.302, + 0.885, + 0.407 + ], + "angle": 0, + "content": "Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086-8098, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.417, + 0.885, + 0.51 + ], + "angle": 0, + "content": "Aman Madaan and Yiming Yang. 2021. Neural language modeling for contextualized temporal graph generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 864-881, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.52, + 0.885, + 0.599 + ], + "angle": 0, + "content": "Jonathan Mallinson, Jakub Adamek, Eric Malmi, and Aliaksei Severyn. 2022. EdiT5: Semi-autoregressive text editing with t5 warm-start. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 2126-2138, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.609, + 0.885, + 0.702 + ], + "angle": 0, + "content": "Swaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. 2022. Cross-task generalization via natural language crowdsourcing instructions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3470-3487, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.712, + 0.885, + 0.817 + ], + "angle": 0, + "content": "Courtney Naples, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2015. Ground truth for grammatical error correction metrics. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 588-593, Beijing, China. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.826, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Courtney Naples, Keisuke Sakaguchi, and Joel Tetreault. 2017. JFLEG: A fluency corpus and benchmark for grammatical error correction. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 229-234, Valencia, Spain. Association for Computational Linguistics." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5284" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.204 + ], + "angle": 0, + "content": "Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Gray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022a. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.216, + 0.49, + 0.346 + ], + "angle": 0, + "content": "Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F Christiano, Jan Leike, and Ryan Lowe. 2022b. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pages 27730-27744. Curran Associates, Inc." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.359, + 0.49, + 0.425 + ], + "angle": 0, + "content": "Reid Pryzant, Richard Diehl Martinez, Nathan Dass, Sadao Kurohashi, Dan Jurafsky, and Diyi Yang. 2020. Automatically neutralizing subjective bias in text. Proceedings of the AAAI Conference on Artificial Intelligence, 34(01):480-489." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.437, + 0.49, + 0.515 + ], + "angle": 0, + "content": "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020a. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.528, + 0.49, + 0.593 + ], + "angle": 0, + "content": "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020b. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(1)." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.606, + 0.49, + 0.723 + ], + "angle": 0, + "content": "Sudha Rao and Joel Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. 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 129-140, New Orleans, Louisiana. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.736, + 0.49, + 0.841 + ], + "angle": 0, + "content": "Jeff Rasley, Samyam Rajbhandari, Olatunj Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD '20, page 3505-3506, New York, NY, USA. Association for Computing Machinery." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.852, + 0.49, + 0.918 + ], + "angle": 0, + "content": "Machel Reid and Graham Neubig. 2022. Learning to model editing processes. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 3822-3832, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.179 + ], + "angle": 0, + "content": "Emily Reif, Daphne Ippolito, Ann Yuan, Andy Coenen, Chris Callison-Burch, and Jason Wei. 2022. A recipe for arbitrary text style transfer with large language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 837-848, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.186, + 0.885, + 0.291 + ], + "angle": 0, + "content": "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, Hong Kong, China. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.299, + 0.885, + 0.508 + ], + "angle": 0, + "content": "Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le Scao, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander M Rush. 2022. Multitask prompted training enables zero-shot task generalization. In International Conference on Learning Representations." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.516, + 0.885, + 0.595 + ], + "angle": 0, + "content": "Timo Schick, Jane A. Yu, Zhengbao Jiang, Fabio Petroni, Patrick Lewis, Gautier Izacard, Qingfei You, Christoforos Nalmpantis, Edouard Grave, and Sebastian Riedel. 2023. PEER: A collaborative language model. In International Conference on Learning Representations." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.604, + 0.885, + 0.658 + ], + "angle": 0, + "content": "Sanja Šajner, Kim Cheng Sheang, and Horacio Saggion. 2022. Sentence simplification capabilities of transfer-based models. Proceedings of the AAAI Conference on Artificial Intelligence, 36(11):12172-12180." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.666, + 0.885, + 0.757 + ], + "angle": 0, + "content": "Toshikazu Tajiri, Mamoru Komachi, and Yuji Matsumoto. 2012. Tense and aspect error correction for ESL learners using global context. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 198-202, Jeju Island, Korea. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.766, + 0.885, + 0.832 + ], + "angle": 0, + "content": "Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.84, + 0.885, + 0.918 + ], + "angle": 0, + "content": "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5285" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.086, + 0.49, + 0.165 + ], + "angle": 0, + "content": "Marie M. Vaughan and David D. McDonald. 1986. A model of revision in natural language generation. In 24th Annual Meeting of the Association for Computational Linguistics, pages 90-96, New York, New York, USA. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.175, + 0.492, + 0.412 + ], + "angle": 0, + "content": "Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Atharva Naik, Arjun Ashok, Arut Selvan Dhanasekaran, Anjana Arunkumar, David Stap, Eshaan Pathak, 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." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.421, + 0.49, + 0.487 + ], + "angle": 0, + "content": "Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V Le. 2022. Finetuned language models are zero-shot learners. In International Conference on Learning Representations." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.497, + 0.49, + 0.59 + ], + "angle": 0, + "content": "Kristian Woodsend and Mirella Lapata. 2011. Learning to simplify sentences with quasi-synchronous grammar and integer programming. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 409-420, Edinburgh, Scotland, UK. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.6, + 0.489, + 0.652 + ], + "angle": 0, + "content": "Haoran Wu, Wenxuan Wang, Yuxuan Wan, Wenxiang Jiao, and Michael Lyu. 2023. Chatgpt or grammarly? evaluating chatgpt on grammatical error correction benchmark." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.663, + 0.49, + 0.716 + ], + "angle": 0, + "content": "Wei Xu, Chris Callison-Burch, and Courtney Naples. 2015. Problems in current text simplification research: New data can help. Transactions of the Association for Computational Linguistics, 3:283-297." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.726, + 0.49, + 0.792 + ], + "angle": 0, + "content": "Wei Xu, Courtney Naples, Ellie Pavlick, Quanze Chen, and Chris Callison-Burch. 2016. Optimizing statistical machine translation for text simplification. Transactions of the Association for Computational Linguistics, 4:401-415." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.803, + 0.49, + 0.882 + ], + "angle": 0, + "content": "Xingxing Zhang and Mirella Lapata. 2017. Sentence simplification with deep reinforcement learning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 584-594, Copenhagen, Denmark. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.892, + 0.489, + 0.919 + ], + "angle": 0, + "content": "Yaoming Zhu, Sidi Lu, Lei Zheng, Jiaxian Guo, Weinan Zhang, Jun Wang, and Yong Yu. 2018. Texygen: A" + }, + { + "type": "list", + "bbox": [ + 0.116, + 0.086, + 0.492, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.527, + 0.086, + 0.885, + 0.153 + ], + "angle": 0, + "content": "benchmarking platform for text generation models. In The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, SIGIR '18, page 1097-1100, New York, NY, USA. Association for Computing Machinery." + }, + { + "type": "ref_text", + "bbox": [ + 0.51, + 0.166, + 0.885, + 0.245 + ], + "angle": 0, + "content": "Zhemin Zhu, Delphine Bernhard, and Iryna Gurevych. 2010. A monolingual tree-based translation model for sentence simplification. In Proceedings of the 23rd International Conference on Computational Linguistics (Coling 2010), pages 1353-1361, Beijing, China. Coling 2010 Organizing Committee." + }, + { + "type": "list", + "bbox": [ + 0.51, + 0.086, + 0.885, + 0.245 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.262, + 0.799, + 0.279 + ], + "angle": 0, + "content": "A Training Dataset Description" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.29, + 0.884, + 0.368 + ], + "angle": 0, + "content": "In this section, we discuss the details of the datasets used to create our training datasets and also expand on the dataset creation pipeline. For both CoEDIT and CoEDIT-COMPOSITE, we use the following datasets:" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.372, + 0.885, + 0.482 + ], + "angle": 0, + "content": "Fluency: We use three prominent corpora for GEC: the NUS Corpus of Learner English (NUCLE) (Dahlmeier et al., 2013), the W&I-LOCNESS (Bryant et al., 2019), and the NAIST LANG-8 Corpus of Learner English (Tajiri et al., 2012), which is one of the largest and most widely used datasets for GEC." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.485, + 0.885, + 0.661 + ], + "angle": 0, + "content": "Clarity: We split Clarity into two sub-tasks, one focused on Text Simplification, and the other category focused on the set of edits outside of Simplification. In total, we use five corpora for Clarity tasks: Four of them - the NEWSELA corpus (Xu et al., 2015), WIKILARGE (Zhu et al., 2010; Woodsend and Lapata, 2011; Kauchak, 2013), WIKIAUTO (Jiang et al., 2020) and a subset from PARABANKV2 corpus (Hu et al., 2019) focus on text simplification, and the last one comes from the Clarity split of ITER (Du et al., 2022b)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.663, + 0.884, + 0.727 + ], + "angle": 0, + "content": "Coherence: We use the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.729, + 0.884, + 0.823 + ], + "angle": 0, + "content": "Style: Owing to the subjective nature of STYLE edits based on different sub-intentions (eg. conveying writers' writing preferences, including emotions, tone, and voice, etc.). We use the following datasets for making different stylistic edits to reflect those distinctions:" + }, + { + "type": "text", + "bbox": [ + 0.532, + 0.84, + 0.884, + 0.918 + ], + "angle": 0, + "content": "- Formality: We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018) which is a parallel corpus of informal and formal sentence pairs from two different domains." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5286" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.137, + 0.085, + 0.491, + 0.165 + ], + "angle": 0, + "content": "- Neutralization: We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task, where the objective is to remove or mitigate biased words to make sentences more neutral;" + }, + { + "type": "text", + "bbox": [ + 0.137, + 0.174, + 0.49, + 0.238 + ], + "angle": 0, + "content": "- Paraphrasing: For paraphrase generation, we used the PARABANKV2 corpus (Hu et al., 2019), since it is a large-scale corpus that contains multiple diverse sentential paraphrases." + }, + { + "type": "list", + "bbox": [ + 0.137, + 0.085, + 0.491, + 0.238 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.244, + 0.49, + 0.404 + ], + "angle": 0, + "content": "Once the raw datasets were collected, we randomly sampled them to the quantities mentioned in Table 1 based on a few heuristics such as old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. The sampled pairs were then modified by prefixing the source texts with task-specific verbalizers (Appendix C) to convert a pair to a pair. All our models were then fine-tuned on the verbalized dataset." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.405, + 0.49, + 0.71 + ], + "angle": 0, + "content": "Composite instructions: Table 8 shows the composition of the COEDIT-COMPOSITE dataset, in addition to the details about datasets and prompts. We use seven such composite instructions during model training. For the first three composite prompts (GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification), we use GEC datasets to extract datapoints that show simplification and paraphrasing edits in addition to GEC. For the next three prompts (Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification), we use the formality dataset (GYAFC) to extract pairs which exhibit paraphrasing and simplification edits in addition to formality. Lastly, for the last prompt (Paraphrasing-Simplification), we use the ParabankV2 paraphrasing dataset to extract data points which show a simplification of the source text in addition to paraphrasing." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.711, + 0.49, + 0.886 + ], + "angle": 0, + "content": "To select the appropriate source-target pairs for a composite instruction, we use similar heuristics as with single-task instructions, i.e. old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. For example, a source-target pair from a GEC dataset can be used for the composite instruction involving GEC, paraphrasing and simplification if the target and source sentence has a high edit distance and low complexity ratio, character length and word retention scores. The exact details can be found in the code." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.888, + 0.49, + 0.92 + ], + "angle": 0, + "content": "Finally, for building the prompts for the composite instructions, we randomly sample from the" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.149 + ], + "angle": 0, + "content": "task-specific verbalizers and concatenate them. The ordering of the single tasks in a composite instruction is also chosen randomly to ensure better generalization." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.166, + 0.785, + 0.182 + ], + "angle": 0, + "content": "B Testing Dataset Description" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.194, + 0.868, + 0.21 + ], + "angle": 0, + "content": "Specifically, we consider the following datasets:" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.217, + 0.885, + 0.329 + ], + "angle": 0, + "content": "Grammatical Error Correction We use the JF-LEG (Napoles et al., 2017) corpus of English sentences that represents a range of language proficiency levels and comprehensive fluency edits. For evaluation, we use the GLEU (Napoles et al., 2015) score as the primary metric and also report results using the SARI (Xu et al., 2016) metric." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.336, + 0.885, + 0.448 + ], + "angle": 0, + "content": "Text Simplification We use the TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) datasets, which were both created from WikiLarge data (Zhang and Lapata, 2017), where each complex sentence consists of multiple crowdsourced reference simplifications. We report results using the SARI metric." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.455, + 0.885, + 0.552 + ], + "angle": 0, + "content": "Coherence We use the Coherence split of ITER (Du et al., 2022b), and the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives. We report results using the SARI metric." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.558, + 0.885, + 0.703 + ], + "angle": 0, + "content": "Iterative Text Editing We use ITERER (Du et al., 2022b), an iterative text revision dataset spanning five edit intentions (Section 3) across three different domains (ArXiv, News, Wikipedia). We evaluate our models using the SARI metric. We report the performance on individual intentions - Fluency, Clarity, and Coherence, and also aggregated scores on the full dataset, which includes Style edits." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.713, + 0.858, + 0.745 + ], + "angle": 0, + "content": "The rest of the section describes the evaluation setups for Style-related edits:" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.759, + 0.885, + 0.887 + ], + "angle": 0, + "content": "Formality Style Transfer We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018), a parallel corpus of informal and formal sentence pairs from two different domains. Similar to prior works, we evaluate the quality of rewriting using SARI, and the accuracy of style transfer using a formality classification model11." + }, + { + "type": "page_footnote", + "bbox": [ + 0.509, + 0.892, + 0.875, + 0.918 + ], + "angle": 0, + "content": "11https://huggingface.co/s-nlp/xlmr_formality classifier" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5287" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.118, + 0.081, + 0.88, + 0.589 + ], + "angle": 0, + "content": "
Edit IntentionDatasetsSizeExample InputExample Output
GEC-PARAPHRASENUCLE-14 Lang-8 BEA-191kFix grammar in this sentence, and rewrite this sentence: How about taking account of psychology?One such perspective is to take psychology into account.
GEC-SIMPLIFYNUCLE-14 Lang-8 BEA-191kMake this easier to understand, and remove grammatical mistakes: So it was not like enjoying the tasteful gardens.So it was not as if I could enjoy the pretty gardens.
GEC-PARAPHRASE-SIMPLIFYNUCLE-14 Lang-8 BEA-191kRewrite this sentence, change to simpler wording, and fix the grammar mistakes: Due to ageing, some of the people may suffer from physical and mental depreciation.Due to the effects of aging, some people may suffer.
FORMALITY-PARAPHRASEGYAFC5kMake this sound more formal, and paraphrase: writers dont think about what they will write, they just write!!!Some writers can write freely without putting too much thought to it.
FORMALITY-SIMPLIFYGYAFC2kRewrite more formally, and make this text less complex: Not to my knowledge...I'm a little curious myself now though.I do not think so.
FORMALITY-PARAPHRASE-SIMPLIFYGYAFC4kRewrite the sentence to be simpler, make this sound more formal, and paraphrase this sentence: my answer is what...very clever riddle!!Your riddle was very clever, and I am unsure how to re-spond.
PARAPHRASE-SIMPLIFYParabankV25kUse simpler wording, and write a paraphrased version of the sentence: In your second communication, you requested reinforcements.You asked for backup in your second report
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.598, + 0.884, + 0.628 + ], + "angle": 0, + "content": "Table 8: Example data instances with composite instructions in the COEDIT-COMPOSITE dataset (90K pairs). Instructional prompts in the inputs are italicized." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.638, + 0.49, + 0.734 + ], + "angle": 0, + "content": "Neutralization We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task. Based on prior works, we use Exact-Match (EM) for evaluations, which is the percentage of examples for which the edited text exactly matches the reference(s)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.749, + 0.49, + 0.877 + ], + "angle": 0, + "content": "Paraphrasing We use the widely-used Microsoft Research Paraphrase Corpus (MRPC) (Dolan and Brockett, 2005), the STS benchmark from SemEval-2017 (STS) (Cer et al., 2017), and the Quora Question Pairs\\(^{12}\\) (QQP) datasets. We evaluate paraphrasing on two criteria and metrics: Self-BLEU (Zhu et al., 2018) to measure the diversity of the paraphrases relative to the given source and ref" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.637, + 0.883, + 0.671 + ], + "angle": 0, + "content": "erence texts, and Semantic Similarity13 to measure meaning preservation." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.685, + 0.694, + 0.7 + ], + "angle": 0, + "content": "C Task Verbalizers" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.712, + 0.885, + 0.792 + ], + "angle": 0, + "content": "We manually curated a variety of task-specific verbalizers to construct the instructional inputs. Table 9 shows the full list of the verbalizers used for training and evaluations. Table 10 shows the verbalizers used for the experiments conducted in Section 6.2." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.822, + 0.691, + 0.839 + ], + "angle": 0, + "content": "D Training Details" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.849, + 0.883, + 0.882 + ], + "angle": 0, + "content": "We used the Adam optimizer with a learning rate of \\( 1e - 4 \\). Each model is trained for 5 epochs" + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.891, + 0.442, + 0.918 + ], + "angle": 0, + "content": "\\(^{12}\\)https://quoradata.quora.com/ First-Quora-Dataset-Release-Question-Pairs" + }, + { + "type": "page_footnote", + "bbox": [ + 0.509, + 0.892, + 0.883, + 0.919 + ], + "angle": 0, + "content": "13We use the paraphrase-mpnet-base-v2 model from SentenceTransformers (Reimers and Gurevych, 2019)" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5288" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.126, + 0.086, + 0.873, + 0.707 + ], + "angle": 0, + "content": "
Edit Intention / TaskVerbalizers
GECFix grammar, Fix grammar in this sentence, Fix grammar in the sentence, Fix grammar errors, Fix grammatical errors, Fix grammaticality, Fix all grammatical errors, Fix grammatical errors in this sentence, Fix grammar errors in this sentence, Fix grammatical mistakes in this sentence, Fix grammaticality in this sentence, Fix grammaticality of the sentence, Fix disfluencies in the sentence, Make the sentence grammatical, Make the sentence fluent, Fix errors in this text, Update to remove grammar errors, Remove all grammatical errors from this text, Improve the grammar of this text, Improve the grammaticality, Improve the grammaticality of this text, Improve the grammaticality of this sentence, Grammar improvements, Remove grammar mistakes, Remove grammatical mistakes, Fix the grammar mistakes, Fix grammatical mistakes
ClarityClarify the sentence, Clarify this sentence, Clarify this text, Write a clearer version for the sentence, Write a clarified version of the sentence, Write a readable version of the sentence, Write a better readable version of the sentence, Rewrite the sentence more clearly, Rewrite this sentence clearly, Rewrite this sentence for clarity, Rewrite this sentence for readability, Improve this sentence for readability, Make this sentence better readable, Make this sentence more readable, Make this sentence readable, Make the sentence clear, Make the sentence clearer, Clarify, Make the text more understandable, Make this easier to read, Clarification, Change to clearer wording, Clarify this paragraph, Use clearer wording
SimplificationSimplify the sentence, Simplify this sentence, Simplify this text, Write a simpler version for the sentence, Rewrite the sentence to be simpler, Rewrite this sentence in a simpler manner, Rewrite this sentence for simplicity, Rewrite this with simpler wording, Make the sentence simple, Make the sentence simpler, Make this text less complex, Make this simpler, Simplify, Simplification, Change to simpler wording, Simplify this paragraph, Simplify this text, Use simpler wording, Make this easier to understand
CoherenceFix coherence, Fix coherence in this sentence, Fix coherence in the sentence, Fix coherence in this text, Fix coherence in the text, Fix coherence errors, Fix sentence flow, Fix sentence transition, Fix coherence errors in this sentence, Fix coherence mistakes in this sentence, Fix coherence in this sentence, Fix coherence of the sentence, Fix lack of coherence in the sentence, Make the text more coherent, Make the text coherent, Make the text more cohesive, logically linked and consistent as a whole, Make the text more cohesive, Improve the cohesiveness of the text, Make the text more logical, Make the text more consistent, Improve the consistency of the text, Make the text clearer, Improve the coherence of the text
Formality Style TransferFormalize, Improve formality, Formalize the sentence, Formalize this sentence, Formalize the text, Formalize this text, Make this formal, Make this more formal, Make this sound more formal, Make the sentence formal, Make the sentence more formal, Make the sentence sound more formal, Write more formally, Write less informally, Rewrite more formally, Write this more formally, Rewrite this more formally, Write in a formal manner, Write in a more formal manner, Rewrite in a more formal manner
NeutralizationRemove POV, Remove POVs, Remove POV in this text, Remove POVs in this text, Neutralize this text, Neutralize the text, Neutralize this sentence, Neutralize the sentence, Make this more neutral, Make this text more neutral, Make this sentence more neutral, Make this paragraph more neutral, Remove unsourced opinions, Remove unsourced opinions from this text, Remove non-neutral POVs, Remove non-neutral POV, Remove non-neutral points of view, Remove points of view, Make this text less biased
ParaphrasingParaphrase the sentence, Paraphrase this sentence, Paraphrase this text, Paraphrase, Write a paraphrase for the sentence, Write a paraphrased version of the sentence, Rewrite the sentence with different wording, Use different wording, Rewrite this sentence, Reward this sentence, Rephrase this sentence, Rewrite this text, Reward this text, Rephrase this text
" + }, + { + "type": "table_caption", + "bbox": [ + 0.204, + 0.716, + 0.793, + 0.731 + ], + "angle": 0, + "content": "Table 9: Complete list of task-specific verbalizers used in our training and test datasets." + }, + { + "type": "table", + "bbox": [ + 0.127, + 0.747, + 0.871, + 0.887 + ], + "angle": 0, + "content": "
Edit Intention / TaskVerbalizers
Sentence Com-pressionShorten the sentence, Shorten this sentence, Compress this sentence, Shorten this text, Compress this text, Write a shorter version for the sentence, Rewrite the sentence to be shorter, Rewrite this sentence in a shorter manner, Rewrite this sentence for shorter length, Make the sentence short, Make the sentence shorter, Make this shorter, Shorten, Compress, Shorten this paragraph, Shorten this text
PolitenessIncrease politeness, Make this polite, Make this more polite, Make this sound more polite, Make the sentence polite, Make the sentence more polite, Make the sentence sound more polite, Write more politely, Rewrite more politely, Write this more politely, Rewrite this more politely, Write in a polite manner, Write in a more polite manner, Rewrite in a more polite manner
" + }, + { + "type": "table_caption", + "bbox": [ + 0.228, + 0.897, + 0.767, + 0.912 + ], + "angle": 0, + "content": "Table 10: List of task-specific verbalizers used for generalizability experiments." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5289" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.115, + 0.083, + 0.885, + 0.472 + ], + "angle": 0, + "content": "
ModelSizeIteraTeRClarityCoherenceStyle (Paraphrasing)
ITERATER-FLU†ITERATER-CLA†ITERATER-COH†TURK†DiscoFuse-Sport†STS(↓/↑)QQP(↓/↑)
(a)COPY-31.928.630.826.330.539.6 / 10030.1 / 100
T5-LARGE770M15.123.821.734.228.418.0 / 50.518.2 / 62.5
(b)TO*3B27.128.021.234.833.627.7 / 88.710.2 / 63.4
Tk-INSTRUCT*3B22.320.921.232.329.112.3 / 49.519.1 / 79.6
T0++*11B37.930.227.534.135.129.9 / 99.016.6 / 79.1
(c)LLAMA7B32.428.831.427.230.81.4 / 14.41.5 / 35.8
GPT3175B20.921.821.234.627.00 / 8.20 / 13.1
(d)ALPACA7B33.028.931.027.430.80 / 25.80 / 64.4
CHATGPT-36.423.131.437.439.17.9 / 96.98.17 / 96.5
INSTRUCTGPT175B43.728.133.938.945.811.6 / 88.79.3 / 95.5
GPT3-EDIT176B48.331.834.234.748.014.0 / 86.66.4 / 94.5
(e)ALPACA (FS)7B33.028.931.028.432.10 / 39.20 / 63.4
GPT3 (FS)175B33.930.833.938.746.40 / 2.10 / 5.9
CHATGPT (FS)-36.227.035.637.349.40 / 88.70 / 96.8
INSTRUCTGPT (FS)175B44.731.737.539.556.90 / 91.80 / 96.1
(f)ITERATER570M36.730.434.727.240.924.1 / 81.420.6 / 94.3
DELITERATER570M32.028.930.627.831.724.7 / 87.620.4 / 96.6
PEER-3B*3B51.432.132.132.5---
PEER-11B*11B52.132.532.734.1---
(g)CoEdit-L770M46.830.931.538.570.522.4 / 92.815.7 / 97.2
CoEdit-XL3B50.431.331.538.574.620.8 / 94.815.4 / 97.8
CoEdit-XXL11B51.631.831.538.276.221.8 / 93.815.4 / 98.2
" + }, + { + "type": "table_caption", + "bbox": [ + 0.112, + 0.481, + 0.884, + 0.596 + ], + "angle": 0, + "content": "Table 11: Comparison of CoEDIT against various baselines (on sub-tasks and additional datasets to Table 2), divided into seven groups: (a) a copy baseline and T5-LARGE baseline prefixed only with task-specific tags (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs, (d) Instruction-tuned LLMs, (e) Few-shot evaluations of large pre-trained models (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first scores for each task (excluding STS and QQP style tasks) are SARI scores. For STS and QQP, the first scores are Self-BLEU scores, and the second is semantic similarity. (\\(\\uparrow\\)) indicates higher is better, and (\\(\\downarrow\\)) indicates lower is better. The best-performing models for each dataset are highlighted in bolded boxes. (FS) denotes few-shot evaluation." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.62, + 0.49, + 0.716 + ], + "angle": 0, + "content": "with early stopping. All models were fine-tuned on A100 GPUs using Deepspeed (Rasley et al., 2020). Maximum sequence lengths for both the source and the target were set to 256 tokens (via filtering). The best-performing checkpoints were chosen based the validation loss." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.729, + 0.325, + 0.743 + ], + "angle": 0, + "content": "E Model Performance" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.754, + 0.489, + 0.835 + ], + "angle": 0, + "content": "Table 11 compares the performance of CoEDIT with the other models on the remaining test datasets. We observe similar trends as the ones observed in Table 2, where CoEDIT outperforms most models we compare against." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.846, + 0.283, + 0.863 + ], + "angle": 0, + "content": "F Data Examples" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5290" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.133, + 0.085, + 0.868, + 0.324 + ], + "angle": 0, + "content": "
InstructionGPT3-EditCoEdit-xl (ours)
Fix all grammatical errors: Every one would expect to leave his owns and secrets dreams like to be a painter, a writer ...Every one would expect to leave his owns and secrets dreams like the painting and the write ...Every one would expect to leave his own and secret dreams like to be a painter, a writer...
Make this simpler: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British racquet sport.Fives is a British sport. It is thought to have come from the same place as many racquet sports.
Fix coherence in this text: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful fighting technique. Spike is yet to fully develop it .Phantom Budo is an incredibly pow-erful ability, but Spike has yet to fully develop it.
Use different wording: Judge Gerald W. Heaney, in dissent, said the authorities should have allowed the prisoner to be medicated without the consequence of execution.Judge Gerald W. Heaney, who dis-agreed with the majority decision, said the prisoner should be medicated after important testimony is received.In his dissent, Gerald W. Heaney said the authorities should have allowed the prisoner to be treated without execu-tion.
" + }, + { + "type": "table_caption", + "bbox": [ + 0.198, + 0.333, + 0.798, + 0.348 + ], + "angle": 0, + "content": "Table 12: A sample of text revisions generated by GPT3-EDIT and CoEDIT-XL (ours)." + }, + { + "type": "table", + "bbox": [ + 0.118, + 0.361, + 0.88, + 0.884 + ], + "angle": 0, + "content": "
InstructionGPT3-EDITCOEDIT-XL (chaining)COEDIT-XL-C
Remove all grammatical errors from this text, and make this text less complex: They follow the way the Sun goes from the east to the west.The Sun rises in the east and sets in the west.They move with the sun as it goes from east to west.They follow the sun as it goes from east to west.
Make the sentence grammatical, rewrite the sentence with different wording, and make this text less complex: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British sport that is believed to derive from the same origins as many racquet sports.It is thought to have come from the same sources as other racquet sports.Fives is a British sport that is believed to have originated from racquet sports.
Make the text coherent, and rewrite this text: Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous wasn't too worried about the fact that he couldn't finish his cheese sandwich, but soon realized that this was an endless sandwich and an endless amount of condiments.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich, but soon realizes he is dealing with an endless sandwich and an endless supply of condiments.
Make the text more coherent, simplification, and rewrite this sentence: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful ability. It is an awesome fighting technique that Spike has yet to fully develop.This fighting technique of Spike is still in development.Spike has yet to fully develop his Phantom Budo ability.
Rewrite the sentence to be simpler, and paraphrase this text: The jury asked for transcripts of Quattrone's testimony about his role in the initial public offering allocation process.The jury asked for transcripts of Frank Quattrone's testimony about his role in the initial public offering allocation process.The jury requested a copy of Quattrone's testimony.Transcriptions of Quattrone's testimony were requested by the jury.
Rewrite more formally, and make this easier to understand: Brian, he asked the coolest questions, they suspended him though, i dont know what's up with that!Brian, he asked the coolest questions, they suspended him though, I don't know what's up with that! He was a cool guy, and I liked his questions.I do not understand why Brian was suspended. He had some great questions.I do not know why they suspended Brian.
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.893, + 0.883, + 0.923 + ], + "angle": 0, + "content": "Table 13: A sample of text revisions generated by GPT3-EDIT, COEDIT-XL (chaining) and COEDIT-XL-C for composite instructions." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.519, + 0.941 + ], + "angle": 0, + "content": "5291" + } + ] +] \ No newline at end of file diff --git a/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_origin.pdf b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ad1bd8a80ddf90f56c85c06cebba00d67454e171 --- /dev/null +++ b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/a96951b8-7a4b-4897-92fb-aa7a653963ca_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43fada0531fd3bc0a82c1a45d0b08665fa89eb6a52c28eb70090bf02a3cf858e +size 592685 diff --git a/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/full.md b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..40b17da248ade5b06cf37021b20ca25b5bfab53c --- /dev/null +++ b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/full.md @@ -0,0 +1,401 @@ +# CoEdit: Text Editing by Task-Specific Instruction Tuning + +Vipul Raheja\* Dhruv Kumar\* Ryan Koo\* Dongyeop Kang + +$\spadesuit$ Grammarly $\diamond$ University of Minnesota + +\*first.last@grammarly.com $\diamondsuit$ {koo0017, dongyeop}@umn.edu + +# Abstract + +We introduce CoEDIT, a state-of-the-art text editing system for writing assistance. CoEdit takes instructions from the user specifying the attributes of the desired text, such as "Make the sentence simpler" or "Write it in a more neutral style," and outputs the edited text. We present a large language model fine-tuned on a diverse collection of task-specific instructions for text editing (a total of 82K instructions). Our model (1) achieves state-of-the-art performance on various text editing benchmarks, (2) is competitive with publicly available largest-sized LLMs trained on instructions while being $\sim 60\mathrm{x}$ smaller, (3) is capable of generalizing to unseen edit instructions, and (4) exhibits abilities to generalize to composite instructions containing different combinations of edit actions. Through extensive qualitative and quantitative analysis, we show that writers prefer the edits suggested by CoEDIT, relative to other state-of-the-art text editing models1. + +# 1 Introduction + +Large language models (LLMs) have made remarkable progress toward generating coherent text in a wide variety of tasks and domains to support writing assistance (Du et al., 2022a; Mallinson et al., 2022; Schick et al., 2023), such as grammatical error correction (Wu et al., 2023), text simplification (Stajner et al., 2022), paraphrasing (Chowdhury et al., 2022), and style transfer (Reif et al., 2022). One of the emergent abilities of LLMs is the capability to generalize to unseen tasks by following new or composed instructions. Instruction-tuning, where LLMs are fine-tuned on a collection of tasks phrased as instructions, makes the models more adept at interpreting and following instructions, reducing the need for few-shot exemplars (Sanh et al., 2022; Ouyang et al., 2022b; Wei et al., 2022; Chung et al., 2022b). + +![](images/665e413a764ba4bd23ae3c61ac7001fff200f3ab98ac4248b55399135a23076c.jpg) +Figure 1: Model comparison according to training parameters vs. average performance across all text editing benchmarks reported in Tables 2 and 11. Publicly available models are denoted with $(^{*})$ . + +Text editing is a complex task because human writers cannot simultaneously grasp multiple demands and constraints of the task and tend to iterate and revise their work multiple times (Flower, 1980; Collins and Gentner, 1980; Vaughan and McDonald, 1986). This poses a significant challenge for intelligent writing assistants. + +In this work, we aim to improve the capabilities of instruction-tuned models for text editing by leveraging instruction-tuning from diverse tasks of text editing benchmarks. While multiple previous works have attempted to develop general-purpose text editing models using LLMs, they are either not trained with instruction-tuning (Du et al., 2022c; Kim et al., 2022), trained on much smaller models or not trained on task-specific datasets (Mallinson et al., 2022; Schick et al., 2023), or are not publicly available (Schick et al., 2023), which limits their effectiveness, performance, or usability. + +We introduce CoEDIT, a text editing system designed to provide writing assistance with a natural language interface. A user can employ CoEDIT by providing natural language instructions such as "Paraphrase the sentence" or "Fix the grammar". Our experiments demonstrate that fine-tuning in + +![](images/bd643d55e590b7046d1994e71e3854be9c4026b9c7836cb0d9e8b9836d46c7c5.jpg) +Figure 2: General-purpose (left) vs Task-specific (right) Instruction Tuning. + +strictions for specific tasks is more effective than multi-task learning and general-purpose instruction tuning. We conjecture that task-specific instructions increase the density of the instruction space, reinforcing the complementary effects of multiple tasks and facilitating their generalization to composite and new text editing tasks, as shown in Fig. 2. + +To build CoEdit, we fine-tune a pre-trained sequence-to-sequence model on a parallel corpus of instruction-based 82K input-output pairs. The inputs and outputs are sourced from publicly available corpora for different text editing tasks, and the instructions are constructed based on rules that introduce lexical and semantic variations. + +Our main contributions are as follows: + +- We achieve state-of-the-art performance on multiple text editing tasks: grammatical error correction, text simplification, sentence fusion, iterative text editing, and three stylistic editing tasks (formality style transfer, neutralization, and paraphrasing). +- We find that even our smallest instruction-tuned model outperforms other supervised text editing models, instruction-tuned models, and general-purpose LLMs with nearly $60\mathrm{x}$ greater parameters, on both manual and automatic evaluations. +- CoEdit generalizes well to new, adjacent tasks not seen while fine-tuning, as well as composite instructions with multiple task specifications. +- Our data and models will be publicly available. + +# 2 Related Work + +Large Language Models for Text Editing In general, our work is related to many prior works that leverage LLMs; for instance, finetuning T5 (Raffel et al., 2020a) on pairs of original and edited text (Faltings et al., 2021; Reid and Neubig, 2022; Mallinson et al., 2022; Du et al., 2022a,b; Kim et al., 2022). However, these aforementioned works are either not based on instruction tuning, use different modeling techniques such as tag-based se + +quence labeling, or are not general enough to work on multiple text editing tasks. Moreover, several LLMs are trained to solve specific tasks only, such as grammar errors (Mallinson et al., 2022; Fang et al., 2023), text simplification (Stajner et al., 2022), paraphrase generation (Chowdhury et al., 2022), or style transfer (Reif et al., 2022), which limits their generalizability. + +Instruction Tuning for Writing Assistance Explicitly teaching models how to follow natural language instructions is closely related to recent work for fine-tuning models using large datasets of human-written instructions (Wei et al., 2022; Mishra et al., 2022; Sanh et al., 2022; Ouyang et al., 2022a; Wang et al., 2022; Iyer et al., 2022; Bach et al., 2022; Longpre et al., 2023). Recently, advanced data augmentation and instruction tuning, starting with the Flan models (Chung et al., 2022b), have shown that strong results stem both from the larger and more diverse set of tasks. Additionally, enriching task diversity and balancing task sources (Sanh et al., 2022) are shown to be critical to performance, suggesting instruction-tuned models offer a more computationally-efficient starting checkpoint for downstream applications, corroborating Liu et al. (2022) and Aribandi et al. (2022). + +On instruction tuning for writing assistance, our work is closely related to PEER (Schick et al., 2023), who fine-tuned T5-based LLMs by following user-provided text-editing plans to perform the said edits. There are a few significant differences in our approach compared to PEER. While PEER attempts to either create or leverage a user-provided plan, realize the edits conditioned on the plan, and try to explain the plan, we focus only on the plan and edit parts of the pipeline. Even when it comes to handling editing plans in the form of natural language instructions, our work focuses on edits that do not add new information. Therefore, we compare our models only against PEER-Edit models. + +Finally, no prior works, to the best of our knowledge, have investigated the ability of instruction-tuned LLMs for text editing to generalize to composite instructions. + +# 3 CoEdit + +# 3.1 Training Dataset + +Our dataset creation is based on the ITERER+ dataset proposed by Kim et al. (2022) who combined datasets from various text editing tasks (See Table 1). Their work, in turn, is based on Du et al. + +
Edit IntentionDatasetsSizeExample InputExample Output
FLUENCYNUCLE-14, Lang-8, BEA-1920kFix the grammar: When I grow up, I start to understand what he said is quite right.When I grew up, I started to understand what he said was quite right.
COHERENCEDiscoFuse11kMake this text coherent: Their flight is weak. They run quickly through the tree canopy.Their flight is weak, but they run quickly through the tree canopy.
CLARITY (Simplification)NEWSELA,WikiAuto, WikiLarge, ParabankV2, ITERER-CLARITY13kRewrite to make this easier to understand: A storm surge is what forecasters consider a hurricane's most treacherous aspect.A storm surge is considered a hurricane's most dangerous aspect.
STYLE (Paraphrase)ParabankV215kParaphrase this: Do you know where I was born?Do you know my birthplace?
STYLE (Formalize)GYAFC12kWrite this more formally: OMG i love that song im listening to it right nowI love that song and I am listening to it at this moment.
STYLE (Neutralize)WNC11kWrite in a more neutral way: The authors' exposé on nutrition studies.The authors' statements on nutrition stud-ies.
+ +Table 1: Example data instances in the COEDIT dataset. Instructions in the inputs are italicized. + +(2022b), who categorized each edit into MEANING-CHANGED or NON-MEANING-CHANGED. Edits that belong to the latter group are further assigned to FLUENCY, COHERENCE, CLARITY, or STYLE. The aforementioned taxonomy of edit intents from ITERER reflects writers' general intention behind their revision, providing more in-depth information than just superficial edit operations, such as ADD and DELETE. + +Similar to Kim et al. (2022), our work focuses on non-MEANING-CHANGED edits. We consider those edits to be ones that do not add new information or perform fact updates. Since the STYLE edits are quite subjective in nature, we allow for the possibility of meaning change so as to fulfill the needs of making stylistic edits, but we constrain the editing tasks to ensure the edited texts are semantically similar to the sources, but not to the extent of adding new information or fact updates. With this in mind, we expand the STYLE edit intention category from ITERATER+ to include three new sub-intentions: Paraphrasing, Formality Style Transfer (or Formalization), and Neutralization. + +The aforementioned ITERER dataset taxonomy lends itself conveniently to be articulated as natural language instructions and allows us to naturally formulate them into instructional prompts (See Table 1). We rewrite each edit intention as a set of natural language instruction prompts to create the COEDIT dataset. To allow models to adapt to linguistic variations of the instructions, we also include paraphrases of the instruction templates, e.g., instead of "Write" we also use "Generate" or "Rewrite," or instead of "Paraphrase the text" we use "Rewrite the text with different wording," and so on. For each task, we develop a variety of such diverse instructional prompts and ran + +domly sample an instruction from the aforementioned group of task-specific instruction candidates to be pre-pended to the source in order to form an data pair. We provide the full list of our instructional prompts in §C. In total, our training dataset consists of around 82K pairs. We keep the original train-validation-test splits consistent as the original datasets but diversify the train and validation splits with the paraphrasing augmentations. The details of datasets and instructions used to train our models are described in §A. + +# 3.2 Text Editing Models + +We fine-tune different versions of pre-trained FLANT5 (Chung et al., 2022a) models on the COEDIT dataset. Specifically, we use FLANT5-L (770M parameters), FLANT5-XL (3B parameters), FLANT5-XXL (11B parameters) models, which are henceforth referred to as COEDIT-L, COEDIT-XL, and COEDIT-XXL respectively. The training details are summarized in $\S D$ . + +# 4 Experimental Setup + +We conduct experiments to determine if a standard instruction-tuned language model fine-tuned using task-specific data can improve text editing performance and if it can further generalize into a general-purpose text editing model capable of following human-written instructions and handling a wider array of editing tasks, such as unseen and composite instructions. Specifically, we aim to answer the following research questions: + +- RQ1: Can COEdit follow text editing instructions and perform high-quality edits across a wide variety of tasks? + +- RQ2: Is CoEdit generalizable to perform high-quality edits for new types of text editing instructions? +- RQ3: Does CoEdit make the writing process more efficient and effective for human writers? + +We answer these questions via quantitative analyses of model outputs (Section 5) and via qualitative analyses and human evaluations of model outputs (Section 6). Further, we investigate RQ2 along two dimensions: (1) generalization to composite instructions containing combinations of multiple different kinds of edits and (2) out-of-domain generalization to instructions with new task requirements on previously unseen data. + +# 4.1 Models + +No-Edits Baseline We first evaluate a no-edits baseline, where the output is simply a copy of the source input without the instruction. This strategy performs reasonably well on tasks where the target output largely overlaps with the input (e.g., GEC). + +Supervised Text Editing Models We also evaluate existing LLMs for text editing that are not finetuned with instruction-specific data. Specifically, to understand the effect of task-specific fine-tuning, we evaluate against $\mathrm{T5}^2$ (Raffel et al., 2020b) models as primary alternatives of our FLAN-T5 models. We also compare our models against ITERER (Du et al., 2022b) and DELITERATER (Kim et al., 2022), which have shown strong performance on a variety of text editing tasks. $^3$ + +Instruction-tuned LLMs A major group of our comparisons is against instruction-tuned LLMs: + +- Our main comparison is against PEER (Schick et al., 2023), which is primarily based on the LM Adapted variant of T5. As the focus of our work is on improving revision quality (Section 2), we compare against PEER-EDIT (both 3B and 11B versions). +- T0, T0++ (Sanh et al., 2022) and Tk-Instruct (Wang et al., 2022), which are all initialized from the LM Adapted variant of T5, and finetuned using PromptSource (Bach et al., 2022), and Super-NaturalInstructions (Wang et al., 2022) datasets, respectively. + +- Alpaca (Taori et al., 2023) is an instruction-tuned version of the LLaMA-7B model (Touvron et al., 2023) trained on 52K instruction-following demonstrations generated by GPT3. +- We also compare InstructGPT (Ouyang et al., 2022a), a variant of GPT3 fine-tuned via reinforcement learning on a large dataset of instructions and human-written outputs. +- GPT3.5 (henceforth referred to as ChatGPT), is an improved version of InstructGPT optimized for chat. We utilize OpenAI's API for all inference tasks.5 +- GPT3 also offers a text Editing $\mathbf{A}\mathbf{P}\mathbf{I}^6$ (we refer to as GPT3-Edit), which is usable for editing tasks rather than completion, making it directly comparable to the tasks we train COEDIT on. + +Large-Pretrained Decoder-only Models We compare against LLMs with no instruction tuning in two settings – zero-shot and few-shot (details in Section 5.1): + +- The 175B GPT3 (Brown et al., 2020) model that is not instruction-tuned demonstrates strong general-purpose text revision capabilities. +- LLaMA (Touvron et al., 2023) is Meta AI's general-purpose language model trained only on publicly available data. We utilize the 7B model due to computing constraints. + +Outputs of all models were generated using greedy decoding unless specified otherwise. + +# 4.2 Test Datasets + +To assess the editing capabilities of CoEDIT, we perform evaluations on standard test sets sourced from a variety of text editing task benchmarks, most notably, EDITEVAL (Dwivedi-Yu et al., 2022). Owing to the overlap of our work with PEER, we keep our evaluation datasets and evaluation metrics as close to theirs as possible for consistency: We used JFLEG (Napoles et al., 2017) for grammatical error collection, TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) for text simplification, Coherence split of ITER (Du et al., 2022b) and the DISCOFUSE dataset (Geva et al., 2019) for coherence, and ITER (Du et al., 2022b) for iterative text revision. For Style-related edits, we used GYAFC (Rao and Tetreault, 2018) for formality style, WNC (Pryzant et al., 2020) for neutralization, and MRPC (Dolan and + +Brockett, 2005), STS (Cer et al., 2017), and QQP for paraphrasing. Detailed descriptions of each dataset and its evaluation metrics are in $\S \mathbf{B}$ + +# 5 Quantitative Results + +# 5.1 Text Editing Performance + +Table 2 helps us answer RQ1 by comparing the performance of CoEdit to other models across various text editing tasks. We first present results from the more well-known evaluation sets here and present additional results (i.e., sub-tasks and additional datasets) in Table 11. + +We segregate the models into seven groups. The first group (a) consists of the copy baseline and T5-LARGE baseline fine-tuned with prefix-tuning (each data point is prefixed with task-specific tags rather than instructions), while the second group (b) consists of instruction-fine-tuned T5-based models on non-text-editing tasks. We find that CoEdit substantially outperforms these models across all tasks. + +The next two groups (c, d) show different LLMs varying from 7B to 176B parameters in size, evaluated in a zero-shot setting. Those in group (c) are decoder-only models, while those in group (d) are instruction-tuned. We find that CoEdit outperforms all LLMs comparable to its model size (e.g., Alpaca and LLaMA) across all tasks, as well as on most tasks compared to models several times larger, such as ChatGPT and InstructGPT. This indicates that current general-purpose and instruction-tuned models are underfitted, and it is beneficial to densify the task/instruction space rather than to scale model size. + +Although models such as Alpaca and T5-based models (Tk-instruct, T0, $\mathrm{T0 + + }$ ) have previously shown strong capabilities for zero-shot tasks, they show weaker performance compared to CoEDIT. We also see that the decoder-only models (e.g., GPT3 and LLaMA) often repeat the input for more complex tasks, such as ones under the Style intent group. This can be attributed to difficulty understanding the prompted task, resulting in the models either repeating the input sentence or generating a continuation unrelated to the task. + +Next, in the fifth group (e), we evaluate the LLMs under a few-shot setting. As mentioned in Section 4.1, we conduct these experiments in a 4-shot evaluation setting, where example inputs were constructed by randomly sampling four inputs for each task from the CoEDIT dataset such that all examples chosen would fit in the input window for all models as seen in (Brown et al., 2020). The input sentence and its corresponding revised reference were pre-pended to the instructional prompt. We conduct few-shot evaluations for decoder-only LLMs (GPT3) and three instruction-tuned LLMs (InstructGPT, ChatGPT, and Alpaca). Outputs of all models were generated using greedy decoding unless specified otherwise. + +We observe that giving specific examples improves performance in all models for all tasks except MRPC for GPT3. This may be because GPT3 still exhibits some similar behavior in repeating its generations continuously, resulting in a low BLEU score but low semantic similarity as well. We don't present any experiments for GPT3-Edit under the few-shot setting, as scores tended to stay the same across all tasks – implying that GPT3-Edit may not have as good in-context learning capabilities. Overall, we find that even our smallest 770M parameter model is competitive against LLMs evaluated in a few-shot setting in most tasks. + +In the final group (f), we compare our models against task-specific text editing models such as ITERER, DELITERATER, and PEER. ITERER and DELITERATER perform comparatively worse than the scores reported in the original paper as we present different and more difficult inputs, only pre-pending instructions to the inputs while ITERER and DELITERATER were trained with task-specific tags. Furthermore, they were trained using BART and Pegasus, respectively, both of which have a summarization pre-training objective, and were not trained to follow instructions. On average, COEDIT beats PEER across all reported evaluations except the ITERATER benchmark. This can primarily be attributed to the difference in task-specific fine-tuning since PEER uses Wikipedia as the source of instructional edit data. + +# 5.2 Ablation Studies + +Table 3 shows the performance of various baselines, which we discuss in detail in this section. + +Instruction Tuning. To understand the effectiveness of instruction-tuning, we fine-tune the 3B pa + +
ModelSizeOverallIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
(a)COPY-27.629.826.7 / 40.520.730.817.6 / 10.631.85 / 047.4 / 100
T5-LARGE770M24.721.132.7 / 22.935.828.0130.9 / 4.8913.2 / 027.6 / 62.8
(b)TO*3B29.726.142.2 / 36.133.232.437.9 / 39.319.4 / 028.3 / 84.1
Tk-INSTRUCT*3B27.321.035.2 / 26.836.928.935.7 / 43.0124.2 / 0.120.4 / 48.9
T0++*11B32.631.539.4 / 40.533.135.536.8 / 43.721.2 / 042.9 / 94.9
(c)LLAMA7B28.230.127.7 / 3.3421.831.118.8 / 89.131.9 / 05.29 / 64.2
GPT3175B27.423.338.1 / 2.834.826.236.6 / 87.923.4 / 00 / 51.7
(d)ALPACA7B28.430.428.5 / 6.422.031.118.9 / 94.431.9 / 00 / 77.9
GPT3-EDIT175B41.836.152.4 / 50.632.954.035.7 / 52.350.7 / 17.122.6 / 98.7
INSTRUCTGPT175B41.632.662.4 / 57.244.647.447.8 / 98.233.7 / 0.116.03 / 98.9
CHATGPT-36.928.257.6 / 49.445.940.240.7 / 99.628.5 / 0.113.4 / 99.0
(e)ALPACA (FS)7B30.030.833.03 / 11.323.233.120.6 / 95.432.04 / 00.1 / 66.7
GPT3 (FS)175B38.432.450.1 / 4.139.245.143.1 / 97.236.7 / 00 / 14.5
INSTRUCTGPT (FS)175B45.136.264.5 / 55.746.355.247.3 / 98.842.8 / 015.9 / 99.5
CHATGPT (FS)-40.130.858 / 50.645.451.242.3 / 99.634.1 / 013.3 / 96.1
(f)ITERATER570M31.032.835.9 / 34.321.830.122.7 / 54.134.2 / 040.5 / 97.8
DELITERATER570M28.029.927.5 / 31.221.232.218.1 / 57.831.9 / 039.1 / 100
PEER-3B*3B41.737.155.5 / 54.330.5--53.3 / 21.6-
PEER-11B*11B42.137.855.8 / 54.329.5--54.5 / 22.8-
(g)CoEdit-L770M49.835.262.4 / 59.342.475.354.6 / 98.069.3 / 46.423.3 / 99.1
CoEdit-XL3B51.436.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
CoEdit-XXL11B51.537.165.0 / 61.541.778.655.1 / 97.271.0 / 51.421.8 / 99.0
+ +Table 2: Comparison of CoEDIT against various baselines: (a) copy baseline and T5-LARGE baseline with task-specific prefixes (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs (zero-shot), (d) Instruction-tuned LLMs (zero-shot), (e) Few-shot evaluations of pre-trained LLMs, (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first score for each task (excluding MRPC style task) is SARI. The second scores for Fluency, GYAFC, and WNC are GLEU, Formality Transfer accuracy (%), and EM. For MRPC, the first score is Self-BLEU, while the second score is semantic similarity. The best-performing models7 for each dataset are highlighted in boxes. Results with (*) are ones reported in prior works. (FS) denotes few-shot evaluation. Results on other datasets are in Table 11. + +
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER↑JFLEG↑ASSET↑DiscoFuse-Wiki↑GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
CoEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
(a) T5-XL (prefix)3B34.361.8 / 58.641.071.450.7 / 94.662.7 / 3330.6 / 87.4
(b) FLANT5-XL3B30.228.3 / 41.325.537.925.0 / 27.833.5 / 0.046.6 / 92.5
(c) CoEDIT-XL-R3B33.963.8 / 60.236.269.752.6 / 48.769.2 / 25.435.4 / 92.6
+ +Table 3: Ablation results for CoEdit to evaluate the impact of (a) instruction tuning (b) task-specific training, and (c) quality of instructions. The scores from left to right follow exactly as Table 2. + +rameter T5 model (T5-XL) and compare it with CoEDIT-XL, its FLANT5 counterpart on the same training and validation sets. The only change is that the instructional prompts for the training datasets are replaced by task-specific prefixes. Specifically, the $82k$ pairs in the training dataset used to train the CoEDIT models were modified to . We observe (Table 3(a)) that the instruction-tuned CoEDIT models consistently outperform prefix-tuned T5 models, showing the ef + +fectiveness of instruction-tuning over prefix-tuning. + +Task-Specific Training. A core contribution of this work is to push the performance of small- (<1B parameters) to medium-sized (1-10B parameters) LLMs for common text editing tasks. This drives the need for fine-tuning on task-specific datasets. The impact of this task-specific data augmentation for text editing tasks has already been shown in Kim et al. (2022). For this work, we compare our task-specific fine-tuned models against their FLANT5 un-tuned counterparts referred to as FLANT5-XL (Table 3(b)). We see a substantial gap + +
COEDIT-xLGPT3-EditTieNeither
64%10%4%22%
+ +between the two for all datasets and model sizes, thus, confirming prior findings. + +Quality of Instructions. While we developed with a limited set of task-specific instructional prompts, there has been widespread work on the prompt sensitivity of LLMs, especially with growing model capacity (Lu et al., 2022). To assess the robustness of CoEDIT models on instructional prompts, we train another baseline CoEDIT-xL model with randomized task-specific instructions (henceforth referred to as CoEDIT-xL-R). Specifically, the entire training dataset was randomized, where an instruction from one task was replaced randomly by an instruction from another task. Table 3(c) shows the results for this experiment. We observe that while CoEDIT-xL-R achieves scores that are higher than the non-task-specific tuned FLANT5-xL (especially on edit-based metrics such as SARI), it significantly falls behind CoEDIT-xL on those, as well as on the style accuracy metrics such as formality transfer accuracy and paraphrasing semantic similarity. This indicates that while the instructional structure of the inputs and task-specific training makes the model learn how to make edits (which drives up the SARI scores), however, the accuracy of those edits suffers since they are trained with the wrong instructions most of the time. Overall, the improvements highlight the positive impact of task-specific training, and the gaps in performance highlight the negative impact of lack of proper instruction tuning. + +# 6 Qualitative Results + +We now address RQ2 and RQ3 (Section 4). We show that CoEDIT shows generalization abilities to adjacent tasks not seen during fine-tuning and can generalize to composite instructions containing a combination of tasks. Further, our human evaluation studies show that expert human evaluators find the text generated by CoEDIT to be of higher quality than a much larger instruction-tuned LLM. + +Table 4: Human evaluation results: Pair-wise comparison of CoEDIT-XL against the best-performing 175B-parameter instruction-tuned LLM for text editing (GPT3-EDIT). Scores indicate the % of test inputs for which the human annotators preferred the said model. + +
ModelSentence CompressionPoliteness Transfer
SARI†/ CR(%)†S-BLEU‡/ TA(%)†
GPT3-EDIT23.98 / 6.0963.31 / 63.11
T5-xL (prefix)31.47 / 7.6681.43 / 58.82
FLANT5-XL33.21 / 15.2991.91 / 52.69
CoEdit-XL35.17 / 22.7860.32 / 64.45
+ +Table 5: Comparison of CoEDIT-xL against the best-performing non-instruction-tuned model (T5-xL), nontask-specific-tuned model (FLANT5-xL) and GPT3-EDIT on out-of-domain generalization. + +# 6.1 Text Editing Quality + +Since text editing is often subjective, and automatic metrics are not always accurate in measuring if an instruction is satisfied, we conduct human evaluations for our model outputs by linguistic experts on 50 test inputs to ensure they meet the instructional constraints. Given the automatic evaluation results in Section 5, we compare our 3B-parameter CoEDIT-XL model against the largest comparable 175B instruction-tuned LLM for text editing GPT3-EDIT. Specifically, we conducted a pairwise comparison: each annotator was shown an instructional input and outputs from both models (they were not aware which output was generated by which model). They were then asked to evaluate the fluency, accuracy, and meaning preservation of the edited texts and choose the higher-quality output ("neither" and "tie" are also valid options). We collect three annotations for each question and use the majority vote as the final judgment. + +Table 4 shows the results of the evaluation. The annotators prefer our CoEdit model for $64\%$ of the inputs, whereas, for $10\%$ of the inputs, GPT3-EDIT's output is preferred. In $4\%$ cases, both models produce equally good outputs, whereas, for $22\%$ of the inputs, both models generate unacceptable outputs. Table 12 provides a side-by-side comparison of the outputs generated by the two models. + +# 6.2 Generalizability to Adjacent Tasks + +We analyze the generalization capabilities of our models by evaluating them on a few related tasks that do not exist in the fine-tuning data. Specifically, we chose two standard NLP tasks – sentence compression (SC) (Filippova and Altun, 2013) and politeness transfer (PT) (Madaan and Yang, 2021). It is noteworthy that while our models were not fine-tuned on these exact tasks, we chose them so that the models could still comprehend them based + +
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
COEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
COEDIT-XL-C3B36.565.1 / 61.342.074.855.9 / 97.269.7 / 48.520.7 / 98.8
+ +Table 6: Results for composite prompt training on single-task performance. Scores follow exactly as Table 2. + +
CoEDIT-xL-CGPT3-EditTieNeither
38%34%3%25%
CoEDIT-xL-CCoEDIT-xLTieNeither
34%21%14%31%
+ +Table 7: Human evaluation results: Pair-wise comparison of CoEDIT-XL-C against GPT3-EDIT and equivalent CoEDIT-XL (with chaining pipeline). Human annotators preferred the said model for % of test inputs. + +on other tasks they were fine-tuned on. We define them as being adjacent tasks, which still exist within the scope of existing tasks but have not been seen during fine-tuning (blue lines in Fig. 2). + +Similar to the previous experiment, in addition to GPT3-EDIT, we compare COEDIT-XL against the similarly-sized prefix-tuned (T5-XL) model and the non-task-specific trained FLANT5-XL model (same models as the ones used in Table 3 (a) and (b)). For evaluation, we curated a set of new instructional prompts geared towards both the new tasks (details in Appendix C). We evaluated the models on the respective test datasets from Filippova and Altun (2013) and Madaan and Yang (2021). + +Table 5 shows the results of CoEDIT-XL against various models on the sentence compression and politeness transfer tasks. For SC, we report the SARI metric for rewrite quality and compression ratio (CR) for task-specific quality. For PT, we report Self-BLEU (Zhu et al., 2018) for the rewrite quality and Transfer Accuracy (TA) for the task-specific quality. We observe that CoEDIT consistently outperforms other models on both tasks, which indicates its generalization abilities on these new and unseen adjacent tasks. It is noteworthy that GPT3-EDIT performs quite well out-of-the-box on PT, but not so much on the SC task. + +# 6.3 Generalizability to Composite Instructions + +Finally, we also explore the capability of our model to understand composite natural language instruc + +tions. Composite instructions are made up of a combination of tasks. For example, for the composite instruction, "Make the text simpler, paraphrase it, and make it formal", the model needs to simultaneously perform simplification, paraphrasing and formalization of the input sentence. + +Since there is no publicly available dataset for composite instructions, we create the CoEDIT-COMPOSITE dataset by expanding the CoEDIT dataset to a total of 90k pairs. In addition to the single-task instructions, we use seven new combinations of instructions as part of our training set, with each composite instruction having either two or three tasks. Specifically, these are GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification, Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification, and Paraphrasing-Simplification (more details in §A). We then fine-tune the FLANT5-xL model on CoEDIT-COMPOSITE (referred as CoEDIT-XL-C). The training details are summarized in §D. + +We evaluate CoEDIT-XL-C on both single and composite instructions. For the single instructions, we use the same evaluation setup as in Table 2 and find that the overall performance of CoEDIT-XL-C is on par with that of CoEDIT-XL (Table 6). This shows that training the model additionally on composite prompts has no negative impact on single-task performance. + +For composite instructions, we conduct human evaluations since there is no standard test dataset available. We use three new task combinations in addition to the seven seen during training to evaluate the model's generalizability. These are Coherence-Paraphrase, Coherence-Simplify, and Coherence-Simplify-Paraphrase. Specifically, we conduct two sets of pairwise annotations (similar setup as the one in Section 6.1) comparing CoEDIT-xL-C with GPT3-Edit and CoEDIT-XL (shown in Table 7) on 30 composite instructions. For a fair comparison against CoEDIT-xL, we pre + +pare a chaining pipeline $^{10}$ by decomposing composite instructions into a sequence of multiple single instructions and executing them one-by-one. In $38\%$ of cases, experts show a preference for CoEDIT-XL-C, compared to $34\%$ for GPT3-EDIT. In $3\%$ cases, both models are preferred equally, whereas, for $25\%$ of the cases, none of them are preferred. The experts prefer CoEDIT-XL-C for $34\%$ of the cases versus $21\%$ for the chaining baseline. Both outputs are preferred equally in $14\%$ cases, whereas, for $31\%$ of the cases, both models generate unacceptable predictions. Table 13 provides a side-by-side comparison of outputs generated by these models. + +# 7 Conclusions + +We present CoEdit – an open-sourced dataset and set of instruction-tuned large language models that can act as a writing assistant by following natural language instructions to perform various textual edits by removing, updating, or adding words, phrases, and sentences. CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, spanning syntactic, semantic, and stylistic edit requirements. Through extensive experiments, we have shown that CoEdit is capable of further generalizing to unseen, adjacent, and composite instructions to perform edits along multiple dimensions in a single turn. In our human evaluations, we observe that CoEdit can assist writers with various aspects of the text revision process at scale by following natural language instructions. + +# Limitations + +Although CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, we acknowledge some limitations to our approach and evaluation methods. Our task-specific fine-tuning (like most other works) mainly focuses on sentence-level editing tasks, and its effectiveness on much longer sequences of texts that are more appropriate to real-world editing settings remains to be seen. Additionally, our system mainly focuses on nonmeaning-changing text edits, thus, which could potentially limit the utility of our model to more real-world scenarios where fact-based editing or corrections are needed. Another limitation of our + +work involves prompt sensitivity. While we construct our inputs by randomly choosing from a pool of verbalizers for every task, we acknowledge that different prompts may induce better or worse edits, and as we evaluate each input with a random verbalizer, a fully controlled comparison for each available prompt across all models is not done. Furthermore, the prompting format was kept uniform across all evaluated models, whereas some models may perform better with a different prompting format. We plan to address this in future work. Finally, computing resource requirements could pose some difficulty in replicating the results (which we try to address by sharing our models publicly). + +# Ethics Statement + +Since our work mainly focuses on non-meaning-changing text edits, we are able to avoid many issues involving generating harmful text. Although, there is still a possibility of small meaning changes for stylistic tasks, we try to reduce the chance of hallucinations by constraining the generation to strictly edit tasks in order to reduce the chance of adding any new information, or perpetuating biases. + +# Acknowledgements + +We sincerely thank Alice Kaiser-Schatzlein, Robyn Perry, Maya Barzilai, and Claudia Leacock for providing their invaluable linguistic expertise and insightful feedback with the evaluations. We also thank Max Gubin, Leonardo Neves, and Vivek Kulkarni for their helpful suggestions. + +# References + +Fernando Alva-Manchego, Louis Martin, Antoine Bordes, Carolina Scarton, Benoit Sagot, and Lucia Specia. 2020. ASSET: A dataset for tuning and evaluation of sentence simplification models with multiple rewriting transformations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4668-4679, Online. Association for Computational Linguistics. +Vamsi Aribandi, Yi Tay, Tal Schuster, Jinfeng Rao, Huaixiu Steven Zheng, Sanket Vaibhav Mehta, Honglei Zhuang, Vinh Q. Tran, Dara Bahri, Jianmo Ni, Jai Gupta, Kai Hui, Sebastian Ruder, and Donald Metzler. 2022. Ext5: Towards extreme multi-task scaling for transfer learning. In International Conference on Learning Representations. +Stephen Bach, Victor Sanh, Zheng Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht + +Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-david, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Fries, Maged Alshaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Dragomir Radev, Mike Tian-jian Jiang, and Alexander Rush. 2022. Prompt-Source: An integrated development environment and repository for natural language prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 93-104, Dublin, Ireland. Association for Computational Linguistics. + +Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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. + +Christopher Bryant, Mariano Felice, Øistein E. Andersen, and Ted Briscoe. 2019. The BEA-2019 shared task on grammatical error correction. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 52-75, Florence, Italy. Association for Computational Linguistics. + +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. + +Jishnu Ray Chowdhury, Yong Zhuang, and Shuyi Wang. 2022. Novelty controlled paraphrase generation with retrieval augmented conditional prompt tuning. Proceedings of the AAAI Conference on Artificial Intelligence, 36(10):10535-10544. + +Hyung Won Chung, Le Hou, S. Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Wei Yu, Vincent Zhao, Yanping Huang, Andrew M. Dai, Hongkun Yu, Slav Petrov, Ed Huai hsin Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc Le, and Jason Wei. 2022a. Scaling instructionfinetuned language models. ArXiv, abs/2210.11416. + +Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, + +Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. 2022b. Scaling instruction-finetuned language models. + +Allan Collins and Dedre Gentner. 1980. A framework for a cognitive theory of writing. In Cognitive processes in writing, pages 51-72. Erlbaum. + +Daniel Dahlmeier, Hwee Tou Ng, and Siew Mei Wu. 2013. Building a large annotated corpus of learner English: The NUS corpus of learner English. In Proceedings of the Eighth Workshop on Innovative Use of NLP for Building Educational Applications, pages 22-31, Atlanta, Georgia. Association for Computational Linguistics. + +William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005). + +Wanyu Du, Zae Myung Kim, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022a. Read, revise, repeat: A system demonstration for human-in-the-loop iterative text revision. In Proceedings of the First Workshop on Intelligent and Interactive Writing Assistants (In2Writing 2022), pages 96-108, Dublin, Ireland. Association for Computational Linguistics. + +Wanyu Du, Vipul Raheja, Dhruv Kumar, Zae Myung Kim, Melissa Lopez, and Dongyeop Kang. 2022b. Understanding iterative revision from human-written text. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3573-3590, Dublin, Ireland. Association for Computational Linguistics. + +Yupei Du, Qi Zheng, Yuanbin Wu, Man Lan, Yan Yang, and Meirong Ma. 2022c. Understanding gender bias in knowledge base embeddings. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1381-1395, Dublin, Ireland. Association for Computational Linguistics. + +Jane Dwivedi-Yu, Timo Schick, Zhengbao Jiang, Maria Lomeli, Patrick Lewis, Gautier Izacard, Edouard Grave, Sebastian Riedel, and Fabio Petroni. 2022. Editeval: An instruction-based benchmark for text improvements. arXiv. + +Felix Faltings, Michel Galley, Gerald Hintz, Chris Brockett, Chris Quirk, Jianfeng Gao, and Bill Dolan. 2021. Text editing by command. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5259-5274, Online. Association for Computational Linguistics. + +Tao Fang, Shu Yang, Kaixin Lan, Derek F. Wong, Jinpeng Hu, Lidia S. Chao, and Yue Zhang. 2023. Is chatgpt a highly fluent grammatical error correction system? a comprehensive evaluation. +Katja Filippova and Yasemin Altun. 2013. Overcoming the lack of parallel data in sentence compression. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1481-1491, Seattle, Washington, USA. Association for Computational Linguistics. +Linda Flower. 1980. The dynamics of composing: Making plans and juggling constraints. Cognitive processes in writing, pages 31-50. +Mor Geva, Eric Malmi, Idan Szpektor, and Jonathan Berant. 2019. DiscoFuse: A large-scale dataset for discourse-based sentence fusion. 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 3443-3455, Minneapolis, Minnesota. Association for Computational Linguistics. +J. Edward Hu, Abhinav Singh, Nils Holzenberger, Matt Post, and Benjamin Van Durme. 2019. Large-scale, diverse, paraphrastic bittexts via sampling and clustering. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pages 44-54, Hong Kong, China. Association for Computational Linguistics. +Srinivasan Iyer, Xi Victoria Lin, Ramakanth Pasunuru, Todor Mihaylov, Daniel Simig, Ping Yu, Kurt Shuster, Tianlu Wang, Qing Liu, Punit Singh Koura, et al. 2022. Opt-ilm: Scaling language model instruction meta learning through the lens of generalization. arXiv preprint arXiv:2212.12017. +Chao Jiang, Mounica Maddela, Wuwei Lan, Yang Zhong, and Wei Xu. 2020. Neural CRF model for sentence alignment in text simplification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7943-7960, Online. Association for Computational Linguistics. +David Kauchak. 2013. Improving text simplification language modeling using unsimplified text data. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1537-1546, Sofia, Bulgaria. Association for Computational Linguistics. +Zae Myung Kim, Wanyu Du, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022. Improving iterative text revision by learning where to edit from other revision tasks. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9986-9999, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. +Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on + +Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. +Haokun Liu, Derek Tam, Muqeeth Mohammed, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. In Advances in Neural Information Processing Systems. +Shayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V Le, Barret Zoph, Jason Wei, et al. 2023. The flan collection: Designing data and methods for effective instruction tuning. arXiv preprint arXiv:2301.13688. +Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086-8098, Dublin, Ireland. Association for Computational Linguistics. +Aman Madaan and Yiming Yang. 2021. Neural language modeling for contextualized temporal graph generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 864-881, Online. Association for Computational Linguistics. +Jonathan Mallinson, Jakub Adamek, Eric Malmi, and Aliaksei Severyn. 2022. EdiT5: Semi-autoregressive text editing with t5 warm-start. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 2126-2138, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. +Swaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. 2022. Cross-task generalization via natural language crowdsourcing instructions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3470-3487, Dublin, Ireland. Association for Computational Linguistics. +Courtney Naples, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2015. Ground truth for grammatical error correction metrics. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 588-593, Beijing, China. Association for Computational Linguistics. +Courtney Naples, Keisuke Sakaguchi, and Joel Tetreault. 2017. JFLEG: A fluency corpus and benchmark for grammatical error correction. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 229-234, Valencia, Spain. Association for Computational Linguistics. + +Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Gray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022a. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems. +Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F Christiano, Jan Leike, and Ryan Lowe. 2022b. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pages 27730-27744. Curran Associates, Inc. +Reid Pryzant, Richard Diehl Martinez, Nathan Dass, Sadao Kurohashi, Dan Jurafsky, and Diyi Yang. 2020. Automatically neutralizing subjective bias in text. Proceedings of the AAAI Conference on Artificial Intelligence, 34(01):480-489. +Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020a. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67. +Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020b. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(1). +Sudha Rao and Joel Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. 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 129-140, New Orleans, Louisiana. Association for Computational Linguistics. +Jeff Rasley, Samyam Rajbhandari, Olatunj Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD '20, page 3505-3506, New York, NY, USA. Association for Computing Machinery. +Machel Reid and Graham Neubig. 2022. Learning to model editing processes. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 3822-3832, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. + +Emily Reif, Daphne Ippolito, Ann Yuan, Andy Coenen, Chris Callison-Burch, and Jason Wei. 2022. A recipe for arbitrary text style transfer with large language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 837-848, Dublin, Ireland. Association for Computational Linguistics. +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, Hong Kong, China. Association for Computational Linguistics. +Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le Scao, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander M Rush. 2022. Multitask prompted training enables zero-shot task generalization. In International Conference on Learning Representations. +Timo Schick, Jane A. Yu, Zhengbao Jiang, Fabio Petroni, Patrick Lewis, Gautier Izacard, Qingfei You, Christoforos Nalmpantis, Edouard Grave, and Sebastian Riedel. 2023. PEER: A collaborative language model. In International Conference on Learning Representations. +Sanja Šajner, Kim Cheng Sheang, and Horacio Saggion. 2022. Sentence simplification capabilities of transfer-based models. Proceedings of the AAAI Conference on Artificial Intelligence, 36(11):12172-12180. +Toshikazu Tajiri, Mamoru Komachi, and Yuji Matsumoto. 2012. Tense and aspect error correction for ESL learners using global context. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 198-202, Jeju Island, Korea. Association for Computational Linguistics. +Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca. +Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models. + +Marie M. Vaughan and David D. McDonald. 1986. A model of revision in natural language generation. In 24th Annual Meeting of the Association for Computational Linguistics, pages 90-96, New York, New York, USA. Association for Computational Linguistics. +Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Atharva Naik, Arjun Ashok, Arut Selvan Dhanasekaran, Anjana Arunkumar, David Stap, Eshaan Pathak, 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. +Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V Le. 2022. Finetuned language models are zero-shot learners. In International Conference on Learning Representations. +Kristian Woodsend and Mirella Lapata. 2011. Learning to simplify sentences with quasi-synchronous grammar and integer programming. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 409-420, Edinburgh, Scotland, UK. Association for Computational Linguistics. +Haoran Wu, Wenxuan Wang, Yuxuan Wan, Wenxiang Jiao, and Michael Lyu. 2023. Chatgpt or grammarly? evaluating chatgpt on grammatical error correction benchmark. +Wei Xu, Chris Callison-Burch, and Courtney Naples. 2015. Problems in current text simplification research: New data can help. Transactions of the Association for Computational Linguistics, 3:283-297. +Wei Xu, Courtney Naples, Ellie Pavlick, Quanze Chen, and Chris Callison-Burch. 2016. Optimizing statistical machine translation for text simplification. Transactions of the Association for Computational Linguistics, 4:401-415. +Xingxing Zhang and Mirella Lapata. 2017. Sentence simplification with deep reinforcement learning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 584-594, Copenhagen, Denmark. Association for Computational Linguistics. +Yaoming Zhu, Sidi Lu, Lei Zheng, Jiaxian Guo, Weinan Zhang, Jun Wang, and Yong Yu. 2018. Texygen: A + +benchmarking platform for text generation models. In The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, SIGIR '18, page 1097-1100, New York, NY, USA. Association for Computing Machinery. +Zhemin Zhu, Delphine Bernhard, and Iryna Gurevych. 2010. A monolingual tree-based translation model for sentence simplification. In Proceedings of the 23rd International Conference on Computational Linguistics (Coling 2010), pages 1353-1361, Beijing, China. Coling 2010 Organizing Committee. + +# A Training Dataset Description + +In this section, we discuss the details of the datasets used to create our training datasets and also expand on the dataset creation pipeline. For both CoEDIT and CoEDIT-COMPOSITE, we use the following datasets: + +Fluency: We use three prominent corpora for GEC: the NUS Corpus of Learner English (NUCLE) (Dahlmeier et al., 2013), the W&I-LOCNESS (Bryant et al., 2019), and the NAIST LANG-8 Corpus of Learner English (Tajiri et al., 2012), which is one of the largest and most widely used datasets for GEC. + +Clarity: We split Clarity into two sub-tasks, one focused on Text Simplification, and the other category focused on the set of edits outside of Simplification. In total, we use five corpora for Clarity tasks: Four of them - the NEWSELA corpus (Xu et al., 2015), WIKILARGE (Zhu et al., 2010; Woodsend and Lapata, 2011; Kauchak, 2013), WIKIAUTO (Jiang et al., 2020) and a subset from PARABANKV2 corpus (Hu et al., 2019) focus on text simplification, and the last one comes from the Clarity split of ITER (Du et al., 2022b). + +Coherence: We use the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives. + +Style: Owing to the subjective nature of STYLE edits based on different sub-intentions (eg. conveying writers' writing preferences, including emotions, tone, and voice, etc.). We use the following datasets for making different stylistic edits to reflect those distinctions: + +- Formality: We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018) which is a parallel corpus of informal and formal sentence pairs from two different domains. + +- Neutralization: We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task, where the objective is to remove or mitigate biased words to make sentences more neutral; +- Paraphrasing: For paraphrase generation, we used the PARABANKV2 corpus (Hu et al., 2019), since it is a large-scale corpus that contains multiple diverse sentential paraphrases. + +Once the raw datasets were collected, we randomly sampled them to the quantities mentioned in Table 1 based on a few heuristics such as old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. The sampled pairs were then modified by prefixing the source texts with task-specific verbalizers (Appendix C) to convert a pair to a pair. All our models were then fine-tuned on the verbalized dataset. + +Composite instructions: Table 8 shows the composition of the COEDIT-COMPOSITE dataset, in addition to the details about datasets and prompts. We use seven such composite instructions during model training. For the first three composite prompts (GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification), we use GEC datasets to extract datapoints that show simplification and paraphrasing edits in addition to GEC. For the next three prompts (Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification), we use the formality dataset (GYAFC) to extract pairs which exhibit paraphrasing and simplification edits in addition to formality. Lastly, for the last prompt (Paraphrasing-Simplification), we use the ParabankV2 paraphrasing dataset to extract data points which show a simplification of the source text in addition to paraphrasing. + +To select the appropriate source-target pairs for a composite instruction, we use similar heuristics as with single-task instructions, i.e. old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. For example, a source-target pair from a GEC dataset can be used for the composite instruction involving GEC, paraphrasing and simplification if the target and source sentence has a high edit distance and low complexity ratio, character length and word retention scores. The exact details can be found in the code. + +Finally, for building the prompts for the composite instructions, we randomly sample from the + +task-specific verbalizers and concatenate them. The ordering of the single tasks in a composite instruction is also chosen randomly to ensure better generalization. + +# B Testing Dataset Description + +Specifically, we consider the following datasets: + +Grammatical Error Correction We use the JF-LEG (Napoles et al., 2017) corpus of English sentences that represents a range of language proficiency levels and comprehensive fluency edits. For evaluation, we use the GLEU (Napoles et al., 2015) score as the primary metric and also report results using the SARI (Xu et al., 2016) metric. + +Text Simplification We use the TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) datasets, which were both created from WikiLarge data (Zhang and Lapata, 2017), where each complex sentence consists of multiple crowdsourced reference simplifications. We report results using the SARI metric. + +Coherence We use the Coherence split of ITER (Du et al., 2022b), and the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives. We report results using the SARI metric. + +Iterative Text Editing We use ITERER (Du et al., 2022b), an iterative text revision dataset spanning five edit intentions (Section 3) across three different domains (ArXiv, News, Wikipedia). We evaluate our models using the SARI metric. We report the performance on individual intentions - Fluency, Clarity, and Coherence, and also aggregated scores on the full dataset, which includes Style edits. + +The rest of the section describes the evaluation setups for Style-related edits: + +Formality Style Transfer We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018), a parallel corpus of informal and formal sentence pairs from two different domains. Similar to prior works, we evaluate the quality of rewriting using SARI, and the accuracy of style transfer using a formality classification model11. + +
Edit IntentionDatasetsSizeExample InputExample Output
GEC-PARAPHRASENUCLE-14 Lang-8 BEA-191kFix grammar in this sentence, and rewrite this sentence: How about taking account of psychology?One such perspective is to take psychology into account.
GEC-SIMPLIFYNUCLE-14 Lang-8 BEA-191kMake this easier to understand, and remove grammatical mistakes: So it was not like enjoying the tasteful gardens.So it was not as if I could enjoy the pretty gardens.
GEC-PARAPHRASE-SIMPLIFYNUCLE-14 Lang-8 BEA-191kRewrite this sentence, change to simpler wording, and fix the grammar mistakes: Due to ageing, some of the people may suffer from physical and mental depreciation.Due to the effects of aging, some people may suffer.
FORMALITY-PARAPHRASEGYAFC5kMake this sound more formal, and paraphrase: writers dont think about what they will write, they just write!!!Some writers can write freely without putting too much thought to it.
FORMALITY-SIMPLIFYGYAFC2kRewrite more formally, and make this text less complex: Not to my knowledge...I'm a little curious myself now though.I do not think so.
FORMALITY-PARAPHRASE-SIMPLIFYGYAFC4kRewrite the sentence to be simpler, make this sound more formal, and paraphrase this sentence: my answer is what...very clever riddle!!Your riddle was very clever, and I am unsure how to re-spond.
PARAPHRASE-SIMPLIFYParabankV25kUse simpler wording, and write a paraphrased version of the sentence: In your second communication, you requested reinforcements.You asked for backup in your second report
+ +Table 8: Example data instances with composite instructions in the COEDIT-COMPOSITE dataset (90K pairs). Instructional prompts in the inputs are italicized. + +Neutralization We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task. Based on prior works, we use Exact-Match (EM) for evaluations, which is the percentage of examples for which the edited text exactly matches the reference(s). + +Paraphrasing We use the widely-used Microsoft Research Paraphrase Corpus (MRPC) (Dolan and Brockett, 2005), the STS benchmark from SemEval-2017 (STS) (Cer et al., 2017), and the Quora Question Pairs $^{12}$ (QQP) datasets. We evaluate paraphrasing on two criteria and metrics: Self-BLEU (Zhu et al., 2018) to measure the diversity of the paraphrases relative to the given source and ref + +erence texts, and Semantic Similarity13 to measure meaning preservation. + +# C Task Verbalizers + +We manually curated a variety of task-specific verbalizers to construct the instructional inputs. Table 9 shows the full list of the verbalizers used for training and evaluations. Table 10 shows the verbalizers used for the experiments conducted in Section 6.2. + +# D Training Details + +We used the Adam optimizer with a learning rate of $1e - 4$ . Each model is trained for 5 epochs + +
Edit Intention / TaskVerbalizers
GECFix grammar, Fix grammar in this sentence, Fix grammar in the sentence, Fix grammar errors, Fix grammatical errors, Fix grammaticality, Fix all grammatical errors, Fix grammatical errors in this sentence, Fix grammar errors in this sentence, Fix grammatical mistakes in this sentence, Fix grammaticality in this sentence, Fix grammaticality of the sentence, Fix disfluencies in the sentence, Make the sentence grammatical, Make the sentence fluent, Fix errors in this text, Update to remove grammar errors, Remove all grammatical errors from this text, Improve the grammar of this text, Improve the grammaticality, Improve the grammaticality of this text, Improve the grammaticality of this sentence, Grammar improvements, Remove grammar mistakes, Remove grammatical mistakes, Fix the grammar mistakes, Fix grammatical mistakes
ClarityClarify the sentence, Clarify this sentence, Clarify this text, Write a clearer version for the sentence, Write a clarified version of the sentence, Write a readable version of the sentence, Write a better readable version of the sentence, Rewrite the sentence more clearly, Rewrite this sentence clearly, Rewrite this sentence for clarity, Rewrite this sentence for readability, Improve this sentence for readability, Make this sentence better readable, Make this sentence more readable, Make this sentence readable, Make the sentence clear, Make the sentence clearer, Clarify, Make the text more understandable, Make this easier to read, Clarification, Change to clearer wording, Clarify this paragraph, Use clearer wording
SimplificationSimplify the sentence, Simplify this sentence, Simplify this text, Write a simpler version for the sentence, Rewrite the sentence to be simpler, Rewrite this sentence in a simpler manner, Rewrite this sentence for simplicity, Rewrite this with simpler wording, Make the sentence simple, Make the sentence simpler, Make this text less complex, Make this simpler, Simplify, Simplification, Change to simpler wording, Simplify this paragraph, Simplify this text, Use simpler wording, Make this easier to understand
CoherenceFix coherence, Fix coherence in this sentence, Fix coherence in the sentence, Fix coherence in this text, Fix coherence in the text, Fix coherence errors, Fix sentence flow, Fix sentence transition, Fix coherence errors in this sentence, Fix coherence mistakes in this sentence, Fix coherence in this sentence, Fix coherence of the sentence, Fix lack of coherence in the sentence, Make the text more coherent, Make the text coherent, Make the text more cohesive, logically linked and consistent as a whole, Make the text more cohesive, Improve the cohesiveness of the text, Make the text more logical, Make the text more consistent, Improve the consistency of the text, Make the text clearer, Improve the coherence of the text
Formality Style TransferFormalize, Improve formality, Formalize the sentence, Formalize this sentence, Formalize the text, Formalize this text, Make this formal, Make this more formal, Make this sound more formal, Make the sentence formal, Make the sentence more formal, Make the sentence sound more formal, Write more formally, Write less informally, Rewrite more formally, Write this more formally, Rewrite this more formally, Write in a formal manner, Write in a more formal manner, Rewrite in a more formal manner
NeutralizationRemove POV, Remove POVs, Remove POV in this text, Remove POVs in this text, Neutralize this text, Neutralize the text, Neutralize this sentence, Neutralize the sentence, Make this more neutral, Make this text more neutral, Make this sentence more neutral, Make this paragraph more neutral, Remove unsourced opinions, Remove unsourced opinions from this text, Remove non-neutral POVs, Remove non-neutral POV, Remove non-neutral points of view, Remove points of view, Make this text less biased
ParaphrasingParaphrase the sentence, Paraphrase this sentence, Paraphrase this text, Paraphrase, Write a paraphrase for the sentence, Write a paraphrased version of the sentence, Rewrite the sentence with different wording, Use different wording, Rewrite this sentence, Reward this sentence, Rephrase this sentence, Rewrite this text, Reward this text, Rephrase this text
+ +Table 9: Complete list of task-specific verbalizers used in our training and test datasets. + +
Edit Intention / TaskVerbalizers
Sentence Com-pressionShorten the sentence, Shorten this sentence, Compress this sentence, Shorten this text, Compress this text, Write a shorter version for the sentence, Rewrite the sentence to be shorter, Rewrite this sentence in a shorter manner, Rewrite this sentence for shorter length, Make the sentence short, Make the sentence shorter, Make this shorter, Shorten, Compress, Shorten this paragraph, Shorten this text
PolitenessIncrease politeness, Make this polite, Make this more polite, Make this sound more polite, Make the sentence polite, Make the sentence more polite, Make the sentence sound more polite, Write more politely, Rewrite more politely, Write this more politely, Rewrite this more politely, Write in a polite manner, Write in a more polite manner, Rewrite in a more polite manner
+ +Table 10: List of task-specific verbalizers used for generalizability experiments. + +
ModelSizeIteraTeRClarityCoherenceStyle (Paraphrasing)
ITERATER-FLU†ITERATER-CLA†ITERATER-COH†TURK†DiscoFuse-Sport†STS(↓/↑)QQP(↓/↑)
(a)COPY-31.928.630.826.330.539.6 / 10030.1 / 100
T5-LARGE770M15.123.821.734.228.418.0 / 50.518.2 / 62.5
(b)TO*3B27.128.021.234.833.627.7 / 88.710.2 / 63.4
Tk-INSTRUCT*3B22.320.921.232.329.112.3 / 49.519.1 / 79.6
T0++*11B37.930.227.534.135.129.9 / 99.016.6 / 79.1
(c)LLAMA7B32.428.831.427.230.81.4 / 14.41.5 / 35.8
GPT3175B20.921.821.234.627.00 / 8.20 / 13.1
(d)ALPACA7B33.028.931.027.430.80 / 25.80 / 64.4
CHATGPT-36.423.131.437.439.17.9 / 96.98.17 / 96.5
INSTRUCTGPT175B43.728.133.938.945.811.6 / 88.79.3 / 95.5
GPT3-EDIT176B48.331.834.234.748.014.0 / 86.66.4 / 94.5
(e)ALPACA (FS)7B33.028.931.028.432.10 / 39.20 / 63.4
GPT3 (FS)175B33.930.833.938.746.40 / 2.10 / 5.9
CHATGPT (FS)-36.227.035.637.349.40 / 88.70 / 96.8
INSTRUCTGPT (FS)175B44.731.737.539.556.90 / 91.80 / 96.1
(f)ITERATER570M36.730.434.727.240.924.1 / 81.420.6 / 94.3
DELITERATER570M32.028.930.627.831.724.7 / 87.620.4 / 96.6
PEER-3B*3B51.432.132.132.5---
PEER-11B*11B52.132.532.734.1---
(g)CoEdit-L770M46.830.931.538.570.522.4 / 92.815.7 / 97.2
CoEdit-XL3B50.431.331.538.574.620.8 / 94.815.4 / 97.8
CoEdit-XXL11B51.631.831.538.276.221.8 / 93.815.4 / 98.2
+ +Table 11: Comparison of CoEDIT against various baselines (on sub-tasks and additional datasets to Table 2), divided into seven groups: (a) a copy baseline and T5-LARGE baseline prefixed only with task-specific tags (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs, (d) Instruction-tuned LLMs, (e) Few-shot evaluations of large pre-trained models (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first scores for each task (excluding STS and QQP style tasks) are SARI scores. For STS and QQP, the first scores are Self-BLEU scores, and the second is semantic similarity. ( $\uparrow$ ) indicates higher is better, and ( $\downarrow$ ) indicates lower is better. The best-performing models for each dataset are highlighted in bolded boxes. (FS) denotes few-shot evaluation. + +with early stopping. All models were fine-tuned on A100 GPUs using Deepspeed (Rasley et al., 2020). Maximum sequence lengths for both the source and the target were set to 256 tokens (via filtering). The best-performing checkpoints were chosen based the validation loss. + +# E Model Performance + +Table 11 compares the performance of CoEDIT with the other models on the remaining test datasets. We observe similar trends as the ones observed in Table 2, where CoEDIT outperforms most models we compare against. + +# F Data Examples + +
InstructionGPT3-EditCoEdit-xl (ours)
Fix all grammatical errors: Every one would expect to leave his owns and secrets dreams like to be a painter, a writer ...Every one would expect to leave his owns and secrets dreams like the painting and the write ...Every one would expect to leave his own and secret dreams like to be a painter, a writer...
Make this simpler: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British racquet sport.Fives is a British sport. It is thought to have come from the same place as many racquet sports.
Fix coherence in this text: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful fighting technique. Spike is yet to fully develop it .Phantom Budo is an incredibly pow-erful ability, but Spike has yet to fully develop it.
Use different wording: Judge Gerald W. Heaney, in dissent, said the authorities should have allowed the prisoner to be medicated without the consequence of execution.Judge Gerald W. Heaney, who dis-agreed with the majority decision, said the prisoner should be medicated after important testimony is received.In his dissent, Gerald W. Heaney said the authorities should have allowed the prisoner to be treated without execu-tion.
+ +Table 12: A sample of text revisions generated by GPT3-EDIT and CoEDIT-XL (ours). + +
InstructionGPT3-EDITCOEDIT-XL (chaining)COEDIT-XL-C
Remove all grammatical errors from this text, and make this text less complex: They follow the way the Sun goes from the east to the west.The Sun rises in the east and sets in the west.They move with the sun as it goes from east to west.They follow the sun as it goes from east to west.
Make the sentence grammatical, rewrite the sentence with different wording, and make this text less complex: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British sport that is believed to derive from the same origins as many racquet sports.It is thought to have come from the same sources as other racquet sports.Fives is a British sport that is believed to have originated from racquet sports.
Make the text coherent, and rewrite this text: Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous wasn't too worried about the fact that he couldn't finish his cheese sandwich, but soon realized that this was an endless sandwich and an endless amount of condiments.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich, but soon realizes he is dealing with an endless sandwich and an endless supply of condiments.
Make the text more coherent, simplification, and rewrite this sentence: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful ability. It is an awesome fighting technique that Spike has yet to fully develop.This fighting technique of Spike is still in development.Spike has yet to fully develop his Phantom Budo ability.
Rewrite the sentence to be simpler, and paraphrase this text: The jury asked for transcripts of Quattrone's testimony about his role in the initial public offering allocation process.The jury asked for transcripts of Frank Quattrone's testimony about his role in the initial public offering allocation process.The jury requested a copy of Quattrone's testimony.Transcriptions of Quattrone's testimony were requested by the jury.
Rewrite more formally, and make this easier to understand: Brian, he asked the coolest questions, they suspended him though, i dont know what's up with that!Brian, he asked the coolest questions, they suspended him though, I don't know what's up with that! He was a cool guy, and I liked his questions.I do not understand why Brian was suspended. He had some great questions.I do not know why they suspended Brian.
+ +Table 13: A sample of text revisions generated by GPT3-EDIT, COEDIT-XL (chaining) and COEDIT-XL-C for composite instructions. \ No newline at end of file diff --git a/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/images.zip b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f8e9bd5cfd69b058ee00a00ae8ebce9830b7e7f7 --- /dev/null +++ b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfe2b34630871889c8adb8664f6d0fc3a3d8ffde0041238becffaba4e0c06165 +size 1646163 diff --git a/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/layout.json b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..df07388e0a7dac42546fa172077cee7e2b4761ca --- /dev/null +++ b/2023/CoEdIT_ Text Editing by Task-Specific Instruction Tuning/layout.json @@ -0,0 +1,9779 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 114, + 75, + 481, + 95 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 114, + 75, + 481, + 95 + ], + "spans": [ + { + "bbox": [ + 114, + 75, + 481, + 95 + ], + "type": "text", + "content": "CoEdit: Text Editing by Task-Specific Instruction Tuning" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 114, + 116, + 480, + 134 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 114, + 116, + 480, + 134 + ], + "spans": [ + { + "bbox": [ + 114, + 116, + 480, + 134 + ], + "type": "text", + "content": "Vipul Raheja\\* Dhruv Kumar\\* Ryan Koo\\* Dongyeop Kang" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 215, + 134, + 418, + 150 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 215, + 134, + 418, + 150 + ], + "spans": [ + { + "bbox": [ + 215, + 134, + 418, + 150 + ], + "type": "inline_equation", + "content": "\\spadesuit" + }, + { + "bbox": [ + 215, + 134, + 418, + 150 + ], + "type": "text", + "content": "Grammarly " + }, + { + "bbox": [ + 215, + 134, + 418, + 150 + ], + "type": "inline_equation", + "content": "\\diamond" + }, + { + "bbox": [ + 215, + 134, + 418, + 150 + ], + "type": "text", + "content": "University of Minnesota" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 127, + 151, + 470, + 167 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 127, + 151, + 470, + 167 + ], + "spans": [ + { + "bbox": [ + 127, + 151, + 470, + 167 + ], + "type": "text", + "content": "\\*first.last@grammarly.com " + }, + { + "bbox": [ + 127, + 151, + 470, + 167 + ], + "type": "inline_equation", + "content": "\\diamondsuit" + }, + { + "bbox": [ + 127, + 151, + 470, + 167 + ], + "type": "text", + "content": " {koo0017, dongyeop}@umn.edu" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "spans": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "text", + "content": "Abstract" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 84, + 232, + 274, + 486 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 84, + 232, + 274, + 486 + ], + "spans": [ + { + "bbox": [ + 84, + 232, + 274, + 486 + ], + "type": "text", + "content": "We introduce CoEDIT, a state-of-the-art text editing system for writing assistance. CoEdit takes instructions from the user specifying the attributes of the desired text, such as \"Make the sentence simpler\" or \"Write it in a more neutral style,\" and outputs the edited text. We present a large language model fine-tuned on a diverse collection of task-specific instructions for text editing (a total of 82K instructions). Our model (1) achieves state-of-the-art performance on various text editing benchmarks, (2) is competitive with publicly available largest-sized LLMs trained on instructions while being " + }, + { + "bbox": [ + 84, + 232, + 274, + 486 + ], + "type": "inline_equation", + "content": "\\sim 60\\mathrm{x}" + }, + { + "bbox": [ + 84, + 232, + 274, + 486 + ], + "type": "text", + "content": " smaller, (3) is capable of generalizing to unseen edit instructions, and (4) exhibits abilities to generalize to composite instructions containing different combinations of edit actions. Through extensive qualitative and quantitative analysis, we show that writers prefer the edits suggested by CoEDIT, relative to other state-of-the-art text editing models1." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 68, + 493, + 154, + 505 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 493, + 154, + 505 + ], + "spans": [ + { + "bbox": [ + 68, + 493, + 154, + 505 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 514, + 291, + 743 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 514, + 291, + 743 + ], + "spans": [ + { + "bbox": [ + 67, + 514, + 291, + 743 + ], + "type": "text", + "content": "Large language models (LLMs) have made remarkable progress toward generating coherent text in a wide variety of tasks and domains to support writing assistance (Du et al., 2022a; Mallinson et al., 2022; Schick et al., 2023), such as grammatical error correction (Wu et al., 2023), text simplification (Stajner et al., 2022), paraphrasing (Chowdhury et al., 2022), and style transfer (Reif et al., 2022). One of the emergent abilities of LLMs is the capability to generalize to unseen tasks by following new or composed instructions. Instruction-tuning, where LLMs are fine-tuned on a collection of tasks phrased as instructions, makes the models more adept at interpreting and following instructions, reducing the need for few-shot exemplars (Sanh et al., 2022; Ouyang et al., 2022b; Wei et al., 2022; Chung et al., 2022b)." + } + ] + } + ], + "index": 7 + }, + { + "type": "image", + "bbox": [ + 326, + 210, + 490, + 365 + ], + "blocks": [ + { + "bbox": [ + 326, + 210, + 490, + 365 + ], + "lines": [ + { + "bbox": [ + 326, + 210, + 490, + 365 + ], + "spans": [ + { + "bbox": [ + 326, + 210, + 490, + 365 + ], + "type": "image", + "image_path": "665e413a764ba4bd23ae3c61ac7001fff200f3ab98ac4248b55399135a23076c.jpg" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 370, + 526, + 418 + ], + "lines": [ + { + "bbox": [ + 302, + 370, + 526, + 418 + ], + "spans": [ + { + "bbox": [ + 302, + 370, + 526, + 418 + ], + "type": "text", + "content": "Figure 1: Model comparison according to training parameters vs. average performance across all text editing benchmarks reported in Tables 2 and 11. Publicly available models are denoted with " + }, + { + "bbox": [ + 302, + 370, + 526, + 418 + ], + "type": "inline_equation", + "content": "(^{*})" + }, + { + "bbox": [ + 302, + 370, + 526, + 418 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_caption" + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 434, + 525, + 528 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 434, + 525, + 528 + ], + "spans": [ + { + "bbox": [ + 302, + 434, + 525, + 528 + ], + "type": "text", + "content": "Text editing is a complex task because human writers cannot simultaneously grasp multiple demands and constraints of the task and tend to iterate and revise their work multiple times (Flower, 1980; Collins and Gentner, 1980; Vaughan and McDonald, 1986). This poses a significant challenge for intelligent writing assistants." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 529, + 525, + 691 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 529, + 525, + 691 + ], + "spans": [ + { + "bbox": [ + 302, + 529, + 525, + 691 + ], + "type": "text", + "content": "In this work, we aim to improve the capabilities of instruction-tuned models for text editing by leveraging instruction-tuning from diverse tasks of text editing benchmarks. While multiple previous works have attempted to develop general-purpose text editing models using LLMs, they are either not trained with instruction-tuning (Du et al., 2022c; Kim et al., 2022), trained on much smaller models or not trained on task-specific datasets (Mallinson et al., 2022; Schick et al., 2023), or are not publicly available (Schick et al., 2023), which limits their effectiveness, performance, or usability." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 692, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 692, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 692, + 526, + 772 + ], + "type": "text", + "content": "We introduce CoEDIT, a text editing system designed to provide writing assistance with a natural language interface. A user can employ CoEDIT by providing natural language instructions such as \"Paraphrase the sentence\" or \"Fix the grammar\". Our experiments demonstrate that fine-tuning in" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "text", + "content": "Code, data, and models available at https://github.com/vipulraheja/coedit" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5274" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 129, + 795, + 463, + 818 + ], + "type": "footer", + "angle": 0, + "lines": [ + { + "bbox": [ + 129, + 795, + 463, + 818 + ], + "spans": [ + { + "bbox": [ + 129, + 795, + 463, + 818 + ], + "type": "text", + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5274-5291 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ] + } + ], + "index": 15 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 0 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 79, + 68, + 273, + 164 + ], + "blocks": [ + { + "bbox": [ + 79, + 68, + 273, + 164 + ], + "lines": [ + { + "bbox": [ + 79, + 68, + 273, + 164 + ], + "spans": [ + { + "bbox": [ + 79, + 68, + 273, + 164 + ], + "type": "image", + "image_path": "bd643d55e590b7046d1994e71e3854be9c4026b9c7836cb0d9e8b9836d46c7c5.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 169, + 290, + 193 + ], + "lines": [ + { + "bbox": [ + 67, + 169, + 290, + 193 + ], + "spans": [ + { + "bbox": [ + 67, + 169, + 290, + 193 + ], + "type": "text", + "content": "Figure 2: General-purpose (left) vs Task-specific (right) Instruction Tuning." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 200, + 290, + 306 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 200, + 290, + 306 + ], + "spans": [ + { + "bbox": [ + 67, + 200, + 290, + 306 + ], + "type": "text", + "content": "strictions for specific tasks is more effective than multi-task learning and general-purpose instruction tuning. We conjecture that task-specific instructions increase the density of the instruction space, reinforcing the complementary effects of multiple tasks and facilitating their generalization to composite and new text editing tasks, as shown in Fig. 2." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 308, + 290, + 401 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 308, + 290, + 401 + ], + "spans": [ + { + "bbox": [ + 67, + 308, + 290, + 401 + ], + "type": "text", + "content": "To build CoEdit, we fine-tune a pre-trained sequence-to-sequence model on a parallel corpus of instruction-based 82K input-output pairs. The inputs and outputs are sourced from publicly available corpora for different text editing tasks, and the instructions are constructed based on rules that introduce lexical and semantic variations." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 77, + 404, + 249, + 415 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 77, + 404, + 249, + 415 + ], + "spans": [ + { + "bbox": [ + 77, + 404, + 249, + 415 + ], + "type": "text", + "content": "Our main contributions are as follows:" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 73, + 417, + 290, + 619 + ], + "type": "list", + "angle": 0, + "index": 9, + "blocks": [ + { + "bbox": [ + 73, + 417, + 290, + 497 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 417, + 290, + 497 + ], + "spans": [ + { + "bbox": [ + 73, + 417, + 290, + 497 + ], + "type": "text", + "content": "- We achieve state-of-the-art performance on multiple text editing tasks: grammatical error correction, text simplification, sentence fusion, iterative text editing, and three stylistic editing tasks (formality style transfer, neutralization, and paraphrasing)." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 73, + 498, + 290, + 564 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 498, + 290, + 564 + ], + "spans": [ + { + "bbox": [ + 73, + 498, + 290, + 564 + ], + "type": "text", + "content": "- We find that even our smallest instruction-tuned model outperforms other supervised text editing models, instruction-tuned models, and general-purpose LLMs with nearly " + }, + { + "bbox": [ + 73, + 498, + 290, + 564 + ], + "type": "inline_equation", + "content": "60\\mathrm{x}" + }, + { + "bbox": [ + 73, + 498, + 290, + 564 + ], + "type": "text", + "content": " greater parameters, on both manual and automatic evaluations." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 73, + 565, + 290, + 605 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 565, + 290, + 605 + ], + "spans": [ + { + "bbox": [ + 73, + 565, + 290, + 605 + ], + "type": "text", + "content": "- CoEdit generalizes well to new, adjacent tasks not seen while fine-tuning, as well as composite instructions with multiple task specifications." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 73, + 607, + 290, + 619 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 607, + 290, + 619 + ], + "spans": [ + { + "bbox": [ + 73, + 607, + 290, + 619 + ], + "type": "text", + "content": "- Our data and models will be publicly available." + } + ] + } + ], + "index": 8 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 68, + 629, + 161, + 643 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 629, + 161, + 643 + ], + "spans": [ + { + "bbox": [ + 68, + 629, + 161, + 643 + ], + "type": "text", + "content": "2 Related Work" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": "Large Language Models for Text Editing In general, our work is related to many prior works that leverage LLMs; for instance, finetuning T5 (Raffel et al., 2020a) on pairs of original and edited text (Faltings et al., 2021; Reid and Neubig, 2022; Mallinson et al., 2022; Du et al., 2022a,b; Kim et al., 2022). However, these aforementioned works are either not based on instruction tuning, use different modeling techniques such as tag-based se" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 71, + 525, + 179 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 525, + 179 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 525, + 179 + ], + "type": "text", + "content": "quence labeling, or are not general enough to work on multiple text editing tasks. Moreover, several LLMs are trained to solve specific tasks only, such as grammar errors (Mallinson et al., 2022; Fang et al., 2023), text simplification (Stajner et al., 2022), paraphrase generation (Chowdhury et al., 2022), or style transfer (Reif et al., 2022), which limits their generalizability." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 187, + 526, + 430 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 187, + 526, + 430 + ], + "spans": [ + { + "bbox": [ + 302, + 187, + 526, + 430 + ], + "type": "text", + "content": "Instruction Tuning for Writing Assistance Explicitly teaching models how to follow natural language instructions is closely related to recent work for fine-tuning models using large datasets of human-written instructions (Wei et al., 2022; Mishra et al., 2022; Sanh et al., 2022; Ouyang et al., 2022a; Wang et al., 2022; Iyer et al., 2022; Bach et al., 2022; Longpre et al., 2023). Recently, advanced data augmentation and instruction tuning, starting with the Flan models (Chung et al., 2022b), have shown that strong results stem both from the larger and more diverse set of tasks. Additionally, enriching task diversity and balancing task sources (Sanh et al., 2022) are shown to be critical to performance, suggesting instruction-tuned models offer a more computationally-efficient starting checkpoint for downstream applications, corroborating Liu et al. (2022) and Aribandi et al. (2022)." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 431, + 525, + 620 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 431, + 525, + 620 + ], + "spans": [ + { + "bbox": [ + 302, + 431, + 525, + 620 + ], + "type": "text", + "content": "On instruction tuning for writing assistance, our work is closely related to PEER (Schick et al., 2023), who fine-tuned T5-based LLMs by following user-provided text-editing plans to perform the said edits. There are a few significant differences in our approach compared to PEER. While PEER attempts to either create or leverage a user-provided plan, realize the edits conditioned on the plan, and try to explain the plan, we focus only on the plan and edit parts of the pipeline. Even when it comes to handling editing plans in the form of natural language instructions, our work focuses on edits that do not add new information. Therefore, we compare our models only against PEER-Edit models." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 621, + 525, + 674 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 621, + 525, + 674 + ], + "spans": [ + { + "bbox": [ + 302, + 621, + 525, + 674 + ], + "type": "text", + "content": "Finally, no prior works, to the best of our knowledge, have investigated the ability of instruction-tuned LLMs for text editing to generalize to composite instructions." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 303, + 682, + 371, + 694 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 682, + 371, + 694 + ], + "spans": [ + { + "bbox": [ + 303, + 682, + 371, + 694 + ], + "type": "text", + "content": "3 CoEdit" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 303, + 702, + 409, + 714 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 702, + 409, + 714 + ], + "spans": [ + { + "bbox": [ + 303, + 702, + 409, + 714 + ], + "type": "text", + "content": "3.1 Training Dataset" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 302, + 719, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 719, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 719, + 525, + 772 + ], + "type": "text", + "content": "Our dataset creation is based on the ITERER+ dataset proposed by Kim et al. (2022) who combined datasets from various text editing tasks (See Table 1). Their work, in turn, is based on Du et al." + } + ] + } + ], + "index": 18 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5275" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 1 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 70, + 68, + 523, + 232 + ], + "blocks": [ + { + "bbox": [ + 70, + 68, + 523, + 232 + ], + "lines": [ + { + "bbox": [ + 70, + 68, + 523, + 232 + ], + "spans": [ + { + "bbox": [ + 70, + 68, + 523, + 232 + ], + "type": "table", + "html": "
Edit IntentionDatasetsSizeExample InputExample Output
FLUENCYNUCLE-14, Lang-8, BEA-1920kFix the grammar: When I grow up, I start to understand what he said is quite right.When I grew up, I started to understand what he said was quite right.
COHERENCEDiscoFuse11kMake this text coherent: Their flight is weak. They run quickly through the tree canopy.Their flight is weak, but they run quickly through the tree canopy.
CLARITY (Simplification)NEWSELA,WikiAuto, WikiLarge, ParabankV2, ITERER-CLARITY13kRewrite to make this easier to understand: A storm surge is what forecasters consider a hurricane's most treacherous aspect.A storm surge is considered a hurricane's most dangerous aspect.
STYLE (Paraphrase)ParabankV215kParaphrase this: Do you know where I was born?Do you know my birthplace?
STYLE (Formalize)GYAFC12kWrite this more formally: OMG i love that song im listening to it right nowI love that song and I am listening to it at this moment.
STYLE (Neutralize)WNC11kWrite in a more neutral way: The authors' exposé on nutrition studies.The authors' statements on nutrition stud-ies.
", + "image_path": "751e945c475e4996eacbb4eab026371559605ff0db2b7a7520727e94c94819e6.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 101, + 239, + 487, + 252 + ], + "lines": [ + { + "bbox": [ + 101, + 239, + 487, + 252 + ], + "spans": [ + { + "bbox": [ + 101, + 239, + 487, + 252 + ], + "type": "text", + "content": "Table 1: Example data instances in the COEDIT dataset. Instructions in the inputs are italicized." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 268, + 290, + 388 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 268, + 290, + 388 + ], + "spans": [ + { + "bbox": [ + 67, + 268, + 290, + 388 + ], + "type": "text", + "content": "(2022b), who categorized each edit into MEANING-CHANGED or NON-MEANING-CHANGED. Edits that belong to the latter group are further assigned to FLUENCY, COHERENCE, CLARITY, or STYLE. The aforementioned taxonomy of edit intents from ITERER reflects writers' general intention behind their revision, providing more in-depth information than just superficial edit operations, such as ADD and DELETE." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 391, + 290, + 581 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 391, + 290, + 581 + ], + "spans": [ + { + "bbox": [ + 67, + 391, + 290, + 581 + ], + "type": "text", + "content": "Similar to Kim et al. (2022), our work focuses on non-MEANING-CHANGED edits. We consider those edits to be ones that do not add new information or perform fact updates. Since the STYLE edits are quite subjective in nature, we allow for the possibility of meaning change so as to fulfill the needs of making stylistic edits, but we constrain the editing tasks to ensure the edited texts are semantically similar to the sources, but not to the extent of adding new information or fact updates. With this in mind, we expand the STYLE edit intention category from ITERATER+ to include three new sub-intentions: Paraphrasing, Formality Style Transfer (or Formalization), and Neutralization." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 584, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 584, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 584, + 291, + 772 + ], + "type": "text", + "content": "The aforementioned ITERER dataset taxonomy lends itself conveniently to be articulated as natural language instructions and allows us to naturally formulate them into instructional prompts (See Table 1). We rewrite each edit intention as a set of natural language instruction prompts to create the COEDIT dataset. To allow models to adapt to linguistic variations of the instructions, we also include paraphrases of the instruction templates, e.g., instead of \"Write\" we also use \"Generate\" or \"Rewrite,\" or instead of \"Paraphrase the text\" we use \"Rewrite the text with different wording,\" and so on. For each task, we develop a variety of such diverse instructional prompts and ran" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 301, + 268, + 526, + 429 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 268, + 526, + 429 + ], + "spans": [ + { + "bbox": [ + 301, + 268, + 526, + 429 + ], + "type": "text", + "content": "domly sample an instruction from the aforementioned group of task-specific instruction candidates to be pre-pended to the source in order to form an data pair. We provide the full list of our instructional prompts in §C. In total, our training dataset consists of around 82K pairs. We keep the original train-validation-test splits consistent as the original datasets but diversify the train and validation splits with the paraphrasing augmentations. The details of datasets and instructions used to train our models are described in §A." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 443, + 425, + 456 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 443, + 425, + 456 + ], + "spans": [ + { + "bbox": [ + 302, + 443, + 425, + 456 + ], + "type": "text", + "content": "3.2 Text Editing Models" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 463, + 525, + 571 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 463, + 525, + 571 + ], + "spans": [ + { + "bbox": [ + 302, + 463, + 525, + 571 + ], + "type": "text", + "content": "We fine-tune different versions of pre-trained FLANT5 (Chung et al., 2022a) models on the COEDIT dataset. Specifically, we use FLANT5-L (770M parameters), FLANT5-XL (3B parameters), FLANT5-XXL (11B parameters) models, which are henceforth referred to as COEDIT-L, COEDIT-XL, and COEDIT-XXL respectively. The training details are summarized in " + }, + { + "bbox": [ + 302, + 463, + 525, + 571 + ], + "type": "inline_equation", + "content": "\\S D" + }, + { + "bbox": [ + 302, + 463, + 525, + 571 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 585, + 427, + 599 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 585, + 427, + 599 + ], + "spans": [ + { + "bbox": [ + 302, + 585, + 427, + 599 + ], + "type": "text", + "content": "4 Experimental Setup" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 301, + 609, + 525, + 731 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 609, + 525, + 731 + ], + "spans": [ + { + "bbox": [ + 301, + 609, + 525, + 731 + ], + "type": "text", + "content": "We conduct experiments to determine if a standard instruction-tuned language model fine-tuned using task-specific data can improve text editing performance and if it can further generalize into a general-purpose text editing model capable of following human-written instructions and handling a wider array of editing tasks, such as unseen and composite instructions. Specifically, we aim to answer the following research questions:" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 308, + 733, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 733, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 308, + 733, + 525, + 772 + ], + "type": "text", + "content": "- RQ1: Can COEdit follow text editing instructions and perform high-quality edits across a wide variety of tasks?" + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5276" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "bbox": [ + 73, + 71, + 289, + 137 + ], + "type": "list", + "angle": 0, + "index": 2, + "blocks": [ + { + "bbox": [ + 73, + 71, + 289, + 110 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 71, + 289, + 110 + ], + "spans": [ + { + "bbox": [ + 73, + 71, + 289, + 110 + ], + "type": "text", + "content": "- RQ2: Is CoEdit generalizable to perform high-quality edits for new types of text editing instructions?" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 73, + 111, + 289, + 137 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 111, + 289, + 137 + ], + "spans": [ + { + "bbox": [ + 73, + 111, + 289, + 137 + ], + "type": "text", + "content": "- RQ3: Does CoEdit make the writing process more efficient and effective for human writers?" + } + ] + } + ], + "index": 1 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 67, + 139, + 290, + 260 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 139, + 290, + 260 + ], + "spans": [ + { + "bbox": [ + 67, + 139, + 290, + 260 + ], + "type": "text", + "content": "We answer these questions via quantitative analyses of model outputs (Section 5) and via qualitative analyses and human evaluations of model outputs (Section 6). Further, we investigate RQ2 along two dimensions: (1) generalization to composite instructions containing combinations of multiple different kinds of edits and (2) out-of-domain generalization to instructions with new task requirements on previously unseen data." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 269, + 130, + 280 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 269, + 130, + 280 + ], + "spans": [ + { + "bbox": [ + 67, + 269, + 130, + 280 + ], + "type": "text", + "content": "4.1 Models" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 286, + 289, + 354 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 286, + 289, + 354 + ], + "spans": [ + { + "bbox": [ + 67, + 286, + 289, + 354 + ], + "type": "text", + "content": "No-Edits Baseline We first evaluate a no-edits baseline, where the output is simply a copy of the source input without the instruction. This strategy performs reasonably well on tasks where the target output largely overlaps with the input (e.g., GEC)." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 361, + 291, + 496 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 361, + 291, + 496 + ], + "spans": [ + { + "bbox": [ + 67, + 361, + 291, + 496 + ], + "type": "text", + "content": "Supervised Text Editing Models We also evaluate existing LLMs for text editing that are not finetuned with instruction-specific data. Specifically, to understand the effect of task-specific fine-tuning, we evaluate against " + }, + { + "bbox": [ + 67, + 361, + 291, + 496 + ], + "type": "inline_equation", + "content": "\\mathrm{T5}^2" + }, + { + "bbox": [ + 67, + 361, + 291, + 496 + ], + "type": "text", + "content": " (Raffel et al., 2020b) models as primary alternatives of our FLAN-T5 models. We also compare our models against ITERER (Du et al., 2022b) and DELITERATER (Kim et al., 2022), which have shown strong performance on a variety of text editing tasks." + }, + { + "bbox": [ + 67, + 361, + 291, + 496 + ], + "type": "inline_equation", + "content": "^3" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 503, + 289, + 530 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 503, + 289, + 530 + ], + "spans": [ + { + "bbox": [ + 67, + 503, + 289, + 530 + ], + "type": "text", + "content": "Instruction-tuned LLMs A major group of our comparisons is against instruction-tuned LLMs:" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 73, + 531, + 290, + 692 + ], + "type": "list", + "angle": 0, + "index": 10, + "blocks": [ + { + "bbox": [ + 73, + 531, + 289, + 610 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 531, + 289, + 610 + ], + "spans": [ + { + "bbox": [ + 73, + 531, + 289, + 610 + ], + "type": "text", + "content": "- Our main comparison is against PEER (Schick et al., 2023), which is primarily based on the LM Adapted variant of T5. As the focus of our work is on improving revision quality (Section 2), we compare against PEER-EDIT (both 3B and 11B versions)." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 73, + 612, + 290, + 692 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 73, + 612, + 290, + 692 + ], + "spans": [ + { + "bbox": [ + 73, + 612, + 290, + 692 + ], + "type": "text", + "content": "- T0, T0++ (Sanh et al., 2022) and Tk-Instruct (Wang et al., 2022), which are all initialized from the LM Adapted variant of T5, and finetuned using PromptSource (Bach et al., 2022), and Super-NaturalInstructions (Wang et al., 2022) datasets, respectively." + } + ] + } + ], + "index": 9 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 308, + 71, + 525, + 287 + ], + "type": "list", + "angle": 0, + "index": 18, + "blocks": [ + { + "bbox": [ + 308, + 71, + 525, + 125 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 71, + 525, + 125 + ], + "spans": [ + { + "bbox": [ + 308, + 71, + 525, + 125 + ], + "type": "text", + "content": "- Alpaca (Taori et al., 2023) is an instruction-tuned version of the LLaMA-7B model (Touvron et al., 2023) trained on 52K instruction-following demonstrations generated by GPT3." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 308, + 126, + 525, + 179 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 126, + 525, + 179 + ], + "spans": [ + { + "bbox": [ + 308, + 126, + 525, + 179 + ], + "type": "text", + "content": "- We also compare InstructGPT (Ouyang et al., 2022a), a variant of GPT3 fine-tuned via reinforcement learning on a large dataset of instructions and human-written outputs." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 308, + 179, + 525, + 232 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 179, + 525, + 232 + ], + "spans": [ + { + "bbox": [ + 308, + 179, + 525, + 232 + ], + "type": "text", + "content": "- GPT3.5 (henceforth referred to as ChatGPT), is an improved version of InstructGPT optimized for chat. We utilize OpenAI's API for all inference tasks.5" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 308, + 232, + 524, + 287 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 232, + 524, + 287 + ], + "spans": [ + { + "bbox": [ + 308, + 232, + 524, + 287 + ], + "type": "text", + "content": "- GPT3 also offers a text Editing " + }, + { + "bbox": [ + 308, + 232, + 524, + 287 + ], + "type": "inline_equation", + "content": "\\mathbf{A}\\mathbf{P}\\mathbf{I}^6" + }, + { + "bbox": [ + 308, + 232, + 524, + 287 + ], + "type": "text", + "content": " (we refer to as GPT3-Edit), which is usable for editing tasks rather than completion, making it directly comparable to the tasks we train COEDIT on." + } + ] + } + ], + "index": 17 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 302, + 296, + 524, + 349 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 296, + 524, + 349 + ], + "spans": [ + { + "bbox": [ + 302, + 296, + 524, + 349 + ], + "type": "text", + "content": "Large-Pretrained Decoder-only Models We compare against LLMs with no instruction tuning in two settings – zero-shot and few-shot (details in Section 5.1):" + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 308, + 350, + 524, + 444 + ], + "type": "list", + "angle": 0, + "index": 22, + "blocks": [ + { + "bbox": [ + 308, + 350, + 524, + 390 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 350, + 524, + 390 + ], + "spans": [ + { + "bbox": [ + 308, + 350, + 524, + 390 + ], + "type": "text", + "content": "- The 175B GPT3 (Brown et al., 2020) model that is not instruction-tuned demonstrates strong general-purpose text revision capabilities." + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 308, + 391, + 524, + 444 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 391, + 524, + 444 + ], + "spans": [ + { + "bbox": [ + 308, + 391, + 524, + 444 + ], + "type": "text", + "content": "- LLaMA (Touvron et al., 2023) is Meta AI's general-purpose language model trained only on publicly available data. We utilize the 7B model due to computing constraints." + } + ] + } + ], + "index": 21 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 302, + 445, + 524, + 472 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 445, + 524, + 472 + ], + "spans": [ + { + "bbox": [ + 302, + 445, + 524, + 472 + ], + "type": "text", + "content": "Outputs of all models were generated using greedy decoding unless specified otherwise." + } + ] + } + ], + "index": 23 + }, + { + "bbox": [ + 302, + 482, + 393, + 493 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 482, + 393, + 493 + ], + "spans": [ + { + "bbox": [ + 302, + 482, + 393, + 493 + ], + "type": "text", + "content": "4.2 Test Datasets" + } + ] + } + ], + "index": 24 + }, + { + "bbox": [ + 301, + 499, + 525, + 729 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 499, + 525, + 729 + ], + "spans": [ + { + "bbox": [ + 301, + 499, + 525, + 729 + ], + "type": "text", + "content": "To assess the editing capabilities of CoEDIT, we perform evaluations on standard test sets sourced from a variety of text editing task benchmarks, most notably, EDITEVAL (Dwivedi-Yu et al., 2022). Owing to the overlap of our work with PEER, we keep our evaluation datasets and evaluation metrics as close to theirs as possible for consistency: We used JFLEG (Napoles et al., 2017) for grammatical error collection, TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) for text simplification, Coherence split of ITER (Du et al., 2022b) and the DISCOFUSE dataset (Geva et al., 2019) for coherence, and ITER (Du et al., 2022b) for iterative text revision. For Style-related edits, we used GYAFC (Rao and Tetreault, 2018) for formality style, WNC (Pryzant et al., 2020) for neutralization, and MRPC (Dolan and" + } + ] + } + ], + "index": 25 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 698, + 290, + 740 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 698, + 290, + 740 + ], + "spans": [ + { + "bbox": [ + 67, + 698, + 290, + 740 + ], + "type": "text", + "content": "2The original T5 model cannot continue text well due to its infilling pre-training objective. Hence, similar to Schick et al. (2023), we evaluate its LM Adapted versions (Lester et al., 2021), which are trained with a language modeling objective." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 67, + 740, + 289, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 740, + 289, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 740, + 289, + 772 + ], + "type": "text", + "content": "3We are unable to make full comparisons against EdiT5 (Mallinson et al., 2022) and PEER (Schick et al., 2023) as the models are not publicly available." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 315, + 737, + 422, + 747 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 315, + 737, + 422, + 747 + ], + "spans": [ + { + "bbox": [ + 315, + 737, + 422, + 747 + ], + "type": "text", + "content": "4We use text-davinci-003" + } + ] + } + ], + "index": 26 + }, + { + "bbox": [ + 317, + 748, + 408, + 760 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 317, + 748, + 408, + 760 + ], + "spans": [ + { + "bbox": [ + 317, + 748, + 408, + 760 + ], + "type": "text", + "content": "5We use gpt-3.5-turbo" + } + ] + } + ], + "index": 27 + }, + { + "bbox": [ + 317, + 761, + 443, + 771 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 317, + 761, + 443, + 771 + ], + "spans": [ + { + "bbox": [ + 317, + 761, + 443, + 771 + ], + "type": "text", + "content": "6We use text-davinci-edit-001" + } + ] + } + ], + "index": 28 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5277" + } + ] + } + ], + "index": 30 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 290, + 111 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 290, + 111 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 290, + 111 + ], + "type": "text", + "content": "Brockett, 2005), STS (Cer et al., 2017), and QQP for paraphrasing. Detailed descriptions of each dataset and its evaluation metrics are in " + }, + { + "bbox": [ + 67, + 71, + 290, + 111 + ], + "type": "inline_equation", + "content": "\\S \\mathbf{B}" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 68, + 126, + 194, + 139 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 126, + 194, + 139 + ], + "spans": [ + { + "bbox": [ + 68, + 126, + 194, + 139 + ], + "type": "text", + "content": "5 Quantitative Results" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 68, + 150, + 215, + 163 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 150, + 215, + 163 + ], + "spans": [ + { + "bbox": [ + 68, + 150, + 215, + 163 + ], + "type": "text", + "content": "5.1 Text Editing Performance" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 169, + 290, + 250 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 169, + 290, + 250 + ], + "spans": [ + { + "bbox": [ + 67, + 169, + 290, + 250 + ], + "type": "text", + "content": "Table 2 helps us answer RQ1 by comparing the performance of CoEdit to other models across various text editing tasks. We first present results from the more well-known evaluation sets here and present additional results (i.e., sub-tasks and additional datasets) in Table 11." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 252, + 289, + 373 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 252, + 289, + 373 + ], + "spans": [ + { + "bbox": [ + 67, + 252, + 289, + 373 + ], + "type": "text", + "content": "We segregate the models into seven groups. The first group (a) consists of the copy baseline and T5-LARGE baseline fine-tuned with prefix-tuning (each data point is prefixed with task-specific tags rather than instructions), while the second group (b) consists of instruction-fine-tuned T5-based models on non-text-editing tasks. We find that CoEdit substantially outperforms these models across all tasks." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 375, + 291, + 550 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 375, + 291, + 550 + ], + "spans": [ + { + "bbox": [ + 67, + 375, + 291, + 550 + ], + "type": "text", + "content": "The next two groups (c, d) show different LLMs varying from 7B to 176B parameters in size, evaluated in a zero-shot setting. Those in group (c) are decoder-only models, while those in group (d) are instruction-tuned. We find that CoEdit outperforms all LLMs comparable to its model size (e.g., Alpaca and LLaMA) across all tasks, as well as on most tasks compared to models several times larger, such as ChatGPT and InstructGPT. This indicates that current general-purpose and instruction-tuned models are underfitted, and it is beneficial to densify the task/instruction space rather than to scale model size." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 552, + 291, + 701 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 552, + 291, + 701 + ], + "spans": [ + { + "bbox": [ + 67, + 552, + 291, + 701 + ], + "type": "text", + "content": "Although models such as Alpaca and T5-based models (Tk-instruct, T0, " + }, + { + "bbox": [ + 67, + 552, + 291, + 701 + ], + "type": "inline_equation", + "content": "\\mathrm{T0 + + }" + }, + { + "bbox": [ + 67, + 552, + 291, + 701 + ], + "type": "text", + "content": " ) have previously shown strong capabilities for zero-shot tasks, they show weaker performance compared to CoEDIT. We also see that the decoder-only models (e.g., GPT3 and LLaMA) often repeat the input for more complex tasks, such as ones under the Style intent group. This can be attributed to difficulty understanding the prompted task, resulting in the models either repeating the input sentence or generating a continuation unrelated to the task." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 71, + 526, + 274 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 274 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 274 + ], + "type": "text", + "content": "Next, in the fifth group (e), we evaluate the LLMs under a few-shot setting. As mentioned in Section 4.1, we conduct these experiments in a 4-shot evaluation setting, where example inputs were constructed by randomly sampling four inputs for each task from the CoEDIT dataset such that all examples chosen would fit in the input window for all models as seen in (Brown et al., 2020). The input sentence and its corresponding revised reference were pre-pended to the instructional prompt. We conduct few-shot evaluations for decoder-only LLMs (GPT3) and three instruction-tuned LLMs (InstructGPT, ChatGPT, and Alpaca). Outputs of all models were generated using greedy decoding unless specified otherwise." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 275, + 526, + 450 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 275, + 526, + 450 + ], + "spans": [ + { + "bbox": [ + 302, + 275, + 526, + 450 + ], + "type": "text", + "content": "We observe that giving specific examples improves performance in all models for all tasks except MRPC for GPT3. This may be because GPT3 still exhibits some similar behavior in repeating its generations continuously, resulting in a low BLEU score but low semantic similarity as well. We don't present any experiments for GPT3-Edit under the few-shot setting, as scores tended to stay the same across all tasks – implying that GPT3-Edit may not have as good in-context learning capabilities. Overall, we find that even our smallest 770M parameter model is competitive against LLMs evaluated in a few-shot setting in most tasks." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 451, + 526, + 681 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 451, + 526, + 681 + ], + "spans": [ + { + "bbox": [ + 302, + 451, + 526, + 681 + ], + "type": "text", + "content": "In the final group (f), we compare our models against task-specific text editing models such as ITERER, DELITERATER, and PEER. ITERER and DELITERATER perform comparatively worse than the scores reported in the original paper as we present different and more difficult inputs, only pre-pending instructions to the inputs while ITERER and DELITERATER were trained with task-specific tags. Furthermore, they were trained using BART and Pegasus, respectively, both of which have a summarization pre-training objective, and were not trained to follow instructions. On average, COEDIT beats PEER across all reported evaluations except the ITERATER benchmark. This can primarily be attributed to the difference in task-specific fine-tuning since PEER uses Wikipedia as the source of instructional edit data." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 692, + 409, + 703 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 692, + 409, + 703 + ], + "spans": [ + { + "bbox": [ + 302, + 692, + 409, + 703 + ], + "type": "text", + "content": "5.2 Ablation Studies" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 710, + 525, + 736 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 710, + 525, + 736 + ], + "spans": [ + { + "bbox": [ + 302, + 710, + 525, + 736 + ], + "type": "text", + "content": "Table 3 shows the performance of various baselines, which we discuss in detail in this section." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "content": "Instruction Tuning. To understand the effectiveness of instruction-tuning, we fine-tune the 3B pa" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 710, + 290, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 710, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 710, + 290, + 772 + ], + "type": "text", + "content": "7Since PEER had several scores missing, and due to the high scores of paraphrasing transfer, for fairness, it was left out of the Overall score calculations. For results with multiple metrics, the best-performing method is calculated by taking the average. For the MRPC average, we subtract the Self-BLEU score from 100 since lower is better." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5278" + } + ] + } + ], + "index": 14 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 68, + 68, + 526, + 344 + ], + "blocks": [ + { + "bbox": [ + 68, + 68, + 526, + 344 + ], + "lines": [ + { + "bbox": [ + 68, + 68, + 526, + 344 + ], + "spans": [ + { + "bbox": [ + 68, + 68, + 526, + 344 + ], + "type": "table", + "html": "
ModelSizeOverallIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
(a)COPY-27.629.826.7 / 40.520.730.817.6 / 10.631.85 / 047.4 / 100
T5-LARGE770M24.721.132.7 / 22.935.828.0130.9 / 4.8913.2 / 027.6 / 62.8
(b)TO*3B29.726.142.2 / 36.133.232.437.9 / 39.319.4 / 028.3 / 84.1
Tk-INSTRUCT*3B27.321.035.2 / 26.836.928.935.7 / 43.0124.2 / 0.120.4 / 48.9
T0++*11B32.631.539.4 / 40.533.135.536.8 / 43.721.2 / 042.9 / 94.9
(c)LLAMA7B28.230.127.7 / 3.3421.831.118.8 / 89.131.9 / 05.29 / 64.2
GPT3175B27.423.338.1 / 2.834.826.236.6 / 87.923.4 / 00 / 51.7
(d)ALPACA7B28.430.428.5 / 6.422.031.118.9 / 94.431.9 / 00 / 77.9
GPT3-EDIT175B41.836.152.4 / 50.632.954.035.7 / 52.350.7 / 17.122.6 / 98.7
INSTRUCTGPT175B41.632.662.4 / 57.244.647.447.8 / 98.233.7 / 0.116.03 / 98.9
CHATGPT-36.928.257.6 / 49.445.940.240.7 / 99.628.5 / 0.113.4 / 99.0
(e)ALPACA (FS)7B30.030.833.03 / 11.323.233.120.6 / 95.432.04 / 00.1 / 66.7
GPT3 (FS)175B38.432.450.1 / 4.139.245.143.1 / 97.236.7 / 00 / 14.5
INSTRUCTGPT (FS)175B45.136.264.5 / 55.746.355.247.3 / 98.842.8 / 015.9 / 99.5
CHATGPT (FS)-40.130.858 / 50.645.451.242.3 / 99.634.1 / 013.3 / 96.1
(f)ITERATER570M31.032.835.9 / 34.321.830.122.7 / 54.134.2 / 040.5 / 97.8
DELITERATER570M28.029.927.5 / 31.221.232.218.1 / 57.831.9 / 039.1 / 100
PEER-3B*3B41.737.155.5 / 54.330.5--53.3 / 21.6-
PEER-11B*11B42.137.855.8 / 54.329.5--54.5 / 22.8-
(g)CoEdit-L770M49.835.262.4 / 59.342.475.354.6 / 98.069.3 / 46.423.3 / 99.1
CoEdit-XL3B51.436.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
CoEdit-XXL11B51.537.165.0 / 61.541.778.655.1 / 97.271.0 / 51.421.8 / 99.0
", + "image_path": "ee90b1a5e64238ca45ad436a1c54b3125dc40e22bda7eb8e603a252d02018c16.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 68, + 459, + 525, + 542 + ], + "blocks": [ + { + "bbox": [ + 66, + 352, + 525, + 448 + ], + "lines": [ + { + "bbox": [ + 66, + 352, + 525, + 448 + ], + "spans": [ + { + "bbox": [ + 66, + 352, + 525, + 448 + ], + "type": "text", + "content": "Table 2: Comparison of CoEDIT against various baselines: (a) copy baseline and T5-LARGE baseline with task-specific prefixes (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs (zero-shot), (d) Instruction-tuned LLMs (zero-shot), (e) Few-shot evaluations of pre-trained LLMs, (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first score for each task (excluding MRPC style task) is SARI. The second scores for Fluency, GYAFC, and WNC are GLEU, Formality Transfer accuracy (%), and EM. For MRPC, the first score is Self-BLEU, while the second score is semantic similarity. The best-performing models7 for each dataset are highlighted in boxes. Results with (*) are ones reported in prior works. (FS) denotes few-shot evaluation. Results on other datasets are in Table 11." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 68, + 459, + 525, + 542 + ], + "lines": [ + { + "bbox": [ + 68, + 459, + 525, + 542 + ], + "spans": [ + { + "bbox": [ + 68, + 459, + 525, + 542 + ], + "type": "table", + "html": "
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER↑JFLEG↑ASSET↑DiscoFuse-Wiki↑GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
CoEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
(a) T5-XL (prefix)3B34.361.8 / 58.641.071.450.7 / 94.662.7 / 3330.6 / 87.4
(b) FLANT5-XL3B30.228.3 / 41.325.537.925.0 / 27.833.5 / 0.046.6 / 92.5
(c) CoEDIT-XL-R3B33.963.8 / 60.236.269.752.6 / 48.769.2 / 25.435.4 / 92.6
", + "image_path": "2fb23cd17fa9e3b10538e8b482f1fc75f89c6c7b711950644d53b2204db575d1.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 66, + 549, + 525, + 574 + ], + "lines": [ + { + "bbox": [ + 66, + 549, + 525, + 574 + ], + "spans": [ + { + "bbox": [ + 66, + 549, + 525, + 574 + ], + "type": "text", + "content": "Table 3: Ablation results for CoEdit to evaluate the impact of (a) instruction tuning (b) task-specific training, and (c) quality of instructions. The scores from left to right follow exactly as Table 2." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 595, + 291, + 745 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 595, + 291, + 745 + ], + "spans": [ + { + "bbox": [ + 67, + 595, + 291, + 745 + ], + "type": "text", + "content": "rameter T5 model (T5-XL) and compare it with CoEDIT-XL, its FLANT5 counterpart on the same training and validation sets. The only change is that the instructional prompts for the training datasets are replaced by task-specific prefixes. Specifically, the " + }, + { + "bbox": [ + 67, + 595, + 291, + 745 + ], + "type": "inline_equation", + "content": "82k" + }, + { + "bbox": [ + 67, + 595, + 291, + 745 + ], + "type": "text", + "content": " pairs in the training dataset used to train the CoEDIT models were modified to . We observe (Table 3(a)) that the instruction-tuned CoEDIT models consistently outperform prefix-tuned T5 models, showing the ef" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 595, + 525, + 608 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 595, + 525, + 608 + ], + "spans": [ + { + "bbox": [ + 302, + 595, + 525, + 608 + ], + "type": "text", + "content": "fectiveness of instruction-tuning over prefix-tuning." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 624, + 526, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 624, + 526, + 773 + ], + "spans": [ + { + "bbox": [ + 302, + 624, + 526, + 773 + ], + "type": "text", + "content": "Task-Specific Training. A core contribution of this work is to push the performance of small- (<1B parameters) to medium-sized (1-10B parameters) LLMs for common text editing tasks. This drives the need for fine-tuning on task-specific datasets. The impact of this task-specific data augmentation for text editing tasks has already been shown in Kim et al. (2022). For this work, we compare our task-specific fine-tuned models against their FLANT5 un-tuned counterparts referred to as FLANT5-XL (Table 3(b)). We see a substantial gap" + } + ] + } + ], + "index": 6 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "inline_equation", + "content": "{}^{8}" + }, + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "text", + "content": " task was one of gec, simplify, clarify, coherence, formalize, neutralize and paraphrase" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5279" + } + ] + } + ], + "index": 8 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 93, + 69, + 265, + 103 + ], + "blocks": [ + { + "bbox": [ + 93, + 69, + 265, + 103 + ], + "lines": [ + { + "bbox": [ + 93, + 69, + 265, + 103 + ], + "spans": [ + { + "bbox": [ + 93, + 69, + 265, + 103 + ], + "type": "table", + "html": "
COEDIT-xLGPT3-EditTieNeither
64%10%4%22%
", + "image_path": "745b3f3b30d25599b74bcca590f8efc4e5fc7a189b25a213fc6ad18d9f49f31d.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 193, + 290, + 220 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 193, + 290, + 220 + ], + "spans": [ + { + "bbox": [ + 67, + 193, + 290, + 220 + ], + "type": "text", + "content": "between the two for all datasets and model sizes, thus, confirming prior findings." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 232, + 291, + 624 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 232, + 291, + 624 + ], + "spans": [ + { + "bbox": [ + 69, + 232, + 291, + 624 + ], + "type": "text", + "content": "Quality of Instructions. While we developed with a limited set of task-specific instructional prompts, there has been widespread work on the prompt sensitivity of LLMs, especially with growing model capacity (Lu et al., 2022). To assess the robustness of CoEDIT models on instructional prompts, we train another baseline CoEDIT-xL model with randomized task-specific instructions (henceforth referred to as CoEDIT-xL-R). Specifically, the entire training dataset was randomized, where an instruction from one task was replaced randomly by an instruction from another task. Table 3(c) shows the results for this experiment. We observe that while CoEDIT-xL-R achieves scores that are higher than the non-task-specific tuned FLANT5-xL (especially on edit-based metrics such as SARI), it significantly falls behind CoEDIT-xL on those, as well as on the style accuracy metrics such as formality transfer accuracy and paraphrasing semantic similarity. This indicates that while the instructional structure of the inputs and task-specific training makes the model learn how to make edits (which drives up the SARI scores), however, the accuracy of those edits suffers since they are trained with the wrong instructions most of the time. Overall, the improvements highlight the positive impact of task-specific training, and the gaps in performance highlight the negative impact of lack of proper instruction tuning." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 640, + 186, + 653 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 640, + 186, + 653 + ], + "spans": [ + { + "bbox": [ + 67, + 640, + 186, + 653 + ], + "type": "text", + "content": "6 Qualitative Results" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "content": "We now address RQ2 and RQ3 (Section 4). We show that CoEDIT shows generalization abilities to adjacent tasks not seen during fine-tuning and can generalize to composite instructions containing a combination of tasks. Further, our human evaluation studies show that expert human evaluators find the text generated by CoEDIT to be of higher quality than a much larger instruction-tuned LLM." + } + ] + } + ], + "index": 5 + }, + { + "type": "table", + "bbox": [ + 304, + 69, + 526, + 159 + ], + "blocks": [ + { + "bbox": [ + 67, + 111, + 291, + 171 + ], + "lines": [ + { + "bbox": [ + 67, + 111, + 291, + 171 + ], + "spans": [ + { + "bbox": [ + 67, + 111, + 291, + 171 + ], + "type": "text", + "content": "Table 4: Human evaluation results: Pair-wise comparison of CoEDIT-XL against the best-performing 175B-parameter instruction-tuned LLM for text editing (GPT3-EDIT). Scores indicate the % of test inputs for which the human annotators preferred the said model." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 304, + 69, + 526, + 159 + ], + "lines": [ + { + "bbox": [ + 304, + 69, + 526, + 159 + ], + "spans": [ + { + "bbox": [ + 304, + 69, + 526, + 159 + ], + "type": "table", + "html": "
ModelSentence CompressionPoliteness Transfer
SARI†/ CR(%)†S-BLEU‡/ TA(%)†
GPT3-EDIT23.98 / 6.0963.31 / 63.11
T5-xL (prefix)31.47 / 7.6681.43 / 58.82
FLANT5-XL33.21 / 15.2991.91 / 52.69
CoEdit-XL35.17 / 22.7860.32 / 64.45
", + "image_path": "da268024a377722c310f71bc2168675a0b160a73fada18cc96463cab6c561ed1.jpg" + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "table_body" + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 168, + 527, + 216 + ], + "lines": [ + { + "bbox": [ + 302, + 168, + 527, + 216 + ], + "spans": [ + { + "bbox": [ + 302, + 168, + 527, + 216 + ], + "type": "text", + "content": "Table 5: Comparison of CoEDIT-xL against the best-performing non-instruction-tuned model (T5-xL), nontask-specific-tuned model (FLANT5-xL) and GPT3-EDIT on out-of-domain generalization." + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 237, + 427, + 250 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 237, + 427, + 250 + ], + "spans": [ + { + "bbox": [ + 302, + 237, + 427, + 250 + ], + "type": "text", + "content": "6.1 Text Editing Quality" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 301, + 255, + 526, + 513 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 255, + 526, + 513 + ], + "spans": [ + { + "bbox": [ + 301, + 255, + 526, + 513 + ], + "type": "text", + "content": "Since text editing is often subjective, and automatic metrics are not always accurate in measuring if an instruction is satisfied, we conduct human evaluations for our model outputs by linguistic experts on 50 test inputs to ensure they meet the instructional constraints. Given the automatic evaluation results in Section 5, we compare our 3B-parameter CoEDIT-XL model against the largest comparable 175B instruction-tuned LLM for text editing GPT3-EDIT. Specifically, we conducted a pairwise comparison: each annotator was shown an instructional input and outputs from both models (they were not aware which output was generated by which model). They were then asked to evaluate the fluency, accuracy, and meaning preservation of the edited texts and choose the higher-quality output (\"neither\" and \"tie\" are also valid options). We collect three annotations for each question and use the majority vote as the final judgment." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "spans": [ + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "text", + "content": "Table 4 shows the results of the evaluation. The annotators prefer our CoEdit model for " + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "inline_equation", + "content": "64\\%" + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "text", + "content": " of the inputs, whereas, for " + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "inline_equation", + "content": "10\\%" + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "text", + "content": " of the inputs, GPT3-EDIT's output is preferred. In " + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "inline_equation", + "content": "4\\%" + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "text", + "content": " cases, both models produce equally good outputs, whereas, for " + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "inline_equation", + "content": "22\\%" + }, + { + "bbox": [ + 302, + 514, + 527, + 623 + ], + "type": "text", + "content": " of the inputs, both models generate unacceptable outputs. Table 12 provides a side-by-side comparison of the outputs generated by the two models." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 632, + 493, + 645 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 632, + 493, + 645 + ], + "spans": [ + { + "bbox": [ + 302, + 632, + 493, + 645 + ], + "type": "text", + "content": "6.2 Generalizability to Adjacent Tasks" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 651, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 651, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 651, + 526, + 772 + ], + "type": "text", + "content": "We analyze the generalization capabilities of our models by evaluating them on a few related tasks that do not exist in the fine-tuning data. Specifically, we chose two standard NLP tasks – sentence compression (SC) (Filippova and Altun, 2013) and politeness transfer (PT) (Madaan and Yang, 2021). It is noteworthy that while our models were not fine-tuned on these exact tasks, we chose them so that the models could still comprehend them based" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "text", + "content": "5280" + } + ] + } + ], + "index": 13 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 69, + 68, + 527, + 134 + ], + "blocks": [ + { + "bbox": [ + 69, + 68, + 527, + 134 + ], + "lines": [ + { + "bbox": [ + 69, + 68, + 527, + 134 + ], + "spans": [ + { + "bbox": [ + 69, + 68, + 527, + 134 + ], + "type": "table", + "html": "
ModelSizeIteraTeRFluencyClarityCoherenceStyle
ITERATER†JFLEG†ASSET†DiscoFuse-Wiki†GYAFC(↑/↑)WNC(↑/↑)MRPC(↓/↑)
COEDIT-XL3B36.664.5 / 60.742.280.555.1 / 98.370.4 / 48.821.3 / 99.6
COEDIT-XL-C3B36.565.1 / 61.342.074.855.9 / 97.269.7 / 48.520.7 / 98.8
", + "image_path": "b377d9baa65d3b1d0efb8a6681194f06fe3a0dc3251a523c8f65bfd35f24c5ff.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 82, + 169, + 276, + 232 + ], + "blocks": [ + { + "bbox": [ + 77, + 141, + 515, + 153 + ], + "lines": [ + { + "bbox": [ + 77, + 141, + 515, + 153 + ], + "spans": [ + { + "bbox": [ + 77, + 141, + 515, + 153 + ], + "type": "text", + "content": "Table 6: Results for composite prompt training on single-task performance. Scores follow exactly as Table 2." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 82, + 169, + 276, + 232 + ], + "lines": [ + { + "bbox": [ + 82, + 169, + 276, + 232 + ], + "spans": [ + { + "bbox": [ + 82, + 169, + 276, + 232 + ], + "type": "table", + "html": "
CoEDIT-xL-CGPT3-EditTieNeither
38%34%3%25%
CoEDIT-xL-CCoEDIT-xLTieNeither
34%21%14%31%
", + "image_path": "c976982eb6c160f447064c3525e645f574d0e31497c8a33a1da5b8c12ac62cc3.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 240, + 291, + 289 + ], + "lines": [ + { + "bbox": [ + 67, + 240, + 291, + 289 + ], + "spans": [ + { + "bbox": [ + 67, + 240, + 291, + 289 + ], + "type": "text", + "content": "Table 7: Human evaluation results: Pair-wise comparison of CoEDIT-XL-C against GPT3-EDIT and equivalent CoEDIT-XL (with chaining pipeline). Human annotators preferred the said model for % of test inputs." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 308, + 290, + 362 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 308, + 290, + 362 + ], + "spans": [ + { + "bbox": [ + 67, + 308, + 290, + 362 + ], + "type": "text", + "content": "on other tasks they were fine-tuned on. We define them as being adjacent tasks, which still exist within the scope of existing tasks but have not been seen during fine-tuning (blue lines in Fig. 2)." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 363, + 290, + 497 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 363, + 290, + 497 + ], + "spans": [ + { + "bbox": [ + 67, + 363, + 290, + 497 + ], + "type": "text", + "content": "Similar to the previous experiment, in addition to GPT3-EDIT, we compare COEDIT-XL against the similarly-sized prefix-tuned (T5-XL) model and the non-task-specific trained FLANT5-XL model (same models as the ones used in Table 3 (a) and (b)). For evaluation, we curated a set of new instructional prompts geared towards both the new tasks (details in Appendix C). We evaluated the models on the respective test datasets from Filippova and Altun (2013) and Madaan and Yang (2021)." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 498, + 291, + 673 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 498, + 291, + 673 + ], + "spans": [ + { + "bbox": [ + 67, + 498, + 291, + 673 + ], + "type": "text", + "content": "Table 5 shows the results of CoEDIT-XL against various models on the sentence compression and politeness transfer tasks. For SC, we report the SARI metric for rewrite quality and compression ratio (CR) for task-specific quality. For PT, we report Self-BLEU (Zhu et al., 2018) for the rewrite quality and Transfer Accuracy (TA) for the task-specific quality. We observe that CoEDIT consistently outperforms other models on both tasks, which indicates its generalization abilities on these new and unseen adjacent tasks. It is noteworthy that GPT3-EDIT performs quite well out-of-the-box on PT, but not so much on the SC task." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 684, + 235, + 708 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 684, + 235, + 708 + ], + "spans": [ + { + "bbox": [ + 67, + 684, + 235, + 708 + ], + "type": "text", + "content": "6.3 Generalizability to Composite Instructions" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 715, + 290, + 742 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 715, + 290, + 742 + ], + "spans": [ + { + "bbox": [ + 67, + 715, + 290, + 742 + ], + "type": "text", + "content": "Finally, we also explore the capability of our model to understand composite natural language instruc" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 172, + 526, + 252 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 172, + 526, + 252 + ], + "spans": [ + { + "bbox": [ + 302, + 172, + 526, + 252 + ], + "type": "text", + "content": "tions. Composite instructions are made up of a combination of tasks. For example, for the composite instruction, \"Make the text simpler, paraphrase it, and make it formal\", the model needs to simultaneously perform simplification, paraphrasing and formalization of the input sentence." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 259, + 526, + 488 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 259, + 526, + 488 + ], + "spans": [ + { + "bbox": [ + 302, + 259, + 526, + 488 + ], + "type": "text", + "content": "Since there is no publicly available dataset for composite instructions, we create the CoEDIT-COMPOSITE dataset by expanding the CoEDIT dataset to a total of 90k pairs. In addition to the single-task instructions, we use seven new combinations of instructions as part of our training set, with each composite instruction having either two or three tasks. Specifically, these are GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification, Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification, and Paraphrasing-Simplification (more details in §A). We then fine-tune the FLANT5-xL model on CoEDIT-COMPOSITE (referred as CoEDIT-XL-C). The training details are summarized in §D." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 496, + 525, + 603 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 496, + 525, + 603 + ], + "spans": [ + { + "bbox": [ + 302, + 496, + 525, + 603 + ], + "type": "text", + "content": "We evaluate CoEDIT-XL-C on both single and composite instructions. For the single instructions, we use the same evaluation setup as in Table 2 and find that the overall performance of CoEDIT-XL-C is on par with that of CoEDIT-XL (Table 6). This shows that training the model additionally on composite prompts has no negative impact on single-task performance." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "content": "For composite instructions, we conduct human evaluations since there is no standard test dataset available. We use three new task combinations in addition to the seven seen during training to evaluate the model's generalizability. These are Coherence-Paraphrase, Coherence-Simplify, and Coherence-Simplify-Paraphrase. Specifically, we conduct two sets of pairwise annotations (similar setup as the one in Section 6.1) comparing CoEDIT-xL-C with GPT3-Edit and CoEDIT-XL (shown in Table 7) on 30 composite instructions. For a fair comparison against CoEDIT-xL, we pre" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 750, + 290, + 772 + ], + "type": "text", + "content": "9We report Self-BLEU based on the original PT paper since there are no references provided in the dataset." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "text", + "content": "5281" + } + ] + } + ], + "index": 14 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "spans": [ + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": "pare a chaining pipeline" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "^{10}" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " by decomposing composite instructions into a sequence of multiple single instructions and executing them one-by-one. In " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "38\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " of cases, experts show a preference for CoEDIT-XL-C, compared to " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "34\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " for GPT3-EDIT. In " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "3\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " cases, both models are preferred equally, whereas, for " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "25\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " of the cases, none of them are preferred. The experts prefer CoEDIT-XL-C for " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "34\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " of the cases versus " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "21\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " for the chaining baseline. Both outputs are preferred equally in " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "14\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " cases, whereas, for " + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "inline_equation", + "content": "31\\%" + }, + { + "bbox": [ + 67, + 70, + 293, + 262 + ], + "type": "text", + "content": " of the cases, both models generate unacceptable predictions. Table 13 provides a side-by-side comparison of outputs generated by these models." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 273, + 151, + 285 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 273, + 151, + 285 + ], + "spans": [ + { + "bbox": [ + 67, + 273, + 151, + 285 + ], + "type": "text", + "content": "7 Conclusions" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 296, + 291, + 513 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 296, + 291, + 513 + ], + "spans": [ + { + "bbox": [ + 67, + 296, + 291, + 513 + ], + "type": "text", + "content": "We present CoEdit – an open-sourced dataset and set of instruction-tuned large language models that can act as a writing assistant by following natural language instructions to perform various textual edits by removing, updating, or adding words, phrases, and sentences. CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, spanning syntactic, semantic, and stylistic edit requirements. Through extensive experiments, we have shown that CoEdit is capable of further generalizing to unseen, adjacent, and composite instructions to perform edits along multiple dimensions in a single turn. In our human evaluations, we observe that CoEdit can assist writers with various aspects of the text revision process at scale by following natural language instructions." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 524, + 130, + 537 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 524, + 130, + 537 + ], + "spans": [ + { + "bbox": [ + 67, + 524, + 130, + 537 + ], + "type": "text", + "content": "Limitations" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 547, + 291, + 724 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 547, + 291, + 724 + ], + "spans": [ + { + "bbox": [ + 67, + 547, + 291, + 724 + ], + "type": "text", + "content": "Although CoEdit achieves state-of-the-art performance on multiple text editing benchmarks, we acknowledge some limitations to our approach and evaluation methods. Our task-specific fine-tuning (like most other works) mainly focuses on sentence-level editing tasks, and its effectiveness on much longer sequences of texts that are more appropriate to real-world editing settings remains to be seen. Additionally, our system mainly focuses on nonmeaning-changing text edits, thus, which could potentially limit the utility of our model to more real-world scenarios where fact-based editing or corrections are needed. Another limitation of our" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 71, + 527, + 262 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 527, + 262 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 527, + 262 + ], + "type": "text", + "content": "work involves prompt sensitivity. While we construct our inputs by randomly choosing from a pool of verbalizers for every task, we acknowledge that different prompts may induce better or worse edits, and as we evaluate each input with a random verbalizer, a fully controlled comparison for each available prompt across all models is not done. Furthermore, the prompting format was kept uniform across all evaluated models, whereas some models may perform better with a different prompting format. We plan to address this in future work. Finally, computing resource requirements could pose some difficulty in replicating the results (which we try to address by sharing our models publicly)." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 303, + 270, + 393, + 283 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 270, + 393, + 283 + ], + "spans": [ + { + "bbox": [ + 303, + 270, + 393, + 283 + ], + "type": "text", + "content": "Ethics Statement" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 292, + 527, + 413 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 292, + 527, + 413 + ], + "spans": [ + { + "bbox": [ + 302, + 292, + 527, + 413 + ], + "type": "text", + "content": "Since our work mainly focuses on non-meaning-changing text edits, we are able to avoid many issues involving generating harmful text. Although, there is still a possibility of small meaning changes for stylistic tasks, we try to reduce the chance of hallucinations by constraining the generation to strictly edit tasks in order to reduce the chance of adding any new information, or perpetuating biases." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 303, + 423, + 405, + 437 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 423, + 405, + 437 + ], + "spans": [ + { + "bbox": [ + 303, + 423, + 405, + 437 + ], + "type": "text", + "content": "Acknowledgements" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 444, + 527, + 527 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 444, + 527, + 527 + ], + "spans": [ + { + "bbox": [ + 302, + 444, + 527, + 527 + ], + "type": "text", + "content": "We sincerely thank Alice Kaiser-Schatzlein, Robyn Perry, Maya Barzilai, and Claudia Leacock for providing their invaluable linguistic expertise and insightful feedback with the evaluations. We also thank Max Gubin, Leonardo Neves, and Vivek Kulkarni for their helpful suggestions." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 304, + 549, + 362, + 561 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 549, + 362, + 561 + ], + "spans": [ + { + "bbox": [ + 304, + 549, + 362, + 561 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 303, + 567, + 527, + 772 + ], + "type": "list", + "angle": 0, + "index": 14, + "blocks": [ + { + "bbox": [ + 304, + 567, + 527, + 657 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 567, + 527, + 657 + ], + "spans": [ + { + "bbox": [ + 304, + 567, + 527, + 657 + ], + "type": "text", + "content": "Fernando Alva-Manchego, Louis Martin, Antoine Bordes, Carolina Scarton, Benoit Sagot, and Lucia Specia. 2020. ASSET: A dataset for tuning and evaluation of sentence simplification models with multiple rewriting transformations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4668-4679, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 664, + 527, + 743 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 664, + 527, + 743 + ], + "spans": [ + { + "bbox": [ + 304, + 664, + 527, + 743 + ], + "type": "text", + "content": "Vamsi Aribandi, Yi Tay, Tal Schuster, Jinfeng Rao, Huaixiu Steven Zheng, Sanket Vaibhav Mehta, Honglei Zhuang, Vinh Q. Tran, Dara Bahri, Jianmo Ni, Jai Gupta, Kai Hui, Sebastian Ruder, and Donald Metzler. 2022. Ext5: Towards extreme multi-task scaling for transfer learning. In International Conference on Learning Representations." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 303, + 750, + 527, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 750, + 527, + 772 + ], + "spans": [ + { + "bbox": [ + 303, + 750, + 527, + 772 + ], + "type": "text", + "content": "Stephen Bach, Victor Sanh, Zheng Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht" + } + ] + } + ], + "index": 13 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 729, + 291, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 729, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 729, + 291, + 772 + ], + "type": "text", + "content": "10 Chaining increases the inference time, and the ordering of the tasks in the sequence is also likely to result in different outputs. We leave the optimal ordering of the tasks in prompt chaining for future work." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5282" + } + ] + } + ], + "index": 16 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "bbox": [ + 79, + 72, + 291, + 215 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 79, + 72, + 291, + 215 + ], + "spans": [ + { + "bbox": [ + 79, + 72, + 291, + 215 + ], + "type": "text", + "content": "Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-david, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Fries, Maged Alshaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Dragomir Radev, Mike Tian-jian Jiang, and Alexander Rush. 2022. Prompt-Source: An integrated development environment and repository for natural language prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 93-104, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 225, + 291, + 346 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 225, + 291, + 346 + ], + "spans": [ + { + "bbox": [ + 69, + 225, + 291, + 346 + ], + "type": "text", + "content": "Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 356, + 291, + 433 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 356, + 291, + 433 + ], + "spans": [ + { + "bbox": [ + 69, + 356, + 291, + 433 + ], + "type": "text", + "content": "Christopher Bryant, Mariano Felice, Øistein E. Andersen, and Ted Briscoe. 2019. The BEA-2019 shared task on grammatical error correction. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 52-75, Florence, Italy. Association for Computational Linguistics." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 444, + 291, + 521 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 444, + 291, + 521 + ], + "spans": [ + { + "bbox": [ + 69, + 444, + 291, + 521 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 531, + 291, + 587 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 531, + 291, + 587 + ], + "spans": [ + { + "bbox": [ + 69, + 531, + 291, + 587 + ], + "type": "text", + "content": "Jishnu Ray Chowdhury, Yong Zhuang, and Shuyi Wang. 2022. Novelty controlled paraphrase generation with retrieval augmented conditional prompt tuning. Proceedings of the AAAI Conference on Artificial Intelligence, 36(10):10535-10544." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 597, + 291, + 718 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 597, + 291, + 718 + ], + "spans": [ + { + "bbox": [ + 69, + 597, + 291, + 718 + ], + "type": "text", + "content": "Hyung Won Chung, Le Hou, S. Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Wei Yu, Vincent Zhao, Yanping Huang, Andrew M. Dai, Hongkun Yu, Slav Petrov, Ed Huai hsin Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc Le, and Jason Wei. 2022a. Scaling instructionfinetuned language models. ArXiv, abs/2210.11416." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 728, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 728, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 728, + 291, + 772 + ], + "type": "text", + "content": "Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai," + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 314, + 72, + 526, + 160 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 72, + 526, + 160 + ], + "spans": [ + { + "bbox": [ + 314, + 72, + 526, + 160 + ], + "type": "text", + "content": "Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. 2022b. Scaling instruction-finetuned language models." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 304, + 172, + 525, + 206 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 172, + 525, + 206 + ], + "spans": [ + { + "bbox": [ + 304, + 172, + 525, + 206 + ], + "type": "text", + "content": "Allan Collins and Dedre Gentner. 1980. A framework for a cognitive theory of writing. In Cognitive processes in writing, pages 51-72. Erlbaum." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 304, + 216, + 526, + 295 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 216, + 526, + 295 + ], + "spans": [ + { + "bbox": [ + 304, + 216, + 526, + 295 + ], + "type": "text", + "content": "Daniel Dahlmeier, Hwee Tou Ng, and Siew Mei Wu. 2013. Building a large annotated corpus of learner English: The NUS corpus of learner English. In Proceedings of the Eighth Workshop on Innovative Use of NLP for Building Educational Applications, pages 22-31, Atlanta, Georgia. Association for Computational Linguistics." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 304, + 306, + 525, + 349 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 306, + 525, + 349 + ], + "spans": [ + { + "bbox": [ + 304, + 306, + 525, + 349 + ], + "type": "text", + "content": "William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005)." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 361, + 525, + 439 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 361, + 525, + 439 + ], + "spans": [ + { + "bbox": [ + 304, + 361, + 525, + 439 + ], + "type": "text", + "content": "Wanyu Du, Zae Myung Kim, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022a. Read, revise, repeat: A system demonstration for human-in-the-loop iterative text revision. In Proceedings of the First Workshop on Intelligent and Interactive Writing Assistants (In2Writing 2022), pages 96-108, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 450, + 525, + 528 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 450, + 525, + 528 + ], + "spans": [ + { + "bbox": [ + 304, + 450, + 525, + 528 + ], + "type": "text", + "content": "Wanyu Du, Vipul Raheja, Dhruv Kumar, Zae Myung Kim, Melissa Lopez, and Dongyeop Kang. 2022b. Understanding iterative revision from human-written text. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3573-3590, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 539, + 525, + 617 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 539, + 525, + 617 + ], + "spans": [ + { + "bbox": [ + 304, + 539, + 525, + 617 + ], + "type": "text", + "content": "Yupei Du, Qi Zheng, Yuanbin Wu, Man Lan, Yan Yang, and Meirong Ma. 2022c. Understanding gender bias in knowledge base embeddings. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1381-1395, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 628, + 525, + 683 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 628, + 525, + 683 + ], + "spans": [ + { + "bbox": [ + 304, + 628, + 525, + 683 + ], + "type": "text", + "content": "Jane Dwivedi-Yu, Timo Schick, Zhengbao Jiang, Maria Lomeli, Patrick Lewis, Gautier Izacard, Edouard Grave, Sebastian Riedel, and Fabio Petroni. 2022. Editeval: An instruction-based benchmark for text improvements. arXiv." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 694, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 694, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 694, + 525, + 772 + ], + "type": "text", + "content": "Felix Faltings, Michel Galley, Gerald Hintz, Chris Brockett, Chris Quirk, Jianfeng Gao, and Bill Dolan. 2021. Text editing by command. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5259-5274, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5283" + } + ] + } + ], + "index": 16 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 9 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 10, + "blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 117 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 291, + 117 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 291, + 117 + ], + "type": "text", + "content": "Tao Fang, Shu Yang, Kaixin Lan, Derek F. Wong, Jinpeng Hu, Lidia S. Chao, and Yue Zhang. 2023. Is chatgpt a highly fluent grammatical error correction system? a comprehensive evaluation." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 125, + 291, + 193 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 125, + 291, + 193 + ], + "spans": [ + { + "bbox": [ + 69, + 125, + 291, + 193 + ], + "type": "text", + "content": "Katja Filippova and Yasemin Altun. 2013. Overcoming the lack of parallel data in sentence compression. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1481-1491, Seattle, Washington, USA. Association for Computational Linguistics." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 200, + 291, + 235 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 200, + 291, + 235 + ], + "spans": [ + { + "bbox": [ + 69, + 200, + 291, + 235 + ], + "type": "text", + "content": "Linda Flower. 1980. The dynamics of composing: Making plans and juggling constraints. Cognitive processes in writing, pages 31-50." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 243, + 291, + 332 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 243, + 291, + 332 + ], + "spans": [ + { + "bbox": [ + 69, + 243, + 291, + 332 + ], + "type": "text", + "content": "Mor Geva, Eric Malmi, Idan Szpektor, and Jonathan Berant. 2019. DiscoFuse: A large-scale dataset for discourse-based sentence fusion. 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 3443-3455, Minneapolis, Minnesota. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 339, + 291, + 418 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 339, + 291, + 418 + ], + "spans": [ + { + "bbox": [ + 69, + 339, + 291, + 418 + ], + "type": "text", + "content": "J. Edward Hu, Abhinav Singh, Nils Holzenberger, Matt Post, and Benjamin Van Durme. 2019. Large-scale, diverse, paraphrastic bittexts via sampling and clustering. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pages 44-54, Hong Kong, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 426, + 291, + 493 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 426, + 291, + 493 + ], + "spans": [ + { + "bbox": [ + 69, + 426, + 291, + 493 + ], + "type": "text", + "content": "Srinivasan Iyer, Xi Victoria Lin, Ramakanth Pasunuru, Todor Mihaylov, Daniel Simig, Ping Yu, Kurt Shuster, Tianlu Wang, Qing Liu, Punit Singh Koura, et al. 2022. Opt-ilm: Scaling language model instruction meta learning through the lens of generalization. arXiv preprint arXiv:2212.12017." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 502, + 291, + 568 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 502, + 291, + 568 + ], + "spans": [ + { + "bbox": [ + 69, + 502, + 291, + 568 + ], + "type": "text", + "content": "Chao Jiang, Mounica Maddela, Wuwei Lan, Yang Zhong, and Wei Xu. 2020. Neural CRF model for sentence alignment in text simplification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7943-7960, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 576, + 291, + 644 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 576, + 291, + 644 + ], + "spans": [ + { + "bbox": [ + 69, + 576, + 291, + 644 + ], + "type": "text", + "content": "David Kauchak. 2013. Improving text simplification language modeling using unsimplified text data. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1537-1546, Sofia, Bulgaria. Association for Computational Linguistics." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 651, + 291, + 730 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 651, + 291, + 730 + ], + "spans": [ + { + "bbox": [ + 69, + 651, + 291, + 730 + ], + "type": "text", + "content": "Zae Myung Kim, Wanyu Du, Vipul Raheja, Dhruv Kumar, and Dongyeop Kang. 2022. Improving iterative text revision by learning where to edit from other revision tasks. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9986-9999, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 69, + 738, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 738, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 738, + 291, + 772 + ], + "type": "text", + "content": "Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on" + } + ] + } + ], + "index": 9 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 20, + "blocks": [ + { + "bbox": [ + 314, + 72, + 526, + 117 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 72, + 526, + 117 + ], + "spans": [ + { + "bbox": [ + 314, + 72, + 526, + 117 + ], + "type": "text", + "content": "Empirical Methods in Natural Language Processing, pages 3045-3059, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 125, + 526, + 181 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 125, + 526, + 181 + ], + "spans": [ + { + "bbox": [ + 304, + 125, + 526, + 181 + ], + "type": "text", + "content": "Haokun Liu, Derek Tam, Muqeeth Mohammed, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. In Advances in Neural Information Processing Systems." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 190, + 526, + 245 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 190, + 526, + 245 + ], + "spans": [ + { + "bbox": [ + 304, + 190, + 526, + 245 + ], + "type": "text", + "content": "Shayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V Le, Barret Zoph, Jason Wei, et al. 2023. The flan collection: Designing data and methods for effective instruction tuning. arXiv preprint arXiv:2301.13688." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 253, + 526, + 342 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 253, + 526, + 342 + ], + "spans": [ + { + "bbox": [ + 304, + 253, + 526, + 342 + ], + "type": "text", + "content": "Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086-8098, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 350, + 526, + 428 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 350, + 526, + 428 + ], + "spans": [ + { + "bbox": [ + 304, + 350, + 526, + 428 + ], + "type": "text", + "content": "Aman Madaan and Yiming Yang. 2021. Neural language modeling for contextualized temporal graph generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 864-881, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 437, + 526, + 503 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 437, + 526, + 503 + ], + "spans": [ + { + "bbox": [ + 304, + 437, + 526, + 503 + ], + "type": "text", + "content": "Jonathan Mallinson, Jakub Adamek, Eric Malmi, and Aliaksei Severyn. 2022. EdiT5: Semi-autoregressive text editing with t5 warm-start. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 2126-2138, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 512, + 526, + 590 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 512, + 526, + 590 + ], + "spans": [ + { + "bbox": [ + 304, + 512, + 526, + 590 + ], + "type": "text", + "content": "Swaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. 2022. Cross-task generalization via natural language crowdsourcing instructions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3470-3487, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 598, + 526, + 687 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 598, + 526, + 687 + ], + "spans": [ + { + "bbox": [ + 304, + 598, + 526, + 687 + ], + "type": "text", + "content": "Courtney Naples, Keisuke Sakaguchi, Matt Post, and Joel Tetreault. 2015. Ground truth for grammatical error correction metrics. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 588-593, Beijing, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 694, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 694, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 694, + 526, + 772 + ], + "type": "text", + "content": "Courtney Naples, Keisuke Sakaguchi, and Joel Tetreault. 2017. JFLEG: A fluency corpus and benchmark for grammatical error correction. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 229-234, Valencia, Spain. Association for Computational Linguistics." + } + ] + } + ], + "index": 19 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5284" + } + ] + } + ], + "index": 21 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 10 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 8, + "blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 171 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 291, + 171 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 291, + 171 + ], + "type": "text", + "content": "Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Gray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022a. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 181, + 291, + 290 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 181, + 291, + 290 + ], + "spans": [ + { + "bbox": [ + 69, + 181, + 291, + 290 + ], + "type": "text", + "content": "Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F Christiano, Jan Leike, and Ryan Lowe. 2022b. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pages 27730-27744. Curran Associates, Inc." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 301, + 291, + 357 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 301, + 291, + 357 + ], + "spans": [ + { + "bbox": [ + 69, + 301, + 291, + 357 + ], + "type": "text", + "content": "Reid Pryzant, Richard Diehl Martinez, Nathan Dass, Sadao Kurohashi, Dan Jurafsky, and Diyi Yang. 2020. Automatically neutralizing subjective bias in text. Proceedings of the AAAI Conference on Artificial Intelligence, 34(01):480-489." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 367, + 291, + 433 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 367, + 291, + 433 + ], + "spans": [ + { + "bbox": [ + 69, + 367, + 291, + 433 + ], + "type": "text", + "content": "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020a. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 444, + 291, + 498 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 444, + 291, + 498 + ], + "spans": [ + { + "bbox": [ + 69, + 444, + 291, + 498 + ], + "type": "text", + "content": "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020b. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(1)." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 509, + 291, + 608 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 509, + 291, + 608 + ], + "spans": [ + { + "bbox": [ + 69, + 509, + 291, + 608 + ], + "type": "text", + "content": "Sudha Rao and Joel Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. 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 129-140, New Orleans, Louisiana. Association for Computational Linguistics." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 618, + 291, + 707 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 618, + 291, + 707 + ], + "spans": [ + { + "bbox": [ + 69, + 618, + 291, + 707 + ], + "type": "text", + "content": "Jeff Rasley, Samyam Rajbhandari, Olatunj Ruwase, and Yuxiong He. 2020. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD '20, page 3505-3506, New York, NY, USA. Association for Computing Machinery." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "type": "text", + "content": "Machel Reid and Graham Neubig. 2022. Learning to model editing processes. In *Findings of the Association for Computational Linguistics: EMNLP* 2022, pages 3822-3832, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics." + } + ] + } + ], + "index": 7 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 17, + "blocks": [ + { + "bbox": [ + 304, + 72, + 526, + 150 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 526, + 150 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 526, + 150 + ], + "type": "text", + "content": "Emily Reif, Daphne Ippolito, Ann Yuan, Andy Coenen, Chris Callison-Burch, and Jason Wei. 2022. A recipe for arbitrary text style transfer with large language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 837-848, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 304, + 156, + 526, + 244 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 156, + 526, + 244 + ], + "spans": [ + { + "bbox": [ + 304, + 156, + 526, + 244 + ], + "type": "text", + "content": "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, Hong Kong, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 251, + 526, + 427 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 251, + 526, + 427 + ], + "spans": [ + { + "bbox": [ + 304, + 251, + 526, + 427 + ], + "type": "text", + "content": "Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le Scao, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander M Rush. 2022. Multitask prompted training enables zero-shot task generalization. In International Conference on Learning Representations." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 433, + 526, + 500 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 433, + 526, + 500 + ], + "spans": [ + { + "bbox": [ + 304, + 433, + 526, + 500 + ], + "type": "text", + "content": "Timo Schick, Jane A. Yu, Zhengbao Jiang, Fabio Petroni, Patrick Lewis, Gautier Izacard, Qingfei You, Christoforos Nalmpantis, Edouard Grave, and Sebastian Riedel. 2023. PEER: A collaborative language model. In International Conference on Learning Representations." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 507, + 526, + 553 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 507, + 526, + 553 + ], + "spans": [ + { + "bbox": [ + 304, + 507, + 526, + 553 + ], + "type": "text", + "content": "Sanja Šajner, Kim Cheng Sheang, and Horacio Saggion. 2022. Sentence simplification capabilities of transfer-based models. Proceedings of the AAAI Conference on Artificial Intelligence, 36(11):12172-12180." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 560, + 526, + 636 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 560, + 526, + 636 + ], + "spans": [ + { + "bbox": [ + 304, + 560, + 526, + 636 + ], + "type": "text", + "content": "Toshikazu Tajiri, Mamoru Komachi, and Yuji Matsumoto. 2012. Tense and aspect error correction for ESL learners using global context. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 198-202, Jeju Island, Korea. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 644, + 526, + 699 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 644, + 526, + 699 + ], + "spans": [ + { + "bbox": [ + 304, + 644, + 526, + 699 + ], + "type": "text", + "content": "Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 706, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 706, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 706, + 526, + 772 + ], + "type": "text", + "content": "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models." + } + ] + } + ], + "index": 16 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5285" + } + ] + } + ], + "index": 18 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 11 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 292, + 772 + ], + "type": "list", + "angle": 0, + "index": 9, + "blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 138 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 291, + 138 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 291, + 138 + ], + "type": "text", + "content": "Marie M. Vaughan and David D. McDonald. 1986. A model of revision in natural language generation. In 24th Annual Meeting of the Association for Computational Linguistics, pages 90-96, New York, New York, USA. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 147, + 292, + 346 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 147, + 292, + 346 + ], + "spans": [ + { + "bbox": [ + 69, + 147, + 292, + 346 + ], + "type": "text", + "content": "Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Atharva Naik, Arjun Ashok, Arut Selvan Dhanasekaran, Anjana Arunkumar, David Stap, Eshaan Pathak, 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 " + }, + { + "bbox": [ + 69, + 147, + 292, + 346 + ], + "type": "inline_equation", + "content": "1600+" + }, + { + "bbox": [ + 69, + 147, + 292, + 346 + ], + "type": "text", + "content": " 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." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 354, + 291, + 409 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 354, + 291, + 409 + ], + "spans": [ + { + "bbox": [ + 69, + 354, + 291, + 409 + ], + "type": "text", + "content": "Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V Le. 2022. Finetuned language models are zero-shot learners. In International Conference on Learning Representations." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 417, + 291, + 496 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 417, + 291, + 496 + ], + "spans": [ + { + "bbox": [ + 69, + 417, + 291, + 496 + ], + "type": "text", + "content": "Kristian Woodsend and Mirella Lapata. 2011. Learning to simplify sentences with quasi-synchronous grammar and integer programming. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 409-420, Edinburgh, Scotland, UK. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 504, + 290, + 548 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 504, + 290, + 548 + ], + "spans": [ + { + "bbox": [ + 69, + 504, + 290, + 548 + ], + "type": "text", + "content": "Haoran Wu, Wenxuan Wang, Yuxuan Wan, Wenxiang Jiao, and Michael Lyu. 2023. Chatgpt or grammarly? evaluating chatgpt on grammatical error correction benchmark." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 557, + 291, + 602 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 557, + 291, + 602 + ], + "spans": [ + { + "bbox": [ + 69, + 557, + 291, + 602 + ], + "type": "text", + "content": "Wei Xu, Chris Callison-Burch, and Courtney Naples. 2015. Problems in current text simplification research: New data can help. Transactions of the Association for Computational Linguistics, 3:283-297." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 610, + 291, + 666 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 610, + 291, + 666 + ], + "spans": [ + { + "bbox": [ + 69, + 610, + 291, + 666 + ], + "type": "text", + "content": "Wei Xu, Courtney Naples, Ellie Pavlick, Quanze Chen, and Chris Callison-Burch. 2016. Optimizing statistical machine translation for text simplification. Transactions of the Association for Computational Linguistics, 4:401-415." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 675, + 291, + 741 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 675, + 291, + 741 + ], + "spans": [ + { + "bbox": [ + 69, + 675, + 291, + 741 + ], + "type": "text", + "content": "Xingxing Zhang and Mirella Lapata. 2017. Sentence simplification with deep reinforcement learning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 584-594, Copenhagen, Denmark. Association for Computational Linguistics." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 750, + 290, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 750, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 750, + 290, + 772 + ], + "type": "text", + "content": "Yaoming Zhu, Sidi Lu, Lei Zheng, Jiaxian Guo, Weinan Zhang, Jun Wang, and Yong Yu. 2018. Texygen: A" + } + ] + } + ], + "index": 8 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 303, + 72, + 526, + 206 + ], + "type": "list", + "angle": 0, + "index": 12, + "blocks": [ + { + "bbox": [ + 313, + 72, + 526, + 128 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 313, + 72, + 526, + 128 + ], + "spans": [ + { + "bbox": [ + 313, + 72, + 526, + 128 + ], + "type": "text", + "content": "benchmarking platform for text generation models. In The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, SIGIR '18, page 1097-1100, New York, NY, USA. Association for Computing Machinery." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 303, + 139, + 526, + 206 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 139, + 526, + 206 + ], + "spans": [ + { + "bbox": [ + 303, + 139, + 526, + 206 + ], + "type": "text", + "content": "Zhemin Zhu, Delphine Bernhard, and Iryna Gurevych. 2010. A monolingual tree-based translation model for sentence simplification. In Proceedings of the 23rd International Conference on Computational Linguistics (Coling 2010), pages 1353-1361, Beijing, China. Coling 2010 Organizing Committee." + } + ] + } + ], + "index": 11 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 303, + 220, + 475, + 234 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 220, + 475, + 234 + ], + "spans": [ + { + "bbox": [ + 303, + 220, + 475, + 234 + ], + "type": "text", + "content": "A Training Dataset Description" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 243, + 525, + 309 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 243, + 525, + 309 + ], + "spans": [ + { + "bbox": [ + 302, + 243, + 525, + 309 + ], + "type": "text", + "content": "In this section, we discuss the details of the datasets used to create our training datasets and also expand on the dataset creation pipeline. For both CoEDIT and CoEDIT-COMPOSITE, we use the following datasets:" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 312, + 526, + 405 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 312, + 526, + 405 + ], + "spans": [ + { + "bbox": [ + 302, + 312, + 526, + 405 + ], + "type": "text", + "content": "Fluency: We use three prominent corpora for GEC: the NUS Corpus of Learner English (NUCLE) (Dahlmeier et al., 2013), the W&I-LOCNESS (Bryant et al., 2019), and the NAIST LANG-8 Corpus of Learner English (Tajiri et al., 2012), which is one of the largest and most widely used datasets for GEC." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 407, + 526, + 555 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 407, + 526, + 555 + ], + "spans": [ + { + "bbox": [ + 302, + 407, + 526, + 555 + ], + "type": "text", + "content": "Clarity: We split Clarity into two sub-tasks, one focused on Text Simplification, and the other category focused on the set of edits outside of Simplification. In total, we use five corpora for Clarity tasks: Four of them - the NEWSELA corpus (Xu et al., 2015), WIKILARGE (Zhu et al., 2010; Woodsend and Lapata, 2011; Kauchak, 2013), WIKIAUTO (Jiang et al., 2020) and a subset from PARABANKV2 corpus (Hu et al., 2019) focus on text simplification, and the last one comes from the Clarity split of ITER (Du et al., 2022b)." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 557, + 525, + 611 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 557, + 525, + 611 + ], + "spans": [ + { + "bbox": [ + 302, + 557, + 525, + 611 + ], + "type": "text", + "content": "Coherence: We use the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 302, + 613, + 525, + 692 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 613, + 525, + 692 + ], + "spans": [ + { + "bbox": [ + 302, + 613, + 525, + 692 + ], + "type": "text", + "content": "Style: Owing to the subjective nature of STYLE edits based on different sub-intentions (eg. conveying writers' writing preferences, including emotions, tone, and voice, etc.). We use the following datasets for making different stylistic edits to reflect those distinctions:" + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 316, + 706, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 316, + 706, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 316, + 706, + 525, + 772 + ], + "type": "text", + "content": "- Formality: We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018) which is a parallel corpus of informal and formal sentence pairs from two different domains." + } + ] + } + ], + "index": 19 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5286" + } + ] + } + ], + "index": 20 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 12 + }, + { + "para_blocks": [ + { + "bbox": [ + 81, + 71, + 292, + 200 + ], + "type": "list", + "angle": 0, + "index": 2, + "blocks": [ + { + "bbox": [ + 81, + 71, + 292, + 138 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 81, + 71, + 292, + 138 + ], + "spans": [ + { + "bbox": [ + 81, + 71, + 292, + 138 + ], + "type": "text", + "content": "- Neutralization: We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task, where the objective is to remove or mitigate biased words to make sentences more neutral;" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 81, + 146, + 291, + 200 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 81, + 146, + 291, + 200 + ], + "spans": [ + { + "bbox": [ + 81, + 146, + 291, + 200 + ], + "type": "text", + "content": "- Paraphrasing: For paraphrase generation, we used the PARABANKV2 corpus (Hu et al., 2019), since it is a large-scale corpus that contains multiple diverse sentential paraphrases." + } + ] + } + ], + "index": 1 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 67, + 205, + 291, + 339 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 205, + 291, + 339 + ], + "spans": [ + { + "bbox": [ + 67, + 205, + 291, + 339 + ], + "type": "text", + "content": "Once the raw datasets were collected, we randomly sampled them to the quantities mentioned in Table 1 based on a few heuristics such as old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. The sampled pairs were then modified by prefixing the source texts with task-specific verbalizers (Appendix C) to convert a pair to a pair. All our models were then fine-tuned on the verbalized dataset." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 340, + 291, + 597 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 340, + 291, + 597 + ], + "spans": [ + { + "bbox": [ + 69, + 340, + 291, + 597 + ], + "type": "text", + "content": "Composite instructions: Table 8 shows the composition of the COEDIT-COMPOSITE dataset, in addition to the details about datasets and prompts. We use seven such composite instructions during model training. For the first three composite prompts (GEC-Paraphrasing, GEC-Simplification, GEC-Paraphrasing-Simplification), we use GEC datasets to extract datapoints that show simplification and paraphrasing edits in addition to GEC. For the next three prompts (Formality-Paraphrasing, Formality-Simplification, Formality-Paraphrasing-Simplification), we use the formality dataset (GYAFC) to extract pairs which exhibit paraphrasing and simplification edits in addition to formality. Lastly, for the last prompt (Paraphrasing-Simplification), we use the ParabankV2 paraphrasing dataset to extract data points which show a simplification of the source text in addition to paraphrasing." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 597, + 291, + 745 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 597, + 291, + 745 + ], + "spans": [ + { + "bbox": [ + 67, + 597, + 291, + 745 + ], + "type": "text", + "content": "To select the appropriate source-target pairs for a composite instruction, we use similar heuristics as with single-task instructions, i.e. old word retention, complexity ratios, dependency tree depth ratio, and character length ratio. For example, a source-target pair from a GEC dataset can be used for the composite instruction involving GEC, paraphrasing and simplification if the target and source sentence has a high edit distance and low complexity ratio, character length and word retention scores. The exact details can be found in the code." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 746, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 746, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 746, + 291, + 773 + ], + "type": "text", + "content": "Finally, for building the prompts for the composite instructions, we randomly sample from the" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "type": "text", + "content": "task-specific verbalizers and concatenate them. The ordering of the single tasks in a composite instruction is also chosen randomly to ensure better generalization." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 139, + 467, + 153 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 139, + 467, + 153 + ], + "spans": [ + { + "bbox": [ + 302, + 139, + 467, + 153 + ], + "type": "text", + "content": "B Testing Dataset Description" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 163, + 516, + 176 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 163, + 516, + 176 + ], + "spans": [ + { + "bbox": [ + 302, + 163, + 516, + 176 + ], + "type": "text", + "content": "Specifically, we consider the following datasets:" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 182, + 526, + 276 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 182, + 526, + 276 + ], + "spans": [ + { + "bbox": [ + 302, + 182, + 526, + 276 + ], + "type": "text", + "content": "Grammatical Error Correction We use the JF-LEG (Napoles et al., 2017) corpus of English sentences that represents a range of language proficiency levels and comprehensive fluency edits. For evaluation, we use the GLEU (Napoles et al., 2015) score as the primary metric and also report results using the SARI (Xu et al., 2016) metric." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 282, + 526, + 376 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 282, + 526, + 376 + ], + "spans": [ + { + "bbox": [ + 302, + 282, + 526, + 376 + ], + "type": "text", + "content": "Text Simplification We use the TurkCorpus (Xu et al., 2016) and ASSET (Alva-Manchego et al., 2020) datasets, which were both created from WikiLarge data (Zhang and Lapata, 2017), where each complex sentence consists of multiple crowdsourced reference simplifications. We report results using the SARI metric." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 382, + 526, + 464 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 382, + 526, + 464 + ], + "spans": [ + { + "bbox": [ + 302, + 382, + 526, + 464 + ], + "type": "text", + "content": "Coherence We use the Coherence split of ITER (Du et al., 2022b), and the DISCOFUSE dataset (Geva et al., 2019), as it involves linking two given sentences as coherently as possible using edit operations such as inserting discourse connectives. We report results using the SARI metric." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 469, + 526, + 591 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 469, + 526, + 591 + ], + "spans": [ + { + "bbox": [ + 302, + 469, + 526, + 591 + ], + "type": "text", + "content": "Iterative Text Editing We use ITERER (Du et al., 2022b), an iterative text revision dataset spanning five edit intentions (Section 3) across three different domains (ArXiv, News, Wikipedia). We evaluate our models using the SARI metric. We report the performance on individual intentions - Fluency, Clarity, and Coherence, and also aggregated scores on the full dataset, which includes Style edits." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 599, + 510, + 626 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 599, + 510, + 626 + ], + "spans": [ + { + "bbox": [ + 302, + 599, + 510, + 626 + ], + "type": "text", + "content": "The rest of the section describes the evaluation setups for Style-related edits:" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 638, + 526, + 745 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 638, + 526, + 745 + ], + "spans": [ + { + "bbox": [ + 302, + 638, + 526, + 745 + ], + "type": "text", + "content": "Formality Style Transfer We use Grammarly's Yahoo Answers Formality Corpus (GYAFC) (Rao and Tetreault, 2018), a parallel corpus of informal and formal sentence pairs from two different domains. Similar to prior works, we evaluate the quality of rewriting using SARI, and the accuracy of style transfer using a formality classification model11." + } + ] + } + ], + "index": 15 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 302, + 750, + 520, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 750, + 520, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 750, + 520, + 772 + ], + "type": "text", + "content": "11https://huggingface.co/s-nlp/xlmr_formality classifier" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5287" + } + ] + } + ], + "index": 17 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 13 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 70, + 68, + 523, + 495 + ], + "blocks": [ + { + "bbox": [ + 70, + 68, + 523, + 495 + ], + "lines": [ + { + "bbox": [ + 70, + 68, + 523, + 495 + ], + "spans": [ + { + "bbox": [ + 70, + 68, + 523, + 495 + ], + "type": "table", + "html": "
Edit IntentionDatasetsSizeExample InputExample Output
GEC-PARAPHRASENUCLE-14 Lang-8 BEA-191kFix grammar in this sentence, and rewrite this sentence: How about taking account of psychology?One such perspective is to take psychology into account.
GEC-SIMPLIFYNUCLE-14 Lang-8 BEA-191kMake this easier to understand, and remove grammatical mistakes: So it was not like enjoying the tasteful gardens.So it was not as if I could enjoy the pretty gardens.
GEC-PARAPHRASE-SIMPLIFYNUCLE-14 Lang-8 BEA-191kRewrite this sentence, change to simpler wording, and fix the grammar mistakes: Due to ageing, some of the people may suffer from physical and mental depreciation.Due to the effects of aging, some people may suffer.
FORMALITY-PARAPHRASEGYAFC5kMake this sound more formal, and paraphrase: writers dont think about what they will write, they just write!!!Some writers can write freely without putting too much thought to it.
FORMALITY-SIMPLIFYGYAFC2kRewrite more formally, and make this text less complex: Not to my knowledge...I'm a little curious myself now though.I do not think so.
FORMALITY-PARAPHRASE-SIMPLIFYGYAFC4kRewrite the sentence to be simpler, make this sound more formal, and paraphrase this sentence: my answer is what...very clever riddle!!Your riddle was very clever, and I am unsure how to re-spond.
PARAPHRASE-SIMPLIFYParabankV25kUse simpler wording, and write a paraphrased version of the sentence: In your second communication, you requested reinforcements.You asked for backup in your second report
", + "image_path": "4130c8081a6c7f4235d794b323f8c9693c3fbb5a7604bbf0651963611836f2aa.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 502, + 525, + 528 + ], + "lines": [ + { + "bbox": [ + 67, + 502, + 525, + 528 + ], + "spans": [ + { + "bbox": [ + 67, + 502, + 525, + 528 + ], + "type": "text", + "content": "Table 8: Example data instances with composite instructions in the COEDIT-COMPOSITE dataset (90K pairs). Instructional prompts in the inputs are italicized." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 536, + 291, + 617 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 536, + 291, + 617 + ], + "spans": [ + { + "bbox": [ + 67, + 536, + 291, + 617 + ], + "type": "text", + "content": "Neutralization We use WNC (Pryzant et al., 2020), a dataset from the Subjective Bias Neutralization task. Based on prior works, we use Exact-Match (EM) for evaluations, which is the percentage of examples for which the edited text exactly matches the reference(s)." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 629, + 291, + 737 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 629, + 291, + 737 + ], + "spans": [ + { + "bbox": [ + 67, + 629, + 291, + 737 + ], + "type": "text", + "content": "Paraphrasing We use the widely-used Microsoft Research Paraphrase Corpus (MRPC) (Dolan and Brockett, 2005), the STS benchmark from SemEval-2017 (STS) (Cer et al., 2017), and the Quora Question Pairs" + }, + { + "bbox": [ + 67, + 629, + 291, + 737 + ], + "type": "inline_equation", + "content": "^{12}" + }, + { + "bbox": [ + 67, + 629, + 291, + 737 + ], + "type": "text", + "content": " (QQP) datasets. We evaluate paraphrasing on two criteria and metrics: Self-BLEU (Zhu et al., 2018) to measure the diversity of the paraphrases relative to the given source and ref" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 302, + 535, + 525, + 564 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 535, + 525, + 564 + ], + "spans": [ + { + "bbox": [ + 302, + 535, + 525, + 564 + ], + "type": "text", + "content": "erence texts, and Semantic Similarity13 to measure meaning preservation." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 303, + 576, + 412, + 588 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 576, + 412, + 588 + ], + "spans": [ + { + "bbox": [ + 303, + 576, + 412, + 588 + ], + "type": "text", + "content": "C Task Verbalizers" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 598, + 526, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 598, + 526, + 666 + ], + "spans": [ + { + "bbox": [ + 302, + 598, + 526, + 666 + ], + "type": "text", + "content": "We manually curated a variety of task-specific verbalizers to construct the instructional inputs. Table 9 shows the full list of the verbalizers used for training and evaluations. Table 10 shows the verbalizers used for the experiments conducted in Section 6.2." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 691, + 411, + 705 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 691, + 411, + 705 + ], + "spans": [ + { + "bbox": [ + 302, + 691, + 411, + 705 + ], + "type": "text", + "content": "D Training Details" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 714, + 525, + 741 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 714, + 525, + 741 + ], + "spans": [ + { + "bbox": [ + 302, + 714, + 525, + 741 + ], + "type": "text", + "content": "We used the Adam optimizer with a learning rate of " + }, + { + "bbox": [ + 302, + 714, + 525, + 741 + ], + "type": "inline_equation", + "content": "1e - 4" + }, + { + "bbox": [ + 302, + 714, + 525, + 741 + ], + "type": "text", + "content": ". Each model is trained for 5 epochs" + } + ] + } + ], + "index": 8 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 749, + 262, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 749, + 262, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 749, + 262, + 772 + ], + "type": "inline_equation", + "content": "^{12}" + }, + { + "bbox": [ + 67, + 749, + 262, + 772 + ], + "type": "text", + "content": "https://quoradata.quora.com/ First-Quora-Dataset-Release-Question-Pairs" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 750, + 525, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 750, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 750, + 525, + 772 + ], + "type": "text", + "content": "13We use the paraphrase-mpnet-base-v2 model from SentenceTransformers (Reimers and Gurevych, 2019)" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5288" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 14 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 74, + 72, + 519, + 594 + ], + "blocks": [ + { + "bbox": [ + 74, + 72, + 519, + 594 + ], + "lines": [ + { + "bbox": [ + 74, + 72, + 519, + 594 + ], + "spans": [ + { + "bbox": [ + 74, + 72, + 519, + 594 + ], + "type": "table", + "html": "
Edit Intention / TaskVerbalizers
GECFix grammar, Fix grammar in this sentence, Fix grammar in the sentence, Fix grammar errors, Fix grammatical errors, Fix grammaticality, Fix all grammatical errors, Fix grammatical errors in this sentence, Fix grammar errors in this sentence, Fix grammatical mistakes in this sentence, Fix grammaticality in this sentence, Fix grammaticality of the sentence, Fix disfluencies in the sentence, Make the sentence grammatical, Make the sentence fluent, Fix errors in this text, Update to remove grammar errors, Remove all grammatical errors from this text, Improve the grammar of this text, Improve the grammaticality, Improve the grammaticality of this text, Improve the grammaticality of this sentence, Grammar improvements, Remove grammar mistakes, Remove grammatical mistakes, Fix the grammar mistakes, Fix grammatical mistakes
ClarityClarify the sentence, Clarify this sentence, Clarify this text, Write a clearer version for the sentence, Write a clarified version of the sentence, Write a readable version of the sentence, Write a better readable version of the sentence, Rewrite the sentence more clearly, Rewrite this sentence clearly, Rewrite this sentence for clarity, Rewrite this sentence for readability, Improve this sentence for readability, Make this sentence better readable, Make this sentence more readable, Make this sentence readable, Make the sentence clear, Make the sentence clearer, Clarify, Make the text more understandable, Make this easier to read, Clarification, Change to clearer wording, Clarify this paragraph, Use clearer wording
SimplificationSimplify the sentence, Simplify this sentence, Simplify this text, Write a simpler version for the sentence, Rewrite the sentence to be simpler, Rewrite this sentence in a simpler manner, Rewrite this sentence for simplicity, Rewrite this with simpler wording, Make the sentence simple, Make the sentence simpler, Make this text less complex, Make this simpler, Simplify, Simplification, Change to simpler wording, Simplify this paragraph, Simplify this text, Use simpler wording, Make this easier to understand
CoherenceFix coherence, Fix coherence in this sentence, Fix coherence in the sentence, Fix coherence in this text, Fix coherence in the text, Fix coherence errors, Fix sentence flow, Fix sentence transition, Fix coherence errors in this sentence, Fix coherence mistakes in this sentence, Fix coherence in this sentence, Fix coherence of the sentence, Fix lack of coherence in the sentence, Make the text more coherent, Make the text coherent, Make the text more cohesive, logically linked and consistent as a whole, Make the text more cohesive, Improve the cohesiveness of the text, Make the text more logical, Make the text more consistent, Improve the consistency of the text, Make the text clearer, Improve the coherence of the text
Formality Style TransferFormalize, Improve formality, Formalize the sentence, Formalize this sentence, Formalize the text, Formalize this text, Make this formal, Make this more formal, Make this sound more formal, Make the sentence formal, Make the sentence more formal, Make the sentence sound more formal, Write more formally, Write less informally, Rewrite more formally, Write this more formally, Rewrite this more formally, Write in a formal manner, Write in a more formal manner, Rewrite in a more formal manner
NeutralizationRemove POV, Remove POVs, Remove POV in this text, Remove POVs in this text, Neutralize this text, Neutralize the text, Neutralize this sentence, Neutralize the sentence, Make this more neutral, Make this text more neutral, Make this sentence more neutral, Make this paragraph more neutral, Remove unsourced opinions, Remove unsourced opinions from this text, Remove non-neutral POVs, Remove non-neutral POV, Remove non-neutral points of view, Remove points of view, Make this text less biased
ParaphrasingParaphrase the sentence, Paraphrase this sentence, Paraphrase this text, Paraphrase, Write a paraphrase for the sentence, Write a paraphrased version of the sentence, Rewrite the sentence with different wording, Use different wording, Rewrite this sentence, Reward this sentence, Rephrase this sentence, Rewrite this text, Reward this text, Rephrase this text
", + "image_path": "8ba42ada2eb5457a55f9a7ffe48dfc4e870c237ff23dba6e8e71a28e801d89ce.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 75, + 628, + 518, + 745 + ], + "blocks": [ + { + "bbox": [ + 121, + 602, + 471, + 614 + ], + "lines": [ + { + "bbox": [ + 121, + 602, + 471, + 614 + ], + "spans": [ + { + "bbox": [ + 121, + 602, + 471, + 614 + ], + "type": "text", + "content": "Table 9: Complete list of task-specific verbalizers used in our training and test datasets." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 75, + 628, + 518, + 745 + ], + "lines": [ + { + "bbox": [ + 75, + 628, + 518, + 745 + ], + "spans": [ + { + "bbox": [ + 75, + 628, + 518, + 745 + ], + "type": "table", + "html": "
Edit Intention / TaskVerbalizers
Sentence Com-pressionShorten the sentence, Shorten this sentence, Compress this sentence, Shorten this text, Compress this text, Write a shorter version for the sentence, Rewrite the sentence to be shorter, Rewrite this sentence in a shorter manner, Rewrite this sentence for shorter length, Make the sentence short, Make the sentence shorter, Make this shorter, Shorten, Compress, Shorten this paragraph, Shorten this text
PolitenessIncrease politeness, Make this polite, Make this more polite, Make this sound more polite, Make the sentence polite, Make the sentence more polite, Make the sentence sound more polite, Write more politely, Rewrite more politely, Write this more politely, Rewrite this more politely, Write in a polite manner, Write in a more polite manner, Rewrite in a more polite manner
", + "image_path": "1c662f047c698e194c46027d49b751661f04e0b7593d9f1152c8a4e3ac6f0e92.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 135, + 754, + 456, + 766 + ], + "lines": [ + { + "bbox": [ + 135, + 754, + 456, + 766 + ], + "spans": [ + { + "bbox": [ + 135, + 754, + 456, + 766 + ], + "type": "text", + "content": "Table 10: List of task-specific verbalizers used for generalizability experiments." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5289" + } + ] + } + ], + "index": 4 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 15 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 68, + 69, + 526, + 396 + ], + "blocks": [ + { + "bbox": [ + 68, + 69, + 526, + 396 + ], + "lines": [ + { + "bbox": [ + 68, + 69, + 526, + 396 + ], + "spans": [ + { + "bbox": [ + 68, + 69, + 526, + 396 + ], + "type": "table", + "html": "
ModelSizeIteraTeRClarityCoherenceStyle (Paraphrasing)
ITERATER-FLU†ITERATER-CLA†ITERATER-COH†TURK†DiscoFuse-Sport†STS(↓/↑)QQP(↓/↑)
(a)COPY-31.928.630.826.330.539.6 / 10030.1 / 100
T5-LARGE770M15.123.821.734.228.418.0 / 50.518.2 / 62.5
(b)TO*3B27.128.021.234.833.627.7 / 88.710.2 / 63.4
Tk-INSTRUCT*3B22.320.921.232.329.112.3 / 49.519.1 / 79.6
T0++*11B37.930.227.534.135.129.9 / 99.016.6 / 79.1
(c)LLAMA7B32.428.831.427.230.81.4 / 14.41.5 / 35.8
GPT3175B20.921.821.234.627.00 / 8.20 / 13.1
(d)ALPACA7B33.028.931.027.430.80 / 25.80 / 64.4
CHATGPT-36.423.131.437.439.17.9 / 96.98.17 / 96.5
INSTRUCTGPT175B43.728.133.938.945.811.6 / 88.79.3 / 95.5
GPT3-EDIT176B48.331.834.234.748.014.0 / 86.66.4 / 94.5
(e)ALPACA (FS)7B33.028.931.028.432.10 / 39.20 / 63.4
GPT3 (FS)175B33.930.833.938.746.40 / 2.10 / 5.9
CHATGPT (FS)-36.227.035.637.349.40 / 88.70 / 96.8
INSTRUCTGPT (FS)175B44.731.737.539.556.90 / 91.80 / 96.1
(f)ITERATER570M36.730.434.727.240.924.1 / 81.420.6 / 94.3
DELITERATER570M32.028.930.627.831.724.7 / 87.620.4 / 96.6
PEER-3B*3B51.432.132.132.5---
PEER-11B*11B52.132.532.734.1---
(g)CoEdit-L770M46.830.931.538.570.522.4 / 92.815.7 / 97.2
CoEdit-XL3B50.431.331.538.574.620.8 / 94.815.4 / 97.8
CoEdit-XXL11B51.631.831.538.276.221.8 / 93.815.4 / 98.2
", + "image_path": "acf8b36612c81deec4f00c90766ca5e5da5ea70f3f2bb8d119b88fa662c3a7f7.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 66, + 404, + 525, + 501 + ], + "lines": [ + { + "bbox": [ + 66, + 404, + 525, + 501 + ], + "spans": [ + { + "bbox": [ + 66, + 404, + 525, + 501 + ], + "type": "text", + "content": "Table 11: Comparison of CoEDIT against various baselines (on sub-tasks and additional datasets to Table 2), divided into seven groups: (a) a copy baseline and T5-LARGE baseline prefixed only with task-specific tags (i.e. , , etc.) (b) T5-based models, (c) Decoder-only LLMs, (d) Instruction-tuned LLMs, (e) Few-shot evaluations of large pre-trained models (f) SOTA text editing models, and, (g) Variants of CoEDIT models (our work). The first scores for each task (excluding STS and QQP style tasks) are SARI scores. For STS and QQP, the first scores are Self-BLEU scores, and the second is semantic similarity. (" + }, + { + "bbox": [ + 66, + 404, + 525, + 501 + ], + "type": "inline_equation", + "content": "\\uparrow" + }, + { + "bbox": [ + 66, + 404, + 525, + 501 + ], + "type": "text", + "content": ") indicates higher is better, and (" + }, + { + "bbox": [ + 66, + 404, + 525, + 501 + ], + "type": "inline_equation", + "content": "\\downarrow" + }, + { + "bbox": [ + 66, + 404, + 525, + 501 + ], + "type": "text", + "content": ") indicates lower is better. The best-performing models for each dataset are highlighted in bolded boxes. (FS) denotes few-shot evaluation." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 521, + 291, + 602 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 521, + 291, + 602 + ], + "spans": [ + { + "bbox": [ + 67, + 521, + 291, + 602 + ], + "type": "text", + "content": "with early stopping. All models were fine-tuned on A100 GPUs using Deepspeed (Rasley et al., 2020). Maximum sequence lengths for both the source and the target were set to 256 tokens (via filtering). The best-performing checkpoints were chosen based the validation loss." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 613, + 193, + 624 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 613, + 193, + 624 + ], + "spans": [ + { + "bbox": [ + 67, + 613, + 193, + 624 + ], + "type": "text", + "content": "E Model Performance" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 634, + 290, + 702 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 634, + 290, + 702 + ], + "spans": [ + { + "bbox": [ + 67, + 634, + 290, + 702 + ], + "type": "text", + "content": "Table 11 compares the performance of CoEDIT with the other models on the remaining test datasets. We observe similar trends as the ones observed in Table 2, where CoEDIT outperforms most models we compare against." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 711, + 168, + 725 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 711, + 168, + 725 + ], + "spans": [ + { + "bbox": [ + 67, + 711, + 168, + 725 + ], + "type": "text", + "content": "F Data Examples" + } + ] + } + ], + "index": 5 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5290" + } + ] + } + ], + "index": 6 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 16 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 79, + 71, + 516, + 272 + ], + "blocks": [ + { + "bbox": [ + 79, + 71, + 516, + 272 + ], + "lines": [ + { + "bbox": [ + 79, + 71, + 516, + 272 + ], + "spans": [ + { + "bbox": [ + 79, + 71, + 516, + 272 + ], + "type": "table", + "html": "
InstructionGPT3-EditCoEdit-xl (ours)
Fix all grammatical errors: Every one would expect to leave his owns and secrets dreams like to be a painter, a writer ...Every one would expect to leave his owns and secrets dreams like the painting and the write ...Every one would expect to leave his own and secret dreams like to be a painter, a writer...
Make this simpler: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British racquet sport.Fives is a British sport. It is thought to have come from the same place as many racquet sports.
Fix coherence in this text: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful fighting technique. Spike is yet to fully develop it .Phantom Budo is an incredibly pow-erful ability, but Spike has yet to fully develop it.
Use different wording: Judge Gerald W. Heaney, in dissent, said the authorities should have allowed the prisoner to be medicated without the consequence of execution.Judge Gerald W. Heaney, who dis-agreed with the majority decision, said the prisoner should be medicated after important testimony is received.In his dissent, Gerald W. Heaney said the authorities should have allowed the prisoner to be treated without execu-tion.
", + "image_path": "4dbc955386a92ed6a628132b70b7c8a470cd21f4d56ece75c82e085a47106a38.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 70, + 303, + 523, + 743 + ], + "blocks": [ + { + "bbox": [ + 117, + 280, + 474, + 292 + ], + "lines": [ + { + "bbox": [ + 117, + 280, + 474, + 292 + ], + "spans": [ + { + "bbox": [ + 117, + 280, + 474, + 292 + ], + "type": "text", + "content": "Table 12: A sample of text revisions generated by GPT3-EDIT and CoEDIT-XL (ours)." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 70, + 303, + 523, + 743 + ], + "lines": [ + { + "bbox": [ + 70, + 303, + 523, + 743 + ], + "spans": [ + { + "bbox": [ + 70, + 303, + 523, + 743 + ], + "type": "table", + "html": "
InstructionGPT3-EDITCOEDIT-XL (chaining)COEDIT-XL-C
Remove all grammatical errors from this text, and make this text less complex: They follow the way the Sun goes from the east to the west.The Sun rises in the east and sets in the west.They move with the sun as it goes from east to west.They follow the sun as it goes from east to west.
Make the sentence grammatical, rewrite the sentence with different wording, and make this text less complex: Fives is a British sport believed to derive from the same origins as many racquet sports.Fives is a British sport that is believed to derive from the same origins as many racquet sports.It is thought to have come from the same sources as other racquet sports.Fives is a British sport that is believed to have originated from racquet sports.
Make the text coherent, and rewrite this text: Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich. He soon discovers he is dealing with an infinite sandwich and immeasurable garnish. He is then unable to finish his cheese sandwich.Nebulous wasn't too worried about the fact that he couldn't finish his cheese sandwich, but soon realized that this was an endless sandwich and an endless amount of condiments.Nebulous is initially unconcerned when he is unable to finish his cheese sandwich, but soon realizes he is dealing with an endless sandwich and an endless supply of condiments.
Make the text more coherent, simplification, and rewrite this sentence: Phantom Budo is an incredibly powerful ability. Spike has yet to fully develop this awesome fighting technique.Phantom Budo is an incredibly powerful ability. It is an awesome fighting technique that Spike has yet to fully develop.This fighting technique of Spike is still in development.Spike has yet to fully develop his Phantom Budo ability.
Rewrite the sentence to be simpler, and paraphrase this text: The jury asked for transcripts of Quattrone's testimony about his role in the initial public offering allocation process.The jury asked for transcripts of Frank Quattrone's testimony about his role in the initial public offering allocation process.The jury requested a copy of Quattrone's testimony.Transcriptions of Quattrone's testimony were requested by the jury.
Rewrite more formally, and make this easier to understand: Brian, he asked the coolest questions, they suspended him though, i dont know what's up with that!Brian, he asked the coolest questions, they suspended him though, I don't know what's up with that! He was a cool guy, and I liked his questions.I do not understand why Brian was suspended. He had some great questions.I do not know why they suspended Brian.
", + "image_path": "73168c75636054f8ee5fa665b16faaa71ef27f8dcf423ca6183f5a0d7693bedc.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 751, + 525, + 776 + ], + "lines": [ + { + "bbox": [ + 67, + 751, + 525, + 776 + ], + "spans": [ + { + "bbox": [ + 67, + 751, + 525, + 776 + ], + "type": "text", + "content": "Table 13: A sample of text revisions generated by GPT3-EDIT, COEDIT-XL (chaining) and COEDIT-XL-C for composite instructions." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "text", + "content": "5291" + } + ] + } + ], + "index": 4 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 17 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file diff --git a/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_content_list.json b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d5eae20b497ee9826a2c1a263a95d49df4a9cf6a --- /dev/null +++ b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_content_list.json @@ -0,0 +1,2286 @@ +[ + { + "type": "text", + "text": "CoVariance-based Causal Debiasing for Entity and Relation Extraction", + "text_level": 1, + "bbox": [ + 129, + 90, + 867, + 110 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Lin Ren $^{1}$ , Yongbin Liu $^{1*}$ , Yixin Cao $^{2}$ , Chunping Ouyang $^{1}$", + "bbox": [ + 231, + 141, + 764, + 159 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1University of South China, 2Singapore Management University {homurat.rl, yongbinliu03, caoyixin2011} @ gmail.com, ouyangcp@126.com", + "bbox": [ + 189, + 159, + 811, + 193 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 339, + 266 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Joint entity and relation extraction tasks aim to recognize named entities and extract relations simultaneously. Suffering from a variety of data biases, such as data selection bias, and distribution bias (out of distribution, long-tail distribution), serious concerns can be witnessed to threaten the model's transferability, robustness, and generalization. In this work, we address the above problems from a causality perspective. We propose a novel causal framework called covariance and variance optimization framework (OVO) to optimize feature representations and conduct general debiasing. In particular, the proposed covariance optimizing (COP) minimizes characterizing features' covariance for alleviating the selection and distribution bias and enhances feature representation in the feature space. Furthermore, based on the causal backdoor adjustment, we propose variance optimizing (VOP) separates samples in terms of label information and minimizes the variance of each dimension in the feature vectors of the same class label for mitigating the distribution bias further. By applying it to three strong baselines in two widely used datasets, the results demonstrate the effectiveness and generalization of OVO for joint entity and relation extraction tasks. Furthermore, a fine-grained analysis reveals that OVO possesses the capability to mitigate the impact of long-tail distribution. The code is available at https://github.com/HomuraT/OVO.", + "bbox": [ + 144, + 278, + 460, + 734 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 114, + 744, + 258, + 759 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Named Entity Recognition (NER, (Ratinov and Roth, 2009)) and Relation Extraction (RE, (Bunescu and Mooney, 2005)) are both the key fundamental tasks of Information Extraction and both significant predecessor tasks for building knowledge graphs that are used widely in daily life (Chen et al., 2021; Ji et al., 2022; Du et al., 2022a). There are two major methods to extract the final result.", + "bbox": [ + 112, + 769, + 489, + 897 + ], + "page_idx": 0 + }, + { + "type": "image", + "img_path": "images/b36fa68d451e83bdde3a15c7408a80eb3a117f1cb879b420202beb0b5e92aca6.jpg", + "image_caption": [ + "Figure 1: An example of RE on SciERC (the label bias increases the risk of predicting some label possessing majority samples). The confidence at the upper right is predicted by PL-Marker (Ye et al., 2022). The ground-truth relation of the example is PART-OF, but due to the bias in the train set, the NO-RELATION is inferred. After using our OVO, PART-OF is predicted correctly." + ], + "image_footnote": [], + "bbox": [ + 519, + 249, + 870, + 380 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "One is to build a separate model (pipeline) to get the result in one step (Shang et al., 2022), and the other is to use multiple models (joint) to extract entities and relations in turn (Zhong and Chen, 2021; Ye et al., 2022).", + "bbox": [ + 507, + 527, + 882, + 607 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Suffering from various biases in data, such as data selection bias, out-of-distribution, and long-tail distribution (Lin et al., 2022; Wang et al., 2022), models may learn spurious correlations and make erroneous predictions. Although we would like to be able to obtain a uniform (or unbiased) data set, such a dataset is almost nonexistent in real applications. Various biases are always mixed up in real scenarios, for example, selected data in a way that differs from the target population (data selection bias), training and testing data distribution shift (out-of-distribution), the labels with numerous samples may have more chances to inference (long-tail distribution lead to predicting majority bias), and some of the data biases are even unknown. Because statistical correlation is the basis of supervised learning algorithms, the learning algorithms may learn many spurious correlations due to these biases. Finally, this leads to a greatly re", + "bbox": [ + 507, + 613, + 884, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_footnote", + "text": "*Corresponding Author.", + "bbox": [ + 141, + 904, + 292, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_number", + "text": "2627", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 0 + }, + { + "type": "footer", + "text": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 2627-2640 December 6-10, 2023 ©2023 Association for Computational Linguistics", + "bbox": [ + 216, + 945, + 779, + 972 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "duced predictive ability of the models. As shown in Fig. 1 (left), there are different degrees of the data bias of long-tail distribution in SciERC (Luan et al., 2018), which is common for other datasets as well, making models focus more on the labels with numerous samples and performing poorly on the others (fewer chances to the labels with few samples).", + "bbox": [ + 112, + 84, + 487, + 211 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "In recent years, debiasing has become a significant research focus. There are different ways to address the data bias by reweighting samples (Dixon et al., 2018; Rayhan et al., 2017; Wang et al., 2022). These methods focus on the reweights in the sample space and ignore spurious correlations due to data selection bias. Recently, stable learning (Shen et al., 2018, 2020; Zhang et al., 2021) proposed serial ways to de-bias the spurious correlation to find the causal effect of each input feature on the basis of the correlation. Specifically, these methods require extensive calculation resources to identify causality and focus solely on causal effects between features. Additionally, they fail to consider the causal effects for each feature dimension within the same class label.", + "bbox": [ + 115, + 214, + 489, + 469 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "In this work, we introduce a method called the covariance and variance optimization framework (OVO), to optimize the feature vectors from two aspects, decorrelating between features and each feature dimension of the same class label. Our contributions can be summarized as follows:", + "bbox": [ + 112, + 472, + 487, + 568 + ], + "page_idx": 1 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- From decorrelating between features, inspired by stable learning, we use covariance as the confounder degree of features and try to minimize it in each batch of every epoch to learn the causality between features and targets. We minimize the covariance to reduce the collinearity of each feature, get the causal effects, alleviate the data selection and distribution biases, and enhance feature representation. We call this method covariance optimizing (COP).", + "- From feature dimensions of the same class label, according to the variance of each dimension, using the intervention of causal inference (Pearl et al., 2016), it can eliminate the confounding bias from the backdoor path by blocking $F \\gets L \\to P$ as the causal graph shown in Fig.2, so that model can learn the causality from the causal path $F \\rightarrow P$ . We explore the causal correlation between the fea" + ], + "bbox": [ + 136, + 583, + 489, + 917 + ], + "page_idx": 1 + }, + { + "type": "image", + "img_path": "images/dd66949ef3a19de2e11f246d4281b67420fac2c63547e22d7072147fbfcde385.jpg", + "image_caption": [ + "Figure 2: The causal graph of the joint entity and relation extraction task in the classification phase. Bias is something that we can not avoid, such as agnostic data selection bias, data labeling error, and unobservable features." + ], + "image_footnote": [ + "L:RealLabel", + "F : Feature vector", + "P : Prediction", + "B:Bias" + ], + "bbox": [ + 547, + 80, + 685, + 193 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "ture dimensions of the same label and the outcome targets and mitigate the long-tail distribution bias further. We call this method variance optimizing (VOP).", + "bbox": [ + 544, + 300, + 882, + 363 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "- We combine COP and VOP as OVO. To access the effectiveness of OVO, we conduct experiments on the joint entity and relation extraction task. By applying OVO to 3 strong baselines, we observe significant improvements in the performance of this task, which demonstrates the effectiveness and generalization of our proposed method. These results suggest that optimizing feature representation directly is actually an effective way to get improvement and reduce the bias from datasets without model redesigning, and OVO is a feasible framework in this way.", + "bbox": [ + 532, + 376, + 884, + 583 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "2 Related Work", + "text_level": 1, + "bbox": [ + 507, + 609, + 665, + 625 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Stable Learning aims to research how to reduce the agnostic data selection bias and model misspecification problem and make the feature more causal by reweighting samples. CRLR (Shen et al., 2018) proposes an equation to evaluate the degree of confounders called Causal Regularized Logistic Regression and gains the optimal weight by minimizing the confounder. SRDO (Shen et al., 2020) considers the smallest feature of the covariance matrix as the degree of confounder. StableNet (Zhang et al., 2021) adopts stable learning technology into image classification tasks using deep learning models and the results show the strong domain adaptation of the proposed models.", + "bbox": [ + 505, + 636, + 882, + 860 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Span-level NER and RE Models are the approaches using the boundaries of spans as a total feature to recognize the entities and the relation", + "bbox": [ + 507, + 871, + 882, + 917 + ], + "page_idx": 1 + }, + { + "type": "page_number", + "text": "2628", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 1 + }, + { + "type": "image", + "img_path": "images/94a89dcc13f7497cf8bad0a97ff45b1b5f516b2985170803f94acaab965a33bd.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 174, + 86, + 833, + 178 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/c9d9be574a924450d8149fd7336c302af8eab5f056b0c84cad930106327303f3.jpg", + "image_caption": [ + "Variance Optimizing(VOP)", + "Figure 3: The overview of OVO. In the training phase of the model, we insert COP and VOP as extra optimization for feature vectors. For COP, there is an inner loop to learn the optimal $\\mathbf{W}$ using gradient descent, and $Loss_W$ is the loss function of $\\mathbf{W}$ calculated according to eq. 4. For VOP, Backdoor Adjustment is used to reduce the bias from datasets. Note that $Loss_W$ only computes the gradient of $\\mathbf{W}$ , and only the final optimal weights $\\hat{\\mathbf{W}}$ created in COP will be applied to the model training process. The $Loss_{VOP}$ will be used in model training directly. $Loss_{orig}$ means the loss employed on the original method; $\\mathbf{O}$ means zero matrix." + ], + "image_footnote": [], + "bbox": [ + 173, + 198, + 823, + 331 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "between two entities. DyGIE++ (Wadden et al., 2019) and SpERT.PL (Sai et al., 2021) extract features of spans and share them between NER and RE tasks. PURE (Zhong and Chen, 2021) uses two separate span models to recognize entities and relations without interaction with each other and proposed levitated markers to reinforce the boundaries information of spans. PL-Marker (Ye et al., 2022) proposes neighborhood-oriented packing and subject-oriented packing methods to leverage the levitated markers.", + "bbox": [ + 110, + 451, + 487, + 627 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Variance and Covariance are two important metrics in deep learning. In confidence learning (Mukherjee and Awadallah, 2020), they are negatively correlated with the confidence of models and samples. Moreover, in active learning (Cohn et al., 1996), they are correlated with generalization error and bias which can be indirectly reduced by minimizing variance or covariance. Recently, IDEAL (Guo et al., 2022) uses variance as one of the measures for the inconsistency of unlabeled samples. In this work, we use them to estimate the feature representation and correlation between features respectively.", + "bbox": [ + 112, + 639, + 489, + 848 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3 Method", + "text_level": 1, + "bbox": [ + 112, + 860, + 218, + 876 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "In this section, we first briefly introduce the general inference process of the joint entity and relation", + "bbox": [ + 112, + 887, + 487, + 919 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "extraction methods. Then, we will describe covariance optimizing (COP) and variance optimizing (VOP).", + "bbox": [ + 507, + 451, + 884, + 500 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.1 Background: Inference Process of Joint Entity and Relation Extraction Methods", + "text_level": 1, + "bbox": [ + 507, + 510, + 870, + 541 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "In the joint entity and relation extraction task, the goal is to extract both entities and the relations between them from a given text. The general process of this task involves several steps. Firstly, an encoder module is used to transfer pure text to a numerical representation that captures the semantic information. This can be done using techniques like word embeddings or pre-trained language models (PLMs).", + "bbox": [ + 505, + 546, + 884, + 690 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\n\\mathbf {S} = w _ {1}, w _ {2}, \\dots , w _ {l} \\tag {1}\n$$\n", + "text_format": "latex", + "bbox": [ + 618, + 699, + 882, + 722 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\n\\mathbf {H} = \\operatorname {e n c o d e r} (\\mathbf {S})\n$$\n", + "text_format": "latex", + "bbox": [ + 618, + 719, + 744, + 734 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Where $w_{i}$ indicates the $i$ -th word of the given text; $l$ means the length of the text; $\\mathbf{H} \\in \\mathbf{R}^{l \\times n}$ represents the representation of the text and $n$ is the dimension size.", + "bbox": [ + 507, + 741, + 882, + 804 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "For NER, the encoded representations are passed through an entity extraction module to identify and classify entities in the text. The formulations of span-level methods are as follows:", + "bbox": [ + 507, + 807, + 882, + 871 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\nf _ {(i, j)} ^ {\\text {s p a n}} = \\operatorname {e x t r a c t o r} (\\mathbf {H}, i, j) \\tag {2}\n$$\n", + "text_format": "latex", + "bbox": [ + 610, + 877, + 882, + 904 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\nl a b e l _ {(i, j)} ^ {s p a n} = \\operatorname {c l a s s i f i e r} \\left(f _ {(i, j)} ^ {s p a n}\\right)\n$$\n", + "text_format": "latex", + "bbox": [ + 584, + 900, + 803, + 922 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "2629", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Where $0 \\leq i \\leq j \\leq l$ indicates the boundary of a span; $l$ means the length of the given text; $f_{(i,j)}^{span}$ is the feature of a span; extractor $(\\cdot)$ is a function to gain the feature of given spans; classifier $(\\cdot)$ is a function to predict the label of spans according to its representation.", + "bbox": [ + 112, + 84, + 487, + 179 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "For RE, $\\mathbf{H}$ and the spans of identified entities are used to determine the relations between the entities.", + "bbox": [ + 112, + 181, + 489, + 212 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\begin{array}{l} f _ {(i, j)} ^ {r e l} = \\operatorname {e x t r a c t o r} (\\mathbf {H}, \\text {s p a n} _ {i}, \\text {s p a n} _ {j}) \\\\ l a b e l _ {(i, j)} ^ {r e l} = \\operatorname {c l a s s i f i e r} \\left(f _ {(i, j)} ^ {r e l}\\right) \\\\ \\end{array}\n$$\n", + "text_format": "latex", + "bbox": [ + 144, + 223, + 435, + 266 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Where $span_{i}$ is the entity identified by NER; extractor $(\\cdot)$ is a function to acquire the feature of given relations; classifier $(\\cdot)$ is a function to predict the label of relations. In this work, OVO is used to optimize the $f_{(i,j)}^{span}$ and $f_{(i,j)}^{rel}$ during training.", + "bbox": [ + 112, + 278, + 487, + 362 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.2 Covariance Optimizing", + "text_level": 1, + "bbox": [ + 112, + 370, + 344, + 386 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "When the features exhibit linear correlations with each other, it can lead to instability in parameter estimation. Consequently, the optimal model becomes uncertain, and the presence of selection and distribution biases is amplified during inference. This phenomenon is called collinearity (Dormann et al., 2013). For example, $y = x_{1} + x_{2}$ and $y = 100x_{1} - 98x_{2}$ have identical performance if assumption $x_{1} = x_{2}$ holds in train datasets, but if $x_{1} = 1.01x_{2}$ holds in test datasets, the gaps of them will be huge. Besides collinearity, the correlation between features also poses the same impact in deep learning. One straightforward way to reduce the effect of collinearity and correlation is to analyze them among features and then remove some relevant features. However, due to the inexplicability and excessive number of features in PLMs, this method is difficult to afford.", + "bbox": [ + 112, + 391, + 489, + 678 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "The methods of stable learning (Zhang et al., 2021) show that feature representations will be more causal when giving suitable weights for samples in loss calculating during training. Inspired by this, we propose covariance optimizing (COP) to alleviate the collinearity and correlation between features with low resource consumption, as well as improve the causality of features.", + "bbox": [ + 112, + 681, + 487, + 809 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "In COP, covariance is used to measure the correlation between features, and the target is to acquire suitable weights by minimizing the covariance among all features using gradient descent:", + "bbox": [ + 112, + 810, + 489, + 875 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\widehat {\\mathbf {W}} = \\underset {\\mathbf {W}} {\\operatorname {a r g m i n}} \\sum_ {i, j, i \\neq j} \\left(\\operatorname {c o v} \\left(\\mathbf {W F} ^ {i}, \\mathbf {W F} ^ {j}\\right)\\right) ^ {2} \\tag {4}\n$$\n", + "text_format": "latex", + "bbox": [ + 134, + 885, + 487, + 921 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Where $\\mathbf{F}$ and $\\mathbf{W}$ mean the feature vectors and weights; $\\mathbf{W} \\in \\mathbf{R}^n$ is a vector representing all sample weights and $n$ is the number of samples, holding $\\sum_{i}^{n} w_i = 1$ by softmax function. $\\mathbf{F}^i$ means the $i$ -th dimension feature of all samples. $cov(\\cdot, \\cdot)$ is the covariance function.", + "bbox": [ + 507, + 84, + 884, + 179 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Next, $\\widehat{\\mathbf{W}}$ is used to weigh the loss of the corresponding sample.", + "bbox": [ + 507, + 181, + 882, + 214 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\nL o s s _ {C O P} = \\sum_ {i = 0} ^ {n} \\hat {w} _ {i} L o s s _ {o r i g} \\left(p _ {i}, t _ {i}\\right) \\tag {5}\n$$\n", + "text_format": "latex", + "bbox": [ + 559, + 228, + 882, + 268 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Where $\\hat{w}_i\\in \\widehat{\\mathbf{W}}$ is the final weight for the $i$ -th sample; $p_i$ and $t_i$ mean the prediction distribution and real label respectively; $Loss_{orig}$ means the loss employed on the original method.", + "bbox": [ + 507, + 285, + 880, + 350 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "However, there are two difficulties in performing the above process directly. Firstly, the majority of PLMs have an extensive number of parameters, ranging from hundreds of millions (Devlin et al., 2019) to billions (Du et al., 2022b) and even more, thus the computation of weights for the entire dataset requires significant computational resources, making it expensive and potentially unaffordable during training. Secondly, incorporating features from previous batches or epochs may lead to feature inconsistency due to the continuous evolution of features during training.", + "bbox": [ + 507, + 351, + 882, + 545 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "To overcome the aforementioned difficulties, inspired by MoCo (He et al., 2020), we only compute optimal weights for samples in the current batch, utilizing previous features and weights as additional fixed information. Furthermore, to ensure feature consistency, we discard the earliest features and weights:", + "bbox": [ + 507, + 546, + 882, + 658 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\begin{array}{l} \\mathbf {F} _ {i} = \\left[ \\mathbf {F} _ {i - 1} \\left[ \\left\\lfloor L _ {F _ {i}} / (n + 1) \\right\\rfloor : \\right], \\mathbf {F} _ {c u r} \\right] \\tag {6} \\\\ \\mathbf {W} _ {i} = \\left[ \\mathbf {W} _ {i - 1} \\left[ \\left[ L _ {W _ {i}} / (n + 1) \\right]: \\right], \\mathbf {W} _ {c u r} \\right] \\\\ \\end{array}\n$$\n", + "text_format": "latex", + "bbox": [ + 539, + 674, + 880, + 709 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Where \\(\\mathbf{F}\\) and \\(\\mathbf{W}\\) mean the feature vectors and weights; \\(i\\) means the index of the current batch; \\(L_{*}\\) is the length of \\(*\\); \\(*_{cur}\\) means feature vectors or weights in the current batch; \\(n\\) is the batch number of feature vectors and weights needed to be saved; \\(\\lfloor \\cdot \\rfloor\\) is the floor function; \\([l:\\] means to delete first \\(l\\) data.", + "bbox": [ + 507, + 725, + 880, + 835 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "To further mitigate the feature inconsistency, we fuse and emphasize the current information with previous features and weights. Firstly, we randomly sample from $\\mathbf{F}_{cur}$ and the corresponding $\\mathbf{W}_{cur}$ until the number of samples is the same as", + "bbox": [ + 507, + 839, + 882, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_number", + "text": "2630", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 3 + }, + { + "type": "image", + "img_path": "images/cfb71963e12707394ecfd4902e961e4ede838b7d83edde5f6e72926c6297220b.jpg", + "image_caption": [ + "Figure 4: The original causal graph of the joint entity and relation extraction task in the classification phase (left) with its alternate after intervention (right)." + ], + "image_footnote": [], + "bbox": [ + 151, + 80, + 453, + 174 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "$\\mathbf{F}_i$", + "bbox": [ + 112, + 250, + 142, + 265 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathbf {F} _ {c u r} ^ {\\prime} = [ \\mathbf {F} _ {c u r} [ R _ {1} ], \\dots , \\mathbf {F} _ {c u r} [ R _ {L} ] ]\n$$\n", + "text_format": "latex", + "bbox": [ + 166, + 275, + 421, + 294 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathbf {W} _ {c u r} ^ {\\prime} = \\left[ \\mathbf {W} _ {c u r} [ R _ {1} ], \\dots , \\mathbf {W} _ {c u r} [ R _ {L} ] \\right] \\tag {7}\n$$\n", + "text_format": "latex", + "bbox": [ + 163, + 292, + 487, + 315 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Where $\\mathbf{F}_{cur}^{\\prime}$ and $\\mathbf{W}_{cur}^{\\prime}$ are the sets after random sampling; $L$ is the length of $\\mathbf{F}_i$ , $R_i$ is a random integer from 0 to $L$ , and $[i]$ means getting the $i$ -th element. And then, we fuse current information with the previous.", + "bbox": [ + 112, + 325, + 487, + 406 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathbf {F} _ {i} ^ {\\prime} = \\alpha \\mathbf {F} _ {i} + (1 - \\alpha) \\mathbf {F} _ {c u r} ^ {\\prime} \\tag {8}\n$$\n", + "text_format": "latex", + "bbox": [ + 196, + 417, + 487, + 441 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathbf {W} _ {i} ^ {\\prime} = \\alpha \\mathbf {W} _ {i} + (1 - \\alpha) \\mathbf {W} _ {c u r} ^ {\\prime}\n$$\n", + "text_format": "latex", + "bbox": [ + 191, + 438, + 410, + 456 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Where $\\alpha$ is a hyperparameter between [0, 1] regarding how much previous information needs to be saved. Finally, $\\mathbf{F}_i^{\\prime}$ and $\\mathbf{W}_i^{\\prime}$ will be applied to eq. 4 as $\\mathbf{W}$ and $\\mathbf{F}$ . Note that $\\mathbf{F}_i^{\\prime}$ is used to gain the optimal $\\mathbf{W}_i^{\\prime}$ , but only the part of $\\mathbf{W}_{cur}$ will be updated and used to weight sample loss.", + "bbox": [ + 112, + 466, + 487, + 562 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "To enhance the applicability of COP, we use a hyperparameter called COP rate to adjust the degree of influence of COP during training. After acquiring the optimal weights, the loss function is as follows:", + "bbox": [ + 112, + 563, + 487, + 642 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\hat {w} _ {i} ^ {\\prime} = (1 - r _ {C O P}) + r _ {C O P} * \\hat {w} _ {i}\n$$\n", + "text_format": "latex", + "bbox": [ + 203, + 651, + 448, + 668 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\nL o s s _ {C O P} = \\sum_ {i = 0} ^ {n} \\hat {w} _ {i} ^ {\\prime} L o s s _ {o r i g} \\left(p _ {i}, t _ {i}\\right) \\tag {9}\n$$\n", + "text_format": "latex", + "bbox": [ + 154, + 673, + 487, + 712 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Where $\\hat{w}_i\\in \\widehat{\\mathbf{W}}$ is the final weight of the $i$ -th sample; $r_{COP}\\in (0,1]$ indicates COP rate.", + "bbox": [ + 112, + 725, + 489, + 760 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "3.3 Variance Optimizing", + "text_level": 1, + "bbox": [ + 112, + 769, + 326, + 785 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Inspired by causal intervention (Pearl et al., 2016), we construct a causal graph (Fig. 2) regarding the causality from feature vectors to the final targets. To clarify our objective, in our causal analysis, we focus on the mitigation of bias arising from the long-tail distribution. This bias tends to make labels with a substantial number of samples more readily predictable during the inference process.", + "bbox": [ + 112, + 790, + 489, + 917 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Moreover, the effectiveness of mitigating this bias can be easily quantified.", + "bbox": [ + 507, + 84, + 880, + 115 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "As shown in Fig. 2, $F \\gets L \\to P$ is a backdoor path, a path that connects $F$ and $P$ but does not start with $F$ , from $F$ to $P$ in which $F$ , $L$ , and $P$ are feature vectors, real labels, and model predictions respectively. Thus, the label distribution from the datasets is the confounder between the feature vectors and the final predictions, creating a spurious correlation that disturbs model inference and causes lower performance. For a better understanding of the causal graph, we introduce it as follows: The labels in datasets are the optimizing target of model training $(L \\to P)$ which also takes effect on the feature vector learning $(L \\to F)$ . Appendix. A shows more detail of the causal graph.", + "bbox": [ + 507, + 116, + 884, + 341 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "In order to remove the confounder caused by backdoor path $F \\leftarrow L \\rightarrow P$ and make the model learn direct causality between feature vectors and predictions, we introduce do-operator (Pearl et al., 2016) on feature vectors $F$ to gain the causality of $F$ on $P$ called $p(P|do(F))$ . As shown in Fig. 4 right, through do-operator, the edge causing confounder, $F \\leftarrow L \\rightarrow P$ , is blocked, so that the spurious correlation has been removed.", + "bbox": [ + 507, + 342, + 882, + 485 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Backdoor adjustment (Pearl, 1995) is a method to reduce confounders in causal inference, and it can perform $do$ -operator on the observational datasets. Formally, the backdoor adjustment reduces the bias as:", + "bbox": [ + 507, + 486, + 882, + 565 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\np (P | d o (F)) = \\sum_ {L} p (P | F, L) p (L) \\tag {10}\n$$\n", + "text_format": "latex", + "bbox": [ + 547, + 570, + 882, + 602 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Where the detail for the equation is in Appendix B.", + "bbox": [ + 507, + 609, + 882, + 625 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Inspired by the eq. 10, it can reduce the spurious correlation if we process the feature vectors of the same label separately. So we propose a method to optimize the feature vectors in the same label by using the property of variance.", + "bbox": [ + 507, + 625, + 880, + 705 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "When the fluctuation among samples is serious, the variance will be large, and vice versa. In other words, we can minimize the variance between the samples of the same label to bring them closer together and at the same time achieve intervention. Along this way, we introduce a new loss function using the variance to optimize the feature representation as follows:", + "bbox": [ + 507, + 706, + 882, + 832 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\nL o s s _ {V O P} = \\sum_ {l = 0} ^ {L} \\sum_ {n = 0} ^ {N} v a r \\left(\\mathbf {F} _ {(l, n)}\\right) \\tag {11}\n$$\n", + "text_format": "latex", + "bbox": [ + 571, + 837, + 882, + 881 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Where $L$ is the label amount in one batch of data, $N$ is the dimension amount of feature vectors, and", + "bbox": [ + 507, + 887, + 882, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_number", + "text": "2631", + "bbox": [ + 480, + 927, + 517, + 940 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "$\\mathbf{F}_{(l,n)}$ means the n-th dimensional feature of all samples of label $l$ . $var(\\cdot)$ is the operation of computing sample variance. Note that missing several labels is possible in one batch of data.", + "bbox": [ + 112, + 84, + 487, + 147 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "This method is called variance optimizing (VOP). Additionally, benefiting from the random mechanism of mini-batch gradient descent, one sample can combine with different samples into the same batch in each training epoch, which brings two main advantages as follows: Firstly, the diversity of sample combination is ensured automatically. Secondly, the impact of abnormal samples is mitigated due to the overall optimization.", + "bbox": [ + 112, + 149, + 487, + 293 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "3.4 Overall Optimization Framework", + "text_level": 1, + "bbox": [ + 112, + 303, + 425, + 318 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We combine COP and VOP into a unified framework called covariance and variance optimization framework (OVO), as shown in Fig. 3, and the algorithm. 1 (Appendix. C) illustrates the detailed training procedure of OVO. The final loss is as follows:", + "bbox": [ + 112, + 323, + 487, + 418 + ], + "page_idx": 5 + }, + { + "type": "equation", + "text": "\n$$\nL o s s _ {f i n a l} = L o s s _ {C O P} + \\lambda L o s s _ {V O P} \\tag {12}\n$$\n", + "text_format": "latex", + "bbox": [ + 144, + 426, + 487, + 444 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Where $\\lambda$ is a hyperparameter for the weight of $Loss_{VOP}$ .", + "bbox": [ + 112, + 449, + 487, + 481 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4 Experiment", + "text_level": 1, + "bbox": [ + 112, + 491, + 250, + 508 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4.1 Dataset", + "text_level": 1, + "bbox": [ + 112, + 516, + 220, + 530 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We conduct experiments to evaluate our approach on two popular joint entity and relation extraction datasets: ACE051 and SciERC2(Luan et al., 2018). For ACE2005, we use the same split following (Luan et al., 2019) in the train, development, and test sets. ACE2005 dataset includes various domain data, such as newswire and broadcast news, while the SciERC dataset includes abstracts collected from AI conferences/workshops.", + "bbox": [ + 112, + 537, + 487, + 680 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Additionally, to evaluate the effectiveness of OVO in out-of-distribution settings, we conduct experiments on CrossRE $^{3}$ (Bassignana and Plank, 2022) which is a dataset for the relation extraction task across 6 different domains, namely news, politics, natural science, music, literature, and artificial intelligence.", + "bbox": [ + 112, + 681, + 487, + 793 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4.2 Evaluation metrics", + "text_level": 1, + "bbox": [ + 112, + 804, + 300, + 818 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We follow the evaluation metrics in previous close works to evaluate the experiment results' performance using the micro F1 measure. For the NER", + "bbox": [ + 112, + 824, + 487, + 873 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "task, we use the span-level benchmark to evaluate, which one entity is considered recognized correctly if and only if both its boundary and type are precisely predicted. For the RE, we adopt two evaluation metrics as follows: (1) boundaries evaluation (Rel): a relation is considered recognized correctly if and only if the boundaries of head and tail entities are correct, and their relation label is correct; (2) strict evaluation $(\\mathbf{Rel}+)$ : in addition to the requirement of Rel, the types of two entities are also needed to be correctly predicted.", + "bbox": [ + 507, + 84, + 884, + 261 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4.3 Implementation Details", + "text_level": 1, + "bbox": [ + 507, + 275, + 741, + 290 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We apply OVO to 3 of out of top-5 strong baselines4, specifically PURE (Zhong and Chen, 2021), SpERT.PL (Sai et al., 2021), and PL-Marker (Ye et al., 2022). For ACE2005, the BERT encoders are bert-base-uncased (Devlin et al., 2019) and albert-xxlarge-v1(Lan et al., 2020) which are in the common domain. For SciERC, the BERT encoder is scibert-scivocab-uncased (Beltagy et al., 2019) which is in the scientific domain. We use our proposed method, OVO, to optimize the feature vectors as the extra plugin beyond the common model training with all hyperparameters the same as the base models. To ensure robustness, we conduct experiments with 3 different seeds and report the average scores.", + "bbox": [ + 507, + 297, + 884, + 537 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4.4Baselines", + "text_level": 1, + "bbox": [ + 507, + 551, + 628, + 565 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "For comparison, we choose serials of state-of-the-art models as follows: (1) PURE (Zhong and Chen, 2021) uses two independent models for NER and RE respectively in a frustratingly easy way, and is the first to propose levitated markers for RE task called PURE(Approx) to accelerate the inference speed, but with a slight drop in performance; (2) SpERT.PL (Sai et al., 2021) uses part-of-speech and logits of entities to enhance the features of entities and relations which shows strong performance in the SciERC dataset. (3) PL-Marker (Ye et al., 2022) is the first to leverage levitated markers to both NER and RE tasks using a packed method with great improvement.", + "bbox": [ + 507, + 574, + 882, + 797 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Additionally, for comparison with other causal debiasing methods, we choose two related methods as follows: (1) CFIE (Nan et al., 2021) uses causal inference to tackle the long-tailed IE issues; (2) CoRE (Wang et al., 2022) designs a counterfactual", + "bbox": [ + 507, + 800, + 882, + 879 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "1https://catalog.ldc.upenn.edu/LDC2006T06", + "bbox": [ + 134, + 877, + 448, + 891 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "2http://nlp.cs.washington.edu/sciIE/", + "bbox": [ + 136, + 891, + 408, + 904 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "3https://github.com/mainlp/CrossRE", + "bbox": [ + 136, + 904, + 394, + 917 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "4https://paperswithcode.com/sota/", + "bbox": [ + 507, + 892, + 781, + 904 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "joint-entity-and-relation-extraction-on", + "bbox": [ + 512, + 904, + 811, + 917 + ], + "page_idx": 5 + }, + { + "type": "page_number", + "text": "2632", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "analysis to debias RE by reducing the side-effects of entity mentions.", + "bbox": [ + 112, + 84, + 487, + 116 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.5 Results", + "text_level": 1, + "bbox": [ + 112, + 129, + 218, + 142 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Table 1 shows the results of comparative experiments between our proposed method and baselines. As is shown, with the scibert-scivocab-uncased encoder, our proposed method, OVO, outperforms PURE-F, SpERT.PL, and PL-Marker by $+3.3\\%$ $+2.1\\%$ ,and $+2.9\\%$ with Rel $^+$ on SciERC respectively. Furthermore, on ACE2005, with both bertbase-uncased encoder and albert-xxlarge-v1 encoder, our method also outperforms the baselines on Rel+. Such improvements over baselines indicate the effectiveness and generalization of OVO.", + "bbox": [ + 112, + 149, + 489, + 326 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Additionally, due to CoRE (Wang et al., 2022) being only for RE, we compare OVO with CFIE (Nan et al., 2021) and CoRE only in RE using the result of OVO in NER. For the base model, we chose PURE because of SpERT.PL is a joint model that cannot handle NER and RE tasks separately and PL-Marker uses a packed method that cannot handle only one pair of entities in RE. As shown in Table 1, CFIE and CoRE can improve performance somewhat but are still lower than OVO. The results can show the effectiveness of OVO compared with other methods. Specifically, on SciERC, the REL+ of OVO was $1.6\\%$ higher than CFIE; on Ace2005, the REL+ of OVO was $0.2\\%$ higher than CoRE.", + "bbox": [ + 115, + 328, + 489, + 551 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "To evaluate the effectiveness of OVO on out-of-distribution, we conduct experiments on an out-domain setting as follows: using the train set of one domain during training, and using the test sets of the other five domains during testing. We choose PL-Marker as the base model and then apply OVO on each domain. As shown in Table. 2, using OVO gains improvements in all cases with an average improvement of $1.5\\%$ and a best improvement of $2.4\\%$ in the ai domain.", + "bbox": [ + 112, + 554, + 489, + 713 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.6 Ablation Study", + "text_level": 1, + "bbox": [ + 112, + 727, + 280, + 741 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "In this section, we conduct ablation studies to elucidate the effectiveness of different components of our proposed method on the baseline PL-Marker (Ye et al., 2022). We use the evaluation metrics the same as in Table 1 on both ACE2005 and SciERC datasets using bert-base-uncased and scibert-scivocab-uncased as bert encoders respectively.", + "bbox": [ + 112, + 747, + 489, + 859 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "w/o. COP: To evaluate the effectiveness of covariance optimizing, we remove COP and only use VOP in the model training process and set", + "bbox": [ + 112, + 871, + 489, + 917 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "all weights of feature vectors as 1 for computing $Loss_{COP}$ . As shown in Table 3, the performance of Rel and $Rel+$ drop $0.8\\% - 2.2\\%$ without COP, which can represent the importance to reduce the spurious correlation among features.", + "bbox": [ + 507, + 84, + 884, + 164 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "w/o. VOP: To verify the effectiveness of variance optimization, we make VOP disabled and let only COP work in the training procedure. As shown in Table 3, when removing VOP, the performance of Rel and Rel+ drop $2.0\\% - 3.4\\%$ and $1.6\\% - 2.2\\%$ respectively, which can indicate the effect of the causal intervention and the VOP play an important role in OVO.", + "bbox": [ + 507, + 181, + 884, + 309 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "w. SNet: StableNet (Zhang et al., 2021) is similar work with COP which use Random Fourier Features to enhance the non-linearity of enhanced features. To compare the effectiveness between COP and StableNet, we replace COP with StableNet keeping other settings the same, and then negotiate the final performance between them. The performance shows that using COP gains $+0.7\\%$ and $+0.4\\%$ improvement in Rel+ on ACE2005 and SciERC respectively. Moreover, from the results in Table 5, the consumption of COP is much smaller than that of StableNet.", + "bbox": [ + 507, + 326, + 884, + 518 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "5 Analysis", + "text_level": 1, + "bbox": [ + 507, + 539, + 618, + 555 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "5.1 Fine-grained analysis", + "text_level": 1, + "bbox": [ + 507, + 570, + 724, + 586 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "To analyze the debias ability of OVO, we conduct experiments to evaluate the performance of each label on PL-Marker. The detailed results for each relation label on SciERC are shown in Table 4. From the table, the number of USERD-FOR accounts for more than half, $54.7\\%$ of the total, but that of COMPARE is only $3.9\\%$ of the total.", + "bbox": [ + 507, + 595, + 884, + 707 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "From the results, the two worst-performing labels both have a small number of samples which are only $6.9\\%$ and $6.4\\%$ of the total, respectively. For the comparison between with or without OVO, we find that the performances in all labels gain improvement, except for USED-FOR, which is one that has the most samples in the dataset and keeps comparable performance. Additionally, the improvement increases as the number of samples decreases. The most improvement is on PART-OF, which outperforms $+9.1\\%$ in F1 than without VOP. Moreover, the overall results of average F1 gain $+4.0\\%$ improvement.", + "bbox": [ + 507, + 709, + 884, + 917 + ], + "page_idx": 6 + }, + { + "type": "page_number", + "text": "2633", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/8e340fa8825fed92833949c2457b0927b70370425cc5ff24476f448c1bfacaf2.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
EncoderACE2005SciERC
EntRelRel+EntRelRel+
SPtree (Miwa and Bansal, 2016)LSTM83.4-55.6---
DyGIE (Luan et al., 2019)ELMo88.463.2-65.241.6-
OneIE† (Lin et al., 2020)BL88.867.5----
DyGIE++† (Wadden et al., 2019)BB/SciB88.663.4-67.0*47.5*-
SPERT (Eberts and Ulges, 2020)86.8*63.8*-70.350.8-
UniRE† (Wang et al., 2021)88.865.7*64.368.440.2*36.9
SpERT.PL (Sai et al., 2021) +OVOBB/SciB87.4*65.3*62.1*70.551.339.4
87.967.965.371.752.641.5
PL-Marker† (Ye et al., 2022) +OVO†89.869.066.569.953.241.6
89.670.667.770.756.144.5
PURE-F† (Zhong and Chen, 2021) +CFIE† (Nanet al., 2021) +CoRE† (Wanget al., 2022) +OVO†90.167.764.868.950.136.8
-67.764.5-50.938.5
-67.664.9-50.738.0
90.568.065.170.051.640.1
UniRE† (Wang et al., 2021)ALBXX90.2-66.0---
PURE-F† (Zhong and Chen, 2021)90.969.467.0---
PL-Marker† (Ye et al., 2022) +OVO†91.173.071.1---
91.274.672.3---
", + "bbox": [ + 124, + 80, + 873, + 313 + ], + "page_idx": 7 + }, + { + "type": "table", + "img_path": "images/9528a952b7d49e264de1a2ab55be18855e8d7a8b96cb4300e6da53e888fa9f9b.jpg", + "table_caption": [ + "Table 1: Overall test results of F1 in joint entity and relation task on the dataset of ACE2005 and SciERC. †: the model or method leverages cross-sentence information as extra features. The encoders used in different models: $B_{B} =$ bert-base-uncased, $B_{L} =$ bert-large-uncased, $SciB =$ scibert-scivocab-uncased, $ALB_{XX} =$ albert-xxlarge-v1. Model name abbreviation: PURE-F = PURE(Full). Evaluation metric abbreviation: Rel denotes the boundaries evaluation and Rel+ denotes the strict evaluation. *: the result is not given in the original works, and we run the corresponding experiment, reporting the results in the table." + ], + "table_footnote": [], + "table_body": "
Rel(%)newssciencepoliticsliteratureaimusicavg
PL-Marker9.713.014.414.811.614.112.9
+OVO10.314.315.416.414.016.414.5
", + "bbox": [ + 206, + 422, + 793, + 475 + ], + "page_idx": 7 + }, + { + "type": "table", + "img_path": "images/cce625dcf63d818033ce71b79ad927ff65a9d317798a7597b5c7de618b614fd6.jpg", + "table_caption": [ + "Table 2: Results in the out-domain setting on the CrossRE dataset." + ], + "table_footnote": [], + "table_body": "
ACE2005SciERC
EntRelRel+EntRelRel+
OVO89.670.667.770.756.144.5
w/o. COP89.769.766.970.054.143.3
w/o. VOP89.568.665.570.752.742.9
w. SNet89.470.167.070.555.044.1
", + "bbox": [ + 115, + 521, + 485, + 619 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Table 3: Ablation on ACE2005 and SciERC test set with different component setups. w. SNet means replacing COP with StableNet in model training.", + "bbox": [ + 112, + 630, + 487, + 674 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "5.2 Effect of Covariance Optimizing", + "text_level": 1, + "bbox": [ + 112, + 702, + 415, + 718 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "As the results are shown in Table 5, by using StableNet, it gains $+0.6\\%$ improvement on Ent, and COP improves on it $+0.2\\%$ . Table 3 shows more results between COP and StableNet. So, we can conclude that stable learning technology can actually achieve improvement for our task. But the consumption of computing resources is relatively high and it costs approximately 5 and 1.7 times for training time and GPU memory respectively than the original. In comparison, COP uses fewer resources but gets better performance. Additionally, more detailed results of hyperparameters are", + "bbox": [ + 112, + 726, + 489, + 917 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "reported in Appendix. D.", + "bbox": [ + 507, + 525, + 697, + 541 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "5.3 Effect of Variance Optimizing", + "text_level": 1, + "bbox": [ + 507, + 552, + 789, + 569 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "To enhance adaptation to diverse methods, we introduce a weight for $Loss_{VOP}$ to mitigate its impact on the normal training of the model and avoid performance degradation. The optimal weight varies depending on the specific dataset and method employed, as different weights yield the best performance. The detailed results are reported in Appendix. E.", + "bbox": [ + 507, + 574, + 884, + 703 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "6 Conclusion", + "text_level": 1, + "bbox": [ + 507, + 715, + 640, + 731 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "In this work, we propose the OVO, a novel model training framework for optimizing feature vectors using causal technology. There are two main parts of OVO which are called COP and VOP. From the perspective of the correlation among features, COP reduces the spurious relation by minimizing the covariance computed from all features. From the viewpoint of each feature, VOP makes the feature more causal by minimizing the variance calculated from each feature of the same label. After optimizing the features toward causal, our method achieves", + "bbox": [ + 507, + 741, + 884, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_number", + "text": "2634", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 7 + }, + { + "type": "table", + "img_path": "images/06cf7b09afb8963f6780970fb3201f3150b5d5f20046f490156383c19c21ce0f.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Metric (Rel)UFCONEFHOPOFOCOMavg.
Proportion (%)-54.712.69.36.96.46.03.9-
w/o. OVO (%)Recall55.262.646.264.228.623.752.647.6
Precision53.655.051.258.148.725.950.048.9
F154.358.648.660.136.024.851.347.7
w. OVO (%)Recall53.165.749.570.236.525.455.350.8
Precision55.453.354.259.559.035.760.053.9
F154.258.951.764.445.129.757.551.7
Δ-0.1+0.3+3.1+4.3+9.1+4.9+6.2+4.0
", + "bbox": [ + 168, + 82, + 826, + 210 + ], + "page_idx": 8 + }, + { + "type": "table", + "img_path": "images/dc8046cae267eed74fdfbd9f78aba3a70e10717d56a000d26ee1d33b30fe9218.jpg", + "table_caption": [ + "Table 4: The fine-grained results on the SciERC dataset. Relation label abbreviation: UF=USED-FOR, CON=CONJUNCTION, EF=EVALUATE-FOR, HO=HYPONYM-OF, PO=PART-OF, FO=FEATURE-OF, COM=COMPARE. Proportion means the percentage of the number of one relation label in total data." + ], + "table_footnote": [], + "table_body": "
NameEntGPU (GB)Time (h)
PL-Marker69.9192
w.COP70.7244
w.SNet70.53210
", + "bbox": [ + 164, + 286, + 431, + 369 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Table 5: The experiment results on the SciERC. The base model is PL-Marker. COP means covariance optimizing; Time (h) is the time consumption of model training. The text with bold and italics indicates the best performance, and that with underlining indicates the second best.", + "bbox": [ + 112, + 378, + 487, + 464 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "improvements on 3 strong baselines and reduces the influence of data unbalanced bias. In the future, we will pay more attention to (1) how to further reduce resource consumption on COP and (2) how can let the weight of VOP adjusts itself automatically to adapt to the different datasets.", + "bbox": [ + 112, + 495, + 489, + 592 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Limitations", + "text_level": 1, + "bbox": [ + 112, + 615, + 218, + 630 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "OVO is a novel training framework for optimizing feature representations directly using causal technology. The limitations of OVO are as follows:", + "bbox": [ + 112, + 646, + 489, + 697 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- COP is an additional training process in each batch that will improve resource consumption. Larger models and more previous information used in COP will cost more additional resources.", + "- To adapt OVO to more models, there are some hyperparameters to control the degree of effect of COP and VOP during training. These hyperparameters are sensitive to different models and datasets, so it takes time to experiment to find the optimal values of them." + ], + "bbox": [ + 134, + 719, + 489, + 917 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Acknowledgements", + "text_level": 1, + "bbox": [ + 509, + 288, + 680, + 305 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "The State Key Program of National Natural Science of China, Grant/Award Number:61533018; National Natural Science Foundation of China, Grant/Award Number: 61402220; The Philosophy and Social Science Foundation of Hunan Province, Grant/Award Number: 16YBA323; Natural Science Foundation of Hunan Province, Grant/Award Number: 2020JJ4525,2022JJ30495; Scientific Research Fund of Hunan Provincial Education Department, Grant/Award Number: 18B279,19A439,22A0316.", + "bbox": [ + 507, + 313, + 884, + 491 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "References", + "text_level": 1, + "bbox": [ + 510, + 520, + 608, + 533 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Elisa Bassignana and Barbara Plank. 2022. Crossre: A cross-domain dataset for relation extraction. In Findings of the Association for Computational Linguistics: EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 3592-3604. Association for Computational Linguistics.", + "Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. Scibert: A pretrained language model for scientific text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 3613-3618. Association for Computational Linguistics.", + "Razvan C. Bunescu and Raymond J. Mooney. 2005. A shortest path dependency kernel for relation extraction. In HLT/EMNLP 2005, Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing, Proceedings of the Conference, 6-8 October 2005, Vancouver, British Columbia, Canada, pages 724-731. The Association for Computational Linguistics.", + "Huajun Chen, Ning Hu, Guilin Qi, Haofen Wang, Zhen Bi, Jie Li, and Fan Yang. 2021. Openkg chain: A blockchain infrastructure for open knowledge graphs. Data Intell., 3(2):205-227." + ], + "bbox": [ + 509, + 542, + 885, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_number", + "text": "2635", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "David A. Cohn, Zoubin Ghahramani, and Michael I. Jordan. 1996. Active learning with statistical models. J. Artif. Intell. Res., 4:129-145.", + "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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics.", + "Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. 2018. Measuring and mitigating unintended bias in text classification. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, AIES '18, page 67-73, New York, NY, USA. Association for Computing Machinery.", + "Carsten F. Dormann, Jane Elith, Sven Bacher, Carsten Buchmann, Gudrun Carl, Gabriel Carré, Jaime R. García Marquez, Bernd Gruber, Bruno Lafourcade, Pedro J. Leitão, Tamara Munkemüller, Colin McClean, Patrick E. Osborne, Björn Reineking, Boris Schröder, Andrew K. Skidmore, Damaris Zurell, and Sven Lautenbach. 2013. Collinearity: a review of methods to deal with it and a simulation study evaluating their performance. Ecography, 36(1):27-46.", + "Huifang Du, Zhongwen Le, Haofen Wang, Yunwen Chen, and Jing Yu. 2022a. COKG-QA: multi-hop question answering over COVID-19 knowledge graphs. Data Intell., 4(3):471-492.", + "Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. 2022b. GLM: general language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 320-335. Association for Computational Linguistics.", + "Markus Eberts and Adrian Ulges. 2020. Span-based joint entity and relation extraction with transformer pre-training. In ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, Santiago de Compostela, Spain, August 29 - September 8, 2020 - Including 10th Conference on Prestigious Applications of Artificial Intelligence (PAIS 2020), volume 325 of Frontiers in Artificial Intelligence and Applications, pages 2006-2013. IOS Press.", + "Jiannan Guo, Yangyang Kang, Yu Duan, Xiaozhong Liu, Siliang Tang, Wenqiao Zhang, Kun Kuang, Changlong Sun, and Fei Wu. 2022. Collaborative intelligence orchestration: Inconsistency-based fusion of semi-supervised learning and active learning. In KDD '22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 - 18, 2022, pages 2935-2945. ACM." + ], + "bbox": [ + 115, + 85, + 489, + 916 + ], + "page_idx": 9 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9726-9735.", + "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.", + "Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020. ALBERT: A lite BERT for self-supervised learning of language representations. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.", + "Ying Lin, Heng Ji, Fei Huang, and Lingfei Wu. 2020. A joint neural model for information extraction with global features. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7999-8009, Online. Association for Computational Linguistics.", + "Zihan Lin, Changxin Tian, Yupeng Hou, and Wayne Xin Zhao. 2022. Improving graph collaborative filtering with neighborhood-enriched contrastive learning. In WWW '22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 - 29, 2022, pages 2320-2329. ACM.", + "Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. 2018. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 3219-3232. Association for Computational Linguistics.", + "Yi Luan, Dave Wadden, Luheng He, Amy Shah, Mari Ostendorf, and Hannaneh Hajishirzi. 2019. A general framework for information extraction using dynamic span graphs. 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 3036-3046, Minneapolis, Minnesota. Association for Computational Linguistics.", + "Makoto Miwa and Mohit Bansal. 2016. End-to-end relation extraction using lstms on sequences and tree structures. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics.", + "Subhabrata Mukherjee and Ahmed Hassan Awadallah. 2020. Uncertainty-aware self-training for text classification with few labels. CoRR, abs/2006.15315." + ], + "bbox": [ + 510, + 85, + 880, + 917 + ], + "page_idx": 9 + }, + { + "type": "page_number", + "text": "2636", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 9 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Guoshun Nan, Jiaqi Zeng, Rui Qiao, Zhijiang Guo, and Wei Lu. 2021. Uncovering main causalities for long-tailed information extraction. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 9683-9695. Association for Computational Linguistics.", + "Judea Pearl. 1995. Causal diagrams for empirical research. Biometrika, 82(4):669-688.", + "Judea Pearl, Madelyn Glymour, and Nicholas P Jewell. 2016. Causal inference in statistics: A primer. John Wiley & Sons.", + "Lev-Arie Ratinov and Dan Roth. 2009. Design challenges and misconceptions in named entity recognition. In Proceedings of the Thirteenth Conference on Computational Natural Language Learning, CoNLL 2009, Boulder, Colorado, USA, June 4-5, 2009, pages 147-155. ACL.", + "Farshid Rayhan, Sajid Ahmed, Asif Mahbub, Md. Rafsan Jani, Swakkhar Shatabda, and Dewan Md. Farid. 2017. Cusboost: Cluster-based under-sampling with boosting for imbalanced classification. CoRR, abs/1712.04356.", + "Santosh Tokala Yaswanth Sri Sai, Prantika Chakraborty, Sudakshina Dutta, Debarshi Kumar Sanyal, and Partha Pratim Das. 2021. Joint entity and relation extraction from scientific documents: Role of linguistic information and entity types. In Proceedings of the 2nd Workshop on Extraction and Evaluation of Knowledge Entities from Scientific Documents (EEKE 2021) co-located with JCDL 2021, Virtual Event, September 30th, 2021, volume 3004 of CEUR Workshop Proceedings, pages 15-19. CEUR-WS.org.", + "Yuming Shang, Heyan Huang, and Xianling Mao. 2022. Onerel: Joint entity and relation extraction with one module in one step. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11285-11293. AAAI Press.", + "Zheyan Shen, Peng Cui, Kun Kuang, Bo Li, and Peixuan Chen. 2018. Causally regularized learning with agnostic data selection bias. In 2018 ACM Multimedia Conference on Multimedia Conference, MM 2018, Seoul, Republic of Korea, October 22-26, 2018, pages 411-419. ACM.", + "Zheyan Shen, Peng Cui, Tong Zhang, and Kun Kuang. 2020. Stable learning via sample reweighting. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 5692-5699. AAAI Press." + ], + "bbox": [ + 115, + 85, + 489, + 916 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "David Wadden, Ulme Wennberg, Yi Luan, and Hannaneh Hajishirzi. 2019. Entity, relation, and event extraction with contextualized span representations. 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 5784-5789, Hong Kong, China. Association for Computational Linguistics.", + "Yijun Wang, Changzhi Sun, Yuanbin Wu, Hao Zhou, Lei Li, and Junchi Yan. 2021. UniRE: A unified label space for entity relation extraction. 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 220-231, Online. Association for Computational Linguistics.", + "Yiwei Wang, Muhao Chen, Wenxuan Zhou, Yujun Cai, Yuxuan Liang, Dayiheng Liu, Baosong Yang, Juncheng Liu, and Bryan Hooi. 2022. Should we rely on entity mentions for relation extraction? debiasing relation extraction with counterfactual analysis. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL 2022, Seattle, WA, United States, July 10-15, 2022, pages 3071-3081. Association for Computational Linguistics.", + "Deming Ye, Yankai Lin, Peng Li, and Maosong Sun. 2022. Packed levitated marker for entity and relation extraction. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 4904-4917. Association for Computational Linguistics.", + "Xingxuan Zhang, Peng Cui, Renzhe Xu, Linjun Zhou, Yue He, and Zheyan Shen. 2021. Deep stable learning for out-of-distribution generalization. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 5372-5382. Computer Vision Foundation / IEEE.", + "Zexuan Zhong and Danqi Chen. 2021. A frustratingly easy approach for entity and relation extraction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 50-61. Association for Computational Linguistics." + ], + "bbox": [ + 510, + 85, + 884, + 757 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "A Causal Graph", + "text_level": 1, + "bbox": [ + 510, + 766, + 670, + 782 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "From Fig. 2, $L \\to F$ denotes that real labels in datasets have an effect on the feature vectors learned by model training, and $L \\to P$ denotes that real labels have an effect on model predictions because the loss in training is calculated by labels and predictions. So the backdoor path $F \\gets L \\to P$ makes models give relatively high scores to the labels with numerous samples.", + "bbox": [ + 510, + 790, + 884, + 917 + ], + "page_idx": 10 + }, + { + "type": "page_number", + "text": "2637", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "B Derivation Process of Backdoor Adjustment", + "text_level": 1, + "bbox": [ + 114, + 83, + 425, + 117 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "In this section, we will give an explanation for each step of backdoor adjustment. To make it easier to understand, we draw a new equation as follows:", + "bbox": [ + 112, + 124, + 485, + 173 + ], + "page_idx": 11 + }, + { + "type": "equation", + "text": "\n$$\n\\begin{array}{l} p (P | d o (F)) \\stackrel {(1)} {=} \\sum_ {L} p (P | d o (F), \\underline {{L}}) p (\\underline {{L}} | d o (F)) \\\\ \\stackrel {(2)} {=} \\sum_ {L} p (P | d o (F), L) P (L | \\underline {{F}}) \\\\ \\stackrel {(3)} {=} \\sum_ {L} p (P | \\underline {{F}}, L) p (L | F) \\\\ \\stackrel {(4)} {=} \\sum_ {L} p (P | F, L) \\underline {{p (L)}} \\tag {13} \\\\ \\end{array}\n$$\n", + "text_format": "latex", + "bbox": [ + 124, + 199, + 485, + 362 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Where the meaning of $P$ , $F$ , and $L$ are the same as Fig. 2; $do(\\cdot)$ means do-operator. The underline means the main differences from the previous step.", + "bbox": [ + 112, + 363, + 487, + 413 + ], + "page_idx": 11 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "(1) using the total probability theorem where $do(F)$ can be seen as a normal random variables event like $P$ and $L$ .", + "(2) from the causal graph in Fig. 2, the path $L \\to F$ is a direct causal path without backdoor paths, so $p(L|do(F))$ and $p(L|F)$ are equivalent.", + "(3) because of conditioning on $L$ , the association in the path $F \\leftarrow L \\rightarrow P$ is blocked. So in this case, the association in the path $F \\rightarrow P$ is causality which can remove the do-operator without any influence.", + "(4) due to the direction of the causal path between $L$ and $F$ being $F \\gets L$ , there is no association from $F$ to $L$ which causes the $L$ to be independent with $F$ meaning $p(L|F) = p(L)$ ." + ], + "bbox": [ + 119, + 422, + 487, + 712 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "C Overall Algorithm of OVO", + "text_level": 1, + "bbox": [ + 114, + 722, + 384, + 740 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "The algorithm of OVO is shown in the algorithm. 1.", + "bbox": [ + 112, + 747, + 487, + 764 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "D Analysis of COP", + "text_level": 1, + "bbox": [ + 114, + 775, + 297, + 791 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "D.1 Saving Batch Number", + "text_level": 1, + "bbox": [ + 114, + 801, + 337, + 816 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "When the dataset is large enough, it is hard to put all feature vectors into COP and optimize them at once. So, by using eq. 6, we can use part of the vectors to relieve the pressure on computing resources. To research the effect of COP when just using partial vectors, we conduct comparative experiments with", + "bbox": [ + 112, + 822, + 487, + 917 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Algorithm 1 The training procedure of the OVO", + "bbox": [ + 510, + 83, + 875, + 99 + ], + "page_idx": 11 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "Input: Initial pre-trained BERT encoder $\\mathbf{BE}^{(0)}$ and classifier $\\mathbf{C}^{(0)}$ , training dataset $\\mathcal{D}$ , training epochs for model training $T_{mt}$ , training epochs for COP $T_{cop}$", + "Output: Trained model $(\\mathbf{BE}^{(T_{mt})},\\mathbf{C}^{(T_{mt})})$", + "1: for $t_{mt} = 0$ to $T_{mt}$ do", + "2: $\\mathbf{F}_{\\mathrm{pre}} \\gets$ Clear the previous feature vectors;", + "3: $\\bar{\\mathbf{W}}_{\\mathrm{pre}}\\gets$ Clear the previous weights;", + "4: for (Sents, Spans) in $\\mathcal{D}$ do", + "5: $\\mathbf{H} = \\mathbf{B}\\mathbf{E}^{(t_{mt})}(Sents)$", + "6: $\\mathbf{F}_{\\mathrm{cur}} = \\text{GetSpanFeatures}(\\mathbf{H})$", + "7: $\\mathbf{P} = \\mathbf{C}^{(t_{mt})}(\\mathbf{F}_{\\mathbf{cur}})$", + "8: $\\mathbf{W}_{\\mathrm{cur}} \\gets \\mathrm{Initial}$", + "9: $\\mathbf{F} = \\text{concat}(\\mathbf{F}_{\\text{pre}}, \\mathbf{F}_{\\text{cur}})$", + "10: $\\mathbf{W} = \\text{concat}(\\mathbf{W}_{\\text{pre}}, \\mathbf{W}_{\\text{cur}})$", + "11: for $t_{cop} = 0$ to $T_{cop}$ do", + "12: $\\mathcal{L}_{\\mathcal{W}} = \\sum_{i\\neq j}cov(\\mathbf{WF}_i,\\mathbf{WF}_j)$", + "13: $\\mathbf{W}_{\\mathrm{cur}}\\gets \\text{Optim} (\\mathcal{L}_{\\mathcal{W}})$", + "14: end for", + "15: $(\\mathbf{F}_{\\mathrm{pre}},\\mathbf{W}_{\\mathrm{pre}})\\gets$ update and fuse", + "16: $\\mathcal{L}_{orig} = CrossEntropy(\\mathbf{P},\\mathsf{Spans})$", + "17: $\\mathcal{L}_{COP} = \\mathbf{W}_{\\mathbf{cur}}\\mathcal{L}_{orig}$", + "18: $\\mathcal{L}_{VOP} = \\sum_{l=0}^{L} \\sum_{n=0}^{N} var(\\mathbf{F}_{(l,n)})$", + "19: $\\mathcal{L} = \\mathcal{L}_{COP} + \\mathcal{L}_{VOP}$", + "20: $(\\mathbf{BE}^{\\mathbf{t}_{\\mathrm{mt}} + 1},\\mathbf{C}^{\\mathbf{t}_{\\mathrm{mt}} + 1})\\gets Optim(\\mathcal{L})$", + "21: end for", + "22: end for" + ], + "bbox": [ + 509, + 103, + 882, + 423 + ], + "page_idx": 11 + }, + { + "type": "image", + "img_path": "images/0880b096dc1f784a78821d8e6c1cadf7828c280fe08cca31c0b5c153f52cf51a.jpg", + "image_caption": [ + "Figure 5: The impact of different Saving Batch Numbers on the performance of COP is evaluated using the SciERC test set. The inf notation denotes the scenario where all feature vectors are used for COP without any deletions. Relation F1 means evaluating with gold entities in $\\mathbf{Rel}+$ ; for eq. 8, $\\alpha$ is equal to 0.9 in the experiments." + ], + "image_footnote": [], + "bbox": [ + 519, + 464, + 831, + 648 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "different saving batch numbers on PL-Marker (Ye et al., 2022). As shown in Fig. 5, as the saving batch number rises, the overall trend of F1 also rises and reaches the best performance at inf (around $2^{10}$ in our training setting). It can be concluded that using more vectors for COP can reduce spurious correlation better and gain more improvement, but require more computing resources.", + "bbox": [ + 507, + 790, + 882, + 917 + ], + "page_idx": 11 + }, + { + "type": "page_number", + "text": "2638", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 11 + }, + { + "type": "image", + "img_path": "images/9c6483d57643d2928307c066f7c2cc8496180703c61b1a70c070d6d463768bfb.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 151, + 99, + 425, + 262 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/bba0b3d2524b4df02002e1df066c4710161c9d9d57b4d0a3a10aab42394ef88d.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 151, + 294, + 425, + 458 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/168b3c6b5aa40fc72b8600222de72c0324f29942af66c2e96fd4a9d75bc9c3a1.jpg", + "image_caption": [ + "Figure 6: Effect of different $\\alpha$ of COP." + ], + "image_footnote": [], + "bbox": [ + 152, + 486, + 425, + 650 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/9c86c461c6b5463d8b6c9166246a843e9cb529cde320493546f6d8a3ca05b28a.jpg", + "image_caption": [ + "Figure 7: Effect of the different weights of VOP. F1 is Rel on datasets." + ], + "image_footnote": [], + "bbox": [ + 524, + 99, + 836, + 282 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "0.4 on ACE2005 and SciERC respectively. The detailed results for the COP rate are shown in Fig. 7 which only uses COP in experiments.", + "bbox": [ + 507, + 351, + 882, + 401 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "E Analysis of VOP", + "text_level": 1, + "bbox": [ + 509, + 412, + 690, + 428 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "E.1 Tradeoff on Variance Optimizing", + "text_level": 1, + "bbox": [ + 509, + 437, + 818, + 454 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "For better adaptation to different tasks, it is important to give $Loss_{VOP}$ a weight, preventing it to influence the model training and hurt the performance. We compute the final loss with weighed $Loss_{VOP}$ as follows:", + "bbox": [ + 507, + 458, + 882, + 538 + ], + "page_idx": 12 + }, + { + "type": "equation", + "text": "\n$$\nL o s s _ {f i n a l} = L o s s _ {C O P} + \\lambda L o s s _ {V O P} \\tag {14}\n$$\n", + "text_format": "latex", + "bbox": [ + 539, + 552, + 882, + 570 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Where $\\lambda$ is a hyperparameter regarding the weight of $Loss_{VOP}$ . From the results in Fig. 8, different datasets get the best performance in different weights of VOP which $\\lambda = 0.2$ is the optimal value for ACE2005 and $\\lambda = 0.1$ is that for SciERC, and the performance is particularly sensitive to the weight which changes drastically using different $\\lambda$ .", + "bbox": [ + 507, + 581, + 882, + 693 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "D.2 Effect of alpha", + "text_level": 1, + "bbox": [ + 112, + 709, + 278, + 726 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "To explore the effect of fusing current information, we conduct experiments for fusing hyperparameter $\\alpha$ of eq. 8. We fix the saving batch number to infinite and change the $\\alpha$ in the same training configuration. Fig. 6 shows the detailed result of the experiments.", + "bbox": [ + 112, + 734, + 489, + 829 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "D.3 COP rate", + "text_level": 1, + "bbox": [ + 112, + 847, + 238, + 860 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "We use $r_{COP} = 1$ in PURE (Zhong and Chen, 2021) and PL-Marker (Ye et al., 2022). For SpERT.PL, we set the COP rate equal to 0.1 and", + "bbox": [ + 112, + 871, + 487, + 917 + ], + "page_idx": 12 + }, + { + "type": "page_number", + "text": "2639", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/f180894c4945ca12ae9f10f2c4d50615a1cb2f409da873bcba96a23cabeb5928.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 149, + 307, + 423, + 467 + ], + "page_idx": 13 + }, + { + "type": "image", + "img_path": "images/cbd484128adee34b19e516fe6503bf3ec4be0bce35a2fde375737c33b65d4d35.jpg", + "image_caption": [ + "Figure 8: Effect of the different weights of VOP. F1 is Rel on datasets." + ], + "image_footnote": [], + "bbox": [ + 152, + 500, + 423, + 659 + ], + "page_idx": 13 + }, + { + "type": "page_number", + "text": "2640", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 13 + } +] \ No newline at end of file diff --git a/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_model.json b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4749a33ece223af8706e540b1ae6e6a243e608a6 --- /dev/null +++ b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_model.json @@ -0,0 +1,3066 @@ +[ + [ + { + "type": "title", + "bbox": [ + 0.13, + 0.091, + 0.868, + 0.111 + ], + "angle": 0, + "content": "CoVariance-based Causal Debiasing for Entity and Relation Extraction" + }, + { + "type": "text", + "bbox": [ + 0.233, + 0.142, + 0.766, + 0.16 + ], + "angle": 0, + "content": "Lin Ren\\(^{1}\\), Yongbin Liu\\(^{1*}\\), Yixin Cao\\(^{2}\\), Chunping Ouyang\\(^{1}\\)" + }, + { + "type": "text", + "bbox": [ + 0.19, + 0.16, + 0.813, + 0.194 + ], + "angle": 0, + "content": "1University of South China, 2Singapore Management University {homurat.rl, yongbinliu03, caoyixin2011} @ gmail.com, ouyangcp@126.com" + }, + { + "type": "title", + "bbox": [ + 0.261, + 0.253, + 0.341, + 0.267 + ], + "angle": 0, + "content": "Abstract" + }, + { + "type": "text", + "bbox": [ + 0.145, + 0.279, + 0.461, + 0.735 + ], + "angle": 0, + "content": "Joint entity and relation extraction tasks aim to recognize named entities and extract relations simultaneously. Suffering from a variety of data biases, such as data selection bias, and distribution bias (out of distribution, long-tail distribution), serious concerns can be witnessed to threaten the model's transferability, robustness, and generalization. In this work, we address the above problems from a causality perspective. We propose a novel causal framework called covariance and variance optimization framework (OVO) to optimize feature representations and conduct general debiasing. In particular, the proposed covariance optimizing (COP) minimizes characterizing features' covariance for alleviating the selection and distribution bias and enhances feature representation in the feature space. Furthermore, based on the causal backdoor adjustment, we propose variance optimizing (VOP) separates samples in terms of label information and minimizes the variance of each dimension in the feature vectors of the same class label for mitigating the distribution bias further. By applying it to three strong baselines in two widely used datasets, the results demonstrate the effectiveness and generalization of OVO for joint entity and relation extraction tasks. Furthermore, a fine-grained analysis reveals that OVO possesses the capability to mitigate the impact of long-tail distribution. The code is available at https://github.com/HomuraT/OVO." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.745, + 0.26, + 0.76 + ], + "angle": 0, + "content": "1 Introduction" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.77, + 0.49, + 0.898 + ], + "angle": 0, + "content": "Named Entity Recognition (NER, (Ratinov and Roth, 2009)) and Relation Extraction (RE, (Bunescu and Mooney, 2005)) are both the key fundamental tasks of Information Extraction and both significant predecessor tasks for building knowledge graphs that are used widely in daily life (Chen et al., 2021; Ji et al., 2022; Du et al., 2022a). There are two major methods to extract the final result." + }, + { + "type": "image", + "bbox": [ + 0.521, + 0.25, + 0.871, + 0.381 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.509, + 0.396, + 0.885, + 0.496 + ], + "angle": 0, + "content": "Figure 1: An example of RE on SciERC (the label bias increases the risk of predicting some label possessing majority samples). The confidence at the upper right is predicted by PL-Marker (Ye et al., 2022). The ground-truth relation of the example is PART-OF, but due to the bias in the train set, the NO-RELATION is inferred. After using our OVO, PART-OF is predicted correctly." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.529, + 0.884, + 0.608 + ], + "angle": 0, + "content": "One is to build a separate model (pipeline) to get the result in one step (Shang et al., 2022), and the other is to use multiple models (joint) to extract entities and relations in turn (Zhong and Chen, 2021; Ye et al., 2022)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.614, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Suffering from various biases in data, such as data selection bias, out-of-distribution, and long-tail distribution (Lin et al., 2022; Wang et al., 2022), models may learn spurious correlations and make erroneous predictions. Although we would like to be able to obtain a uniform (or unbiased) data set, such a dataset is almost nonexistent in real applications. Various biases are always mixed up in real scenarios, for example, selected data in a way that differs from the target population (data selection bias), training and testing data distribution shift (out-of-distribution), the labels with numerous samples may have more chances to inference (long-tail distribution lead to predicting majority bias), and some of the data biases are even unknown. Because statistical correlation is the basis of supervised learning algorithms, the learning algorithms may learn many spurious correlations due to these biases. Finally, this leads to a greatly re" + }, + { + "type": "page_footnote", + "bbox": [ + 0.142, + 0.905, + 0.293, + 0.918 + ], + "angle": 0, + "content": "*Corresponding Author." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.52, + 0.941 + ], + "angle": 0, + "content": "2627" + }, + { + "type": "footer", + "bbox": [ + 0.218, + 0.946, + 0.78, + 0.973 + ], + "angle": 0, + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 2627-2640 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.488, + 0.212 + ], + "angle": 0, + "content": "duced predictive ability of the models. As shown in Fig. 1 (left), there are different degrees of the data bias of long-tail distribution in SciERC (Luan et al., 2018), which is common for other datasets as well, making models focus more on the labels with numerous samples and performing poorly on the others (fewer chances to the labels with few samples)." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.215, + 0.49, + 0.47 + ], + "angle": 0, + "content": "In recent years, debiasing has become a significant research focus. There are different ways to address the data bias by reweighting samples (Dixon et al., 2018; Rayhan et al., 2017; Wang et al., 2022). These methods focus on the reweights in the sample space and ignore spurious correlations due to data selection bias. Recently, stable learning (Shen et al., 2018, 2020; Zhang et al., 2021) proposed serial ways to de-bias the spurious correlation to find the causal effect of each input feature on the basis of the correlation. Specifically, these methods require extensive calculation resources to identify causality and focus solely on causal effects between features. Additionally, they fail to consider the causal effects for each feature dimension within the same class label." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.473, + 0.489, + 0.569 + ], + "angle": 0, + "content": "In this work, we introduce a method called the covariance and variance optimization framework (OVO), to optimize the feature vectors from two aspects, decorrelating between features and each feature dimension of the same class label. Our contributions can be summarized as follows:" + }, + { + "type": "text", + "bbox": [ + 0.137, + 0.585, + 0.49, + 0.761 + ], + "angle": 0, + "content": "- From decorrelating between features, inspired by stable learning, we use covariance as the confounder degree of features and try to minimize it in each batch of every epoch to learn the causality between features and targets. We minimize the covariance to reduce the collinearity of each feature, get the causal effects, alleviate the data selection and distribution biases, and enhance feature representation. We call this method covariance optimizing (COP)." + }, + { + "type": "text", + "bbox": [ + 0.137, + 0.775, + 0.49, + 0.919 + ], + "angle": 0, + "content": "- From feature dimensions of the same class label, according to the variance of each dimension, using the intervention of causal inference (Pearl et al., 2016), it can eliminate the confounding bias from the backdoor path by blocking \\( F \\gets L \\to P \\) as the causal graph shown in Fig.2, so that model can learn the causality from the causal path \\( F \\rightarrow P \\). We explore the causal correlation between the fea" + }, + { + "type": "list", + "bbox": [ + 0.137, + 0.585, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.548, + 0.082, + 0.687, + 0.195 + ], + "angle": 0, + "content": null + }, + { + "type": "image_footnote", + "bbox": [ + 0.708, + 0.111, + 0.806, + 0.122 + ], + "angle": 0, + "content": "L:RealLabel" + }, + { + "type": "image_footnote", + "bbox": [ + 0.711, + 0.124, + 0.828, + 0.134 + ], + "angle": 0, + "content": "F : Feature vector" + }, + { + "type": "image_footnote", + "bbox": [ + 0.711, + 0.137, + 0.8, + 0.147 + ], + "angle": 0, + "content": "P : Prediction" + }, + { + "type": "image_footnote", + "bbox": [ + 0.712, + 0.15, + 0.763, + 0.16 + ], + "angle": 0, + "content": "B:Bias" + }, + { + "type": "list", + "bbox": [ + 0.708, + 0.111, + 0.828, + 0.16 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.508, + 0.204, + 0.885, + 0.273 + ], + "angle": 0, + "content": "Figure 2: The causal graph of the joint entity and relation extraction task in the classification phase. Bias is something that we can not avoid, such as agnostic data selection bias, data labeling error, and unobservable features." + }, + { + "type": "text", + "bbox": [ + 0.545, + 0.301, + 0.884, + 0.365 + ], + "angle": 0, + "content": "ture dimensions of the same label and the outcome targets and mitigate the long-tail distribution bias further. We call this method variance optimizing (VOP)." + }, + { + "type": "text", + "bbox": [ + 0.533, + 0.377, + 0.885, + 0.585 + ], + "angle": 0, + "content": "- We combine COP and VOP as OVO. To access the effectiveness of OVO, we conduct experiments on the joint entity and relation extraction task. By applying OVO to 3 strong baselines, we observe significant improvements in the performance of this task, which demonstrates the effectiveness and generalization of our proposed method. These results suggest that optimizing feature representation directly is actually an effective way to get improvement and reduce the bias from datasets without model redesigning, and OVO is a feasible framework in this way." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.611, + 0.666, + 0.626 + ], + "angle": 0, + "content": "2 Related Work" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.637, + 0.884, + 0.862 + ], + "angle": 0, + "content": "Stable Learning aims to research how to reduce the agnostic data selection bias and model misspecification problem and make the feature more causal by reweighting samples. CRLR (Shen et al., 2018) proposes an equation to evaluate the degree of confounders called Causal Regularized Logistic Regression and gains the optimal weight by minimizing the confounder. SRDO (Shen et al., 2020) considers the smallest feature of the covariance matrix as the degree of confounder. StableNet (Zhang et al., 2021) adopts stable learning technology into image classification tasks using deep learning models and the results show the strong domain adaptation of the proposed models." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.872, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Span-level NER and RE Models are the approaches using the boundaries of spans as a total feature to recognize the entities and the relation" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2628" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.175, + 0.087, + 0.835, + 0.179 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.419, + 0.185, + 0.584, + 0.199 + ], + "angle": 0, + "content": "Variance Optimizing(VOP)" + }, + { + "type": "image", + "bbox": [ + 0.174, + 0.199, + 0.825, + 0.332 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.112, + 0.341, + 0.883, + 0.428 + ], + "angle": 0, + "content": "Figure 3: The overview of OVO. In the training phase of the model, we insert COP and VOP as extra optimization for feature vectors. For COP, there is an inner loop to learn the optimal \\(\\mathbf{W}\\) using gradient descent, and \\(Loss_W\\) is the loss function of \\(\\mathbf{W}\\) calculated according to eq. 4. For VOP, Backdoor Adjustment is used to reduce the bias from datasets. Note that \\(Loss_W\\) only computes the gradient of \\(\\mathbf{W}\\), and only the final optimal weights \\(\\hat{\\mathbf{W}}\\) created in COP will be applied to the model training process. The \\(Loss_{VOP}\\) will be used in model training directly. \\(Loss_{orig}\\) means the loss employed on the original method; \\(\\mathbf{O}\\) means zero matrix." + }, + { + "type": "text", + "bbox": [ + 0.112, + 0.453, + 0.489, + 0.629 + ], + "angle": 0, + "content": "between two entities. DyGIE++ (Wadden et al., 2019) and SpERT.PL (Sai et al., 2021) extract features of spans and share them between NER and RE tasks. PURE (Zhong and Chen, 2021) uses two separate span models to recognize entities and relations without interaction with each other and proposed levitated markers to reinforce the boundaries information of spans. PL-Marker (Ye et al., 2022) proposes neighborhood-oriented packing and subject-oriented packing methods to leverage the levitated markers." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.64, + 0.49, + 0.849 + ], + "angle": 0, + "content": "Variance and Covariance are two important metrics in deep learning. In confidence learning (Mukherjee and Awadallah, 2020), they are negatively correlated with the confidence of models and samples. Moreover, in active learning (Cohn et al., 1996), they are correlated with generalization error and bias which can be indirectly reduced by minimizing variance or covariance. Recently, IDEAL (Guo et al., 2022) uses variance as one of the measures for the inconsistency of unlabeled samples. In this work, we use them to estimate the feature representation and correlation between features respectively." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.861, + 0.219, + 0.877 + ], + "angle": 0, + "content": "3 Method" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.888, + 0.489, + 0.92 + ], + "angle": 0, + "content": "In this section, we first briefly introduce the general inference process of the joint entity and relation" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.453, + 0.885, + 0.501 + ], + "angle": 0, + "content": "extraction methods. Then, we will describe covariance optimizing (COP) and variance optimizing (VOP)." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.511, + 0.872, + 0.542 + ], + "angle": 0, + "content": "3.1 Background: Inference Process of Joint Entity and Relation Extraction Methods" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.548, + 0.885, + 0.692 + ], + "angle": 0, + "content": "In the joint entity and relation extraction task, the goal is to extract both entities and the relations between them from a given text. The general process of this task involves several steps. Firstly, an encoder module is used to transfer pure text to a numerical representation that captures the semantic information. This can be done using techniques like word embeddings or pre-trained language models (PLMs)." + }, + { + "type": "equation", + "bbox": [ + 0.62, + 0.7, + 0.884, + 0.724 + ], + "angle": 0, + "content": "\\[\n\\mathbf {S} = w _ {1}, w _ {2}, \\dots , w _ {l} \\tag {1}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.62, + 0.72, + 0.745, + 0.735 + ], + "angle": 0, + "content": "\\[\n\\mathbf {H} = \\operatorname {e n c o d e r} (\\mathbf {S})\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.743, + 0.883, + 0.806 + ], + "angle": 0, + "content": "Where \\(w_{i}\\) indicates the \\(i\\)-th word of the given text; \\(l\\) means the length of the text; \\(\\mathbf{H} \\in \\mathbf{R}^{l \\times n}\\) represents the representation of the text and \\(n\\) is the dimension size." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.808, + 0.884, + 0.872 + ], + "angle": 0, + "content": "For NER, the encoded representations are passed through an entity extraction module to identify and classify entities in the text. The formulations of span-level methods are as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.611, + 0.878, + 0.884, + 0.905 + ], + "angle": 0, + "content": "\\[\nf _ {(i, j)} ^ {\\text {s p a n}} = \\operatorname {e x t r a c t o r} (\\mathbf {H}, i, j) \\tag {2}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.586, + 0.901, + 0.804, + 0.923 + ], + "angle": 0, + "content": "\\[\nl a b e l _ {(i, j)} ^ {s p a n} = \\operatorname {c l a s s i f i e r} \\left(f _ {(i, j)} ^ {s p a n}\\right)\n\\]" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2629" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.488, + 0.18 + ], + "angle": 0, + "content": "Where \\(0 \\leq i \\leq j \\leq l\\) indicates the boundary of a span; \\(l\\) means the length of the given text; \\(f_{(i,j)}^{span}\\) is the feature of a span; extractor \\((\\cdot)\\) is a function to gain the feature of given spans; classifier \\((\\cdot)\\) is a function to predict the label of spans according to its representation." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.182, + 0.49, + 0.214 + ], + "angle": 0, + "content": "For RE, \\(\\mathbf{H}\\) and the spans of identified entities are used to determine the relations between the entities." + }, + { + "type": "equation", + "bbox": [ + 0.145, + 0.224, + 0.436, + 0.267 + ], + "angle": 0, + "content": "\\[\n\\begin{array}{l} f _ {(i, j)} ^ {r e l} = \\operatorname {e x t r a c t o r} (\\mathbf {H}, \\text {s p a n} _ {i}, \\text {s p a n} _ {j}) \\\\ l a b e l _ {(i, j)} ^ {r e l} = \\operatorname {c l a s s i f i e r} \\left(f _ {(i, j)} ^ {r e l}\\right) \\\\ \\end{array}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.279, + 0.489, + 0.363 + ], + "angle": 0, + "content": "Where \\(span_{i}\\) is the entity identified by NER; extractor \\((\\cdot)\\) is a function to acquire the feature of given relations; classifier \\((\\cdot)\\) is a function to predict the label of relations. In this work, OVO is used to optimize the \\(f_{(i,j)}^{span}\\) and \\(f_{(i,j)}^{rel}\\) during training." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.371, + 0.345, + 0.387 + ], + "angle": 0, + "content": "3.2 Covariance Optimizing" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.392, + 0.49, + 0.68 + ], + "angle": 0, + "content": "When the features exhibit linear correlations with each other, it can lead to instability in parameter estimation. Consequently, the optimal model becomes uncertain, and the presence of selection and distribution biases is amplified during inference. This phenomenon is called collinearity (Dormann et al., 2013). For example, \\( y = x_{1} + x_{2} \\) and \\( y = 100x_{1} - 98x_{2} \\) have identical performance if assumption \\( x_{1} = x_{2} \\) holds in train datasets, but if \\( x_{1} = 1.01x_{2} \\) holds in test datasets, the gaps of them will be huge. Besides collinearity, the correlation between features also poses the same impact in deep learning. One straightforward way to reduce the effect of collinearity and correlation is to analyze them among features and then remove some relevant features. However, due to the inexplicability and excessive number of features in PLMs, this method is difficult to afford." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.682, + 0.489, + 0.81 + ], + "angle": 0, + "content": "The methods of stable learning (Zhang et al., 2021) show that feature representations will be more causal when giving suitable weights for samples in loss calculating during training. Inspired by this, we propose covariance optimizing (COP) to alleviate the collinearity and correlation between features with low resource consumption, as well as improve the causality of features." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.812, + 0.49, + 0.876 + ], + "angle": 0, + "content": "In COP, covariance is used to measure the correlation between features, and the target is to acquire suitable weights by minimizing the covariance among all features using gradient descent:" + }, + { + "type": "equation", + "bbox": [ + 0.136, + 0.887, + 0.488, + 0.922 + ], + "angle": 0, + "content": "\\[\n\\widehat {\\mathbf {W}} = \\underset {\\mathbf {W}} {\\operatorname {a r g m i n}} \\sum_ {i, j, i \\neq j} \\left(\\operatorname {c o v} \\left(\\mathbf {W F} ^ {i}, \\mathbf {W F} ^ {j}\\right)\\right) ^ {2} \\tag {4}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.18 + ], + "angle": 0, + "content": "Where \\(\\mathbf{F}\\) and \\(\\mathbf{W}\\) mean the feature vectors and weights; \\(\\mathbf{W} \\in \\mathbf{R}^n\\) is a vector representing all sample weights and \\(n\\) is the number of samples, holding \\(\\sum_{i}^{n} w_i = 1\\) by softmax function. \\(\\mathbf{F}^i\\) means the \\(i\\)-th dimension feature of all samples. \\(cov(\\cdot, \\cdot)\\) is the covariance function." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.182, + 0.884, + 0.215 + ], + "angle": 0, + "content": "Next, \\(\\widehat{\\mathbf{W}}\\) is used to weigh the loss of the corresponding sample." + }, + { + "type": "equation", + "bbox": [ + 0.561, + 0.229, + 0.883, + 0.269 + ], + "angle": 0, + "content": "\\[\nL o s s _ {C O P} = \\sum_ {i = 0} ^ {n} \\hat {w} _ {i} L o s s _ {o r i g} \\left(p _ {i}, t _ {i}\\right) \\tag {5}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.286, + 0.882, + 0.351 + ], + "angle": 0, + "content": "Where \\(\\hat{w}_i\\in \\widehat{\\mathbf{W}}\\) is the final weight for the \\(i\\)-th sample; \\(p_i\\) and \\(t_i\\) mean the prediction distribution and real label respectively; \\(Loss_{orig}\\) means the loss employed on the original method." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.353, + 0.884, + 0.546 + ], + "angle": 0, + "content": "However, there are two difficulties in performing the above process directly. Firstly, the majority of PLMs have an extensive number of parameters, ranging from hundreds of millions (Devlin et al., 2019) to billions (Du et al., 2022b) and even more, thus the computation of weights for the entire dataset requires significant computational resources, making it expensive and potentially unaffordable during training. Secondly, incorporating features from previous batches or epochs may lead to feature inconsistency due to the continuous evolution of features during training." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.547, + 0.884, + 0.659 + ], + "angle": 0, + "content": "To overcome the aforementioned difficulties, inspired by MoCo (He et al., 2020), we only compute optimal weights for samples in the current batch, utilizing previous features and weights as additional fixed information. Furthermore, to ensure feature consistency, we discard the earliest features and weights:" + }, + { + "type": "equation", + "bbox": [ + 0.54, + 0.675, + 0.882, + 0.711 + ], + "angle": 0, + "content": "\\[\n\\begin{array}{l} \\mathbf {F} _ {i} = \\left[ \\mathbf {F} _ {i - 1} \\left[ \\left\\lfloor L _ {F _ {i}} / (n + 1) \\right\\rfloor : \\right], \\mathbf {F} _ {c u r} \\right] \\tag {6} \\\\ \\mathbf {W} _ {i} = \\left[ \\mathbf {W} _ {i - 1} \\left[ \\left[ L _ {W _ {i}} / (n + 1) \\right]: \\right], \\mathbf {W} _ {c u r} \\right] \\\\ \\end{array}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.726, + 0.882, + 0.837 + ], + "angle": 0, + "content": "Where \\(\\mathbf{F}\\) and \\(\\mathbf{W}\\) mean the feature vectors and weights; \\(i\\) means the index of the current batch; \\(L_{*}\\) is the length of \\(*\\); \\(*_{cur}\\) means feature vectors or weights in the current batch; \\(n\\) is the batch number of feature vectors and weights needed to be saved; \\(\\lfloor \\cdot \\rfloor\\) is the floor function; \\([l:\\] means to delete first \\(l\\) data." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.84, + 0.884, + 0.919 + ], + "angle": 0, + "content": "To further mitigate the feature inconsistency, we fuse and emphasize the current information with previous features and weights. Firstly, we randomly sample from \\(\\mathbf{F}_{cur}\\) and the corresponding \\(\\mathbf{W}_{cur}\\) until the number of samples is the same as" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2630" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.152, + 0.081, + 0.455, + 0.175 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.183, + 0.49, + 0.227 + ], + "angle": 0, + "content": "Figure 4: The original causal graph of the joint entity and relation extraction task in the classification phase (left) with its alternate after intervention (right)." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.251, + 0.144, + 0.266 + ], + "angle": 0, + "content": "\\(\\mathbf{F}_i\\)" + }, + { + "type": "equation", + "bbox": [ + 0.168, + 0.277, + 0.423, + 0.296 + ], + "angle": 0, + "content": "\\[\n\\mathbf {F} _ {c u r} ^ {\\prime} = [ \\mathbf {F} _ {c u r} [ R _ {1} ], \\dots , \\mathbf {F} _ {c u r} [ R _ {L} ] ]\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.164, + 0.293, + 0.489, + 0.316 + ], + "angle": 0, + "content": "\\[\n\\mathbf {W} _ {c u r} ^ {\\prime} = \\left[ \\mathbf {W} _ {c u r} [ R _ {1} ], \\dots , \\mathbf {W} _ {c u r} [ R _ {L} ] \\right] \\tag {7}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.326, + 0.489, + 0.407 + ], + "angle": 0, + "content": "Where \\(\\mathbf{F}_{cur}^{\\prime}\\) and \\(\\mathbf{W}_{cur}^{\\prime}\\) are the sets after random sampling; \\(L\\) is the length of \\(\\mathbf{F}_i\\), \\(R_i\\) is a random integer from 0 to \\(L\\), and \\([i]\\) means getting the \\(i\\)-th element. And then, we fuse current information with the previous." + }, + { + "type": "equation", + "bbox": [ + 0.197, + 0.418, + 0.488, + 0.442 + ], + "angle": 0, + "content": "\\[\n\\mathbf {F} _ {i} ^ {\\prime} = \\alpha \\mathbf {F} _ {i} + (1 - \\alpha) \\mathbf {F} _ {c u r} ^ {\\prime} \\tag {8}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.192, + 0.439, + 0.411, + 0.457 + ], + "angle": 0, + "content": "\\[\n\\mathbf {W} _ {i} ^ {\\prime} = \\alpha \\mathbf {W} _ {i} + (1 - \\alpha) \\mathbf {W} _ {c u r} ^ {\\prime}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.467, + 0.489, + 0.563 + ], + "angle": 0, + "content": "Where \\(\\alpha\\) is a hyperparameter between [0, 1] regarding how much previous information needs to be saved. Finally, \\(\\mathbf{F}_i^{\\prime}\\) and \\(\\mathbf{W}_i^{\\prime}\\) will be applied to eq. 4 as \\(\\mathbf{W}\\) and \\(\\mathbf{F}\\). Note that \\(\\mathbf{F}_i^{\\prime}\\) is used to gain the optimal \\(\\mathbf{W}_i^{\\prime}\\), but only the part of \\(\\mathbf{W}_{cur}\\) will be updated and used to weight sample loss." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.564, + 0.489, + 0.643 + ], + "angle": 0, + "content": "To enhance the applicability of COP, we use a hyperparameter called COP rate to adjust the degree of influence of COP during training. After acquiring the optimal weights, the loss function is as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.205, + 0.652, + 0.449, + 0.669 + ], + "angle": 0, + "content": "\\[\n\\hat {w} _ {i} ^ {\\prime} = (1 - r _ {C O P}) + r _ {C O P} * \\hat {w} _ {i}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.156, + 0.674, + 0.488, + 0.713 + ], + "angle": 0, + "content": "\\[\nL o s s _ {C O P} = \\sum_ {i = 0} ^ {n} \\hat {w} _ {i} ^ {\\prime} L o s s _ {o r i g} \\left(p _ {i}, t _ {i}\\right) \\tag {9}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.726, + 0.49, + 0.761 + ], + "angle": 0, + "content": "Where \\(\\hat{w}_i\\in \\widehat{\\mathbf{W}}\\) is the final weight of the \\(i\\)-th sample; \\(r_{COP}\\in (0,1]\\) indicates COP rate." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.77, + 0.327, + 0.787 + ], + "angle": 0, + "content": "3.3 Variance Optimizing" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.791, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Inspired by causal intervention (Pearl et al., 2016), we construct a causal graph (Fig. 2) regarding the causality from feature vectors to the final targets. To clarify our objective, in our causal analysis, we focus on the mitigation of bias arising from the long-tail distribution. This bias tends to make labels with a substantial number of samples more readily predictable during the inference process." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.882, + 0.116 + ], + "angle": 0, + "content": "Moreover, the effectiveness of mitigating this bias can be easily quantified." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.117, + 0.885, + 0.342 + ], + "angle": 0, + "content": "As shown in Fig. 2, \\( F \\gets L \\to P \\) is a backdoor path, a path that connects \\( F \\) and \\( P \\) but does not start with \\( F \\), from \\( F \\) to \\( P \\) in which \\( F \\), \\( L \\), and \\( P \\) are feature vectors, real labels, and model predictions respectively. Thus, the label distribution from the datasets is the confounder between the feature vectors and the final predictions, creating a spurious correlation that disturbs model inference and causes lower performance. For a better understanding of the causal graph, we introduce it as follows: The labels in datasets are the optimizing target of model training \\( (L \\to P) \\) which also takes effect on the feature vector learning \\( (L \\to F) \\). Appendix. A shows more detail of the causal graph." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.343, + 0.884, + 0.486 + ], + "angle": 0, + "content": "In order to remove the confounder caused by backdoor path \\( F \\leftarrow L \\rightarrow P \\) and make the model learn direct causality between feature vectors and predictions, we introduce do-operator (Pearl et al., 2016) on feature vectors \\( F \\) to gain the causality of \\( F \\) on \\( P \\) called \\( p(P|do(F)) \\). As shown in Fig. 4 right, through do-operator, the edge causing confounder, \\( F \\leftarrow L \\rightarrow P \\), is blocked, so that the spurious correlation has been removed." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.487, + 0.884, + 0.567 + ], + "angle": 0, + "content": "Backdoor adjustment (Pearl, 1995) is a method to reduce confounders in causal inference, and it can perform \\(do\\)-operator on the observational datasets. Formally, the backdoor adjustment reduces the bias as:" + }, + { + "type": "equation", + "bbox": [ + 0.549, + 0.571, + 0.883, + 0.604 + ], + "angle": 0, + "content": "\\[\np (P | d o (F)) = \\sum_ {L} p (P | F, L) p (L) \\tag {10}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.61, + 0.883, + 0.626 + ], + "angle": 0, + "content": "Where the detail for the equation is in Appendix B." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.626, + 0.882, + 0.706 + ], + "angle": 0, + "content": "Inspired by the eq. 10, it can reduce the spurious correlation if we process the feature vectors of the same label separately. So we propose a method to optimize the feature vectors in the same label by using the property of variance." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.707, + 0.884, + 0.833 + ], + "angle": 0, + "content": "When the fluctuation among samples is serious, the variance will be large, and vice versa. In other words, we can minimize the variance between the samples of the same label to bring them closer together and at the same time achieve intervention. Along this way, we introduce a new loss function using the variance to optimize the feature representation as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.573, + 0.838, + 0.883, + 0.882 + ], + "angle": 0, + "content": "\\[\nL o s s _ {V O P} = \\sum_ {l = 0} ^ {L} \\sum_ {n = 0} ^ {N} v a r \\left(\\mathbf {F} _ {(l, n)}\\right) \\tag {11}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.888, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Where \\(L\\) is the label amount in one batch of data, \\(N\\) is the dimension amount of feature vectors, and" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.519, + 0.941 + ], + "angle": 0, + "content": "2631" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.489, + 0.148 + ], + "angle": 0, + "content": "\\(\\mathbf{F}_{(l,n)}\\) means the n-th dimensional feature of all samples of label \\(l\\). \\(var(\\cdot)\\) is the operation of computing sample variance. Note that missing several labels is possible in one batch of data." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.15, + 0.489, + 0.294 + ], + "angle": 0, + "content": "This method is called variance optimizing (VOP). Additionally, benefiting from the random mechanism of mini-batch gradient descent, one sample can combine with different samples into the same batch in each training epoch, which brings two main advantages as follows: Firstly, the diversity of sample combination is ensured automatically. Secondly, the impact of abnormal samples is mitigated due to the overall optimization." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.304, + 0.426, + 0.319 + ], + "angle": 0, + "content": "3.4 Overall Optimization Framework" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.324, + 0.489, + 0.419 + ], + "angle": 0, + "content": "We combine COP and VOP into a unified framework called covariance and variance optimization framework (OVO), as shown in Fig. 3, and the algorithm. 1 (Appendix. C) illustrates the detailed training procedure of OVO. The final loss is as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.146, + 0.428, + 0.488, + 0.445 + ], + "angle": 0, + "content": "\\[\nL o s s _ {f i n a l} = L o s s _ {C O P} + \\lambda L o s s _ {V O P} \\tag {12}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.45, + 0.488, + 0.482 + ], + "angle": 0, + "content": "Where \\(\\lambda\\) is a hyperparameter for the weight of \\(Loss_{VOP}\\)." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.492, + 0.252, + 0.509 + ], + "angle": 0, + "content": "4 Experiment" + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.517, + 0.221, + 0.531 + ], + "angle": 0, + "content": "4.1 Dataset" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.538, + 0.488, + 0.681 + ], + "angle": 0, + "content": "We conduct experiments to evaluate our approach on two popular joint entity and relation extraction datasets: ACE051 and SciERC2(Luan et al., 2018). For ACE2005, we use the same split following (Luan et al., 2019) in the train, development, and test sets. ACE2005 dataset includes various domain data, such as newswire and broadcast news, while the SciERC dataset includes abstracts collected from AI conferences/workshops." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.682, + 0.489, + 0.794 + ], + "angle": 0, + "content": "Additionally, to evaluate the effectiveness of OVO in out-of-distribution settings, we conduct experiments on CrossRE \\(^{3}\\) (Bassignana and Plank, 2022) which is a dataset for the relation extraction task across 6 different domains, namely news, politics, natural science, music, literature, and artificial intelligence." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.805, + 0.301, + 0.819 + ], + "angle": 0, + "content": "4.2 Evaluation metrics" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.825, + 0.489, + 0.874 + ], + "angle": 0, + "content": "We follow the evaluation metrics in previous close works to evaluate the experiment results' performance using the micro F1 measure. For the NER" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.262 + ], + "angle": 0, + "content": "task, we use the span-level benchmark to evaluate, which one entity is considered recognized correctly if and only if both its boundary and type are precisely predicted. For the RE, we adopt two evaluation metrics as follows: (1) boundaries evaluation (Rel): a relation is considered recognized correctly if and only if the boundaries of head and tail entities are correct, and their relation label is correct; (2) strict evaluation \\((\\mathbf{Rel}+)\\): in addition to the requirement of Rel, the types of two entities are also needed to be correctly predicted." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.276, + 0.742, + 0.291 + ], + "angle": 0, + "content": "4.3 Implementation Details" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.298, + 0.885, + 0.538 + ], + "angle": 0, + "content": "We apply OVO to 3 of out of top-5 strong baselines4, specifically PURE (Zhong and Chen, 2021), SpERT.PL (Sai et al., 2021), and PL-Marker (Ye et al., 2022). For ACE2005, the BERT encoders are bert-base-uncased (Devlin et al., 2019) and albert-xxlarge-v1(Lan et al., 2020) which are in the common domain. For SciERC, the BERT encoder is scibert-scivocab-uncased (Beltagy et al., 2019) which is in the scientific domain. We use our proposed method, OVO, to optimize the feature vectors as the extra plugin beyond the common model training with all hyperparameters the same as the base models. To ensure robustness, we conduct experiments with 3 different seeds and report the average scores." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.552, + 0.63, + 0.567 + ], + "angle": 0, + "content": "4.4Baselines" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.575, + 0.884, + 0.799 + ], + "angle": 0, + "content": "For comparison, we choose serials of state-of-the-art models as follows: (1) PURE (Zhong and Chen, 2021) uses two independent models for NER and RE respectively in a frustratingly easy way, and is the first to propose levitated markers for RE task called PURE(Approx) to accelerate the inference speed, but with a slight drop in performance; (2) SpERT.PL (Sai et al., 2021) uses part-of-speech and logits of entities to enhance the features of entities and relations which shows strong performance in the SciERC dataset. (3) PL-Marker (Ye et al., 2022) is the first to leverage levitated markers to both NER and RE tasks using a packed method with great improvement." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.801, + 0.884, + 0.881 + ], + "angle": 0, + "content": "Additionally, for comparison with other causal debiasing methods, we choose two related methods as follows: (1) CFIE (Nan et al., 2021) uses causal inference to tackle the long-tailed IE issues; (2) CoRE (Wang et al., 2022) designs a counterfactual" + }, + { + "type": "page_footnote", + "bbox": [ + 0.136, + 0.878, + 0.449, + 0.892 + ], + "angle": 0, + "content": "1https://catalog.ldc.upenn.edu/LDC2006T06" + }, + { + "type": "page_footnote", + "bbox": [ + 0.137, + 0.892, + 0.41, + 0.905 + ], + "angle": 0, + "content": "2http://nlp.cs.washington.edu/sciIE/" + }, + { + "type": "page_footnote", + "bbox": [ + 0.137, + 0.905, + 0.395, + 0.918 + ], + "angle": 0, + "content": "3https://github.com/mainlp/CrossRE" + }, + { + "type": "list", + "bbox": [ + 0.136, + 0.878, + 0.449, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_footnote", + "bbox": [ + 0.509, + 0.893, + 0.783, + 0.906 + ], + "angle": 0, + "content": "4https://paperswithcode.com/sota/" + }, + { + "type": "page_footnote", + "bbox": [ + 0.513, + 0.906, + 0.813, + 0.918 + ], + "angle": 0, + "content": "joint-entity-and-relation-extraction-on" + }, + { + "type": "list", + "bbox": [ + 0.509, + 0.893, + 0.813, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2632" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.114, + 0.085, + 0.488, + 0.117 + ], + "angle": 0, + "content": "analysis to debias RE by reducing the side-effects of entity mentions." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.13, + 0.22, + 0.143 + ], + "angle": 0, + "content": "4.5 Results" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.151, + 0.49, + 0.327 + ], + "angle": 0, + "content": "Table 1 shows the results of comparative experiments between our proposed method and baselines. As is shown, with the scibert-scivocab-uncased encoder, our proposed method, OVO, outperforms PURE-F, SpERT.PL, and PL-Marker by \\(+3.3\\%\\) \\(+2.1\\%\\) ,and \\(+2.9\\%\\) with Rel \\(^+\\) on SciERC respectively. Furthermore, on ACE2005, with both bertbase-uncased encoder and albert-xxlarge-v1 encoder, our method also outperforms the baselines on Rel+. Such improvements over baselines indicate the effectiveness and generalization of OVO." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.329, + 0.49, + 0.552 + ], + "angle": 0, + "content": "Additionally, due to CoRE (Wang et al., 2022) being only for RE, we compare OVO with CFIE (Nan et al., 2021) and CoRE only in RE using the result of OVO in NER. For the base model, we chose PURE because of SpERT.PL is a joint model that cannot handle NER and RE tasks separately and PL-Marker uses a packed method that cannot handle only one pair of entities in RE. As shown in Table 1, CFIE and CoRE can improve performance somewhat but are still lower than OVO. The results can show the effectiveness of OVO compared with other methods. Specifically, on SciERC, the REL+ of OVO was \\(1.6\\%\\) higher than CFIE; on Ace2005, the REL+ of OVO was \\(0.2\\%\\) higher than CoRE." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.555, + 0.49, + 0.714 + ], + "angle": 0, + "content": "To evaluate the effectiveness of OVO on out-of-distribution, we conduct experiments on an out-domain setting as follows: using the train set of one domain during training, and using the test sets of the other five domains during testing. We choose PL-Marker as the base model and then apply OVO on each domain. As shown in Table. 2, using OVO gains improvements in all cases with an average improvement of \\(1.5\\%\\) and a best improvement of \\(2.4\\%\\) in the ai domain." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.728, + 0.281, + 0.743 + ], + "angle": 0, + "content": "4.6 Ablation Study" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.749, + 0.49, + 0.86 + ], + "angle": 0, + "content": "In this section, we conduct ablation studies to elucidate the effectiveness of different components of our proposed method on the baseline PL-Marker (Ye et al., 2022). We use the evaluation metrics the same as in Table 1 on both ACE2005 and SciERC datasets using bert-base-uncased and scibert-scivocab-uncased as bert encoders respectively." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.872, + 0.49, + 0.919 + ], + "angle": 0, + "content": "w/o. COP: To evaluate the effectiveness of covariance optimizing, we remove COP and only use VOP in the model training process and set" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.165 + ], + "angle": 0, + "content": "all weights of feature vectors as 1 for computing \\( Loss_{COP} \\). As shown in Table 3, the performance of Rel and \\( Rel+ \\) drop \\( 0.8\\% - 2.2\\% \\) without COP, which can represent the importance to reduce the spurious correlation among features." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.182, + 0.885, + 0.31 + ], + "angle": 0, + "content": "w/o. VOP: To verify the effectiveness of variance optimization, we make VOP disabled and let only COP work in the training procedure. As shown in Table 3, when removing VOP, the performance of Rel and Rel+ drop \\(2.0\\% - 3.4\\%\\) and \\(1.6\\% - 2.2\\%\\) respectively, which can indicate the effect of the causal intervention and the VOP play an important role in OVO." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.327, + 0.885, + 0.519 + ], + "angle": 0, + "content": "w. SNet: StableNet (Zhang et al., 2021) is similar work with COP which use Random Fourier Features to enhance the non-linearity of enhanced features. To compare the effectiveness between COP and StableNet, we replace COP with StableNet keeping other settings the same, and then negotiate the final performance between them. The performance shows that using COP gains \\(+0.7\\%\\) and \\(+0.4\\%\\) improvement in Rel+ on ACE2005 and SciERC respectively. Moreover, from the results in Table 5, the consumption of COP is much smaller than that of StableNet." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.54, + 0.619, + 0.556 + ], + "angle": 0, + "content": "5 Analysis" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.571, + 0.725, + 0.587 + ], + "angle": 0, + "content": "5.1 Fine-grained analysis" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.596, + 0.885, + 0.708 + ], + "angle": 0, + "content": "To analyze the debias ability of OVO, we conduct experiments to evaluate the performance of each label on PL-Marker. The detailed results for each relation label on SciERC are shown in Table 4. From the table, the number of USERD-FOR accounts for more than half, \\(54.7\\%\\) of the total, but that of COMPARE is only \\(3.9\\%\\) of the total." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.711, + 0.885, + 0.919 + ], + "angle": 0, + "content": "From the results, the two worst-performing labels both have a small number of samples which are only \\(6.9\\%\\) and \\(6.4\\%\\) of the total, respectively. For the comparison between with or without OVO, we find that the performances in all labels gain improvement, except for USED-FOR, which is one that has the most samples in the dataset and keeps comparable performance. Additionally, the improvement increases as the number of samples decreases. The most improvement is on PART-OF, which outperforms \\(+9.1\\%\\) in F1 than without VOP. Moreover, the overall results of average F1 gain \\(+4.0\\%\\) improvement." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2633" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.126, + 0.082, + 0.874, + 0.314 + ], + "angle": 0, + "content": "
EncoderACE2005SciERC
EntRelRel+EntRelRel+
SPtree (Miwa and Bansal, 2016)LSTM83.4-55.6---
DyGIE (Luan et al., 2019)ELMo88.463.2-65.241.6-
OneIE† (Lin et al., 2020)BL88.867.5----
DyGIE++† (Wadden et al., 2019)BB/SciB88.663.4-67.0*47.5*-
SPERT (Eberts and Ulges, 2020)86.8*63.8*-70.350.8-
UniRE† (Wang et al., 2021)88.865.7*64.368.440.2*36.9
SpERT.PL (Sai et al., 2021) +OVOBB/SciB87.4*65.3*62.1*70.551.339.4
87.967.965.371.752.641.5
PL-Marker† (Ye et al., 2022) +OVO†89.869.066.569.953.241.6
89.670.667.770.756.144.5
PURE-F† (Zhong and Chen, 2021) +CFIE† (Nanet al., 2021) +CoRE† (Wanget al., 2022) +OVO†90.167.764.868.950.136.8
-67.764.5-50.938.5
-67.664.9-50.738.0
90.568.065.170.051.640.1
UniRE† (Wang et al., 2021)ALBXX90.2-66.0---
PURE-F† (Zhong and Chen, 2021)90.969.467.0---
PL-Marker† (Ye et al., 2022) +OVO†91.173.071.1---
91.274.672.3---
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.324, + 0.885, + 0.412 + ], + "angle": 0, + "content": "Table 1: Overall test results of F1 in joint entity and relation task on the dataset of ACE2005 and SciERC. †: the model or method leverages cross-sentence information as extra features. The encoders used in different models: \\( B_{B} = \\) bert-base-uncased, \\( B_{L} = \\) bert-large-uncased, \\( SciB = \\) scibert-scivocab-uncased, \\( ALB_{XX} = \\) albert-xxlarge-v1. Model name abbreviation: PURE-F = PURE(Full). Evaluation metric abbreviation: Rel denotes the boundaries evaluation and Rel+ denotes the strict evaluation. *: the result is not given in the original works, and we run the corresponding experiment, reporting the results in the table." + }, + { + "type": "table", + "bbox": [ + 0.207, + 0.423, + 0.794, + 0.476 + ], + "angle": 0, + "content": "
Rel(%)newssciencepoliticsliteratureaimusicavg
PL-Marker9.713.014.414.811.614.112.9
+OVO10.314.315.416.414.016.414.5
" + }, + { + "type": "table_caption", + "bbox": [ + 0.273, + 0.486, + 0.724, + 0.501 + ], + "angle": 0, + "content": "Table 2: Results in the out-domain setting on the CrossRE dataset." + }, + { + "type": "table", + "bbox": [ + 0.117, + 0.523, + 0.487, + 0.62 + ], + "angle": 0, + "content": "
ACE2005SciERC
EntRelRel+EntRelRel+
OVO89.670.667.770.756.144.5
w/o. COP89.769.766.970.054.143.3
w/o. VOP89.568.665.570.752.742.9
w. SNet89.470.167.070.555.044.1
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.631, + 0.488, + 0.675 + ], + "angle": 0, + "content": "Table 3: Ablation on ACE2005 and SciERC test set with different component setups. w. SNet means replacing COP with StableNet in model training." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.703, + 0.416, + 0.719 + ], + "angle": 0, + "content": "5.2 Effect of Covariance Optimizing" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.727, + 0.49, + 0.919 + ], + "angle": 0, + "content": "As the results are shown in Table 5, by using StableNet, it gains \\(+0.6\\%\\) improvement on Ent, and COP improves on it \\(+0.2\\%\\). Table 3 shows more results between COP and StableNet. So, we can conclude that stable learning technology can actually achieve improvement for our task. But the consumption of computing resources is relatively high and it costs approximately 5 and 1.7 times for training time and GPU memory respectively than the original. In comparison, COP uses fewer resources but gets better performance. Additionally, more detailed results of hyperparameters are" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.526, + 0.698, + 0.542 + ], + "angle": 0, + "content": "reported in Appendix. D." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.554, + 0.791, + 0.57 + ], + "angle": 0, + "content": "5.3 Effect of Variance Optimizing" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.575, + 0.885, + 0.704 + ], + "angle": 0, + "content": "To enhance adaptation to diverse methods, we introduce a weight for \\( Loss_{VOP} \\) to mitigate its impact on the normal training of the model and avoid performance degradation. The optimal weight varies depending on the specific dataset and method employed, as different weights yield the best performance. The detailed results are reported in Appendix. E." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.717, + 0.642, + 0.732 + ], + "angle": 0, + "content": "6 Conclusion" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.743, + 0.885, + 0.919 + ], + "angle": 0, + "content": "In this work, we propose the OVO, a novel model training framework for optimizing feature vectors using causal technology. There are two main parts of OVO which are called COP and VOP. From the perspective of the correlation among features, COP reduces the spurious relation by minimizing the covariance computed from all features. From the viewpoint of each feature, VOP makes the feature more causal by minimizing the variance calculated from each feature of the same label. After optimizing the features toward causal, our method achieves" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2634" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.169, + 0.083, + 0.827, + 0.211 + ], + "angle": 0, + "content": "
Metric (Rel)UFCONEFHOPOFOCOMavg.
Proportion (%)-54.712.69.36.96.46.03.9-
w/o. OVO (%)Recall55.262.646.264.228.623.752.647.6
Precision53.655.051.258.148.725.950.048.9
F154.358.648.660.136.024.851.347.7
w. OVO (%)Recall53.165.749.570.236.525.455.350.8
Precision55.453.354.259.559.035.760.053.9
F154.258.951.764.445.129.757.551.7
Δ-0.1+0.3+3.1+4.3+9.1+4.9+6.2+4.0
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.221, + 0.885, + 0.266 + ], + "angle": 0, + "content": "Table 4: The fine-grained results on the SciERC dataset. Relation label abbreviation: UF=USED-FOR, CON=CONJUNCTION, EF=EVALUATE-FOR, HO=HYPONYM-OF, PO=PART-OF, FO=FEATURE-OF, COM=COMPARE. Proportion means the percentage of the number of one relation label in total data." + }, + { + "type": "table", + "bbox": [ + 0.166, + 0.287, + 0.433, + 0.37 + ], + "angle": 0, + "content": "
NameEntGPU (GB)Time (h)
PL-Marker69.9192
w.COP70.7244
w.SNet70.53210
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.379, + 0.489, + 0.465 + ], + "angle": 0, + "content": "Table 5: The experiment results on the SciERC. The base model is PL-Marker. COP means covariance optimizing; Time (h) is the time consumption of model training. The text with bold and italics indicates the best performance, and that with underlining indicates the second best." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.497, + 0.49, + 0.593 + ], + "angle": 0, + "content": "improvements on 3 strong baselines and reduces the influence of data unbalanced bias. In the future, we will pay more attention to (1) how to further reduce resource consumption on COP and (2) how can let the weight of VOP adjusts itself automatically to adapt to the different datasets." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.616, + 0.22, + 0.631 + ], + "angle": 0, + "content": "Limitations" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.648, + 0.49, + 0.698 + ], + "angle": 0, + "content": "OVO is a novel training framework for optimizing feature representations directly using causal technology. The limitations of OVO are as follows:" + }, + { + "type": "text", + "bbox": [ + 0.136, + 0.72, + 0.489, + 0.799 + ], + "angle": 0, + "content": "- COP is an additional training process in each batch that will improve resource consumption. Larger models and more previous information used in COP will cost more additional resources." + }, + { + "type": "text", + "bbox": [ + 0.136, + 0.823, + 0.49, + 0.919 + ], + "angle": 0, + "content": "- To adapt OVO to more models, there are some hyperparameters to control the degree of effect of COP and VOP during training. These hyperparameters are sensitive to different models and datasets, so it takes time to experiment to find the optimal values of them." + }, + { + "type": "list", + "bbox": [ + 0.136, + 0.72, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.289, + 0.682, + 0.306 + ], + "angle": 0, + "content": "Acknowledgements" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.315, + 0.885, + 0.492 + ], + "angle": 0, + "content": "The State Key Program of National Natural Science of China, Grant/Award Number:61533018; National Natural Science Foundation of China, Grant/Award Number: 61402220; The Philosophy and Social Science Foundation of Hunan Province, Grant/Award Number: 16YBA323; Natural Science Foundation of Hunan Province, Grant/Award Number: 2020JJ4525,2022JJ30495; Scientific Research Fund of Hunan Provincial Education Department, Grant/Award Number: 18B279,19A439,22A0316." + }, + { + "type": "title", + "bbox": [ + 0.511, + 0.521, + 0.61, + 0.535 + ], + "angle": 0, + "content": "References" + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.543, + 0.885, + 0.624 + ], + "angle": 0, + "content": "Elisa Bassignana and Barbara Plank. 2022. Crossre: A cross-domain dataset for relation extraction. In Findings of the Association for Computational Linguistics: EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 3592-3604. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.633, + 0.886, + 0.74 + ], + "angle": 0, + "content": "Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. Scibert: A pretrained language model for scientific text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 3613-3618. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.749, + 0.886, + 0.856 + ], + "angle": 0, + "content": "Razvan C. Bunescu and Raymond J. Mooney. 2005. A shortest path dependency kernel for relation extraction. In HLT/EMNLP 2005, Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing, Proceedings of the Conference, 6-8 October 2005, Vancouver, British Columbia, Canada, pages 724-731. The Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.51, + 0.866, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Huajun Chen, Ning Hu, Guilin Qi, Haofen Wang, Zhen Bi, Jie Li, and Fan Yang. 2021. Openkg chain: A blockchain infrastructure for open knowledge graphs. Data Intell., 3(2):205-227." + }, + { + "type": "list", + "bbox": [ + 0.51, + 0.543, + 0.886, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2635" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.126 + ], + "angle": 0, + "content": "David A. Cohn, Zoubin Ghahramani, and Michael I. Jordan. 1996. Active learning with statistical models. J. Artif. Intell. Res., 4:129-145." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.134, + 0.488, + 0.265 + ], + "angle": 0, + "content": "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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.274, + 0.488, + 0.352 + ], + "angle": 0, + "content": "Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. 2018. Measuring and mitigating unintended bias in text classification. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, AIES '18, page 67-73, New York, NY, USA. Association for Computing Machinery." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.361, + 0.488, + 0.479 + ], + "angle": 0, + "content": "Carsten F. Dormann, Jane Elith, Sven Bacher, Carsten Buchmann, Gudrun Carl, Gabriel Carré, Jaime R. García Marquez, Bernd Gruber, Bruno Lafourcade, Pedro J. Leitão, Tamara Munkemüller, Colin McClean, Patrick E. Osborne, Björn Reineking, Boris Schröder, Andrew K. Skidmore, Damaris Zurell, and Sven Lautenbach. 2013. Collinearity: a review of methods to deal with it and a simulation study evaluating their performance. Ecography, 36(1):27-46." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.487, + 0.488, + 0.54 + ], + "angle": 0, + "content": "Huifang Du, Zhongwen Le, Haofen Wang, Yunwen Chen, and Jing Yu. 2022a. COKG-QA: multi-hop question answering over COVID-19 knowledge graphs. Data Intell., 4(3):471-492." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.548, + 0.488, + 0.653 + ], + "angle": 0, + "content": "Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. 2022b. GLM: general language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 320-335. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.661, + 0.488, + 0.791 + ], + "angle": 0, + "content": "Markus Eberts and Adrian Ulges. 2020. Span-based joint entity and relation extraction with transformer pre-training. In ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, Santiago de Compostela, Spain, August 29 - September 8, 2020 - Including 10th Conference on Prestigious Applications of Artificial Intelligence (PAIS 2020), volume 325 of Frontiers in Artificial Intelligence and Applications, pages 2006-2013. IOS Press." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.801, + 0.488, + 0.917 + ], + "angle": 0, + "content": "Jiannan Guo, Yangyang Kang, Yu Duan, Xiaozhong Liu, Siliang Tang, Wenqiao Zhang, Kun Kuang, Changlong Sun, and Fei Wu. 2022. Collaborative intelligence orchestration: Inconsistency-based fusion of semi-supervised learning and active learning. In KDD '22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 - 18, 2022, pages 2935-2945. ACM." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.917 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.086, + 0.882, + 0.152 + ], + "angle": 0, + "content": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9726-9735." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.164, + 0.882, + 0.229 + ], + "angle": 0, + "content": "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." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.242, + 0.882, + 0.334 + ], + "angle": 0, + "content": "Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020. ALBERT: A lite BERT for self-supervised learning of language representations. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.346, + 0.882, + 0.424 + ], + "angle": 0, + "content": "Ying Lin, Heng Ji, Fei Huang, and Lingfei Wu. 2020. A joint neural model for information extraction with global features. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7999-8009, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.437, + 0.882, + 0.515 + ], + "angle": 0, + "content": "Zihan Lin, Changxin Tian, Yupeng Hou, and Wayne Xin Zhao. 2022. Improving graph collaborative filtering with neighborhood-enriched contrastive learning. In WWW '22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 - 29, 2022, pages 2320-2329. ACM." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.527, + 0.882, + 0.633 + ], + "angle": 0, + "content": "Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. 2018. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 3219-3232. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.645, + 0.882, + 0.763 + ], + "angle": 0, + "content": "Yi Luan, Dave Wadden, Luheng He, Amy Shah, Mari Ostendorf, and Hannaneh Hajishirzi. 2019. A general framework for information extraction using dynamic span graphs. 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 3036-3046, Minneapolis, Minnesota. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.775, + 0.882, + 0.867 + ], + "angle": 0, + "content": "Makoto Miwa and Mohit Bansal. 2016. End-to-end relation extraction using lstms on sequences and tree structures. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.879, + 0.882, + 0.918 + ], + "angle": 0, + "content": "Subhabrata Mukherjee and Ahmed Hassan Awadallah. 2020. Uncertainty-aware self-training for text classification with few labels. CoRR, abs/2006.15315." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.882, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2636" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.191 + ], + "angle": 0, + "content": "Guoshun Nan, Jiaqi Zeng, Rui Qiao, Zhijiang Guo, and Wei Lu. 2021. Uncovering main causalities for long-tailed information extraction. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 9683-9695. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.2, + 0.49, + 0.226 + ], + "angle": 0, + "content": "Judea Pearl. 1995. Causal diagrams for empirical research. Biometrika, 82(4):669-688." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.235, + 0.489, + 0.275 + ], + "angle": 0, + "content": "Judea Pearl, Madelyn Glymour, and Nicholas P Jewell. 2016. Causal inference in statistics: A primer. John Wiley & Sons." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.284, + 0.489, + 0.362 + ], + "angle": 0, + "content": "Lev-Arie Ratinov and Dan Roth. 2009. Design challenges and misconceptions in named entity recognition. In Proceedings of the Thirteenth Conference on Computational Natural Language Learning, CoNLL 2009, Boulder, Colorado, USA, June 4-5, 2009, pages 147-155. ACL." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.372, + 0.489, + 0.436 + ], + "angle": 0, + "content": "Farshid Rayhan, Sajid Ahmed, Asif Mahbub, Md. Rafsan Jani, Swakkhar Shatabda, and Dewan Md. Farid. 2017. Cusboost: Cluster-based under-sampling with boosting for imbalanced classification. CoRR, abs/1712.04356." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.446, + 0.49, + 0.578 + ], + "angle": 0, + "content": "Santosh Tokala Yaswanth Sri Sai, Prantika Chakraborty, Sudakshina Dutta, Debarshi Kumar Sanyal, and Partha Pratim Das. 2021. Joint entity and relation extraction from scientific documents: Role of linguistic information and entity types. In Proceedings of the 2nd Workshop on Extraction and Evaluation of Knowledge Entities from Scientific Documents (EEKE 2021) co-located with JCDL 2021, Virtual Event, September 30th, 2021, volume 3004 of CEUR Workshop Proceedings, pages 15-19. CEUR-WS.org." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.586, + 0.49, + 0.704 + ], + "angle": 0, + "content": "Yuming Shang, Heyan Huang, and Xianling Mao. 2022. Onerel: Joint entity and relation extraction with one module in one step. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11285-11293. AAAI Press." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.713, + 0.49, + 0.792 + ], + "angle": 0, + "content": "Zheyan Shen, Peng Cui, Kun Kuang, Bo Li, and Peixuan Chen. 2018. Causally regularized learning with agnostic data selection bias. In 2018 ACM Multimedia Conference on Multimedia Conference, MM 2018, Seoul, Republic of Korea, October 22-26, 2018, pages 411-419. ACM." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.801, + 0.49, + 0.917 + ], + "angle": 0, + "content": "Zheyan Shen, Peng Cui, Tong Zhang, and Kun Kuang. 2020. Stable learning via sample reweighting. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 5692-5699. AAAI Press." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.917 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.204 + ], + "angle": 0, + "content": "David Wadden, Ulme Wennberg, Yi Luan, and Hannaneh Hajishirzi. 2019. Entity, relation, and event extraction with contextualized span representations. 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 5784-5789, Hong Kong, China. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.213, + 0.885, + 0.318 + ], + "angle": 0, + "content": "Yijun Wang, Changzhi Sun, Yuanbin Wu, Hao Zhou, Lei Li, and Junchi Yan. 2021. UniRE: A unified label space for entity relation extraction. 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 220-231, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.326, + 0.885, + 0.47 + ], + "angle": 0, + "content": "Yiwei Wang, Muhao Chen, Wenxuan Zhou, Yujun Cai, Yuxuan Liang, Dayiheng Liu, Baosong Yang, Juncheng Liu, and Bryan Hooi. 2022. Should we rely on entity mentions for relation extraction? debiasing relation extraction with counterfactual analysis. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL 2022, Seattle, WA, United States, July 10-15, 2022, pages 3071-3081. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.478, + 0.885, + 0.571 + ], + "angle": 0, + "content": "Deming Ye, Yankai Lin, Peng Li, and Maosong Sun. 2022. Packed levitated marker for entity and relation extraction. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 4904-4917. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.578, + 0.885, + 0.657 + ], + "angle": 0, + "content": "Xingxuan Zhang, Peng Cui, Renzhe Xu, Linjun Zhou, Yue He, and Zheyan Shen. 2021. Deep stable learning for out-of-distribution generalization. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 5372-5382. Computer Vision Foundation / IEEE." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.666, + 0.885, + 0.758 + ], + "angle": 0, + "content": "Zexuan Zhong and Danqi Chen. 2021. A frustratingly easy approach for entity and relation extraction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 50-61. Association for Computational Linguistics." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.758 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.512, + 0.767, + 0.671, + 0.783 + ], + "angle": 0, + "content": "A Causal Graph" + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.791, + 0.885, + 0.919 + ], + "angle": 0, + "content": "From Fig. 2, \\( L \\to F \\) denotes that real labels in datasets have an effect on the feature vectors learned by model training, and \\( L \\to P \\) denotes that real labels have an effect on model predictions because the loss in training is calculated by labels and predictions. So the backdoor path \\( F \\gets L \\to P \\) makes models give relatively high scores to the labels with numerous samples." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2637" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.115, + 0.084, + 0.426, + 0.118 + ], + "angle": 0, + "content": "B Derivation Process of Backdoor Adjustment" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.126, + 0.487, + 0.174 + ], + "angle": 0, + "content": "In this section, we will give an explanation for each step of backdoor adjustment. To make it easier to understand, we draw a new equation as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.126, + 0.2, + 0.487, + 0.363 + ], + "angle": 0, + "content": "\\[\n\\begin{array}{l} p (P | d o (F)) \\stackrel {(1)} {=} \\sum_ {L} p (P | d o (F), \\underline {{L}}) p (\\underline {{L}} | d o (F)) \\\\ \\stackrel {(2)} {=} \\sum_ {L} p (P | d o (F), L) P (L | \\underline {{F}}) \\\\ \\stackrel {(3)} {=} \\sum_ {L} p (P | \\underline {{F}}, L) p (L | F) \\\\ \\stackrel {(4)} {=} \\sum_ {L} p (P | F, L) \\underline {{p (L)}} \\tag {13} \\\\ \\end{array}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.365, + 0.489, + 0.414 + ], + "angle": 0, + "content": "Where the meaning of \\(P\\), \\(F\\), and \\(L\\) are the same as Fig. 2; \\(do(\\cdot)\\) means do-operator. The underline means the main differences from the previous step." + }, + { + "type": "text", + "bbox": [ + 0.121, + 0.423, + 0.489, + 0.47 + ], + "angle": 0, + "content": "(1) using the total probability theorem where \\( do(F) \\) can be seen as a normal random variables event like \\( P \\) and \\( L \\)." + }, + { + "type": "text", + "bbox": [ + 0.122, + 0.482, + 0.489, + 0.546 + ], + "angle": 0, + "content": "(2) from the causal graph in Fig. 2, the path \\( L \\to F \\) is a direct causal path without backdoor paths, so \\( p(L|do(F)) \\) and \\( p(L|F) \\) are equivalent." + }, + { + "type": "text", + "bbox": [ + 0.122, + 0.557, + 0.488, + 0.637 + ], + "angle": 0, + "content": "(3) because of conditioning on \\(L\\), the association in the path \\(F \\leftarrow L \\rightarrow P\\) is blocked. So in this case, the association in the path \\(F \\rightarrow P\\) is causality which can remove the do-operator without any influence." + }, + { + "type": "text", + "bbox": [ + 0.122, + 0.648, + 0.489, + 0.713 + ], + "angle": 0, + "content": "(4) due to the direction of the causal path between \\( L \\) and \\( F \\) being \\( F \\gets L \\), there is no association from \\( F \\) to \\( L \\) which causes the \\( L \\) to be independent with \\( F \\) meaning \\( p(L|F) = p(L) \\)." + }, + { + "type": "list", + "bbox": [ + 0.121, + 0.423, + 0.489, + 0.713 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.724, + 0.385, + 0.741 + ], + "angle": 0, + "content": "C Overall Algorithm of OVO" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.749, + 0.489, + 0.765 + ], + "angle": 0, + "content": "The algorithm of OVO is shown in the algorithm. 1." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.776, + 0.298, + 0.793 + ], + "angle": 0, + "content": "D Analysis of COP" + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.802, + 0.339, + 0.818 + ], + "angle": 0, + "content": "D.1 Saving Batch Number" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.823, + 0.489, + 0.919 + ], + "angle": 0, + "content": "When the dataset is large enough, it is hard to put all feature vectors into COP and optimize them at once. So, by using eq. 6, we can use part of the vectors to relieve the pressure on computing resources. To research the effect of COP when just using partial vectors, we conduct comparative experiments with" + }, + { + "type": "code_caption", + "bbox": [ + 0.511, + 0.084, + 0.876, + 0.1 + ], + "angle": 0, + "content": "Algorithm 1 The training procedure of the OVO" + }, + { + "type": "text", + "bbox": [ + 0.51, + 0.104, + 0.884, + 0.145 + ], + "angle": 0, + "content": "Input: Initial pre-trained BERT encoder \\(\\mathbf{BE}^{(0)}\\) and classifier \\(\\mathbf{C}^{(0)}\\), training dataset \\(\\mathcal{D}\\), training epochs for model training \\(T_{mt}\\), training epochs for COP \\(T_{cop}\\)" + }, + { + "type": "text", + "bbox": [ + 0.511, + 0.145, + 0.791, + 0.158 + ], + "angle": 0, + "content": "Output: Trained model \\((\\mathbf{BE}^{(T_{mt})},\\mathbf{C}^{(T_{mt})})\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.158, + 0.698, + 0.169 + ], + "angle": 0, + "content": "1: for \\( t_{mt} = 0 \\) to \\( T_{mt} \\) do" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.169, + 0.826, + 0.181 + ], + "angle": 0, + "content": "2: \\(\\mathbf{F}_{\\mathrm{pre}} \\gets\\) Clear the previous feature vectors;" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.181, + 0.791, + 0.194 + ], + "angle": 0, + "content": "3: \\(\\bar{\\mathbf{W}}_{\\mathrm{pre}}\\gets\\) Clear the previous weights;" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.194, + 0.746, + 0.205 + ], + "angle": 0, + "content": "4: for (Sents, Spans) in \\(\\mathcal{D}\\) do" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.206, + 0.722, + 0.219 + ], + "angle": 0, + "content": "5: \\(\\mathbf{H} = \\mathbf{B}\\mathbf{E}^{(t_{mt})}(Sents)\\)" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.219, + 0.783, + 0.231 + ], + "angle": 0, + "content": "6: \\(\\mathbf{F}_{\\mathrm{cur}} = \\text{GetSpanFeatures}(\\mathbf{H})\\)" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.232, + 0.706, + 0.244 + ], + "angle": 0, + "content": "7: \\(\\mathbf{P} = \\mathbf{C}^{(t_{mt})}(\\mathbf{F}_{\\mathbf{cur}})\\)" + }, + { + "type": "text", + "bbox": [ + 0.518, + 0.245, + 0.684, + 0.256 + ], + "angle": 0, + "content": "8: \\(\\mathbf{W}_{\\mathrm{cur}} \\gets \\mathrm{Initial}\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.256, + 0.743, + 0.268 + ], + "angle": 0, + "content": "9: \\(\\mathbf{F} = \\text{concat}(\\mathbf{F}_{\\text{pre}}, \\mathbf{F}_{\\text{cur}})\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.268, + 0.766, + 0.28 + ], + "angle": 0, + "content": "10: \\(\\mathbf{W} = \\text{concat}(\\mathbf{W}_{\\text{pre}}, \\mathbf{W}_{\\text{cur}})\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.28, + 0.752, + 0.291 + ], + "angle": 0, + "content": "11: for \\(t_{cop} = 0\\) to \\(T_{cop}\\) do" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.291, + 0.805, + 0.305 + ], + "angle": 0, + "content": "12: \\(\\mathcal{L}_{\\mathcal{W}} = \\sum_{i\\neq j}cov(\\mathbf{WF}_i,\\mathbf{WF}_j)\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.305, + 0.752, + 0.318 + ], + "angle": 0, + "content": "13: \\(\\mathbf{W}_{\\mathrm{cur}}\\gets \\text{Optim} (\\mathcal{L}_{\\mathcal{W}})\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.318, + 0.634, + 0.329 + ], + "angle": 0, + "content": "14: end for" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.329, + 0.794, + 0.341 + ], + "angle": 0, + "content": "15: \\((\\mathbf{F}_{\\mathrm{pre}},\\mathbf{W}_{\\mathrm{pre}})\\gets\\) update and fuse" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.341, + 0.815, + 0.353 + ], + "angle": 0, + "content": "16: \\(\\mathcal{L}_{orig} = CrossEntropy(\\mathbf{P},\\mathsf{Spans})\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.353, + 0.72, + 0.365 + ], + "angle": 0, + "content": "17: \\(\\mathcal{L}_{COP} = \\mathbf{W}_{\\mathbf{cur}}\\mathcal{L}_{orig}\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.365, + 0.802, + 0.379 + ], + "angle": 0, + "content": "18: \\(\\mathcal{L}_{VOP} = \\sum_{l=0}^{L} \\sum_{n=0}^{N} var(\\mathbf{F}_{(l,n)})\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.379, + 0.716, + 0.39 + ], + "angle": 0, + "content": "19: \\(\\mathcal{L} = \\mathcal{L}_{COP} + \\mathcal{L}_{VOP}\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.39, + 0.81, + 0.402 + ], + "angle": 0, + "content": "20: \\((\\mathbf{BE}^{\\mathbf{t}_{\\mathrm{mt}} + 1},\\mathbf{C}^{\\mathbf{t}_{\\mathrm{mt}} + 1})\\gets Optim(\\mathcal{L})\\)" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.402, + 0.61, + 0.413 + ], + "angle": 0, + "content": "21: end for" + }, + { + "type": "text", + "bbox": [ + 0.517, + 0.413, + 0.588, + 0.424 + ], + "angle": 0, + "content": "22: end for" + }, + { + "type": "list", + "bbox": [ + 0.51, + 0.104, + 0.884, + 0.424 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.52, + 0.465, + 0.833, + 0.649 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.508, + 0.659, + 0.884, + 0.757 + ], + "angle": 0, + "content": "Figure 5: The impact of different Saving Batch Numbers on the performance of COP is evaluated using the SciERC test set. The inf notation denotes the scenario where all feature vectors are used for COP without any deletions. Relation F1 means evaluating with gold entities in \\(\\mathbf{Rel}+\\); for eq. 8, \\(\\alpha\\) is equal to 0.9 in the experiments." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.791, + 0.883, + 0.919 + ], + "angle": 0, + "content": "different saving batch numbers on PL-Marker (Ye et al., 2022). As shown in Fig. 5, as the saving batch number rises, the overall trend of F1 also rises and reaches the best performance at inf (around \\(2^{10}\\) in our training setting). It can be concluded that using more vectors for COP can reduce spurious correlation better and gain more improvement, but require more computing resources." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2638" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.152, + 0.101, + 0.426, + 0.263 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.152, + 0.295, + 0.426, + 0.459 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.153, + 0.487, + 0.426, + 0.651 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.169, + 0.668, + 0.433, + 0.684 + ], + "angle": 0, + "content": "Figure 6: Effect of different \\(\\alpha\\) of COP." + }, + { + "type": "image", + "bbox": [ + 0.525, + 0.1, + 0.838, + 0.283 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.509, + 0.299, + 0.882, + 0.327 + ], + "angle": 0, + "content": "Figure 7: Effect of the different weights of VOP. F1 is Rel on datasets." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.353, + 0.884, + 0.402 + ], + "angle": 0, + "content": "0.4 on ACE2005 and SciERC respectively. The detailed results for the COP rate are shown in Fig. 7 which only uses COP in experiments." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.413, + 0.691, + 0.429 + ], + "angle": 0, + "content": "E Analysis of VOP" + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.438, + 0.819, + 0.455 + ], + "angle": 0, + "content": "E.1 Tradeoff on Variance Optimizing" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.459, + 0.884, + 0.539 + ], + "angle": 0, + "content": "For better adaptation to different tasks, it is important to give \\( Loss_{VOP} \\) a weight, preventing it to influence the model training and hurt the performance. We compute the final loss with weighed \\( Loss_{VOP} \\) as follows:" + }, + { + "type": "equation", + "bbox": [ + 0.541, + 0.553, + 0.884, + 0.571 + ], + "angle": 0, + "content": "\\[\nL o s s _ {f i n a l} = L o s s _ {C O P} + \\lambda L o s s _ {V O P} \\tag {14}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.582, + 0.884, + 0.694 + ], + "angle": 0, + "content": "Where \\(\\lambda\\) is a hyperparameter regarding the weight of \\(Loss_{VOP}\\). From the results in Fig. 8, different datasets get the best performance in different weights of VOP which \\(\\lambda = 0.2\\) is the optimal value for ACE2005 and \\(\\lambda = 0.1\\) is that for SciERC, and the performance is particularly sensitive to the weight which changes drastically using different \\(\\lambda\\)." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.711, + 0.28, + 0.727 + ], + "angle": 0, + "content": "D.2 Effect of alpha" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.735, + 0.49, + 0.831 + ], + "angle": 0, + "content": "To explore the effect of fusing current information, we conduct experiments for fusing hyperparameter \\(\\alpha\\) of eq. 8. We fix the saving batch number to infinite and change the \\(\\alpha\\) in the same training configuration. Fig. 6 shows the detailed result of the experiments." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.848, + 0.24, + 0.862 + ], + "angle": 0, + "content": "D.3 COP rate" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.872, + 0.489, + 0.919 + ], + "angle": 0, + "content": "We use \\( r_{COP} = 1 \\) in PURE (Zhong and Chen, 2021) and PL-Marker (Ye et al., 2022). For SpERT.PL, we set the COP rate equal to 0.1 and" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2639" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.151, + 0.308, + 0.424, + 0.468 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.153, + 0.501, + 0.424, + 0.66 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.115, + 0.68, + 0.486, + 0.708 + ], + "angle": 0, + "content": "Figure 8: Effect of the different weights of VOP. F1 is Rel on datasets." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "2640" + } + ] +] \ No newline at end of file diff --git a/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_origin.pdf b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6c193e82f546aee26201b8f929bda2bc0c8286c2 --- /dev/null +++ b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/7582e53f-03e7-43e9-a131-c6d526c9923a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecc287862d0c167aee50cc47b265d370a6ccb0f35b8d731331b3e91fd09a69a6 +size 792717 diff --git a/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/full.md b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..29a97ec00edf9cfd6a46ff4bf46a7750dc91624c --- /dev/null +++ b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/full.md @@ -0,0 +1,451 @@ +# CoVariance-based Causal Debiasing for Entity and Relation Extraction + +Lin Ren $^{1}$ , Yongbin Liu $^{1*}$ , Yixin Cao $^{2}$ , Chunping Ouyang $^{1}$ + +1University of South China, 2Singapore Management University {homurat.rl, yongbinliu03, caoyixin2011} @ gmail.com, ouyangcp@126.com + +# Abstract + +Joint entity and relation extraction tasks aim to recognize named entities and extract relations simultaneously. Suffering from a variety of data biases, such as data selection bias, and distribution bias (out of distribution, long-tail distribution), serious concerns can be witnessed to threaten the model's transferability, robustness, and generalization. In this work, we address the above problems from a causality perspective. We propose a novel causal framework called covariance and variance optimization framework (OVO) to optimize feature representations and conduct general debiasing. In particular, the proposed covariance optimizing (COP) minimizes characterizing features' covariance for alleviating the selection and distribution bias and enhances feature representation in the feature space. Furthermore, based on the causal backdoor adjustment, we propose variance optimizing (VOP) separates samples in terms of label information and minimizes the variance of each dimension in the feature vectors of the same class label for mitigating the distribution bias further. By applying it to three strong baselines in two widely used datasets, the results demonstrate the effectiveness and generalization of OVO for joint entity and relation extraction tasks. Furthermore, a fine-grained analysis reveals that OVO possesses the capability to mitigate the impact of long-tail distribution. The code is available at https://github.com/HomuraT/OVO. + +# 1 Introduction + +Named Entity Recognition (NER, (Ratinov and Roth, 2009)) and Relation Extraction (RE, (Bunescu and Mooney, 2005)) are both the key fundamental tasks of Information Extraction and both significant predecessor tasks for building knowledge graphs that are used widely in daily life (Chen et al., 2021; Ji et al., 2022; Du et al., 2022a). There are two major methods to extract the final result. + +![](images/b36fa68d451e83bdde3a15c7408a80eb3a117f1cb879b420202beb0b5e92aca6.jpg) +Figure 1: An example of RE on SciERC (the label bias increases the risk of predicting some label possessing majority samples). The confidence at the upper right is predicted by PL-Marker (Ye et al., 2022). The ground-truth relation of the example is PART-OF, but due to the bias in the train set, the NO-RELATION is inferred. After using our OVO, PART-OF is predicted correctly. + +One is to build a separate model (pipeline) to get the result in one step (Shang et al., 2022), and the other is to use multiple models (joint) to extract entities and relations in turn (Zhong and Chen, 2021; Ye et al., 2022). + +Suffering from various biases in data, such as data selection bias, out-of-distribution, and long-tail distribution (Lin et al., 2022; Wang et al., 2022), models may learn spurious correlations and make erroneous predictions. Although we would like to be able to obtain a uniform (or unbiased) data set, such a dataset is almost nonexistent in real applications. Various biases are always mixed up in real scenarios, for example, selected data in a way that differs from the target population (data selection bias), training and testing data distribution shift (out-of-distribution), the labels with numerous samples may have more chances to inference (long-tail distribution lead to predicting majority bias), and some of the data biases are even unknown. Because statistical correlation is the basis of supervised learning algorithms, the learning algorithms may learn many spurious correlations due to these biases. Finally, this leads to a greatly re + +duced predictive ability of the models. As shown in Fig. 1 (left), there are different degrees of the data bias of long-tail distribution in SciERC (Luan et al., 2018), which is common for other datasets as well, making models focus more on the labels with numerous samples and performing poorly on the others (fewer chances to the labels with few samples). + +In recent years, debiasing has become a significant research focus. There are different ways to address the data bias by reweighting samples (Dixon et al., 2018; Rayhan et al., 2017; Wang et al., 2022). These methods focus on the reweights in the sample space and ignore spurious correlations due to data selection bias. Recently, stable learning (Shen et al., 2018, 2020; Zhang et al., 2021) proposed serial ways to de-bias the spurious correlation to find the causal effect of each input feature on the basis of the correlation. Specifically, these methods require extensive calculation resources to identify causality and focus solely on causal effects between features. Additionally, they fail to consider the causal effects for each feature dimension within the same class label. + +In this work, we introduce a method called the covariance and variance optimization framework (OVO), to optimize the feature vectors from two aspects, decorrelating between features and each feature dimension of the same class label. Our contributions can be summarized as follows: + +- From decorrelating between features, inspired by stable learning, we use covariance as the confounder degree of features and try to minimize it in each batch of every epoch to learn the causality between features and targets. We minimize the covariance to reduce the collinearity of each feature, get the causal effects, alleviate the data selection and distribution biases, and enhance feature representation. We call this method covariance optimizing (COP). +- From feature dimensions of the same class label, according to the variance of each dimension, using the intervention of causal inference (Pearl et al., 2016), it can eliminate the confounding bias from the backdoor path by blocking $F \gets L \to P$ as the causal graph shown in Fig.2, so that model can learn the causality from the causal path $F \rightarrow P$ . We explore the causal correlation between the fea + +Figure 2: The causal graph of the joint entity and relation extraction task in the classification phase. Bias is something that we can not avoid, such as agnostic data selection bias, data labeling error, and unobservable features. +![](images/dd66949ef3a19de2e11f246d4281b67420fac2c63547e22d7072147fbfcde385.jpg) +L:RealLabel +F : Feature vector +P : Prediction +B:Bias + +ture dimensions of the same label and the outcome targets and mitigate the long-tail distribution bias further. We call this method variance optimizing (VOP). + +- We combine COP and VOP as OVO. To access the effectiveness of OVO, we conduct experiments on the joint entity and relation extraction task. By applying OVO to 3 strong baselines, we observe significant improvements in the performance of this task, which demonstrates the effectiveness and generalization of our proposed method. These results suggest that optimizing feature representation directly is actually an effective way to get improvement and reduce the bias from datasets without model redesigning, and OVO is a feasible framework in this way. + +# 2 Related Work + +Stable Learning aims to research how to reduce the agnostic data selection bias and model misspecification problem and make the feature more causal by reweighting samples. CRLR (Shen et al., 2018) proposes an equation to evaluate the degree of confounders called Causal Regularized Logistic Regression and gains the optimal weight by minimizing the confounder. SRDO (Shen et al., 2020) considers the smallest feature of the covariance matrix as the degree of confounder. StableNet (Zhang et al., 2021) adopts stable learning technology into image classification tasks using deep learning models and the results show the strong domain adaptation of the proposed models. + +Span-level NER and RE Models are the approaches using the boundaries of spans as a total feature to recognize the entities and the relation + +![](images/94a89dcc13f7497cf8bad0a97ff45b1b5f516b2985170803f94acaab965a33bd.jpg) + +![](images/c9d9be574a924450d8149fd7336c302af8eab5f056b0c84cad930106327303f3.jpg) +Variance Optimizing(VOP) +Figure 3: The overview of OVO. In the training phase of the model, we insert COP and VOP as extra optimization for feature vectors. For COP, there is an inner loop to learn the optimal $\mathbf{W}$ using gradient descent, and $Loss_W$ is the loss function of $\mathbf{W}$ calculated according to eq. 4. For VOP, Backdoor Adjustment is used to reduce the bias from datasets. Note that $Loss_W$ only computes the gradient of $\mathbf{W}$ , and only the final optimal weights $\hat{\mathbf{W}}$ created in COP will be applied to the model training process. The $Loss_{VOP}$ will be used in model training directly. $Loss_{orig}$ means the loss employed on the original method; $\mathbf{O}$ means zero matrix. + +between two entities. DyGIE++ (Wadden et al., 2019) and SpERT.PL (Sai et al., 2021) extract features of spans and share them between NER and RE tasks. PURE (Zhong and Chen, 2021) uses two separate span models to recognize entities and relations without interaction with each other and proposed levitated markers to reinforce the boundaries information of spans. PL-Marker (Ye et al., 2022) proposes neighborhood-oriented packing and subject-oriented packing methods to leverage the levitated markers. + +Variance and Covariance are two important metrics in deep learning. In confidence learning (Mukherjee and Awadallah, 2020), they are negatively correlated with the confidence of models and samples. Moreover, in active learning (Cohn et al., 1996), they are correlated with generalization error and bias which can be indirectly reduced by minimizing variance or covariance. Recently, IDEAL (Guo et al., 2022) uses variance as one of the measures for the inconsistency of unlabeled samples. In this work, we use them to estimate the feature representation and correlation between features respectively. + +# 3 Method + +In this section, we first briefly introduce the general inference process of the joint entity and relation + +extraction methods. Then, we will describe covariance optimizing (COP) and variance optimizing (VOP). + +# 3.1 Background: Inference Process of Joint Entity and Relation Extraction Methods + +In the joint entity and relation extraction task, the goal is to extract both entities and the relations between them from a given text. The general process of this task involves several steps. Firstly, an encoder module is used to transfer pure text to a numerical representation that captures the semantic information. This can be done using techniques like word embeddings or pre-trained language models (PLMs). + +$$ +\mathbf {S} = w _ {1}, w _ {2}, \dots , w _ {l} \tag {1} +$$ + +$$ +\mathbf {H} = \operatorname {e n c o d e r} (\mathbf {S}) +$$ + +Where $w_{i}$ indicates the $i$ -th word of the given text; $l$ means the length of the text; $\mathbf{H} \in \mathbf{R}^{l \times n}$ represents the representation of the text and $n$ is the dimension size. + +For NER, the encoded representations are passed through an entity extraction module to identify and classify entities in the text. The formulations of span-level methods are as follows: + +$$ +f _ {(i, j)} ^ {\text {s p a n}} = \operatorname {e x t r a c t o r} (\mathbf {H}, i, j) \tag {2} +$$ + +$$ +l a b e l _ {(i, j)} ^ {s p a n} = \operatorname {c l a s s i f i e r} \left(f _ {(i, j)} ^ {s p a n}\right) +$$ + +Where $0 \leq i \leq j \leq l$ indicates the boundary of a span; $l$ means the length of the given text; $f_{(i,j)}^{span}$ is the feature of a span; extractor $(\cdot)$ is a function to gain the feature of given spans; classifier $(\cdot)$ is a function to predict the label of spans according to its representation. + +For RE, $\mathbf{H}$ and the spans of identified entities are used to determine the relations between the entities. + +$$ +\begin{array}{l} f _ {(i, j)} ^ {r e l} = \operatorname {e x t r a c t o r} (\mathbf {H}, \text {s p a n} _ {i}, \text {s p a n} _ {j}) \\ l a b e l _ {(i, j)} ^ {r e l} = \operatorname {c l a s s i f i e r} \left(f _ {(i, j)} ^ {r e l}\right) \\ \end{array} +$$ + +Where $span_{i}$ is the entity identified by NER; extractor $(\cdot)$ is a function to acquire the feature of given relations; classifier $(\cdot)$ is a function to predict the label of relations. In this work, OVO is used to optimize the $f_{(i,j)}^{span}$ and $f_{(i,j)}^{rel}$ during training. + +# 3.2 Covariance Optimizing + +When the features exhibit linear correlations with each other, it can lead to instability in parameter estimation. Consequently, the optimal model becomes uncertain, and the presence of selection and distribution biases is amplified during inference. This phenomenon is called collinearity (Dormann et al., 2013). For example, $y = x_{1} + x_{2}$ and $y = 100x_{1} - 98x_{2}$ have identical performance if assumption $x_{1} = x_{2}$ holds in train datasets, but if $x_{1} = 1.01x_{2}$ holds in test datasets, the gaps of them will be huge. Besides collinearity, the correlation between features also poses the same impact in deep learning. One straightforward way to reduce the effect of collinearity and correlation is to analyze them among features and then remove some relevant features. However, due to the inexplicability and excessive number of features in PLMs, this method is difficult to afford. + +The methods of stable learning (Zhang et al., 2021) show that feature representations will be more causal when giving suitable weights for samples in loss calculating during training. Inspired by this, we propose covariance optimizing (COP) to alleviate the collinearity and correlation between features with low resource consumption, as well as improve the causality of features. + +In COP, covariance is used to measure the correlation between features, and the target is to acquire suitable weights by minimizing the covariance among all features using gradient descent: + +$$ +\widehat {\mathbf {W}} = \underset {\mathbf {W}} {\operatorname {a r g m i n}} \sum_ {i, j, i \neq j} \left(\operatorname {c o v} \left(\mathbf {W F} ^ {i}, \mathbf {W F} ^ {j}\right)\right) ^ {2} \tag {4} +$$ + +Where $\mathbf{F}$ and $\mathbf{W}$ mean the feature vectors and weights; $\mathbf{W} \in \mathbf{R}^n$ is a vector representing all sample weights and $n$ is the number of samples, holding $\sum_{i}^{n} w_i = 1$ by softmax function. $\mathbf{F}^i$ means the $i$ -th dimension feature of all samples. $cov(\cdot, \cdot)$ is the covariance function. + +Next, $\widehat{\mathbf{W}}$ is used to weigh the loss of the corresponding sample. + +$$ +L o s s _ {C O P} = \sum_ {i = 0} ^ {n} \hat {w} _ {i} L o s s _ {o r i g} \left(p _ {i}, t _ {i}\right) \tag {5} +$$ + +Where $\hat{w}_i\in \widehat{\mathbf{W}}$ is the final weight for the $i$ -th sample; $p_i$ and $t_i$ mean the prediction distribution and real label respectively; $Loss_{orig}$ means the loss employed on the original method. + +However, there are two difficulties in performing the above process directly. Firstly, the majority of PLMs have an extensive number of parameters, ranging from hundreds of millions (Devlin et al., 2019) to billions (Du et al., 2022b) and even more, thus the computation of weights for the entire dataset requires significant computational resources, making it expensive and potentially unaffordable during training. Secondly, incorporating features from previous batches or epochs may lead to feature inconsistency due to the continuous evolution of features during training. + +To overcome the aforementioned difficulties, inspired by MoCo (He et al., 2020), we only compute optimal weights for samples in the current batch, utilizing previous features and weights as additional fixed information. Furthermore, to ensure feature consistency, we discard the earliest features and weights: + +$$ +\begin{array}{l} \mathbf {F} _ {i} = \left[ \mathbf {F} _ {i - 1} \left[ \left\lfloor L _ {F _ {i}} / (n + 1) \right\rfloor : \right], \mathbf {F} _ {c u r} \right] \tag {6} \\ \mathbf {W} _ {i} = \left[ \mathbf {W} _ {i - 1} \left[ \left[ L _ {W _ {i}} / (n + 1) \right]: \right], \mathbf {W} _ {c u r} \right] \\ \end{array} +$$ + +Where \(\mathbf{F}\) and \(\mathbf{W}\) mean the feature vectors and weights; \(i\) means the index of the current batch; \(L_{*}\) is the length of \(*\); \(*_{cur}\) means feature vectors or weights in the current batch; \(n\) is the batch number of feature vectors and weights needed to be saved; \(\lfloor \cdot \rfloor\) is the floor function; \([l:\] means to delete first \(l\) data. + +To further mitigate the feature inconsistency, we fuse and emphasize the current information with previous features and weights. Firstly, we randomly sample from $\mathbf{F}_{cur}$ and the corresponding $\mathbf{W}_{cur}$ until the number of samples is the same as + +![](images/cfb71963e12707394ecfd4902e961e4ede838b7d83edde5f6e72926c6297220b.jpg) +Figure 4: The original causal graph of the joint entity and relation extraction task in the classification phase (left) with its alternate after intervention (right). + +$\mathbf{F}_i$ + +$$ +\mathbf {F} _ {c u r} ^ {\prime} = [ \mathbf {F} _ {c u r} [ R _ {1} ], \dots , \mathbf {F} _ {c u r} [ R _ {L} ] ] +$$ + +$$ +\mathbf {W} _ {c u r} ^ {\prime} = \left[ \mathbf {W} _ {c u r} [ R _ {1} ], \dots , \mathbf {W} _ {c u r} [ R _ {L} ] \right] \tag {7} +$$ + +Where $\mathbf{F}_{cur}^{\prime}$ and $\mathbf{W}_{cur}^{\prime}$ are the sets after random sampling; $L$ is the length of $\mathbf{F}_i$ , $R_i$ is a random integer from 0 to $L$ , and $[i]$ means getting the $i$ -th element. And then, we fuse current information with the previous. + +$$ +\mathbf {F} _ {i} ^ {\prime} = \alpha \mathbf {F} _ {i} + (1 - \alpha) \mathbf {F} _ {c u r} ^ {\prime} \tag {8} +$$ + +$$ +\mathbf {W} _ {i} ^ {\prime} = \alpha \mathbf {W} _ {i} + (1 - \alpha) \mathbf {W} _ {c u r} ^ {\prime} +$$ + +Where $\alpha$ is a hyperparameter between [0, 1] regarding how much previous information needs to be saved. Finally, $\mathbf{F}_i^{\prime}$ and $\mathbf{W}_i^{\prime}$ will be applied to eq. 4 as $\mathbf{W}$ and $\mathbf{F}$ . Note that $\mathbf{F}_i^{\prime}$ is used to gain the optimal $\mathbf{W}_i^{\prime}$ , but only the part of $\mathbf{W}_{cur}$ will be updated and used to weight sample loss. + +To enhance the applicability of COP, we use a hyperparameter called COP rate to adjust the degree of influence of COP during training. After acquiring the optimal weights, the loss function is as follows: + +$$ +\hat {w} _ {i} ^ {\prime} = (1 - r _ {C O P}) + r _ {C O P} * \hat {w} _ {i} +$$ + +$$ +L o s s _ {C O P} = \sum_ {i = 0} ^ {n} \hat {w} _ {i} ^ {\prime} L o s s _ {o r i g} \left(p _ {i}, t _ {i}\right) \tag {9} +$$ + +Where $\hat{w}_i\in \widehat{\mathbf{W}}$ is the final weight of the $i$ -th sample; $r_{COP}\in (0,1]$ indicates COP rate. + +# 3.3 Variance Optimizing + +Inspired by causal intervention (Pearl et al., 2016), we construct a causal graph (Fig. 2) regarding the causality from feature vectors to the final targets. To clarify our objective, in our causal analysis, we focus on the mitigation of bias arising from the long-tail distribution. This bias tends to make labels with a substantial number of samples more readily predictable during the inference process. + +Moreover, the effectiveness of mitigating this bias can be easily quantified. + +As shown in Fig. 2, $F \gets L \to P$ is a backdoor path, a path that connects $F$ and $P$ but does not start with $F$ , from $F$ to $P$ in which $F$ , $L$ , and $P$ are feature vectors, real labels, and model predictions respectively. Thus, the label distribution from the datasets is the confounder between the feature vectors and the final predictions, creating a spurious correlation that disturbs model inference and causes lower performance. For a better understanding of the causal graph, we introduce it as follows: The labels in datasets are the optimizing target of model training $(L \to P)$ which also takes effect on the feature vector learning $(L \to F)$ . Appendix. A shows more detail of the causal graph. + +In order to remove the confounder caused by backdoor path $F \leftarrow L \rightarrow P$ and make the model learn direct causality between feature vectors and predictions, we introduce do-operator (Pearl et al., 2016) on feature vectors $F$ to gain the causality of $F$ on $P$ called $p(P|do(F))$ . As shown in Fig. 4 right, through do-operator, the edge causing confounder, $F \leftarrow L \rightarrow P$ , is blocked, so that the spurious correlation has been removed. + +Backdoor adjustment (Pearl, 1995) is a method to reduce confounders in causal inference, and it can perform $do$ -operator on the observational datasets. Formally, the backdoor adjustment reduces the bias as: + +$$ +p (P | d o (F)) = \sum_ {L} p (P | F, L) p (L) \tag {10} +$$ + +Where the detail for the equation is in Appendix B. + +Inspired by the eq. 10, it can reduce the spurious correlation if we process the feature vectors of the same label separately. So we propose a method to optimize the feature vectors in the same label by using the property of variance. + +When the fluctuation among samples is serious, the variance will be large, and vice versa. In other words, we can minimize the variance between the samples of the same label to bring them closer together and at the same time achieve intervention. Along this way, we introduce a new loss function using the variance to optimize the feature representation as follows: + +$$ +L o s s _ {V O P} = \sum_ {l = 0} ^ {L} \sum_ {n = 0} ^ {N} v a r \left(\mathbf {F} _ {(l, n)}\right) \tag {11} +$$ + +Where $L$ is the label amount in one batch of data, $N$ is the dimension amount of feature vectors, and + +$\mathbf{F}_{(l,n)}$ means the n-th dimensional feature of all samples of label $l$ . $var(\cdot)$ is the operation of computing sample variance. Note that missing several labels is possible in one batch of data. + +This method is called variance optimizing (VOP). Additionally, benefiting from the random mechanism of mini-batch gradient descent, one sample can combine with different samples into the same batch in each training epoch, which brings two main advantages as follows: Firstly, the diversity of sample combination is ensured automatically. Secondly, the impact of abnormal samples is mitigated due to the overall optimization. + +# 3.4 Overall Optimization Framework + +We combine COP and VOP into a unified framework called covariance and variance optimization framework (OVO), as shown in Fig. 3, and the algorithm. 1 (Appendix. C) illustrates the detailed training procedure of OVO. The final loss is as follows: + +$$ +L o s s _ {f i n a l} = L o s s _ {C O P} + \lambda L o s s _ {V O P} \tag {12} +$$ + +Where $\lambda$ is a hyperparameter for the weight of $Loss_{VOP}$ . + +# 4 Experiment + +# 4.1 Dataset + +We conduct experiments to evaluate our approach on two popular joint entity and relation extraction datasets: ACE051 and SciERC2(Luan et al., 2018). For ACE2005, we use the same split following (Luan et al., 2019) in the train, development, and test sets. ACE2005 dataset includes various domain data, such as newswire and broadcast news, while the SciERC dataset includes abstracts collected from AI conferences/workshops. + +Additionally, to evaluate the effectiveness of OVO in out-of-distribution settings, we conduct experiments on CrossRE $^{3}$ (Bassignana and Plank, 2022) which is a dataset for the relation extraction task across 6 different domains, namely news, politics, natural science, music, literature, and artificial intelligence. + +# 4.2 Evaluation metrics + +We follow the evaluation metrics in previous close works to evaluate the experiment results' performance using the micro F1 measure. For the NER + +task, we use the span-level benchmark to evaluate, which one entity is considered recognized correctly if and only if both its boundary and type are precisely predicted. For the RE, we adopt two evaluation metrics as follows: (1) boundaries evaluation (Rel): a relation is considered recognized correctly if and only if the boundaries of head and tail entities are correct, and their relation label is correct; (2) strict evaluation $(\mathbf{Rel}+)$ : in addition to the requirement of Rel, the types of two entities are also needed to be correctly predicted. + +# 4.3 Implementation Details + +We apply OVO to 3 of out of top-5 strong baselines4, specifically PURE (Zhong and Chen, 2021), SpERT.PL (Sai et al., 2021), and PL-Marker (Ye et al., 2022). For ACE2005, the BERT encoders are bert-base-uncased (Devlin et al., 2019) and albert-xxlarge-v1(Lan et al., 2020) which are in the common domain. For SciERC, the BERT encoder is scibert-scivocab-uncased (Beltagy et al., 2019) which is in the scientific domain. We use our proposed method, OVO, to optimize the feature vectors as the extra plugin beyond the common model training with all hyperparameters the same as the base models. To ensure robustness, we conduct experiments with 3 different seeds and report the average scores. + +# 4.4Baselines + +For comparison, we choose serials of state-of-the-art models as follows: (1) PURE (Zhong and Chen, 2021) uses two independent models for NER and RE respectively in a frustratingly easy way, and is the first to propose levitated markers for RE task called PURE(Approx) to accelerate the inference speed, but with a slight drop in performance; (2) SpERT.PL (Sai et al., 2021) uses part-of-speech and logits of entities to enhance the features of entities and relations which shows strong performance in the SciERC dataset. (3) PL-Marker (Ye et al., 2022) is the first to leverage levitated markers to both NER and RE tasks using a packed method with great improvement. + +Additionally, for comparison with other causal debiasing methods, we choose two related methods as follows: (1) CFIE (Nan et al., 2021) uses causal inference to tackle the long-tailed IE issues; (2) CoRE (Wang et al., 2022) designs a counterfactual + +analysis to debias RE by reducing the side-effects of entity mentions. + +# 4.5 Results + +Table 1 shows the results of comparative experiments between our proposed method and baselines. As is shown, with the scibert-scivocab-uncased encoder, our proposed method, OVO, outperforms PURE-F, SpERT.PL, and PL-Marker by $+3.3\%$ $+2.1\%$ ,and $+2.9\%$ with Rel $^+$ on SciERC respectively. Furthermore, on ACE2005, with both bertbase-uncased encoder and albert-xxlarge-v1 encoder, our method also outperforms the baselines on Rel+. Such improvements over baselines indicate the effectiveness and generalization of OVO. + +Additionally, due to CoRE (Wang et al., 2022) being only for RE, we compare OVO with CFIE (Nan et al., 2021) and CoRE only in RE using the result of OVO in NER. For the base model, we chose PURE because of SpERT.PL is a joint model that cannot handle NER and RE tasks separately and PL-Marker uses a packed method that cannot handle only one pair of entities in RE. As shown in Table 1, CFIE and CoRE can improve performance somewhat but are still lower than OVO. The results can show the effectiveness of OVO compared with other methods. Specifically, on SciERC, the REL+ of OVO was $1.6\%$ higher than CFIE; on Ace2005, the REL+ of OVO was $0.2\%$ higher than CoRE. + +To evaluate the effectiveness of OVO on out-of-distribution, we conduct experiments on an out-domain setting as follows: using the train set of one domain during training, and using the test sets of the other five domains during testing. We choose PL-Marker as the base model and then apply OVO on each domain. As shown in Table. 2, using OVO gains improvements in all cases with an average improvement of $1.5\%$ and a best improvement of $2.4\%$ in the ai domain. + +# 4.6 Ablation Study + +In this section, we conduct ablation studies to elucidate the effectiveness of different components of our proposed method on the baseline PL-Marker (Ye et al., 2022). We use the evaluation metrics the same as in Table 1 on both ACE2005 and SciERC datasets using bert-base-uncased and scibert-scivocab-uncased as bert encoders respectively. + +w/o. COP: To evaluate the effectiveness of covariance optimizing, we remove COP and only use VOP in the model training process and set + +all weights of feature vectors as 1 for computing $Loss_{COP}$ . As shown in Table 3, the performance of Rel and $Rel+$ drop $0.8\% - 2.2\%$ without COP, which can represent the importance to reduce the spurious correlation among features. + +w/o. VOP: To verify the effectiveness of variance optimization, we make VOP disabled and let only COP work in the training procedure. As shown in Table 3, when removing VOP, the performance of Rel and Rel+ drop $2.0\% - 3.4\%$ and $1.6\% - 2.2\%$ respectively, which can indicate the effect of the causal intervention and the VOP play an important role in OVO. + +w. SNet: StableNet (Zhang et al., 2021) is similar work with COP which use Random Fourier Features to enhance the non-linearity of enhanced features. To compare the effectiveness between COP and StableNet, we replace COP with StableNet keeping other settings the same, and then negotiate the final performance between them. The performance shows that using COP gains $+0.7\%$ and $+0.4\%$ improvement in Rel+ on ACE2005 and SciERC respectively. Moreover, from the results in Table 5, the consumption of COP is much smaller than that of StableNet. + +# 5 Analysis + +# 5.1 Fine-grained analysis + +To analyze the debias ability of OVO, we conduct experiments to evaluate the performance of each label on PL-Marker. The detailed results for each relation label on SciERC are shown in Table 4. From the table, the number of USERD-FOR accounts for more than half, $54.7\%$ of the total, but that of COMPARE is only $3.9\%$ of the total. + +From the results, the two worst-performing labels both have a small number of samples which are only $6.9\%$ and $6.4\%$ of the total, respectively. For the comparison between with or without OVO, we find that the performances in all labels gain improvement, except for USED-FOR, which is one that has the most samples in the dataset and keeps comparable performance. Additionally, the improvement increases as the number of samples decreases. The most improvement is on PART-OF, which outperforms $+9.1\%$ in F1 than without VOP. Moreover, the overall results of average F1 gain $+4.0\%$ improvement. + +
EncoderACE2005SciERC
EntRelRel+EntRelRel+
SPtree (Miwa and Bansal, 2016)LSTM83.4-55.6---
DyGIE (Luan et al., 2019)ELMo88.463.2-65.241.6-
OneIE† (Lin et al., 2020)BL88.867.5----
DyGIE++† (Wadden et al., 2019)BB/SciB88.663.4-67.0*47.5*-
SPERT (Eberts and Ulges, 2020)86.8*63.8*-70.350.8-
UniRE† (Wang et al., 2021)88.865.7*64.368.440.2*36.9
SpERT.PL (Sai et al., 2021) +OVOBB/SciB87.4*65.3*62.1*70.551.339.4
87.967.965.371.752.641.5
PL-Marker† (Ye et al., 2022) +OVO†89.869.066.569.953.241.6
89.670.667.770.756.144.5
PURE-F† (Zhong and Chen, 2021) +CFIE† (Nanet al., 2021) +CoRE† (Wanget al., 2022) +OVO†90.167.764.868.950.136.8
-67.764.5-50.938.5
-67.664.9-50.738.0
90.568.065.170.051.640.1
UniRE† (Wang et al., 2021)ALBXX90.2-66.0---
PURE-F† (Zhong and Chen, 2021)90.969.467.0---
PL-Marker† (Ye et al., 2022) +OVO†91.173.071.1---
91.274.672.3---
+ +Table 1: Overall test results of F1 in joint entity and relation task on the dataset of ACE2005 and SciERC. †: the model or method leverages cross-sentence information as extra features. The encoders used in different models: $B_{B} =$ bert-base-uncased, $B_{L} =$ bert-large-uncased, $SciB =$ scibert-scivocab-uncased, $ALB_{XX} =$ albert-xxlarge-v1. Model name abbreviation: PURE-F = PURE(Full). Evaluation metric abbreviation: Rel denotes the boundaries evaluation and Rel+ denotes the strict evaluation. *: the result is not given in the original works, and we run the corresponding experiment, reporting the results in the table. + +
Rel(%)newssciencepoliticsliteratureaimusicavg
PL-Marker9.713.014.414.811.614.112.9
+OVO10.314.315.416.414.016.414.5
+ +Table 2: Results in the out-domain setting on the CrossRE dataset. + +
ACE2005SciERC
EntRelRel+EntRelRel+
OVO89.670.667.770.756.144.5
w/o. COP89.769.766.970.054.143.3
w/o. VOP89.568.665.570.752.742.9
w. SNet89.470.167.070.555.044.1
+ +Table 3: Ablation on ACE2005 and SciERC test set with different component setups. w. SNet means replacing COP with StableNet in model training. + +# 5.2 Effect of Covariance Optimizing + +As the results are shown in Table 5, by using StableNet, it gains $+0.6\%$ improvement on Ent, and COP improves on it $+0.2\%$ . Table 3 shows more results between COP and StableNet. So, we can conclude that stable learning technology can actually achieve improvement for our task. But the consumption of computing resources is relatively high and it costs approximately 5 and 1.7 times for training time and GPU memory respectively than the original. In comparison, COP uses fewer resources but gets better performance. Additionally, more detailed results of hyperparameters are + +reported in Appendix. D. + +# 5.3 Effect of Variance Optimizing + +To enhance adaptation to diverse methods, we introduce a weight for $Loss_{VOP}$ to mitigate its impact on the normal training of the model and avoid performance degradation. The optimal weight varies depending on the specific dataset and method employed, as different weights yield the best performance. The detailed results are reported in Appendix. E. + +# 6 Conclusion + +In this work, we propose the OVO, a novel model training framework for optimizing feature vectors using causal technology. There are two main parts of OVO which are called COP and VOP. From the perspective of the correlation among features, COP reduces the spurious relation by minimizing the covariance computed from all features. From the viewpoint of each feature, VOP makes the feature more causal by minimizing the variance calculated from each feature of the same label. After optimizing the features toward causal, our method achieves + +
Metric (Rel)UFCONEFHOPOFOCOMavg.
Proportion (%)-54.712.69.36.96.46.03.9-
w/o. OVO (%)Recall55.262.646.264.228.623.752.647.6
Precision53.655.051.258.148.725.950.048.9
F154.358.648.660.136.024.851.347.7
w. OVO (%)Recall53.165.749.570.236.525.455.350.8
Precision55.453.354.259.559.035.760.053.9
F154.258.951.764.445.129.757.551.7
Δ-0.1+0.3+3.1+4.3+9.1+4.9+6.2+4.0
+ +Table 4: The fine-grained results on the SciERC dataset. Relation label abbreviation: UF=USED-FOR, CON=CONJUNCTION, EF=EVALUATE-FOR, HO=HYPONYM-OF, PO=PART-OF, FO=FEATURE-OF, COM=COMPARE. Proportion means the percentage of the number of one relation label in total data. + +
NameEntGPU (GB)Time (h)
PL-Marker69.9192
w.COP70.7244
w.SNet70.53210
+ +Table 5: The experiment results on the SciERC. The base model is PL-Marker. COP means covariance optimizing; Time (h) is the time consumption of model training. The text with bold and italics indicates the best performance, and that with underlining indicates the second best. + +improvements on 3 strong baselines and reduces the influence of data unbalanced bias. In the future, we will pay more attention to (1) how to further reduce resource consumption on COP and (2) how can let the weight of VOP adjusts itself automatically to adapt to the different datasets. + +# Limitations + +OVO is a novel training framework for optimizing feature representations directly using causal technology. The limitations of OVO are as follows: + +- COP is an additional training process in each batch that will improve resource consumption. Larger models and more previous information used in COP will cost more additional resources. +- To adapt OVO to more models, there are some hyperparameters to control the degree of effect of COP and VOP during training. These hyperparameters are sensitive to different models and datasets, so it takes time to experiment to find the optimal values of them. + +# Acknowledgements + +The State Key Program of National Natural Science of China, Grant/Award Number:61533018; National Natural Science Foundation of China, Grant/Award Number: 61402220; The Philosophy and Social Science Foundation of Hunan Province, Grant/Award Number: 16YBA323; Natural Science Foundation of Hunan Province, Grant/Award Number: 2020JJ4525,2022JJ30495; Scientific Research Fund of Hunan Provincial Education Department, Grant/Award Number: 18B279,19A439,22A0316. + +# References + +Elisa Bassignana and Barbara Plank. 2022. Crossre: A cross-domain dataset for relation extraction. In Findings of the Association for Computational Linguistics: EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 3592-3604. Association for Computational Linguistics. +Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. Scibert: A pretrained language model for scientific text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 3613-3618. Association for Computational Linguistics. +Razvan C. Bunescu and Raymond J. Mooney. 2005. A shortest path dependency kernel for relation extraction. In HLT/EMNLP 2005, Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing, Proceedings of the Conference, 6-8 October 2005, Vancouver, British Columbia, Canada, pages 724-731. The Association for Computational Linguistics. +Huajun Chen, Ning Hu, Guilin Qi, Haofen Wang, Zhen Bi, Jie Li, and Fan Yang. 2021. Openkg chain: A blockchain infrastructure for open knowledge graphs. Data Intell., 3(2):205-227. + +David A. Cohn, Zoubin Ghahramani, and Michael I. Jordan. 1996. Active learning with statistical models. J. Artif. Intell. Res., 4:129-145. +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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics. +Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. 2018. Measuring and mitigating unintended bias in text classification. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, AIES '18, page 67-73, New York, NY, USA. Association for Computing Machinery. +Carsten F. Dormann, Jane Elith, Sven Bacher, Carsten Buchmann, Gudrun Carl, Gabriel Carré, Jaime R. García Marquez, Bernd Gruber, Bruno Lafourcade, Pedro J. Leitão, Tamara Munkemüller, Colin McClean, Patrick E. Osborne, Björn Reineking, Boris Schröder, Andrew K. Skidmore, Damaris Zurell, and Sven Lautenbach. 2013. Collinearity: a review of methods to deal with it and a simulation study evaluating their performance. Ecography, 36(1):27-46. +Huifang Du, Zhongwen Le, Haofen Wang, Yunwen Chen, and Jing Yu. 2022a. COKG-QA: multi-hop question answering over COVID-19 knowledge graphs. Data Intell., 4(3):471-492. +Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. 2022b. GLM: general language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 320-335. Association for Computational Linguistics. +Markus Eberts and Adrian Ulges. 2020. Span-based joint entity and relation extraction with transformer pre-training. In ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, Santiago de Compostela, Spain, August 29 - September 8, 2020 - Including 10th Conference on Prestigious Applications of Artificial Intelligence (PAIS 2020), volume 325 of Frontiers in Artificial Intelligence and Applications, pages 2006-2013. IOS Press. +Jiannan Guo, Yangyang Kang, Yu Duan, Xiaozhong Liu, Siliang Tang, Wenqiao Zhang, Kun Kuang, Changlong Sun, and Fei Wu. 2022. Collaborative intelligence orchestration: Inconsistency-based fusion of semi-supervised learning and active learning. In KDD '22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 - 18, 2022, pages 2935-2945. ACM. + +Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9726-9735. +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. +Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020. ALBERT: A lite BERT for self-supervised learning of language representations. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net. +Ying Lin, Heng Ji, Fei Huang, and Lingfei Wu. 2020. A joint neural model for information extraction with global features. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7999-8009, Online. Association for Computational Linguistics. +Zihan Lin, Changxin Tian, Yupeng Hou, and Wayne Xin Zhao. 2022. Improving graph collaborative filtering with neighborhood-enriched contrastive learning. In WWW '22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 - 29, 2022, pages 2320-2329. ACM. +Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. 2018. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 3219-3232. Association for Computational Linguistics. +Yi Luan, Dave Wadden, Luheng He, Amy Shah, Mari Ostendorf, and Hannaneh Hajishirzi. 2019. A general framework for information extraction using dynamic span graphs. 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 3036-3046, Minneapolis, Minnesota. Association for Computational Linguistics. +Makoto Miwa and Mohit Bansal. 2016. End-to-end relation extraction using lstms on sequences and tree structures. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics. +Subhabrata Mukherjee and Ahmed Hassan Awadallah. 2020. Uncertainty-aware self-training for text classification with few labels. CoRR, abs/2006.15315. + +Guoshun Nan, Jiaqi Zeng, Rui Qiao, Zhijiang Guo, and Wei Lu. 2021. Uncovering main causalities for long-tailed information extraction. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 9683-9695. Association for Computational Linguistics. +Judea Pearl. 1995. Causal diagrams for empirical research. Biometrika, 82(4):669-688. +Judea Pearl, Madelyn Glymour, and Nicholas P Jewell. 2016. Causal inference in statistics: A primer. John Wiley & Sons. +Lev-Arie Ratinov and Dan Roth. 2009. Design challenges and misconceptions in named entity recognition. In Proceedings of the Thirteenth Conference on Computational Natural Language Learning, CoNLL 2009, Boulder, Colorado, USA, June 4-5, 2009, pages 147-155. ACL. +Farshid Rayhan, Sajid Ahmed, Asif Mahbub, Md. Rafsan Jani, Swakkhar Shatabda, and Dewan Md. Farid. 2017. Cusboost: Cluster-based under-sampling with boosting for imbalanced classification. CoRR, abs/1712.04356. +Santosh Tokala Yaswanth Sri Sai, Prantika Chakraborty, Sudakshina Dutta, Debarshi Kumar Sanyal, and Partha Pratim Das. 2021. Joint entity and relation extraction from scientific documents: Role of linguistic information and entity types. In Proceedings of the 2nd Workshop on Extraction and Evaluation of Knowledge Entities from Scientific Documents (EEKE 2021) co-located with JCDL 2021, Virtual Event, September 30th, 2021, volume 3004 of CEUR Workshop Proceedings, pages 15-19. CEUR-WS.org. +Yuming Shang, Heyan Huang, and Xianling Mao. 2022. Onerel: Joint entity and relation extraction with one module in one step. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11285-11293. AAAI Press. +Zheyan Shen, Peng Cui, Kun Kuang, Bo Li, and Peixuan Chen. 2018. Causally regularized learning with agnostic data selection bias. In 2018 ACM Multimedia Conference on Multimedia Conference, MM 2018, Seoul, Republic of Korea, October 22-26, 2018, pages 411-419. ACM. +Zheyan Shen, Peng Cui, Tong Zhang, and Kun Kuang. 2020. Stable learning via sample reweighting. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 5692-5699. AAAI Press. + +David Wadden, Ulme Wennberg, Yi Luan, and Hannaneh Hajishirzi. 2019. Entity, relation, and event extraction with contextualized span representations. 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 5784-5789, Hong Kong, China. Association for Computational Linguistics. +Yijun Wang, Changzhi Sun, Yuanbin Wu, Hao Zhou, Lei Li, and Junchi Yan. 2021. UniRE: A unified label space for entity relation extraction. 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 220-231, Online. Association for Computational Linguistics. +Yiwei Wang, Muhao Chen, Wenxuan Zhou, Yujun Cai, Yuxuan Liang, Dayiheng Liu, Baosong Yang, Juncheng Liu, and Bryan Hooi. 2022. Should we rely on entity mentions for relation extraction? debiasing relation extraction with counterfactual analysis. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL 2022, Seattle, WA, United States, July 10-15, 2022, pages 3071-3081. Association for Computational Linguistics. +Deming Ye, Yankai Lin, Peng Li, and Maosong Sun. 2022. Packed levitated marker for entity and relation extraction. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 4904-4917. Association for Computational Linguistics. +Xingxuan Zhang, Peng Cui, Renzhe Xu, Linjun Zhou, Yue He, and Zheyan Shen. 2021. Deep stable learning for out-of-distribution generalization. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 5372-5382. Computer Vision Foundation / IEEE. +Zexuan Zhong and Danqi Chen. 2021. A frustratingly easy approach for entity and relation extraction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 50-61. Association for Computational Linguistics. + +# A Causal Graph + +From Fig. 2, $L \to F$ denotes that real labels in datasets have an effect on the feature vectors learned by model training, and $L \to P$ denotes that real labels have an effect on model predictions because the loss in training is calculated by labels and predictions. So the backdoor path $F \gets L \to P$ makes models give relatively high scores to the labels with numerous samples. + +# B Derivation Process of Backdoor Adjustment + +In this section, we will give an explanation for each step of backdoor adjustment. To make it easier to understand, we draw a new equation as follows: + +$$ +\begin{array}{l} p (P | d o (F)) \stackrel {(1)} {=} \sum_ {L} p (P | d o (F), \underline {{L}}) p (\underline {{L}} | d o (F)) \\ \stackrel {(2)} {=} \sum_ {L} p (P | d o (F), L) P (L | \underline {{F}}) \\ \stackrel {(3)} {=} \sum_ {L} p (P | \underline {{F}}, L) p (L | F) \\ \stackrel {(4)} {=} \sum_ {L} p (P | F, L) \underline {{p (L)}} \tag {13} \\ \end{array} +$$ + +Where the meaning of $P$ , $F$ , and $L$ are the same as Fig. 2; $do(\cdot)$ means do-operator. The underline means the main differences from the previous step. + +(1) using the total probability theorem where $do(F)$ can be seen as a normal random variables event like $P$ and $L$ . +(2) from the causal graph in Fig. 2, the path $L \to F$ is a direct causal path without backdoor paths, so $p(L|do(F))$ and $p(L|F)$ are equivalent. +(3) because of conditioning on $L$ , the association in the path $F \leftarrow L \rightarrow P$ is blocked. So in this case, the association in the path $F \rightarrow P$ is causality which can remove the do-operator without any influence. +(4) due to the direction of the causal path between $L$ and $F$ being $F \gets L$ , there is no association from $F$ to $L$ which causes the $L$ to be independent with $F$ meaning $p(L|F) = p(L)$ . + +# C Overall Algorithm of OVO + +The algorithm of OVO is shown in the algorithm. 1. + +# D Analysis of COP + +# D.1 Saving Batch Number + +When the dataset is large enough, it is hard to put all feature vectors into COP and optimize them at once. So, by using eq. 6, we can use part of the vectors to relieve the pressure on computing resources. To research the effect of COP when just using partial vectors, we conduct comparative experiments with + +Algorithm 1 The training procedure of the OVO + +Input: Initial pre-trained BERT encoder $\mathbf{BE}^{(0)}$ and classifier $\mathbf{C}^{(0)}$ , training dataset $\mathcal{D}$ , training epochs for model training $T_{mt}$ , training epochs for COP $T_{cop}$ +Output: Trained model $(\mathbf{BE}^{(T_{mt})},\mathbf{C}^{(T_{mt})})$ +1: for $t_{mt} = 0$ to $T_{mt}$ do +2: $\mathbf{F}_{\mathrm{pre}} \gets$ Clear the previous feature vectors; +3: $\bar{\mathbf{W}}_{\mathrm{pre}}\gets$ Clear the previous weights; +4: for (Sents, Spans) in $\mathcal{D}$ do +5: $\mathbf{H} = \mathbf{B}\mathbf{E}^{(t_{mt})}(Sents)$ +6: $\mathbf{F}_{\mathrm{cur}} = \text{GetSpanFeatures}(\mathbf{H})$ +7: $\mathbf{P} = \mathbf{C}^{(t_{mt})}(\mathbf{F}_{\mathbf{cur}})$ +8: $\mathbf{W}_{\mathrm{cur}} \gets \mathrm{Initial}$ +9: $\mathbf{F} = \text{concat}(\mathbf{F}_{\text{pre}}, \mathbf{F}_{\text{cur}})$ +10: $\mathbf{W} = \text{concat}(\mathbf{W}_{\text{pre}}, \mathbf{W}_{\text{cur}})$ +11: for $t_{cop} = 0$ to $T_{cop}$ do +12: $\mathcal{L}_{\mathcal{W}} = \sum_{i\neq j}cov(\mathbf{WF}_i,\mathbf{WF}_j)$ +13: $\mathbf{W}_{\mathrm{cur}}\gets \text{Optim} (\mathcal{L}_{\mathcal{W}})$ +14: end for +15: $(\mathbf{F}_{\mathrm{pre}},\mathbf{W}_{\mathrm{pre}})\gets$ update and fuse +16: $\mathcal{L}_{orig} = CrossEntropy(\mathbf{P},\mathsf{Spans})$ +17: $\mathcal{L}_{COP} = \mathbf{W}_{\mathbf{cur}}\mathcal{L}_{orig}$ +18: $\mathcal{L}_{VOP} = \sum_{l=0}^{L} \sum_{n=0}^{N} var(\mathbf{F}_{(l,n)})$ +19: $\mathcal{L} = \mathcal{L}_{COP} + \mathcal{L}_{VOP}$ +20: $(\mathbf{BE}^{\mathbf{t}_{\mathrm{mt}} + 1},\mathbf{C}^{\mathbf{t}_{\mathrm{mt}} + 1})\gets Optim(\mathcal{L})$ +21: end for +22: end for + +![](images/0880b096dc1f784a78821d8e6c1cadf7828c280fe08cca31c0b5c153f52cf51a.jpg) +Figure 5: The impact of different Saving Batch Numbers on the performance of COP is evaluated using the SciERC test set. The inf notation denotes the scenario where all feature vectors are used for COP without any deletions. Relation F1 means evaluating with gold entities in $\mathbf{Rel}+$ ; for eq. 8, $\alpha$ is equal to 0.9 in the experiments. + +different saving batch numbers on PL-Marker (Ye et al., 2022). As shown in Fig. 5, as the saving batch number rises, the overall trend of F1 also rises and reaches the best performance at inf (around $2^{10}$ in our training setting). It can be concluded that using more vectors for COP can reduce spurious correlation better and gain more improvement, but require more computing resources. + +![](images/9c6483d57643d2928307c066f7c2cc8496180703c61b1a70c070d6d463768bfb.jpg) + +![](images/bba0b3d2524b4df02002e1df066c4710161c9d9d57b4d0a3a10aab42394ef88d.jpg) + +![](images/168b3c6b5aa40fc72b8600222de72c0324f29942af66c2e96fd4a9d75bc9c3a1.jpg) +Figure 6: Effect of different $\alpha$ of COP. + +![](images/9c86c461c6b5463d8b6c9166246a843e9cb529cde320493546f6d8a3ca05b28a.jpg) +Figure 7: Effect of the different weights of VOP. F1 is Rel on datasets. + +0.4 on ACE2005 and SciERC respectively. The detailed results for the COP rate are shown in Fig. 7 which only uses COP in experiments. + +# E Analysis of VOP + +# E.1 Tradeoff on Variance Optimizing + +For better adaptation to different tasks, it is important to give $Loss_{VOP}$ a weight, preventing it to influence the model training and hurt the performance. We compute the final loss with weighed $Loss_{VOP}$ as follows: + +$$ +L o s s _ {f i n a l} = L o s s _ {C O P} + \lambda L o s s _ {V O P} \tag {14} +$$ + +Where $\lambda$ is a hyperparameter regarding the weight of $Loss_{VOP}$ . From the results in Fig. 8, different datasets get the best performance in different weights of VOP which $\lambda = 0.2$ is the optimal value for ACE2005 and $\lambda = 0.1$ is that for SciERC, and the performance is particularly sensitive to the weight which changes drastically using different $\lambda$ . + +# D.2 Effect of alpha + +To explore the effect of fusing current information, we conduct experiments for fusing hyperparameter $\alpha$ of eq. 8. We fix the saving batch number to infinite and change the $\alpha$ in the same training configuration. Fig. 6 shows the detailed result of the experiments. + +# D.3 COP rate + +We use $r_{COP} = 1$ in PURE (Zhong and Chen, 2021) and PL-Marker (Ye et al., 2022). For SpERT.PL, we set the COP rate equal to 0.1 and + +![](images/f180894c4945ca12ae9f10f2c4d50615a1cb2f409da873bcba96a23cabeb5928.jpg) + +![](images/cbd484128adee34b19e516fe6503bf3ec4be0bce35a2fde375737c33b65d4d35.jpg) +Figure 8: Effect of the different weights of VOP. F1 is Rel on datasets. \ No newline at end of file diff --git a/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/images.zip b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3bb079bffdc7717d92d1297b1bfc469c967d0ccd --- /dev/null +++ b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88ca9896052b22176eaa10e3c5eaf8b98772a64486b8e579b1ace3e6d87835ff +size 586957 diff --git a/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/layout.json b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e179d6a0171d3ff41b71929052b6518da7bbe575 --- /dev/null +++ b/2023/CoVariance-based Causal Debiasing for Entity and Relation Extraction/layout.json @@ -0,0 +1,12846 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 77, + 76, + 516, + 93 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 77, + 76, + 516, + 93 + ], + "spans": [ + { + "bbox": [ + 77, + 76, + 516, + 93 + ], + "type": "text", + "content": "CoVariance-based Causal Debiasing for Entity and Relation Extraction" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "spans": [ + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "text", + "content": "Lin Ren" + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "text", + "content": ", Yongbin Liu" + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "inline_equation", + "content": "^{1*}" + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "text", + "content": ", Yixin Cao" + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "inline_equation", + "content": "^{2}" + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "text", + "content": ", Chunping Ouyang" + }, + { + "bbox": [ + 138, + 119, + 455, + 134 + ], + "type": "inline_equation", + "content": "^{1}" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 113, + 134, + 483, + 163 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 113, + 134, + 483, + 163 + ], + "spans": [ + { + "bbox": [ + 113, + 134, + 483, + 163 + ], + "type": "text", + "content": "1University of South China, 2Singapore Management University {homurat.rl, yongbinliu03, caoyixin2011} @ gmail.com, ouyangcp@126.com" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "spans": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "text", + "content": "Abstract" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 86, + 234, + 274, + 618 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 234, + 274, + 618 + ], + "spans": [ + { + "bbox": [ + 86, + 234, + 274, + 618 + ], + "type": "text", + "content": "Joint entity and relation extraction tasks aim to recognize named entities and extract relations simultaneously. Suffering from a variety of data biases, such as data selection bias, and distribution bias (out of distribution, long-tail distribution), serious concerns can be witnessed to threaten the model's transferability, robustness, and generalization. In this work, we address the above problems from a causality perspective. We propose a novel causal framework called covariance and variance optimization framework (OVO) to optimize feature representations and conduct general debiasing. In particular, the proposed covariance optimizing (COP) minimizes characterizing features' covariance for alleviating the selection and distribution bias and enhances feature representation in the feature space. Furthermore, based on the causal backdoor adjustment, we propose variance optimizing (VOP) separates samples in terms of label information and minimizes the variance of each dimension in the feature vectors of the same class label for mitigating the distribution bias further. By applying it to three strong baselines in two widely used datasets, the results demonstrate the effectiveness and generalization of OVO for joint entity and relation extraction tasks. Furthermore, a fine-grained analysis reveals that OVO possesses the capability to mitigate the impact of long-tail distribution. The code is available at https://github.com/HomuraT/OVO." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 626, + 154, + 639 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 626, + 154, + 639 + ], + "spans": [ + { + "bbox": [ + 68, + 626, + 154, + 639 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 647, + 291, + 755 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 647, + 291, + 755 + ], + "spans": [ + { + "bbox": [ + 67, + 647, + 291, + 755 + ], + "type": "text", + "content": "Named Entity Recognition (NER, (Ratinov and Roth, 2009)) and Relation Extraction (RE, (Bunescu and Mooney, 2005)) are both the key fundamental tasks of Information Extraction and both significant predecessor tasks for building knowledge graphs that are used widely in daily life (Chen et al., 2021; Ji et al., 2022; Du et al., 2022a). There are two major methods to extract the final result." + } + ] + } + ], + "index": 6 + }, + { + "type": "image", + "bbox": [ + 309, + 210, + 518, + 320 + ], + "blocks": [ + { + "bbox": [ + 309, + 210, + 518, + 320 + ], + "lines": [ + { + "bbox": [ + 309, + 210, + 518, + 320 + ], + "spans": [ + { + "bbox": [ + 309, + 210, + 518, + 320 + ], + "type": "image", + "image_path": "b36fa68d451e83bdde3a15c7408a80eb3a117f1cb879b420202beb0b5e92aca6.jpg" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 333, + 526, + 417 + ], + "lines": [ + { + "bbox": [ + 302, + 333, + 526, + 417 + ], + "spans": [ + { + "bbox": [ + 302, + 333, + 526, + 417 + ], + "type": "text", + "content": "Figure 1: An example of RE on SciERC (the label bias increases the risk of predicting some label possessing majority samples). The confidence at the upper right is predicted by PL-Marker (Ye et al., 2022). The ground-truth relation of the example is PART-OF, but due to the bias in the train set, the NO-RELATION is inferred. After using our OVO, PART-OF is predicted correctly." + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_caption" + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 444, + 525, + 511 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 444, + 525, + 511 + ], + "spans": [ + { + "bbox": [ + 302, + 444, + 525, + 511 + ], + "type": "text", + "content": "One is to build a separate model (pipeline) to get the result in one step (Shang et al., 2022), and the other is to use multiple models (joint) to extract entities and relations in turn (Zhong and Chen, 2021; Ye et al., 2022)." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 516, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 516, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 516, + 526, + 772 + ], + "type": "text", + "content": "Suffering from various biases in data, such as data selection bias, out-of-distribution, and long-tail distribution (Lin et al., 2022; Wang et al., 2022), models may learn spurious correlations and make erroneous predictions. Although we would like to be able to obtain a uniform (or unbiased) data set, such a dataset is almost nonexistent in real applications. Various biases are always mixed up in real scenarios, for example, selected data in a way that differs from the target population (data selection bias), training and testing data distribution shift (out-of-distribution), the labels with numerous samples may have more chances to inference (long-tail distribution lead to predicting majority bias), and some of the data biases are even unknown. Because statistical correlation is the basis of supervised learning algorithms, the learning algorithms may learn many spurious correlations due to these biases. Finally, this leads to a greatly re" + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 84, + 761, + 174, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 84, + 761, + 174, + 772 + ], + "spans": [ + { + "bbox": [ + 84, + 761, + 174, + 772 + ], + "type": "text", + "content": "*Corresponding Author." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "2627" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "type": "footer", + "angle": 0, + "lines": [ + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "spans": [ + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "type": "text", + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 2627-2640 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ] + } + ], + "index": 13 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 0 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 290, + 178 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 290, + 178 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 290, + 178 + ], + "type": "text", + "content": "duced predictive ability of the models. As shown in Fig. 1 (left), there are different degrees of the data bias of long-tail distribution in SciERC (Luan et al., 2018), which is common for other datasets as well, making models focus more on the labels with numerous samples and performing poorly on the others (fewer chances to the labels with few samples)." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 180, + 291, + 395 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 180, + 291, + 395 + ], + "spans": [ + { + "bbox": [ + 69, + 180, + 291, + 395 + ], + "type": "text", + "content": "In recent years, debiasing has become a significant research focus. There are different ways to address the data bias by reweighting samples (Dixon et al., 2018; Rayhan et al., 2017; Wang et al., 2022). These methods focus on the reweights in the sample space and ignore spurious correlations due to data selection bias. Recently, stable learning (Shen et al., 2018, 2020; Zhang et al., 2021) proposed serial ways to de-bias the spurious correlation to find the causal effect of each input feature on the basis of the correlation. Specifically, these methods require extensive calculation resources to identify causality and focus solely on causal effects between features. Additionally, they fail to consider the causal effects for each feature dimension within the same class label." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 397, + 290, + 478 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 397, + 290, + 478 + ], + "spans": [ + { + "bbox": [ + 67, + 397, + 290, + 478 + ], + "type": "text", + "content": "In this work, we introduce a method called the covariance and variance optimization framework (OVO), to optimize the feature vectors from two aspects, decorrelating between features and each feature dimension of the same class label. Our contributions can be summarized as follows:" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 81, + 491, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 5, + "blocks": [ + { + "bbox": [ + 81, + 491, + 291, + 640 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 81, + 491, + 291, + 640 + ], + "spans": [ + { + "bbox": [ + 81, + 491, + 291, + 640 + ], + "type": "text", + "content": "- From decorrelating between features, inspired by stable learning, we use covariance as the confounder degree of features and try to minimize it in each batch of every epoch to learn the causality between features and targets. We minimize the covariance to reduce the collinearity of each feature, get the causal effects, alleviate the data selection and distribution biases, and enhance feature representation. We call this method covariance optimizing (COP)." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 81, + 651, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 81, + 651, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 81, + 651, + 291, + 772 + ], + "type": "text", + "content": "- From feature dimensions of the same class label, according to the variance of each dimension, using the intervention of causal inference (Pearl et al., 2016), it can eliminate the confounding bias from the backdoor path by blocking " + }, + { + "bbox": [ + 81, + 651, + 291, + 772 + ], + "type": "inline_equation", + "content": "F \\gets L \\to P" + }, + { + "bbox": [ + 81, + 651, + 291, + 772 + ], + "type": "text", + "content": " as the causal graph shown in Fig.2, so that model can learn the causality from the causal path " + }, + { + "bbox": [ + 81, + 651, + 291, + 772 + ], + "type": "inline_equation", + "content": "F \\rightarrow P" + }, + { + "bbox": [ + 81, + 651, + 291, + 772 + ], + "type": "text", + "content": ". We explore the causal correlation between the fea" + } + ] + } + ], + "index": 4 + } + ], + "sub_type": "text" + }, + { + "type": "image", + "bbox": [ + 326, + 68, + 408, + 163 + ], + "blocks": [ + { + "bbox": [ + 326, + 68, + 408, + 163 + ], + "lines": [ + { + "bbox": [ + 326, + 68, + 408, + 163 + ], + "spans": [ + { + "bbox": [ + 326, + 68, + 408, + 163 + ], + "type": "image", + "image_path": "dd66949ef3a19de2e11f246d4281b67420fac2c63547e22d7072147fbfcde385.jpg" + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 421, + 93, + 479, + 102 + ], + "lines": [ + { + "bbox": [ + 421, + 93, + 479, + 102 + ], + "spans": [ + { + "bbox": [ + 421, + 93, + 479, + 102 + ], + "type": "text", + "content": "L:RealLabel" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "image_footnote" + }, + { + "bbox": [ + 423, + 104, + 492, + 112 + ], + "lines": [ + { + "bbox": [ + 423, + 104, + 492, + 112 + ], + "spans": [ + { + "bbox": [ + 423, + 104, + 492, + 112 + ], + "type": "text", + "content": "F : Feature vector" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_footnote" + }, + { + "bbox": [ + 423, + 115, + 476, + 123 + ], + "lines": [ + { + "bbox": [ + 423, + 115, + 476, + 123 + ], + "spans": [ + { + "bbox": [ + 423, + 115, + 476, + 123 + ], + "type": "text", + "content": "P : Prediction" + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_footnote" + }, + { + "bbox": [ + 423, + 126, + 453, + 134 + ], + "lines": [ + { + "bbox": [ + 423, + 126, + 453, + 134 + ], + "spans": [ + { + "bbox": [ + 423, + 126, + 453, + 134 + ], + "type": "text", + "content": "B:Bias" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "image_footnote" + }, + { + "bbox": [ + 302, + 171, + 526, + 229 + ], + "lines": [ + { + "bbox": [ + 302, + 171, + 526, + 229 + ], + "spans": [ + { + "bbox": [ + 302, + 171, + 526, + 229 + ], + "type": "text", + "content": "Figure 2: The causal graph of the joint entity and relation extraction task in the classification phase. Bias is something that we can not avoid, such as agnostic data selection bias, data labeling error, and unobservable features." + } + ] + } + ], + "index": 12, + "angle": 0, + "type": "image_caption" + } + ], + "index": 6 + }, + { + "bbox": [ + 324, + 253, + 525, + 306 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 324, + 253, + 525, + 306 + ], + "spans": [ + { + "bbox": [ + 324, + 253, + 525, + 306 + ], + "type": "text", + "content": "ture dimensions of the same label and the outcome targets and mitigate the long-tail distribution bias further. We call this method variance optimizing (VOP)." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 317, + 317, + 526, + 491 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 317, + 317, + 526, + 491 + ], + "spans": [ + { + "bbox": [ + 317, + 317, + 526, + 491 + ], + "type": "text", + "content": "- We combine COP and VOP as OVO. To access the effectiveness of OVO, we conduct experiments on the joint entity and relation extraction task. By applying OVO to 3 strong baselines, we observe significant improvements in the performance of this task, which demonstrates the effectiveness and generalization of our proposed method. These results suggest that optimizing feature representation directly is actually an effective way to get improvement and reduce the bias from datasets without model redesigning, and OVO is a feasible framework in this way." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 513, + 396, + 526 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 513, + 396, + 526 + ], + "spans": [ + { + "bbox": [ + 302, + 513, + 396, + 526 + ], + "type": "text", + "content": "2 Related Work" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 301, + 535, + 525, + 724 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 535, + 525, + 724 + ], + "spans": [ + { + "bbox": [ + 301, + 535, + 525, + 724 + ], + "type": "text", + "content": "Stable Learning aims to research how to reduce the agnostic data selection bias and model misspecification problem and make the feature more causal by reweighting samples. CRLR (Shen et al., 2018) proposes an equation to evaluate the degree of confounders called Causal Regularized Logistic Regression and gains the optimal weight by minimizing the confounder. SRDO (Shen et al., 2020) considers the smallest feature of the covariance matrix as the degree of confounder. StableNet (Zhang et al., 2021) adopts stable learning technology into image classification tasks using deep learning models and the results show the strong domain adaptation of the proposed models." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 733, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 733, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 733, + 525, + 772 + ], + "type": "text", + "content": "Span-level NER and RE Models are the approaches using the boundaries of spans as a total feature to recognize the entities and the relation" + } + ] + } + ], + "index": 17 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2628" + } + ] + } + ], + "index": 18 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 1 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 104, + 73, + 496, + 150 + ], + "blocks": [ + { + "bbox": [ + 104, + 73, + 496, + 150 + ], + "lines": [ + { + "bbox": [ + 104, + 73, + 496, + 150 + ], + "spans": [ + { + "bbox": [ + 104, + 73, + 496, + 150 + ], + "type": "image", + "image_path": "94a89dcc13f7497cf8bad0a97ff45b1b5f516b2985170803f94acaab965a33bd.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + } + ], + "index": 0 + }, + { + "type": "image", + "bbox": [ + 103, + 167, + 490, + 279 + ], + "blocks": [ + { + "bbox": [ + 249, + 155, + 347, + 167 + ], + "lines": [ + { + "bbox": [ + 249, + 155, + 347, + 167 + ], + "spans": [ + { + "bbox": [ + 249, + 155, + 347, + 167 + ], + "type": "text", + "content": "Variance Optimizing(VOP)" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + }, + { + "bbox": [ + 103, + 167, + 490, + 279 + ], + "lines": [ + { + "bbox": [ + 103, + 167, + 490, + 279 + ], + "spans": [ + { + "bbox": [ + 103, + 167, + 490, + 279 + ], + "type": "image", + "image_path": "c9d9be574a924450d8149fd7336c302af8eab5f056b0c84cad930106327303f3.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "lines": [ + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "spans": [ + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": "Figure 3: The overview of OVO. In the training phase of the model, we insert COP and VOP as extra optimization for feature vectors. For COP, there is an inner loop to learn the optimal " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "\\mathbf{W}" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " using gradient descent, and " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "Loss_W" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " is the loss function of " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "\\mathbf{W}" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " calculated according to eq. 4. For VOP, Backdoor Adjustment is used to reduce the bias from datasets. Note that " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "Loss_W" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " only computes the gradient of " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "\\mathbf{W}" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": ", and only the final optimal weights " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "\\hat{\\mathbf{W}}" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " created in COP will be applied to the model training process. The " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "Loss_{VOP}" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " will be used in model training directly. " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "Loss_{orig}" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " means the loss employed on the original method; " + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "inline_equation", + "content": "\\mathbf{O}" + }, + { + "bbox": [ + 66, + 286, + 525, + 359 + ], + "type": "text", + "content": " means zero matrix." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 66, + 380, + 290, + 528 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 66, + 380, + 290, + 528 + ], + "spans": [ + { + "bbox": [ + 66, + 380, + 290, + 528 + ], + "type": "text", + "content": "between two entities. DyGIE++ (Wadden et al., 2019) and SpERT.PL (Sai et al., 2021) extract features of spans and share them between NER and RE tasks. PURE (Zhong and Chen, 2021) uses two separate span models to recognize entities and relations without interaction with each other and proposed levitated markers to reinforce the boundaries information of spans. PL-Marker (Ye et al., 2022) proposes neighborhood-oriented packing and subject-oriented packing methods to leverage the levitated markers." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 538, + 291, + 714 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 538, + 291, + 714 + ], + "spans": [ + { + "bbox": [ + 67, + 538, + 291, + 714 + ], + "type": "text", + "content": "Variance and Covariance are two important metrics in deep learning. In confidence learning (Mukherjee and Awadallah, 2020), they are negatively correlated with the confidence of models and samples. Moreover, in active learning (Cohn et al., 1996), they are correlated with generalization error and bias which can be indirectly reduced by minimizing variance or covariance. Recently, IDEAL (Guo et al., 2022) uses variance as one of the measures for the inconsistency of unlabeled samples. In this work, we use them to estimate the feature representation and correlation between features respectively." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 724, + 130, + 737 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 724, + 130, + 737 + ], + "spans": [ + { + "bbox": [ + 67, + 724, + 130, + 737 + ], + "type": "text", + "content": "3 Method" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 746, + 290, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 746, + 290, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 746, + 290, + 773 + ], + "type": "text", + "content": "In this section, we first briefly introduce the general inference process of the joint entity and relation" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 380, + 526, + 421 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 380, + 526, + 421 + ], + "spans": [ + { + "bbox": [ + 302, + 380, + 526, + 421 + ], + "type": "text", + "content": "extraction methods. Then, we will describe covariance optimizing (COP) and variance optimizing (VOP)." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 429, + 518, + 455 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 429, + 518, + 455 + ], + "spans": [ + { + "bbox": [ + 302, + 429, + 518, + 455 + ], + "type": "text", + "content": "3.1 Background: Inference Process of Joint Entity and Relation Extraction Methods" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 301, + 460, + 526, + 581 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 460, + 526, + 581 + ], + "spans": [ + { + "bbox": [ + 301, + 460, + 526, + 581 + ], + "type": "text", + "content": "In the joint entity and relation extraction task, the goal is to extract both entities and the relations between them from a given text. The general process of this task involves several steps. Firstly, an encoder module is used to transfer pure text to a numerical representation that captures the semantic information. This can be done using techniques like word embeddings or pre-trained language models (PLMs)." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 368, + 588, + 525, + 608 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 368, + 588, + 525, + 608 + ], + "spans": [ + { + "bbox": [ + 368, + 588, + 525, + 608 + ], + "type": "interline_equation", + "content": "\\mathbf {S} = w _ {1}, w _ {2}, \\dots , w _ {l} \\tag {1}", + "image_path": "70744ef911cf4dbc6928c261f450e004474b74545cb964234b8adf702bc01081.jpg" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 368, + 605, + 443, + 618 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 368, + 605, + 443, + 618 + ], + "spans": [ + { + "bbox": [ + 368, + 605, + 443, + 618 + ], + "type": "interline_equation", + "content": "\\mathbf {H} = \\operatorname {e n c o d e r} (\\mathbf {S})", + "image_path": "f4d25b989cdf6cbb2159293e4f06b98d70d02a81c92e5fd1e1200d747f17216f.jpg" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "spans": [ + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "inline_equation", + "content": "w_{i}" + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "text", + "content": " indicates the " + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "inline_equation", + "content": "i" + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "text", + "content": "-th word of the given text; " + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "inline_equation", + "content": "l" + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "text", + "content": " means the length of the text; " + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "inline_equation", + "content": "\\mathbf{H} \\in \\mathbf{R}^{l \\times n}" + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "text", + "content": " represents the representation of the text and " + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "inline_equation", + "content": "n" + }, + { + "bbox": [ + 302, + 624, + 525, + 677 + ], + "type": "text", + "content": " is the dimension size." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 679, + 525, + 733 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 679, + 525, + 733 + ], + "spans": [ + { + "bbox": [ + 302, + 679, + 525, + 733 + ], + "type": "text", + "content": "For NER, the encoded representations are passed through an entity extraction module to identify and classify entities in the text. The formulations of span-level methods are as follows:" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 363, + 738, + 525, + 761 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 363, + 738, + 525, + 761 + ], + "spans": [ + { + "bbox": [ + 363, + 738, + 525, + 761 + ], + "type": "interline_equation", + "content": "f _ {(i, j)} ^ {\\text {s p a n}} = \\operatorname {e x t r a c t o r} (\\mathbf {H}, i, j) \\tag {2}", + "image_path": "5fb2e3d7cb2577002e9b696460f88c57e2c4e1e90ab1b8635f0f0d57930aec5e.jpg" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 348, + 757, + 478, + 776 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 348, + 757, + 478, + 776 + ], + "spans": [ + { + "bbox": [ + 348, + 757, + 478, + 776 + ], + "type": "interline_equation", + "content": "l a b e l _ {(i, j)} ^ {s p a n} = \\operatorname {c l a s s i f i e r} \\left(f _ {(i, j)} ^ {s p a n}\\right)", + "image_path": "95a0b8d3a58395afe53a9028f372282abbf7f4b3c0cb704d2a26a1e884878878.jpg" + } + ] + } + ], + "index": 16 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "2629" + } + ] + } + ], + "index": 17 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "inline_equation", + "content": "0 \\leq i \\leq j \\leq l" + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "text", + "content": " indicates the boundary of a span; " + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "inline_equation", + "content": "l" + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "text", + "content": " means the length of the given text; " + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "inline_equation", + "content": "f_{(i,j)}^{span}" + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "text", + "content": " is the feature of a span; extractor " + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "inline_equation", + "content": "(\\cdot)" + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "text", + "content": " is a function to gain the feature of given spans; classifier " + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "inline_equation", + "content": "(\\cdot)" + }, + { + "bbox": [ + 67, + 71, + 290, + 151 + ], + "type": "text", + "content": " is a function to predict the label of spans according to its representation." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 153, + 291, + 179 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 153, + 291, + 179 + ], + "spans": [ + { + "bbox": [ + 67, + 153, + 291, + 179 + ], + "type": "text", + "content": "For RE, " + }, + { + "bbox": [ + 67, + 153, + 291, + 179 + ], + "type": "inline_equation", + "content": "\\mathbf{H}" + }, + { + "bbox": [ + 67, + 153, + 291, + 179 + ], + "type": "text", + "content": " and the spans of identified entities are used to determine the relations between the entities." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 86, + 188, + 259, + 224 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 188, + 259, + 224 + ], + "spans": [ + { + "bbox": [ + 86, + 188, + 259, + 224 + ], + "type": "interline_equation", + "content": "\\begin{array}{l} f _ {(i, j)} ^ {r e l} = \\operatorname {e x t r a c t o r} (\\mathbf {H}, \\text {s p a n} _ {i}, \\text {s p a n} _ {j}) \\\\ l a b e l _ {(i, j)} ^ {r e l} = \\operatorname {c l a s s i f i e r} \\left(f _ {(i, j)} ^ {r e l}\\right) \\\\ \\end{array}", + "image_path": "ca82a6d55d2a98b9d5fcbe9fa0a96a16271e9589a5786d5d251469b0a72eaf2a.jpg" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "spans": [ + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "inline_equation", + "content": "span_{i}" + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "text", + "content": " is the entity identified by NER; extractor " + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "inline_equation", + "content": "(\\cdot)" + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "text", + "content": " is a function to acquire the feature of given relations; classifier " + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "inline_equation", + "content": "(\\cdot)" + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "text", + "content": " is a function to predict the label of relations. In this work, OVO is used to optimize the " + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "inline_equation", + "content": "f_{(i,j)}^{span}" + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "inline_equation", + "content": "f_{(i,j)}^{rel}" + }, + { + "bbox": [ + 67, + 234, + 290, + 305 + ], + "type": "text", + "content": " during training." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 312, + 205, + 325 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 312, + 205, + 325 + ], + "spans": [ + { + "bbox": [ + 67, + 312, + 205, + 325 + ], + "type": "text", + "content": "3.2 Covariance Optimizing" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "spans": [ + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "text", + "content": "When the features exhibit linear correlations with each other, it can lead to instability in parameter estimation. Consequently, the optimal model becomes uncertain, and the presence of selection and distribution biases is amplified during inference. This phenomenon is called collinearity (Dormann et al., 2013). For example, " + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "inline_equation", + "content": "y = x_{1} + x_{2}" + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "inline_equation", + "content": "y = 100x_{1} - 98x_{2}" + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "text", + "content": " have identical performance if assumption " + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "inline_equation", + "content": "x_{1} = x_{2}" + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "text", + "content": " holds in train datasets, but if " + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "inline_equation", + "content": "x_{1} = 1.01x_{2}" + }, + { + "bbox": [ + 67, + 329, + 291, + 571 + ], + "type": "text", + "content": " holds in test datasets, the gaps of them will be huge. Besides collinearity, the correlation between features also poses the same impact in deep learning. One straightforward way to reduce the effect of collinearity and correlation is to analyze them among features and then remove some relevant features. However, due to the inexplicability and excessive number of features in PLMs, this method is difficult to afford." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 573, + 290, + 681 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 573, + 290, + 681 + ], + "spans": [ + { + "bbox": [ + 67, + 573, + 290, + 681 + ], + "type": "text", + "content": "The methods of stable learning (Zhang et al., 2021) show that feature representations will be more causal when giving suitable weights for samples in loss calculating during training. Inspired by this, we propose covariance optimizing (COP) to alleviate the collinearity and correlation between features with low resource consumption, as well as improve the causality of features." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 682, + 291, + 736 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 682, + 291, + 736 + ], + "spans": [ + { + "bbox": [ + 67, + 682, + 291, + 736 + ], + "type": "text", + "content": "In COP, covariance is used to measure the correlation between features, and the target is to acquire suitable weights by minimizing the covariance among all features using gradient descent:" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 80, + 745, + 290, + 775 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 745, + 290, + 775 + ], + "spans": [ + { + "bbox": [ + 80, + 745, + 290, + 775 + ], + "type": "interline_equation", + "content": "\\widehat {\\mathbf {W}} = \\underset {\\mathbf {W}} {\\operatorname {a r g m i n}} \\sum_ {i, j, i \\neq j} \\left(\\operatorname {c o v} \\left(\\mathbf {W F} ^ {i}, \\mathbf {W F} ^ {j}\\right)\\right) ^ {2} \\tag {4}", + "image_path": "6fbbe88e81dd9506a02442985538e14f4556e284095bddca0d64e3c69fc49337.jpg" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "\\mathbf{F}" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "\\mathbf{W}" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": " mean the feature vectors and weights; " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "\\mathbf{W} \\in \\mathbf{R}^n" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": " is a vector representing all sample weights and " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "n" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": " is the number of samples, holding " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "\\sum_{i}^{n} w_i = 1" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": " by softmax function. " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "\\mathbf{F}^i" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": " means the " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "i" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": "-th dimension feature of all samples. " + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "inline_equation", + "content": "cov(\\cdot, \\cdot)" + }, + { + "bbox": [ + 302, + 71, + 526, + 151 + ], + "type": "text", + "content": " is the covariance function." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 153, + 525, + 180 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 153, + 525, + 180 + ], + "spans": [ + { + "bbox": [ + 302, + 153, + 525, + 180 + ], + "type": "text", + "content": "Next, " + }, + { + "bbox": [ + 302, + 153, + 525, + 180 + ], + "type": "inline_equation", + "content": "\\widehat{\\mathbf{W}}" + }, + { + "bbox": [ + 302, + 153, + 525, + 180 + ], + "type": "text", + "content": " is used to weigh the loss of the corresponding sample." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 333, + 192, + 525, + 226 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 192, + 525, + 226 + ], + "spans": [ + { + "bbox": [ + 333, + 192, + 525, + 226 + ], + "type": "interline_equation", + "content": "L o s s _ {C O P} = \\sum_ {i = 0} ^ {n} \\hat {w} _ {i} L o s s _ {o r i g} \\left(p _ {i}, t _ {i}\\right) \\tag {5}", + "image_path": "c99fa75ec8349ce94ab9e7b09fb84324e7a184dd0a36abee66b2bc7db305757c.jpg" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "spans": [ + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "inline_equation", + "content": "\\hat{w}_i\\in \\widehat{\\mathbf{W}}" + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "text", + "content": " is the final weight for the " + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "inline_equation", + "content": "i" + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "text", + "content": "-th sample; " + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "inline_equation", + "content": "p_i" + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "inline_equation", + "content": "t_i" + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "text", + "content": " mean the prediction distribution and real label respectively; " + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "inline_equation", + "content": "Loss_{orig}" + }, + { + "bbox": [ + 302, + 240, + 524, + 295 + ], + "type": "text", + "content": " means the loss employed on the original method." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 296, + 525, + 459 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 296, + 525, + 459 + ], + "spans": [ + { + "bbox": [ + 302, + 296, + 525, + 459 + ], + "type": "text", + "content": "However, there are two difficulties in performing the above process directly. Firstly, the majority of PLMs have an extensive number of parameters, ranging from hundreds of millions (Devlin et al., 2019) to billions (Du et al., 2022b) and even more, thus the computation of weights for the entire dataset requires significant computational resources, making it expensive and potentially unaffordable during training. Secondly, incorporating features from previous batches or epochs may lead to feature inconsistency due to the continuous evolution of features during training." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 460, + 525, + 554 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 460, + 525, + 554 + ], + "spans": [ + { + "bbox": [ + 302, + 460, + 525, + 554 + ], + "type": "text", + "content": "To overcome the aforementioned difficulties, inspired by MoCo (He et al., 2020), we only compute optimal weights for samples in the current batch, utilizing previous features and weights as additional fixed information. Furthermore, to ensure feature consistency, we discard the earliest features and weights:" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 321, + 567, + 524, + 597 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 321, + 567, + 524, + 597 + ], + "spans": [ + { + "bbox": [ + 321, + 567, + 524, + 597 + ], + "type": "interline_equation", + "content": "\\begin{array}{l} \\mathbf {F} _ {i} = \\left[ \\mathbf {F} _ {i - 1} \\left[ \\left\\lfloor L _ {F _ {i}} / (n + 1) \\right\\rfloor : \\right], \\mathbf {F} _ {c u r} \\right] \\tag {6} \\\\ \\mathbf {W} _ {i} = \\left[ \\mathbf {W} _ {i - 1} \\left[ \\left[ L _ {W _ {i}} / (n + 1) \\right]: \\right], \\mathbf {W} _ {c u r} \\right] \\\\ \\end{array}", + "image_path": "8c740fa70f7549d0f32d4079b592ffe22970ef0d308dcfa98acef3cf7b070175.jpg" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 610, + 524, + 703 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 610, + 524, + 703 + ], + "spans": [ + { + "bbox": [ + 302, + 610, + 524, + 703 + ], + "type": "text", + "content": "Where \\(\\mathbf{F}\\) and \\(\\mathbf{W}\\) mean the feature vectors and weights; \\(i\\) means the index of the current batch; \\(L_{*}\\) is the length of \\(*\\); \\(*_{cur}\\) means feature vectors or weights in the current batch; \\(n\\) is the batch number of feature vectors and weights needed to be saved; \\(\\lfloor \\cdot \\rfloor\\) is the floor function; \\([l:\\] means to delete first \\(l\\) data." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "text", + "content": "To further mitigate the feature inconsistency, we fuse and emphasize the current information with previous features and weights. Firstly, we randomly sample from " + }, + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_{cur}" + }, + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "text", + "content": " and the corresponding " + }, + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "inline_equation", + "content": "\\mathbf{W}_{cur}" + }, + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "text", + "content": " until the number of samples is the same as" + } + ] + } + ], + "index": 17 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "2630" + } + ] + } + ], + "index": 18 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 90, + 68, + 270, + 147 + ], + "blocks": [ + { + "bbox": [ + 90, + 68, + 270, + 147 + ], + "lines": [ + { + "bbox": [ + 90, + 68, + 270, + 147 + ], + "spans": [ + { + "bbox": [ + 90, + 68, + 270, + 147 + ], + "type": "image", + "image_path": "cfb71963e12707394ecfd4902e961e4ede838b7d83edde5f6e72926c6297220b.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 153, + 291, + 190 + ], + "lines": [ + { + "bbox": [ + 67, + 153, + 291, + 190 + ], + "spans": [ + { + "bbox": [ + 67, + 153, + 291, + 190 + ], + "type": "text", + "content": "Figure 4: The original causal graph of the joint entity and relation extraction task in the classification phase (left) with its alternate after intervention (right)." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 211, + 85, + 223 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 211, + 85, + 223 + ], + "spans": [ + { + "bbox": [ + 67, + 211, + 85, + 223 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_i" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 99, + 232, + 251, + 248 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 99, + 232, + 251, + 248 + ], + "spans": [ + { + "bbox": [ + 99, + 232, + 251, + 248 + ], + "type": "interline_equation", + "content": "\\mathbf {F} _ {c u r} ^ {\\prime} = [ \\mathbf {F} _ {c u r} [ R _ {1} ], \\dots , \\mathbf {F} _ {c u r} [ R _ {L} ] ]", + "image_path": "f320566a268a6b9b5b25223928c4094ec25eea55b5d78a4e5f5ad0110a8ce6f4.jpg" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 97, + 246, + 290, + 265 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 97, + 246, + 290, + 265 + ], + "spans": [ + { + "bbox": [ + 97, + 246, + 290, + 265 + ], + "type": "interline_equation", + "content": "\\mathbf {W} _ {c u r} ^ {\\prime} = \\left[ \\mathbf {W} _ {c u r} [ R _ {1} ], \\dots , \\mathbf {W} _ {c u r} [ R _ {L} ] \\right] \\tag {7}", + "image_path": "ef42bb7560129efe20a98afb0c3afeae618c4f385041e41f2b96e3b2ae737e91.jpg" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "spans": [ + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_{cur}^{\\prime}" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "\\mathbf{W}_{cur}^{\\prime}" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": " are the sets after random sampling; " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": " is the length of " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_i" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "R_i" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": " is a random integer from 0 to " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": ", and " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "[i]" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": " means getting the " + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "inline_equation", + "content": "i" + }, + { + "bbox": [ + 67, + 274, + 290, + 342 + ], + "type": "text", + "content": "-th element. And then, we fuse current information with the previous." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 117, + 351, + 290, + 371 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 117, + 351, + 290, + 371 + ], + "spans": [ + { + "bbox": [ + 117, + 351, + 290, + 371 + ], + "type": "interline_equation", + "content": "\\mathbf {F} _ {i} ^ {\\prime} = \\alpha \\mathbf {F} _ {i} + (1 - \\alpha) \\mathbf {F} _ {c u r} ^ {\\prime} \\tag {8}", + "image_path": "4224b32658814cf6abde5a2d07364ca8a9878437539f6f04b029979bb9c5fb80.jpg" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 114, + 369, + 244, + 384 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 114, + 369, + 244, + 384 + ], + "spans": [ + { + "bbox": [ + 114, + 369, + 244, + 384 + ], + "type": "interline_equation", + "content": "\\mathbf {W} _ {i} ^ {\\prime} = \\alpha \\mathbf {W} _ {i} + (1 - \\alpha) \\mathbf {W} _ {c u r} ^ {\\prime}", + "image_path": "630e47a6534f8692abc5011826ef5f6a3cc2d70131d783b5a562f15f628bce93.jpg" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "spans": [ + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": " is a hyperparameter between [0, 1] regarding how much previous information needs to be saved. Finally, " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_i^{\\prime}" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\mathbf{W}_i^{\\prime}" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": " will be applied to eq. 4 as " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\mathbf{W}" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\mathbf{F}" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": ". Note that " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_i^{\\prime}" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": " is used to gain the optimal " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\mathbf{W}_i^{\\prime}" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": ", but only the part of " + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "inline_equation", + "content": "\\mathbf{W}_{cur}" + }, + { + "bbox": [ + 67, + 392, + 290, + 473 + ], + "type": "text", + "content": " will be updated and used to weight sample loss." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 474, + 290, + 540 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 474, + 290, + 540 + ], + "spans": [ + { + "bbox": [ + 67, + 474, + 290, + 540 + ], + "type": "text", + "content": "To enhance the applicability of COP, we use a hyperparameter called COP rate to adjust the degree of influence of COP during training. After acquiring the optimal weights, the loss function is as follows:" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 121, + 548, + 267, + 562 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 121, + 548, + 267, + 562 + ], + "spans": [ + { + "bbox": [ + 121, + 548, + 267, + 562 + ], + "type": "interline_equation", + "content": "\\hat {w} _ {i} ^ {\\prime} = (1 - r _ {C O P}) + r _ {C O P} * \\hat {w} _ {i}", + "image_path": "1561027769ecf28e033ce2121beae1336cfec13ca9f814ace14d0a0a4980d9e2.jpg" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 92, + 566, + 290, + 599 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 92, + 566, + 290, + 599 + ], + "spans": [ + { + "bbox": [ + 92, + 566, + 290, + 599 + ], + "type": "interline_equation", + "content": "L o s s _ {C O P} = \\sum_ {i = 0} ^ {n} \\hat {w} _ {i} ^ {\\prime} L o s s _ {o r i g} \\left(p _ {i}, t _ {i}\\right) \\tag {9}", + "image_path": "72d70889844309c4a58ae726cd5043c41a8c3c632a839d7372ad1c2eb957a45b.jpg" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "spans": [ + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "inline_equation", + "content": "\\hat{w}_i\\in \\widehat{\\mathbf{W}}" + }, + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "text", + "content": " is the final weight of the " + }, + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "inline_equation", + "content": "i" + }, + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "text", + "content": "-th sample; " + }, + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "inline_equation", + "content": "r_{COP}\\in (0,1]" + }, + { + "bbox": [ + 67, + 610, + 291, + 640 + ], + "type": "text", + "content": " indicates COP rate." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 67, + 647, + 194, + 661 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 647, + 194, + 661 + ], + "spans": [ + { + "bbox": [ + 67, + 647, + 194, + 661 + ], + "type": "text", + "content": "3.3 Variance Optimizing" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "content": "Inspired by causal intervention (Pearl et al., 2016), we construct a causal graph (Fig. 2) regarding the causality from feature vectors to the final targets. To clarify our objective, in our causal analysis, we focus on the mitigation of bias arising from the long-tail distribution. This bias tends to make labels with a substantial number of samples more readily predictable during the inference process." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 71, + 524, + 97 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 524, + 97 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 524, + 97 + ], + "type": "text", + "content": "Moreover, the effectiveness of mitigating this bias can be easily quantified." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "spans": [ + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": "As shown in Fig. 2, " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "F \\gets L \\to P" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": " is a backdoor path, a path that connects " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "P" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": " but does not start with " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": ", from " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "P" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": " in which " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": ", and " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "P" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": " are feature vectors, real labels, and model predictions respectively. Thus, the label distribution from the datasets is the confounder between the feature vectors and the final predictions, creating a spurious correlation that disturbs model inference and causes lower performance. For a better understanding of the causal graph, we introduce it as follows: The labels in datasets are the optimizing target of model training " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "(L \\to P)" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": " which also takes effect on the feature vector learning " + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "inline_equation", + "content": "(L \\to F)" + }, + { + "bbox": [ + 302, + 98, + 526, + 287 + ], + "type": "text", + "content": ". Appendix. A shows more detail of the causal graph." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "spans": [ + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "content": "In order to remove the confounder caused by backdoor path " + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "inline_equation", + "content": "F \\leftarrow L \\rightarrow P" + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "content": " and make the model learn direct causality between feature vectors and predictions, we introduce do-operator (Pearl et al., 2016) on feature vectors " + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "content": " to gain the causality of " + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "content": " on " + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "inline_equation", + "content": "P" + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "content": " called " + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "inline_equation", + "content": "p(P|do(F))" + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "content": ". As shown in Fig. 4 right, through do-operator, the edge causing confounder, " + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "inline_equation", + "content": "F \\leftarrow L \\rightarrow P" + }, + { + "bbox": [ + 302, + 288, + 525, + 408 + ], + "type": "text", + "content": ", is blocked, so that the spurious correlation has been removed." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 302, + 409, + 525, + 476 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 409, + 525, + 476 + ], + "spans": [ + { + "bbox": [ + 302, + 409, + 525, + 476 + ], + "type": "text", + "content": "Backdoor adjustment (Pearl, 1995) is a method to reduce confounders in causal inference, and it can perform " + }, + { + "bbox": [ + 302, + 409, + 525, + 476 + ], + "type": "inline_equation", + "content": "do" + }, + { + "bbox": [ + 302, + 409, + 525, + 476 + ], + "type": "text", + "content": "-operator on the observational datasets. Formally, the backdoor adjustment reduces the bias as:" + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 326, + 480, + 525, + 507 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 326, + 480, + 525, + 507 + ], + "spans": [ + { + "bbox": [ + 326, + 480, + 525, + 507 + ], + "type": "interline_equation", + "content": "p (P | d o (F)) = \\sum_ {L} p (P | F, L) p (L) \\tag {10}", + "image_path": "89eb4540c87afc1e1490791e26f84e3b08fe4271d449c95c0ac59cac74060de2.jpg" + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 302, + 513, + 525, + 526 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 513, + 525, + 526 + ], + "spans": [ + { + "bbox": [ + 302, + 513, + 525, + 526 + ], + "type": "text", + "content": "Where the detail for the equation is in Appendix B." + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 302, + 526, + 524, + 593 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 526, + 524, + 593 + ], + "spans": [ + { + "bbox": [ + 302, + 526, + 524, + 593 + ], + "type": "text", + "content": "Inspired by the eq. 10, it can reduce the spurious correlation if we process the feature vectors of the same label separately. So we propose a method to optimize the feature vectors in the same label by using the property of variance." + } + ] + } + ], + "index": 21 + }, + { + "bbox": [ + 302, + 594, + 525, + 700 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 594, + 525, + 700 + ], + "spans": [ + { + "bbox": [ + 302, + 594, + 525, + 700 + ], + "type": "text", + "content": "When the fluctuation among samples is serious, the variance will be large, and vice versa. In other words, we can minimize the variance between the samples of the same label to bring them closer together and at the same time achieve intervention. Along this way, we introduce a new loss function using the variance to optimize the feature representation as follows:" + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 340, + 704, + 525, + 741 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 340, + 704, + 525, + 741 + ], + "spans": [ + { + "bbox": [ + 340, + 704, + 525, + 741 + ], + "type": "interline_equation", + "content": "L o s s _ {V O P} = \\sum_ {l = 0} ^ {L} \\sum_ {n = 0} ^ {N} v a r \\left(\\mathbf {F} _ {(l, n)}\\right) \\tag {11}", + "image_path": "011d38daf24f495ab65ab6158cd38a2cabfde56252291eeb361a2f47e42eb56a.jpg" + } + ] + } + ], + "index": 23 + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "content": " is the label amount in one batch of data, " + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "inline_equation", + "content": "N" + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "content": " is the dimension amount of feature vectors, and" + } + ] + } + ], + "index": 24 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 308, + 791 + ], + "type": "text", + "content": "2631" + } + ] + } + ], + "index": 25 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_{(l,n)}" + }, + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "type": "text", + "content": " means the n-th dimensional feature of all samples of label " + }, + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "type": "inline_equation", + "content": "l" + }, + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "type": "text", + "content": ". " + }, + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "type": "inline_equation", + "content": "var(\\cdot)" + }, + { + "bbox": [ + 67, + 71, + 290, + 124 + ], + "type": "text", + "content": " is the operation of computing sample variance. Note that missing several labels is possible in one batch of data." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 126, + 290, + 247 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 126, + 290, + 247 + ], + "spans": [ + { + "bbox": [ + 67, + 126, + 290, + 247 + ], + "type": "text", + "content": "This method is called variance optimizing (VOP). Additionally, benefiting from the random mechanism of mini-batch gradient descent, one sample can combine with different samples into the same batch in each training epoch, which brings two main advantages as follows: Firstly, the diversity of sample combination is ensured automatically. Secondly, the impact of abnormal samples is mitigated due to the overall optimization." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 255, + 253, + 268 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 255, + 253, + 268 + ], + "spans": [ + { + "bbox": [ + 67, + 255, + 253, + 268 + ], + "type": "text", + "content": "3.4 Overall Optimization Framework" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 272, + 290, + 352 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 272, + 290, + 352 + ], + "spans": [ + { + "bbox": [ + 67, + 272, + 290, + 352 + ], + "type": "text", + "content": "We combine COP and VOP into a unified framework called covariance and variance optimization framework (OVO), as shown in Fig. 3, and the algorithm. 1 (Appendix. C) illustrates the detailed training procedure of OVO. The final loss is as follows:" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 86, + 359, + 290, + 374 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 359, + 290, + 374 + ], + "spans": [ + { + "bbox": [ + 86, + 359, + 290, + 374 + ], + "type": "interline_equation", + "content": "L o s s _ {f i n a l} = L o s s _ {C O P} + \\lambda L o s s _ {V O P} \\tag {12}", + "image_path": "b00781fac7376f5c004f4c54731289ef9146aaed095d6f6c80c52d2c91e335c3.jpg" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 378, + 290, + 405 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 378, + 290, + 405 + ], + "spans": [ + { + "bbox": [ + 67, + 378, + 290, + 405 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 67, + 378, + 290, + 405 + ], + "type": "inline_equation", + "content": "\\lambda" + }, + { + "bbox": [ + 67, + 378, + 290, + 405 + ], + "type": "text", + "content": " is a hyperparameter for the weight of " + }, + { + "bbox": [ + 67, + 378, + 290, + 405 + ], + "type": "inline_equation", + "content": "Loss_{VOP}" + }, + { + "bbox": [ + 67, + 378, + 290, + 405 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 413, + 149, + 428 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 413, + 149, + 428 + ], + "spans": [ + { + "bbox": [ + 67, + 413, + 149, + 428 + ], + "type": "text", + "content": "4 Experiment" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 434, + 131, + 446 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 434, + 131, + 446 + ], + "spans": [ + { + "bbox": [ + 67, + 434, + 131, + 446 + ], + "type": "text", + "content": "4.1 Dataset" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 452, + 290, + 572 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 452, + 290, + 572 + ], + "spans": [ + { + "bbox": [ + 67, + 452, + 290, + 572 + ], + "type": "text", + "content": "We conduct experiments to evaluate our approach on two popular joint entity and relation extraction datasets: ACE051 and SciERC2(Luan et al., 2018). For ACE2005, we use the same split following (Luan et al., 2019) in the train, development, and test sets. ACE2005 dataset includes various domain data, such as newswire and broadcast news, while the SciERC dataset includes abstracts collected from AI conferences/workshops." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 573, + 290, + 667 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 573, + 290, + 667 + ], + "spans": [ + { + "bbox": [ + 67, + 573, + 290, + 667 + ], + "type": "text", + "content": "Additionally, to evaluate the effectiveness of OVO in out-of-distribution settings, we conduct experiments on CrossRE " + }, + { + "bbox": [ + 67, + 573, + 290, + 667 + ], + "type": "inline_equation", + "content": "^{3}" + }, + { + "bbox": [ + 67, + 573, + 290, + 667 + ], + "type": "text", + "content": " (Bassignana and Plank, 2022) which is a dataset for the relation extraction task across 6 different domains, namely news, politics, natural science, music, literature, and artificial intelligence." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 677, + 179, + 688 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 677, + 179, + 688 + ], + "spans": [ + { + "bbox": [ + 67, + 677, + 179, + 688 + ], + "type": "text", + "content": "4.2 Evaluation metrics" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 67, + 693, + 290, + 735 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 693, + 290, + 735 + ], + "spans": [ + { + "bbox": [ + 67, + 693, + 290, + 735 + ], + "type": "text", + "content": "We follow the evaluation metrics in previous close works to evaluate the experiment results' performance using the micro F1 measure. For the NER" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 71, + 526, + 220 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 220 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 220 + ], + "type": "text", + "content": "task, we use the span-level benchmark to evaluate, which one entity is considered recognized correctly if and only if both its boundary and type are precisely predicted. For the RE, we adopt two evaluation metrics as follows: (1) boundaries evaluation (Rel): a relation is considered recognized correctly if and only if the boundaries of head and tail entities are correct, and their relation label is correct; (2) strict evaluation " + }, + { + "bbox": [ + 302, + 71, + 526, + 220 + ], + "type": "inline_equation", + "content": "(\\mathbf{Rel}+)" + }, + { + "bbox": [ + 302, + 71, + 526, + 220 + ], + "type": "text", + "content": ": in addition to the requirement of Rel, the types of two entities are also needed to be correctly predicted." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 232, + 441, + 244 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 232, + 441, + 244 + ], + "spans": [ + { + "bbox": [ + 302, + 232, + 441, + 244 + ], + "type": "text", + "content": "4.3 Implementation Details" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 250, + 526, + 452 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 250, + 526, + 452 + ], + "spans": [ + { + "bbox": [ + 302, + 250, + 526, + 452 + ], + "type": "text", + "content": "We apply OVO to 3 of out of top-5 strong baselines4, specifically PURE (Zhong and Chen, 2021), SpERT.PL (Sai et al., 2021), and PL-Marker (Ye et al., 2022). For ACE2005, the BERT encoders are bert-base-uncased (Devlin et al., 2019) and albert-xxlarge-v1(Lan et al., 2020) which are in the common domain. For SciERC, the BERT encoder is scibert-scivocab-uncased (Beltagy et al., 2019) which is in the scientific domain. We use our proposed method, OVO, to optimize the feature vectors as the extra plugin beyond the common model training with all hyperparameters the same as the base models. To ensure robustness, we conduct experiments with 3 different seeds and report the average scores." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 464, + 374, + 476 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 464, + 374, + 476 + ], + "spans": [ + { + "bbox": [ + 302, + 464, + 374, + 476 + ], + "type": "text", + "content": "4.4Baselines" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 483, + 525, + 671 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 483, + 525, + 671 + ], + "spans": [ + { + "bbox": [ + 302, + 483, + 525, + 671 + ], + "type": "text", + "content": "For comparison, we choose serials of state-of-the-art models as follows: (1) PURE (Zhong and Chen, 2021) uses two independent models for NER and RE respectively in a frustratingly easy way, and is the first to propose levitated markers for RE task called PURE(Approx) to accelerate the inference speed, but with a slight drop in performance; (2) SpERT.PL (Sai et al., 2021) uses part-of-speech and logits of entities to enhance the features of entities and relations which shows strong performance in the SciERC dataset. (3) PL-Marker (Ye et al., 2022) is the first to leverage levitated markers to both NER and RE tasks using a packed method with great improvement." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 673, + 525, + 740 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 673, + 525, + 740 + ], + "spans": [ + { + "bbox": [ + 302, + 673, + 525, + 740 + ], + "type": "text", + "content": "Additionally, for comparison with other causal debiasing methods, we choose two related methods as follows: (1) CFIE (Nan et al., 2021) uses causal inference to tackle the long-tailed IE issues; (2) CoRE (Wang et al., 2022) designs a counterfactual" + } + ] + } + ], + "index": 17 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 80, + 738, + 267, + 750 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 738, + 267, + 750 + ], + "spans": [ + { + "bbox": [ + 80, + 738, + 267, + 750 + ], + "type": "text", + "content": "1https://catalog.ldc.upenn.edu/LDC2006T06" + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 81, + 750, + 243, + 761 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 81, + 750, + 243, + 761 + ], + "spans": [ + { + "bbox": [ + 81, + 750, + 243, + 761 + ], + "type": "text", + "content": "2http://nlp.cs.washington.edu/sciIE/" + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 81, + 761, + 235, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 81, + 761, + 235, + 772 + ], + "spans": [ + { + "bbox": [ + 81, + 761, + 235, + 772 + ], + "type": "text", + "content": "3https://github.com/mainlp/CrossRE" + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 302, + 751, + 465, + 761 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 751, + 465, + 761 + ], + "spans": [ + { + "bbox": [ + 302, + 751, + 465, + 761 + ], + "type": "text", + "content": "4https://paperswithcode.com/sota/" + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 305, + 761, + 483, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 305, + 761, + 483, + 772 + ], + "spans": [ + { + "bbox": [ + 305, + 761, + 483, + 772 + ], + "type": "text", + "content": "joint-entity-and-relation-extraction-on" + } + ] + } + ], + "index": 23 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "2632" + } + ] + } + ], + "index": 25 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 290, + 98 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 290, + 98 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 290, + 98 + ], + "type": "text", + "content": "analysis to debias RE by reducing the side-effects of entity mentions." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 109, + 130, + 120 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 109, + 130, + 120 + ], + "spans": [ + { + "bbox": [ + 67, + 109, + 130, + 120 + ], + "type": "text", + "content": "4.5 Results" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "spans": [ + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "text", + "content": "Table 1 shows the results of comparative experiments between our proposed method and baselines. As is shown, with the scibert-scivocab-uncased encoder, our proposed method, OVO, outperforms PURE-F, SpERT.PL, and PL-Marker by " + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "inline_equation", + "content": "+3.3\\%" + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "inline_equation", + "content": "+2.1\\%" + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "text", + "content": " ,and " + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "inline_equation", + "content": "+2.9\\%" + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "text", + "content": " with Rel " + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "inline_equation", + "content": "^+" + }, + { + "bbox": [ + 67, + 126, + 291, + 275 + ], + "type": "text", + "content": " on SciERC respectively. Furthermore, on ACE2005, with both bertbase-uncased encoder and albert-xxlarge-v1 encoder, our method also outperforms the baselines on Rel+. Such improvements over baselines indicate the effectiveness and generalization of OVO." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 276, + 291, + 464 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 276, + 291, + 464 + ], + "spans": [ + { + "bbox": [ + 69, + 276, + 291, + 464 + ], + "type": "text", + "content": "Additionally, due to CoRE (Wang et al., 2022) being only for RE, we compare OVO with CFIE (Nan et al., 2021) and CoRE only in RE using the result of OVO in NER. For the base model, we chose PURE because of SpERT.PL is a joint model that cannot handle NER and RE tasks separately and PL-Marker uses a packed method that cannot handle only one pair of entities in RE. As shown in Table 1, CFIE and CoRE can improve performance somewhat but are still lower than OVO. The results can show the effectiveness of OVO compared with other methods. Specifically, on SciERC, the REL+ of OVO was " + }, + { + "bbox": [ + 69, + 276, + 291, + 464 + ], + "type": "inline_equation", + "content": "1.6\\%" + }, + { + "bbox": [ + 69, + 276, + 291, + 464 + ], + "type": "text", + "content": " higher than CFIE; on Ace2005, the REL+ of OVO was " + }, + { + "bbox": [ + 69, + 276, + 291, + 464 + ], + "type": "inline_equation", + "content": "0.2\\%" + }, + { + "bbox": [ + 69, + 276, + 291, + 464 + ], + "type": "text", + "content": " higher than CoRE." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 466, + 291, + 600 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 466, + 291, + 600 + ], + "spans": [ + { + "bbox": [ + 67, + 466, + 291, + 600 + ], + "type": "text", + "content": "To evaluate the effectiveness of OVO on out-of-distribution, we conduct experiments on an out-domain setting as follows: using the train set of one domain during training, and using the test sets of the other five domains during testing. We choose PL-Marker as the base model and then apply OVO on each domain. As shown in Table. 2, using OVO gains improvements in all cases with an average improvement of " + }, + { + "bbox": [ + 67, + 466, + 291, + 600 + ], + "type": "inline_equation", + "content": "1.5\\%" + }, + { + "bbox": [ + 67, + 466, + 291, + 600 + ], + "type": "text", + "content": " and a best improvement of " + }, + { + "bbox": [ + 67, + 466, + 291, + 600 + ], + "type": "inline_equation", + "content": "2.4\\%" + }, + { + "bbox": [ + 67, + 466, + 291, + 600 + ], + "type": "text", + "content": " in the ai domain." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 612, + 167, + 624 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 612, + 167, + 624 + ], + "spans": [ + { + "bbox": [ + 67, + 612, + 167, + 624 + ], + "type": "text", + "content": "4.6 Ablation Study" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 629, + 291, + 723 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 629, + 291, + 723 + ], + "spans": [ + { + "bbox": [ + 67, + 629, + 291, + 723 + ], + "type": "text", + "content": "In this section, we conduct ablation studies to elucidate the effectiveness of different components of our proposed method on the baseline PL-Marker (Ye et al., 2022). We use the evaluation metrics the same as in Table 1 on both ACE2005 and SciERC datasets using bert-base-uncased and scibert-scivocab-uncased as bert encoders respectively." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 733, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 733, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 733, + 291, + 772 + ], + "type": "text", + "content": "w/o. COP: To evaluate the effectiveness of covariance optimizing, we remove COP and only use VOP in the model training process and set" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "text", + "content": "all weights of feature vectors as 1 for computing " + }, + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "inline_equation", + "content": "Loss_{COP}" + }, + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "text", + "content": ". As shown in Table 3, the performance of Rel and " + }, + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "inline_equation", + "content": "Rel+" + }, + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "text", + "content": " drop " + }, + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "inline_equation", + "content": "0.8\\% - 2.2\\%" + }, + { + "bbox": [ + 302, + 71, + 526, + 138 + ], + "type": "text", + "content": " without COP, which can represent the importance to reduce the spurious correlation among features." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 153, + 526, + 260 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 153, + 526, + 260 + ], + "spans": [ + { + "bbox": [ + 302, + 153, + 526, + 260 + ], + "type": "text", + "content": "w/o. VOP: To verify the effectiveness of variance optimization, we make VOP disabled and let only COP work in the training procedure. As shown in Table 3, when removing VOP, the performance of Rel and Rel+ drop " + }, + { + "bbox": [ + 302, + 153, + 526, + 260 + ], + "type": "inline_equation", + "content": "2.0\\% - 3.4\\%" + }, + { + "bbox": [ + 302, + 153, + 526, + 260 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 153, + 526, + 260 + ], + "type": "inline_equation", + "content": "1.6\\% - 2.2\\%" + }, + { + "bbox": [ + 302, + 153, + 526, + 260 + ], + "type": "text", + "content": " respectively, which can indicate the effect of the causal intervention and the VOP play an important role in OVO." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 275, + 526, + 436 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 275, + 526, + 436 + ], + "spans": [ + { + "bbox": [ + 302, + 275, + 526, + 436 + ], + "type": "text", + "content": "w. SNet: StableNet (Zhang et al., 2021) is similar work with COP which use Random Fourier Features to enhance the non-linearity of enhanced features. To compare the effectiveness between COP and StableNet, we replace COP with StableNet keeping other settings the same, and then negotiate the final performance between them. The performance shows that using COP gains " + }, + { + "bbox": [ + 302, + 275, + 526, + 436 + ], + "type": "inline_equation", + "content": "+0.7\\%" + }, + { + "bbox": [ + 302, + 275, + 526, + 436 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 275, + 526, + 436 + ], + "type": "inline_equation", + "content": "+0.4\\%" + }, + { + "bbox": [ + 302, + 275, + 526, + 436 + ], + "type": "text", + "content": " improvement in Rel+ on ACE2005 and SciERC respectively. Moreover, from the results in Table 5, the consumption of COP is much smaller than that of StableNet." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 454, + 368, + 467 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 454, + 368, + 467 + ], + "spans": [ + { + "bbox": [ + 302, + 454, + 368, + 467 + ], + "type": "text", + "content": "5 Analysis" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 480, + 431, + 493 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 480, + 431, + 493 + ], + "spans": [ + { + "bbox": [ + 302, + 480, + 431, + 493 + ], + "type": "text", + "content": "5.1 Fine-grained analysis" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 501, + 526, + 595 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 501, + 526, + 595 + ], + "spans": [ + { + "bbox": [ + 302, + 501, + 526, + 595 + ], + "type": "text", + "content": "To analyze the debias ability of OVO, we conduct experiments to evaluate the performance of each label on PL-Marker. The detailed results for each relation label on SciERC are shown in Table 4. From the table, the number of USERD-FOR accounts for more than half, " + }, + { + "bbox": [ + 302, + 501, + 526, + 595 + ], + "type": "inline_equation", + "content": "54.7\\%" + }, + { + "bbox": [ + 302, + 501, + 526, + 595 + ], + "type": "text", + "content": " of the total, but that of COMPARE is only " + }, + { + "bbox": [ + 302, + 501, + 526, + 595 + ], + "type": "inline_equation", + "content": "3.9\\%" + }, + { + "bbox": [ + 302, + 501, + 526, + 595 + ], + "type": "text", + "content": " of the total." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "text", + "content": "From the results, the two worst-performing labels both have a small number of samples which are only " + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "inline_equation", + "content": "6.9\\%" + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "inline_equation", + "content": "6.4\\%" + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "text", + "content": " of the total, respectively. For the comparison between with or without OVO, we find that the performances in all labels gain improvement, except for USED-FOR, which is one that has the most samples in the dataset and keeps comparable performance. Additionally, the improvement increases as the number of samples decreases. The most improvement is on PART-OF, which outperforms " + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "inline_equation", + "content": "+9.1\\%" + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "text", + "content": " in F1 than without VOP. Moreover, the overall results of average F1 gain " + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "inline_equation", + "content": "+4.0\\%" + }, + { + "bbox": [ + 302, + 597, + 526, + 772 + ], + "type": "text", + "content": " improvement." + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2633" + } + ] + } + ], + "index": 15 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 74, + 68, + 520, + 264 + ], + "blocks": [ + { + "bbox": [ + 74, + 68, + 520, + 264 + ], + "lines": [ + { + "bbox": [ + 74, + 68, + 520, + 264 + ], + "spans": [ + { + "bbox": [ + 74, + 68, + 520, + 264 + ], + "type": "table", + "html": "
EncoderACE2005SciERC
EntRelRel+EntRelRel+
SPtree (Miwa and Bansal, 2016)LSTM83.4-55.6---
DyGIE (Luan et al., 2019)ELMo88.463.2-65.241.6-
OneIE† (Lin et al., 2020)BL88.867.5----
DyGIE++† (Wadden et al., 2019)BB/SciB88.663.4-67.0*47.5*-
SPERT (Eberts and Ulges, 2020)86.8*63.8*-70.350.8-
UniRE† (Wang et al., 2021)88.865.7*64.368.440.2*36.9
SpERT.PL (Sai et al., 2021) +OVOBB/SciB87.4*65.3*62.1*70.551.339.4
87.967.965.371.752.641.5
PL-Marker† (Ye et al., 2022) +OVO†89.869.066.569.953.241.6
89.670.667.770.756.144.5
PURE-F† (Zhong and Chen, 2021) +CFIE† (Nanet al., 2021) +CoRE† (Wanget al., 2022) +OVO†90.167.764.868.950.136.8
-67.764.5-50.938.5
-67.664.9-50.738.0
90.568.065.170.051.640.1
UniRE† (Wang et al., 2021)ALBXX90.2-66.0---
PURE-F† (Zhong and Chen, 2021)90.969.467.0---
PL-Marker† (Ye et al., 2022) +OVO†91.173.071.1---
91.274.672.3---
", + "image_path": "8e340fa8825fed92833949c2457b0927b70370425cc5ff24476f448c1bfacaf2.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 123, + 355, + 472, + 400 + ], + "blocks": [ + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "lines": [ + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "spans": [ + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "text", + "content": "Table 1: Overall test results of F1 in joint entity and relation task on the dataset of ACE2005 and SciERC. †: the model or method leverages cross-sentence information as extra features. The encoders used in different models: " + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "inline_equation", + "content": "B_{B} =" + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "text", + "content": " bert-base-uncased, " + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "inline_equation", + "content": "B_{L} =" + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "text", + "content": " bert-large-uncased, " + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "inline_equation", + "content": "SciB =" + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "text", + "content": " scibert-scivocab-uncased, " + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "inline_equation", + "content": "ALB_{XX} =" + }, + { + "bbox": [ + 67, + 272, + 526, + 346 + ], + "type": "text", + "content": " albert-xxlarge-v1. Model name abbreviation: PURE-F = PURE(Full). Evaluation metric abbreviation: Rel denotes the boundaries evaluation and Rel+ denotes the strict evaluation. *: the result is not given in the original works, and we run the corresponding experiment, reporting the results in the table." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 123, + 355, + 472, + 400 + ], + "lines": [ + { + "bbox": [ + 123, + 355, + 472, + 400 + ], + "spans": [ + { + "bbox": [ + 123, + 355, + 472, + 400 + ], + "type": "table", + "html": "
Rel(%)newssciencepoliticsliteratureaimusicavg
PL-Marker9.713.014.414.811.614.112.9
+OVO10.314.315.416.414.016.414.5
", + "image_path": "9528a952b7d49e264de1a2ab55be18855e8d7a8b96cb4300e6da53e888fa9f9b.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "type": "table", + "bbox": [ + 69, + 439, + 289, + 521 + ], + "blocks": [ + { + "bbox": [ + 162, + 408, + 430, + 421 + ], + "lines": [ + { + "bbox": [ + 162, + 408, + 430, + 421 + ], + "spans": [ + { + "bbox": [ + 162, + 408, + 430, + 421 + ], + "type": "text", + "content": "Table 2: Results in the out-domain setting on the CrossRE dataset." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 69, + 439, + 289, + 521 + ], + "lines": [ + { + "bbox": [ + 69, + 439, + 289, + 521 + ], + "spans": [ + { + "bbox": [ + 69, + 439, + 289, + 521 + ], + "type": "table", + "html": "
ACE2005SciERC
EntRelRel+EntRelRel+
OVO89.670.667.770.756.144.5
w/o. COP89.769.766.970.054.143.3
w/o. VOP89.568.665.570.752.742.9
w. SNet89.470.167.070.555.044.1
", + "image_path": "cce625dcf63d818033ce71b79ad927ff65a9d317798a7597b5c7de618b614fd6.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "table_body" + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 530, + 290, + 567 + ], + "lines": [ + { + "bbox": [ + 67, + 530, + 290, + 567 + ], + "spans": [ + { + "bbox": [ + 67, + 530, + 290, + 567 + ], + "type": "text", + "content": "Table 3: Ablation on ACE2005 and SciERC test set with different component setups. w. SNet means replacing COP with StableNet in model training." + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 591, + 247, + 604 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 591, + 247, + 604 + ], + "spans": [ + { + "bbox": [ + 67, + 591, + 247, + 604 + ], + "type": "text", + "content": "5.2 Effect of Covariance Optimizing" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 611, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 611, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 611, + 291, + 772 + ], + "type": "text", + "content": "As the results are shown in Table 5, by using StableNet, it gains " + }, + { + "bbox": [ + 67, + 611, + 291, + 772 + ], + "type": "inline_equation", + "content": "+0.6\\%" + }, + { + "bbox": [ + 67, + 611, + 291, + 772 + ], + "type": "text", + "content": " improvement on Ent, and COP improves on it " + }, + { + "bbox": [ + 67, + 611, + 291, + 772 + ], + "type": "inline_equation", + "content": "+0.2\\%" + }, + { + "bbox": [ + 67, + 611, + 291, + 772 + ], + "type": "text", + "content": ". Table 3 shows more results between COP and StableNet. So, we can conclude that stable learning technology can actually achieve improvement for our task. But the consumption of computing resources is relatively high and it costs approximately 5 and 1.7 times for training time and GPU memory respectively than the original. In comparison, COP uses fewer resources but gets better performance. Additionally, more detailed results of hyperparameters are" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 442, + 415, + 455 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 442, + 415, + 455 + ], + "spans": [ + { + "bbox": [ + 302, + 442, + 415, + 455 + ], + "type": "text", + "content": "reported in Appendix. D." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 465, + 470, + 479 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 465, + 470, + 479 + ], + "spans": [ + { + "bbox": [ + 302, + 465, + 470, + 479 + ], + "type": "text", + "content": "5.3 Effect of Variance Optimizing" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 483, + 526, + 592 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 483, + 526, + 592 + ], + "spans": [ + { + "bbox": [ + 302, + 483, + 526, + 592 + ], + "type": "text", + "content": "To enhance adaptation to diverse methods, we introduce a weight for " + }, + { + "bbox": [ + 302, + 483, + 526, + 592 + ], + "type": "inline_equation", + "content": "Loss_{VOP}" + }, + { + "bbox": [ + 302, + 483, + 526, + 592 + ], + "type": "text", + "content": " to mitigate its impact on the normal training of the model and avoid performance degradation. The optimal weight varies depending on the specific dataset and method employed, as different weights yield the best performance. The detailed results are reported in Appendix. E." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 602, + 381, + 615 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 602, + 381, + 615 + ], + "spans": [ + { + "bbox": [ + 302, + 602, + 381, + 615 + ], + "type": "text", + "content": "6 Conclusion" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 624, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 624, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 624, + 526, + 772 + ], + "type": "text", + "content": "In this work, we propose the OVO, a novel model training framework for optimizing feature vectors using causal technology. There are two main parts of OVO which are called COP and VOP. From the perspective of the correlation among features, COP reduces the spurious relation by minimizing the covariance computed from all features. From the viewpoint of each feature, VOP makes the feature more causal by minimizing the variance calculated from each feature of the same label. After optimizing the features toward causal, our method achieves" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2634" + } + ] + } + ], + "index": 13 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 100, + 69, + 492, + 177 + ], + "blocks": [ + { + "bbox": [ + 100, + 69, + 492, + 177 + ], + "lines": [ + { + "bbox": [ + 100, + 69, + 492, + 177 + ], + "spans": [ + { + "bbox": [ + 100, + 69, + 492, + 177 + ], + "type": "table", + "html": "
Metric (Rel)UFCONEFHOPOFOCOMavg.
Proportion (%)-54.712.69.36.96.46.03.9-
w/o. OVO (%)Recall55.262.646.264.228.623.752.647.6
Precision53.655.051.258.148.725.950.048.9
F154.358.648.660.136.024.851.347.7
w. OVO (%)Recall53.165.749.570.236.525.455.350.8
Precision55.453.354.259.559.035.760.053.9
F154.258.951.764.445.129.757.551.7
Δ-0.1+0.3+3.1+4.3+9.1+4.9+6.2+4.0
", + "image_path": "06cf7b09afb8963f6780970fb3201f3150b5d5f20046f490156383c19c21ce0f.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 98, + 241, + 257, + 311 + ], + "blocks": [ + { + "bbox": [ + 67, + 185, + 526, + 223 + ], + "lines": [ + { + "bbox": [ + 67, + 185, + 526, + 223 + ], + "spans": [ + { + "bbox": [ + 67, + 185, + 526, + 223 + ], + "type": "text", + "content": "Table 4: The fine-grained results on the SciERC dataset. Relation label abbreviation: UF=USED-FOR, CON=CONJUNCTION, EF=EVALUATE-FOR, HO=HYPONYM-OF, PO=PART-OF, FO=FEATURE-OF, COM=COMPARE. Proportion means the percentage of the number of one relation label in total data." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 98, + 241, + 257, + 311 + ], + "lines": [ + { + "bbox": [ + 98, + 241, + 257, + 311 + ], + "spans": [ + { + "bbox": [ + 98, + 241, + 257, + 311 + ], + "type": "table", + "html": "
NameEntGPU (GB)Time (h)
PL-Marker69.9192
w.COP70.7244
w.SNet70.53210
", + "image_path": "dc8046cae267eed74fdfbd9f78aba3a70e10717d56a000d26ee1d33b30fe9218.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 318, + 290, + 391 + ], + "lines": [ + { + "bbox": [ + 67, + 318, + 290, + 391 + ], + "spans": [ + { + "bbox": [ + 67, + 318, + 290, + 391 + ], + "type": "text", + "content": "Table 5: The experiment results on the SciERC. The base model is PL-Marker. COP means covariance optimizing; Time (h) is the time consumption of model training. The text with bold and italics indicates the best performance, and that with underlining indicates the second best." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 417, + 291, + 498 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 417, + 291, + 498 + ], + "spans": [ + { + "bbox": [ + 67, + 417, + 291, + 498 + ], + "type": "text", + "content": "improvements on 3 strong baselines and reduces the influence of data unbalanced bias. In the future, we will pay more attention to (1) how to further reduce resource consumption on COP and (2) how can let the weight of VOP adjusts itself automatically to adapt to the different datasets." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 518, + 130, + 530 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 518, + 130, + 530 + ], + "spans": [ + { + "bbox": [ + 67, + 518, + 130, + 530 + ], + "type": "text", + "content": "Limitations" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 544, + 291, + 587 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 544, + 291, + 587 + ], + "spans": [ + { + "bbox": [ + 67, + 544, + 291, + 587 + ], + "type": "text", + "content": "OVO is a novel training framework for optimizing feature representations directly using causal technology. The limitations of OVO are as follows:" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 80, + 605, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 9, + "blocks": [ + { + "bbox": [ + 80, + 605, + 290, + 671 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 605, + 290, + 671 + ], + "spans": [ + { + "bbox": [ + 80, + 605, + 290, + 671 + ], + "type": "text", + "content": "- COP is an additional training process in each batch that will improve resource consumption. Larger models and more previous information used in COP will cost more additional resources." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 80, + 692, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 692, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 80, + 692, + 291, + 772 + ], + "type": "text", + "content": "- To adapt OVO to more models, there are some hyperparameters to control the degree of effect of COP and VOP during training. These hyperparameters are sensitive to different models and datasets, so it takes time to experiment to find the optimal values of them." + } + ] + } + ], + "index": 8 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 303, + 243, + 405, + 257 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 243, + 405, + 257 + ], + "spans": [ + { + "bbox": [ + 303, + 243, + 405, + 257 + ], + "type": "text", + "content": "Acknowledgements" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 264, + 526, + 413 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 264, + 526, + 413 + ], + "spans": [ + { + "bbox": [ + 302, + 264, + 526, + 413 + ], + "type": "text", + "content": "The State Key Program of National Natural Science of China, Grant/Award Number:61533018; National Natural Science Foundation of China, Grant/Award Number: 61402220; The Philosophy and Social Science Foundation of Hunan Province, Grant/Award Number: 16YBA323; Natural Science Foundation of Hunan Province, Grant/Award Number: 2020JJ4525,2022JJ30495; Scientific Research Fund of Hunan Provincial Education Department, Grant/Award Number: 18B279,19A439,22A0316." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 438, + 362, + 449 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 438, + 362, + 449 + ], + "spans": [ + { + "bbox": [ + 304, + 438, + 362, + 449 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 303, + 456, + 527, + 772 + ], + "type": "list", + "angle": 0, + "index": 17, + "blocks": [ + { + "bbox": [ + 304, + 456, + 526, + 524 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 456, + 526, + 524 + ], + "spans": [ + { + "bbox": [ + 304, + 456, + 526, + 524 + ], + "type": "text", + "content": "Elisa Bassignana and Barbara Plank. 2022. Crossre: A cross-domain dataset for relation extraction. In Findings of the Association for Computational Linguistics: EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 3592-3604. Association for Computational Linguistics." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 532, + 527, + 622 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 532, + 527, + 622 + ], + "spans": [ + { + "bbox": [ + 304, + 532, + 527, + 622 + ], + "type": "text", + "content": "Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. Scibert: A pretrained language model for scientific text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 3613-3618. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 629, + 527, + 719 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 629, + 527, + 719 + ], + "spans": [ + { + "bbox": [ + 304, + 629, + 527, + 719 + ], + "type": "text", + "content": "Razvan C. Bunescu and Raymond J. Mooney. 2005. A shortest path dependency kernel for relation extraction. In HLT/EMNLP 2005, Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing, Proceedings of the Conference, 6-8 October 2005, Vancouver, British Columbia, Canada, pages 724-731. The Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 303, + 728, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 728, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 303, + 728, + 526, + 772 + ], + "type": "text", + "content": "Huajun Chen, Ning Hu, Guilin Qi, Haofen Wang, Zhen Bi, Jie Li, and Fan Yang. 2021. Openkg chain: A blockchain infrastructure for open knowledge graphs. Data Intell., 3(2):205-227." + } + ] + } + ], + "index": 16 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2635" + } + ] + } + ], + "index": 18 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 771 + ], + "type": "list", + "angle": 0, + "index": 8, + "blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 105 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 291, + 105 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 291, + 105 + ], + "type": "text", + "content": "David A. Cohn, Zoubin Ghahramani, and Michael I. Jordan. 1996. Active learning with statistical models. J. Artif. Intell. Res., 4:129-145." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 112, + 290, + 222 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 112, + 290, + 222 + ], + "spans": [ + { + "bbox": [ + 69, + 112, + 290, + 222 + ], + "type": "text", + "content": "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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 230, + 290, + 296 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 230, + 290, + 296 + ], + "spans": [ + { + "bbox": [ + 69, + 230, + 290, + 296 + ], + "type": "text", + "content": "Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. 2018. Measuring and mitigating unintended bias in text classification. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, AIES '18, page 67-73, New York, NY, USA. Association for Computing Machinery." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 303, + 290, + 402 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 303, + 290, + 402 + ], + "spans": [ + { + "bbox": [ + 69, + 303, + 290, + 402 + ], + "type": "text", + "content": "Carsten F. Dormann, Jane Elith, Sven Bacher, Carsten Buchmann, Gudrun Carl, Gabriel Carré, Jaime R. García Marquez, Bernd Gruber, Bruno Lafourcade, Pedro J. Leitão, Tamara Munkemüller, Colin McClean, Patrick E. Osborne, Björn Reineking, Boris Schröder, Andrew K. Skidmore, Damaris Zurell, and Sven Lautenbach. 2013. Collinearity: a review of methods to deal with it and a simulation study evaluating their performance. Ecography, 36(1):27-46." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 409, + 290, + 454 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 409, + 290, + 454 + ], + "spans": [ + { + "bbox": [ + 69, + 409, + 290, + 454 + ], + "type": "text", + "content": "Huifang Du, Zhongwen Le, Haofen Wang, Yunwen Chen, and Jing Yu. 2022a. COKG-QA: multi-hop question answering over COVID-19 knowledge graphs. Data Intell., 4(3):471-492." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 460, + 290, + 549 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 460, + 290, + 549 + ], + "spans": [ + { + "bbox": [ + 69, + 460, + 290, + 549 + ], + "type": "text", + "content": "Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. 2022b. GLM: general language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 320-335. Association for Computational Linguistics." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 555, + 290, + 665 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 555, + 290, + 665 + ], + "spans": [ + { + "bbox": [ + 69, + 555, + 290, + 665 + ], + "type": "text", + "content": "Markus Eberts and Adrian Ulges. 2020. Span-based joint entity and relation extraction with transformer pre-training. In ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, Santiago de Compostela, Spain, August 29 - September 8, 2020 - Including 10th Conference on Prestigious Applications of Artificial Intelligence (PAIS 2020), volume 325 of Frontiers in Artificial Intelligence and Applications, pages 2006-2013. IOS Press." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 673, + 290, + 771 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 673, + 290, + 771 + ], + "spans": [ + { + "bbox": [ + 69, + 673, + 290, + 771 + ], + "type": "text", + "content": "Jiannan Guo, Yangyang Kang, Yu Duan, Xiaozhong Liu, Siliang Tang, Wenqiao Zhang, Kun Kuang, Changlong Sun, and Fei Wu. 2022. Collaborative intelligence orchestration: Inconsistency-based fusion of semi-supervised learning and active learning. In KDD '22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 - 18, 2022, pages 2935-2945. ACM." + } + ] + } + ], + "index": 7 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 524, + 772 + ], + "type": "list", + "angle": 0, + "index": 18, + "blocks": [ + { + "bbox": [ + 304, + 72, + 524, + 127 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 524, + 127 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 524, + 127 + ], + "type": "text", + "content": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9726-9735." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 304, + 137, + 524, + 192 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 137, + 524, + 192 + ], + "spans": [ + { + "bbox": [ + 304, + 137, + 524, + 192 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 203, + 524, + 280 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 203, + 524, + 280 + ], + "spans": [ + { + "bbox": [ + 304, + 203, + 524, + 280 + ], + "type": "text", + "content": "Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020. ALBERT: A lite BERT for self-supervised learning of language representations. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 290, + 524, + 356 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 290, + 524, + 356 + ], + "spans": [ + { + "bbox": [ + 304, + 290, + 524, + 356 + ], + "type": "text", + "content": "Ying Lin, Heng Ji, Fei Huang, and Lingfei Wu. 2020. A joint neural model for information extraction with global features. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7999-8009, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 367, + 524, + 433 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 367, + 524, + 433 + ], + "spans": [ + { + "bbox": [ + 304, + 367, + 524, + 433 + ], + "type": "text", + "content": "Zihan Lin, Changxin Tian, Yupeng Hou, and Wayne Xin Zhao. 2022. Improving graph collaborative filtering with neighborhood-enriched contrastive learning. In WWW '22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 - 29, 2022, pages 2320-2329. ACM." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 443, + 524, + 532 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 443, + 524, + 532 + ], + "spans": [ + { + "bbox": [ + 304, + 443, + 524, + 532 + ], + "type": "text", + "content": "Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. 2018. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 3219-3232. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 542, + 524, + 641 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 542, + 524, + 641 + ], + "spans": [ + { + "bbox": [ + 304, + 542, + 524, + 641 + ], + "type": "text", + "content": "Yi Luan, Dave Wadden, Luheng He, Amy Shah, Mari Ostendorf, and Hannaneh Hajishirzi. 2019. A general framework for information extraction using dynamic span graphs. 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 3036-3046, Minneapolis, Minnesota. Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 651, + 524, + 729 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 651, + 524, + 729 + ], + "spans": [ + { + "bbox": [ + 304, + 651, + 524, + 729 + ], + "type": "text", + "content": "Makoto Miwa and Mohit Bansal. 2016. End-to-end relation extraction using lstms on sequences and tree structures. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 739, + 524, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 739, + 524, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 739, + 524, + 772 + ], + "type": "text", + "content": "Subhabrata Mukherjee and Ahmed Hassan Awadallah. 2020. Uncertainty-aware self-training for text classification with few labels. CoRR, abs/2006.15315." + } + ] + } + ], + "index": 17 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2636" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 9 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 771 + ], + "type": "list", + "angle": 0, + "index": 9, + "blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 160 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 291, + 160 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 291, + 160 + ], + "type": "text", + "content": "Guoshun Nan, Jiaqi Zeng, Rui Qiao, Zhijiang Guo, and Wei Lu. 2021. Uncovering main causalities for long-tailed information extraction. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 9683-9695. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 168, + 291, + 190 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 168, + 291, + 190 + ], + "spans": [ + { + "bbox": [ + 69, + 168, + 291, + 190 + ], + "type": "text", + "content": "Judea Pearl. 1995. Causal diagrams for empirical research. Biometrika, 82(4):669-688." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 197, + 290, + 231 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 197, + 290, + 231 + ], + "spans": [ + { + "bbox": [ + 69, + 197, + 290, + 231 + ], + "type": "text", + "content": "Judea Pearl, Madelyn Glymour, and Nicholas P Jewell. 2016. Causal inference in statistics: A primer. John Wiley & Sons." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 238, + 290, + 304 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 238, + 290, + 304 + ], + "spans": [ + { + "bbox": [ + 69, + 238, + 290, + 304 + ], + "type": "text", + "content": "Lev-Arie Ratinov and Dan Roth. 2009. Design challenges and misconceptions in named entity recognition. In Proceedings of the Thirteenth Conference on Computational Natural Language Learning, CoNLL 2009, Boulder, Colorado, USA, June 4-5, 2009, pages 147-155. ACL." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 312, + 290, + 366 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 312, + 290, + 366 + ], + "spans": [ + { + "bbox": [ + 69, + 312, + 290, + 366 + ], + "type": "text", + "content": "Farshid Rayhan, Sajid Ahmed, Asif Mahbub, Md. Rafsan Jani, Swakkhar Shatabda, and Dewan Md. Farid. 2017. Cusboost: Cluster-based under-sampling with boosting for imbalanced classification. CoRR, abs/1712.04356." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 375, + 291, + 486 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 375, + 291, + 486 + ], + "spans": [ + { + "bbox": [ + 69, + 375, + 291, + 486 + ], + "type": "text", + "content": "Santosh Tokala Yaswanth Sri Sai, Prantika Chakraborty, Sudakshina Dutta, Debarshi Kumar Sanyal, and Partha Pratim Das. 2021. Joint entity and relation extraction from scientific documents: Role of linguistic information and entity types. In Proceedings of the 2nd Workshop on Extraction and Evaluation of Knowledge Entities from Scientific Documents (EEKE 2021) co-located with JCDL 2021, Virtual Event, September 30th, 2021, volume 3004 of CEUR Workshop Proceedings, pages 15-19. CEUR-WS.org." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 492, + 291, + 592 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 492, + 291, + 592 + ], + "spans": [ + { + "bbox": [ + 69, + 492, + 291, + 592 + ], + "type": "text", + "content": "Yuming Shang, Heyan Huang, and Xianling Mao. 2022. Onerel: Joint entity and relation extraction with one module in one step. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11285-11293. AAAI Press." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 599, + 291, + 666 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 599, + 291, + 666 + ], + "spans": [ + { + "bbox": [ + 69, + 599, + 291, + 666 + ], + "type": "text", + "content": "Zheyan Shen, Peng Cui, Kun Kuang, Bo Li, and Peixuan Chen. 2018. Causally regularized learning with agnostic data selection bias. In 2018 ACM Multimedia Conference on Multimedia Conference, MM 2018, Seoul, Republic of Korea, October 22-26, 2018, pages 411-419. ACM." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 673, + 291, + 771 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 673, + 291, + 771 + ], + "spans": [ + { + "bbox": [ + 69, + 673, + 291, + 771 + ], + "type": "text", + "content": "Zheyan Shen, Peng Cui, Tong Zhang, and Kun Kuang. 2020. Stable learning via sample reweighting. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 5692-5699. AAAI Press." + } + ] + } + ], + "index": 8 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 637 + ], + "type": "list", + "angle": 0, + "index": 16, + "blocks": [ + { + "bbox": [ + 304, + 72, + 526, + 171 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 526, + 171 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 526, + 171 + ], + "type": "text", + "content": "David Wadden, Ulme Wennberg, Yi Luan, and Hannaneh Hajishirzi. 2019. Entity, relation, and event extraction with contextualized span representations. 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 5784-5789, Hong Kong, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 179, + 526, + 267 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 179, + 526, + 267 + ], + "spans": [ + { + "bbox": [ + 304, + 179, + 526, + 267 + ], + "type": "text", + "content": "Yijun Wang, Changzhi Sun, Yuanbin Wu, Hao Zhou, Lei Li, and Junchi Yan. 2021. UniRE: A unified label space for entity relation extraction. 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 220-231, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 274, + 526, + 395 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 274, + 526, + 395 + ], + "spans": [ + { + "bbox": [ + 304, + 274, + 526, + 395 + ], + "type": "text", + "content": "Yiwei Wang, Muhao Chen, Wenxuan Zhou, Yujun Cai, Yuxuan Liang, Dayiheng Liu, Baosong Yang, Juncheng Liu, and Bryan Hooi. 2022. Should we rely on entity mentions for relation extraction? debiasing relation extraction with counterfactual analysis. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL 2022, Seattle, WA, United States, July 10-15, 2022, pages 3071-3081. Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 401, + 526, + 480 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 401, + 526, + 480 + ], + "spans": [ + { + "bbox": [ + 304, + 401, + 526, + 480 + ], + "type": "text", + "content": "Deming Ye, Yankai Lin, Peng Li, and Maosong Sun. 2022. Packed levitated marker for entity and relation extraction. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2022, Dublin, Ireland, May 22-27, 2022, pages 4904-4917. Association for Computational Linguistics." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 486, + 526, + 552 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 486, + 526, + 552 + ], + "spans": [ + { + "bbox": [ + 304, + 486, + 526, + 552 + ], + "type": "text", + "content": "Xingxuan Zhang, Peng Cui, Renzhe Xu, Linjun Zhou, Yue He, and Zheyan Shen. 2021. Deep stable learning for out-of-distribution generalization. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, virtual, June 19-25, 2021, pages 5372-5382. Computer Vision Foundation / IEEE." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 560, + 526, + 637 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 560, + 526, + 637 + ], + "spans": [ + { + "bbox": [ + 304, + 560, + 526, + 637 + ], + "type": "text", + "content": "Zexuan Zhong and Danqi Chen. 2021. A frustratingly easy approach for entity and relation extraction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 50-61. Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 645, + 399, + 658 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 645, + 399, + 658 + ], + "spans": [ + { + "bbox": [ + 304, + 645, + 399, + 658 + ], + "type": "text", + "content": "A Causal Graph" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "text", + "content": "From Fig. 2, " + }, + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "inline_equation", + "content": "L \\to F" + }, + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "text", + "content": " denotes that real labels in datasets have an effect on the feature vectors learned by model training, and " + }, + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "inline_equation", + "content": "L \\to P" + }, + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "text", + "content": " denotes that real labels have an effect on model predictions because the loss in training is calculated by labels and predictions. So the backdoor path " + }, + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "inline_equation", + "content": "F \\gets L \\to P" + }, + { + "bbox": [ + 304, + 665, + 526, + 772 + ], + "type": "text", + "content": " makes models give relatively high scores to the labels with numerous samples." + } + ] + } + ], + "index": 18 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2637" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 10 + }, + { + "para_blocks": [ + { + "bbox": [ + 68, + 70, + 253, + 99 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 70, + 253, + 99 + ], + "spans": [ + { + "bbox": [ + 68, + 70, + 253, + 99 + ], + "type": "text", + "content": "B Derivation Process of Backdoor Adjustment" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 105, + 289, + 146 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 105, + 289, + 146 + ], + "spans": [ + { + "bbox": [ + 67, + 105, + 289, + 146 + ], + "type": "text", + "content": "In this section, we will give an explanation for each step of backdoor adjustment. To make it easier to understand, we draw a new equation as follows:" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 74, + 168, + 289, + 305 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 74, + 168, + 289, + 305 + ], + "spans": [ + { + "bbox": [ + 74, + 168, + 289, + 305 + ], + "type": "interline_equation", + "content": "\\begin{array}{l} p (P | d o (F)) \\stackrel {(1)} {=} \\sum_ {L} p (P | d o (F), \\underline {{L}}) p (\\underline {{L}} | d o (F)) \\\\ \\stackrel {(2)} {=} \\sum_ {L} p (P | d o (F), L) P (L | \\underline {{F}}) \\\\ \\stackrel {(3)} {=} \\sum_ {L} p (P | \\underline {{F}}, L) p (L | F) \\\\ \\stackrel {(4)} {=} \\sum_ {L} p (P | F, L) \\underline {{p (L)}} \\tag {13} \\\\ \\end{array}", + "image_path": "7bed2f651a22e619c1d3fd826e2743810ad07b30328c574bad81e825fee978eb.jpg" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "spans": [ + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "text", + "content": "Where the meaning of " + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "inline_equation", + "content": "P" + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "text", + "content": ", " + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "text", + "content": ", and " + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "text", + "content": " are the same as Fig. 2; " + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "inline_equation", + "content": "do(\\cdot)" + }, + { + "bbox": [ + 67, + 306, + 290, + 348 + ], + "type": "text", + "content": " means do-operator. The underline means the main differences from the previous step." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 71, + 355, + 290, + 599 + ], + "type": "list", + "angle": 0, + "index": 8, + "blocks": [ + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "spans": [ + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "text", + "content": "(1) using the total probability theorem where " + }, + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "inline_equation", + "content": "do(F)" + }, + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "text", + "content": " can be seen as a normal random variables event like " + }, + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "inline_equation", + "content": "P" + }, + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 71, + 355, + 290, + 395 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "spans": [ + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "text", + "content": "(2) from the causal graph in Fig. 2, the path " + }, + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "inline_equation", + "content": "L \\to F" + }, + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "text", + "content": " is a direct causal path without backdoor paths, so " + }, + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "inline_equation", + "content": "p(L|do(F))" + }, + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "inline_equation", + "content": "p(L|F)" + }, + { + "bbox": [ + 72, + 405, + 290, + 459 + ], + "type": "text", + "content": " are equivalent." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "spans": [ + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "text", + "content": "(3) because of conditioning on " + }, + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "text", + "content": ", the association in the path " + }, + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "inline_equation", + "content": "F \\leftarrow L \\rightarrow P" + }, + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "text", + "content": " is blocked. So in this case, the association in the path " + }, + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "inline_equation", + "content": "F \\rightarrow P" + }, + { + "bbox": [ + 72, + 468, + 290, + 535 + ], + "type": "text", + "content": " is causality which can remove the do-operator without any influence." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "spans": [ + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": "(4) due to the direction of the causal path between " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": " being " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "F \\gets L" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": ", there is no association from " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": " which causes the " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": " to be independent with " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "F" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": " meaning " + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "inline_equation", + "content": "p(L|F) = p(L)" + }, + { + "bbox": [ + 72, + 544, + 290, + 599 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 7 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 68, + 608, + 229, + 623 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 608, + 229, + 623 + ], + "spans": [ + { + "bbox": [ + 68, + 608, + 229, + 623 + ], + "type": "text", + "content": "C Overall Algorithm of OVO" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 629, + 290, + 643 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 629, + 290, + 643 + ], + "spans": [ + { + "bbox": [ + 67, + 629, + 290, + 643 + ], + "type": "text", + "content": "The algorithm of OVO is shown in the algorithm. 1." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 68, + 652, + 177, + 666 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 652, + 177, + 666 + ], + "spans": [ + { + "bbox": [ + 68, + 652, + 177, + 666 + ], + "type": "text", + "content": "D Analysis of COP" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 68, + 674, + 201, + 687 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 674, + 201, + 687 + ], + "spans": [ + { + "bbox": [ + 68, + 674, + 201, + 687 + ], + "type": "text", + "content": "D.1 Saving Batch Number" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": "When the dataset is large enough, it is hard to put all feature vectors into COP and optimize them at once. So, by using eq. 6, we can use part of the vectors to relieve the pressure on computing resources. To research the effect of COP when just using partial vectors, we conduct comparative experiments with" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 70, + 521, + 84 + ], + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 70, + 521, + 84 + ], + "spans": [ + { + "bbox": [ + 304, + 70, + 521, + 84 + ], + "type": "text", + "content": "Algorithm 1 The training procedure of the OVO" + } + ] + } + ], + "index": 14, + "type": "text" + }, + { + "bbox": [ + 303, + 87, + 525, + 356 + ], + "type": "list", + "angle": 0, + "index": 39, + "blocks": [ + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "spans": [ + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "text", + "content": "Input: Initial pre-trained BERT encoder " + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "inline_equation", + "content": "\\mathbf{BE}^{(0)}" + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "text", + "content": " and classifier " + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "inline_equation", + "content": "\\mathbf{C}^{(0)}" + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "text", + "content": ", training dataset " + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "inline_equation", + "content": "\\mathcal{D}" + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "text", + "content": ", training epochs for model training " + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "inline_equation", + "content": "T_{mt}" + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "text", + "content": ", training epochs for COP " + }, + { + "bbox": [ + 303, + 87, + 525, + 121 + ], + "type": "inline_equation", + "content": "T_{cop}" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 121, + 470, + 132 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 121, + 470, + 132 + ], + "spans": [ + { + "bbox": [ + 304, + 121, + 470, + 132 + ], + "type": "text", + "content": "Output: Trained model " + }, + { + "bbox": [ + 304, + 121, + 470, + 132 + ], + "type": "inline_equation", + "content": "(\\mathbf{BE}^{(T_{mt})},\\mathbf{C}^{(T_{mt})})" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 307, + 132, + 415, + 142 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 132, + 415, + 142 + ], + "spans": [ + { + "bbox": [ + 307, + 132, + 415, + 142 + ], + "type": "text", + "content": "1: for " + }, + { + "bbox": [ + 307, + 132, + 415, + 142 + ], + "type": "inline_equation", + "content": "t_{mt} = 0" + }, + { + "bbox": [ + 307, + 132, + 415, + 142 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 307, + 132, + 415, + 142 + ], + "type": "inline_equation", + "content": "T_{mt}" + }, + { + "bbox": [ + 307, + 132, + 415, + 142 + ], + "type": "text", + "content": " do" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 308, + 142, + 491, + 152 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 142, + 491, + 152 + ], + "spans": [ + { + "bbox": [ + 308, + 142, + 491, + 152 + ], + "type": "text", + "content": "2: " + }, + { + "bbox": [ + 308, + 142, + 491, + 152 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_{\\mathrm{pre}} \\gets" + }, + { + "bbox": [ + 308, + 142, + 491, + 152 + ], + "type": "text", + "content": " Clear the previous feature vectors;" + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 308, + 152, + 470, + 163 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 152, + 470, + 163 + ], + "spans": [ + { + "bbox": [ + 308, + 152, + 470, + 163 + ], + "type": "text", + "content": "3: " + }, + { + "bbox": [ + 308, + 152, + 470, + 163 + ], + "type": "inline_equation", + "content": "\\bar{\\mathbf{W}}_{\\mathrm{pre}}\\gets" + }, + { + "bbox": [ + 308, + 152, + 470, + 163 + ], + "type": "text", + "content": " Clear the previous weights;" + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 308, + 163, + 443, + 172 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 163, + 443, + 172 + ], + "spans": [ + { + "bbox": [ + 308, + 163, + 443, + 172 + ], + "type": "text", + "content": "4: for (Sents, Spans) in " + }, + { + "bbox": [ + 308, + 163, + 443, + 172 + ], + "type": "inline_equation", + "content": "\\mathcal{D}" + }, + { + "bbox": [ + 308, + 163, + 443, + 172 + ], + "type": "text", + "content": " do" + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 308, + 173, + 429, + 184 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 173, + 429, + 184 + ], + "spans": [ + { + "bbox": [ + 308, + 173, + 429, + 184 + ], + "type": "text", + "content": "5: " + }, + { + "bbox": [ + 308, + 173, + 429, + 184 + ], + "type": "inline_equation", + "content": "\\mathbf{H} = \\mathbf{B}\\mathbf{E}^{(t_{mt})}(Sents)" + } + ] + } + ], + "index": 21 + }, + { + "bbox": [ + 308, + 184, + 465, + 194 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 184, + 465, + 194 + ], + "spans": [ + { + "bbox": [ + 308, + 184, + 465, + 194 + ], + "type": "text", + "content": "6: " + }, + { + "bbox": [ + 308, + 184, + 465, + 194 + ], + "type": "inline_equation", + "content": "\\mathbf{F}_{\\mathrm{cur}} = \\text{GetSpanFeatures}(\\mathbf{H})" + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 308, + 195, + 420, + 205 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 195, + 420, + 205 + ], + "spans": [ + { + "bbox": [ + 308, + 195, + 420, + 205 + ], + "type": "text", + "content": "7: " + }, + { + "bbox": [ + 308, + 195, + 420, + 205 + ], + "type": "inline_equation", + "content": "\\mathbf{P} = \\mathbf{C}^{(t_{mt})}(\\mathbf{F}_{\\mathbf{cur}})" + } + ] + } + ], + "index": 23 + }, + { + "bbox": [ + 308, + 206, + 406, + 215 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 308, + 206, + 406, + 215 + ], + "spans": [ + { + "bbox": [ + 308, + 206, + 406, + 215 + ], + "type": "text", + "content": "8: " + }, + { + "bbox": [ + 308, + 206, + 406, + 215 + ], + "type": "inline_equation", + "content": "\\mathbf{W}_{\\mathrm{cur}} \\gets \\mathrm{Initial}" + } + ] + } + ], + "index": 24 + }, + { + "bbox": [ + 307, + 215, + 442, + 225 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 215, + 442, + 225 + ], + "spans": [ + { + "bbox": [ + 307, + 215, + 442, + 225 + ], + "type": "text", + "content": "9: " + }, + { + "bbox": [ + 307, + 215, + 442, + 225 + ], + "type": "inline_equation", + "content": "\\mathbf{F} = \\text{concat}(\\mathbf{F}_{\\text{pre}}, \\mathbf{F}_{\\text{cur}})" + } + ] + } + ], + "index": 25 + }, + { + "bbox": [ + 307, + 225, + 455, + 235 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 225, + 455, + 235 + ], + "spans": [ + { + "bbox": [ + 307, + 225, + 455, + 235 + ], + "type": "text", + "content": "10: " + }, + { + "bbox": [ + 307, + 225, + 455, + 235 + ], + "type": "inline_equation", + "content": "\\mathbf{W} = \\text{concat}(\\mathbf{W}_{\\text{pre}}, \\mathbf{W}_{\\text{cur}})" + } + ] + } + ], + "index": 26 + }, + { + "bbox": [ + 307, + 235, + 447, + 244 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 235, + 447, + 244 + ], + "spans": [ + { + "bbox": [ + 307, + 235, + 447, + 244 + ], + "type": "text", + "content": "11: for " + }, + { + "bbox": [ + 307, + 235, + 447, + 244 + ], + "type": "inline_equation", + "content": "t_{cop} = 0" + }, + { + "bbox": [ + 307, + 235, + 447, + 244 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 307, + 235, + 447, + 244 + ], + "type": "inline_equation", + "content": "T_{cop}" + }, + { + "bbox": [ + 307, + 235, + 447, + 244 + ], + "type": "text", + "content": " do" + } + ] + } + ], + "index": 27 + }, + { + "bbox": [ + 307, + 244, + 478, + 256 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 244, + 478, + 256 + ], + "spans": [ + { + "bbox": [ + 307, + 244, + 478, + 256 + ], + "type": "text", + "content": "12: " + }, + { + "bbox": [ + 307, + 244, + 478, + 256 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{W}} = \\sum_{i\\neq j}cov(\\mathbf{WF}_i,\\mathbf{WF}_j)" + } + ] + } + ], + "index": 28 + }, + { + "bbox": [ + 307, + 256, + 447, + 267 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 256, + 447, + 267 + ], + "spans": [ + { + "bbox": [ + 307, + 256, + 447, + 267 + ], + "type": "text", + "content": "13: " + }, + { + "bbox": [ + 307, + 256, + 447, + 267 + ], + "type": "inline_equation", + "content": "\\mathbf{W}_{\\mathrm{cur}}\\gets \\text{Optim} (\\mathcal{L}_{\\mathcal{W}})" + } + ] + } + ], + "index": 29 + }, + { + "bbox": [ + 307, + 267, + 377, + 276 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 267, + 377, + 276 + ], + "spans": [ + { + "bbox": [ + 307, + 267, + 377, + 276 + ], + "type": "text", + "content": "14: end for" + } + ] + } + ], + "index": 30 + }, + { + "bbox": [ + 307, + 276, + 472, + 286 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 276, + 472, + 286 + ], + "spans": [ + { + "bbox": [ + 307, + 276, + 472, + 286 + ], + "type": "text", + "content": "15: " + }, + { + "bbox": [ + 307, + 276, + 472, + 286 + ], + "type": "inline_equation", + "content": "(\\mathbf{F}_{\\mathrm{pre}},\\mathbf{W}_{\\mathrm{pre}})\\gets" + }, + { + "bbox": [ + 307, + 276, + 472, + 286 + ], + "type": "text", + "content": " update and fuse" + } + ] + } + ], + "index": 31 + }, + { + "bbox": [ + 307, + 286, + 484, + 296 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 286, + 484, + 296 + ], + "spans": [ + { + "bbox": [ + 307, + 286, + 484, + 296 + ], + "type": "text", + "content": "16: " + }, + { + "bbox": [ + 307, + 286, + 484, + 296 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{orig} = CrossEntropy(\\mathbf{P},\\mathsf{Spans})" + } + ] + } + ], + "index": 32 + }, + { + "bbox": [ + 307, + 296, + 428, + 306 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 296, + 428, + 306 + ], + "spans": [ + { + "bbox": [ + 307, + 296, + 428, + 306 + ], + "type": "text", + "content": "17: " + }, + { + "bbox": [ + 307, + 296, + 428, + 306 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{COP} = \\mathbf{W}_{\\mathbf{cur}}\\mathcal{L}_{orig}" + } + ] + } + ], + "index": 33 + }, + { + "bbox": [ + 307, + 306, + 477, + 318 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 306, + 477, + 318 + ], + "spans": [ + { + "bbox": [ + 307, + 306, + 477, + 318 + ], + "type": "text", + "content": "18: " + }, + { + "bbox": [ + 307, + 306, + 477, + 318 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{VOP} = \\sum_{l=0}^{L} \\sum_{n=0}^{N} var(\\mathbf{F}_{(l,n)})" + } + ] + } + ], + "index": 34 + }, + { + "bbox": [ + 307, + 318, + 426, + 327 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 318, + 426, + 327 + ], + "spans": [ + { + "bbox": [ + 307, + 318, + 426, + 327 + ], + "type": "text", + "content": "19: " + }, + { + "bbox": [ + 307, + 318, + 426, + 327 + ], + "type": "inline_equation", + "content": "\\mathcal{L} = \\mathcal{L}_{COP} + \\mathcal{L}_{VOP}" + } + ] + } + ], + "index": 35 + }, + { + "bbox": [ + 307, + 327, + 481, + 338 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 327, + 481, + 338 + ], + "spans": [ + { + "bbox": [ + 307, + 327, + 481, + 338 + ], + "type": "text", + "content": "20: " + }, + { + "bbox": [ + 307, + 327, + 481, + 338 + ], + "type": "inline_equation", + "content": "(\\mathbf{BE}^{\\mathbf{t}_{\\mathrm{mt}} + 1},\\mathbf{C}^{\\mathbf{t}_{\\mathrm{mt}} + 1})\\gets Optim(\\mathcal{L})" + } + ] + } + ], + "index": 36 + }, + { + "bbox": [ + 307, + 338, + 362, + 347 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 338, + 362, + 347 + ], + "spans": [ + { + "bbox": [ + 307, + 338, + 362, + 347 + ], + "type": "text", + "content": "21: end for" + } + ] + } + ], + "index": 37 + }, + { + "bbox": [ + 307, + 347, + 349, + 356 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 307, + 347, + 349, + 356 + ], + "spans": [ + { + "bbox": [ + 307, + 347, + 349, + 356 + ], + "type": "text", + "content": "22: end for" + } + ] + } + ], + "index": 38 + } + ], + "sub_type": "text" + }, + { + "type": "image", + "bbox": [ + 309, + 391, + 495, + 545 + ], + "blocks": [ + { + "bbox": [ + 309, + 391, + 495, + 545 + ], + "lines": [ + { + "bbox": [ + 309, + 391, + 495, + 545 + ], + "spans": [ + { + "bbox": [ + 309, + 391, + 495, + 545 + ], + "type": "image", + "image_path": "0880b096dc1f784a78821d8e6c1cadf7828c280fe08cca31c0b5c153f52cf51a.jpg" + } + ] + } + ], + "index": 40, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 554, + 525, + 636 + ], + "lines": [ + { + "bbox": [ + 302, + 554, + 525, + 636 + ], + "spans": [ + { + "bbox": [ + 302, + 554, + 525, + 636 + ], + "type": "text", + "content": "Figure 5: The impact of different Saving Batch Numbers on the performance of COP is evaluated using the SciERC test set. The inf notation denotes the scenario where all feature vectors are used for COP without any deletions. Relation F1 means evaluating with gold entities in " + }, + { + "bbox": [ + 302, + 554, + 525, + 636 + ], + "type": "inline_equation", + "content": "\\mathbf{Rel}+" + }, + { + "bbox": [ + 302, + 554, + 525, + 636 + ], + "type": "text", + "content": "; for eq. 8, " + }, + { + "bbox": [ + 302, + 554, + 525, + 636 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 302, + 554, + 525, + 636 + ], + "type": "text", + "content": " is equal to 0.9 in the experiments." + } + ] + } + ], + "index": 41, + "angle": 0, + "type": "image_caption" + } + ], + "index": 40 + }, + { + "bbox": [ + 302, + 665, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 665, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 665, + 525, + 772 + ], + "type": "text", + "content": "different saving batch numbers on PL-Marker (Ye et al., 2022). As shown in Fig. 5, as the saving batch number rises, the overall trend of F1 also rises and reaches the best performance at inf (around " + }, + { + "bbox": [ + 302, + 665, + 525, + 772 + ], + "type": "inline_equation", + "content": "2^{10}" + }, + { + "bbox": [ + 302, + 665, + 525, + 772 + ], + "type": "text", + "content": " in our training setting). It can be concluded that using more vectors for COP can reduce spurious correlation better and gain more improvement, but require more computing resources." + } + ] + } + ], + "index": 42 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2638" + } + ] + } + ], + "index": 43 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 11 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 90, + 84, + 253, + 221 + ], + "blocks": [ + { + "bbox": [ + 90, + 84, + 253, + 221 + ], + "lines": [ + { + "bbox": [ + 90, + 84, + 253, + 221 + ], + "spans": [ + { + "bbox": [ + 90, + 84, + 253, + 221 + ], + "type": "image", + "image_path": "9c6483d57643d2928307c066f7c2cc8496180703c61b1a70c070d6d463768bfb.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + } + ], + "index": 0 + }, + { + "type": "image", + "bbox": [ + 90, + 248, + 253, + 386 + ], + "blocks": [ + { + "bbox": [ + 90, + 248, + 253, + 386 + ], + "lines": [ + { + "bbox": [ + 90, + 248, + 253, + 386 + ], + "spans": [ + { + "bbox": [ + 90, + 248, + 253, + 386 + ], + "type": "image", + "image_path": "bba0b3d2524b4df02002e1df066c4710161c9d9d57b4d0a3a10aab42394ef88d.jpg" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_body" + } + ], + "index": 1 + }, + { + "type": "image", + "bbox": [ + 91, + 409, + 253, + 547 + ], + "blocks": [ + { + "bbox": [ + 91, + 409, + 253, + 547 + ], + "lines": [ + { + "bbox": [ + 91, + 409, + 253, + 547 + ], + "spans": [ + { + "bbox": [ + 91, + 409, + 253, + 547 + ], + "type": "image", + "image_path": "168b3c6b5aa40fc72b8600222de72c0324f29942af66c2e96fd4a9d75bc9c3a1.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 100, + 561, + 257, + 575 + ], + "lines": [ + { + "bbox": [ + 100, + 561, + 257, + 575 + ], + "spans": [ + { + "bbox": [ + 100, + 561, + 257, + 575 + ], + "type": "text", + "content": "Figure 6: Effect of different " + }, + { + "bbox": [ + 100, + 561, + 257, + 575 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 100, + 561, + 257, + 575 + ], + "type": "text", + "content": " of COP." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "type": "image", + "bbox": [ + 312, + 84, + 498, + 238 + ], + "blocks": [ + { + "bbox": [ + 312, + 84, + 498, + 238 + ], + "lines": [ + { + "bbox": [ + 312, + 84, + 498, + 238 + ], + "spans": [ + { + "bbox": [ + 312, + 84, + 498, + 238 + ], + "type": "image", + "image_path": "9c86c461c6b5463d8b6c9166246a843e9cb529cde320493546f6d8a3ca05b28a.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 251, + 524, + 275 + ], + "lines": [ + { + "bbox": [ + 302, + 251, + 524, + 275 + ], + "spans": [ + { + "bbox": [ + 302, + 251, + 524, + 275 + ], + "type": "text", + "content": "Figure 7: Effect of the different weights of VOP. F1 is Rel on datasets." + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "image_caption" + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 296, + 525, + 338 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 296, + 525, + 338 + ], + "spans": [ + { + "bbox": [ + 302, + 296, + 525, + 338 + ], + "type": "text", + "content": "0.4 on ACE2005 and SciERC respectively. The detailed results for the COP rate are shown in Fig. 7 which only uses COP in experiments." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 303, + 347, + 411, + 360 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 347, + 411, + 360 + ], + "spans": [ + { + "bbox": [ + 303, + 347, + 411, + 360 + ], + "type": "text", + "content": "E Analysis of VOP" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 303, + 368, + 487, + 382 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 368, + 487, + 382 + ], + "spans": [ + { + "bbox": [ + 303, + 368, + 487, + 382 + ], + "type": "text", + "content": "E.1 Tradeoff on Variance Optimizing" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 386, + 525, + 453 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 386, + 525, + 453 + ], + "spans": [ + { + "bbox": [ + 302, + 386, + 525, + 453 + ], + "type": "text", + "content": "For better adaptation to different tasks, it is important to give " + }, + { + "bbox": [ + 302, + 386, + 525, + 453 + ], + "type": "inline_equation", + "content": "Loss_{VOP}" + }, + { + "bbox": [ + 302, + 386, + 525, + 453 + ], + "type": "text", + "content": " a weight, preventing it to influence the model training and hurt the performance. We compute the final loss with weighed " + }, + { + "bbox": [ + 302, + 386, + 525, + 453 + ], + "type": "inline_equation", + "content": "Loss_{VOP}" + }, + { + "bbox": [ + 302, + 386, + 525, + 453 + ], + "type": "text", + "content": " as follows:" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 321, + 465, + 525, + 480 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 321, + 465, + 525, + 480 + ], + "spans": [ + { + "bbox": [ + 321, + 465, + 525, + 480 + ], + "type": "interline_equation", + "content": "L o s s _ {f i n a l} = L o s s _ {C O P} + \\lambda L o s s _ {V O P} \\tag {14}", + "image_path": "aa92688edb00426394a61f22f2047a74caa319b437c8ccef8b7e11518b68e1fe.jpg" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "spans": [ + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "text", + "content": "Where " + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "inline_equation", + "content": "\\lambda" + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "text", + "content": " is a hyperparameter regarding the weight of " + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "inline_equation", + "content": "Loss_{VOP}" + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "text", + "content": ". From the results in Fig. 8, different datasets get the best performance in different weights of VOP which " + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "inline_equation", + "content": "\\lambda = 0.2" + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "text", + "content": " is the optimal value for ACE2005 and " + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "inline_equation", + "content": "\\lambda = 0.1" + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "text", + "content": " is that for SciERC, and the performance is particularly sensitive to the weight which changes drastically using different " + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "inline_equation", + "content": "\\lambda" + }, + { + "bbox": [ + 302, + 489, + 525, + 583 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 67, + 597, + 166, + 611 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 597, + 166, + 611 + ], + "spans": [ + { + "bbox": [ + 67, + 597, + 166, + 611 + ], + "type": "text", + "content": "D.2 Effect of alpha" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 67, + 618, + 291, + 698 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 618, + 291, + 698 + ], + "spans": [ + { + "bbox": [ + 67, + 618, + 291, + 698 + ], + "type": "text", + "content": "To explore the effect of fusing current information, we conduct experiments for fusing hyperparameter " + }, + { + "bbox": [ + 67, + 618, + 291, + 698 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 67, + 618, + 291, + 698 + ], + "type": "text", + "content": " of eq. 8. We fix the saving batch number to infinite and change the " + }, + { + "bbox": [ + 67, + 618, + 291, + 698 + ], + "type": "inline_equation", + "content": "\\alpha" + }, + { + "bbox": [ + 67, + 618, + 291, + 698 + ], + "type": "text", + "content": " in the same training configuration. Fig. 6 shows the detailed result of the experiments." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 67, + 713, + 142, + 724 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 713, + 142, + 724 + ], + "spans": [ + { + "bbox": [ + 67, + 713, + 142, + 724 + ], + "type": "text", + "content": "D.3 COP rate" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 67, + 733, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 733, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 733, + 290, + 772 + ], + "type": "text", + "content": "We use " + }, + { + "bbox": [ + 67, + 733, + 290, + 772 + ], + "type": "inline_equation", + "content": "r_{COP} = 1" + }, + { + "bbox": [ + 67, + 733, + 290, + 772 + ], + "type": "text", + "content": " in PURE (Zhong and Chen, 2021) and PL-Marker (Ye et al., 2022). For SpERT.PL, we set the COP rate equal to 0.1 and" + } + ] + } + ], + "index": 15 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2639" + } + ] + } + ], + "index": 16 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 12 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 89, + 259, + 252, + 393 + ], + "blocks": [ + { + "bbox": [ + 89, + 259, + 252, + 393 + ], + "lines": [ + { + "bbox": [ + 89, + 259, + 252, + 393 + ], + "spans": [ + { + "bbox": [ + 89, + 259, + 252, + 393 + ], + "type": "image", + "image_path": "f180894c4945ca12ae9f10f2c4d50615a1cb2f409da873bcba96a23cabeb5928.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + } + ], + "index": 0 + }, + { + "type": "image", + "bbox": [ + 91, + 421, + 252, + 555 + ], + "blocks": [ + { + "bbox": [ + 91, + 421, + 252, + 555 + ], + "lines": [ + { + "bbox": [ + 91, + 421, + 252, + 555 + ], + "spans": [ + { + "bbox": [ + 91, + 421, + 252, + 555 + ], + "type": "image", + "image_path": "cbd484128adee34b19e516fe6503bf3ec4be0bce35a2fde375737c33b65d4d35.jpg" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 68, + 571, + 289, + 595 + ], + "lines": [ + { + "bbox": [ + 68, + 571, + 289, + 595 + ], + "spans": [ + { + "bbox": [ + 68, + 571, + 289, + 595 + ], + "type": "text", + "content": "Figure 8: Effect of the different weights of VOP. F1 is Rel on datasets." + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_caption" + } + ], + "index": 1 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "2640" + } + ] + } + ], + "index": 3 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 13 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file diff --git a/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_content_list.json b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ec71fa2ca23a93c724ba54e8683874975c249402 --- /dev/null +++ b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_content_list.json @@ -0,0 +1,2061 @@ +[ + { + "type": "text", + "text": "Coarse-to-Fine Dual Encoders are Better Frame Identification Learners", + "text_level": 1, + "bbox": [ + 127, + 89, + 870, + 109 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Kaikai An $^{1,2*}$ , Ce Zheng $^{1*}$ , Bofei Gao $^{1}$ , Haozhe Zhao $^{1,2}$ , Baobao Chang $^{1\\dagger}$", + "bbox": [ + 194, + 123, + 813, + 142 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "$^{1}$ National Key Laboratory for Multimedia Information Processing, School of Computer Science, Peking University", + "bbox": [ + 228, + 143, + 774, + 174 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "$^{2}$ School of Software & Microelectronics, Peking University {ankaikai, zce1112zslx, gaobofei, hanszhao}@stu.pku.edu.cn chbb@pku.edu.cn", + "bbox": [ + 225, + 175, + 779, + 225 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 339, + 266 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Frame identification aims to find semantic frames associated with target words in a sentence. Recent researches measure the similarity or matching score between targets and candidate frames by modeling frame definitions. However, they either lack sufficient representation learning of the definitions or face challenges in efficiently selecting the most suitable frame from over 1000 candidate frames. Moreover, commonly used lexicon filtering $(lf)$ to obtain candidate frames for the target may ignore out-of-vocabulary targets and cause inadequate frame modeling. In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoders Architecture. With contrastive learning and dual encoders, COFFTEA efficiently and effectively models the alignment between frames and targets. By employing a coarse-to-fine curriculum learning procedure, COFFTEA gradually learns to differentiate frames with varying degrees of similarity. Experimental results demonstrate that COFFTEA outperforms previous models by 0.93 overall scores and $1.53\\mathrm{R@1}$ without $lf$ . Further analysis suggests that COFFTEA can better model the relationships between frame and frame, as well as target and target. The code for our approach is available at https://github.com/ pkunlp-icler/COFFTEA.", + "bbox": [ + 141, + 282, + 460, + 694 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 114, + 709, + 258, + 724 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Frame Identification (Gildea and Jurafsky, 2000; Baker et al., 2007) aims to identify a semantic frame for the given target word in a sentence. The frames defined in FrameNet (Baker et al., 1998) are associated with word meanings as encyclopedia knowledge (Fillmore et al., 1976), which represent different events, situations, relations and objects. Identifying frames can contribute to extracting frame semantic structures from a sentence, and", + "bbox": [ + 112, + 737, + 489, + 881 + ], + "page_idx": 0 + }, + { + "type": "image", + "img_path": "images/92df572773af8bfc12d5cbc6e1d4a11df81925b468116adf10b7d3c8f047c387.jpg", + "image_caption": [ + "Figure 1: An example of Frame Identification. The target word get in the sentence is associated with frame Board_vehicle. Lexicon filtering $(lf)$ considers frames that can be evoked by get.v as candidates." + ], + "image_footnote": [], + "bbox": [ + 510, + 249, + 870, + 388 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "frame semantic structures can be utilized in downstream tasks, e.g., Information Extraction (Si and Roberts, 2018), Machine Reading Comprehension (Guo et al., 2020).", + "bbox": [ + 507, + 495, + 882, + 558 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Previous researches in frame identification selects an appropriate frame for a target by modeling the similarity or matching score between the target and frames. Recent efforts are made to represent frames with definitions in FrameNet (Jiang and Riloff, 2021; Su et al., 2021; Tamburini, 2022; Zheng et al., 2023). However, limited by the large scale of frames, these methods either struggle to effectively model definitions due to the use of a frozen frame encoder or cannot efficiently select appropriate frames from all frames due to the use of a single encoder architecture.", + "bbox": [ + 507, + 562, + 882, + 753 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Fig. 1 illustrates an example of frame identification. For the target word \"get\" in the sentence, we need to select its corresponding frame from over a thousand frames in FrameNet (All): Board_vehicle (A Traveller boards a Vehicle). Previous frame identification methods (Peng et al., 2018; Jiang and Riloff, 2021) typically apply lexicon filtering $(lf)$ by selecting the frame from a set of candidate frames (Candidates) for the verb \"get\" (e.g., Arriving, Getting, Board_vehicle, etc.). If effec", + "bbox": [ + 507, + 758, + 884, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_footnote", + "text": "*Equal contribution", + "bbox": [ + 141, + 892, + 265, + 904 + ], + "page_idx": 0 + }, + { + "type": "page_footnote", + "text": "† Corresponding author", + "bbox": [ + 142, + 904, + 285, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_number", + "text": "13455", + "bbox": [ + 475, + 927, + 524, + 940 + ], + "page_idx": 0 + }, + { + "type": "footer", + "text": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 13455-13466 December 6-10, 2023 ©2023 Association for Computational Linguistics", + "bbox": [ + 208, + 945, + 786, + 972 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "tively improves the accuracy of frame identification. However, the manually defined lexicons is not possible to cover all the corresponding targets for frame, which hinders the extension of frame semantics to out-of-vocabulary target words.", + "bbox": [ + 112, + 84, + 487, + 164 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Furthermore, we observed that training $w / o$ $l f$ (without $l f$ ) poses challenges in distinguishing fine-grained differences among candidate frames. Conversely, training $w / l f$ (with $l f$ ) can lead to an increased distance between the gold frame and other candidates, making it difficult to distinguish the gold frame from irrelevant ones. Consequently, in this paper, our aim is to enhance our model's performance in both the $w / l f$ and $w / o$ $l f$ scenarios.", + "bbox": [ + 112, + 168, + 489, + 313 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoder Architecture. By employing a dual encoder structure, we can effectively store the representations of all frames during inference, enabling us to efficiently compute the similarity between the target and all frames. Furthermore, considering the constraints imposed by the number of frames, we incorporate contrastive objectives to enhance the trainability of the frame encoder, consequently improving our ability to model definitions more accurately. Additionally, employing a distinct frame or target encoder allows us to map certain frames and targets to a vector space and utilize distance measures to depict their relationship.", + "bbox": [ + 115, + 317, + 489, + 557 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "To address the trade-off between training $w / \\text{lf}$ and $w / o \\text{lf}$ , we propose a two-stage learning procedure, referred to as coarse-to-fine learning. In the first stage, we employ in-batch learning, using the gold frames of other instances within a batch as hard negative examples. This step helps the model learn to discern frames with distinct semantics. In the second stage, we adopt in-candidate learning, where we utilize other frames from the candidate set as negative samples. This enables the model to further refine its ability to recognize fine-grained semantic differences. With coarse-to-fine learning, COFFTEA achieves a comprehensive performance in both scenarios of $w / \\text{lf}$ and $w / o \\text{lf}$ .", + "bbox": [ + 112, + 561, + 489, + 787 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Experiments show that COFFTEA, compared to previous methods on two FrameNet datasets, achieves competitive accuracy $w / \\text{lf}$ and outperforms them by up to 1.53 points in R@1 w/o $\\text{lf}$ and 0.93 overall scores considering both settings. Ablations also verify the contributions of the dual encoder structure and the two-stage learning process. Further analyses suggest that both the target", + "bbox": [ + 112, + 790, + 489, + 919 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "encoder and frame encoder can effectively capture the target-target, and frame-frame relationships.", + "bbox": [ + 507, + 84, + 880, + 115 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Our contributions can be summarized as follow:", + "bbox": [ + 527, + 117, + 882, + 131 + ], + "page_idx": 1 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "1. We propose COFFTEA, a dual encoder architecture with coarse-to-fine contrastive objectives. COFFTEA can effectively model frame definitions with learnable frame encoders and efficiently select the corresponding frame from over 1,000 frames.", + "2. We conclude the trade-off between $w / lf$ and $w / olf$ , and emphasize the performance $w / olf$ in the evaluation of frame identification. With two-stage learning, COFFTEA achieves an overall score improvement of 0.93 on frame identification.", + "3. Further in-depth analysis demonstrates that our frame and target encoders can better model the alignment between frame and target, as well as the relationships between target and target, frame and frame." + ], + "bbox": [ + 522, + 139, + 884, + 430 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "2 Task Formulation", + "text_level": 1, + "bbox": [ + 509, + 442, + 697, + 457 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "For a sentence $S = w_{1},\\dots ,w_{n}$ with a target span $t = w_{t_s},\\dots ,w_{t_e}$ , frame identification is to select the most appropriate frame $f\\in \\mathcal{F}$ for $t$ , where $\\mathcal{F}$ denotes all frames in FrameNet.", + "bbox": [ + 507, + 467, + 882, + 529 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "As FrameNet (Baker et al., 2007) provides each frame with an associated set of lexical units (LUs), we can obtain the LU of target $t$ by utilizing its lemma and part-of-speech (POS) in the form lemmaPOS (e.g., get.v) and apply $l f$ to retrieve the lexicon filter candidate frames $\\mathcal{F}_t$ of $t$ . Then we focus on selecting $f \\in \\mathcal{F}_t$ .", + "bbox": [ + 507, + 531, + 882, + 643 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "3 Methodology", + "text_level": 1, + "bbox": [ + 507, + 653, + 658, + 671 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "To model the alignment between frames and targets efficiently and effectively, in this paper, we propose COFFTEA, a dual encoder architecture with two-stage contrastive objectives. We compare COFFTEA with other baselines modeling frame definitions (§ 3.1). Specifically, to achieve better represent learning of definitions, the frame encoder of COFFTEA is learnable during training. Moreover, in order to make COFFTEA gradually learn to differentiate frames with varying degrees of similarity. We introduce two-stage learning in §3.2.", + "bbox": [ + 507, + 678, + 884, + 857 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "3.1 Model Architecture", + "text_level": 1, + "bbox": [ + 507, + 866, + 710, + 881 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "In Fig. 2, we compare the dual-encoder architecture of COFFTEA with three categories of previous meth", + "bbox": [ + 507, + 887, + 882, + 917 + ], + "page_idx": 1 + }, + { + "type": "page_number", + "text": "13456", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Sentence: Can he just get on a plane and fly to Paris?", + "bbox": [ + 156, + 93, + 478, + 107 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Frame: Board(vehicle", + "bbox": [ + 571, + 93, + 712, + 107 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Definition: A Traveller boards a Vehicle that they intend to use as a means of transportation...", + "bbox": [ + 156, + 108, + 712, + 120 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/001b56124d98612f901ad857e6d8811a8662c93fca48185a8e7ba1a8091793a2.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 152, + 122, + 465, + 244 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/41540c344309c3af93018bc57f279603434635585203cc926e0598ba8ed7ca0f.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 522, + 122, + 838, + 244 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/20f969071e0a88fc47fa3202c4adecf9d94dcf5ff33fa37453b424359829d94d.jpg", + "image_caption": [ + "Figure 2: Comparison between COFFTEA and other baselines. (a) and (b) both fine-tune a Lookup Table containing embeddings of frames with corss entropy loss. (b) uses a frozen frame encoder to initialize the table. (c) employs a single fused encoder to measure the probability of sentence and definition matching. For efficiency purposes, COFFTEA (d) also adopts a dual-encoder structure and leverages contrastive loss to unfreeze the frame encoder." + ], + "image_footnote": [], + "bbox": [ + 152, + 252, + 457, + 381 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/86688f3128ae9d869256492197905631b8e02b32a712b9bbca6bef15c898893e.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 524, + 252, + 833, + 379 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "ods in frame identification: (a) no definition modeling (Hartmann et al., 2017; Zheng et al., 2022), (b) target encoder and frozen frame encoder (Su et al., 2021; Tamburini, 2022), and (c) single fused encoder (Jiang and Riloff, 2021). Limited by the number of frames in FrameNet, the dual encoder architecture with cross entropy loss (b) have to fix the parameters of the frame encoder while the single encoder architecture (c) have to train and infer under the $w /lf$ setting. Therefore, we still use two encoders to separately encode the sentence with targets and frame definition, and employ contrastive learning to make the frame encoder trainable.", + "bbox": [ + 112, + 476, + 487, + 684 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "We follow Su et al. (2021); Jiang and Riloff (2021); Tamburini (2022) to use PLMs (Devlin et al., 2019) as target encoder (§3.1.1) and frame encoder (§3.1.2).", + "bbox": [ + 112, + 686, + 487, + 750 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.1.1 Target Encoder", + "text_level": 1, + "bbox": [ + 112, + 764, + 297, + 778 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "The target encoder converts input sentence $S$ with $n$ tokens $w_{1},\\ldots ,w_{n}$ into contextualized representations $h_1,\\dots ,h_n$ . The contextualized representation $t$ of target span $w_{t_s},\\ldots ,w_{t_e}$ $(1\\leq t_{s}\\leq t_{e}\\leq n)$ is the maxpooling of $h_{t_s},\\ldots ,h_{t_e}$ (Zheng et al., 2023).", + "bbox": [ + 112, + 785, + 487, + 879 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\nh _ {1}, \\dots , h _ {n} = \\operatorname {E n c o d e r} _ {t} \\left(w _ {1}, \\dots , w _ {n}\\right) \\tag {1}\n$$\n", + "text_format": "latex", + "bbox": [ + 156, + 898, + 487, + 914 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\nt = \\operatorname {M a x P o o l i n g} \\left(h _ {t _ {s}}, \\dots , h _ {t _ {e}}\\right) \\tag {2}\n$$\n", + "text_format": "latex", + "bbox": [ + 574, + 476, + 882, + 493 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "With the target encoder, we capture the contextual information of the target sentence and the sufficient modeling of context can be used to find out-of-vocabulary targets. Our goal is to not only ensure a close proximity between the representations of the target and the frame but also to ensure that the target representations in different sentences, which activate the same frame, exhibit a high degree of similarity.", + "bbox": [ + 507, + 501, + 882, + 645 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.1.2 Frame Encoder", + "text_level": 1, + "bbox": [ + 507, + 653, + 692, + 668 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Taking Board_vehicle as frame name and its corresponding definition \"A Traveller boards a Vehicle that they intend to use as a means of transportation either as a passenger or as a driver\" as def. Similarly, frame encoder converts $D =$ frame name|def, denoted as $w_{1}^{\\prime},\\ldots ,w_{m}^{\\prime}$ into representations $h_1^\\prime ,\\dots ,h_m^\\prime$ . We follow Reimers and Gurevych (2019) to regard meanpooling of all tokens as frame representations $f$ .", + "bbox": [ + 505, + 673, + 884, + 818 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\nh _ {1} ^ {\\prime}, \\dots , h _ {m} ^ {\\prime} = \\operatorname {E n c o d e r} _ {f} \\left(w _ {1} ^ {\\prime}, \\dots , w _ {m} ^ {\\prime}\\right) \\tag {3}\n$$\n", + "text_format": "latex", + "bbox": [ + 524, + 841, + 882, + 860 + ], + "page_idx": 2 + }, + { + "type": "equation", + "text": "\n$$\nf = \\operatorname {M e a n P o o l i n g} \\left(h _ {1} ^ {\\prime}, \\dots , h _ {m} ^ {\\prime}\\right) \\tag {4}\n$$\n", + "text_format": "latex", + "bbox": [ + 600, + 860, + 880, + 879 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Through the frame encoder, we encode frame definitions to represent frames. Similar to the target", + "bbox": [ + 507, + 887, + 880, + 917 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "13457", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/9052a5a6a36197d5151213ae2874ec4da4648aed62d3cab50a90d20c09d18259.jpg", + "image_caption": [ + "(a)" + ], + "image_footnote": [], + "bbox": [ + 124, + 82, + 484, + 149 + ], + "page_idx": 3 + }, + { + "type": "image", + "img_path": "images/bca54ce6c2eebd97a39c7f557840c0fe21ee60e59a2dd382c4da538f2aad343d.jpg", + "image_caption": [ + "(b)", + "Figure 3: Coarse-to-Fine Learning of COFFTEA. In-batch learning (a) is first applied with coarse-grained in-batch negative examples $\\mathcal{B}$ . In-candidate learning (b) is then employed to differentiate gold frame with hard negatives $\\mathcal{C}$ ." + ], + "image_footnote": [], + "bbox": [ + 127, + 164, + 482, + 231 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "encoder, the frame encoder not only focuses on aligning frames with targets but is also intended to reflect the semantic relationships between frames themselves, such as Inheritance (Su et al., 2021; Zheng et al., 2022).", + "bbox": [ + 112, + 357, + 487, + 436 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.2 Learning Process", + "text_level": 1, + "bbox": [ + 112, + 447, + 295, + 463 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "In order to capture the alignment between frames and targets, we aim to minimize the distance between the target and the gold frame (positive pair) while maximizing the distance between the target and other frames (negative pairs) during the training process. However, encoding such a large number of frames, which exceeds 1000, and updating the encoders with gradients for all of them becomes infeasible. Therefore, we need to sample a subset of frames as negative pairs. As discussed earlier, both training $w / o$ $l f$ and $w / l f$ have their limitations. To address this, we propose a two-stage learning process in Fig. 3.", + "bbox": [ + 112, + 468, + 487, + 676 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "We first employ in-batch learning (§3.2.1), where we treat the gold frames of other targets in the same batch as negative examples. This allows us to learn coarse-grained frame semantic differences. Then we utilize in-candidate learning (§3.2.2), where we treat other frames in lexicon filter candidates as hard negatives. This step helps us refine the frame representations and capture fine-grained semantic distinctions", + "bbox": [ + 112, + 677, + 487, + 820 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Specifically, we adopt cosine similarity $\\cos (t,f) = \\frac{t\\cdot f}{\\|t\\|^{\\cdot}\\|f\\|}$ as distance metric and utilize contrastive learning to distinguish positive pairs from negative pairs. Let $\\mathcal{L}_{\\mathcal{B}}$ and $\\mathcal{L}_{\\mathcal{C}}$ denotes the contrastive loss of in-batch learning and incandidate learning. The main difference between", + "bbox": [ + 112, + 822, + 487, + 917 + ], + "page_idx": 3 + }, + { + "type": "table", + "img_path": "images/f9b63677cd501a83c166b32bac9a1bac57fa28c1b7870b40f84c1aab7f6497a8.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Datasetsexemplartraindevtest|F|
FN 1.515394616621228444281019
FN 1.719243119391227267141221
", + "bbox": [ + 512, + 80, + 880, + 135 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Table 1: Statistics of FrameNet dataset", + "bbox": [ + 561, + 143, + 826, + 158 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "the two-stage learning lies in the construction of negative pairs $\\mathcal{B}$ and $\\mathcal{C}$ .", + "bbox": [ + 507, + 185, + 882, + 217 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {\\mathcal {B}} = - \\log \\frac {\\exp \\left(\\cos \\left(t , f ^ {+}\\right) / \\tau\\right)}{\\sum_ {f \\in \\mathcal {B} \\cup \\{f ^ {+} \\}} \\exp \\left(\\cos \\left(t , f\\right) / \\tau\\right)} \\tag {5}\n$$\n", + "text_format": "latex", + "bbox": [ + 524, + 230, + 882, + 267 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {\\mathcal {C}} = - \\log \\frac {\\exp (\\cos (t , f ^ {+}) / \\tau)}{\\sum_ {f \\in \\mathcal {C} \\cup \\{f ^ {+} \\}} \\exp (\\cos (t , f) / \\tau)} \\tag {6}\n$$\n", + "text_format": "latex", + "bbox": [ + 524, + 269, + 882, + 307 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.2.1 In-batch Learning", + "text_level": 1, + "bbox": [ + 507, + 319, + 714, + 335 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Training directly $w / l f$ may cause the model to primarily focus on distinguishing the differences between the gold frame and the candidates. In order to broaden the model's horizons, we first conduct training $w / o l f$ , allowing the model to learn to differentiate coarse-grained semantic differences. We follow Khosla et al. (2020) to construct in-batch negative examples $\\mathcal{B}$ .", + "bbox": [ + 507, + 338, + 882, + 467 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.2.2 In-candidate Learning", + "text_level": 1, + "bbox": [ + 507, + 479, + 746, + 494 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Through in-batch learning, our model can effectively differentiate some frames that are relatively easy to distinguish. However, we aim to further distinguish frames that are more likely to be confused with one another. Typically, when using $lf$ , the other candidate frames for the same target can serve as negative examples $\\mathcal{C}$ .", + "bbox": [ + 505, + 499, + 882, + 611 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "However, the number of candidate frames for different targets can vary, and there are even cases where some targets only activate one frame in FrameNet. To address this issue, we pad the number of $\\mathcal{C}$ for all targets to a fixed number (e.g., 15). This padding ensures that each target has a consistent number of candidate frames available for comparison during the training process.", + "bbox": [ + 507, + 612, + 882, + 741 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "We consider leveraging the semantic relationships between frames in FrameNet (§A.3) to expand C. Inheritance represents the \"is-a\" relationship between frames. For example, receiving inherits from getting, then getting becomes the super frame and receiving becomes the sub frame. Other frames that also inherit from getting, such as Commerce_buy and Taking, are considered siblings of receiving. These siblings exhibit semantic similarities with receiving, but with subtle differences, making them suitable as hard negative examples.", + "bbox": [ + 507, + 741, + 884, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_number", + "text": "13458", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 3 + }, + { + "type": "table", + "img_path": "images/5f724d46076e87d29ce41e42ee9facc97bf798aa0e0f064fde5b5829ac036b36.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelsFN 1.5OverallFN 1.7
AccR@1R@3R@5AccR@1R@3R@5
Hartmann et al. (2017)†87.6377.49--82.2583.0076.10--
KGFI (2021)†92.1385.63--88.7692.4085.8191.5992.88
FIDO (2021)†91.30----92.10---
Tamburini (2022)92.57----92.33---
Lookup Table88.6078.4886.7488.1683.2389.0278.7587.4388.71
+ init. with Def90.4083.5688.2589.3286.8590.3085.1788.9389.87
+LB91.0686.5291.7392.6888.7390.9487.1392.3093.21
LBonly†91.8284.7394.4796.1888.1391.5884.8893.8895.90
LConly†92.5076.5187.3591.0183.7592.7078.3388.9391.64
LBonly90.9486.7795.1496.7988.8191.3687.3895.2996.77
COFFTEA92.5587.6992.6494.7190.0592.6487.3492.9194.29
", + "bbox": [ + 129, + 80, + 870, + 280 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Table 2: Main results on FN1.5 and 1.7. Acc denotes accuracy with lexicon filtering and $\\mathbf{R}@\\boldsymbol{k}$ denotes recall at $k$ without lexicon filtering. Overall represents the harmonic mean of Acc and $\\mathbf{R}@\\mathbf{1}$ , reflecting the comprehensive capability of models. Through dual encoders and two-stage learning, COFFTEA outperforms the previous methods (the topmost block) by at least 0.93 overall scores. Ablation study on dual encoders and two-stage learning is listed in the middle and bottom blocks ( $\\S 4.4$ ). $\\dagger$ means the model does not trained with exemplar sentences.", + "bbox": [ + 112, + 288, + 882, + 363 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We follow the order of candidate frames, sibling frames, and random frames to construct $\\mathcal{C}$ .", + "bbox": [ + 112, + 386, + 487, + 418 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4 Experiment", + "text_level": 1, + "bbox": [ + 112, + 429, + 253, + 445 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Our experiments mainly cover three aspects:", + "bbox": [ + 112, + 454, + 448, + 470 + ], + "page_idx": 4 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- Main experimental results on frame identification: We compare the performance of COFFTEA with previous approaches both with lexicon filtering $(w / l f)$ and without lexicon filtering $(w / o l f)$ .", + "- Further ablation study: to demonstrate the contributions of the learnable frame encoder and Coarse-to-Fine learning to the performance of COFFTEA.", + "- In-depth representation analysis: We delve into a deeper analysis to investigate how the frame and target encoder of COFFTEA can better represent the alignment between frames and targets, as well as the relationships between frames and frames, targets and targets." + ], + "bbox": [ + 134, + 476, + 489, + 736 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.1 Datasets", + "text_level": 1, + "bbox": [ + 112, + 753, + 228, + 768 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We have introduced COFFTEA on two FrameNet datasets: FN 1.5 and FN 1.7. FN 1.7 is an extensive version of FN 1.5, with more annotated sentences and more defined frames. Following Swayamdipta et al. (2017); Su et al. (2021), we spilt the full text into train, dev and test set, and further use exemplars in FrameNet as pretraining data like Peng et al. (2018); Zheng et al. (2022); Tamburini (2022). Table 1 shows the statistics of two datasets.", + "bbox": [ + 112, + 774, + 489, + 917 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.2 Models", + "text_level": 1, + "bbox": [ + 509, + 386, + 613, + 400 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We mainly compare COFFTEA with representative previous methods from the different categories shown in Fig. 2: traditional representation learning based methods without definitions (Hartmann et al., 2017), dual encoder architectures with frozen frame encoders (KGFI (2021), Tamburini (2022)), and single fused encoder architectures (FIDO (2021)).", + "bbox": [ + 507, + 409, + 884, + 537 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "In order to conduct further ablation study and deeper analysis, we also implement two baselines represented as (a) and (b) in Fig 2: Lookup Table with random initialization and Lookup Table initialized with definition representations. The implementation details of previous methods, baselines, and COFFTEA can be found in §A.1.", + "bbox": [ + 507, + 539, + 885, + 653 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.3 Main Results", + "text_level": 1, + "bbox": [ + 507, + 668, + 660, + 683 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "To compare our model with previous approaches, as well as our baselines. We report the accuracy (Acc) when lexicon filtering is applied, recall at k $(\\mathbf{R}@\\mathbf{k})$ when no lexicon filtering is used (indicating whether the gold frame is ranked in the top $k$ based on similarity), and an Overall score (harmonic average of Acc and R@1).", + "bbox": [ + 507, + 692, + 882, + 804 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "The upper block of Table 2 shows the performance of previous representative methods in frame identification. COFFTEA achieves a performance gain of 0.93 overall scores (88.98 v.s. 89.91), primarily due to a 1.53 increase in R@1 scores (85.81 v.s. 87.34) in the w/o l f setting. This improvement can be attributed to the use of a learnable frame", + "bbox": [ + 507, + 806, + 884, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_number", + "text": "13459", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 4 + }, + { + "type": "table", + "img_path": "images/353dcfbfded36a92266b258e13eb5ab977725429f6d57e7f6ec956d812f71afe.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelsPredictions w/o If from rank 2 to 5 (Top-1 is Becoming)
L3 only†Transition_to_a_stateUndergo_transformationChange_post_stateUndergo_change
Lc only†Activity_startLaunch_processMake_acquaintanceMeet_specifications
", + "bbox": [ + 149, + 80, + 848, + 135 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Table 3: Predictions in positions 2 to 5 of \"The children and families who come to Pleasant Run are given the opportunity to become happy\". red means the frame is irrelevant to the gold frame Becoming.", + "bbox": [ + 112, + 143, + 882, + 174 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "encoder and two-stage learning, which enhance the effectiveness of COFFTEA in modeling definitions. Compared to KGFI, COFFTEA achieves comparable Acc $w / l f$ (92.40 v.s. 92.64) and consistently performs better in $R@k$ , which further demonstrates that through combining in-batch learning and in-candidate learning, COFFTEA is able to select the appropriate frame from both candidates ( $w/lf$ ) and all frames ( $w/o l f$ ).", + "bbox": [ + 110, + 199, + 489, + 343 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Moreover, it is worth noting that some methods (marked $\\dagger$ ) does not utilize exemplars as training data, while previous researches (Su et al., 2021; Zheng et al., 2022) believe that using exemplars for training improves accuracy. Further discussion about using exemplars can be found in §4.4.", + "bbox": [ + 112, + 344, + 487, + 441 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "In addition to representative methods in Table 2, there is a series of frame identification studies that solely focus on Acc w/lf. We report the results of COFFTEA and more previous frame identification works in $\\S \\mathbf{B}.2$", + "bbox": [ + 112, + 443, + 489, + 523 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4.4 Ablation Study", + "text_level": 1, + "bbox": [ + 112, + 539, + 280, + 554 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Frame Encoder Can learnable frame encoder contribute to frame identification? As is shown in the middle block in Table 2, lookup table without definitions achieved relatively low overall scores (83.57). However, when we initialize the lookup table with the definitions encoded by the frozen encoder, the lookup table showed a significant improvement in R@1 w/o lf, with an increase of 6.42 points (78.75 v.s. 85.17). This indicates that even without adjusting the parameters, the frozen encoder of PLMs is capable of modeling the definitions to some extent.", + "bbox": [ + 112, + 562, + 489, + 753 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "To further explore its impact, we apply in-batch learning to the lookup table with definitions. This additional step results in a further improvement of 1.96 points in R@1 w/o lf (85.17 v.s. 87.13). This suggests that in-batch learning reduces the number of negative samples, decreases the learning difficulty, and ultimately leads to better performance.", + "bbox": [ + 112, + 757, + 489, + 869 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Comparing COFFTEA to these lookup tables, we find that unfreezing the frame encoder allows for better modeling of fine-grained semantic differ", + "bbox": [ + 112, + 871, + 489, + 919 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "ences, resulting in a significant increase of 1.70 points in accuracy $w / l f$ (90.94 v.s. 92.64). This demonstrates the effectiveness of incorporating an unfrozen frame encoder to enhance the modeling of subtle semantic distinctions and improve the performance of the frame identification task.", + "bbox": [ + 507, + 199, + 884, + 297 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Coarse-to-Fine Learning The bottom block in Table 2 demonstrates the trade-off between in-batch learning $(\\mathcal{L}_{\\mathcal{B}}$ only) and in-candidate learning $(\\mathcal{L}_{\\mathcal{C}}$ only). $\\mathcal{L}_{\\mathcal{B}}$ only achieves the highest R@1 (84.88) and $\\mathcal{L}_{\\mathcal{C}}$ only yields the highest Acc (92.70). However, the former approach does not excel at distinguishing fine-grained frames (91.58 Acc), while the latter approach even performs worse than the lookup table on R@1 w/o lf (78.33 v.s. 78.75).", + "bbox": [ + 507, + 307, + 884, + 451 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Table 3 gives a specific example for comparison. Both methods can correctly predict the frame corresponding to the target become in the given sentence. However, when looking at the predicted frames in positions 2 to 5, the frames predicted by in-batch learning show structural relationships with Becoming, while the frames predicted by in-candidate learning have no connection to becoming. This reflects that in-candidate learning cannot distinguishing frames sufficiently.", + "bbox": [ + 507, + 454, + 884, + 613 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "To address this issue, we train COFFTEA with $\\mathcal{L}_{\\mathcal{B}}$ on exemplars and then train COFFTEA with $\\mathcal{L}_{\\mathcal{C}}$ with train split, which is equivalent to performing coarse-grained pretraining on a large-scale corpus and then fine-tuning on a smaller dataset for domain adaptation at a finer granularity.", + "bbox": [ + 507, + 615, + 882, + 712 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We also apply in-batch learning on both train and exemplar. Due to the lack of hard negatives, its performance on Acc $w /lf$ is lower than COFFTEA (91.36 v.s. 92.64).", + "bbox": [ + 507, + 714, + 882, + 778 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Exemplars Using exemplars as additional training data is a common practice (Peng et al., 2018; Chen et al., 2021; Zheng et al., 2022). Since in-batch learning benefits from larger-scale data (84.88 v.s. 87.38 in Table 2), we chose to use the larger set, exemplars for the first stage of in-batch learning. However, this makes our results not directly comparable to those of previous methods (Su", + "bbox": [ + 507, + 790, + 884, + 919 + ], + "page_idx": 5 + }, + { + "type": "page_number", + "text": "13460", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/74f6c92f21578640ed0bf9494d80980cdc35b375729b198fbedea4321960bd76.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Modelsw/ exam.w/o exam.Δ
Tamburini (2022)91.4292.33-0.91
Lookup Table89.0289.41-0.39
+ init. with Def90.4090.66-0.26
+LB91.0691.23-0.17
LBonly91.3691.58-0.22
COFFTEA92.5592.240.31
", + "bbox": [ + 129, + 82, + 470, + 202 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/01f80ebee42c1952408adb94bcc33a28c6bd2968743e8d302402e09948bdb5a4.jpg", + "table_caption": [ + "Table 4: Training with extra exemplars does not increase the model performance. COFFTEA can effectively utilize exemplars via two-stage learning." + ], + "table_footnote": [], + "table_body": "
ModelsAccAcc w/ [MASK]Δ
Lookup Table89.0278.1110.92
+ init. with Def90.3077.5812.72
+LB90.9477.9113.03
COFFTEA92.6485.826.82
", + "bbox": [ + 129, + 269, + 470, + 353 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "et al., 2021) that only use the training set. However, more training data does not necessarily lead to improved performance. As shown in Table 4, the performance of Tamburini (2022) and our lookup table baselines decreases after using exemplars, possibly due to a domain mismatch between the exemplars and the training set. However, our two-stage approach effectively utilizes both datasets to get an improvement of 0.31 Acc, providing a more appropriate way to utilize exemplars for future work.", + "bbox": [ + 112, + 448, + 489, + 609 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.5 Further Analysis", + "text_level": 1, + "bbox": [ + 112, + 623, + 294, + 639 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Target-Frame Alignments The results in Table 2 demonstrate that COFFTEA effectively models the alignment between targets and frames. However, we still want to explore whether the model's ability to predict a frame is due to its accurate modeling of the target's contextual information in the sentence or if there are other shortcuts involved. Moreover, if COFFTEA can effectively model the context of the target, it can also be used to discover out-of-vocabulary targets. To investigate this, we replace the target in the sentence with the [MASK] token and compute the similarity between the masked target representation and frames. Table 5 shows that when the target is masked, the accuracy of the model decreases across the board. COFFTEA achieves the smallest decrease in performance $(\\Delta)$ , indicating the capability of our dual", + "bbox": [ + 112, + 645, + 489, + 917 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/bfcc7747cbc503e268778e14d8f4e38225c2bc3fd17edba4b1fe28ac7c2ff009.jpg", + "table_caption": [ + "Table 5: Masking target words can cause the decrease of accuracy. The extent of the decrease, $\\Delta$ , reflects whether the model understands the context information of the target." + ], + "table_footnote": [], + "table_body": "
ModelsR@110 target exemplars
R@1R@3R@5
Lookup Table78.7563.9675.5477.27
+ init. with Def85.1781.7189.5190.33
+ Lβ87.1383.0492.2493.40
COFFTEA87.3485.5893.0794.89
", + "bbox": [ + 526, + 82, + 865, + 183 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/a5b2036fef7ffe4dc2aeed7e39e3fbf0feac0d2fee359f51b0fb64061fc29329.jpg", + "table_caption": [ + "Table 6: Representing frames with definitions and ten target exemplars. The target encoder of COFFTEA can get similar and consistent representations of targets related to the same frame." + ], + "table_footnote": [], + "table_body": "
ModelsAverage Δα/α
Lookup Table0.158
+ init. with Def0.012
+LB0.070
LBonly†56.290
LConly†6.494
COFFTEA121.816
COFFTEA w/o. sibling34.907
", + "bbox": [ + 557, + 263, + 835, + 390 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Table 7: The learnable frame encoder better models the structured information between frames. The perception of structure in COFFTEA comes from the first stage of in-batch learning and the utilization of siblings as hard negatives.", + "bbox": [ + 507, + 399, + 882, + 470 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "encoder structure to effectively model the alignment between target context and frames. This capability also indicates that COFFTEA can explore out-of-vocabulary targets.", + "bbox": [ + 507, + 497, + 882, + 561 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Target-Target Relations The target encoder ensures a close proximity between targets and their corresponding frames. However, we believe that different sentences the target representations in different sentences, which activate the same frame, are supposed to exhibit a high degree of similarity. We select ten exemplars for each frame and replace frame representations with the mean representation (centroid) of these exemplars. In Table 6, we compare two frame representations: directly encoding the definition and encoding ten exemplars. COFFTEA achieves consistent and similar performance in both settings (87.34 and 85.58), reflecting the similarity between the target representations of the same frame and the final frame representation, as captured by our target encoder.", + "bbox": [ + 507, + 571, + 884, + 829 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Frame-Frame Relations Due to the semantic relations defined by FrameNet between frames (such as inheritance, using, subframe, etc.), frames are not isolated but rather interconnected with each other, forming structural relationships. For exam", + "bbox": [ + 507, + 839, + 882, + 917 + ], + "page_idx": 6 + }, + { + "type": "page_number", + "text": "13461", + "bbox": [ + 477, + 927, + 522, + 940 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "ple, if receiving inherits from getting, their representations should be similar. Frame representations should reflect the structural relationships. To evaluate the degree of similarity between a subframe $f_{sub}$ and its superframe $f_{sup}$ , we define a metric,", + "bbox": [ + 112, + 84, + 489, + 165 + ], + "page_idx": 7 + }, + { + "type": "equation", + "text": "\n$$\n\\alpha = \\frac {1}{| \\mathcal {F} |} \\cdot \\sum_ {f \\in \\mathcal {F}} \\cos \\left(f _ {\\text {s u b}}, f\\right) \\tag {7}\n$$\n", + "text_format": "latex", + "bbox": [ + 205, + 171, + 487, + 209 + ], + "page_idx": 7 + }, + { + "type": "equation", + "text": "\n$$\n\\Delta \\alpha = \\cos \\left(f _ {s u b}, f _ {s u p}\\right) - \\alpha \\tag {8}\n$$\n", + "text_format": "latex", + "bbox": [ + 191, + 214, + 487, + 231 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "$\\frac{\\Delta \\alpha}{\\alpha}$ is a normalized evaluation reflecting how a subframe is close to its superframe compared to other frames. We report the average $\\frac{\\Delta \\alpha}{\\alpha} (\\alpha > 0)$ of inheritance pairs in Table 7.", + "bbox": [ + 112, + 237, + 487, + 303 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "The baselines (the upper block) without a learnable frame encoder struggle to model the relationships between frames effectively. The distance between subframes and superframes is almost the same as that between other frames. However, using a learnable frame encoder greatly improves the similarity between subframes and superframes.", + "bbox": [ + 112, + 304, + 489, + 416 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "In-candidate learning, if used alone, tends to overly focus on differentiating frames with similar semantics, which actually decreases the similarity between them (6.494 v.s. 56.290). On the other hand, COFFTEA effectively models the similarity between associated frames. This is mainly because we use two-stage learning and treat siblings as hard negative examples during training (34.907 v.s. 121.816), which indirectly enables the model to learn the connection between subframes and superframes.", + "bbox": [ + 112, + 417, + 489, + 594 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "5 Related Work", + "text_level": 1, + "bbox": [ + 114, + 605, + 270, + 620 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Frame Identification Prior research in frame identification has primarily focused on modeling the similarity between targets and frames or assessing the matching score between them.", + "bbox": [ + 112, + 629, + 489, + 692 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "In terms of modeling similarity, Hartmann et al. (2017); Peng et al. (2018); Zheng et al. (2022) leverage target encoder with a trainable frame representation table, while ignoring the valuable contextual frame information provided by FrameNet. To remedy this deficiency, Su et al. (2021); Tamburini (2022) both propose to incorporate frame definitions into frame encoder. Despite these efforts, the number of frames and the optimizing objective make it infeasible to update frame representation during training, leading to a compromise of freezing it. Consequently, they all trap in the dilemma to obtain optimal frame representation. As for assessing the matching score, Jiang and Riloff (2021)", + "bbox": [ + 112, + 694, + 490, + 919 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "propose a fused encoder to evaluate semantic coherence between sentence and frame definition. Nevertheless, it just fails to evaluate the performance of $w / o$ $l f$ scenario.", + "bbox": [ + 507, + 84, + 884, + 148 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "In addition, the aforementioned studies tend to adopt a one-sided relationship between targets and frames. They only train model on either $w / \\text{lf}$ or $w / o \\text{lf}$ , which can not catch an overall horizon in distinguishing frames. Moreover, only Su et al. (2021) release performance under $w / o \\text{lf}$ scenario, which is essential for evaluating the full capabilities of the model.", + "bbox": [ + 507, + 149, + 884, + 275 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Some other work like Chanin (2023) treat frame semantic parsing as a sequence-to-sequence text generation task, but its still trap in training under $w / l f$ and can not catch an optimal relationships.", + "bbox": [ + 507, + 277, + 882, + 342 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Metric Learning Metric learning is a fundamental approach in machine learning that seeks to learn a distance metric or similarity measure that accurately captures the inherent relationships between data points. One particular technique that has gained prominence in this area is Contrastive Learning, which has been extensively applied to a variety of tasks such as text classification (Gao et al., 2021), image classification (He et al., 2020).", + "bbox": [ + 507, + 350, + 882, + 495 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "The optimized feature space retrieved from Contrastive Learning objective can benefit on learning better representations of data and capturing inner relationship. For frame identification, the primary goal is to obtain a well-aligned target-to-frame space. However, existing researches only focus on using Cross Entropy to directly modeling correlation to All Frames, which presents challenges in capturing complex relationships. Alternatively, Contrastive Learning can be leveraged to optimize and incrementally construct the feature space of frames and targets.", + "bbox": [ + 507, + 495, + 882, + 688 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "6 Conclusion", + "text_level": 1, + "bbox": [ + 507, + 701, + 640, + 715 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "We propose COFFTEA, and its dual encoder can effectively model the definitions with learnable frame encoder and efficiently calculate the similarity scores between a target and all frames. We also conclude that there exists a trade-off between training $w / l f$ and $w / o$ $l f$ , and achieves a comprehensive performance with a two stage learning process. Detailed analysis of the experiments further demonstrates that our two encoders are not limited to their alignment but can also discover other connections between frame and frame, as well as target and target.", + "bbox": [ + 507, + 726, + 884, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_number", + "text": "13462", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Limitations", + "text_level": 1, + "bbox": [ + 114, + 84, + 220, + 99 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "The limitations of our work include:", + "bbox": [ + 114, + 110, + 386, + 124 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "1. We only used cosine similarity as a distance metric and did not explore other methods of metric learning. Investigating alternative distance metrics could potentially enhance the performance of our model.", + "2. Currently, the FrameNet dataset does not provide test data for out-of-vocabulary words. Therefore, our exploration of out-of-vocabulary words is limited to preliminary experiments (Table 5). Further investigation with a dedicated dataset containing out-of-vocabulary test data would be valuable.", + "3. We only applied the dual-encoder architecture to frame identification and did not explore its application to frame semantic role labeling. Extending our approach to frame semantic role labeling would provide insights into its effectiveness and generalizability beyond frame identification." + ], + "bbox": [ + 127, + 137, + 490, + 467 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Acknowledgements", + "text_level": 1, + "bbox": [ + 114, + 481, + 285, + 498 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We thank all reviewers for their great efforts. This paper is supported by the National Science Foundation of China under Grant No.61936012.", + "bbox": [ + 112, + 507, + 489, + 555 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "References", + "text_level": 1, + "bbox": [ + 114, + 583, + 213, + 599 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Collin Baker, Michael Ellsworth, and Katrin Erk. 2007. SemEval-2007 task 19: Frame semantic structure extraction. In Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007), pages 99–104, Prague, Czech Republic. Association for Computational Linguistics.", + "Collin F. Baker, Charles J. Fillmore, and John B. Lowe. 1998. The Berkeley FrameNet project. In 36th Annual Meeting of the Association for Computational Linguistics and 17th International Conference on Computational Linguistics, Volume 1, pages 86-90, Montreal, Quebec, Canada. Association for Computational Linguistics.", + "David Ian Chanin. 2023. Open-source frame semantic parsing. ArXiv, abs/2303.12788.", + "Xudong Chen, Ce Zheng, and Baobao Chang. 2021. Joint multi-decoder framework with hierarchical pointer network for frame semantic parsing. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 2570-2578, Online. Association for Computational Linguistics." + ], + "bbox": [ + 115, + 607, + 489, + 917 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "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.", + "Charles J Fillmore et al. 1976. Frame semantics and the nature of language. In Annals of the New York Academy of Sciences: Conference on the origin and development of language and speech, volume 280, pages 20-32. New York.", + "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.", + "Daniel Gildea and Daniel Jurafsky. 2000. Automatic labeling of semantic roles. In Proceedings of the 38th Annual Meeting of the Association for Computational Linguistics, pages 512-520, Hong Kong. Association for Computational Linguistics.", + "Shaoru Guo, Yong Guan, Ru Li, Xiaoli Li, and Hongye Tan. 2020. Incorporating syntax and frame semantics in neural network for machine reading comprehension. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2635-2641, Barcelona, Spain (Online). International Committee on Computational Linguistics.", + "Silvana Hartmann, Ilia Kuznetsov, Teresa Martin, and Iryna Gurevych. 2017. Out-of-domain FrameNet semantic role labeling. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 471-482, Valencia, Spain. Association for Computational Linguistics.", + "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9729-9738.", + "Tianyu Jiang and Ellen Riloff. 2021. Exploiting definitions for frame identification. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2429-2434, Online. Association for Computational Linguistics.", + "Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. 2020. Supervised contrastive learning. Advances in neural information processing systems, 33:18661-18673." + ], + "bbox": [ + 510, + 85, + 885, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_number", + "text": "13463", + "bbox": [ + 477, + 928, + 524, + 940 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Hao Peng, Sam Thomson, Swabha Swayamdipta, and Noah A. Smith. 2018. Learning joint semantic parsers from disjoint data. 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 1492-1502, New Orleans, Louisiana. Association for Computational Linguistics.", + "Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. 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, Hong Kong, China. Association for Computational Linguistics.", + "Yuqi Si and Kirk Roberts. 2018. A frame-based nlp system for cancer-related information extraction. In AMIA annual symposium proceedings, volume 2018, page 1524. American Medical Informatics Association.", + "Xuefeng Su, Ru Li, Xiaoli Li, Jeff Z. Pan, Hu Zhang, Qinghua Chai, and Xiaoqi Han. 2021. A knowledge-guided framework for frame identification. 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 5230-5240, Online. Association for Computational Linguistics.", + "Swabha Swayamdipta, Sam Thomson, Chris Dyer, and Noah A Smith. 2017. Frame-semantic parsing with softmax-margin segmental rnns and a syntactic scaffold. arXiv preprint arXiv:1706.09528.", + "Fabio Tamburini. 2022. Combining ELECTRA and adaptive graph encoding for frame identification. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 1671-1679, Marseille, France. European Language Resources Association.", + "Ce Zheng, Xudong Chen, Runxin Xu, and Baobao Chang. 2022. A double-graph based framework for frame semantic parsing. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4998-5011, Seattle, United States. Association for Computational Linguistics.", + "Ce Zheng, Yiming Wang, and Baobao Chang. 2023. Query your model with definitions in framenet: an effective method for frame semantic role labeling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 14029-14037." + ], + "bbox": [ + 115, + 85, + 489, + 852 + ], + "page_idx": 9 + }, + { + "type": "page_number", + "text": "13464", + "bbox": [ + 477, + 928, + 524, + 940 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "A Experiment Details", + "text_level": 1, + "bbox": [ + 114, + 84, + 319, + 99 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "A.1 Baseline Models", + "text_level": 1, + "bbox": [ + 114, + 120, + 292, + 134 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Hartmann et al. (2017): a simple classifier based on the representation of entire sentence and especially dependents of target.", + "bbox": [ + 112, + 149, + 487, + 197 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Peng et al. (2018): a joint model to learn semantic parsers from disjoint corpora with a latent variable formulation.", + "bbox": [ + 112, + 198, + 485, + 244 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Chen et al. (2021): a joint model of multi-decoder and hierarchical pointer network for frame semantic parsing.", + "bbox": [ + 112, + 246, + 487, + 293 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "FIDO (2021): a fused model assessing semantics coherence between sentence and frame definition.", + "bbox": [ + 112, + 294, + 485, + 325 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "KGFI (2021): a dual encoders model for frame identification aligning similarity of targets and precomputed frame representation.", + "bbox": [ + 112, + 326, + 487, + 374 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Tamburini (2022): similar to Su et al. (2021) with more reliable graph technique.", + "bbox": [ + 112, + 375, + 485, + 406 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "KID (2022): a double graph based model for frame semantic parsing.", + "bbox": [ + 112, + 407, + 485, + 438 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "AGED (2023): a query-based framework for Frame Semantic Role Labeling under frame definition.", + "bbox": [ + 112, + 439, + 485, + 470 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Chanin (2023): a T5-based model treating frame semantic parsing as sequence-to-sequence text generation task.", + "bbox": [ + 112, + 470, + 487, + 518 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Lookup Table: a baseline model aligning target encoder with trainable one-hot mapping frame representation.", + "bbox": [ + 112, + 519, + 487, + 565 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Lookup Table init. with definition: a baseline model aligning target encoder with trainable BERT-initialized frame representation.", + "bbox": [ + 112, + 567, + 487, + 615 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Lookup Table init. with definition and $\\mathcal{L}_{\\mathcal{B}}$ : using Contrastive Loss as optimize objective instead of Cross Entropy.", + "bbox": [ + 112, + 615, + 487, + 663 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "A.2 Hyper-parameter Setting", + "text_level": 1, + "bbox": [ + 114, + 690, + 363, + 706 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "For replicability of our work, we list the Hyperparameter setting of all our baselines and COFFTEA in Table 8.", + "bbox": [ + 112, + 719, + 487, + 766 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "A.3 Frame Relation", + "text_level": 1, + "bbox": [ + 114, + 793, + 287, + 807 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Given a frame $f$ , to get its sibling frames $\\mathcal{F}_{sib}$ , we utilize the frame relation Inheritance and consider $f$ as the superior or subordinate frame of Inheritance to retrieve its subordinate or superior frames, and then get the sibling of $f$ . Table 9 shows the Inheritance relation we used.", + "bbox": [ + 112, + 822, + 487, + 917 + ], + "page_idx": 10 + }, + { + "type": "table", + "img_path": "images/5a80f012283a4099e8e1ee1c20bac787a690b44d6e32a79b3160f7ee6f77cc18.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Hyper-parameterValue
Epochs20
Learning Rate2e-5
OptimizerAdamW
Batch Size of LB32
Gradient Accumulation of LB4
Temperature of LB0.07
Batch Size of LC6
Gradient Accumulation of LC3
Candidate Frame Number of LC15
Temperature of LC1
Dual EncodersBERT-base
", + "bbox": [ + 542, + 82, + 850, + 241 + ], + "page_idx": 10 + }, + { + "type": "table", + "img_path": "images/acaa0ce0ca7342816fa21dd39e5d12d139ad8737691f8dfc3e20df1c0a926e39.jpg", + "table_caption": [ + "Table 8: Hyper-parameter settings" + ], + "table_footnote": [], + "table_body": "
Sup frameSub frame
GettingReceiving \nAmassing \nCommerce_buy \nCommerce_generate \nTaking
ReceivingBorrowing
Transition_to_a_stateBecoming \nUndergo_change
Undergo_changeUndergo_transformation
BecomingTransition_to_a_quality
", + "bbox": [ + 534, + 279, + 858, + 454 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "B Supplementary Experiment Results", + "text_level": 1, + "bbox": [ + 507, + 532, + 853, + 549 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "B.1 Statistical Results of COFFTEA", + "text_level": 1, + "bbox": [ + 507, + 558, + 800, + 573 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "To verify that our experimental results were not accidental, we train COFFTEA with five different random seeds for each dataset. Compare with the strongest model (Su et al., 2021), we can get better performance consistently. Table 10 shows the average performances with its deviation.", + "bbox": [ + 507, + 580, + 882, + 676 + ], + "page_idx": 10 + }, + { + "type": "table", + "img_path": "images/a200af37c14dc2e7e050560e9de3703624368ee2d93ffea11d6afcd0336e0c69.jpg", + "table_caption": [ + "Table 9: A part of pairs of Inheritance relation, see more at https://framenet.icsi.berkeley.edu/fndrupal/." + ], + "table_footnote": [], + "table_body": "
DatasetModelsAvg. ± Dev.
w/ Ifw/o If
FN1.5KGFI92.4084.41
COFFTEA92.51 ± 0.1487.26 ± 0.10
FN1.7KGFI92.1385.63
COFFTEA92.50 ± 0.0587.29 ± 0.41
", + "bbox": [ + 519, + 688, + 873, + 784 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "Table 10: Statistical results of multiple runs on FN1.7. We train our models in with five different random seeds and report the average performance with deviation.", + "bbox": [ + 507, + 793, + 882, + 837 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "B.2 Comparison with More Methods", + "text_level": 1, + "bbox": [ + 507, + 865, + 815, + 879 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "As most previous work only focus on performance in the $w /lf$ setting, we conduct a comprehensive", + "bbox": [ + 507, + 887, + 880, + 917 + ], + "page_idx": 10 + }, + { + "type": "page_number", + "text": "13465", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "comparison on both All frames and Amb frames, where Amb is a subset of All whose target is polysemous or can evkoe multiple frames. And we find that Tamburini (2022) just use a smaller test set on both FN1.5 and FN1.7. So our COFFTEA achieves competitive performance compared to the strongest models.", + "bbox": [ + 115, + 84, + 489, + 195 + ], + "page_idx": 11 + }, + { + "type": "table", + "img_path": "images/d91de62cbeb9778e39689b057d51f168abe4c6ae19ef1b6cf52496ca447a43a3.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
ModelsFN 1.5FN 1.7
AllAmbAllAmb
Hartmann et al. †87.6373.8083.0071.70
Peng et al.90.0078.0089.1077.50
Chen et al.90.5079.10--
FIDO†91.3081.0092.1083.80
KGFI†92.1382.3492.4084.41
AGED91.6381.57--
KID91.7081.7291.7083.03
Tamburini92.5783.5892.3384.22
Chanin--89.0077.50
COFFTEA92.5583.6192.6484.95
", + "bbox": [ + 127, + 205, + 473, + 378 + ], + "page_idx": 11 + }, + { + "type": "text", + "text": "Table 11: Frame identification accuracy with lexicon filtering on FrameNet test dataset, 'All' and 'Amb' denote testing on test data and ambiguous data respectively. $\\dagger$ means the model does not trained with exemplar sentences.", + "bbox": [ + 115, + 388, + 489, + 458 + ], + "page_idx": 11 + }, + { + "type": "page_number", + "text": "13466", + "bbox": [ + 478, + 928, + 524, + 940 + ], + "page_idx": 11 + } +] \ No newline at end of file diff --git a/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_model.json b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7c43c32d74f66b98547d8d388586edf75cfe793b --- /dev/null +++ b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_model.json @@ -0,0 +1,2391 @@ +[ + [ + { + "type": "title", + "bbox": [ + 0.128, + 0.09, + 0.872, + 0.11 + ], + "angle": 0, + "content": "Coarse-to-Fine Dual Encoders are Better Frame Identification Learners" + }, + { + "type": "text", + "bbox": [ + 0.195, + 0.124, + 0.815, + 0.143 + ], + "angle": 0, + "content": "Kaikai An\\(^{1,2*}\\), Ce Zheng\\(^{1*}\\), Bofei Gao\\(^{1}\\), Haozhe Zhao\\(^{1,2}\\), Baobao Chang\\(^{1\\dagger}\\)" + }, + { + "type": "text", + "bbox": [ + 0.23, + 0.144, + 0.775, + 0.175 + ], + "angle": 0, + "content": "\\(^{1}\\) National Key Laboratory for Multimedia Information Processing, School of Computer Science, Peking University" + }, + { + "type": "text", + "bbox": [ + 0.226, + 0.177, + 0.78, + 0.226 + ], + "angle": 0, + "content": "\\(^{2}\\) School of Software & Microelectronics, Peking University {ankaikai, zce1112zslx, gaobofei, hanszhao}@stu.pku.edu.cn chbb@pku.edu.cn" + }, + { + "type": "title", + "bbox": [ + 0.261, + 0.253, + 0.341, + 0.267 + ], + "angle": 0, + "content": "Abstract" + }, + { + "type": "text", + "bbox": [ + 0.142, + 0.283, + 0.461, + 0.695 + ], + "angle": 0, + "content": "Frame identification aims to find semantic frames associated with target words in a sentence. Recent researches measure the similarity or matching score between targets and candidate frames by modeling frame definitions. However, they either lack sufficient representation learning of the definitions or face challenges in efficiently selecting the most suitable frame from over 1000 candidate frames. Moreover, commonly used lexicon filtering \\((lf)\\) to obtain candidate frames for the target may ignore out-of-vocabulary targets and cause inadequate frame modeling. In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoders Architecture. With contrastive learning and dual encoders, COFFTEA efficiently and effectively models the alignment between frames and targets. By employing a coarse-to-fine curriculum learning procedure, COFFTEA gradually learns to differentiate frames with varying degrees of similarity. Experimental results demonstrate that COFFTEA outperforms previous models by 0.93 overall scores and \\(1.53\\mathrm{R@1}\\) without \\(lf\\). Further analysis suggests that COFFTEA can better model the relationships between frame and frame, as well as target and target. The code for our approach is available at https://github.com/ pkunlp-icler/COFFTEA." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.711, + 0.26, + 0.725 + ], + "angle": 0, + "content": "1 Introduction" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.738, + 0.49, + 0.882 + ], + "angle": 0, + "content": "Frame Identification (Gildea and Jurafsky, 2000; Baker et al., 2007) aims to identify a semantic frame for the given target word in a sentence. The frames defined in FrameNet (Baker et al., 1998) are associated with word meanings as encyclopedia knowledge (Fillmore et al., 1976), which represent different events, situations, relations and objects. Identifying frames can contribute to extracting frame semantic structures from a sentence, and" + }, + { + "type": "image", + "bbox": [ + 0.512, + 0.25, + 0.871, + 0.389 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.508, + 0.408, + 0.883, + 0.466 + ], + "angle": 0, + "content": "Figure 1: An example of Frame Identification. The target word get in the sentence is associated with frame Board_vehicle. Lexicon filtering \\((lf)\\) considers frames that can be evoked by get.v as candidates." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.496, + 0.884, + 0.559 + ], + "angle": 0, + "content": "frame semantic structures can be utilized in downstream tasks, e.g., Information Extraction (Si and Roberts, 2018), Machine Reading Comprehension (Guo et al., 2020)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.563, + 0.884, + 0.755 + ], + "angle": 0, + "content": "Previous researches in frame identification selects an appropriate frame for a target by modeling the similarity or matching score between the target and frames. Recent efforts are made to represent frames with definitions in FrameNet (Jiang and Riloff, 2021; Su et al., 2021; Tamburini, 2022; Zheng et al., 2023). However, limited by the large scale of frames, these methods either struggle to effectively model definitions due to the use of a frozen frame encoder or cannot efficiently select appropriate frames from all frames due to the use of a single encoder architecture." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.759, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Fig. 1 illustrates an example of frame identification. For the target word \"get\" in the sentence, we need to select its corresponding frame from over a thousand frames in FrameNet (All): Board_vehicle (A Traveller boards a Vehicle). Previous frame identification methods (Peng et al., 2018; Jiang and Riloff, 2021) typically apply lexicon filtering \\((lf)\\) by selecting the frame from a set of candidate frames (Candidates) for the verb \"get\" (e.g., Arriving, Getting, Board_vehicle, etc.). If effec" + }, + { + "type": "page_footnote", + "bbox": [ + 0.142, + 0.893, + 0.267, + 0.905 + ], + "angle": 0, + "content": "*Equal contribution" + }, + { + "type": "page_footnote", + "bbox": [ + 0.143, + 0.906, + 0.286, + 0.918 + ], + "angle": 0, + "content": "† Corresponding author" + }, + { + "type": "list", + "bbox": [ + 0.142, + 0.893, + 0.286, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.477, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13455" + }, + { + "type": "footer", + "bbox": [ + 0.21, + 0.946, + 0.788, + 0.973 + ], + "angle": 0, + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 13455-13466 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.488, + 0.165 + ], + "angle": 0, + "content": "tively improves the accuracy of frame identification. However, the manually defined lexicons is not possible to cover all the corresponding targets for frame, which hinders the extension of frame semantics to out-of-vocabulary target words." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.169, + 0.49, + 0.314 + ], + "angle": 0, + "content": "Furthermore, we observed that training \\( w / o \\) \\( l f \\) (without \\( l f \\)) poses challenges in distinguishing fine-grained differences among candidate frames. Conversely, training \\( w / l f \\) (with \\( l f \\)) can lead to an increased distance between the gold frame and other candidates, making it difficult to distinguish the gold frame from irrelevant ones. Consequently, in this paper, our aim is to enhance our model's performance in both the \\( w / l f \\) and \\( w / o \\) \\( l f \\) scenarios." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.318, + 0.49, + 0.558 + ], + "angle": 0, + "content": "In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoder Architecture. By employing a dual encoder structure, we can effectively store the representations of all frames during inference, enabling us to efficiently compute the similarity between the target and all frames. Furthermore, considering the constraints imposed by the number of frames, we incorporate contrastive objectives to enhance the trainability of the frame encoder, consequently improving our ability to model definitions more accurately. Additionally, employing a distinct frame or target encoder allows us to map certain frames and targets to a vector space and utilize distance measures to depict their relationship." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.562, + 0.49, + 0.788 + ], + "angle": 0, + "content": "To address the trade-off between training \\( w / \\text{lf} \\) and \\( w / o \\text{lf} \\), we propose a two-stage learning procedure, referred to as coarse-to-fine learning. In the first stage, we employ in-batch learning, using the gold frames of other instances within a batch as hard negative examples. This step helps the model learn to discern frames with distinct semantics. In the second stage, we adopt in-candidate learning, where we utilize other frames from the candidate set as negative samples. This enables the model to further refine its ability to recognize fine-grained semantic differences. With coarse-to-fine learning, COFFTEA achieves a comprehensive performance in both scenarios of \\( w / \\text{lf} \\) and \\( w / o \\text{lf} \\)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.791, + 0.49, + 0.92 + ], + "angle": 0, + "content": "Experiments show that COFFTEA, compared to previous methods on two FrameNet datasets, achieves competitive accuracy \\( w / \\text{lf} \\) and outperforms them by up to 1.53 points in R@1 w/o \\(\\text{lf}\\) and 0.93 overall scores considering both settings. Ablations also verify the contributions of the dual encoder structure and the two-stage learning process. Further analyses suggest that both the target" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.085, + 0.881, + 0.116 + ], + "angle": 0, + "content": "encoder and frame encoder can effectively capture the target-target, and frame-frame relationships." + }, + { + "type": "text", + "bbox": [ + 0.528, + 0.118, + 0.884, + 0.133 + ], + "angle": 0, + "content": "Our contributions can be summarized as follow:" + }, + { + "type": "text", + "bbox": [ + 0.525, + 0.14, + 0.884, + 0.236 + ], + "angle": 0, + "content": "1. We propose COFFTEA, a dual encoder architecture with coarse-to-fine contrastive objectives. COFFTEA can effectively model frame definitions with learnable frame encoders and efficiently select the corresponding frame from over 1,000 frames." + }, + { + "type": "text", + "bbox": [ + 0.524, + 0.245, + 0.885, + 0.341 + ], + "angle": 0, + "content": "2. We conclude the trade-off between \\( w / lf \\) and \\( w / olf \\), and emphasize the performance \\( w / olf \\) in the evaluation of frame identification. With two-stage learning, COFFTEA achieves an overall score improvement of 0.93 on frame identification." + }, + { + "type": "text", + "bbox": [ + 0.524, + 0.351, + 0.884, + 0.431 + ], + "angle": 0, + "content": "3. Further in-depth analysis demonstrates that our frame and target encoders can better model the alignment between frame and target, as well as the relationships between target and target, frame and frame." + }, + { + "type": "list", + "bbox": [ + 0.524, + 0.14, + 0.885, + 0.431 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.443, + 0.699, + 0.458 + ], + "angle": 0, + "content": "2 Task Formulation" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.468, + 0.884, + 0.53 + ], + "angle": 0, + "content": "For a sentence \\(S = w_{1},\\dots ,w_{n}\\) with a target span \\(t = w_{t_s},\\dots ,w_{t_e}\\), frame identification is to select the most appropriate frame \\(f\\in \\mathcal{F}\\) for \\(t\\), where \\(\\mathcal{F}\\) denotes all frames in FrameNet." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.532, + 0.884, + 0.644 + ], + "angle": 0, + "content": "As FrameNet (Baker et al., 2007) provides each frame with an associated set of lexical units (LUs), we can obtain the LU of target \\( t \\) by utilizing its lemma and part-of-speech (POS) in the form lemmaPOS (e.g., get.v) and apply \\( l f \\) to retrieve the lexicon filter candidate frames \\( \\mathcal{F}_t \\) of \\( t \\). Then we focus on selecting \\( f \\in \\mathcal{F}_t \\)." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.655, + 0.659, + 0.672 + ], + "angle": 0, + "content": "3 Methodology" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.68, + 0.885, + 0.858 + ], + "angle": 0, + "content": "To model the alignment between frames and targets efficiently and effectively, in this paper, we propose COFFTEA, a dual encoder architecture with two-stage contrastive objectives. We compare COFFTEA with other baselines modeling frame definitions (§ 3.1). Specifically, to achieve better represent learning of definitions, the frame encoder of COFFTEA is learnable during training. Moreover, in order to make COFFTEA gradually learn to differentiate frames with varying degrees of similarity. We introduce two-stage learning in §3.2." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.867, + 0.712, + 0.882 + ], + "angle": 0, + "content": "3.1 Model Architecture" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.888, + 0.884, + 0.919 + ], + "angle": 0, + "content": "In Fig. 2, we compare the dual-encoder architecture of COFFTEA with three categories of previous meth" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13456" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.157, + 0.095, + 0.48, + 0.108 + ], + "angle": 0, + "content": "Sentence: Can he just get on a plane and fly to Paris?" + }, + { + "type": "text", + "bbox": [ + 0.572, + 0.095, + 0.713, + 0.108 + ], + "angle": 0, + "content": "Frame: Board(vehicle" + }, + { + "type": "text", + "bbox": [ + 0.157, + 0.109, + 0.714, + 0.121 + ], + "angle": 0, + "content": "Definition: A Traveller boards a Vehicle that they intend to use as a means of transportation..." + }, + { + "type": "image", + "bbox": [ + 0.154, + 0.123, + 0.466, + 0.245 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.523, + 0.123, + 0.84, + 0.245 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.153, + 0.253, + 0.458, + 0.382 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.525, + 0.253, + 0.834, + 0.38 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.395, + 0.884, + 0.452 + ], + "angle": 0, + "content": "Figure 2: Comparison between COFFTEA and other baselines. (a) and (b) both fine-tune a Lookup Table containing embeddings of frames with corss entropy loss. (b) uses a frozen frame encoder to initialize the table. (c) employs a single fused encoder to measure the probability of sentence and definition matching. For efficiency purposes, COFFTEA (d) also adopts a dual-encoder structure and leverages contrastive loss to unfreeze the frame encoder." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.477, + 0.489, + 0.685 + ], + "angle": 0, + "content": "ods in frame identification: (a) no definition modeling (Hartmann et al., 2017; Zheng et al., 2022), (b) target encoder and frozen frame encoder (Su et al., 2021; Tamburini, 2022), and (c) single fused encoder (Jiang and Riloff, 2021). Limited by the number of frames in FrameNet, the dual encoder architecture with cross entropy loss (b) have to fix the parameters of the frame encoder while the single encoder architecture (c) have to train and infer under the \\( w /lf \\) setting. Therefore, we still use two encoders to separately encode the sentence with targets and frame definition, and employ contrastive learning to make the frame encoder trainable." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.687, + 0.489, + 0.751 + ], + "angle": 0, + "content": "We follow Su et al. (2021); Jiang and Riloff (2021); Tamburini (2022) to use PLMs (Devlin et al., 2019) as target encoder (§3.1.1) and frame encoder (§3.1.2)." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.765, + 0.299, + 0.78 + ], + "angle": 0, + "content": "3.1.1 Target Encoder" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.786, + 0.489, + 0.881 + ], + "angle": 0, + "content": "The target encoder converts input sentence \\(S\\) with \\(n\\) tokens \\(w_{1},\\ldots ,w_{n}\\) into contextualized representations \\(h_1,\\dots ,h_n\\). The contextualized representation \\(t\\) of target span \\(w_{t_s},\\ldots ,w_{t_e}\\) \\((1\\leq t_{s}\\leq t_{e}\\leq n)\\) is the maxpooling of \\(h_{t_s},\\ldots ,h_{t_e}\\) (Zheng et al., 2023)." + }, + { + "type": "equation", + "bbox": [ + 0.157, + 0.899, + 0.488, + 0.915 + ], + "angle": 0, + "content": "\\[\nh _ {1}, \\dots , h _ {n} = \\operatorname {E n c o d e r} _ {t} \\left(w _ {1}, \\dots , w _ {n}\\right) \\tag {1}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.575, + 0.477, + 0.883, + 0.494 + ], + "angle": 0, + "content": "\\[\nt = \\operatorname {M a x P o o l i n g} \\left(h _ {t _ {s}}, \\dots , h _ {t _ {e}}\\right) \\tag {2}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.502, + 0.884, + 0.646 + ], + "angle": 0, + "content": "With the target encoder, we capture the contextual information of the target sentence and the sufficient modeling of context can be used to find out-of-vocabulary targets. Our goal is to not only ensure a close proximity between the representations of the target and the frame but also to ensure that the target representations in different sentences, which activate the same frame, exhibit a high degree of similarity." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.655, + 0.693, + 0.669 + ], + "angle": 0, + "content": "3.1.2 Frame Encoder" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.674, + 0.885, + 0.819 + ], + "angle": 0, + "content": "Taking Board_vehicle as frame name and its corresponding definition \"A Traveller boards a Vehicle that they intend to use as a means of transportation either as a passenger or as a driver\" as def. Similarly, frame encoder converts \\( D = \\) frame name|def, denoted as \\( w_{1}^{\\prime},\\ldots ,w_{m}^{\\prime} \\) into representations \\( h_1^\\prime ,\\dots ,h_m^\\prime \\). We follow Reimers and Gurevych (2019) to regard meanpooling of all tokens as frame representations \\( f \\)." + }, + { + "type": "equation", + "bbox": [ + 0.525, + 0.842, + 0.883, + 0.861 + ], + "angle": 0, + "content": "\\[\nh _ {1} ^ {\\prime}, \\dots , h _ {m} ^ {\\prime} = \\operatorname {E n c o d e r} _ {f} \\left(w _ {1} ^ {\\prime}, \\dots , w _ {m} ^ {\\prime}\\right) \\tag {3}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.601, + 0.862, + 0.882, + 0.88 + ], + "angle": 0, + "content": "\\[\nf = \\operatorname {M e a n P o o l i n g} \\left(h _ {1} ^ {\\prime}, \\dots , h _ {m} ^ {\\prime}\\right) \\tag {4}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.888, + 0.882, + 0.919 + ], + "angle": 0, + "content": "Through the frame encoder, we encode frame definitions to represent frames. Similar to the target" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13457" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.125, + 0.083, + 0.485, + 0.151 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.295, + 0.152, + 0.314, + 0.162 + ], + "angle": 0, + "content": "(a)" + }, + { + "type": "image", + "bbox": [ + 0.129, + 0.165, + 0.484, + 0.232 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.296, + 0.233, + 0.314, + 0.242 + ], + "angle": 0, + "content": "(b)" + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.26, + 0.49, + 0.332 + ], + "angle": 0, + "content": "Figure 3: Coarse-to-Fine Learning of COFFTEA. In-batch learning (a) is first applied with coarse-grained in-batch negative examples \\(\\mathcal{B}\\). In-candidate learning (b) is then employed to differentiate gold frame with hard negatives \\(\\mathcal{C}\\)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.358, + 0.489, + 0.437 + ], + "angle": 0, + "content": "encoder, the frame encoder not only focuses on aligning frames with targets but is also intended to reflect the semantic relationships between frames themselves, such as Inheritance (Su et al., 2021; Zheng et al., 2022)." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.448, + 0.296, + 0.464 + ], + "angle": 0, + "content": "3.2 Learning Process" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.469, + 0.489, + 0.677 + ], + "angle": 0, + "content": "In order to capture the alignment between frames and targets, we aim to minimize the distance between the target and the gold frame (positive pair) while maximizing the distance between the target and other frames (negative pairs) during the training process. However, encoding such a large number of frames, which exceeds 1000, and updating the encoders with gradients for all of them becomes infeasible. Therefore, we need to sample a subset of frames as negative pairs. As discussed earlier, both training \\( w / o \\) \\( l f \\) and \\( w / l f \\) have their limitations. To address this, we propose a two-stage learning process in Fig. 3." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.678, + 0.489, + 0.821 + ], + "angle": 0, + "content": "We first employ in-batch learning (§3.2.1), where we treat the gold frames of other targets in the same batch as negative examples. This allows us to learn coarse-grained frame semantic differences. Then we utilize in-candidate learning (§3.2.2), where we treat other frames in lexicon filter candidates as hard negatives. This step helps us refine the frame representations and capture fine-grained semantic distinctions" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.823, + 0.489, + 0.919 + ], + "angle": 0, + "content": "Specifically, we adopt cosine similarity \\(\\cos (t,f) = \\frac{t\\cdot f}{\\|t\\|^{\\cdot}\\|f\\|}\\) as distance metric and utilize contrastive learning to distinguish positive pairs from negative pairs. Let \\(\\mathcal{L}_{\\mathcal{B}}\\) and \\(\\mathcal{L}_{\\mathcal{C}}\\) denotes the contrastive loss of in-batch learning and incandidate learning. The main difference between" + }, + { + "type": "table", + "bbox": [ + 0.513, + 0.082, + 0.881, + 0.136 + ], + "angle": 0, + "content": "
Datasetsexemplartraindevtest|F|
FN 1.515394616621228444281019
FN 1.719243119391227267141221
" + }, + { + "type": "table_caption", + "bbox": [ + 0.563, + 0.145, + 0.828, + 0.159 + ], + "angle": 0, + "content": "Table 1: Statistics of FrameNet dataset" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.186, + 0.883, + 0.218 + ], + "angle": 0, + "content": "the two-stage learning lies in the construction of negative pairs \\(\\mathcal{B}\\) and \\(\\mathcal{C}\\)." + }, + { + "type": "equation", + "bbox": [ + 0.525, + 0.231, + 0.883, + 0.268 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {\\mathcal {B}} = - \\log \\frac {\\exp \\left(\\cos \\left(t , f ^ {+}\\right) / \\tau\\right)}{\\sum_ {f \\in \\mathcal {B} \\cup \\{f ^ {+} \\}} \\exp \\left(\\cos \\left(t , f\\right) / \\tau\\right)} \\tag {5}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.526, + 0.271, + 0.883, + 0.308 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {\\mathcal {C}} = - \\log \\frac {\\exp (\\cos (t , f ^ {+}) / \\tau)}{\\sum_ {f \\in \\mathcal {C} \\cup \\{f ^ {+} \\}} \\exp (\\cos (t , f) / \\tau)} \\tag {6}\n\\]" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.32, + 0.715, + 0.336 + ], + "angle": 0, + "content": "3.2.1 In-batch Learning" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.34, + 0.884, + 0.468 + ], + "angle": 0, + "content": "Training directly \\( w / l f \\) may cause the model to primarily focus on distinguishing the differences between the gold frame and the candidates. In order to broaden the model's horizons, we first conduct training \\( w / o l f \\), allowing the model to learn to differentiate coarse-grained semantic differences. We follow Khosla et al. (2020) to construct in-batch negative examples \\( \\mathcal{B} \\)." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.48, + 0.747, + 0.495 + ], + "angle": 0, + "content": "3.2.2 In-candidate Learning" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.5, + 0.884, + 0.612 + ], + "angle": 0, + "content": "Through in-batch learning, our model can effectively differentiate some frames that are relatively easy to distinguish. However, we aim to further distinguish frames that are more likely to be confused with one another. Typically, when using \\(lf\\), the other candidate frames for the same target can serve as negative examples \\(\\mathcal{C}\\)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.613, + 0.884, + 0.742 + ], + "angle": 0, + "content": "However, the number of candidate frames for different targets can vary, and there are even cases where some targets only activate one frame in FrameNet. To address this issue, we pad the number of \\( \\mathcal{C} \\) for all targets to a fixed number (e.g., 15). This padding ensures that each target has a consistent number of candidate frames available for comparison during the training process." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.743, + 0.885, + 0.919 + ], + "angle": 0, + "content": "We consider leveraging the semantic relationships between frames in FrameNet (§A.3) to expand C. Inheritance represents the \"is-a\" relationship between frames. For example, receiving inherits from getting, then getting becomes the super frame and receiving becomes the sub frame. Other frames that also inherit from getting, such as Commerce_buy and Taking, are considered siblings of receiving. These siblings exhibit semantic similarities with receiving, but with subtle differences, making them suitable as hard negative examples." + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13458" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.131, + 0.082, + 0.871, + 0.281 + ], + "angle": 0, + "content": "
ModelsFN 1.5OverallFN 1.7
AccR@1R@3R@5AccR@1R@3R@5
Hartmann et al. (2017)†87.6377.49--82.2583.0076.10--
KGFI (2021)†92.1385.63--88.7692.4085.8191.5992.88
FIDO (2021)†91.30----92.10---
Tamburini (2022)92.57----92.33---
Lookup Table88.6078.4886.7488.1683.2389.0278.7587.4388.71
+ init. with Def90.4083.5688.2589.3286.8590.3085.1788.9389.87
+LB91.0686.5291.7392.6888.7390.9487.1392.3093.21
LBonly†91.8284.7394.4796.1888.1391.5884.8893.8895.90
LConly†92.5076.5187.3591.0183.7592.7078.3388.9391.64
LBonly90.9486.7795.1496.7988.8191.3687.3895.2996.77
COFFTEA92.5587.6992.6494.7190.0592.6487.3492.9194.29
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.29, + 0.883, + 0.364 + ], + "angle": 0, + "content": "Table 2: Main results on FN1.5 and 1.7. Acc denotes accuracy with lexicon filtering and \\(\\mathbf{R}@\\boldsymbol{k}\\) denotes recall at \\(k\\) without lexicon filtering. Overall represents the harmonic mean of Acc and \\(\\mathbf{R}@\\mathbf{1}\\), reflecting the comprehensive capability of models. Through dual encoders and two-stage learning, COFFTEA outperforms the previous methods (the topmost block) by at least 0.93 overall scores. Ablation study on dual encoders and two-stage learning is listed in the middle and bottom blocks (\\(\\S 4.4\\)). \\(\\dagger\\) means the model does not trained with exemplar sentences." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.387, + 0.489, + 0.419 + ], + "angle": 0, + "content": "We follow the order of candidate frames, sibling frames, and random frames to construct \\(\\mathcal{C}\\)." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.43, + 0.254, + 0.447 + ], + "angle": 0, + "content": "4 Experiment" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.455, + 0.449, + 0.471 + ], + "angle": 0, + "content": "Our experiments mainly cover three aspects:" + }, + { + "type": "text", + "bbox": [ + 0.136, + 0.478, + 0.489, + 0.558 + ], + "angle": 0, + "content": "- Main experimental results on frame identification: We compare the performance of COFFTEA with previous approaches both with lexicon filtering \\((w / l f)\\) and without lexicon filtering \\((w / o l f)\\)." + }, + { + "type": "text", + "bbox": [ + 0.136, + 0.568, + 0.49, + 0.631 + ], + "angle": 0, + "content": "- Further ablation study: to demonstrate the contributions of the learnable frame encoder and Coarse-to-Fine learning to the performance of COFFTEA." + }, + { + "type": "text", + "bbox": [ + 0.136, + 0.641, + 0.49, + 0.737 + ], + "angle": 0, + "content": "- In-depth representation analysis: We delve into a deeper analysis to investigate how the frame and target encoder of COFFTEA can better represent the alignment between frames and targets, as well as the relationships between frames and frames, targets and targets." + }, + { + "type": "list", + "bbox": [ + 0.136, + 0.478, + 0.49, + 0.737 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.754, + 0.229, + 0.769 + ], + "angle": 0, + "content": "4.1 Datasets" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.775, + 0.49, + 0.919 + ], + "angle": 0, + "content": "We have introduced COFFTEA on two FrameNet datasets: FN 1.5 and FN 1.7. FN 1.7 is an extensive version of FN 1.5, with more annotated sentences and more defined frames. Following Swayamdipta et al. (2017); Su et al. (2021), we spilt the full text into train, dev and test set, and further use exemplars in FrameNet as pretraining data like Peng et al. (2018); Zheng et al. (2022); Tamburini (2022). Table 1 shows the statistics of two datasets." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.387, + 0.614, + 0.401 + ], + "angle": 0, + "content": "4.2 Models" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.41, + 0.885, + 0.538 + ], + "angle": 0, + "content": "We mainly compare COFFTEA with representative previous methods from the different categories shown in Fig. 2: traditional representation learning based methods without definitions (Hartmann et al., 2017), dual encoder architectures with frozen frame encoders (KGFI (2021), Tamburini (2022)), and single fused encoder architectures (FIDO (2021))." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.541, + 0.886, + 0.654 + ], + "angle": 0, + "content": "In order to conduct further ablation study and deeper analysis, we also implement two baselines represented as (a) and (b) in Fig 2: Lookup Table with random initialization and Lookup Table initialized with definition representations. The implementation details of previous methods, baselines, and COFFTEA can be found in §A.1." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.669, + 0.661, + 0.684 + ], + "angle": 0, + "content": "4.3 Main Results" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.693, + 0.884, + 0.805 + ], + "angle": 0, + "content": "To compare our model with previous approaches, as well as our baselines. We report the accuracy (Acc) when lexicon filtering is applied, recall at k \\((\\mathbf{R}@\\mathbf{k})\\) when no lexicon filtering is used (indicating whether the gold frame is ranked in the top \\(k\\) based on similarity), and an Overall score (harmonic average of Acc and R@1)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.807, + 0.885, + 0.919 + ], + "angle": 0, + "content": "The upper block of Table 2 shows the performance of previous representative methods in frame identification. COFFTEA achieves a performance gain of 0.93 overall scores (88.98 v.s. 89.91), primarily due to a 1.53 increase in R@1 scores (85.81 v.s. 87.34) in the w/o l f setting. This improvement can be attributed to the use of a learnable frame" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13459" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.151, + 0.082, + 0.849, + 0.136 + ], + "angle": 0, + "content": "
ModelsPredictions w/o If from rank 2 to 5 (Top-1 is Becoming)
L3 only†Transition_to_a_stateUndergo_transformationChange_post_stateUndergo_change
Lc only†Activity_startLaunch_processMake_acquaintanceMeet_specifications
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.145, + 0.884, + 0.175 + ], + "angle": 0, + "content": "Table 3: Predictions in positions 2 to 5 of \"The children and families who come to Pleasant Run are given the opportunity to become happy\". red means the frame is irrelevant to the gold frame Becoming." + }, + { + "type": "text", + "bbox": [ + 0.112, + 0.2, + 0.49, + 0.344 + ], + "angle": 0, + "content": "encoder and two-stage learning, which enhance the effectiveness of COFFTEA in modeling definitions. Compared to KGFI, COFFTEA achieves comparable Acc \\( w / l f \\) (92.40 v.s. 92.64) and consistently performs better in \\( R@k \\), which further demonstrates that through combining in-batch learning and in-candidate learning, COFFTEA is able to select the appropriate frame from both candidates (\\( w/lf \\)) and all frames (\\( w/o l f \\))." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.346, + 0.489, + 0.442 + ], + "angle": 0, + "content": "Moreover, it is worth noting that some methods (marked \\(\\dagger\\)) does not utilize exemplars as training data, while previous researches (Su et al., 2021; Zheng et al., 2022) believe that using exemplars for training improves accuracy. Further discussion about using exemplars can be found in §4.4." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.444, + 0.49, + 0.524 + ], + "angle": 0, + "content": "In addition to representative methods in Table 2, there is a series of frame identification studies that solely focus on Acc w/lf. We report the results of COFFTEA and more previous frame identification works in \\(\\S \\mathbf{B}.2\\)" + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.54, + 0.281, + 0.555 + ], + "angle": 0, + "content": "4.4 Ablation Study" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.563, + 0.49, + 0.755 + ], + "angle": 0, + "content": "Frame Encoder Can learnable frame encoder contribute to frame identification? As is shown in the middle block in Table 2, lookup table without definitions achieved relatively low overall scores (83.57). However, when we initialize the lookup table with the definitions encoded by the frozen encoder, the lookup table showed a significant improvement in R@1 w/o lf, with an increase of 6.42 points (78.75 v.s. 85.17). This indicates that even without adjusting the parameters, the frozen encoder of PLMs is capable of modeling the definitions to some extent." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.758, + 0.49, + 0.87 + ], + "angle": 0, + "content": "To further explore its impact, we apply in-batch learning to the lookup table with definitions. This additional step results in a further improvement of 1.96 points in R@1 w/o lf (85.17 v.s. 87.13). This suggests that in-batch learning reduces the number of negative samples, decreases the learning difficulty, and ultimately leads to better performance." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.872, + 0.49, + 0.92 + ], + "angle": 0, + "content": "Comparing COFFTEA to these lookup tables, we find that unfreezing the frame encoder allows for better modeling of fine-grained semantic differ" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.2, + 0.885, + 0.298 + ], + "angle": 0, + "content": "ences, resulting in a significant increase of 1.70 points in accuracy \\( w / l f \\) (90.94 v.s. 92.64). This demonstrates the effectiveness of incorporating an unfrozen frame encoder to enhance the modeling of subtle semantic distinctions and improve the performance of the frame identification task." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.309, + 0.885, + 0.452 + ], + "angle": 0, + "content": "Coarse-to-Fine Learning The bottom block in Table 2 demonstrates the trade-off between in-batch learning \\((\\mathcal{L}_{\\mathcal{B}}\\) only) and in-candidate learning \\((\\mathcal{L}_{\\mathcal{C}}\\) only). \\(\\mathcal{L}_{\\mathcal{B}}\\) only achieves the highest R@1 (84.88) and \\(\\mathcal{L}_{\\mathcal{C}}\\) only yields the highest Acc (92.70). However, the former approach does not excel at distinguishing fine-grained frames (91.58 Acc), while the latter approach even performs worse than the lookup table on R@1 w/o lf (78.33 v.s. 78.75)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.455, + 0.885, + 0.614 + ], + "angle": 0, + "content": "Table 3 gives a specific example for comparison. Both methods can correctly predict the frame corresponding to the target become in the given sentence. However, when looking at the predicted frames in positions 2 to 5, the frames predicted by in-batch learning show structural relationships with Becoming, while the frames predicted by in-candidate learning have no connection to becoming. This reflects that in-candidate learning cannot distinguishing frames sufficiently." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.617, + 0.884, + 0.713 + ], + "angle": 0, + "content": "To address this issue, we train COFFTEA with \\(\\mathcal{L}_{\\mathcal{B}}\\) on exemplars and then train COFFTEA with \\(\\mathcal{L}_{\\mathcal{C}}\\) with train split, which is equivalent to performing coarse-grained pretraining on a large-scale corpus and then fine-tuning on a smaller dataset for domain adaptation at a finer granularity." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.715, + 0.884, + 0.779 + ], + "angle": 0, + "content": "We also apply in-batch learning on both train and exemplar. Due to the lack of hard negatives, its performance on Acc \\( w /lf \\) is lower than COFFTEA (91.36 v.s. 92.64)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.791, + 0.885, + 0.92 + ], + "angle": 0, + "content": "Exemplars Using exemplars as additional training data is a common practice (Peng et al., 2018; Chen et al., 2021; Zheng et al., 2022). Since in-batch learning benefits from larger-scale data (84.88 v.s. 87.38 in Table 2), we chose to use the larger set, exemplars for the first stage of in-batch learning. However, this makes our results not directly comparable to those of previous methods (Su" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13460" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.131, + 0.083, + 0.472, + 0.203 + ], + "angle": 0, + "content": "
Modelsw/ exam.w/o exam.Δ
Tamburini (2022)91.4292.33-0.91
Lookup Table89.0289.41-0.39
+ init. with Def90.4090.66-0.26
+LB91.0691.23-0.17
LBonly91.3691.58-0.22
COFFTEA92.5592.240.31
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.213, + 0.49, + 0.257 + ], + "angle": 0, + "content": "Table 4: Training with extra exemplars does not increase the model performance. COFFTEA can effectively utilize exemplars via two-stage learning." + }, + { + "type": "table", + "bbox": [ + 0.13, + 0.271, + 0.472, + 0.354 + ], + "angle": 0, + "content": "
ModelsAccAcc w/ [MASK]Δ
Lookup Table89.0278.1110.92
+ init. with Def90.3077.5812.72
+LB90.9477.9113.03
COFFTEA92.6485.826.82
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.364, + 0.489, + 0.422 + ], + "angle": 0, + "content": "Table 5: Masking target words can cause the decrease of accuracy. The extent of the decrease, \\(\\Delta\\), reflects whether the model understands the context information of the target." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.449, + 0.49, + 0.61 + ], + "angle": 0, + "content": "et al., 2021) that only use the training set. However, more training data does not necessarily lead to improved performance. As shown in Table 4, the performance of Tamburini (2022) and our lookup table baselines decreases after using exemplars, possibly due to a domain mismatch between the exemplars and the training set. However, our two-stage approach effectively utilizes both datasets to get an improvement of 0.31 Acc, providing a more appropriate way to utilize exemplars for future work." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.624, + 0.295, + 0.64 + ], + "angle": 0, + "content": "4.5 Further Analysis" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.646, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Target-Frame Alignments The results in Table 2 demonstrate that COFFTEA effectively models the alignment between targets and frames. However, we still want to explore whether the model's ability to predict a frame is due to its accurate modeling of the target's contextual information in the sentence or if there are other shortcuts involved. Moreover, if COFFTEA can effectively model the context of the target, it can also be used to discover out-of-vocabulary targets. To investigate this, we replace the target in the sentence with the [MASK] token and compute the similarity between the masked target representation and frames. Table 5 shows that when the target is masked, the accuracy of the model decreases across the board. COFFTEA achieves the smallest decrease in performance \\((\\Delta)\\), indicating the capability of our dual" + }, + { + "type": "table", + "bbox": [ + 0.527, + 0.083, + 0.866, + 0.184 + ], + "angle": 0, + "content": "
ModelsR@110 target exemplars
R@1R@3R@5
Lookup Table78.7563.9675.5477.27
+ init. with Def85.1781.7189.5190.33
+ Lβ87.1383.0492.2493.40
COFFTEA87.3485.5893.0794.89
" + }, + { + "type": "table_caption", + "bbox": [ + 0.509, + 0.194, + 0.885, + 0.251 + ], + "angle": 0, + "content": "Table 6: Representing frames with definitions and ten target exemplars. The target encoder of COFFTEA can get similar and consistent representations of targets related to the same frame." + }, + { + "type": "table", + "bbox": [ + 0.558, + 0.265, + 0.836, + 0.391 + ], + "angle": 0, + "content": "
ModelsAverage Δα/α
Lookup Table0.158
+ init. with Def0.012
+LB0.070
LBonly†56.290
LConly†6.494
COFFTEA121.816
COFFTEA w/o. sibling34.907
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.4, + 0.884, + 0.472 + ], + "angle": 0, + "content": "Table 7: The learnable frame encoder better models the structured information between frames. The perception of structure in COFFTEA comes from the first stage of in-batch learning and the utilization of siblings as hard negatives." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.498, + 0.884, + 0.562 + ], + "angle": 0, + "content": "encoder structure to effectively model the alignment between target context and frames. This capability also indicates that COFFTEA can explore out-of-vocabulary targets." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.572, + 0.885, + 0.83 + ], + "angle": 0, + "content": "Target-Target Relations The target encoder ensures a close proximity between targets and their corresponding frames. However, we believe that different sentences the target representations in different sentences, which activate the same frame, are supposed to exhibit a high degree of similarity. We select ten exemplars for each frame and replace frame representations with the mean representation (centroid) of these exemplars. In Table 6, we compare two frame representations: directly encoding the definition and encoding ten exemplars. COFFTEA achieves consistent and similar performance in both settings (87.34 and 85.58), reflecting the similarity between the target representations of the same frame and the final frame representation, as captured by our target encoder." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.84, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Frame-Frame Relations Due to the semantic relations defined by FrameNet between frames (such as inheritance, using, subframe, etc.), frames are not isolated but rather interconnected with each other, forming structural relationships. For exam" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.524, + 0.941 + ], + "angle": 0, + "content": "13461" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.114, + 0.085, + 0.49, + 0.166 + ], + "angle": 0, + "content": "ple, if receiving inherits from getting, their representations should be similar. Frame representations should reflect the structural relationships. To evaluate the degree of similarity between a subframe \\( f_{sub} \\) and its superframe \\( f_{sup} \\), we define a metric," + }, + { + "type": "equation", + "bbox": [ + 0.206, + 0.172, + 0.488, + 0.21 + ], + "angle": 0, + "content": "\\[\n\\alpha = \\frac {1}{| \\mathcal {F} |} \\cdot \\sum_ {f \\in \\mathcal {F}} \\cos \\left(f _ {\\text {s u b}}, f\\right) \\tag {7}\n\\]" + }, + { + "type": "equation", + "bbox": [ + 0.192, + 0.215, + 0.488, + 0.232 + ], + "angle": 0, + "content": "\\[\n\\Delta \\alpha = \\cos \\left(f _ {s u b}, f _ {s u p}\\right) - \\alpha \\tag {8}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.239, + 0.489, + 0.304 + ], + "angle": 0, + "content": "\\(\\frac{\\Delta \\alpha}{\\alpha}\\) is a normalized evaluation reflecting how a subframe is close to its superframe compared to other frames. We report the average \\(\\frac{\\Delta \\alpha}{\\alpha} (\\alpha > 0)\\) of inheritance pairs in Table 7." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.305, + 0.49, + 0.417 + ], + "angle": 0, + "content": "The baselines (the upper block) without a learnable frame encoder struggle to model the relationships between frames effectively. The distance between subframes and superframes is almost the same as that between other frames. However, using a learnable frame encoder greatly improves the similarity between subframes and superframes." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.418, + 0.49, + 0.595 + ], + "angle": 0, + "content": "In-candidate learning, if used alone, tends to overly focus on differentiating frames with similar semantics, which actually decreases the similarity between them (6.494 v.s. 56.290). On the other hand, COFFTEA effectively models the similarity between associated frames. This is mainly because we use two-stage learning and treat siblings as hard negative examples during training (34.907 v.s. 121.816), which indirectly enables the model to learn the connection between subframes and superframes." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.606, + 0.271, + 0.621 + ], + "angle": 0, + "content": "5 Related Work" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.63, + 0.49, + 0.693 + ], + "angle": 0, + "content": "Frame Identification Prior research in frame identification has primarily focused on modeling the similarity between targets and frames or assessing the matching score between them." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.695, + 0.492, + 0.92 + ], + "angle": 0, + "content": "In terms of modeling similarity, Hartmann et al. (2017); Peng et al. (2018); Zheng et al. (2022) leverage target encoder with a trainable frame representation table, while ignoring the valuable contextual frame information provided by FrameNet. To remedy this deficiency, Su et al. (2021); Tamburini (2022) both propose to incorporate frame definitions into frame encoder. Despite these efforts, the number of frames and the optimizing objective make it infeasible to update frame representation during training, leading to a compromise of freezing it. Consequently, they all trap in the dilemma to obtain optimal frame representation. As for assessing the matching score, Jiang and Riloff (2021)" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.149 + ], + "angle": 0, + "content": "propose a fused encoder to evaluate semantic coherence between sentence and frame definition. Nevertheless, it just fails to evaluate the performance of \\( w / o \\) \\( l f \\) scenario." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.15, + 0.885, + 0.276 + ], + "angle": 0, + "content": "In addition, the aforementioned studies tend to adopt a one-sided relationship between targets and frames. They only train model on either \\( w / \\text{lf} \\) or \\( w / o \\text{lf} \\), which can not catch an overall horizon in distinguishing frames. Moreover, only Su et al. (2021) release performance under \\( w / o \\text{lf} \\) scenario, which is essential for evaluating the full capabilities of the model." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.278, + 0.884, + 0.343 + ], + "angle": 0, + "content": "Some other work like Chanin (2023) treat frame semantic parsing as a sequence-to-sequence text generation task, but its still trap in training under \\( w / l f \\) and can not catch an optimal relationships." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.351, + 0.884, + 0.496 + ], + "angle": 0, + "content": "Metric Learning Metric learning is a fundamental approach in machine learning that seeks to learn a distance metric or similarity measure that accurately captures the inherent relationships between data points. One particular technique that has gained prominence in this area is Contrastive Learning, which has been extensively applied to a variety of tasks such as text classification (Gao et al., 2021), image classification (He et al., 2020)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.497, + 0.884, + 0.689 + ], + "angle": 0, + "content": "The optimized feature space retrieved from Contrastive Learning objective can benefit on learning better representations of data and capturing inner relationship. For frame identification, the primary goal is to obtain a well-aligned target-to-frame space. However, existing researches only focus on using Cross Entropy to directly modeling correlation to All Frames, which presents challenges in capturing complex relationships. Alternatively, Contrastive Learning can be leveraged to optimize and incrementally construct the feature space of frames and targets." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.702, + 0.642, + 0.716 + ], + "angle": 0, + "content": "6 Conclusion" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.727, + 0.885, + 0.919 + ], + "angle": 0, + "content": "We propose COFFTEA, and its dual encoder can effectively model the definitions with learnable frame encoder and efficiently calculate the similarity scores between a target and all frames. We also conclude that there exists a trade-off between training \\( w / l f \\) and \\( w / o \\) \\( l f \\), and achieves a comprehensive performance with a two stage learning process. Detailed analysis of the experiments further demonstrates that our two encoders are not limited to their alignment but can also discover other connections between frame and frame, as well as target and target." + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13462" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.115, + 0.085, + 0.221, + 0.1 + ], + "angle": 0, + "content": "Limitations" + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.111, + 0.387, + 0.126 + ], + "angle": 0, + "content": "The limitations of our work include:" + }, + { + "type": "text", + "bbox": [ + 0.131, + 0.139, + 0.49, + 0.219 + ], + "angle": 0, + "content": "1. We only used cosine similarity as a distance metric and did not explore other methods of metric learning. Investigating alternative distance metrics could potentially enhance the performance of our model." + }, + { + "type": "text", + "bbox": [ + 0.129, + 0.231, + 0.491, + 0.344 + ], + "angle": 0, + "content": "2. Currently, the FrameNet dataset does not provide test data for out-of-vocabulary words. Therefore, our exploration of out-of-vocabulary words is limited to preliminary experiments (Table 5). Further investigation with a dedicated dataset containing out-of-vocabulary test data would be valuable." + }, + { + "type": "text", + "bbox": [ + 0.129, + 0.356, + 0.49, + 0.468 + ], + "angle": 0, + "content": "3. We only applied the dual-encoder architecture to frame identification and did not explore its application to frame semantic role labeling. Extending our approach to frame semantic role labeling would provide insights into its effectiveness and generalizability beyond frame identification." + }, + { + "type": "list", + "bbox": [ + 0.129, + 0.139, + 0.491, + 0.468 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.482, + 0.287, + 0.499 + ], + "angle": 0, + "content": "Acknowledgements" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.508, + 0.49, + 0.556 + ], + "angle": 0, + "content": "We thank all reviewers for their great efforts. This paper is supported by the National Science Foundation of China under Grant No.61936012." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.585, + 0.214, + 0.6 + ], + "angle": 0, + "content": "References" + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.608, + 0.49, + 0.688 + ], + "angle": 0, + "content": "Collin Baker, Michael Ellsworth, and Katrin Erk. 2007. SemEval-2007 task 19: Frame semantic structure extraction. In Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007), pages 99–104, Prague, Czech Republic. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.698, + 0.49, + 0.791 + ], + "angle": 0, + "content": "Collin F. Baker, Charles J. Fillmore, and John B. Lowe. 1998. The Berkeley FrameNet project. In 36th Annual Meeting of the Association for Computational Linguistics and 17th International Conference on Computational Linguistics, Volume 1, pages 86-90, Montreal, Quebec, Canada. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.801, + 0.488, + 0.83 + ], + "angle": 0, + "content": "David Ian Chanin. 2023. Open-source frame semantic parsing. ArXiv, abs/2303.12788." + }, + { + "type": "ref_text", + "bbox": [ + 0.116, + 0.84, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Xudong Chen, Ce Zheng, and Baobao Chang. 2021. Joint multi-decoder framework with hierarchical pointer network for frame semantic parsing. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 2570-2578, Online. Association for Computational Linguistics." + }, + { + "type": "list", + "bbox": [ + 0.116, + 0.608, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.086, + 0.886, + 0.204 + ], + "angle": 0, + "content": "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." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.215, + 0.885, + 0.281 + ], + "angle": 0, + "content": "Charles J Fillmore et al. 1976. Frame semantics and the nature of language. In Annals of the New York Academy of Sciences: Conference on the origin and development of language and speech, volume 280, pages 20-32. New York." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.291, + 0.885, + 0.383 + ], + "angle": 0, + "content": "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." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.393, + 0.885, + 0.46 + ], + "angle": 0, + "content": "Daniel Gildea and Daniel Jurafsky. 2000. Automatic labeling of semantic roles. In Proceedings of the 38th Annual Meeting of the Association for Computational Linguistics, pages 512-520, Hong Kong. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.469, + 0.885, + 0.562 + ], + "angle": 0, + "content": "Shaoru Guo, Yong Guan, Ru Li, Xiaoli Li, and Hongye Tan. 2020. Incorporating syntax and frame semantics in neural network for machine reading comprehension. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2635-2641, Barcelona, Spain (Online). International Committee on Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.572, + 0.885, + 0.664 + ], + "angle": 0, + "content": "Silvana Hartmann, Ilia Kuznetsov, Teresa Martin, and Iryna Gurevych. 2017. Out-of-domain FrameNet semantic role labeling. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 471-482, Valencia, Spain. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.674, + 0.886, + 0.753 + ], + "angle": 0, + "content": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9729-9738." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.763, + 0.885, + 0.843 + ], + "angle": 0, + "content": "Tianyu Jiang and Ellen Riloff. 2021. Exploiting definitions for frame identification. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2429-2434, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.511, + 0.853, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. 2020. Supervised contrastive learning. Advances in neural information processing systems, 33:18661-18673." + }, + { + "type": "list", + "bbox": [ + 0.511, + 0.086, + 0.886, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.929, + 0.525, + 0.941 + ], + "angle": 0, + "content": "13463" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.192 + ], + "angle": 0, + "content": "Hao Peng, Sam Thomson, Swabha Swayamdipta, and Noah A. Smith. 2018. Learning joint semantic parsers from disjoint data. 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 1492-1502, New Orleans, Louisiana. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.201, + 0.49, + 0.306 + ], + "angle": 0, + "content": "Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. 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, Hong Kong, China. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.315, + 0.49, + 0.381 + ], + "angle": 0, + "content": "Yuqi Si and Kirk Roberts. 2018. A frame-based nlp system for cancer-related information extraction. In AMIA annual symposium proceedings, volume 2018, page 1524. American Medical Informatics Association." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.391, + 0.49, + 0.51 + ], + "angle": 0, + "content": "Xuefeng Su, Ru Li, Xiaoli Li, Jeff Z. Pan, Hu Zhang, Qinghua Chai, and Xiaoqi Han. 2021. A knowledge-guided framework for frame identification. 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 5230-5240, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.519, + 0.49, + 0.573 + ], + "angle": 0, + "content": "Swabha Swayamdipta, Sam Thomson, Chris Dyer, and Noah A Smith. 2017. Frame-semantic parsing with softmax-margin segmental rnns and a syntactic scaffold. arXiv preprint arXiv:1706.09528." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.582, + 0.49, + 0.66 + ], + "angle": 0, + "content": "Fabio Tamburini. 2022. Combining ELECTRA and adaptive graph encoding for frame identification. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 1671-1679, Marseille, France. European Language Resources Association." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.671, + 0.49, + 0.776 + ], + "angle": 0, + "content": "Ce Zheng, Xudong Chen, Runxin Xu, and Baobao Chang. 2022. A double-graph based framework for frame semantic parsing. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4998-5011, Seattle, United States. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.785, + 0.49, + 0.853 + ], + "angle": 0, + "content": "Ce Zheng, Yiming Wang, and Baobao Chang. 2023. Query your model with definitions in framenet: an effective method for frame semantic role labeling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 14029-14037." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.853 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.929, + 0.525, + 0.941 + ], + "angle": 0, + "content": "13464" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.115, + 0.085, + 0.321, + 0.101 + ], + "angle": 0, + "content": "A Experiment Details" + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.121, + 0.293, + 0.135 + ], + "angle": 0, + "content": "A.1 Baseline Models" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.15, + 0.489, + 0.198 + ], + "angle": 0, + "content": "Hartmann et al. (2017): a simple classifier based on the representation of entire sentence and especially dependents of target." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.199, + 0.487, + 0.245 + ], + "angle": 0, + "content": "Peng et al. (2018): a joint model to learn semantic parsers from disjoint corpora with a latent variable formulation." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.247, + 0.489, + 0.294 + ], + "angle": 0, + "content": "Chen et al. (2021): a joint model of multi-decoder and hierarchical pointer network for frame semantic parsing." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.295, + 0.487, + 0.326 + ], + "angle": 0, + "content": "FIDO (2021): a fused model assessing semantics coherence between sentence and frame definition." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.327, + 0.489, + 0.375 + ], + "angle": 0, + "content": "KGFI (2021): a dual encoders model for frame identification aligning similarity of targets and precomputed frame representation." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.376, + 0.487, + 0.407 + ], + "angle": 0, + "content": "Tamburini (2022): similar to Su et al. (2021) with more reliable graph technique." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.408, + 0.487, + 0.439 + ], + "angle": 0, + "content": "KID (2022): a double graph based model for frame semantic parsing." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.44, + 0.487, + 0.471 + ], + "angle": 0, + "content": "AGED (2023): a query-based framework for Frame Semantic Role Labeling under frame definition." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.472, + 0.489, + 0.519 + ], + "angle": 0, + "content": "Chanin (2023): a T5-based model treating frame semantic parsing as sequence-to-sequence text generation task." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.52, + 0.489, + 0.566 + ], + "angle": 0, + "content": "Lookup Table: a baseline model aligning target encoder with trainable one-hot mapping frame representation." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.568, + 0.489, + 0.616 + ], + "angle": 0, + "content": "Lookup Table init. with definition: a baseline model aligning target encoder with trainable BERT-initialized frame representation." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.617, + 0.489, + 0.664 + ], + "angle": 0, + "content": "Lookup Table init. with definition and \\(\\mathcal{L}_{\\mathcal{B}}\\): using Contrastive Loss as optimize objective instead of Cross Entropy." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.691, + 0.364, + 0.707 + ], + "angle": 0, + "content": "A.2 Hyper-parameter Setting" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.72, + 0.489, + 0.767 + ], + "angle": 0, + "content": "For replicability of our work, we list the Hyperparameter setting of all our baselines and COFFTEA in Table 8." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.794, + 0.289, + 0.808 + ], + "angle": 0, + "content": "A.3 Frame Relation" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.823, + 0.489, + 0.918 + ], + "angle": 0, + "content": "Given a frame \\( f \\), to get its sibling frames \\( \\mathcal{F}_{sib} \\), we utilize the frame relation Inheritance and consider \\( f \\) as the superior or subordinate frame of Inheritance to retrieve its subordinate or superior frames, and then get the sibling of \\( f \\). Table 9 shows the Inheritance relation we used." + }, + { + "type": "table", + "bbox": [ + 0.543, + 0.083, + 0.852, + 0.242 + ], + "angle": 0, + "content": "
Hyper-parameterValue
Epochs20
Learning Rate2e-5
OptimizerAdamW
Batch Size of LB32
Gradient Accumulation of LB4
Temperature of LB0.07
Batch Size of LC6
Gradient Accumulation of LC3
Candidate Frame Number of LC15
Temperature of LC1
Dual EncodersBERT-base
" + }, + { + "type": "table_caption", + "bbox": [ + 0.579, + 0.252, + 0.812, + 0.266 + ], + "angle": 0, + "content": "Table 8: Hyper-parameter settings" + }, + { + "type": "table", + "bbox": [ + 0.535, + 0.28, + 0.859, + 0.455 + ], + "angle": 0, + "content": "
Sup frameSub frame
GettingReceiving \nAmassing \nCommerce_buy \nCommerce_generate \nTaking
ReceivingBorrowing
Transition_to_a_stateBecoming \nUndergo_change
Undergo_changeUndergo_transformation
BecomingTransition_to_a_quality
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.465, + 0.884, + 0.507 + ], + "angle": 0, + "content": "Table 9: A part of pairs of Inheritance relation, see more at https://framenet.icsi.berkeley.edu/fndrupal/." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.533, + 0.855, + 0.55 + ], + "angle": 0, + "content": "B Supplementary Experiment Results" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.56, + 0.801, + 0.574 + ], + "angle": 0, + "content": "B.1 Statistical Results of COFFTEA" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.581, + 0.884, + 0.677 + ], + "angle": 0, + "content": "To verify that our experimental results were not accidental, we train COFFTEA with five different random seeds for each dataset. Compare with the strongest model (Su et al., 2021), we can get better performance consistently. Table 10 shows the average performances with its deviation." + }, + { + "type": "table", + "bbox": [ + 0.52, + 0.689, + 0.875, + 0.785 + ], + "angle": 0, + "content": "
DatasetModelsAvg. ± Dev.
w/ Ifw/o If
FN1.5KGFI92.4084.41
COFFTEA92.51 ± 0.1487.26 ± 0.10
FN1.7KGFI92.1385.63
COFFTEA92.50 ± 0.0587.29 ± 0.41
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.794, + 0.884, + 0.838 + ], + "angle": 0, + "content": "Table 10: Statistical results of multiple runs on FN1.7. We train our models in with five different random seeds and report the average performance with deviation." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.866, + 0.816, + 0.881 + ], + "angle": 0, + "content": "B.2 Comparison with More Methods" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.888, + 0.882, + 0.919 + ], + "angle": 0, + "content": "As most previous work only focus on performance in the \\( w /lf \\) setting, we conduct a comprehensive" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.525, + 0.941 + ], + "angle": 0, + "content": "13465" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.117, + 0.085, + 0.49, + 0.196 + ], + "angle": 0, + "content": "comparison on both All frames and Amb frames, where Amb is a subset of All whose target is polysemous or can evkoe multiple frames. And we find that Tamburini (2022) just use a smaller test set on both FN1.5 and FN1.7. So our COFFTEA achieves competitive performance compared to the strongest models." + }, + { + "type": "table", + "bbox": [ + 0.129, + 0.206, + 0.474, + 0.379 + ], + "angle": 0, + "content": "
ModelsFN 1.5FN 1.7
AllAmbAllAmb
Hartmann et al. †87.6373.8083.0071.70
Peng et al.90.0078.0089.1077.50
Chen et al.90.5079.10--
FIDO†91.3081.0092.1083.80
KGFI†92.1382.3492.4084.41
AGED91.6381.57--
KID91.7081.7291.7083.03
Tamburini92.5783.5892.3384.22
Chanin--89.0077.50
COFFTEA92.5583.6192.6484.95
" + }, + { + "type": "table_caption", + "bbox": [ + 0.117, + 0.389, + 0.49, + 0.459 + ], + "angle": 0, + "content": "Table 11: Frame identification accuracy with lexicon filtering on FrameNet test dataset, 'All' and 'Amb' denote testing on test data and ambiguous data respectively. \\(\\dagger\\) means the model does not trained with exemplar sentences." + }, + { + "type": "page_number", + "bbox": [ + 0.479, + 0.929, + 0.526, + 0.941 + ], + "angle": 0, + "content": "13466" + } + ] +] \ No newline at end of file diff --git a/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_origin.pdf b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ca6b2fd5f20047213e711ae113771c2b6e57241c --- /dev/null +++ b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/f6cefb02-7767-4ef1-b92c-66f94f1c063a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:594a114755e906a245de52b4d49623c4ec8e9919ac12a45cc8086e156918aa46 +size 608740 diff --git a/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/full.md b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1ba57e58ca1d652885ea79ab62936c59f9526f7a --- /dev/null +++ b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/full.md @@ -0,0 +1,377 @@ +# Coarse-to-Fine Dual Encoders are Better Frame Identification Learners + +Kaikai An $^{1,2*}$ , Ce Zheng $^{1*}$ , Bofei Gao $^{1}$ , Haozhe Zhao $^{1,2}$ , Baobao Chang $^{1\dagger}$ + +$^{1}$ National Key Laboratory for Multimedia Information Processing, School of Computer Science, Peking University + +$^{2}$ School of Software & Microelectronics, Peking University {ankaikai, zce1112zslx, gaobofei, hanszhao}@stu.pku.edu.cn chbb@pku.edu.cn + +# Abstract + +Frame identification aims to find semantic frames associated with target words in a sentence. Recent researches measure the similarity or matching score between targets and candidate frames by modeling frame definitions. However, they either lack sufficient representation learning of the definitions or face challenges in efficiently selecting the most suitable frame from over 1000 candidate frames. Moreover, commonly used lexicon filtering $(lf)$ to obtain candidate frames for the target may ignore out-of-vocabulary targets and cause inadequate frame modeling. In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoders Architecture. With contrastive learning and dual encoders, COFFTEA efficiently and effectively models the alignment between frames and targets. By employing a coarse-to-fine curriculum learning procedure, COFFTEA gradually learns to differentiate frames with varying degrees of similarity. Experimental results demonstrate that COFFTEA outperforms previous models by 0.93 overall scores and $1.53\mathrm{R@1}$ without $lf$ . Further analysis suggests that COFFTEA can better model the relationships between frame and frame, as well as target and target. The code for our approach is available at https://github.com/ pkunlp-icler/COFFTEA. + +# 1 Introduction + +Frame Identification (Gildea and Jurafsky, 2000; Baker et al., 2007) aims to identify a semantic frame for the given target word in a sentence. The frames defined in FrameNet (Baker et al., 1998) are associated with word meanings as encyclopedia knowledge (Fillmore et al., 1976), which represent different events, situations, relations and objects. Identifying frames can contribute to extracting frame semantic structures from a sentence, and + +![](images/92df572773af8bfc12d5cbc6e1d4a11df81925b468116adf10b7d3c8f047c387.jpg) +Figure 1: An example of Frame Identification. The target word get in the sentence is associated with frame Board_vehicle. Lexicon filtering $(lf)$ considers frames that can be evoked by get.v as candidates. + +frame semantic structures can be utilized in downstream tasks, e.g., Information Extraction (Si and Roberts, 2018), Machine Reading Comprehension (Guo et al., 2020). + +Previous researches in frame identification selects an appropriate frame for a target by modeling the similarity or matching score between the target and frames. Recent efforts are made to represent frames with definitions in FrameNet (Jiang and Riloff, 2021; Su et al., 2021; Tamburini, 2022; Zheng et al., 2023). However, limited by the large scale of frames, these methods either struggle to effectively model definitions due to the use of a frozen frame encoder or cannot efficiently select appropriate frames from all frames due to the use of a single encoder architecture. + +Fig. 1 illustrates an example of frame identification. For the target word "get" in the sentence, we need to select its corresponding frame from over a thousand frames in FrameNet (All): Board_vehicle (A Traveller boards a Vehicle). Previous frame identification methods (Peng et al., 2018; Jiang and Riloff, 2021) typically apply lexicon filtering $(lf)$ by selecting the frame from a set of candidate frames (Candidates) for the verb "get" (e.g., Arriving, Getting, Board_vehicle, etc.). If effec + +tively improves the accuracy of frame identification. However, the manually defined lexicons is not possible to cover all the corresponding targets for frame, which hinders the extension of frame semantics to out-of-vocabulary target words. + +Furthermore, we observed that training $w / o$ $l f$ (without $l f$ ) poses challenges in distinguishing fine-grained differences among candidate frames. Conversely, training $w / l f$ (with $l f$ ) can lead to an increased distance between the gold frame and other candidates, making it difficult to distinguish the gold frame from irrelevant ones. Consequently, in this paper, our aim is to enhance our model's performance in both the $w / l f$ and $w / o$ $l f$ scenarios. + +In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoder Architecture. By employing a dual encoder structure, we can effectively store the representations of all frames during inference, enabling us to efficiently compute the similarity between the target and all frames. Furthermore, considering the constraints imposed by the number of frames, we incorporate contrastive objectives to enhance the trainability of the frame encoder, consequently improving our ability to model definitions more accurately. Additionally, employing a distinct frame or target encoder allows us to map certain frames and targets to a vector space and utilize distance measures to depict their relationship. + +To address the trade-off between training $w / \text{lf}$ and $w / o \text{lf}$ , we propose a two-stage learning procedure, referred to as coarse-to-fine learning. In the first stage, we employ in-batch learning, using the gold frames of other instances within a batch as hard negative examples. This step helps the model learn to discern frames with distinct semantics. In the second stage, we adopt in-candidate learning, where we utilize other frames from the candidate set as negative samples. This enables the model to further refine its ability to recognize fine-grained semantic differences. With coarse-to-fine learning, COFFTEA achieves a comprehensive performance in both scenarios of $w / \text{lf}$ and $w / o \text{lf}$ . + +Experiments show that COFFTEA, compared to previous methods on two FrameNet datasets, achieves competitive accuracy $w / \text{lf}$ and outperforms them by up to 1.53 points in R@1 w/o $\text{lf}$ and 0.93 overall scores considering both settings. Ablations also verify the contributions of the dual encoder structure and the two-stage learning process. Further analyses suggest that both the target + +encoder and frame encoder can effectively capture the target-target, and frame-frame relationships. + +Our contributions can be summarized as follow: + +1. We propose COFFTEA, a dual encoder architecture with coarse-to-fine contrastive objectives. COFFTEA can effectively model frame definitions with learnable frame encoders and efficiently select the corresponding frame from over 1,000 frames. +2. We conclude the trade-off between $w / lf$ and $w / olf$ , and emphasize the performance $w / olf$ in the evaluation of frame identification. With two-stage learning, COFFTEA achieves an overall score improvement of 0.93 on frame identification. +3. Further in-depth analysis demonstrates that our frame and target encoders can better model the alignment between frame and target, as well as the relationships between target and target, frame and frame. + +# 2 Task Formulation + +For a sentence $S = w_{1},\dots ,w_{n}$ with a target span $t = w_{t_s},\dots ,w_{t_e}$ , frame identification is to select the most appropriate frame $f\in \mathcal{F}$ for $t$ , where $\mathcal{F}$ denotes all frames in FrameNet. + +As FrameNet (Baker et al., 2007) provides each frame with an associated set of lexical units (LUs), we can obtain the LU of target $t$ by utilizing its lemma and part-of-speech (POS) in the form lemmaPOS (e.g., get.v) and apply $l f$ to retrieve the lexicon filter candidate frames $\mathcal{F}_t$ of $t$ . Then we focus on selecting $f \in \mathcal{F}_t$ . + +# 3 Methodology + +To model the alignment between frames and targets efficiently and effectively, in this paper, we propose COFFTEA, a dual encoder architecture with two-stage contrastive objectives. We compare COFFTEA with other baselines modeling frame definitions (§ 3.1). Specifically, to achieve better represent learning of definitions, the frame encoder of COFFTEA is learnable during training. Moreover, in order to make COFFTEA gradually learn to differentiate frames with varying degrees of similarity. We introduce two-stage learning in §3.2. + +# 3.1 Model Architecture + +In Fig. 2, we compare the dual-encoder architecture of COFFTEA with three categories of previous meth + +Sentence: Can he just get on a plane and fly to Paris? + +Frame: Board(vehicle + +Definition: A Traveller boards a Vehicle that they intend to use as a means of transportation... + +![](images/001b56124d98612f901ad857e6d8811a8662c93fca48185a8e7ba1a8091793a2.jpg) + +![](images/41540c344309c3af93018bc57f279603434635585203cc926e0598ba8ed7ca0f.jpg) + +![](images/20f969071e0a88fc47fa3202c4adecf9d94dcf5ff33fa37453b424359829d94d.jpg) +Figure 2: Comparison between COFFTEA and other baselines. (a) and (b) both fine-tune a Lookup Table containing embeddings of frames with corss entropy loss. (b) uses a frozen frame encoder to initialize the table. (c) employs a single fused encoder to measure the probability of sentence and definition matching. For efficiency purposes, COFFTEA (d) also adopts a dual-encoder structure and leverages contrastive loss to unfreeze the frame encoder. + +![](images/86688f3128ae9d869256492197905631b8e02b32a712b9bbca6bef15c898893e.jpg) + +ods in frame identification: (a) no definition modeling (Hartmann et al., 2017; Zheng et al., 2022), (b) target encoder and frozen frame encoder (Su et al., 2021; Tamburini, 2022), and (c) single fused encoder (Jiang and Riloff, 2021). Limited by the number of frames in FrameNet, the dual encoder architecture with cross entropy loss (b) have to fix the parameters of the frame encoder while the single encoder architecture (c) have to train and infer under the $w /lf$ setting. Therefore, we still use two encoders to separately encode the sentence with targets and frame definition, and employ contrastive learning to make the frame encoder trainable. + +We follow Su et al. (2021); Jiang and Riloff (2021); Tamburini (2022) to use PLMs (Devlin et al., 2019) as target encoder (§3.1.1) and frame encoder (§3.1.2). + +# 3.1.1 Target Encoder + +The target encoder converts input sentence $S$ with $n$ tokens $w_{1},\ldots ,w_{n}$ into contextualized representations $h_1,\dots ,h_n$ . The contextualized representation $t$ of target span $w_{t_s},\ldots ,w_{t_e}$ $(1\leq t_{s}\leq t_{e}\leq n)$ is the maxpooling of $h_{t_s},\ldots ,h_{t_e}$ (Zheng et al., 2023). + +$$ +h _ {1}, \dots , h _ {n} = \operatorname {E n c o d e r} _ {t} \left(w _ {1}, \dots , w _ {n}\right) \tag {1} +$$ + +$$ +t = \operatorname {M a x P o o l i n g} \left(h _ {t _ {s}}, \dots , h _ {t _ {e}}\right) \tag {2} +$$ + +With the target encoder, we capture the contextual information of the target sentence and the sufficient modeling of context can be used to find out-of-vocabulary targets. Our goal is to not only ensure a close proximity between the representations of the target and the frame but also to ensure that the target representations in different sentences, which activate the same frame, exhibit a high degree of similarity. + +# 3.1.2 Frame Encoder + +Taking Board_vehicle as frame name and its corresponding definition "A Traveller boards a Vehicle that they intend to use as a means of transportation either as a passenger or as a driver" as def. Similarly, frame encoder converts $D =$ frame name|def, denoted as $w_{1}^{\prime},\ldots ,w_{m}^{\prime}$ into representations $h_1^\prime ,\dots ,h_m^\prime$ . We follow Reimers and Gurevych (2019) to regard meanpooling of all tokens as frame representations $f$ . + +$$ +h _ {1} ^ {\prime}, \dots , h _ {m} ^ {\prime} = \operatorname {E n c o d e r} _ {f} \left(w _ {1} ^ {\prime}, \dots , w _ {m} ^ {\prime}\right) \tag {3} +$$ + +$$ +f = \operatorname {M e a n P o o l i n g} \left(h _ {1} ^ {\prime}, \dots , h _ {m} ^ {\prime}\right) \tag {4} +$$ + +Through the frame encoder, we encode frame definitions to represent frames. Similar to the target + +![](images/9052a5a6a36197d5151213ae2874ec4da4648aed62d3cab50a90d20c09d18259.jpg) +(a) + +![](images/bca54ce6c2eebd97a39c7f557840c0fe21ee60e59a2dd382c4da538f2aad343d.jpg) +(b) +Figure 3: Coarse-to-Fine Learning of COFFTEA. In-batch learning (a) is first applied with coarse-grained in-batch negative examples $\mathcal{B}$ . In-candidate learning (b) is then employed to differentiate gold frame with hard negatives $\mathcal{C}$ . + +encoder, the frame encoder not only focuses on aligning frames with targets but is also intended to reflect the semantic relationships between frames themselves, such as Inheritance (Su et al., 2021; Zheng et al., 2022). + +# 3.2 Learning Process + +In order to capture the alignment between frames and targets, we aim to minimize the distance between the target and the gold frame (positive pair) while maximizing the distance between the target and other frames (negative pairs) during the training process. However, encoding such a large number of frames, which exceeds 1000, and updating the encoders with gradients for all of them becomes infeasible. Therefore, we need to sample a subset of frames as negative pairs. As discussed earlier, both training $w / o$ $l f$ and $w / l f$ have their limitations. To address this, we propose a two-stage learning process in Fig. 3. + +We first employ in-batch learning (§3.2.1), where we treat the gold frames of other targets in the same batch as negative examples. This allows us to learn coarse-grained frame semantic differences. Then we utilize in-candidate learning (§3.2.2), where we treat other frames in lexicon filter candidates as hard negatives. This step helps us refine the frame representations and capture fine-grained semantic distinctions + +Specifically, we adopt cosine similarity $\cos (t,f) = \frac{t\cdot f}{\|t\|^{\cdot}\|f\|}$ as distance metric and utilize contrastive learning to distinguish positive pairs from negative pairs. Let $\mathcal{L}_{\mathcal{B}}$ and $\mathcal{L}_{\mathcal{C}}$ denotes the contrastive loss of in-batch learning and incandidate learning. The main difference between + +
Datasetsexemplartraindevtest|F|
FN 1.515394616621228444281019
FN 1.719243119391227267141221
+ +Table 1: Statistics of FrameNet dataset + +the two-stage learning lies in the construction of negative pairs $\mathcal{B}$ and $\mathcal{C}$ . + +$$ +\mathcal {L} _ {\mathcal {B}} = - \log \frac {\exp \left(\cos \left(t , f ^ {+}\right) / \tau\right)}{\sum_ {f \in \mathcal {B} \cup \{f ^ {+} \}} \exp \left(\cos \left(t , f\right) / \tau\right)} \tag {5} +$$ + +$$ +\mathcal {L} _ {\mathcal {C}} = - \log \frac {\exp (\cos (t , f ^ {+}) / \tau)}{\sum_ {f \in \mathcal {C} \cup \{f ^ {+} \}} \exp (\cos (t , f) / \tau)} \tag {6} +$$ + +# 3.2.1 In-batch Learning + +Training directly $w / l f$ may cause the model to primarily focus on distinguishing the differences between the gold frame and the candidates. In order to broaden the model's horizons, we first conduct training $w / o l f$ , allowing the model to learn to differentiate coarse-grained semantic differences. We follow Khosla et al. (2020) to construct in-batch negative examples $\mathcal{B}$ . + +# 3.2.2 In-candidate Learning + +Through in-batch learning, our model can effectively differentiate some frames that are relatively easy to distinguish. However, we aim to further distinguish frames that are more likely to be confused with one another. Typically, when using $lf$ , the other candidate frames for the same target can serve as negative examples $\mathcal{C}$ . + +However, the number of candidate frames for different targets can vary, and there are even cases where some targets only activate one frame in FrameNet. To address this issue, we pad the number of $\mathcal{C}$ for all targets to a fixed number (e.g., 15). This padding ensures that each target has a consistent number of candidate frames available for comparison during the training process. + +We consider leveraging the semantic relationships between frames in FrameNet (§A.3) to expand C. Inheritance represents the "is-a" relationship between frames. For example, receiving inherits from getting, then getting becomes the super frame and receiving becomes the sub frame. Other frames that also inherit from getting, such as Commerce_buy and Taking, are considered siblings of receiving. These siblings exhibit semantic similarities with receiving, but with subtle differences, making them suitable as hard negative examples. + +
ModelsFN 1.5OverallFN 1.7
AccR@1R@3R@5AccR@1R@3R@5
Hartmann et al. (2017)†87.6377.49--82.2583.0076.10--
KGFI (2021)†92.1385.63--88.7692.4085.8191.5992.88
FIDO (2021)†91.30----92.10---
Tamburini (2022)92.57----92.33---
Lookup Table88.6078.4886.7488.1683.2389.0278.7587.4388.71
+ init. with Def90.4083.5688.2589.3286.8590.3085.1788.9389.87
+LB91.0686.5291.7392.6888.7390.9487.1392.3093.21
LBonly†91.8284.7394.4796.1888.1391.5884.8893.8895.90
LConly†92.5076.5187.3591.0183.7592.7078.3388.9391.64
LBonly90.9486.7795.1496.7988.8191.3687.3895.2996.77
COFFTEA92.5587.6992.6494.7190.0592.6487.3492.9194.29
+ +Table 2: Main results on FN1.5 and 1.7. Acc denotes accuracy with lexicon filtering and $\mathbf{R}@\boldsymbol{k}$ denotes recall at $k$ without lexicon filtering. Overall represents the harmonic mean of Acc and $\mathbf{R}@\mathbf{1}$ , reflecting the comprehensive capability of models. Through dual encoders and two-stage learning, COFFTEA outperforms the previous methods (the topmost block) by at least 0.93 overall scores. Ablation study on dual encoders and two-stage learning is listed in the middle and bottom blocks ( $\S 4.4$ ). $\dagger$ means the model does not trained with exemplar sentences. + +We follow the order of candidate frames, sibling frames, and random frames to construct $\mathcal{C}$ . + +# 4 Experiment + +Our experiments mainly cover three aspects: + +- Main experimental results on frame identification: We compare the performance of COFFTEA with previous approaches both with lexicon filtering $(w / l f)$ and without lexicon filtering $(w / o l f)$ . +- Further ablation study: to demonstrate the contributions of the learnable frame encoder and Coarse-to-Fine learning to the performance of COFFTEA. +- In-depth representation analysis: We delve into a deeper analysis to investigate how the frame and target encoder of COFFTEA can better represent the alignment between frames and targets, as well as the relationships between frames and frames, targets and targets. + +# 4.1 Datasets + +We have introduced COFFTEA on two FrameNet datasets: FN 1.5 and FN 1.7. FN 1.7 is an extensive version of FN 1.5, with more annotated sentences and more defined frames. Following Swayamdipta et al. (2017); Su et al. (2021), we spilt the full text into train, dev and test set, and further use exemplars in FrameNet as pretraining data like Peng et al. (2018); Zheng et al. (2022); Tamburini (2022). Table 1 shows the statistics of two datasets. + +# 4.2 Models + +We mainly compare COFFTEA with representative previous methods from the different categories shown in Fig. 2: traditional representation learning based methods without definitions (Hartmann et al., 2017), dual encoder architectures with frozen frame encoders (KGFI (2021), Tamburini (2022)), and single fused encoder architectures (FIDO (2021)). + +In order to conduct further ablation study and deeper analysis, we also implement two baselines represented as (a) and (b) in Fig 2: Lookup Table with random initialization and Lookup Table initialized with definition representations. The implementation details of previous methods, baselines, and COFFTEA can be found in §A.1. + +# 4.3 Main Results + +To compare our model with previous approaches, as well as our baselines. We report the accuracy (Acc) when lexicon filtering is applied, recall at k $(\mathbf{R}@\mathbf{k})$ when no lexicon filtering is used (indicating whether the gold frame is ranked in the top $k$ based on similarity), and an Overall score (harmonic average of Acc and R@1). + +The upper block of Table 2 shows the performance of previous representative methods in frame identification. COFFTEA achieves a performance gain of 0.93 overall scores (88.98 v.s. 89.91), primarily due to a 1.53 increase in R@1 scores (85.81 v.s. 87.34) in the w/o l f setting. This improvement can be attributed to the use of a learnable frame + +
ModelsPredictions w/o If from rank 2 to 5 (Top-1 is Becoming)
L3 only†Transition_to_a_stateUndergo_transformationChange_post_stateUndergo_change
Lc only†Activity_startLaunch_processMake_acquaintanceMeet_specifications
+ +Table 3: Predictions in positions 2 to 5 of "The children and families who come to Pleasant Run are given the opportunity to become happy". red means the frame is irrelevant to the gold frame Becoming. + +encoder and two-stage learning, which enhance the effectiveness of COFFTEA in modeling definitions. Compared to KGFI, COFFTEA achieves comparable Acc $w / l f$ (92.40 v.s. 92.64) and consistently performs better in $R@k$ , which further demonstrates that through combining in-batch learning and in-candidate learning, COFFTEA is able to select the appropriate frame from both candidates ( $w/lf$ ) and all frames ( $w/o l f$ ). + +Moreover, it is worth noting that some methods (marked $\dagger$ ) does not utilize exemplars as training data, while previous researches (Su et al., 2021; Zheng et al., 2022) believe that using exemplars for training improves accuracy. Further discussion about using exemplars can be found in §4.4. + +In addition to representative methods in Table 2, there is a series of frame identification studies that solely focus on Acc w/lf. We report the results of COFFTEA and more previous frame identification works in $\S \mathbf{B}.2$ + +# 4.4 Ablation Study + +Frame Encoder Can learnable frame encoder contribute to frame identification? As is shown in the middle block in Table 2, lookup table without definitions achieved relatively low overall scores (83.57). However, when we initialize the lookup table with the definitions encoded by the frozen encoder, the lookup table showed a significant improvement in R@1 w/o lf, with an increase of 6.42 points (78.75 v.s. 85.17). This indicates that even without adjusting the parameters, the frozen encoder of PLMs is capable of modeling the definitions to some extent. + +To further explore its impact, we apply in-batch learning to the lookup table with definitions. This additional step results in a further improvement of 1.96 points in R@1 w/o lf (85.17 v.s. 87.13). This suggests that in-batch learning reduces the number of negative samples, decreases the learning difficulty, and ultimately leads to better performance. + +Comparing COFFTEA to these lookup tables, we find that unfreezing the frame encoder allows for better modeling of fine-grained semantic differ + +ences, resulting in a significant increase of 1.70 points in accuracy $w / l f$ (90.94 v.s. 92.64). This demonstrates the effectiveness of incorporating an unfrozen frame encoder to enhance the modeling of subtle semantic distinctions and improve the performance of the frame identification task. + +Coarse-to-Fine Learning The bottom block in Table 2 demonstrates the trade-off between in-batch learning $(\mathcal{L}_{\mathcal{B}}$ only) and in-candidate learning $(\mathcal{L}_{\mathcal{C}}$ only). $\mathcal{L}_{\mathcal{B}}$ only achieves the highest R@1 (84.88) and $\mathcal{L}_{\mathcal{C}}$ only yields the highest Acc (92.70). However, the former approach does not excel at distinguishing fine-grained frames (91.58 Acc), while the latter approach even performs worse than the lookup table on R@1 w/o lf (78.33 v.s. 78.75). + +Table 3 gives a specific example for comparison. Both methods can correctly predict the frame corresponding to the target become in the given sentence. However, when looking at the predicted frames in positions 2 to 5, the frames predicted by in-batch learning show structural relationships with Becoming, while the frames predicted by in-candidate learning have no connection to becoming. This reflects that in-candidate learning cannot distinguishing frames sufficiently. + +To address this issue, we train COFFTEA with $\mathcal{L}_{\mathcal{B}}$ on exemplars and then train COFFTEA with $\mathcal{L}_{\mathcal{C}}$ with train split, which is equivalent to performing coarse-grained pretraining on a large-scale corpus and then fine-tuning on a smaller dataset for domain adaptation at a finer granularity. + +We also apply in-batch learning on both train and exemplar. Due to the lack of hard negatives, its performance on Acc $w /lf$ is lower than COFFTEA (91.36 v.s. 92.64). + +Exemplars Using exemplars as additional training data is a common practice (Peng et al., 2018; Chen et al., 2021; Zheng et al., 2022). Since in-batch learning benefits from larger-scale data (84.88 v.s. 87.38 in Table 2), we chose to use the larger set, exemplars for the first stage of in-batch learning. However, this makes our results not directly comparable to those of previous methods (Su + +
Modelsw/ exam.w/o exam.Δ
Tamburini (2022)91.4292.33-0.91
Lookup Table89.0289.41-0.39
+ init. with Def90.4090.66-0.26
+LB91.0691.23-0.17
LBonly91.3691.58-0.22
COFFTEA92.5592.240.31
+ +Table 4: Training with extra exemplars does not increase the model performance. COFFTEA can effectively utilize exemplars via two-stage learning. + +
ModelsAccAcc w/ [MASK]Δ
Lookup Table89.0278.1110.92
+ init. with Def90.3077.5812.72
+LB90.9477.9113.03
COFFTEA92.6485.826.82
+ +et al., 2021) that only use the training set. However, more training data does not necessarily lead to improved performance. As shown in Table 4, the performance of Tamburini (2022) and our lookup table baselines decreases after using exemplars, possibly due to a domain mismatch between the exemplars and the training set. However, our two-stage approach effectively utilizes both datasets to get an improvement of 0.31 Acc, providing a more appropriate way to utilize exemplars for future work. + +# 4.5 Further Analysis + +Target-Frame Alignments The results in Table 2 demonstrate that COFFTEA effectively models the alignment between targets and frames. However, we still want to explore whether the model's ability to predict a frame is due to its accurate modeling of the target's contextual information in the sentence or if there are other shortcuts involved. Moreover, if COFFTEA can effectively model the context of the target, it can also be used to discover out-of-vocabulary targets. To investigate this, we replace the target in the sentence with the [MASK] token and compute the similarity between the masked target representation and frames. Table 5 shows that when the target is masked, the accuracy of the model decreases across the board. COFFTEA achieves the smallest decrease in performance $(\Delta)$ , indicating the capability of our dual + +Table 5: Masking target words can cause the decrease of accuracy. The extent of the decrease, $\Delta$ , reflects whether the model understands the context information of the target. + +
ModelsR@110 target exemplars
R@1R@3R@5
Lookup Table78.7563.9675.5477.27
+ init. with Def85.1781.7189.5190.33
+ Lβ87.1383.0492.2493.40
COFFTEA87.3485.5893.0794.89
+ +Table 6: Representing frames with definitions and ten target exemplars. The target encoder of COFFTEA can get similar and consistent representations of targets related to the same frame. + +
ModelsAverage Δα/α
Lookup Table0.158
+ init. with Def0.012
+LB0.070
LBonly†56.290
LConly†6.494
COFFTEA121.816
COFFTEA w/o. sibling34.907
+ +Table 7: The learnable frame encoder better models the structured information between frames. The perception of structure in COFFTEA comes from the first stage of in-batch learning and the utilization of siblings as hard negatives. + +encoder structure to effectively model the alignment between target context and frames. This capability also indicates that COFFTEA can explore out-of-vocabulary targets. + +Target-Target Relations The target encoder ensures a close proximity between targets and their corresponding frames. However, we believe that different sentences the target representations in different sentences, which activate the same frame, are supposed to exhibit a high degree of similarity. We select ten exemplars for each frame and replace frame representations with the mean representation (centroid) of these exemplars. In Table 6, we compare two frame representations: directly encoding the definition and encoding ten exemplars. COFFTEA achieves consistent and similar performance in both settings (87.34 and 85.58), reflecting the similarity between the target representations of the same frame and the final frame representation, as captured by our target encoder. + +Frame-Frame Relations Due to the semantic relations defined by FrameNet between frames (such as inheritance, using, subframe, etc.), frames are not isolated but rather interconnected with each other, forming structural relationships. For exam + +ple, if receiving inherits from getting, their representations should be similar. Frame representations should reflect the structural relationships. To evaluate the degree of similarity between a subframe $f_{sub}$ and its superframe $f_{sup}$ , we define a metric, + +$$ +\alpha = \frac {1}{| \mathcal {F} |} \cdot \sum_ {f \in \mathcal {F}} \cos \left(f _ {\text {s u b}}, f\right) \tag {7} +$$ + +$$ +\Delta \alpha = \cos \left(f _ {s u b}, f _ {s u p}\right) - \alpha \tag {8} +$$ + +$\frac{\Delta \alpha}{\alpha}$ is a normalized evaluation reflecting how a subframe is close to its superframe compared to other frames. We report the average $\frac{\Delta \alpha}{\alpha} (\alpha > 0)$ of inheritance pairs in Table 7. + +The baselines (the upper block) without a learnable frame encoder struggle to model the relationships between frames effectively. The distance between subframes and superframes is almost the same as that between other frames. However, using a learnable frame encoder greatly improves the similarity between subframes and superframes. + +In-candidate learning, if used alone, tends to overly focus on differentiating frames with similar semantics, which actually decreases the similarity between them (6.494 v.s. 56.290). On the other hand, COFFTEA effectively models the similarity between associated frames. This is mainly because we use two-stage learning and treat siblings as hard negative examples during training (34.907 v.s. 121.816), which indirectly enables the model to learn the connection between subframes and superframes. + +# 5 Related Work + +Frame Identification Prior research in frame identification has primarily focused on modeling the similarity between targets and frames or assessing the matching score between them. + +In terms of modeling similarity, Hartmann et al. (2017); Peng et al. (2018); Zheng et al. (2022) leverage target encoder with a trainable frame representation table, while ignoring the valuable contextual frame information provided by FrameNet. To remedy this deficiency, Su et al. (2021); Tamburini (2022) both propose to incorporate frame definitions into frame encoder. Despite these efforts, the number of frames and the optimizing objective make it infeasible to update frame representation during training, leading to a compromise of freezing it. Consequently, they all trap in the dilemma to obtain optimal frame representation. As for assessing the matching score, Jiang and Riloff (2021) + +propose a fused encoder to evaluate semantic coherence between sentence and frame definition. Nevertheless, it just fails to evaluate the performance of $w / o$ $l f$ scenario. + +In addition, the aforementioned studies tend to adopt a one-sided relationship between targets and frames. They only train model on either $w / \text{lf}$ or $w / o \text{lf}$ , which can not catch an overall horizon in distinguishing frames. Moreover, only Su et al. (2021) release performance under $w / o \text{lf}$ scenario, which is essential for evaluating the full capabilities of the model. + +Some other work like Chanin (2023) treat frame semantic parsing as a sequence-to-sequence text generation task, but its still trap in training under $w / l f$ and can not catch an optimal relationships. + +Metric Learning Metric learning is a fundamental approach in machine learning that seeks to learn a distance metric or similarity measure that accurately captures the inherent relationships between data points. One particular technique that has gained prominence in this area is Contrastive Learning, which has been extensively applied to a variety of tasks such as text classification (Gao et al., 2021), image classification (He et al., 2020). + +The optimized feature space retrieved from Contrastive Learning objective can benefit on learning better representations of data and capturing inner relationship. For frame identification, the primary goal is to obtain a well-aligned target-to-frame space. However, existing researches only focus on using Cross Entropy to directly modeling correlation to All Frames, which presents challenges in capturing complex relationships. Alternatively, Contrastive Learning can be leveraged to optimize and incrementally construct the feature space of frames and targets. + +# 6 Conclusion + +We propose COFFTEA, and its dual encoder can effectively model the definitions with learnable frame encoder and efficiently calculate the similarity scores between a target and all frames. We also conclude that there exists a trade-off between training $w / l f$ and $w / o$ $l f$ , and achieves a comprehensive performance with a two stage learning process. Detailed analysis of the experiments further demonstrates that our two encoders are not limited to their alignment but can also discover other connections between frame and frame, as well as target and target. + +# Limitations + +The limitations of our work include: + +1. We only used cosine similarity as a distance metric and did not explore other methods of metric learning. Investigating alternative distance metrics could potentially enhance the performance of our model. +2. Currently, the FrameNet dataset does not provide test data for out-of-vocabulary words. Therefore, our exploration of out-of-vocabulary words is limited to preliminary experiments (Table 5). Further investigation with a dedicated dataset containing out-of-vocabulary test data would be valuable. +3. We only applied the dual-encoder architecture to frame identification and did not explore its application to frame semantic role labeling. Extending our approach to frame semantic role labeling would provide insights into its effectiveness and generalizability beyond frame identification. + +# Acknowledgements + +We thank all reviewers for their great efforts. This paper is supported by the National Science Foundation of China under Grant No.61936012. + +# References + +Collin Baker, Michael Ellsworth, and Katrin Erk. 2007. SemEval-2007 task 19: Frame semantic structure extraction. In Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007), pages 99–104, Prague, Czech Republic. Association for Computational Linguistics. +Collin F. Baker, Charles J. Fillmore, and John B. Lowe. 1998. The Berkeley FrameNet project. In 36th Annual Meeting of the Association for Computational Linguistics and 17th International Conference on Computational Linguistics, Volume 1, pages 86-90, Montreal, Quebec, Canada. Association for Computational Linguistics. +David Ian Chanin. 2023. Open-source frame semantic parsing. ArXiv, abs/2303.12788. +Xudong Chen, Ce Zheng, and Baobao Chang. 2021. Joint multi-decoder framework with hierarchical pointer network for frame semantic parsing. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 2570-2578, Online. Association for Computational Linguistics. + +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. +Charles J Fillmore et al. 1976. Frame semantics and the nature of language. In Annals of the New York Academy of Sciences: Conference on the origin and development of language and speech, volume 280, pages 20-32. New York. +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. +Daniel Gildea and Daniel Jurafsky. 2000. Automatic labeling of semantic roles. In Proceedings of the 38th Annual Meeting of the Association for Computational Linguistics, pages 512-520, Hong Kong. Association for Computational Linguistics. +Shaoru Guo, Yong Guan, Ru Li, Xiaoli Li, and Hongye Tan. 2020. Incorporating syntax and frame semantics in neural network for machine reading comprehension. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2635-2641, Barcelona, Spain (Online). International Committee on Computational Linguistics. +Silvana Hartmann, Ilia Kuznetsov, Teresa Martin, and Iryna Gurevych. 2017. Out-of-domain FrameNet semantic role labeling. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 471-482, Valencia, Spain. Association for Computational Linguistics. +Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9729-9738. +Tianyu Jiang and Ellen Riloff. 2021. Exploiting definitions for frame identification. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2429-2434, Online. Association for Computational Linguistics. +Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. 2020. Supervised contrastive learning. Advances in neural information processing systems, 33:18661-18673. + +Hao Peng, Sam Thomson, Swabha Swayamdipta, and Noah A. Smith. 2018. Learning joint semantic parsers from disjoint data. 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 1492-1502, New Orleans, Louisiana. Association for Computational Linguistics. +Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. 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, Hong Kong, China. Association for Computational Linguistics. +Yuqi Si and Kirk Roberts. 2018. A frame-based nlp system for cancer-related information extraction. In AMIA annual symposium proceedings, volume 2018, page 1524. American Medical Informatics Association. +Xuefeng Su, Ru Li, Xiaoli Li, Jeff Z. Pan, Hu Zhang, Qinghua Chai, and Xiaoqi Han. 2021. A knowledge-guided framework for frame identification. 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 5230-5240, Online. Association for Computational Linguistics. +Swabha Swayamdipta, Sam Thomson, Chris Dyer, and Noah A Smith. 2017. Frame-semantic parsing with softmax-margin segmental rnns and a syntactic scaffold. arXiv preprint arXiv:1706.09528. +Fabio Tamburini. 2022. Combining ELECTRA and adaptive graph encoding for frame identification. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 1671-1679, Marseille, France. European Language Resources Association. +Ce Zheng, Xudong Chen, Runxin Xu, and Baobao Chang. 2022. A double-graph based framework for frame semantic parsing. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4998-5011, Seattle, United States. Association for Computational Linguistics. +Ce Zheng, Yiming Wang, and Baobao Chang. 2023. Query your model with definitions in framenet: an effective method for frame semantic role labeling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 14029-14037. + +# A Experiment Details + +# A.1 Baseline Models + +Hartmann et al. (2017): a simple classifier based on the representation of entire sentence and especially dependents of target. + +Peng et al. (2018): a joint model to learn semantic parsers from disjoint corpora with a latent variable formulation. + +Chen et al. (2021): a joint model of multi-decoder and hierarchical pointer network for frame semantic parsing. + +FIDO (2021): a fused model assessing semantics coherence between sentence and frame definition. + +KGFI (2021): a dual encoders model for frame identification aligning similarity of targets and precomputed frame representation. + +Tamburini (2022): similar to Su et al. (2021) with more reliable graph technique. + +KID (2022): a double graph based model for frame semantic parsing. + +AGED (2023): a query-based framework for Frame Semantic Role Labeling under frame definition. + +Chanin (2023): a T5-based model treating frame semantic parsing as sequence-to-sequence text generation task. + +Lookup Table: a baseline model aligning target encoder with trainable one-hot mapping frame representation. + +Lookup Table init. with definition: a baseline model aligning target encoder with trainable BERT-initialized frame representation. + +Lookup Table init. with definition and $\mathcal{L}_{\mathcal{B}}$ : using Contrastive Loss as optimize objective instead of Cross Entropy. + +# A.2 Hyper-parameter Setting + +For replicability of our work, we list the Hyperparameter setting of all our baselines and COFFTEA in Table 8. + +# A.3 Frame Relation + +Given a frame $f$ , to get its sibling frames $\mathcal{F}_{sib}$ , we utilize the frame relation Inheritance and consider $f$ as the superior or subordinate frame of Inheritance to retrieve its subordinate or superior frames, and then get the sibling of $f$ . Table 9 shows the Inheritance relation we used. + +
Hyper-parameterValue
Epochs20
Learning Rate2e-5
OptimizerAdamW
Batch Size of LB32
Gradient Accumulation of LB4
Temperature of LB0.07
Batch Size of LC6
Gradient Accumulation of LC3
Candidate Frame Number of LC15
Temperature of LC1
Dual EncodersBERT-base
+ +Table 8: Hyper-parameter settings + +
Sup frameSub frame
GettingReceiving +Amassing +Commerce_buy +Commerce_generate +Taking
ReceivingBorrowing
Transition_to_a_stateBecoming +Undergo_change
Undergo_changeUndergo_transformation
BecomingTransition_to_a_quality
+ +# B Supplementary Experiment Results + +# B.1 Statistical Results of COFFTEA + +To verify that our experimental results were not accidental, we train COFFTEA with five different random seeds for each dataset. Compare with the strongest model (Su et al., 2021), we can get better performance consistently. Table 10 shows the average performances with its deviation. + +Table 9: A part of pairs of Inheritance relation, see more at https://framenet.icsi.berkeley.edu/fndrupal/. + +
DatasetModelsAvg. ± Dev.
w/ Ifw/o If
FN1.5KGFI92.4084.41
COFFTEA92.51 ± 0.1487.26 ± 0.10
FN1.7KGFI92.1385.63
COFFTEA92.50 ± 0.0587.29 ± 0.41
+ +Table 10: Statistical results of multiple runs on FN1.7. We train our models in with five different random seeds and report the average performance with deviation. + +# B.2 Comparison with More Methods + +As most previous work only focus on performance in the $w /lf$ setting, we conduct a comprehensive + +comparison on both All frames and Amb frames, where Amb is a subset of All whose target is polysemous or can evkoe multiple frames. And we find that Tamburini (2022) just use a smaller test set on both FN1.5 and FN1.7. So our COFFTEA achieves competitive performance compared to the strongest models. + +
ModelsFN 1.5FN 1.7
AllAmbAllAmb
Hartmann et al. †87.6373.8083.0071.70
Peng et al.90.0078.0089.1077.50
Chen et al.90.5079.10--
FIDO†91.3081.0092.1083.80
KGFI†92.1382.3492.4084.41
AGED91.6381.57--
KID91.7081.7291.7083.03
Tamburini92.5783.5892.3384.22
Chanin--89.0077.50
COFFTEA92.5583.6192.6484.95
+ +Table 11: Frame identification accuracy with lexicon filtering on FrameNet test dataset, 'All' and 'Amb' denote testing on test data and ambiguous data respectively. $\dagger$ means the model does not trained with exemplar sentences. \ No newline at end of file diff --git a/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/images.zip b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..401741d6eb8ab18cbcc633dc98dac00aaa4943c1 --- /dev/null +++ b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5afd182997a78975428f3a52a36c5b85472c7807f58efeb91866cd83caed19e6 +size 482892 diff --git a/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/layout.json b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..414072bcdcd70b4cec40e97a0c5976e2fa24d625 --- /dev/null +++ b/2023/Coarse-to-Fine Dual Encoders are Better Frame Identification Learners/layout.json @@ -0,0 +1,9491 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 76, + 75, + 518, + 92 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 76, + 75, + 518, + 92 + ], + "spans": [ + { + "bbox": [ + 76, + 75, + 518, + 92 + ], + "type": "text", + "content": "Coarse-to-Fine Dual Encoders are Better Frame Identification Learners" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "spans": [ + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "text", + "content": "Kaikai An" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "inline_equation", + "content": "^{1,2*}" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "text", + "content": ", Ce Zheng" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "inline_equation", + "content": "^{1*}" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "text", + "content": ", Bofei Gao" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "text", + "content": ", Haozhe Zhao" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "inline_equation", + "content": "^{1,2}" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "text", + "content": ", Baobao Chang" + }, + { + "bbox": [ + 116, + 104, + 484, + 120 + ], + "type": "inline_equation", + "content": "^{1\\dagger}" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 136, + 121, + 461, + 147 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 136, + 121, + 461, + 147 + ], + "spans": [ + { + "bbox": [ + 136, + 121, + 461, + 147 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 136, + 121, + 461, + 147 + ], + "type": "text", + "content": " National Key Laboratory for Multimedia Information Processing, School of Computer Science, Peking University" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 134, + 148, + 464, + 190 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 134, + 148, + 464, + 190 + ], + "spans": [ + { + "bbox": [ + 134, + 148, + 464, + 190 + ], + "type": "inline_equation", + "content": "^{2}" + }, + { + "bbox": [ + 134, + 148, + 464, + 190 + ], + "type": "text", + "content": " School of Software & Microelectronics, Peking University {ankaikai, zce1112zslx, gaobofei, hanszhao}@stu.pku.edu.cn chbb@pku.edu.cn" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "spans": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "text", + "content": "Abstract" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "spans": [ + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "text", + "content": "Frame identification aims to find semantic frames associated with target words in a sentence. Recent researches measure the similarity or matching score between targets and candidate frames by modeling frame definitions. However, they either lack sufficient representation learning of the definitions or face challenges in efficiently selecting the most suitable frame from over 1000 candidate frames. Moreover, commonly used lexicon filtering " + }, + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "inline_equation", + "content": "(lf)" + }, + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "text", + "content": " to obtain candidate frames for the target may ignore out-of-vocabulary targets and cause inadequate frame modeling. In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoders Architecture. With contrastive learning and dual encoders, COFFTEA efficiently and effectively models the alignment between frames and targets. By employing a coarse-to-fine curriculum learning procedure, COFFTEA gradually learns to differentiate frames with varying degrees of similarity. Experimental results demonstrate that COFFTEA outperforms previous models by 0.93 overall scores and " + }, + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "inline_equation", + "content": "1.53\\mathrm{R@1}" + }, + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "text", + "content": " without " + }, + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "inline_equation", + "content": "lf" + }, + { + "bbox": [ + 84, + 238, + 274, + 584 + ], + "type": "text", + "content": ". Further analysis suggests that COFFTEA can better model the relationships between frame and frame, as well as target and target. The code for our approach is available at https://github.com/ pkunlp-icler/COFFTEA." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 68, + 597, + 154, + 609 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 597, + 154, + 609 + ], + "spans": [ + { + "bbox": [ + 68, + 597, + 154, + 609 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 620, + 291, + 741 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 620, + 291, + 741 + ], + "spans": [ + { + "bbox": [ + 67, + 620, + 291, + 741 + ], + "type": "text", + "content": "Frame Identification (Gildea and Jurafsky, 2000; Baker et al., 2007) aims to identify a semantic frame for the given target word in a sentence. The frames defined in FrameNet (Baker et al., 1998) are associated with word meanings as encyclopedia knowledge (Fillmore et al., 1976), which represent different events, situations, relations and objects. Identifying frames can contribute to extracting frame semantic structures from a sentence, and" + } + ] + } + ], + "index": 7 + }, + { + "type": "image", + "bbox": [ + 304, + 210, + 518, + 327 + ], + "blocks": [ + { + "bbox": [ + 304, + 210, + 518, + 327 + ], + "lines": [ + { + "bbox": [ + 304, + 210, + 518, + 327 + ], + "spans": [ + { + "bbox": [ + 304, + 210, + 518, + 327 + ], + "type": "image", + "image_path": "92df572773af8bfc12d5cbc6e1d4a11df81925b468116adf10b7d3c8f047c387.jpg" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 343, + 525, + 391 + ], + "lines": [ + { + "bbox": [ + 302, + 343, + 525, + 391 + ], + "spans": [ + { + "bbox": [ + 302, + 343, + 525, + 391 + ], + "type": "text", + "content": "Figure 1: An example of Frame Identification. The target word get in the sentence is associated with frame Board_vehicle. Lexicon filtering " + }, + { + "bbox": [ + 302, + 343, + 525, + 391 + ], + "type": "inline_equation", + "content": "(lf)" + }, + { + "bbox": [ + 302, + 343, + 525, + 391 + ], + "type": "text", + "content": " considers frames that can be evoked by get.v as candidates." + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_caption" + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 417, + 525, + 470 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 417, + 525, + 470 + ], + "spans": [ + { + "bbox": [ + 302, + 417, + 525, + 470 + ], + "type": "text", + "content": "frame semantic structures can be utilized in downstream tasks, e.g., Information Extraction (Si and Roberts, 2018), Machine Reading Comprehension (Guo et al., 2020)." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 473, + 525, + 634 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 473, + 525, + 634 + ], + "spans": [ + { + "bbox": [ + 302, + 473, + 525, + 634 + ], + "type": "text", + "content": "Previous researches in frame identification selects an appropriate frame for a target by modeling the similarity or matching score between the target and frames. Recent efforts are made to represent frames with definitions in FrameNet (Jiang and Riloff, 2021; Su et al., 2021; Tamburini, 2022; Zheng et al., 2023). However, limited by the large scale of frames, these methods either struggle to effectively model definitions due to the use of a frozen frame encoder or cannot efficiently select appropriate frames from all frames due to the use of a single encoder architecture." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "type": "text", + "content": "Fig. 1 illustrates an example of frame identification. For the target word \"get\" in the sentence, we need to select its corresponding frame from over a thousand frames in FrameNet (All): Board_vehicle (A Traveller boards a Vehicle). Previous frame identification methods (Peng et al., 2018; Jiang and Riloff, 2021) typically apply lexicon filtering " + }, + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "type": "inline_equation", + "content": "(lf)" + }, + { + "bbox": [ + 302, + 638, + 526, + 772 + ], + "type": "text", + "content": " by selecting the frame from a set of candidate frames (Candidates) for the verb \"get\" (e.g., Arriving, Getting, Board_vehicle, etc.). If effec" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 84, + 751, + 158, + 761 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 84, + 751, + 158, + 761 + ], + "spans": [ + { + "bbox": [ + 84, + 751, + 158, + 761 + ], + "type": "text", + "content": "*Equal contribution" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 85, + 761, + 170, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 85, + 761, + 170, + 772 + ], + "spans": [ + { + "bbox": [ + 85, + 761, + 170, + 772 + ], + "type": "text", + "content": "† Corresponding author" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 283, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 283, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 283, + 780, + 312, + 791 + ], + "type": "text", + "content": "13455" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 124, + 795, + 468, + 818 + ], + "type": "footer", + "angle": 0, + "lines": [ + { + "bbox": [ + 124, + 795, + 468, + 818 + ], + "spans": [ + { + "bbox": [ + 124, + 795, + 468, + 818 + ], + "type": "text", + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 13455-13466 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ] + } + ], + "index": 17 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 0 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 290, + 138 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 290, + 138 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 290, + 138 + ], + "type": "text", + "content": "tively improves the accuracy of frame identification. However, the manually defined lexicons is not possible to cover all the corresponding targets for frame, which hinders the extension of frame semantics to out-of-vocabulary target words." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "spans": [ + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "content": "Furthermore, we observed that training " + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "w / o" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "content": " (without " + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "content": ") poses challenges in distinguishing fine-grained differences among candidate frames. Conversely, training " + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "content": " (with " + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "content": ") can lead to an increased distance between the gold frame and other candidates, making it difficult to distinguish the gold frame from irrelevant ones. Consequently, in this paper, our aim is to enhance our model's performance in both the " + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "w / o" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 67, + 142, + 291, + 264 + ], + "type": "text", + "content": " scenarios." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 267, + 291, + 469 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 267, + 291, + 469 + ], + "spans": [ + { + "bbox": [ + 69, + 267, + 291, + 469 + ], + "type": "text", + "content": "In this paper, we propose COFFTEA, a Coarse-to-Fine Frame and Target Encoder Architecture. By employing a dual encoder structure, we can effectively store the representations of all frames during inference, enabling us to efficiently compute the similarity between the target and all frames. Furthermore, considering the constraints imposed by the number of frames, we incorporate contrastive objectives to enhance the trainability of the frame encoder, consequently improving our ability to model definitions more accurately. Additionally, employing a distinct frame or target encoder allows us to map certain frames and targets to a vector space and utilize distance measures to depict their relationship." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "spans": [ + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "text", + "content": "To address the trade-off between training " + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "inline_equation", + "content": "w / \\text{lf}" + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "inline_equation", + "content": "w / o \\text{lf}" + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "text", + "content": ", we propose a two-stage learning procedure, referred to as coarse-to-fine learning. In the first stage, we employ in-batch learning, using the gold frames of other instances within a batch as hard negative examples. This step helps the model learn to discern frames with distinct semantics. In the second stage, we adopt in-candidate learning, where we utilize other frames from the candidate set as negative samples. This enables the model to further refine its ability to recognize fine-grained semantic differences. With coarse-to-fine learning, COFFTEA achieves a comprehensive performance in both scenarios of " + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "inline_equation", + "content": "w / \\text{lf}" + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "inline_equation", + "content": "w / o \\text{lf}" + }, + { + "bbox": [ + 67, + 472, + 291, + 662 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 665, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 665, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 665, + 291, + 773 + ], + "type": "text", + "content": "Experiments show that COFFTEA, compared to previous methods on two FrameNet datasets, achieves competitive accuracy " + }, + { + "bbox": [ + 67, + 665, + 291, + 773 + ], + "type": "inline_equation", + "content": "w / \\text{lf}" + }, + { + "bbox": [ + 67, + 665, + 291, + 773 + ], + "type": "text", + "content": " and outperforms them by up to 1.53 points in R@1 w/o " + }, + { + "bbox": [ + 67, + 665, + 291, + 773 + ], + "type": "inline_equation", + "content": "\\text{lf}" + }, + { + "bbox": [ + 67, + 665, + 291, + 773 + ], + "type": "text", + "content": " and 0.93 overall scores considering both settings. Ablations also verify the contributions of the dual encoder structure and the two-stage learning process. Further analyses suggest that both the target" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 71, + 524, + 97 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 524, + 97 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 524, + 97 + ], + "type": "text", + "content": "encoder and frame encoder can effectively capture the target-target, and frame-frame relationships." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 314, + 99, + 525, + 111 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 99, + 525, + 111 + ], + "spans": [ + { + "bbox": [ + 314, + 99, + 525, + 111 + ], + "type": "text", + "content": "Our contributions can be summarized as follow:" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 311, + 117, + 526, + 362 + ], + "type": "list", + "angle": 0, + "index": 10, + "blocks": [ + { + "bbox": [ + 312, + 117, + 525, + 198 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 312, + 117, + 525, + 198 + ], + "spans": [ + { + "bbox": [ + 312, + 117, + 525, + 198 + ], + "type": "text", + "content": "1. We propose COFFTEA, a dual encoder architecture with coarse-to-fine contrastive objectives. COFFTEA can effectively model frame definitions with learnable frame encoders and efficiently select the corresponding frame from over 1,000 frames." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "spans": [ + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "text", + "content": "2. We conclude the trade-off between " + }, + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "inline_equation", + "content": "w / lf" + }, + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "inline_equation", + "content": "w / olf" + }, + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "text", + "content": ", and emphasize the performance " + }, + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "inline_equation", + "content": "w / olf" + }, + { + "bbox": [ + 311, + 206, + 526, + 286 + ], + "type": "text", + "content": " in the evaluation of frame identification. With two-stage learning, COFFTEA achieves an overall score improvement of 0.93 on frame identification." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 311, + 295, + 525, + 362 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 311, + 295, + 525, + 362 + ], + "spans": [ + { + "bbox": [ + 311, + 295, + 525, + 362 + ], + "type": "text", + "content": "3. Further in-depth analysis demonstrates that our frame and target encoders can better model the alignment between frame and target, as well as the relationships between target and target, frame and frame." + } + ] + } + ], + "index": 9 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 303, + 372, + 415, + 385 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 372, + 415, + 385 + ], + "spans": [ + { + "bbox": [ + 303, + 372, + 415, + 385 + ], + "type": "text", + "content": "2 Task Formulation" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "spans": [ + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "text", + "content": "For a sentence " + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "inline_equation", + "content": "S = w_{1},\\dots ,w_{n}" + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "text", + "content": " with a target span " + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "inline_equation", + "content": "t = w_{t_s},\\dots ,w_{t_e}" + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "text", + "content": ", frame identification is to select the most appropriate frame " + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "inline_equation", + "content": "f\\in \\mathcal{F}" + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "text", + "content": " for " + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "inline_equation", + "content": "t" + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "text", + "content": ", where " + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "inline_equation", + "content": "\\mathcal{F}" + }, + { + "bbox": [ + 302, + 393, + 525, + 445 + ], + "type": "text", + "content": " denotes all frames in FrameNet." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "spans": [ + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "text", + "content": "As FrameNet (Baker et al., 2007) provides each frame with an associated set of lexical units (LUs), we can obtain the LU of target " + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "inline_equation", + "content": "t" + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "text", + "content": " by utilizing its lemma and part-of-speech (POS) in the form lemmaPOS (e.g., get.v) and apply " + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "text", + "content": " to retrieve the lexicon filter candidate frames " + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "inline_equation", + "content": "\\mathcal{F}_t" + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "text", + "content": " of " + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "inline_equation", + "content": "t" + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "text", + "content": ". Then we focus on selecting " + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "inline_equation", + "content": "f \\in \\mathcal{F}_t" + }, + { + "bbox": [ + 302, + 447, + 525, + 541 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 550, + 392, + 565 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 550, + 392, + 565 + ], + "spans": [ + { + "bbox": [ + 302, + 550, + 392, + 565 + ], + "type": "text", + "content": "3 Methodology" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 571, + 526, + 721 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 571, + 526, + 721 + ], + "spans": [ + { + "bbox": [ + 302, + 571, + 526, + 721 + ], + "type": "text", + "content": "To model the alignment between frames and targets efficiently and effectively, in this paper, we propose COFFTEA, a dual encoder architecture with two-stage contrastive objectives. We compare COFFTEA with other baselines modeling frame definitions (§ 3.1). Specifically, to achieve better represent learning of definitions, the frame encoder of COFFTEA is learnable during training. Moreover, in order to make COFFTEA gradually learn to differentiate frames with varying degrees of similarity. We introduce two-stage learning in §3.2." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 729, + 423, + 741 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 729, + 423, + 741 + ], + "spans": [ + { + "bbox": [ + 302, + 729, + 423, + 741 + ], + "type": "text", + "content": "3.1 Model Architecture" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 746, + 525, + 772 + ], + "type": "text", + "content": "In Fig. 2, we compare the dual-encoder architecture of COFFTEA with three categories of previous meth" + } + ] + } + ], + "index": 17 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "13456" + } + ] + } + ], + "index": 18 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 1 + }, + { + "para_blocks": [ + { + "bbox": [ + 93, + 79, + 285, + 90 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 93, + 79, + 285, + 90 + ], + "spans": [ + { + "bbox": [ + 93, + 79, + 285, + 90 + ], + "type": "text", + "content": "Sentence: Can he just get on a plane and fly to Paris?" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 340, + 79, + 424, + 90 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 340, + 79, + 424, + 90 + ], + "spans": [ + { + "bbox": [ + 340, + 79, + 424, + 90 + ], + "type": "text", + "content": "Frame: Board(vehicle" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 93, + 91, + 424, + 101 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 93, + 91, + 424, + 101 + ], + "spans": [ + { + "bbox": [ + 93, + 91, + 424, + 101 + ], + "type": "text", + "content": "Definition: A Traveller boards a Vehicle that they intend to use as a means of transportation..." + } + ] + } + ], + "index": 2 + }, + { + "type": "image", + "bbox": [ + 91, + 103, + 277, + 206 + ], + "blocks": [ + { + "bbox": [ + 91, + 103, + 277, + 206 + ], + "lines": [ + { + "bbox": [ + 91, + 103, + 277, + 206 + ], + "spans": [ + { + "bbox": [ + 91, + 103, + 277, + 206 + ], + "type": "image", + "image_path": "001b56124d98612f901ad857e6d8811a8662c93fca48185a8e7ba1a8091793a2.jpg" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_body" + } + ], + "index": 3 + }, + { + "type": "image", + "bbox": [ + 311, + 103, + 499, + 206 + ], + "blocks": [ + { + "bbox": [ + 311, + 103, + 499, + 206 + ], + "lines": [ + { + "bbox": [ + 311, + 103, + 499, + 206 + ], + "spans": [ + { + "bbox": [ + 311, + 103, + 499, + 206 + ], + "type": "image", + "image_path": "41540c344309c3af93018bc57f279603434635585203cc926e0598ba8ed7ca0f.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "image_body" + } + ], + "index": 4 + }, + { + "type": "image", + "bbox": [ + 91, + 212, + 272, + 321 + ], + "blocks": [ + { + "bbox": [ + 91, + 212, + 272, + 321 + ], + "lines": [ + { + "bbox": [ + 91, + 212, + 272, + 321 + ], + "spans": [ + { + "bbox": [ + 91, + 212, + 272, + 321 + ], + "type": "image", + "image_path": "20f969071e0a88fc47fa3202c4adecf9d94dcf5ff33fa37453b424359829d94d.jpg" + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 332, + 525, + 380 + ], + "lines": [ + { + "bbox": [ + 67, + 332, + 525, + 380 + ], + "spans": [ + { + "bbox": [ + 67, + 332, + 525, + 380 + ], + "type": "text", + "content": "Figure 2: Comparison between COFFTEA and other baselines. (a) and (b) both fine-tune a Lookup Table containing embeddings of frames with corss entropy loss. (b) uses a frozen frame encoder to initialize the table. (c) employs a single fused encoder to measure the probability of sentence and definition matching. For efficiency purposes, COFFTEA (d) also adopts a dual-encoder structure and leverages contrastive loss to unfreeze the frame encoder." + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "image_caption" + } + ], + "index": 5 + }, + { + "type": "image", + "bbox": [ + 312, + 212, + 496, + 319 + ], + "blocks": [ + { + "bbox": [ + 312, + 212, + 496, + 319 + ], + "lines": [ + { + "bbox": [ + 312, + 212, + 496, + 319 + ], + "spans": [ + { + "bbox": [ + 312, + 212, + 496, + 319 + ], + "type": "image", + "image_path": "86688f3128ae9d869256492197905631b8e02b32a712b9bbca6bef15c898893e.jpg" + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "image_body" + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 401, + 290, + 576 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 401, + 290, + 576 + ], + "spans": [ + { + "bbox": [ + 67, + 401, + 290, + 576 + ], + "type": "text", + "content": "ods in frame identification: (a) no definition modeling (Hartmann et al., 2017; Zheng et al., 2022), (b) target encoder and frozen frame encoder (Su et al., 2021; Tamburini, 2022), and (c) single fused encoder (Jiang and Riloff, 2021). Limited by the number of frames in FrameNet, the dual encoder architecture with cross entropy loss (b) have to fix the parameters of the frame encoder while the single encoder architecture (c) have to train and infer under the " + }, + { + "bbox": [ + 67, + 401, + 290, + 576 + ], + "type": "inline_equation", + "content": "w /lf" + }, + { + "bbox": [ + 67, + 401, + 290, + 576 + ], + "type": "text", + "content": " setting. Therefore, we still use two encoders to separately encode the sentence with targets and frame definition, and employ contrastive learning to make the frame encoder trainable." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 577, + 290, + 631 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 577, + 290, + 631 + ], + "spans": [ + { + "bbox": [ + 67, + 577, + 290, + 631 + ], + "type": "text", + "content": "We follow Su et al. (2021); Jiang and Riloff (2021); Tamburini (2022) to use PLMs (Devlin et al., 2019) as target encoder (§3.1.1) and frame encoder (§3.1.2)." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 643, + 177, + 655 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 643, + 177, + 655 + ], + "spans": [ + { + "bbox": [ + 67, + 643, + 177, + 655 + ], + "type": "text", + "content": "3.1.1 Target Encoder" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "spans": [ + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": "The target encoder converts input sentence " + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "S" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": " with " + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "n" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": " tokens " + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "w_{1},\\ldots ,w_{n}" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": " into contextualized representations " + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "h_1,\\dots ,h_n" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": ". The contextualized representation " + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "t" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": " of target span " + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "w_{t_s},\\ldots ,w_{t_e}" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "(1\\leq t_{s}\\leq t_{e}\\leq n)" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": " is the maxpooling of " + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "inline_equation", + "content": "h_{t_s},\\ldots ,h_{t_e}" + }, + { + "bbox": [ + 67, + 661, + 290, + 740 + ], + "type": "text", + "content": " (Zheng et al., 2023)." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 93, + 756, + 290, + 769 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 93, + 756, + 290, + 769 + ], + "spans": [ + { + "bbox": [ + 93, + 756, + 290, + 769 + ], + "type": "interline_equation", + "content": "h _ {1}, \\dots , h _ {n} = \\operatorname {E n c o d e r} _ {t} \\left(w _ {1}, \\dots , w _ {n}\\right) \\tag {1}", + "image_path": "308a81a7b1cc5a147a174c6c65765b24a8bfad32d67fab1f5c954e8ae5428445.jpg" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 342, + 401, + 525, + 415 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 342, + 401, + 525, + 415 + ], + "spans": [ + { + "bbox": [ + 342, + 401, + 525, + 415 + ], + "type": "interline_equation", + "content": "t = \\operatorname {M a x P o o l i n g} \\left(h _ {t _ {s}}, \\dots , h _ {t _ {e}}\\right) \\tag {2}", + "image_path": "b95d9deba91ff1cf6b972a9e002b553fbd573d355c1780d3a76b1ff2af3c2ac2.jpg" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 422, + 525, + 543 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 422, + 525, + 543 + ], + "spans": [ + { + "bbox": [ + 302, + 422, + 525, + 543 + ], + "type": "text", + "content": "With the target encoder, we capture the contextual information of the target sentence and the sufficient modeling of context can be used to find out-of-vocabulary targets. Our goal is to not only ensure a close proximity between the representations of the target and the frame but also to ensure that the target representations in different sentences, which activate the same frame, exhibit a high degree of similarity." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 550, + 412, + 562 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 550, + 412, + 562 + ], + "spans": [ + { + "bbox": [ + 302, + 550, + 412, + 562 + ], + "type": "text", + "content": "3.1.2 Frame Encoder" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "spans": [ + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "text", + "content": "Taking Board_vehicle as frame name and its corresponding definition \"A Traveller boards a Vehicle that they intend to use as a means of transportation either as a passenger or as a driver\" as def. Similarly, frame encoder converts " + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "inline_equation", + "content": "D =" + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "text", + "content": " frame name|def, denoted as " + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "inline_equation", + "content": "w_{1}^{\\prime},\\ldots ,w_{m}^{\\prime}" + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "text", + "content": " into representations " + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "inline_equation", + "content": "h_1^\\prime ,\\dots ,h_m^\\prime" + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "text", + "content": ". We follow Reimers and Gurevych (2019) to regard meanpooling of all tokens as frame representations " + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "inline_equation", + "content": "f" + }, + { + "bbox": [ + 301, + 566, + 526, + 688 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 312, + 708, + 525, + 724 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 312, + 708, + 525, + 724 + ], + "spans": [ + { + "bbox": [ + 312, + 708, + 525, + 724 + ], + "type": "interline_equation", + "content": "h _ {1} ^ {\\prime}, \\dots , h _ {m} ^ {\\prime} = \\operatorname {E n c o d e r} _ {f} \\left(w _ {1} ^ {\\prime}, \\dots , w _ {m} ^ {\\prime}\\right) \\tag {3}", + "image_path": "d671d219beed59ee8a5636ab6529934b6d9b0c5e33a88076ddf24b0acf351ca5.jpg" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 357, + 724, + 524, + 740 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 357, + 724, + 524, + 740 + ], + "spans": [ + { + "bbox": [ + 357, + 724, + 524, + 740 + ], + "type": "interline_equation", + "content": "f = \\operatorname {M e a n P o o l i n g} \\left(h _ {1} ^ {\\prime}, \\dots , h _ {m} ^ {\\prime}\\right) \\tag {4}", + "image_path": "956c0657ac166b371000e11615bb2239ce4444a3716f4607d81f611976dce3dd.jpg" + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "type": "text", + "content": "Through the frame encoder, we encode frame definitions to represent frames. Similar to the target" + } + ] + } + ], + "index": 19 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "13457" + } + ] + } + ], + "index": 20 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 74, + 69, + 288, + 126 + ], + "blocks": [ + { + "bbox": [ + 74, + 69, + 288, + 126 + ], + "lines": [ + { + "bbox": [ + 74, + 69, + 288, + 126 + ], + "spans": [ + { + "bbox": [ + 74, + 69, + 288, + 126 + ], + "type": "image", + "image_path": "9052a5a6a36197d5151213ae2874ec4da4648aed62d3cab50a90d20c09d18259.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 175, + 127, + 186, + 136 + ], + "lines": [ + { + "bbox": [ + 175, + 127, + 186, + 136 + ], + "spans": [ + { + "bbox": [ + 175, + 127, + 186, + 136 + ], + "type": "text", + "content": "(a)" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "type": "image", + "bbox": [ + 76, + 138, + 287, + 195 + ], + "blocks": [ + { + "bbox": [ + 76, + 138, + 287, + 195 + ], + "lines": [ + { + "bbox": [ + 76, + 138, + 287, + 195 + ], + "spans": [ + { + "bbox": [ + 76, + 138, + 287, + 195 + ], + "type": "image", + "image_path": "bca54ce6c2eebd97a39c7f557840c0fe21ee60e59a2dd382c4da538f2aad343d.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 176, + 195, + 186, + 203 + ], + "lines": [ + { + "bbox": [ + 176, + 195, + 186, + 203 + ], + "spans": [ + { + "bbox": [ + 176, + 195, + 186, + 203 + ], + "type": "text", + "content": "(b)" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + }, + { + "bbox": [ + 67, + 218, + 291, + 279 + ], + "lines": [ + { + "bbox": [ + 67, + 218, + 291, + 279 + ], + "spans": [ + { + "bbox": [ + 67, + 218, + 291, + 279 + ], + "type": "text", + "content": "Figure 3: Coarse-to-Fine Learning of COFFTEA. In-batch learning (a) is first applied with coarse-grained in-batch negative examples " + }, + { + "bbox": [ + 67, + 218, + 291, + 279 + ], + "type": "inline_equation", + "content": "\\mathcal{B}" + }, + { + "bbox": [ + 67, + 218, + 291, + 279 + ], + "type": "text", + "content": ". In-candidate learning (b) is then employed to differentiate gold frame with hard negatives " + }, + { + "bbox": [ + 67, + 218, + 291, + 279 + ], + "type": "inline_equation", + "content": "\\mathcal{C}" + }, + { + "bbox": [ + 67, + 218, + 291, + 279 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 301, + 290, + 367 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 301, + 290, + 367 + ], + "spans": [ + { + "bbox": [ + 67, + 301, + 290, + 367 + ], + "type": "text", + "content": "encoder, the frame encoder not only focuses on aligning frames with targets but is also intended to reflect the semantic relationships between frames themselves, such as Inheritance (Su et al., 2021; Zheng et al., 2022)." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 376, + 176, + 390 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 376, + 176, + 390 + ], + "spans": [ + { + "bbox": [ + 67, + 376, + 176, + 390 + ], + "type": "text", + "content": "3.2 Learning Process" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "spans": [ + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "type": "text", + "content": "In order to capture the alignment between frames and targets, we aim to minimize the distance between the target and the gold frame (positive pair) while maximizing the distance between the target and other frames (negative pairs) during the training process. However, encoding such a large number of frames, which exceeds 1000, and updating the encoders with gradients for all of them becomes infeasible. Therefore, we need to sample a subset of frames as negative pairs. As discussed earlier, both training " + }, + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "type": "inline_equation", + "content": "w / o" + }, + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 67, + 394, + 290, + 569 + ], + "type": "text", + "content": " have their limitations. To address this, we propose a two-stage learning process in Fig. 3." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 570, + 290, + 690 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 570, + 290, + 690 + ], + "spans": [ + { + "bbox": [ + 67, + 570, + 290, + 690 + ], + "type": "text", + "content": "We first employ in-batch learning (§3.2.1), where we treat the gold frames of other targets in the same batch as negative examples. This allows us to learn coarse-grained frame semantic differences. Then we utilize in-candidate learning (§3.2.2), where we treat other frames in lexicon filter candidates as hard negatives. This step helps us refine the frame representations and capture fine-grained semantic distinctions" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": "Specifically, we adopt cosine similarity " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "\\cos (t,f) = \\frac{t\\cdot f}{\\|t\\|^{\\cdot}\\|f\\|}" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": " as distance metric and utilize contrastive learning to distinguish positive pairs from negative pairs. Let " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{B}}" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{C}}" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": " denotes the contrastive loss of in-batch learning and incandidate learning. The main difference between" + } + ] + } + ], + "index": 9 + }, + { + "type": "table", + "bbox": [ + 305, + 68, + 524, + 114 + ], + "blocks": [ + { + "bbox": [ + 305, + 68, + 524, + 114 + ], + "lines": [ + { + "bbox": [ + 305, + 68, + 524, + 114 + ], + "spans": [ + { + "bbox": [ + 305, + 68, + 524, + 114 + ], + "type": "table", + "html": "
Datasetsexemplartraindevtest|F|
FN 1.515394616621228444281019
FN 1.719243119391227267141221
", + "image_path": "f9b63677cd501a83c166b32bac9a1bac57fa28c1b7870b40f84c1aab7f6497a8.jpg" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "table_body" + } + ], + "index": 10 + }, + { + "bbox": [ + 334, + 121, + 492, + 133 + ], + "lines": [ + { + "bbox": [ + 334, + 121, + 492, + 133 + ], + "spans": [ + { + "bbox": [ + 334, + 121, + 492, + 133 + ], + "type": "text", + "content": "Table 1: Statistics of FrameNet dataset" + } + ] + } + ], + "index": 11, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 156, + 525, + 183 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 156, + 525, + 183 + ], + "spans": [ + { + "bbox": [ + 302, + 156, + 525, + 183 + ], + "type": "text", + "content": "the two-stage learning lies in the construction of negative pairs " + }, + { + "bbox": [ + 302, + 156, + 525, + 183 + ], + "type": "inline_equation", + "content": "\\mathcal{B}" + }, + { + "bbox": [ + 302, + 156, + 525, + 183 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 156, + 525, + 183 + ], + "type": "inline_equation", + "content": "\\mathcal{C}" + }, + { + "bbox": [ + 302, + 156, + 525, + 183 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 312, + 194, + 525, + 225 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 312, + 194, + 525, + 225 + ], + "spans": [ + { + "bbox": [ + 312, + 194, + 525, + 225 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {\\mathcal {B}} = - \\log \\frac {\\exp \\left(\\cos \\left(t , f ^ {+}\\right) / \\tau\\right)}{\\sum_ {f \\in \\mathcal {B} \\cup \\{f ^ {+} \\}} \\exp \\left(\\cos \\left(t , f\\right) / \\tau\\right)} \\tag {5}", + "image_path": "9f8ed87385e15fa4f2fdc400289218e85748fb2b646806e26fdd9f2be01a6866.jpg" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 312, + 227, + 525, + 259 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 312, + 227, + 525, + 259 + ], + "spans": [ + { + "bbox": [ + 312, + 227, + 525, + 259 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {\\mathcal {C}} = - \\log \\frac {\\exp (\\cos (t , f ^ {+}) / \\tau)}{\\sum_ {f \\in \\mathcal {C} \\cup \\{f ^ {+} \\}} \\exp (\\cos (t , f) / \\tau)} \\tag {6}", + "image_path": "496c4a1d9422ec9729546892e58de1751d1d5a972a927ea3952f81148de2f384.jpg" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 269, + 425, + 282 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 269, + 425, + 282 + ], + "spans": [ + { + "bbox": [ + 302, + 269, + 425, + 282 + ], + "type": "text", + "content": "3.2.1 In-batch Learning" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "spans": [ + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "text", + "content": "Training directly " + }, + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "text", + "content": " may cause the model to primarily focus on distinguishing the differences between the gold frame and the candidates. In order to broaden the model's horizons, we first conduct training " + }, + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "inline_equation", + "content": "w / o l f" + }, + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "text", + "content": ", allowing the model to learn to differentiate coarse-grained semantic differences. We follow Khosla et al. (2020) to construct in-batch negative examples " + }, + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "inline_equation", + "content": "\\mathcal{B}" + }, + { + "bbox": [ + 302, + 285, + 525, + 393 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 403, + 444, + 416 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 403, + 444, + 416 + ], + "spans": [ + { + "bbox": [ + 302, + 403, + 444, + 416 + ], + "type": "text", + "content": "3.2.2 In-candidate Learning" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 301, + 420, + 525, + 514 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 420, + 525, + 514 + ], + "spans": [ + { + "bbox": [ + 301, + 420, + 525, + 514 + ], + "type": "text", + "content": "Through in-batch learning, our model can effectively differentiate some frames that are relatively easy to distinguish. However, we aim to further distinguish frames that are more likely to be confused with one another. Typically, when using " + }, + { + "bbox": [ + 301, + 420, + 525, + 514 + ], + "type": "inline_equation", + "content": "lf" + }, + { + "bbox": [ + 301, + 420, + 525, + 514 + ], + "type": "text", + "content": ", the other candidate frames for the same target can serve as negative examples " + }, + { + "bbox": [ + 301, + 420, + 525, + 514 + ], + "type": "inline_equation", + "content": "\\mathcal{C}" + }, + { + "bbox": [ + 301, + 420, + 525, + 514 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 302, + 515, + 525, + 624 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 515, + 525, + 624 + ], + "spans": [ + { + "bbox": [ + 302, + 515, + 525, + 624 + ], + "type": "text", + "content": "However, the number of candidate frames for different targets can vary, and there are even cases where some targets only activate one frame in FrameNet. To address this issue, we pad the number of " + }, + { + "bbox": [ + 302, + 515, + 525, + 624 + ], + "type": "inline_equation", + "content": "\\mathcal{C}" + }, + { + "bbox": [ + 302, + 515, + 525, + 624 + ], + "type": "text", + "content": " for all targets to a fixed number (e.g., 15). This padding ensures that each target has a consistent number of candidate frames available for comparison during the training process." + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 302, + 624, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 624, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 624, + 526, + 772 + ], + "type": "text", + "content": "We consider leveraging the semantic relationships between frames in FrameNet (§A.3) to expand C. Inheritance represents the \"is-a\" relationship between frames. For example, receiving inherits from getting, then getting becomes the super frame and receiving becomes the sub frame. Other frames that also inherit from getting, such as Commerce_buy and Taking, are considered siblings of receiving. These siblings exhibit semantic similarities with receiving, but with subtle differences, making them suitable as hard negative examples." + } + ] + } + ], + "index": 20 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "13458" + } + ] + } + ], + "index": 21 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 77, + 68, + 518, + 236 + ], + "blocks": [ + { + "bbox": [ + 77, + 68, + 518, + 236 + ], + "lines": [ + { + "bbox": [ + 77, + 68, + 518, + 236 + ], + "spans": [ + { + "bbox": [ + 77, + 68, + 518, + 236 + ], + "type": "table", + "html": "
ModelsFN 1.5OverallFN 1.7
AccR@1R@3R@5AccR@1R@3R@5
Hartmann et al. (2017)†87.6377.49--82.2583.0076.10--
KGFI (2021)†92.1385.63--88.7692.4085.8191.5992.88
FIDO (2021)†91.30----92.10---
Tamburini (2022)92.57----92.33---
Lookup Table88.6078.4886.7488.1683.2389.0278.7587.4388.71
+ init. with Def90.4083.5688.2589.3286.8590.3085.1788.9389.87
+LB91.0686.5291.7392.6888.7390.9487.1392.3093.21
LBonly†91.8284.7394.4796.1888.1391.5884.8893.8895.90
LConly†92.5076.5187.3591.0183.7592.7078.3388.9391.64
LBonly90.9486.7795.1496.7988.8191.3687.3895.2996.77
COFFTEA92.5587.6992.6494.7190.0592.6487.3492.9194.29
", + "image_path": "5f724d46076e87d29ce41e42ee9facc97bf798aa0e0f064fde5b5829ac036b36.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "lines": [ + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "spans": [ + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "text", + "content": "Table 2: Main results on FN1.5 and 1.7. Acc denotes accuracy with lexicon filtering and " + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "inline_equation", + "content": "\\mathbf{R}@\\boldsymbol{k}" + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "text", + "content": " denotes recall at " + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "inline_equation", + "content": "k" + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "text", + "content": " without lexicon filtering. Overall represents the harmonic mean of Acc and " + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "inline_equation", + "content": "\\mathbf{R}@\\mathbf{1}" + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "text", + "content": ", reflecting the comprehensive capability of models. Through dual encoders and two-stage learning, COFFTEA outperforms the previous methods (the topmost block) by at least 0.93 overall scores. Ablation study on dual encoders and two-stage learning is listed in the middle and bottom blocks (" + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "inline_equation", + "content": "\\S 4.4" + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "text", + "content": "). " + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "inline_equation", + "content": "\\dagger" + }, + { + "bbox": [ + 67, + 243, + 525, + 306 + ], + "type": "text", + "content": " means the model does not trained with exemplar sentences." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 325, + 290, + 352 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 325, + 290, + 352 + ], + "spans": [ + { + "bbox": [ + 67, + 325, + 290, + 352 + ], + "type": "text", + "content": "We follow the order of candidate frames, sibling frames, and random frames to construct " + }, + { + "bbox": [ + 67, + 325, + 290, + 352 + ], + "type": "inline_equation", + "content": "\\mathcal{C}" + }, + { + "bbox": [ + 67, + 325, + 290, + 352 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 361, + 151, + 375 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 361, + 151, + 375 + ], + "spans": [ + { + "bbox": [ + 67, + 361, + 151, + 375 + ], + "type": "text", + "content": "4 Experiment" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 382, + 267, + 396 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 382, + 267, + 396 + ], + "spans": [ + { + "bbox": [ + 67, + 382, + 267, + 396 + ], + "type": "text", + "content": "Our experiments mainly cover three aspects:" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 80, + 401, + 291, + 619 + ], + "type": "list", + "angle": 0, + "index": 8, + "blocks": [ + { + "bbox": [ + 80, + 401, + 290, + 469 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 401, + 290, + 469 + ], + "spans": [ + { + "bbox": [ + 80, + 401, + 290, + 469 + ], + "type": "text", + "content": "- Main experimental results on frame identification: We compare the performance of COFFTEA with previous approaches both with lexicon filtering " + }, + { + "bbox": [ + 80, + 401, + 290, + 469 + ], + "type": "inline_equation", + "content": "(w / l f)" + }, + { + "bbox": [ + 80, + 401, + 290, + 469 + ], + "type": "text", + "content": " and without lexicon filtering " + }, + { + "bbox": [ + 80, + 401, + 290, + 469 + ], + "type": "inline_equation", + "content": "(w / o l f)" + }, + { + "bbox": [ + 80, + 401, + 290, + 469 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 80, + 477, + 291, + 530 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 477, + 291, + 530 + ], + "spans": [ + { + "bbox": [ + 80, + 477, + 291, + 530 + ], + "type": "text", + "content": "- Further ablation study: to demonstrate the contributions of the learnable frame encoder and Coarse-to-Fine learning to the performance of COFFTEA." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 80, + 539, + 291, + 619 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 539, + 291, + 619 + ], + "spans": [ + { + "bbox": [ + 80, + 539, + 291, + 619 + ], + "type": "text", + "content": "- In-depth representation analysis: We delve into a deeper analysis to investigate how the frame and target encoder of COFFTEA can better represent the alignment between frames and targets, as well as the relationships between frames and frames, targets and targets." + } + ] + } + ], + "index": 7 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 67, + 634, + 136, + 646 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 634, + 136, + 646 + ], + "spans": [ + { + "bbox": [ + 67, + 634, + 136, + 646 + ], + "type": "text", + "content": "4.1 Datasets" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 651, + 291, + 772 + ], + "type": "text", + "content": "We have introduced COFFTEA on two FrameNet datasets: FN 1.5 and FN 1.7. FN 1.7 is an extensive version of FN 1.5, with more annotated sentences and more defined frames. Following Swayamdipta et al. (2017); Su et al. (2021), we spilt the full text into train, dev and test set, and further use exemplars in FrameNet as pretraining data like Peng et al. (2018); Zheng et al. (2022); Tamburini (2022). Table 1 shows the statistics of two datasets." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 303, + 325, + 365, + 337 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 325, + 365, + 337 + ], + "spans": [ + { + "bbox": [ + 303, + 325, + 365, + 337 + ], + "type": "text", + "content": "4.2 Models" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 344, + 526, + 452 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 344, + 526, + 452 + ], + "spans": [ + { + "bbox": [ + 302, + 344, + 526, + 452 + ], + "type": "text", + "content": "We mainly compare COFFTEA with representative previous methods from the different categories shown in Fig. 2: traditional representation learning based methods without definitions (Hartmann et al., 2017), dual encoder architectures with frozen frame encoders (KGFI (2021), Tamburini (2022)), and single fused encoder architectures (FIDO (2021))." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 454, + 527, + 550 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 454, + 527, + 550 + ], + "spans": [ + { + "bbox": [ + 302, + 454, + 527, + 550 + ], + "type": "text", + "content": "In order to conduct further ablation study and deeper analysis, we also implement two baselines represented as (a) and (b) in Fig 2: Lookup Table with random initialization and Lookup Table initialized with definition representations. The implementation details of previous methods, baselines, and COFFTEA can be found in §A.1." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 562, + 393, + 575 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 562, + 393, + 575 + ], + "spans": [ + { + "bbox": [ + 302, + 562, + 393, + 575 + ], + "type": "text", + "content": "4.3 Main Results" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 582, + 525, + 677 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 582, + 525, + 677 + ], + "spans": [ + { + "bbox": [ + 302, + 582, + 525, + 677 + ], + "type": "text", + "content": "To compare our model with previous approaches, as well as our baselines. We report the accuracy (Acc) when lexicon filtering is applied, recall at k " + }, + { + "bbox": [ + 302, + 582, + 525, + 677 + ], + "type": "inline_equation", + "content": "(\\mathbf{R}@\\mathbf{k})" + }, + { + "bbox": [ + 302, + 582, + 525, + 677 + ], + "type": "text", + "content": " when no lexicon filtering is used (indicating whether the gold frame is ranked in the top " + }, + { + "bbox": [ + 302, + 582, + 525, + 677 + ], + "type": "inline_equation", + "content": "k" + }, + { + "bbox": [ + 302, + 582, + 525, + 677 + ], + "type": "text", + "content": " based on similarity), and an Overall score (harmonic average of Acc and R@1)." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 678, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 678, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 678, + 526, + 772 + ], + "type": "text", + "content": "The upper block of Table 2 shows the performance of previous representative methods in frame identification. COFFTEA achieves a performance gain of 0.93 overall scores (88.98 v.s. 89.91), primarily due to a 1.53 increase in R@1 scores (85.81 v.s. 87.34) in the w/o l f setting. This improvement can be attributed to the use of a learnable frame" + } + ] + } + ], + "index": 16 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "13459" + } + ] + } + ], + "index": 17 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 89, + 68, + 505, + 114 + ], + "blocks": [ + { + "bbox": [ + 89, + 68, + 505, + 114 + ], + "lines": [ + { + "bbox": [ + 89, + 68, + 505, + 114 + ], + "spans": [ + { + "bbox": [ + 89, + 68, + 505, + 114 + ], + "type": "table", + "html": "
ModelsPredictions w/o If from rank 2 to 5 (Top-1 is Becoming)
L3 only†Transition_to_a_stateUndergo_transformationChange_post_stateUndergo_change
Lc only†Activity_startLaunch_processMake_acquaintanceMeet_specifications
", + "image_path": "353dcfbfded36a92266b258e13eb5ab977725429f6d57e7f6ec956d812f71afe.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 121, + 525, + 147 + ], + "lines": [ + { + "bbox": [ + 67, + 121, + 525, + 147 + ], + "spans": [ + { + "bbox": [ + 67, + 121, + 525, + 147 + ], + "type": "text", + "content": "Table 3: Predictions in positions 2 to 5 of \"The children and families who come to Pleasant Run are given the opportunity to become happy\". red means the frame is irrelevant to the gold frame Becoming." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "spans": [ + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "text", + "content": "encoder and two-stage learning, which enhance the effectiveness of COFFTEA in modeling definitions. Compared to KGFI, COFFTEA achieves comparable Acc " + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "text", + "content": " (92.40 v.s. 92.64) and consistently performs better in " + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "inline_equation", + "content": "R@k" + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "text", + "content": ", which further demonstrates that through combining in-batch learning and in-candidate learning, COFFTEA is able to select the appropriate frame from both candidates (" + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "inline_equation", + "content": "w/lf" + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "text", + "content": ") and all frames (" + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "inline_equation", + "content": "w/o l f" + }, + { + "bbox": [ + 66, + 168, + 291, + 289 + ], + "type": "text", + "content": ")." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 290, + 290, + 371 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 290, + 290, + 371 + ], + "spans": [ + { + "bbox": [ + 67, + 290, + 290, + 371 + ], + "type": "text", + "content": "Moreover, it is worth noting that some methods (marked " + }, + { + "bbox": [ + 67, + 290, + 290, + 371 + ], + "type": "inline_equation", + "content": "\\dagger" + }, + { + "bbox": [ + 67, + 290, + 290, + 371 + ], + "type": "text", + "content": ") does not utilize exemplars as training data, while previous researches (Su et al., 2021; Zheng et al., 2022) believe that using exemplars for training improves accuracy. Further discussion about using exemplars can be found in §4.4." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 373, + 291, + 440 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 373, + 291, + 440 + ], + "spans": [ + { + "bbox": [ + 67, + 373, + 291, + 440 + ], + "type": "text", + "content": "In addition to representative methods in Table 2, there is a series of frame identification studies that solely focus on Acc w/lf. We report the results of COFFTEA and more previous frame identification works in " + }, + { + "bbox": [ + 67, + 373, + 291, + 440 + ], + "type": "inline_equation", + "content": "\\S \\mathbf{B}.2" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 454, + 167, + 466 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 454, + 167, + 466 + ], + "spans": [ + { + "bbox": [ + 67, + 454, + 167, + 466 + ], + "type": "text", + "content": "4.4 Ablation Study" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 473, + 291, + 634 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 473, + 291, + 634 + ], + "spans": [ + { + "bbox": [ + 67, + 473, + 291, + 634 + ], + "type": "text", + "content": "Frame Encoder Can learnable frame encoder contribute to frame identification? As is shown in the middle block in Table 2, lookup table without definitions achieved relatively low overall scores (83.57). However, when we initialize the lookup table with the definitions encoded by the frozen encoder, the lookup table showed a significant improvement in R@1 w/o lf, with an increase of 6.42 points (78.75 v.s. 85.17). This indicates that even without adjusting the parameters, the frozen encoder of PLMs is capable of modeling the definitions to some extent." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 637, + 291, + 731 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 637, + 291, + 731 + ], + "spans": [ + { + "bbox": [ + 67, + 637, + 291, + 731 + ], + "type": "text", + "content": "To further explore its impact, we apply in-batch learning to the lookup table with definitions. This additional step results in a further improvement of 1.96 points in R@1 w/o lf (85.17 v.s. 87.13). This suggests that in-batch learning reduces the number of negative samples, decreases the learning difficulty, and ultimately leads to better performance." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 733, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 733, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 733, + 291, + 773 + ], + "type": "text", + "content": "Comparing COFFTEA to these lookup tables, we find that unfreezing the frame encoder allows for better modeling of fine-grained semantic differ" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 168, + 526, + 250 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 168, + 526, + 250 + ], + "spans": [ + { + "bbox": [ + 302, + 168, + 526, + 250 + ], + "type": "text", + "content": "ences, resulting in a significant increase of 1.70 points in accuracy " + }, + { + "bbox": [ + 302, + 168, + 526, + 250 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 302, + 168, + 526, + 250 + ], + "type": "text", + "content": " (90.94 v.s. 92.64). This demonstrates the effectiveness of incorporating an unfrozen frame encoder to enhance the modeling of subtle semantic distinctions and improve the performance of the frame identification task." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "spans": [ + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "text", + "content": "Coarse-to-Fine Learning The bottom block in Table 2 demonstrates the trade-off between in-batch learning " + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "inline_equation", + "content": "(\\mathcal{L}_{\\mathcal{B}}" + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "text", + "content": " only) and in-candidate learning " + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "inline_equation", + "content": "(\\mathcal{L}_{\\mathcal{C}}" + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "text", + "content": " only). " + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{B}}" + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "text", + "content": " only achieves the highest R@1 (84.88) and " + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{C}}" + }, + { + "bbox": [ + 302, + 259, + 526, + 380 + ], + "type": "text", + "content": " only yields the highest Acc (92.70). However, the former approach does not excel at distinguishing fine-grained frames (91.58 Acc), while the latter approach even performs worse than the lookup table on R@1 w/o lf (78.33 v.s. 78.75)." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 382, + 526, + 516 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 382, + 526, + 516 + ], + "spans": [ + { + "bbox": [ + 302, + 382, + 526, + 516 + ], + "type": "text", + "content": "Table 3 gives a specific example for comparison. Both methods can correctly predict the frame corresponding to the target become in the given sentence. However, when looking at the predicted frames in positions 2 to 5, the frames predicted by in-batch learning show structural relationships with Becoming, while the frames predicted by in-candidate learning have no connection to becoming. This reflects that in-candidate learning cannot distinguishing frames sufficiently." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 518, + 525, + 599 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 518, + 525, + 599 + ], + "spans": [ + { + "bbox": [ + 302, + 518, + 525, + 599 + ], + "type": "text", + "content": "To address this issue, we train COFFTEA with " + }, + { + "bbox": [ + 302, + 518, + 525, + 599 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{B}}" + }, + { + "bbox": [ + 302, + 518, + 525, + 599 + ], + "type": "text", + "content": " on exemplars and then train COFFTEA with " + }, + { + "bbox": [ + 302, + 518, + 525, + 599 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{C}}" + }, + { + "bbox": [ + 302, + 518, + 525, + 599 + ], + "type": "text", + "content": " with train split, which is equivalent to performing coarse-grained pretraining on a large-scale corpus and then fine-tuning on a smaller dataset for domain adaptation at a finer granularity." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 601, + 525, + 655 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 601, + 525, + 655 + ], + "spans": [ + { + "bbox": [ + 302, + 601, + 525, + 655 + ], + "type": "text", + "content": "We also apply in-batch learning on both train and exemplar. Due to the lack of hard negatives, its performance on Acc " + }, + { + "bbox": [ + 302, + 601, + 525, + 655 + ], + "type": "inline_equation", + "content": "w /lf" + }, + { + "bbox": [ + 302, + 601, + 525, + 655 + ], + "type": "text", + "content": " is lower than COFFTEA (91.36 v.s. 92.64)." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 665, + 526, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 665, + 526, + 773 + ], + "spans": [ + { + "bbox": [ + 302, + 665, + 526, + 773 + ], + "type": "text", + "content": "Exemplars Using exemplars as additional training data is a common practice (Peng et al., 2018; Chen et al., 2021; Zheng et al., 2022). Since in-batch learning benefits from larger-scale data (84.88 v.s. 87.38 in Table 2), we chose to use the larger set, exemplars for the first stage of in-batch learning. However, this makes our results not directly comparable to those of previous methods (Su" + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "13460" + } + ] + } + ], + "index": 15 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 77, + 69, + 280, + 170 + ], + "blocks": [ + { + "bbox": [ + 77, + 69, + 280, + 170 + ], + "lines": [ + { + "bbox": [ + 77, + 69, + 280, + 170 + ], + "spans": [ + { + "bbox": [ + 77, + 69, + 280, + 170 + ], + "type": "table", + "html": "
Modelsw/ exam.w/o exam.Δ
Tamburini (2022)91.4292.33-0.91
Lookup Table89.0289.41-0.39
+ init. with Def90.4090.66-0.26
+LB91.0691.23-0.17
LBonly91.3691.58-0.22
COFFTEA92.5592.240.31
", + "image_path": "74f6c92f21578640ed0bf9494d80980cdc35b375729b198fbedea4321960bd76.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 77, + 227, + 280, + 297 + ], + "blocks": [ + { + "bbox": [ + 67, + 179, + 291, + 216 + ], + "lines": [ + { + "bbox": [ + 67, + 179, + 291, + 216 + ], + "spans": [ + { + "bbox": [ + 67, + 179, + 291, + 216 + ], + "type": "text", + "content": "Table 4: Training with extra exemplars does not increase the model performance. COFFTEA can effectively utilize exemplars via two-stage learning." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 77, + 227, + 280, + 297 + ], + "lines": [ + { + "bbox": [ + 77, + 227, + 280, + 297 + ], + "spans": [ + { + "bbox": [ + 77, + 227, + 280, + 297 + ], + "type": "table", + "html": "
ModelsAccAcc w/ [MASK]Δ
Lookup Table89.0278.1110.92
+ init. with Def90.3077.5812.72
+LB90.9477.9113.03
COFFTEA92.6485.826.82
", + "image_path": "01f80ebee42c1952408adb94bcc33a28c6bd2968743e8d302402e09948bdb5a4.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 377, + 291, + 513 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 377, + 291, + 513 + ], + "spans": [ + { + "bbox": [ + 67, + 377, + 291, + 513 + ], + "type": "text", + "content": "et al., 2021) that only use the training set. However, more training data does not necessarily lead to improved performance. As shown in Table 4, the performance of Tamburini (2022) and our lookup table baselines decreases after using exemplars, possibly due to a domain mismatch between the exemplars and the training set. However, our two-stage approach effectively utilizes both datasets to get an improvement of 0.31 Acc, providing a more appropriate way to utilize exemplars for future work." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 524, + 175, + 538 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 524, + 175, + 538 + ], + "spans": [ + { + "bbox": [ + 67, + 524, + 175, + 538 + ], + "type": "text", + "content": "4.5 Further Analysis" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 543, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 543, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 543, + 291, + 772 + ], + "type": "text", + "content": "Target-Frame Alignments The results in Table 2 demonstrate that COFFTEA effectively models the alignment between targets and frames. However, we still want to explore whether the model's ability to predict a frame is due to its accurate modeling of the target's contextual information in the sentence or if there are other shortcuts involved. Moreover, if COFFTEA can effectively model the context of the target, it can also be used to discover out-of-vocabulary targets. To investigate this, we replace the target in the sentence with the [MASK] token and compute the similarity between the masked target representation and frames. Table 5 shows that when the target is masked, the accuracy of the model decreases across the board. COFFTEA achieves the smallest decrease in performance " + }, + { + "bbox": [ + 67, + 543, + 291, + 772 + ], + "type": "inline_equation", + "content": "(\\Delta)" + }, + { + "bbox": [ + 67, + 543, + 291, + 772 + ], + "type": "text", + "content": ", indicating the capability of our dual" + } + ] + } + ], + "index": 6 + }, + { + "type": "table", + "bbox": [ + 313, + 69, + 515, + 154 + ], + "blocks": [ + { + "bbox": [ + 67, + 306, + 290, + 354 + ], + "lines": [ + { + "bbox": [ + 67, + 306, + 290, + 354 + ], + "spans": [ + { + "bbox": [ + 67, + 306, + 290, + 354 + ], + "type": "text", + "content": "Table 5: Masking target words can cause the decrease of accuracy. The extent of the decrease, " + }, + { + "bbox": [ + 67, + 306, + 290, + 354 + ], + "type": "inline_equation", + "content": "\\Delta" + }, + { + "bbox": [ + 67, + 306, + 290, + 354 + ], + "type": "text", + "content": ", reflects whether the model understands the context information of the target." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 313, + 69, + 515, + 154 + ], + "lines": [ + { + "bbox": [ + 313, + 69, + 515, + 154 + ], + "spans": [ + { + "bbox": [ + 313, + 69, + 515, + 154 + ], + "type": "table", + "html": "
ModelsR@110 target exemplars
R@1R@3R@5
Lookup Table78.7563.9675.5477.27
+ init. with Def85.1781.7189.5190.33
+ Lβ87.1383.0492.2493.40
COFFTEA87.3485.5893.0794.89
", + "image_path": "bfcc7747cbc503e268778e14d8f4e38225c2bc3fd17edba4b1fe28ac7c2ff009.jpg" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "table_body" + } + ], + "index": 7 + }, + { + "type": "table", + "bbox": [ + 332, + 222, + 497, + 328 + ], + "blocks": [ + { + "bbox": [ + 302, + 163, + 526, + 211 + ], + "lines": [ + { + "bbox": [ + 302, + 163, + 526, + 211 + ], + "spans": [ + { + "bbox": [ + 302, + 163, + 526, + 211 + ], + "type": "text", + "content": "Table 6: Representing frames with definitions and ten target exemplars. The target encoder of COFFTEA can get similar and consistent representations of targets related to the same frame." + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 332, + 222, + 497, + 328 + ], + "lines": [ + { + "bbox": [ + 332, + 222, + 497, + 328 + ], + "spans": [ + { + "bbox": [ + 332, + 222, + 497, + 328 + ], + "type": "table", + "html": "
ModelsAverage Δα/α
Lookup Table0.158
+ init. with Def0.012
+LB0.070
LBonly†56.290
LConly†6.494
COFFTEA121.816
COFFTEA w/o. sibling34.907
", + "image_path": "a5b2036fef7ffe4dc2aeed7e39e3fbf0feac0d2fee359f51b0fb64061fc29329.jpg" + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "table_body" + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 336, + 525, + 396 + ], + "lines": [ + { + "bbox": [ + 302, + 336, + 525, + 396 + ], + "spans": [ + { + "bbox": [ + 302, + 336, + 525, + 396 + ], + "type": "text", + "content": "Table 7: The learnable frame encoder better models the structured information between frames. The perception of structure in COFFTEA comes from the first stage of in-batch learning and the utilization of siblings as hard negatives." + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 418, + 525, + 472 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 418, + 525, + 472 + ], + "spans": [ + { + "bbox": [ + 302, + 418, + 525, + 472 + ], + "type": "text", + "content": "encoder structure to effectively model the alignment between target context and frames. This capability also indicates that COFFTEA can explore out-of-vocabulary targets." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 481, + 526, + 698 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 481, + 526, + 698 + ], + "spans": [ + { + "bbox": [ + 302, + 481, + 526, + 698 + ], + "type": "text", + "content": "Target-Target Relations The target encoder ensures a close proximity between targets and their corresponding frames. However, we believe that different sentences the target representations in different sentences, which activate the same frame, are supposed to exhibit a high degree of similarity. We select ten exemplars for each frame and replace frame representations with the mean representation (centroid) of these exemplars. In Table 6, we compare two frame representations: directly encoding the definition and encoding ten exemplars. COFFTEA achieves consistent and similar performance in both settings (87.34 and 85.58), reflecting the similarity between the target representations of the same frame and the final frame representation, as captured by our target encoder." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 706, + 525, + 772 + ], + "type": "text", + "content": "Frame-Frame Relations Due to the semantic relations defined by FrameNet between frames (such as inheritance, using, subframe, etc.), frames are not isolated but rather interconnected with each other, forming structural relationships. For exam" + } + ] + } + ], + "index": 13 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "type": "text", + "content": "13461" + } + ] + } + ], + "index": 14 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 291, + 139 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 291, + 139 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 291, + 139 + ], + "type": "text", + "content": "ple, if receiving inherits from getting, their representations should be similar. Frame representations should reflect the structural relationships. To evaluate the degree of similarity between a subframe " + }, + { + "bbox": [ + 67, + 71, + 291, + 139 + ], + "type": "inline_equation", + "content": "f_{sub}" + }, + { + "bbox": [ + 67, + 71, + 291, + 139 + ], + "type": "text", + "content": " and its superframe " + }, + { + "bbox": [ + 67, + 71, + 291, + 139 + ], + "type": "inline_equation", + "content": "f_{sup}" + }, + { + "bbox": [ + 67, + 71, + 291, + 139 + ], + "type": "text", + "content": ", we define a metric," + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 122, + 144, + 290, + 176 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 122, + 144, + 290, + 176 + ], + "spans": [ + { + "bbox": [ + 122, + 144, + 290, + 176 + ], + "type": "interline_equation", + "content": "\\alpha = \\frac {1}{| \\mathcal {F} |} \\cdot \\sum_ {f \\in \\mathcal {F}} \\cos \\left(f _ {\\text {s u b}}, f\\right) \\tag {7}", + "image_path": "6232c1f7efee64224178ee9ddcbd97cc416a5d3f1467e26da17fd22a8925a9de.jpg" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 114, + 180, + 290, + 195 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 114, + 180, + 290, + 195 + ], + "spans": [ + { + "bbox": [ + 114, + 180, + 290, + 195 + ], + "type": "interline_equation", + "content": "\\Delta \\alpha = \\cos \\left(f _ {s u b}, f _ {s u p}\\right) - \\alpha \\tag {8}", + "image_path": "5be2e44155e60a8fca09dc7fffde8753e6e0a6f02d836f05eb64a21655202504.jpg" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 200, + 290, + 255 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 200, + 290, + 255 + ], + "spans": [ + { + "bbox": [ + 67, + 200, + 290, + 255 + ], + "type": "inline_equation", + "content": "\\frac{\\Delta \\alpha}{\\alpha}" + }, + { + "bbox": [ + 67, + 200, + 290, + 255 + ], + "type": "text", + "content": " is a normalized evaluation reflecting how a subframe is close to its superframe compared to other frames. We report the average " + }, + { + "bbox": [ + 67, + 200, + 290, + 255 + ], + "type": "inline_equation", + "content": "\\frac{\\Delta \\alpha}{\\alpha} (\\alpha > 0)" + }, + { + "bbox": [ + 67, + 200, + 290, + 255 + ], + "type": "text", + "content": " of inheritance pairs in Table 7." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 256, + 291, + 350 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 256, + 291, + 350 + ], + "spans": [ + { + "bbox": [ + 67, + 256, + 291, + 350 + ], + "type": "text", + "content": "The baselines (the upper block) without a learnable frame encoder struggle to model the relationships between frames effectively. The distance between subframes and superframes is almost the same as that between other frames. However, using a learnable frame encoder greatly improves the similarity between subframes and superframes." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 351, + 291, + 500 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 351, + 291, + 500 + ], + "spans": [ + { + "bbox": [ + 67, + 351, + 291, + 500 + ], + "type": "text", + "content": "In-candidate learning, if used alone, tends to overly focus on differentiating frames with similar semantics, which actually decreases the similarity between them (6.494 v.s. 56.290). On the other hand, COFFTEA effectively models the similarity between associated frames. This is mainly because we use two-stage learning and treat siblings as hard negative examples during training (34.907 v.s. 121.816), which indirectly enables the model to learn the connection between subframes and superframes." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 68, + 509, + 161, + 522 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 509, + 161, + 522 + ], + "spans": [ + { + "bbox": [ + 68, + 509, + 161, + 522 + ], + "type": "text", + "content": "5 Related Work" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 529, + 291, + 582 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 529, + 291, + 582 + ], + "spans": [ + { + "bbox": [ + 67, + 529, + 291, + 582 + ], + "type": "text", + "content": "Frame Identification Prior research in frame identification has primarily focused on modeling the similarity between targets and frames or assessing the matching score between them." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 584, + 292, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 584, + 292, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 584, + 292, + 773 + ], + "type": "text", + "content": "In terms of modeling similarity, Hartmann et al. (2017); Peng et al. (2018); Zheng et al. (2022) leverage target encoder with a trainable frame representation table, while ignoring the valuable contextual frame information provided by FrameNet. To remedy this deficiency, Su et al. (2021); Tamburini (2022) both propose to incorporate frame definitions into frame encoder. Despite these efforts, the number of frames and the optimizing objective make it infeasible to update frame representation during training, leading to a compromise of freezing it. Consequently, they all trap in the dilemma to obtain optimal frame representation. As for assessing the matching score, Jiang and Riloff (2021)" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "type": "text", + "content": "propose a fused encoder to evaluate semantic coherence between sentence and frame definition. Nevertheless, it just fails to evaluate the performance of " + }, + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "type": "inline_equation", + "content": "w / o" + }, + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 302, + 71, + 526, + 125 + ], + "type": "text", + "content": " scenario." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "spans": [ + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "text", + "content": "In addition, the aforementioned studies tend to adopt a one-sided relationship between targets and frames. They only train model on either " + }, + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "inline_equation", + "content": "w / \\text{lf}" + }, + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "text", + "content": " or " + }, + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "inline_equation", + "content": "w / o \\text{lf}" + }, + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "text", + "content": ", which can not catch an overall horizon in distinguishing frames. Moreover, only Su et al. (2021) release performance under " + }, + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "inline_equation", + "content": "w / o \\text{lf}" + }, + { + "bbox": [ + 302, + 126, + 526, + 232 + ], + "type": "text", + "content": " scenario, which is essential for evaluating the full capabilities of the model." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 233, + 525, + 288 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 233, + 525, + 288 + ], + "spans": [ + { + "bbox": [ + 302, + 233, + 525, + 288 + ], + "type": "text", + "content": "Some other work like Chanin (2023) treat frame semantic parsing as a sequence-to-sequence text generation task, but its still trap in training under " + }, + { + "bbox": [ + 302, + 233, + 525, + 288 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 302, + 233, + 525, + 288 + ], + "type": "text", + "content": " and can not catch an optimal relationships." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 295, + 525, + 417 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 295, + 525, + 417 + ], + "spans": [ + { + "bbox": [ + 302, + 295, + 525, + 417 + ], + "type": "text", + "content": "Metric Learning Metric learning is a fundamental approach in machine learning that seeks to learn a distance metric or similarity measure that accurately captures the inherent relationships between data points. One particular technique that has gained prominence in this area is Contrastive Learning, which has been extensively applied to a variety of tasks such as text classification (Gao et al., 2021), image classification (He et al., 2020)." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 417, + 525, + 579 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 417, + 525, + 579 + ], + "spans": [ + { + "bbox": [ + 302, + 417, + 525, + 579 + ], + "type": "text", + "content": "The optimized feature space retrieved from Contrastive Learning objective can benefit on learning better representations of data and capturing inner relationship. For frame identification, the primary goal is to obtain a well-aligned target-to-frame space. However, existing researches only focus on using Cross Entropy to directly modeling correlation to All Frames, which presents challenges in capturing complex relationships. Alternatively, Contrastive Learning can be leveraged to optimize and incrementally construct the feature space of frames and targets." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 590, + 381, + 602 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 590, + 381, + 602 + ], + "spans": [ + { + "bbox": [ + 302, + 590, + 381, + 602 + ], + "type": "text", + "content": "6 Conclusion" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "content": "We propose COFFTEA, and its dual encoder can effectively model the definitions with learnable frame encoder and efficiently calculate the similarity scores between a target and all frames. We also conclude that there exists a trade-off between training " + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "inline_equation", + "content": "w / l f" + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "inline_equation", + "content": "w / o" + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "inline_equation", + "content": "l f" + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "content": ", and achieves a comprehensive performance with a two stage learning process. Detailed analysis of the experiments further demonstrates that our two encoders are not limited to their alignment but can also discover other connections between frame and frame, as well as target and target." + } + ] + } + ], + "index": 15 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "13462" + } + ] + } + ], + "index": 16 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "bbox": [ + 68, + 71, + 131, + 84 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 71, + 131, + 84 + ], + "spans": [ + { + "bbox": [ + 68, + 71, + 131, + 84 + ], + "type": "text", + "content": "Limitations" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 68, + 93, + 230, + 105 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 93, + 230, + 105 + ], + "spans": [ + { + "bbox": [ + 68, + 93, + 230, + 105 + ], + "type": "text", + "content": "The limitations of our work include:" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 76, + 116, + 292, + 393 + ], + "type": "list", + "angle": 0, + "index": 5, + "blocks": [ + { + "bbox": [ + 77, + 116, + 291, + 184 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 77, + 116, + 291, + 184 + ], + "spans": [ + { + "bbox": [ + 77, + 116, + 291, + 184 + ], + "type": "text", + "content": "1. We only used cosine similarity as a distance metric and did not explore other methods of metric learning. Investigating alternative distance metrics could potentially enhance the performance of our model." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 76, + 194, + 292, + 289 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 76, + 194, + 292, + 289 + ], + "spans": [ + { + "bbox": [ + 76, + 194, + 292, + 289 + ], + "type": "text", + "content": "2. Currently, the FrameNet dataset does not provide test data for out-of-vocabulary words. Therefore, our exploration of out-of-vocabulary words is limited to preliminary experiments (Table 5). Further investigation with a dedicated dataset containing out-of-vocabulary test data would be valuable." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 76, + 299, + 291, + 393 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 76, + 299, + 291, + 393 + ], + "spans": [ + { + "bbox": [ + 76, + 299, + 291, + 393 + ], + "type": "text", + "content": "3. We only applied the dual-encoder architecture to frame identification and did not explore its application to frame semantic role labeling. Extending our approach to frame semantic role labeling would provide insights into its effectiveness and generalizability beyond frame identification." + } + ] + } + ], + "index": 4 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 68, + 405, + 170, + 419 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 405, + 170, + 419 + ], + "spans": [ + { + "bbox": [ + 68, + 405, + 170, + 419 + ], + "type": "text", + "content": "Acknowledgements" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 427, + 291, + 467 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 427, + 291, + 467 + ], + "spans": [ + { + "bbox": [ + 67, + 427, + 291, + 467 + ], + "type": "text", + "content": "We thank all reviewers for their great efforts. This paper is supported by the National Science Foundation of China under Grant No.61936012." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 68, + 491, + 127, + 504 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 491, + 127, + 504 + ], + "spans": [ + { + "bbox": [ + 68, + 491, + 127, + 504 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 69, + 511, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 13, + "blocks": [ + { + "bbox": [ + 69, + 511, + 291, + 578 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 511, + 291, + 578 + ], + "spans": [ + { + "bbox": [ + 69, + 511, + 291, + 578 + ], + "type": "text", + "content": "Collin Baker, Michael Ellsworth, and Katrin Erk. 2007. SemEval-2007 task 19: Frame semantic structure extraction. In Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007), pages 99–104, Prague, Czech Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 69, + 587, + 291, + 665 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 587, + 291, + 665 + ], + "spans": [ + { + "bbox": [ + 69, + 587, + 291, + 665 + ], + "type": "text", + "content": "Collin F. Baker, Charles J. Fillmore, and John B. Lowe. 1998. The Berkeley FrameNet project. In 36th Annual Meeting of the Association for Computational Linguistics and 17th International Conference on Computational Linguistics, Volume 1, pages 86-90, Montreal, Quebec, Canada. Association for Computational Linguistics." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 69, + 673, + 290, + 698 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 673, + 290, + 698 + ], + "spans": [ + { + "bbox": [ + 69, + 673, + 290, + 698 + ], + "type": "text", + "content": "David Ian Chanin. 2023. Open-source frame semantic parsing. ArXiv, abs/2303.12788." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 69, + 706, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 706, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 706, + 291, + 772 + ], + "type": "text", + "content": "Xudong Chen, Ce Zheng, and Baobao Chang. 2021. Joint multi-decoder framework with hierarchical pointer network for frame semantic parsing. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 2570-2578, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 527, + 772 + ], + "type": "list", + "angle": 0, + "index": 23, + "blocks": [ + { + "bbox": [ + 304, + 72, + 527, + 171 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 527, + 171 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 527, + 171 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 180, + 526, + 236 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 180, + 526, + 236 + ], + "spans": [ + { + "bbox": [ + 304, + 180, + 526, + 236 + ], + "type": "text", + "content": "Charles J Fillmore et al. 1976. Frame semantics and the nature of language. In Annals of the New York Academy of Sciences: Conference on the origin and development of language and speech, volume 280, pages 20-32. New York." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 244, + 526, + 322 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 244, + 526, + 322 + ], + "spans": [ + { + "bbox": [ + 304, + 244, + 526, + 322 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 330, + 526, + 386 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 330, + 526, + 386 + ], + "spans": [ + { + "bbox": [ + 304, + 330, + 526, + 386 + ], + "type": "text", + "content": "Daniel Gildea and Daniel Jurafsky. 2000. Automatic labeling of semantic roles. In Proceedings of the 38th Annual Meeting of the Association for Computational Linguistics, pages 512-520, Hong Kong. Association for Computational Linguistics." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 394, + 526, + 472 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 394, + 526, + 472 + ], + "spans": [ + { + "bbox": [ + 304, + 394, + 526, + 472 + ], + "type": "text", + "content": "Shaoru Guo, Yong Guan, Ru Li, Xiaoli Li, and Hongye Tan. 2020. Incorporating syntax and frame semantics in neural network for machine reading comprehension. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2635-2641, Barcelona, Spain (Online). International Committee on Computational Linguistics." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 481, + 526, + 558 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 481, + 526, + 558 + ], + "spans": [ + { + "bbox": [ + 304, + 481, + 526, + 558 + ], + "type": "text", + "content": "Silvana Hartmann, Ilia Kuznetsov, Teresa Martin, and Iryna Gurevych. 2017. Out-of-domain FrameNet semantic role labeling. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 471-482, Valencia, Spain. Association for Computational Linguistics." + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 304, + 566, + 527, + 633 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 566, + 527, + 633 + ], + "spans": [ + { + "bbox": [ + 304, + 566, + 527, + 633 + ], + "type": "text", + "content": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9729-9738." + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 304, + 641, + 526, + 708 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 641, + 526, + 708 + ], + "spans": [ + { + "bbox": [ + 304, + 641, + 526, + 708 + ], + "type": "text", + "content": "Tianyu Jiang and Ellen Riloff. 2021. Exploiting definitions for frame identification. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2429-2434, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 21 + }, + { + "bbox": [ + 304, + 717, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 717, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 717, + 526, + 772 + ], + "type": "text", + "content": "Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. 2020. Supervised contrastive learning. Advances in neural information processing systems, 33:18661-18673." + } + ] + } + ], + "index": 22 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "type": "text", + "content": "13463" + } + ] + } + ], + "index": 24 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 717 + ], + "type": "list", + "angle": 0, + "index": 8, + "blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 161 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 291, + 161 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 291, + 161 + ], + "type": "text", + "content": "Hao Peng, Sam Thomson, Swabha Swayamdipta, and Noah A. Smith. 2018. Learning joint semantic parsers from disjoint data. 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 1492-1502, New Orleans, Louisiana. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 169, + 291, + 257 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 169, + 291, + 257 + ], + "spans": [ + { + "bbox": [ + 69, + 169, + 291, + 257 + ], + "type": "text", + "content": "Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. 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, Hong Kong, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 264, + 291, + 320 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 264, + 291, + 320 + ], + "spans": [ + { + "bbox": [ + 69, + 264, + 291, + 320 + ], + "type": "text", + "content": "Yuqi Si and Kirk Roberts. 2018. A frame-based nlp system for cancer-related information extraction. In AMIA annual symposium proceedings, volume 2018, page 1524. American Medical Informatics Association." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 328, + 291, + 428 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 328, + 291, + 428 + ], + "spans": [ + { + "bbox": [ + 69, + 328, + 291, + 428 + ], + "type": "text", + "content": "Xuefeng Su, Ru Li, Xiaoli Li, Jeff Z. Pan, Hu Zhang, Qinghua Chai, and Xiaoqi Han. 2021. A knowledge-guided framework for frame identification. 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 5230-5240, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 436, + 291, + 481 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 436, + 291, + 481 + ], + "spans": [ + { + "bbox": [ + 69, + 436, + 291, + 481 + ], + "type": "text", + "content": "Swabha Swayamdipta, Sam Thomson, Chris Dyer, and Noah A Smith. 2017. Frame-semantic parsing with softmax-margin segmental rnns and a syntactic scaffold. arXiv preprint arXiv:1706.09528." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 489, + 291, + 555 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 489, + 291, + 555 + ], + "spans": [ + { + "bbox": [ + 69, + 489, + 291, + 555 + ], + "type": "text", + "content": "Fabio Tamburini. 2022. Combining ELECTRA and adaptive graph encoding for frame identification. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 1671-1679, Marseille, France. European Language Resources Association." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 564, + 291, + 652 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 564, + 291, + 652 + ], + "spans": [ + { + "bbox": [ + 69, + 564, + 291, + 652 + ], + "type": "text", + "content": "Ce Zheng, Xudong Chen, Runxin Xu, and Baobao Chang. 2022. A double-graph based framework for frame semantic parsing. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4998-5011, Seattle, United States. Association for Computational Linguistics." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 660, + 291, + 717 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 660, + 291, + 717 + ], + "spans": [ + { + "bbox": [ + 69, + 660, + 291, + 717 + ], + "type": "text", + "content": "Ce Zheng, Yiming Wang, and Baobao Chang. 2023. Query your model with definitions in framenet: an effective method for frame semantic role labeling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 14029-14037." + } + ] + } + ], + "index": 7 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "type": "text", + "content": "13464" + } + ] + } + ], + "index": 9 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 9 + }, + { + "para_blocks": [ + { + "bbox": [ + 68, + 71, + 190, + 84 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 71, + 190, + 84 + ], + "spans": [ + { + "bbox": [ + 68, + 71, + 190, + 84 + ], + "type": "text", + "content": "A Experiment Details" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 68, + 101, + 174, + 113 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 101, + 174, + 113 + ], + "spans": [ + { + "bbox": [ + 68, + 101, + 174, + 113 + ], + "type": "text", + "content": "A.1 Baseline Models" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 126, + 290, + 166 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 126, + 290, + 166 + ], + "spans": [ + { + "bbox": [ + 67, + 126, + 290, + 166 + ], + "type": "text", + "content": "Hartmann et al. (2017): a simple classifier based on the representation of entire sentence and especially dependents of target." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 167, + 289, + 206 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 167, + 289, + 206 + ], + "spans": [ + { + "bbox": [ + 67, + 167, + 289, + 206 + ], + "type": "text", + "content": "Peng et al. (2018): a joint model to learn semantic parsers from disjoint corpora with a latent variable formulation." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 207, + 290, + 247 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 207, + 290, + 247 + ], + "spans": [ + { + "bbox": [ + 67, + 207, + 290, + 247 + ], + "type": "text", + "content": "Chen et al. (2021): a joint model of multi-decoder and hierarchical pointer network for frame semantic parsing." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 248, + 289, + 274 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 248, + 289, + 274 + ], + "spans": [ + { + "bbox": [ + 67, + 248, + 289, + 274 + ], + "type": "text", + "content": "FIDO (2021): a fused model assessing semantics coherence between sentence and frame definition." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 275, + 290, + 315 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 275, + 290, + 315 + ], + "spans": [ + { + "bbox": [ + 67, + 275, + 290, + 315 + ], + "type": "text", + "content": "KGFI (2021): a dual encoders model for frame identification aligning similarity of targets and precomputed frame representation." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 316, + 289, + 342 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 316, + 289, + 342 + ], + "spans": [ + { + "bbox": [ + 67, + 316, + 289, + 342 + ], + "type": "text", + "content": "Tamburini (2022): similar to Su et al. (2021) with more reliable graph technique." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 343, + 289, + 369 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 343, + 289, + 369 + ], + "spans": [ + { + "bbox": [ + 67, + 343, + 289, + 369 + ], + "type": "text", + "content": "KID (2022): a double graph based model for frame semantic parsing." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 370, + 289, + 396 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 370, + 289, + 396 + ], + "spans": [ + { + "bbox": [ + 67, + 370, + 289, + 396 + ], + "type": "text", + "content": "AGED (2023): a query-based framework for Frame Semantic Role Labeling under frame definition." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 396, + 290, + 436 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 396, + 290, + 436 + ], + "spans": [ + { + "bbox": [ + 67, + 396, + 290, + 436 + ], + "type": "text", + "content": "Chanin (2023): a T5-based model treating frame semantic parsing as sequence-to-sequence text generation task." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 67, + 437, + 290, + 476 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 437, + 290, + 476 + ], + "spans": [ + { + "bbox": [ + 67, + 437, + 290, + 476 + ], + "type": "text", + "content": "Lookup Table: a baseline model aligning target encoder with trainable one-hot mapping frame representation." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 67, + 477, + 290, + 518 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 477, + 290, + 518 + ], + "spans": [ + { + "bbox": [ + 67, + 477, + 290, + 518 + ], + "type": "text", + "content": "Lookup Table init. with definition: a baseline model aligning target encoder with trainable BERT-initialized frame representation." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 67, + 518, + 290, + 558 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 518, + 290, + 558 + ], + "spans": [ + { + "bbox": [ + 67, + 518, + 290, + 558 + ], + "type": "text", + "content": "Lookup Table init. with definition and " + }, + { + "bbox": [ + 67, + 518, + 290, + 558 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathcal{B}}" + }, + { + "bbox": [ + 67, + 518, + 290, + 558 + ], + "type": "text", + "content": ": using Contrastive Loss as optimize objective instead of Cross Entropy." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 68, + 581, + 216, + 594 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 581, + 216, + 594 + ], + "spans": [ + { + "bbox": [ + 68, + 581, + 216, + 594 + ], + "type": "text", + "content": "A.2 Hyper-parameter Setting" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 67, + 605, + 290, + 645 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 605, + 290, + 645 + ], + "spans": [ + { + "bbox": [ + 67, + 605, + 290, + 645 + ], + "type": "text", + "content": "For replicability of our work, we list the Hyperparameter setting of all our baselines and COFFTEA in Table 8." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 68, + 667, + 171, + 679 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 667, + 171, + 679 + ], + "spans": [ + { + "bbox": [ + 68, + 667, + 171, + 679 + ], + "type": "text", + "content": "A.3 Frame Relation" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": "Given a frame " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "f" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": ", to get its sibling frames " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "\\mathcal{F}_{sib}" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": ", we utilize the frame relation Inheritance and consider " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "f" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": " as the superior or subordinate frame of Inheritance to retrieve its subordinate or superior frames, and then get the sibling of " + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "inline_equation", + "content": "f" + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": ". Table 9 shows the Inheritance relation we used." + } + ] + } + ], + "index": 17 + }, + { + "type": "table", + "bbox": [ + 323, + 69, + 506, + 203 + ], + "blocks": [ + { + "bbox": [ + 323, + 69, + 506, + 203 + ], + "lines": [ + { + "bbox": [ + 323, + 69, + 506, + 203 + ], + "spans": [ + { + "bbox": [ + 323, + 69, + 506, + 203 + ], + "type": "table", + "html": "
Hyper-parameterValue
Epochs20
Learning Rate2e-5
OptimizerAdamW
Batch Size of LB32
Gradient Accumulation of LB4
Temperature of LB0.07
Batch Size of LC6
Gradient Accumulation of LC3
Candidate Frame Number of LC15
Temperature of LC1
Dual EncodersBERT-base
", + "image_path": "5a80f012283a4099e8e1ee1c20bac787a690b44d6e32a79b3160f7ee6f77cc18.jpg" + } + ] + } + ], + "index": 18, + "angle": 0, + "type": "table_body" + } + ], + "index": 18 + }, + { + "type": "table", + "bbox": [ + 318, + 235, + 511, + 382 + ], + "blocks": [ + { + "bbox": [ + 344, + 211, + 483, + 223 + ], + "lines": [ + { + "bbox": [ + 344, + 211, + 483, + 223 + ], + "spans": [ + { + "bbox": [ + 344, + 211, + 483, + 223 + ], + "type": "text", + "content": "Table 8: Hyper-parameter settings" + } + ] + } + ], + "index": 19, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 318, + 235, + 511, + 382 + ], + "lines": [ + { + "bbox": [ + 318, + 235, + 511, + 382 + ], + "spans": [ + { + "bbox": [ + 318, + 235, + 511, + 382 + ], + "type": "table", + "html": "
Sup frameSub frame
GettingReceiving \nAmassing \nCommerce_buy \nCommerce_generate \nTaking
ReceivingBorrowing
Transition_to_a_stateBecoming \nUndergo_change
Undergo_changeUndergo_transformation
BecomingTransition_to_a_quality
", + "image_path": "acaa0ce0ca7342816fa21dd39e5d12d139ad8737691f8dfc3e20df1c0a926e39.jpg" + } + ] + } + ], + "index": 20, + "angle": 0, + "type": "table_body" + } + ], + "index": 20 + }, + { + "bbox": [ + 302, + 448, + 508, + 462 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 448, + 508, + 462 + ], + "spans": [ + { + "bbox": [ + 302, + 448, + 508, + 462 + ], + "type": "text", + "content": "B Supplementary Experiment Results" + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 302, + 470, + 476, + 482 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 470, + 476, + 482 + ], + "spans": [ + { + "bbox": [ + 302, + 470, + 476, + 482 + ], + "type": "text", + "content": "B.1 Statistical Results of COFFTEA" + } + ] + } + ], + "index": 23 + }, + { + "bbox": [ + 302, + 488, + 525, + 569 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 488, + 525, + 569 + ], + "spans": [ + { + "bbox": [ + 302, + 488, + 525, + 569 + ], + "type": "text", + "content": "To verify that our experimental results were not accidental, we train COFFTEA with five different random seeds for each dataset. Compare with the strongest model (Su et al., 2021), we can get better performance consistently. Table 10 shows the average performances with its deviation." + } + ] + } + ], + "index": 24 + }, + { + "type": "table", + "bbox": [ + 309, + 579, + 520, + 660 + ], + "blocks": [ + { + "bbox": [ + 302, + 391, + 525, + 426 + ], + "lines": [ + { + "bbox": [ + 302, + 391, + 525, + 426 + ], + "spans": [ + { + "bbox": [ + 302, + 391, + 525, + 426 + ], + "type": "text", + "content": "Table 9: A part of pairs of Inheritance relation, see more at https://framenet.icsi.berkeley.edu/fndrupal/." + } + ] + } + ], + "index": 21, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 309, + 579, + 520, + 660 + ], + "lines": [ + { + "bbox": [ + 309, + 579, + 520, + 660 + ], + "spans": [ + { + "bbox": [ + 309, + 579, + 520, + 660 + ], + "type": "table", + "html": "
DatasetModelsAvg. ± Dev.
w/ Ifw/o If
FN1.5KGFI92.4084.41
COFFTEA92.51 ± 0.1487.26 ± 0.10
FN1.7KGFI92.1385.63
COFFTEA92.50 ± 0.0587.29 ± 0.41
", + "image_path": "a200af37c14dc2e7e050560e9de3703624368ee2d93ffea11d6afcd0336e0c69.jpg" + } + ] + } + ], + "index": 25, + "angle": 0, + "type": "table_body" + } + ], + "index": 25 + }, + { + "bbox": [ + 302, + 667, + 525, + 704 + ], + "lines": [ + { + "bbox": [ + 302, + 667, + 525, + 704 + ], + "spans": [ + { + "bbox": [ + 302, + 667, + 525, + 704 + ], + "type": "text", + "content": "Table 10: Statistical results of multiple runs on FN1.7. We train our models in with five different random seeds and report the average performance with deviation." + } + ] + } + ], + "index": 26, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 728, + 485, + 740 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 728, + 485, + 740 + ], + "spans": [ + { + "bbox": [ + 302, + 728, + 485, + 740 + ], + "type": "text", + "content": "B.2 Comparison with More Methods" + } + ] + } + ], + "index": 27 + }, + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "type": "text", + "content": "As most previous work only focus on performance in the " + }, + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "type": "inline_equation", + "content": "w /lf" + }, + { + "bbox": [ + 302, + 746, + 524, + 772 + ], + "type": "text", + "content": " setting, we conduct a comprehensive" + } + ] + } + ], + "index": 28 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "13465" + } + ] + } + ], + "index": 29 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 10 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 71, + 291, + 164 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 71, + 291, + 164 + ], + "spans": [ + { + "bbox": [ + 69, + 71, + 291, + 164 + ], + "type": "text", + "content": "comparison on both All frames and Amb frames, where Amb is a subset of All whose target is polysemous or can evkoe multiple frames. And we find that Tamburini (2022) just use a smaller test set on both FN1.5 and FN1.7. So our COFFTEA achieves competitive performance compared to the strongest models." + } + ] + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 76, + 173, + 282, + 318 + ], + "blocks": [ + { + "bbox": [ + 76, + 173, + 282, + 318 + ], + "lines": [ + { + "bbox": [ + 76, + 173, + 282, + 318 + ], + "spans": [ + { + "bbox": [ + 76, + 173, + 282, + 318 + ], + "type": "table", + "html": "
ModelsFN 1.5FN 1.7
AllAmbAllAmb
Hartmann et al. †87.6373.8083.0071.70
Peng et al.90.0078.0089.1077.50
Chen et al.90.5079.10--
FIDO†91.3081.0092.1083.80
KGFI†92.1382.3492.4084.41
AGED91.6381.57--
KID91.7081.7291.7083.03
Tamburini92.5783.5892.3384.22
Chanin--89.0077.50
COFFTEA92.5583.6192.6484.95
", + "image_path": "d91de62cbeb9778e39689b057d51f168abe4c6ae19ef1b6cf52496ca447a43a3.jpg" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_body" + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 327, + 291, + 386 + ], + "lines": [ + { + "bbox": [ + 69, + 327, + 291, + 386 + ], + "spans": [ + { + "bbox": [ + 69, + 327, + 291, + 386 + ], + "type": "text", + "content": "Table 11: Frame identification accuracy with lexicon filtering on FrameNet test dataset, 'All' and 'Amb' denote testing on test data and ambiguous data respectively. " + }, + { + "bbox": [ + 69, + 327, + 291, + 386 + ], + "type": "inline_equation", + "content": "\\dagger" + }, + { + "bbox": [ + 69, + 327, + 291, + 386 + ], + "type": "text", + "content": " means the model does not trained with exemplar sentences." + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 285, + 781, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 285, + 781, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 285, + 781, + 312, + 791 + ], + "type": "text", + "content": "13466" + } + ] + } + ], + "index": 3 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 11 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file diff --git a/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_content_list.json b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b3ab1ad4fdd80cfe999ac8d5f0930ec043c4ffe5 --- /dev/null +++ b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_content_list.json @@ -0,0 +1,2197 @@ +[ + { + "type": "text", + "text": "Code-Switching with Word Senses for Pretraining in Neural Machine Translation", + "text_level": 1, + "bbox": [ + 139, + 87, + 855, + 124 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Vivek Iyer1 Edoardo Barba2 Alexandra Birch1 Jeff Z. Pan1 Roberto Navigli2", + "bbox": [ + 134, + 141, + 870, + 158 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "$^{1}$ School of Informatics, University of Edinburgh", + "bbox": [ + 305, + 159, + 695, + 175 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Sapienza NLP Group, Sapienza University of Rome", + "bbox": [ + 285, + 175, + 715, + 192 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "{vivek. iyer, pinzhen.chen, a.birch}@ed.ac.uk", + "bbox": [ + 278, + 193, + 722, + 209 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "{barba, navigli}@diag.uniroma1.it", + "bbox": [ + 332, + 210, + 667, + 225 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 339, + 266 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Lexical ambiguity is a significant and pervasive challenge in Neural Machine Translation (NMT), with many state-of-the-art (SOTA) NMT systems struggling to handle polysemous words (Campolungo et al., 2022a). The same holds for the NMT pretraining paradigm of de-noising synthetic \"code-switched\" text (Pan et al., 2021; Iyer et al., 2023), where word senses are ignored in the noising stage – leading to harmful sense biases in the pretraining data that are subsequently inherited by the resulting models. In this work, we introduce Word Sense Pretraining for Neural Machine Translation (WSP-NMT) - an end-to-end approach for pretraining multilingual NMT models leveraging word sense-specific information from Knowledge Bases. Our experiments show significant improvements in overall translation quality. Then, we show the robustness of our approach to scale to various challenging data and resource-scarce scenarios and, finally, report fine-grained accuracy improvements on the DiBiMT disambiguation benchmark. Our studies yield interesting and novel insights into the merits and challenges of integrating word sense information and structured knowledge in multilingual pretraining for NMT.", + "bbox": [ + 144, + 275, + 460, + 659 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 114, + 668, + 258, + 684 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Lexical ambiguity is a long-standing challenge in Machine Translation (Weaver, 1952) due to polysemy being one of the most commonly occurring phenomena in natural language. Indeed, thanks to a plethora of context-dependent ambiguities (e.g. the word run could mean run a marathon, run a mill, run for elections etc.), words can convey very distant meanings, which may be translated with entirely different words in the target language. To deal with this challenge, traditional Statistical Machine Translation approaches tried to incorporate Word Sense Disambiguation (WSD) systems in MT with mostly positive results (Carpuat and Wu, 2007; Xiong and Zhang, 2014). These were followed by", + "bbox": [ + 112, + 693, + 489, + 919 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "similar efforts to plug sense information in NMT frameworks (Liu et al., 2018; Pu et al., 2018). But, since the introduction of the Transformer (Vaswani et al., 2017), the task of disambiguation has largely been left to the attention mechanism (Tang et al., 2018, 2019).", + "bbox": [ + 507, + 252, + 884, + 348 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "In the last three years, though, many works have challenged the ability of modern-day NMT systems to accurately translate highly polysemous and/or rare word senses (Emelin et al., 2020; Raganato et al., 2020; Campolungo et al., 2022a). For example, Campolungo et al. (2022a) expose major word sense biases in not just bilingual NMT models like OPUS (Tiedemann and Thottingal, 2020), but also commercial systems like DeepL1 and Google Translate2, and massively pretrained multilingual models (Tang et al., 2021; Fan et al., 2021). A likely explanation is that these models capture inherent data biases during pretraining. This particularly holds for the pretraining paradigm of denoising code-switched text3 — most notably, Aligned Augmentation (AA, Pan et al., 2021), where, during the pretraining phase, input sentences are noised by substituting words with their translations from multilingual lexicons, and NMT models are then tasked to reconstruct (or 'de-noise') these sentences. AA and subsequent works (Reid and Artetxe, 2022; Iyer et al., 2023; Jones et al., 2023) show the benefits of code-switched pretraining for high- and low-resource, supervised and unsupervised translation tasks. Despite their success, a major limitation of these substitution mechanisms is that they are unable to handle lexical ambiguity adequately, given their usage of 'sense-agnostic' translation lexicons. In fact, in most of these works, substitutions for polysemes are chosen randomly, regardless of context (Pan et al., 2021;", + "bbox": [ + 507, + 351, + 884, + 850 + ], + "page_idx": 0 + }, + { + "type": "page_footnote", + "text": "4https://github.com/facebookresearch/MUSE", + "bbox": [ + 507, + 903, + 823, + 917 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "12891", + "bbox": [ + 477, + 927, + 522, + 940 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/054a1c0910d33aa6a81e0b61a55d2d8ae0c41547344857c1359db0f99024d3cb.jpg", + "image_caption": [ + "Figure 2: Pipelines contrasting the approach used by the AA and WSP-NMT pretraining algorithms." + ], + "image_footnote": [], + "bbox": [ + 119, + 82, + 880, + 237 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "the impact of 'sense-pivoted' pretraining by comparing against similarly trained WSP-NMT models. We also note that while some extensions to AA have been proposed recently, by combining it with masking or other code-switching strategies (see Section 2), these improvements likely also hold for code-switching with sense translations – making these techniques complementary to our work.", + "bbox": [ + 112, + 278, + 489, + 407 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.3 Word Sense Pretraining for NMT", + "text_level": 1, + "bbox": [ + 112, + 417, + 423, + 432 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "We depict the WSP-NMT pipeline, and compare it with AA, in Figure 2. It involves three stages:", + "bbox": [ + 112, + 438, + 487, + 470 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.3.1 Word Sense Disambiguation (WSD)", + "text_level": 1, + "bbox": [ + 112, + 479, + 455, + 495 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "To determine the most appropriate translation for a word $w_{i}$ in a sentence, we begin by identifying its intended meaning in context using WSD systems. To measure the impact of disambiguation quality on the final translation performance, we adopt two WSD systems, namely, EsCHER, a SOTA open-inventory WSD model, and AMuSE-WSD (Orlando et al., 2021), a faster but still competitive, off-the-shelf classification system. We note that, since EsCHER was originally only released for English, we also trained models for other languages on the multilingual datasets in XL-WSD (Pasini et al., 2021). We provide further training details in Appendix A.2. As a result of this stage, each content word in the input sentence is linked to a specific synset5 in BabelNet.", + "bbox": [ + 112, + 498, + 489, + 755 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.3.2 Extracting Translations from BabelNet", + "text_level": 1, + "bbox": [ + 112, + 764, + 480, + 778 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Given the synset associated with a disambiguated word, we retrieve its possible translations in the languages of experimentation by using BabelNet. Indeed, in BabelNet, each synset in each language comes with a set of lexicalizations that can express the concept represented by that synset. At the moment of writing, BabelNet contains concept lexical-", + "bbox": [ + 112, + 783, + 489, + 896 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "izations for 520 languages with varying degrees of coverage. Thus, at the end of this stage, all content words will have a list of possible translations in the target languages.", + "bbox": [ + 507, + 278, + 884, + 342 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.3.3 Generation of Morphological Inflections", + "text_level": 1, + "bbox": [ + 507, + 351, + 882, + 367 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Finally, given that concept lexicalizations in Babel-Net are present as lemmas, we include an additional postprocessing stage to convert target lemmas $l_{i}$ of sense $s$ into their contextually appropriate morphological variant $m_{i}$ . We do this by leveraging MUSE lexicons $M$ . We first preprocess entries in $M$ using a lemmatizer $L$ like so: given word translation pairs $(x_{j}, y_{j})$ in $M$ , we create a hashmap $H$ where $H(x_{j}, L(y_{j})) = y_{j}$ . Given $H$ , during code-switching, if the source word $w_{i}$ is not a lemma we do a lookup for the key $H(w_{i}, l_{i})$ and return the corresponding value as the contextually appropriate morphological inflection $m_{i}$ for sense $s$ - which is then used for code-switching. If the key is unavailable in $H$ , we code-switch $w_{i}$ with $l_{i}$ itself.", + "bbox": [ + 505, + 370, + 884, + 611 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "This step allows us to generate translations that take into account both word senses and morphology – thus combining the best of both worlds between 'sense-agnostic' lexicons and canonicalized6 Knowledge Graphs storing sense information. While this postprocessing does improve performance, it is optional and we show in Section 4.2 that baselines without this stage also yield decent improvements, while minimizing the overhead. We use Trankit (Nguyen et al., 2021) for lemmatization, which was shown to achieve SOTA results on this task on treebanks from 90 languages7.", + "bbox": [ + 507, + 613, + 882, + 806 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.4 Training", + "text_level": 1, + "bbox": [ + 507, + 816, + 626, + 832 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "For fair comparison, we follow the experimental setup proposed by Pan et al. (2021) for training our", + "bbox": [ + 507, + 839, + 880, + 871 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "$^{6}$ i.e. KGs representing concepts as canonicalized lemmas.", + "bbox": [ + 507, + 879, + 862, + 892 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "7https://trankit.readthedocs.io/en/latest/ performance.htm1", + "bbox": [ + 510, + 892, + 828, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "${}^{5}$ A synset is a group of semantically equivalent word senses.", + "bbox": [ + 112, + 903, + 482, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_number", + "text": "12892", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 3 + }, + { + "type": "table", + "img_path": "images/4ea1c5665b159a85ddac6e679cd676ed817af2df2df86ee5ff4cdbb2e409f6bc.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
MonolingualParallel
En7.5MFr7.5MIt7.5MEn-Es1.8MEn-It1.7M
Es7.5MPt7.5MRo7.5MEn-Fr1.8MEn-Ro365K
(a) Size of Romance language corpora (sentence count)
MonolingualParallel
En20MHi6MFa6MEn-Hi1.9MEn-Fa1M
", + "bbox": [ + 119, + 80, + 499, + 173 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Table 1: Monolingual and Parallel Data statistics.", + "bbox": [ + 119, + 197, + 480, + 212 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "AA and WSP-NMT models. We code-switch parallel and monolingual sentences (with translations generated using the respective approaches) and shuffle them to create our training dataset $D$ . We input the code-switched sentences to the encoder, while the target sentences are the reference sentences for parallel data and the original 'denoised' sentences for monolingual data. We pretend a special language token indicating language ID to each input and target sentence. Finally, we train the model using a loss function $\\mathcal{L}$ that jointly optimizes Contrastive Loss $\\mathcal{L}_{\\mathrm{CON}}$ and Cross Entropy Loss $\\mathcal{L}_{CE}$ . In principle, Contrastive Loss minimizes the semantic representation gap between positive examples (code-switched and reference sentences) and maximizes the distance between negative examples (approximated to other random samples in the minibatch). With this in mind, we define $\\mathcal{L}$ as:", + "bbox": [ + 112, + 244, + 489, + 535 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} = \\mathcal {L} _ {C E} + | s | * \\mathcal {L} _ {C O N}\n$$\n", + "text_format": "latex", + "bbox": [ + 206, + 557, + 391, + 574 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "where: $\\mathcal{L}_{CE} = -\\sum_{(x,y)\\in D}\\log P_{\\theta}(y|x),$ and", + "bbox": [ + 142, + 601, + 458, + 644 + ], + "page_idx": 4 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {L} _ {\\mathrm {C O N}} = - \\sum_ {(x, y) \\in D} \\log \\frac {e ^ {\\operatorname {s i m} ^ {+} (\\mathcal {E} (x) , \\mathcal {E} (y)) / \\tau}}{\\sum_ {(a , b) \\in B} e ^ {\\operatorname {s i m} ^ {-} (\\mathcal {E} (x) , \\mathcal {E} (b)) / \\tau}}\n$$\n", + "text_format": "latex", + "bbox": [ + 115, + 671, + 485, + 715 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Here, $\\mathcal{E}$ signifies the average pooled encoder representations for the input sentence, while 'sim' computes positive and negative semantic similarities between the contrastive examples, denoted by $\\mathrm{sim}^+$ and $\\mathrm{sim}^-$ respectively. Temperature $\\tau$ controls the difficulty of distinguishing between positive and negative samples, and is set to 0.1. $B$ denotes the mini-batch in dataset $D$ that $(x,y)$ belongs to. Lastly, $|s|$ is the average token count of sentence $s$ that balances token-level cross entropy loss and sentence-level contrastive loss.", + "bbox": [ + 112, + 741, + 489, + 917 + ], + "page_idx": 4 + }, + { + "type": "table", + "img_path": "images/126c244732edab919d17979aa056b9fe8762ec6cb1b34426dfbaeb3ffb1fac31.jpg", + "table_caption": [ + "(b) Size of Indo-Iranian language corpora (sentence count)" + ], + "table_footnote": [], + "table_body": "
Language PairEn-EsEn-FrEn-ItEn-Ro
Test SetWMT'13WMT'14WMT'09WMT'16
Language PairEn-PtEn-HiEn-Fa
Test SetFLORES 200WMT'19FLORES 200
", + "bbox": [ + 509, + 80, + 884, + 159 + ], + "page_idx": 4 + }, + { + "type": "table", + "img_path": "images/6810a1bc693011144abfb373be5a217e6e9e6f4de9cccdd27964f724185ae733.jpg", + "table_caption": [ + "Table 2: Test sets used per language in this work." + ], + "table_footnote": [], + "table_body": "
ModelEnItFrEsAvgRunning Time (for 330K sents)
AMuSE-WSD77.1376.0380.3572.7776.5778 mins
ESCHER78.7279.1483.9477.5279.83180 mins
", + "bbox": [ + 510, + 183, + 884, + 246 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Table 3: F1-scores of ESCHER and AMuSE-WSD on XL-WSD (Pasini et al., 2021) for English (En), Italian (It), French (Fr), Spanish (Es), and the Average (Avg) of all scores. All results are statistically significant ( $p < 0.01$ as per McNemar's test (Dietterich, 1998)). For comparing efficiencies, we also report the running time for disambiguating 330K sentences on 1 RTX 3090.", + "bbox": [ + 507, + 255, + 882, + 355 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4 Experiments", + "text_level": 1, + "bbox": [ + 507, + 379, + 655, + 395 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.1 Experimental Setup", + "text_level": 1, + "bbox": [ + 507, + 405, + 714, + 420 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Table 1 shows the statistics for our training data. In this work, we primarily experiment with the Romance languages and pretrain multilingual NMT models on the monolingual and parallel data in Table 1a, following the training setup described previously. We use Portuguese later for our zero-shot experiments, so no parallel data is provided. We also explore NMT for Indo-Iranian languages in Section 4.3.3, and use the data given in Table 1b to train those models. We note here that since our objective in this work is to explore the utility of KGs for sense-pivoted pretraining, our data setups follow a similar scale as other works on KG-enhanced NMT (Zhao et al., 2020a; Xie et al., 2022; Hu et al., 2022), and diverges from the massively multilingual paradigm of Pan et al. (2021).", + "bbox": [ + 505, + 425, + 884, + 682 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "For validation, we sample the last 1000 sentences from the parallel corpus per pair. As shown in Table 2, for testing, we use either the latest WMT test sets per pair, if available, or FLORES 200 sets (Costa-jussà et al., 2022) otherwise. We evaluate NMT results using spBLEU $^{8}$ (Costa-jussà et al., 2022), $\\mathrm{chrF}++^{9}$ (Popović, 2017) and COMET22 (Rei et al., 2022) metrics, and compute statistical significance using Student's T-test (Student, 1908).", + "bbox": [ + 507, + 683, + 882, + 827 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We use the Transformer (Vaswani et al., 2017) architecture with 6 encoder and 6 decoder layers", + "bbox": [ + 507, + 828, + 882, + 860 + ], + "page_idx": 4 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "8nrefs:1|case:mixed|eff:no|tok:flores101|smooth: exp|version:2.3.1", + "$9$ nrefs:1|case:mixed|eff:yes|nc:6|nw:2|space: no|version:2.3.1" + ], + "bbox": [ + 507, + 866, + 873, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_number", + "text": "12893", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 4 + }, + { + "type": "image", + "img_path": "images/2f58cc0eb6a8bff9dc56e2f5ccab1e2d44c515d7336696a6c3531aa8c2caf53d.jpg", + "image_caption": [ + "Figure 4: WSP-NMT with Morphological Inflection. Code-switched words are highlighted. a' ->a->b->b' denotes the inflection generation process explained in Section 3.3.3 where a' and b' are source and target words, while a and b are the corresponding lemmas. a->b is extracted from BabelNet, while the hashmap lookup yields b' given (a', b)." + ], + "image_footnote": [], + "bbox": [ + 127, + 84, + 472, + 244 + ], + "page_idx": 5 + }, + { + "type": "image", + "img_path": "images/1b7a717969038a0323dce20b704896c22b934c5406950e4e206bfed9fcc5adbf.jpg", + "image_caption": [ + "Figure 3: Improvements in the average performance of WSP over AA for each language pair." + ], + "image_footnote": [], + "bbox": [ + 122, + 247, + 468, + 413 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "for training our models. For tokenization, we use sentencepiece (Kudo and Richardson, 2018). We train the sentencepiece model on concatenated and shuffled data from Table 1, using a unigram language model with a vocabulary size of 32,000 and character coverage of 1.0. We use replacement ratios of 0.1 and 0.05 for our Romance and Indo-Iranian models respectively. We provide further hyperparameter settings in Appendix A.1.", + "bbox": [ + 112, + 461, + 489, + 605 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Lastly, in Table 3, we evaluate and report key performance statistics for our two WSD systems, AMuSE-WSD and ESCHER. We shall use these to better interpret our NMT results and comment on the observed quality/speed tradeoff in Section 4.2.", + "bbox": [ + 112, + 606, + 489, + 686 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4.2 Main Results", + "text_level": 1, + "bbox": [ + 112, + 696, + 265, + 711 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We show overall results for the Romance language experiments, averaged across 5 runs, in Table 4. We also report language pair-specific improvements in Figure 3. We make the following key observations:", + "bbox": [ + 112, + 717, + 489, + 783 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "1. WSP-NMT consistently outperforms AA. We observe that our best WSP-NMT model, i.e. the one using EsCHER for disambiguation and MUSE lexicons for generating morphological predictions, consistently beats AA models by significant margins across all metrics – including a +1.2 boost in spBLEU for En-X and +0.7 for X-En. Except for Fr-En where WSP-NMT", + "bbox": [ + 107, + 790, + 489, + 917 + ], + "page_idx": 5 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "1. And when Federer levelled the match, one-time British No 1 Petchey temia (fear->fear->temer->temia) the worst.", + "2. The world was mirando (looking->look->mirar->mirando) at him.", + "3. GM deber (owes->owe->debe->deber) $23.4bn, excluding $3.9bn in realised Treasury perdidas (losses->loss->perdida->perdidas), according to a Treasury statement dated Friday." + ], + "bbox": [ + 519, + 85, + 887, + 177 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "marginally underperforms $^{10}$ , these gains also extend to individual language pairs (Figure 3). This suggests that minimising errors in pretraining data with 'sense-pivoted pretraining' can enhance overall convergence and yield stronger models.", + "bbox": [ + 519, + 313, + 882, + 395 + ], + "page_idx": 5 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "2. Superior disambiguation helps, but cheaper WSD systems work well too. We observe in Figure 3 that EsCHER consistently induces greater gains than AMuSE-WSD across all pairs. This makes sense given the superior disambiguation quality of the former (Table 3). However, we note that AMuSE-WSD, which is about $2.3\\mathrm{x}$ faster, also outperforms AA and can be used as an effective, but cheaper alternative, suitable for disambiguating large corpora under budget constraints.", + "3. Postprocessing KG lemmas to predict the relevant morphological inflection is beneficial. We observe generating morphological inflections by intersecting with MUSE lexicons (Section 3.3.3) yields major boosts across the board. We understand this qualitatively by showing examples of such inflections from our dataset, in Figure 4. We observe that this approach helps in ensuring linguistic agreement (such as for tense and number) which, in turn, enhances the quality of code-switching and, thus, pretraining. Our technique can thus be used as an effective way to bridge the gap between KG lemmas and morphologically inflected words in corpora – a gap which has proved to be one of the major roadblocks in leveraging structured knowledge in NMT so far." + ], + "bbox": [ + 500, + 404, + 884, + 832 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "4. Higher gains are observed for the lower resourced En-Ro pair. WSP-NMT obtains a $+2$", + "bbox": [ + 500, + 841, + 884, + 873 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "This is possibly because the WordNet that BabelNet uses for French is WOLF (Sagot and Fiser, 2008), an automatically constructed silver quality resource", + "bbox": [ + 509, + 879, + 882, + 917 + ], + "page_idx": 5 + }, + { + "type": "page_number", + "text": "12894", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/61ec466240e6d69ff387547f4287a6c70c4c5c46a15dc998cd7ea09f736b8bdc.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
BaselineEn-XX-En
spBLEUchrF++COMET22spBLEUchrF++COMET22
AA24.385 ± 0.63947.890 ± 0.6470.714 ± 0.00924.725 ± 0.57749.660 ± 0.4530.716 ± 0.006
WSP-NMT (AMuSE-WSD)24.910 ± 0.33648.525 ± 0.3040.723 ± 0.00624.935 ± 0.31349.880 ± 0.2430.724 ± 0.005
WSP-NMT (ESCHER)25.310 ± 0.90948.765 ± 0.7170.728 ± 0.01325.095 ± 0.90349.905 ± 0.7050.725 ± 0.010
WSP-NMT (ESCHER) + morph. inflection25.595 ± 0.27949.115 ± 0.2350.731 ± 0.00325.435 ± 0.17950.130 ± 0.2290.729 ± 0.002
", + "bbox": [ + 114, + 80, + 884, + 189 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "spBLEU improvement over AA for the En-Ro pair – which is the lowest resourced in our setup, with 365K parallel sentences (Table 1). This suggests our approach could be even more useful for medium and low data setups – something we empirically verify in Section 4.3.1.", + "bbox": [ + 126, + 258, + 487, + 355 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "5. More significant boosts are obtained for COMET22 than string-based spBLEU or $\\mathrm{chrF}++$ metrics. While our best model improves across all the metrics, we observe this in Table 4 for our weaker models. This is probably because the errors made by incorrect word sense translations can sometimes be too subtle to be adequately penalized by weaker string-based metrics. On the other hand, neural metrics like COMET22 are more robust and have been trained to detect word-level as well as sentence-level errors. It has shown high correlations with human evaluation, ranking second in the WMT'22 Metrics shared task (Freitag et al., 2022). We, thus, conclude that statistically significant gains in COMET scores, when averaged across 5 seeds, help in increasing the strength and reliability of our results.", + "bbox": [ + 105, + 368, + 489, + 640 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.3 How well does WSP-NMT extend to more challenging MT scenarios?", + "text_level": 1, + "bbox": [ + 112, + 657, + 485, + 688 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Here, we try to evaluate the robustness of our approach to scale to various challenging translation scenarios: a) data scarcity, b) zero-shot translation and c) translation of under-represented languages.", + "bbox": [ + 112, + 695, + 487, + 759 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.3.1 Scaling to data-scarce settings", + "text_level": 1, + "bbox": [ + 112, + 770, + 410, + 785 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "In Figure 5, we explore how performance varies with the scale of parallel data, while keeping monolingual data constant - since the latter is usually more abundant. We observe an improvement margin of $+3$ to $+4$ spBLEU in the low-resource setting (50-100K sentences) that widens to $+5$ spBLEU in the medium-resource setup (250-500K sentences). The gap then narrows as we move towards high", + "bbox": [ + 112, + 790, + 489, + 917 + ], + "page_idx": 6 + }, + { + "type": "image", + "img_path": "images/8158e53c47bc5e5cbc3b9bc896b67a1bad6b3984dbf22a58d3bf2e32e79931d5.jpg", + "image_caption": [ + "Figure 5: Average En-X and X-En spBLEU scores for AA and WSP-NMT models, with variation in parallel data (in terms of maximum sentence count per language)" + ], + "image_footnote": [], + "bbox": [ + 515, + 260, + 873, + 431 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/e51c8018afcbcc70ee9a3ad010153c7368e5d64bec88a3f62dbb2947c4a6c995.jpg", + "table_caption": [ + "Table 4: Overall results of the Romance language experiments with respect to spBLEU, $\\mathrm{chrF}++$ and COMET22 metrics. Mean and standard deviation after 5 runs, initialised with different random seeds (0-4) has been reported. Statistically significant improvements $(p\\leq 0.05)$ over our primary baseline, AA, are highlighted in bold." + ], + "table_footnote": [], + "table_body": "
BaselineEn-PtPt-En
AA2.92 ± 0.646.88 ± 1.56
WSP-NMT (best)3.60 ± 0.198.52 ± 0.53
", + "bbox": [ + 549, + 497, + 843, + 555 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Table 5: Zero-Shot Translation scores (spBLEU) for the English-Portuguese (En-Pt) pair. We use the best WSP-NMT model from Table 4 and compare with AA. Statistical significance $(p = 0.04)$ is highlighted in bold.", + "bbox": [ + 507, + 564, + 882, + 621 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "resource scenarios (750K-1.5M sentences), suggesting AA models become more robust to noise when high quantities of parallel data are provided. Based on these findings, we discuss potential applications of our method in Section 4.5.", + "bbox": [ + 507, + 643, + 882, + 722 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.3.2 Scaling to Zero-Shot Translation", + "text_level": 1, + "bbox": [ + 507, + 736, + 825, + 752 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Continuing our exploration into data scarcity, we now evaluate the performance of WSP-NMT with no parallel data (i.e. zero-shot) in Table 5. We use En-Pt as a simulated zero-shot pair, following the setup in Table 1a. We compare our best WSP-NMT model from Table 4 with AA, averaged across 5 runs as before. We observe statistically significant gains of about $+0.7$ and $+1.64$ spBLEU for En-Pt and Pt-En pairs respectively. We conclude that WSP-NMT is strong in a wide range of scenarios", + "bbox": [ + 507, + 758, + 882, + 917 + ], + "page_idx": 6 + }, + { + "type": "page_number", + "text": "12895", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/07d741915b98095eabb74ee5e48bf4c2f85487fa5bc1b41a9633e89d325114ea.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
En-XX-En
AA22.79 ± 1.06320.49 ± 0.893
WSP-MT (AMuSE-WSD)22 ± 0.70419.58 ± 0.559
WSP-MT (AMuSE-WSD) + morph. inflection21.83 ± 0.72719.53 ± 0.72
WSP-MT (AMuSE-WSD) + synonyms + hypernyms22.71 ± 0.9320.23 ± 0.906
", + "bbox": [ + 122, + 80, + 480, + 186 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Table 6: spBLEU scores for Indo-Iranian languages (Hindi and Farsi) to English, averaged across 5 seeds", + "bbox": [ + 112, + 195, + 485, + 224 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "and can improve performance at varying degrees of resourcedness, including in zero-shot tasks.", + "bbox": [ + 112, + 255, + 485, + 286 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "4.3.3 Scaling to under-represented languages", + "text_level": 1, + "bbox": [ + 112, + 306, + 482, + 322 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Lastly, we explore how WSP-NMT performs for languages under-represented in external resources such as WSD systems, lexicons, and KGs. The issues faced here include low coverage, poor quality, and unreliable WSD. To study the impact of these factors (in isolation from data scarcity), we train a multilingual NMT model between English and 2 Indo-Iranian languages (Hindi and Farsi) using the data in Table 1b. We choose these languages since they are under-represented in BabelNet $^{11}$ , are supported by AMuSE-WSD $^{12}$ and have MUSE lexicons available for training AA baselines.", + "bbox": [ + 112, + 330, + 489, + 523 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "In Table 6, we find that integrating morphological inflection does not yield gains, likely because - due to poor coverage - we find matches in MUSE lexicons far fewer times (only $18.3\\%$ compared to $74\\%$ for the Romance data). BabelNet also suffers from poor coverage ( $45\\%$ of disambiguated senses do not have translations in either Hindi or Farsi). To address this, we explore if translations of synonyms and hypernyms of a KG concept could be used as substitutes. In practice, we find that, while this does improve the vanilla WSP-NMT model, it is unable to beat AA. This is likely rooted in the fact that low-resource disambiguation is an unaddressed challenge in NLP, primarily because of a lack of resources - be it training datasets, reliable WSD models, or even evaluation benchmarks. Despite these hurdles, we note that, since WSP-NMT is effective in data-scarce settings, creating a small amount of sense-annotated data in these languages might suffice to yield potential gains.", + "bbox": [ + 112, + 526, + 489, + 850 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "4.4 DiBiMT benchmark results", + "text_level": 1, + "bbox": [ + 507, + 84, + 771, + 98 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Finally, we test our models on the DiBiMT disambiguation benchmark (Campolungo et al., 2022a) in Figure 6. The DiBiMT test set comprises sentences with an ambiguous word, paired with \"good\" and \"bad\" translations of this word. Then, given an NMT model's hypotheses, it computes accuracy, i.e. the ratio of sentences with \"good\" translations compared to the sum of \"good\" and \"bad\" ones. Hypotheses that fall in neither of these categories are discarded as 'MISS' sentences. We compare AA and our best WSP-NMT model on Italian and Spanish, the two Romance languages supported by DiBiMT, and report overall accuracies. In addition, we also include fine-grained scores on disambiguation of specific POS tags like nouns and verbs to better understand the capabilities of our models.", + "bbox": [ + 505, + 107, + 884, + 363 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "We observe a small increase in overall accuracy. Looking more closely, we find that while WSP-NMT's accuracy for nouns is comparable to AA, significant improvements are observed for verb disambiguation - especially for Italian, where average accuracy increases from $15.34\\%$ to $17.65\\%$ (15% increase). Prior research has shown that verbs are much harder to disambiguate than nouns since they are highly polysemous (Barba et al., 2021a,b; Campolungo et al., 2022a) and require much larger contexts to disambiguate (Wang et al., 2021). Thus, while sense-agnostic AA models are able to disambiguate nouns, verb disambiguation proves more challenging, which is where sense-pivoted pretraining with WSP-NMT helps. We provide example translations in Appendix A.3 to drive intuition of this further. Finally, we note that WSP-NMT also reduces the average $\\mathrm{MISS\\%}$ - from $39.3\\%$ to $37.2\\%$ for Spanish, and $41.2\\%$ to $40.2\\%$ for Italian. These trends are encouraging, since errors such as word omission, word copying and hallucination are the most common issues and constitute about $50\\%$ of all 'MISS' cases (Campolungo et al., 2022a).", + "bbox": [ + 507, + 367, + 884, + 736 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "4.5 Applications", + "text_level": 1, + "bbox": [ + 507, + 751, + 655, + 766 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "We conclude our results section by noting that while WSP-NMT is not ideally suited for either very low-resource (Section 4.3.3) or very resource-rich (Section 4.3.1) settings, it does yield significant performance gains for low and medium-data settings of well-resourced (e.g. European) languages, as shown in Figure 5. We hypothesize that this can, thus, be quite useful for domain-specific translation in these languages, such as in news,", + "bbox": [ + 505, + 774, + 884, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_footnote", + "text": "$^{11}$ https://babelnet.org/statistics \n $^{12}$ https://nlp.uniroma1.it/amuse-wsd/ api-documentation. We are unable to use EsCHER here due to lack of relevant training data in XL-WSD.", + "bbox": [ + 112, + 866, + 487, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_number", + "text": "12896", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 7 + }, + { + "type": "image", + "img_path": "images/22fa89c9c999cc492a08b3d10c323a4d8fecbe00187a6c3a739925e92a46c2d3.jpg", + "image_caption": [ + "Figure 6: Accuracy of our AA and WSP-NMT models, in Spanish and Italian, on the DiBiMT benchmark." + ], + "image_footnote": [], + "bbox": [ + 139, + 82, + 463, + 231 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "healthcare, e-commerce, etc. In such information-centric domains, minimising disambiguation errors and improving translation quality with reliable, general-purpose KGs would likely bring value.", + "bbox": [ + 112, + 288, + 489, + 353 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "5 Conclusion", + "text_level": 1, + "bbox": [ + 112, + 367, + 247, + 382 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We propose WSP-NMT, a 'sense-pivoted' algorithm leveraging word sense information from KBs for pretraining multilingual NMT models. We observe significant performance gains over the baseline, AA, and note various factors of interest including the impact of WSD quality and morphology. We then study how WSP-NMT scales to various data and resource-constrained scenarios and, finally, note significant accuracy gains in verb disambiguation on the DiBiMT benchmark. Our results help emphasize the utility and strength of WSP-NMT.", + "bbox": [ + 112, + 394, + 489, + 586 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Limitations", + "text_level": 1, + "bbox": [ + 114, + 602, + 218, + 617 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "While our approach attempts to minimize the risk of low-quality translations creeping into the pretraining data by using human-curated structured knowledge, it is possible certain biased translations enter our data nonetheless. For instance, during code-switching, there is a possibility of gender bias in the sense translations chosen, as certain gendered translations of a concept that is ungendered in the source language are provided in the same word sense in BabelNet. Though we use random sampling to mitigate such risks, the propagation of potential biases depends heavily on the fairness and diversity of translations available in BabelNet. While such issues are similar to those that would arise in the current paradigm of dictionary-based code-switching, a principled approach to resolve gender based on sentence-level context and to choose the appropriate translation from the BabelNet synset", + "bbox": [ + 112, + 629, + 489, + 917 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "would be a useful direction of future research. The BabelNet KG also has the potential for improving in this regard, allowing for the addition of gender categories to specific concepts.", + "bbox": [ + 507, + 84, + 882, + 148 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We also note that WSP-NMT may not be as effective in the translation of under-represented languages. As we note in Section 4.3.3, this is partly rooted in the unavailability of disambiguation resources and high-quality Knowledge Bases for such languages. However this is quickly changing: i) WSD for low-resource languages has been a very emerging area of research recently (Saeed et al., 2021; Bhatia et al., 2022; Boruah, 2022), and, at the same time, ii) BabelNet itself is constantly being updated and scaled up. For example, due to the creation of newer low-resource wordnets, BabelNet expanded from 500 supported languages (v5.1 from Jul 2022) to 520 (v5.2 from Nov 2022) in just 4 months. As the quality of these curated resources improves with community contributions and advances in low-resource NLP/WSD, we anticipate that methods such as WSP-NMT, which we show to be robust in low-data settings (<1M parallel sents), could be increasingly useful.", + "bbox": [ + 507, + 149, + 884, + 472 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Acknowledgements", + "text_level": 1, + "bbox": [ + 509, + 487, + 680, + 504 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "This work was funded by UK Research and Innovation (UKRI) under the UK government's Horizon Europe funding guarantee [grant number 10039436]. The authors also gratefully acknowledge the support of the PNRR MUR project PE0000013-FAIR.", + "bbox": [ + 507, + 512, + 882, + 606 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "The computations described in this research were performed using the Baskerville Tier 2 HPC service (https://www.baskerville.ac.uk/). Baskerville was funded by the EPSRC and UKRI through the World Class Labs scheme (EP/T022221/1) and the Digital Research Infrastructure programme (EP/W032244/1) and is operated by Advanced Research Computing at the University of Birmingham.", + "bbox": [ + 507, + 608, + 882, + 752 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "References", + "text_level": 1, + "bbox": [ + 510, + 785, + 608, + 801 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Benyamin Ahmadnia, Bonnie J Dorr, and Parisa Kordjamshidi. 2020. Knowledge graphs effectiveness in neural machine translation improvement. Computer Science, 21.", + "Farhad Akhbardeh, Arkady Arkhangorodsky, Magdalena Biesialska, Ondrej Bojar, Rajen Chatterjee, Vishrav Chaudhary, Marta R. Costa-jussa," + ], + "bbox": [ + 509, + 810, + 884, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_number", + "text": "12897", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 8 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Cristina Espana-Bonet, Angela Fan, Christian Federmann, Markus Freitag, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Leonie Harter, Kenneth Heafield, Christopher Homan, Matthias Huck, Kwabena Amponsah-Kaakyire, Jungo Kasai, Daniel Khashabi, Kevin Knight, Tom Kocmi, Philipp Koehn, Nicholas Lourie, Christof Monz, Makoto Morishita, Masaaki Nagata, Ajay Nagesh, Toshiaki Nakazawa, Matteo Negri, Santanu Pal, Allahsera Auguste Tapo, Marco Turchi, Valentin Vydrin, and Marcos Zampieri. 2021. Findings of the 2021 conference on machine translation (WMT21). In Proceedings of the Sixth Conference on Machine Translation, pages 1-88, Online. Association for Computational Linguistics.", + "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.", + "Edoardo Barba, Tommaso Pasini, and Roberto Navigli. 2021a. ESC: Redesigning WSD with extractive sense comprehension. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4661-4672, Online. Association for Computational Linguistics.", + "Edoardo Barba, Luigi Procopio, and Roberto Navigli. 2021b. ConSeC: Word sense disambiguation as continuous sense comprehension. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 1492-1503, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.", + "Surbhi Bhatia, Ankit Kumar, and Mohammed Mutilah Khan. 2022. Role of genetic algorithm in optimization of Hindi word sense disambiguation. IEEE Access, 10:75693-75707.", + "Puberun Boruah. 2022. A novel approach to word sense disambiguation for a low-resource morphologically rich language. In 2022 IEEE 6th Conference on Information and Communication Technology (CICT), pages 1-6. IEEE.", + "Niccolò Campolungo, Federico Martelli, Francesco Saina, and Roberto Navigli. 2022a. DiBiMT: A novel benchmark for measuring Word Sense Disambiguation biases in Machine Translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4331-4352, Dublin, Ireland. Association for Computational Linguistics.", + "Niccolò Campolungo, Tommaso Pasini, Denis Emelin, and Roberto Navigli. 2022b. Reducing disambiguation biases in NMT by leveraging explicit word sense information. In Proceedings of the 2022 Conference of the North American Chapter of the Association for" + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 9 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Computational Linguistics: Human Language Technologies, pages 4824-4838, Seattle, United States. Association for Computational Linguistics.", + "Marine Carpuat and Dekai Wu. 2007. Improving statistical machine translation using word sense disambiguation. In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), pages 61-72, Prague, Czech Republic. Association for Computational Linguistics.", + "Yee Seng Chan, Hwee Tou Ng, and David Chiang. 2007. Word sense disambiguation improves statistical machine translation. In Proceedings of the 45th annual meeting of the association of computational linguistics, pages 33-40.", + "Heeyoul Choi, Kyunghyun Cho, and Yoshua Bengio. 2017. Context-dependent word representation for neural machine translation. Computer Speech Language, 45:149-160.", + "Marta R Costa-jussa, James Cross, Onur Celebi, Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, et al. 2022. No language left behind: Scaling human-centered machine translation. arXiv preprint arXiv:2207.04672.", + "Thomas G Dietterich. 1998. Approximate statistical tests for comparing supervised classification learning algorithms. *Neural computation*, 10(7):1895-1923.", + "Denis Emelin, Ivan Titov, and Rico Sennrich. 2020. Detecting word sense disambiguation biases in machine translation for model-agnostic adversarial attacks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7635–7653, Online. Association for Computational Linguistics.", + "Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, et al. 2021. Beyond english-centric multilingual machine translation. The Journal of Machine Learning Research, 22(1):4839-4886.", + "Markus Freitag, Ricardo Rei, Nitika Mathur, Chi-kiu Lo, Craig Stewart, Eleftherios Avramidis, Tom Kocmi, George Foster, Alon Lavie, and André F. T. Martins. 2022. Results of WMT22 metrics shared task: Stop using BLEU – neural metrics are better and more robust. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 46–68, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics.", + "Pengcheng He, Jianfeng Gao, and Weizhu Chen. 2023. Debertav3: Improving deberta using electra-style pretraining with gradient-disentangled embedding sharing." + ], + "bbox": [ + 510, + 85, + 884, + 917 + ], + "page_idx": 9 + }, + { + "type": "page_number", + "text": "12898", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 9 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Junjie Hu, Hiroaki Hayashi, Kyunghyun Cho, and Graham Neubig. 2022. DEEP: DEnoising entity pretraining for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1753-1766, Dublin, Ireland. Association for Computational Linguistics.", + "Vivek Iyer, Arturo Oncevay, and Alexandra Birch. 2023. Exploring enhanced code-switched noising for pretraining in neural machine translation. In *Findings of the Association for Computational Linguistics: EACL* 2023, pages 954-968.", + "Alex Jones, Isaac Caswell, Ishank Saxena, and Orhan First. 2023. Bilex rx: Lexical data augmentation for massively multilingual machine translation. arXiv preprint arXiv:2303.15265.", + "Tom Kocmi, Rachel Bawden, Ondrej Bojar, Anton Dvorkovich, Christian Federmann, Mark Fishel, Thamme Gowda, Yvette Graham, Roman Grundkiewicz, Barry Haddow, et al. 2022. Findings of the 2022 conference on machine translation (wmt22). In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 1-45.", + "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, Brussels, Belgium. Association for Computational Linguistics.", + "Pengfei Li, Liangyou Li, Meng Zhang, Minghao Wu, and Qun Liu. 2022. Universal conditional masked language pre-training for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6379-6391, Dublin, Ireland. Association for Computational Linguistics.", + "Zehui Lin, Xiao Pan, Mingxuan Wang, Xipeng Qiu, Jiangtao Feng, Hao Zhou, and Lei Li. 2020. Pretraining multilingual neural machine translation by leveraging alignment information. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2649-2663, Online. Association for Computational Linguistics.", + "Frederick Liu, Han Lu, and Graham Neubig. 2018. Handling homographs in neural machine translation. 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 1336-1345, New Orleans, Louisiana. Association for Computational Linguistics.", + "Yu Lu, Jiajun Zhang, and Chengqing Zong. 2019. Exploiting knowledge graph in neural machine translation. In Machine Translation: 14th China Workshop, CWMT 2018, Wuyishan, China, October 25-26, 2018, Proceedings 14, pages 27-38. Springer." + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Diego Moussallem, Axel-Cyrille Ngonga Ngomo, Paul Buitelaar, and Mihael Arcan. 2019. Utilizing knowledge graphs for neural machine translation augmentation. In Proceedings of the 10th International Conference on Knowledge Capture, K-CAP '19, page 139-146, New York, NY, USA. Association for Computing Machinery.", + "Roberto Navigli, Michele Bevilacqua, Simone Conia, Dario Montagnini, and Francesco Ceconi. 2021. Ten years of BabelNet: A survey. In *IJCAI*, pages 4559-4567.", + "Minh Van Nguyen, Viet Duc Lai, Amir Pouran Ben Veyseh, and Thien Huu Nguyen. 2021. Trankit: A lightweight transformer-based toolkit for multilingual natural language processing. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 80-90, Online. Association for Computational Linguistics.", + "Quang-Phuoc Nguyen, Anh-Dung Vo, Joon-Choul Shin, and Cheol-Young Ock. 2018. Effect of word sense disambiguation on neural machine translation: A case study in korean. IEEE Access, 6:38512-38523.", + "Riccardo Orlando, Simone Conia, Fabrizio Brignone, Francesco Cecconi, and Roberto Navigli. 2021. AMuSE-WSD: An all-in-one multilingual system for easy Word Sense Disambiguation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 298-307, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.", + "Xiao Pan, Mingxuan Wang, Liwei Wu, and Lei Li. 2021. Contrastive learning for many-to-many multilingual neural machine translation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 244-258, Online. Association for Computational Linguistics.", + "Tommaso Pasini, Alessandro Raganato, and Roberto Navigli. 2021. Xl-wsd: An extra-large and cross-lingual evaluation framework for word sense disambiguation. Proceedings of the AAAI Conference on Artificial Intelligence, 35(15):13648-13656.", + "Maja Popovic. 2017. chrf++: words helping character n-grams. In Proceedings of the second conference on machine translation, pages 612-618.", + "Xiao Pu, Nikolaos Pappas, James Henderson, and Andrei Popescu-Belis. 2018. Integrating weakly supervised word sense disambiguation into neural machine translation. Transactions of the Association for Computational Linguistics, 6:635-649.", + "Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2019. The MuCoW test suite at WMT" + ], + "bbox": [ + 510, + 85, + 884, + 917 + ], + "page_idx": 10 + }, + { + "type": "page_number", + "text": "12899", + "bbox": [ + 477, + 927, + 524, + 940 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "2019: Automatically harvested multilingual contrastive word sense disambiguation test sets for machine translation. In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pages 470-480.", + "Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2020. An evaluation benchmark for testing the word sense disambiguation capabilities of machine translation systems. In Proceedings of The 12th Language Resources and Evaluation Conference. European Language Resources Association (ELRA).", + "Ricardo Rei, José G. C. de Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022. COMET-22: Unbabel-IST 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics.", + "Machel Reid and Mikel Artetxe. 2022. PARADISE: Exploiting parallel data for multilingual sequence-to-sequence pretraining. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 800-810, Seattle, United States. Association for Computational Linguistics.", + "Ali Saeed, Rao Muhammad Adeel Nawab, and Mark Stevenson. 2021. Investigating the feasibility of deep learning methods for urdu word sense disambiguation. Transactions on Asian and Low-Resource Language Information Processing, 21(2):1-16.", + "Benoit Sagot and Darja Fiser. 2008. Building a free french wordnet from multilingual resources. In OntoLex.", + "Student. 1908. The probable error of a mean. Biometrika, 6(1):1-25.", + "Gongbo Tang, Rico Senrich, and Joakim Nivre. 2018. An analysis of attention mechanisms: The case of word sense disambiguation in neural machine translation. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 26-35, Brussels, Belgium. Association for Computational Linguistics.", + "Gongbo Tang, Rico Senrich, and Joakim Nivre. 2019. Encoders help you disambiguate word senses in neural machine translation. 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 1429-1435, Hong Kong, China. Association for Computational Linguistics.", + "Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, and Angela Fan. 2021. Multilingual translation from denoising pre-training. In Findings of the Association" + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 11 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "for Computational Linguistics: ACL-IJCNLP 2021, pages 3450-3466, Online. Association for Computational Linguistics.", + "Jörg Tiedemann and Santhosh Thottingal. 2020. Opusmt-building open translation services for the world. In Proceedings of the 22nd Annual Conference of the European Association for Machine Translation. European Association for Machine Translation.", + "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.", + "Daphne Wang, Mehrnoosh Sadrzadeh, Samson Abramsky, H Víctor, and VH Cervantes. 2021. Analysing ambiguous nouns and verbs with quantum contextuality tools. Journal of Cognitive Science, 22(3):391-420.", + "Warren Weaver. 1952. Translation. In Proceedings of the Conference on Mechanical Translation.", + "Shufang Xie, Yingce Xia, Lijun Wu, Yiqing Huang, Yang Fan, and Tao Qin. 2022. End-to-end entity-aware neural machine translation. Machine Learning, pages 1-23.", + "Deyi Xiong and Min Zhang. 2014. A sense-based translation model for statistical machine translation. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1459-1469, Baltimore, Maryland. Association for Computational Linguistics.", + "Zhen Yang, Bojie Hu, Ambyera Han, Shen Huang, and Qi Ju. 2020. CSP:code-switching pre-training for neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2624-2636, Online. Association for Computational Linguistics.", + "Yang Zhao, Lu Xiang, Junnan Zhu, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020a. Knowledge graph enhanced neural machine translation via multitask learning on sub-entity granularity. In Proceedings of the 28th International Conference on Computational Linguistics, pages 4495-4505.", + "Yang Zhao, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020b. Knowledge graphs enhanced neural machine translation. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 4039-4045. International Joint Conferences on Artificial Intelligence Organization. Main track." + ], + "bbox": [ + 510, + 85, + 884, + 820 + ], + "page_idx": 11 + }, + { + "type": "page_number", + "text": "12900", + "bbox": [ + 477, + 928, + 524, + 940 + ], + "page_idx": 11 + }, + { + "type": "table", + "img_path": "images/31ada28d65e82d7d8adee0dc62dba9eb2f02c22ceb71f5501528e27586a1b826.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
HyperparameterRomanceIndo-Iranian
Batch Size40004000
Learning Rate0.00010.0001
Update Frequency44
OptimizerAdamAdam
w/ eps=5e-07w/ eps=1e-08
Weight Decay0.00010.01
Dropout0.050.01
Label Smoothing0.10.1
Contrastive Lambda1.01.0
Temperature0.10.01
Clip Norm1010
Replacement Ratio0.10.05
", + "bbox": [ + 115, + 80, + 505, + 307 + ], + "page_idx": 12 + }, + { + "type": "table", + "img_path": "images/27288b1cb359f0255c7a6cd1f0c58c67866846aaf51835270e3fc7ecf1499152.jpg", + "table_caption": [ + "Table 7: Hyperparameters used for training our models." + ], + "table_footnote": [], + "table_body": "
ModelEnItFrEsParamsRunning Time (for 100K sents)
ESCHER78.7279.1483.9477.52692 M63 mins
ConSeC79.0079.3084.4077.40287 M213 mins
", + "bbox": [ + 115, + 348, + 485, + 413 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Table 8: Results of four different EsCHER models trained on English (En), Italian (It), French (Fr) and Spanish (Es) and ConSeC.", + "bbox": [ + 112, + 423, + 485, + 467 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "A Appendix", + "text_level": 1, + "bbox": [ + 114, + 476, + 238, + 493 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "A.1 Hyperparameters", + "text_level": 1, + "bbox": [ + 114, + 505, + 304, + 521 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "We provide our detailed hyperparameter settings in Table 7. We optimize each hyperparameter independently in separate runs, and use the best settings in our experiments.", + "bbox": [ + 112, + 527, + 487, + 590 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "A.2 WSD Systems Details", + "text_level": 1, + "bbox": [ + 114, + 606, + 332, + 621 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "In the original AMuSE-WSD work, a multilingual version of the system was made available; however, EsCHER currently offers only an English model. For this reason, we train three distinct EsCHER models specifically tailored for Italian, Spanish, and French. We adopt the methodology outlined in the original work but adapt it to train the models using the XL-WSD (Pasini et al., 2021) splits for the respective languages and use mDeBERTa (He et al., 2023) as the underlying multilingual transformer architecture. By doing so, we ensure compatibility and improve performance in the targeted linguistic contexts as reported in Barba et al. (2021b) without incurring prohibitive computational costs. As a reference, we report in Table 8 the difference in performance between our EsCHER models and the results reported in Barba et al. (2021b) for the multilingual version of their system, ConSeC.", + "bbox": [ + 112, + 629, + 489, + 917 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "A.3 Verb Disambiguation Examples", + "text_level": 1, + "bbox": [ + 510, + 84, + 808, + 99 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/9a5ac047c023630dbed70d8d8decf27ca2cb72d983d11e1e38c7ff33933c5052.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 118, + 554, + 134 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Source: The company turned a good profit after a year.", + "bbox": [ + 559, + 122, + 836, + 133 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/4e3cc23e105be67d106965a947aef2acf5de7ebf7b2465a684744523f46486be.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 137, + 554, + 152 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "AA: L'impresa ha trasformato un buon profitto dopo un anno.", + "bbox": [ + 559, + 139, + 884, + 149 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/6c7c4d54c434a853f057263aa7b1680129de3fdcf43434fe2c3c71798d99e3a9.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 156, + 554, + 171 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "WSP-NMT: La société ha fatto un bon profitti dopo un anno.", + "bbox": [ + 559, + 156, + 850, + 168 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "(a) \"trasformato\" means \"transformed\" and is an incorrect sense translation of \"turned\". \"fatto\" means \"made\", as in \"made a good profit\" and is a correct translation in context.", + "bbox": [ + 507, + 179, + 880, + 216 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/e4cbf7128272323c8b5478c0aa25a809315aee109c01f5c0d8819b537899f795.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 224, + 557, + 240 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Source: To appropriate money for the increase of the navy.", + "bbox": [ + 559, + 227, + 882, + 237 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/e347c7e1bb7eb4a728964114195a8ca28ab98bfaf3ac69db36bb9cc38be9fa1a.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 244, + 554, + 259 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "AA: Per adeguare il denaro per l'augimento della tassa.", + "bbox": [ + 559, + 244, + 873, + 256 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/891006b6464f8c37d8775b333c1f356fe8550163858d78a0b153a094c14b1a56.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 263, + 554, + 279 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "WSP-NMT: Per stanziare fondi per l'auento dell'imbarcazione.", + "bbox": [ + 559, + 265, + 885, + 275 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "(b) \"adequate\" is a verb meaning \"adapt\" or \"adjust\" and is an incorrect sense translation of \"appropriate\". \"stanziare\" means \"allocate\", as in \"allocate funds\", and is correct in context.", + "bbox": [ + 507, + 287, + 880, + 324 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/c0481bae738555daa72d9eac5359ba6d253d3a730e199c3f1a658803868ff8cb.jpg", + "image_caption": [ + "Figure 7: Examples of verb disambiguation in DiBiMT Italian hypothesis translations by AA and WSP-NMT." + ], + "image_footnote": [], + "bbox": [ + 515, + 332, + 557, + 348 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "Source: The player had to backpedal before catching the ball.", + "bbox": [ + 557, + 335, + 852, + 344 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/d66f9393fa7e560b2de433b209ee0ec75083884d58b06353a4ab08bba295c902.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 351, + 554, + 363 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "AA: Il giocatore aveva dovuto tornare prima di catturare la balla.", + "bbox": [ + 559, + 351, + 884, + 363 + ], + "page_idx": 12 + }, + { + "type": "image", + "img_path": "images/afdb87b28a5889620426f25be3f98fbfb8a7d83316af957ff6eaa6b416e12828.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 515, + 369, + 554, + 382 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "WSP-NMT: Il glacatore era tornato indietro prima di prendere la palla.", + "bbox": [ + 559, + 369, + 873, + 380 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "(c) \"aveva dovuto tornare\" translates to \"had to return\" and is an incorrect translation of \"backpedal\". \"tornado indietro\" means to \"move (or run) back\" and contextually correct.", + "bbox": [ + 507, + 390, + 882, + 426 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "We show some examples of improved verb disambiguation of WSP-NMT in Figure 7, using examples from the DiBiMT test set. The AA hypotheses for these sentences contain translations that could have been appropriate in certain contexts but are incorrect here. For example, in Figure 7a, turned could translate into transformato when the context is referring to \"turning into something\". A similar explanation holds for Figure 7b where appropriate could translate into adeguare when talking about \"appropriating style\", \"appropriating language\" or \"appropriating software\", to name a few examples. Figure 7c is very interesting since backpedal does mean tornado indietro (\"move back\") in this context, but \"tornare\" (\"return\") is not an appropriate sense translation. These cases reflect how by carefully modelling for cross-lingual convergence of word senses during pretraining, WSP-NMT can avoid subtle translation errors that may arise when encountering ambiguous words.", + "bbox": [ + 507, + 476, + 882, + 800 + ], + "page_idx": 12 + }, + { + "type": "page_number", + "text": "12901", + "bbox": [ + 477, + 927, + 522, + 940 + ], + "page_idx": 12 + } +] \ No newline at end of file diff --git a/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_model.json b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..44efd6dd17590a04c86f7f843932add09b0db24b --- /dev/null +++ b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_model.json @@ -0,0 +1,2921 @@ +[ + [ + { + "type": "title", + "bbox": [ + 0.141, + 0.089, + 0.856, + 0.126 + ], + "angle": 0, + "content": "Code-Switching with Word Senses for Pretraining in Neural Machine Translation" + }, + { + "type": "text", + "bbox": [ + 0.135, + 0.142, + 0.871, + 0.159 + ], + "angle": 0, + "content": "Vivek Iyer1 Edoardo Barba2 Alexandra Birch1 Jeff Z. Pan1 Roberto Navigli2" + }, + { + "type": "text", + "bbox": [ + 0.306, + 0.16, + 0.697, + 0.177 + ], + "angle": 0, + "content": "\\(^{1}\\)School of Informatics, University of Edinburgh" + }, + { + "type": "text", + "bbox": [ + 0.286, + 0.177, + 0.716, + 0.193 + ], + "angle": 0, + "content": "Sapienza NLP Group, Sapienza University of Rome" + }, + { + "type": "text", + "bbox": [ + 0.28, + 0.194, + 0.723, + 0.21 + ], + "angle": 0, + "content": "{vivek. iyer, pinzhen.chen, a.birch}@ed.ac.uk" + }, + { + "type": "text", + "bbox": [ + 0.334, + 0.211, + 0.668, + 0.226 + ], + "angle": 0, + "content": "{barba, navigli}@diag.uniroma1.it" + }, + { + "type": "title", + "bbox": [ + 0.261, + 0.253, + 0.341, + 0.267 + ], + "angle": 0, + "content": "Abstract" + }, + { + "type": "text", + "bbox": [ + 0.145, + 0.277, + 0.461, + 0.66 + ], + "angle": 0, + "content": "Lexical ambiguity is a significant and pervasive challenge in Neural Machine Translation (NMT), with many state-of-the-art (SOTA) NMT systems struggling to handle polysemous words (Campolungo et al., 2022a). The same holds for the NMT pretraining paradigm of de-noising synthetic \"code-switched\" text (Pan et al., 2021; Iyer et al., 2023), where word senses are ignored in the noising stage – leading to harmful sense biases in the pretraining data that are subsequently inherited by the resulting models. In this work, we introduce Word Sense Pretraining for Neural Machine Translation (WSP-NMT) - an end-to-end approach for pretraining multilingual NMT models leveraging word sense-specific information from Knowledge Bases. Our experiments show significant improvements in overall translation quality. Then, we show the robustness of our approach to scale to various challenging data and resource-scarce scenarios and, finally, report fine-grained accuracy improvements on the DiBiMT disambiguation benchmark. Our studies yield interesting and novel insights into the merits and challenges of integrating word sense information and structured knowledge in multilingual pretraining for NMT." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.669, + 0.26, + 0.685 + ], + "angle": 0, + "content": "1 Introduction" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.694, + 0.49, + 0.92 + ], + "angle": 0, + "content": "Lexical ambiguity is a long-standing challenge in Machine Translation (Weaver, 1952) due to polysemy being one of the most commonly occurring phenomena in natural language. Indeed, thanks to a plethora of context-dependent ambiguities (e.g. the word run could mean run a marathon, run a mill, run for elections etc.), words can convey very distant meanings, which may be translated with entirely different words in the target language. To deal with this challenge, traditional Statistical Machine Translation approaches tried to incorporate Word Sense Disambiguation (WSD) systems in MT with mostly positive results (Carpuat and Wu, 2007; Xiong and Zhang, 2014). These were followed by" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.253, + 0.885, + 0.349 + ], + "angle": 0, + "content": "similar efforts to plug sense information in NMT frameworks (Liu et al., 2018; Pu et al., 2018). But, since the introduction of the Transformer (Vaswani et al., 2017), the task of disambiguation has largely been left to the attention mechanism (Tang et al., 2018, 2019)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.352, + 0.885, + 0.851 + ], + "angle": 0, + "content": "In the last three years, though, many works have challenged the ability of modern-day NMT systems to accurately translate highly polysemous and/or rare word senses (Emelin et al., 2020; Raganato et al., 2020; Campolungo et al., 2022a). For example, Campolungo et al. (2022a) expose major word sense biases in not just bilingual NMT models like OPUS (Tiedemann and Thottingal, 2020), but also commercial systems like DeepL1 and Google Translate2, and massively pretrained multilingual models (Tang et al., 2021; Fan et al., 2021). A likely explanation is that these models capture inherent data biases during pretraining. This particularly holds for the pretraining paradigm of denoising code-switched text3 — most notably, Aligned Augmentation (AA, Pan et al., 2021), where, during the pretraining phase, input sentences are noised by substituting words with their translations from multilingual lexicons, and NMT models are then tasked to reconstruct (or 'de-noise') these sentences. AA and subsequent works (Reid and Artetxe, 2022; Iyer et al., 2023; Jones et al., 2023) show the benefits of code-switched pretraining for high- and low-resource, supervised and unsupervised translation tasks. Despite their success, a major limitation of these substitution mechanisms is that they are unable to handle lexical ambiguity adequately, given their usage of 'sense-agnostic' translation lexicons. In fact, in most of these works, substitutions for polysemes are chosen randomly, regardless of context (Pan et al., 2021;" + }, + { + "type": "page_footnote", + "bbox": [ + 0.509, + 0.867, + 0.783, + 0.88 + ], + "angle": 0, + "content": "4https://github.com/facebookresearch/MUSE" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.524, + 0.941 + ], + "angle": 0, + "content": "12891" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.12, + 0.083, + 0.881, + 0.238 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.158, + 0.247, + 0.837, + 0.264 + ], + "angle": 0, + "content": "Figure 2: Pipelines contrasting the approach used by the AA and WSP-NMT pretraining algorithms." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.279, + 0.49, + 0.409 + ], + "angle": 0, + "content": "the impact of 'sense-pivoted' pretraining by comparing against similarly trained WSP-NMT models. We also note that while some extensions to AA have been proposed recently, by combining it with masking or other code-switching strategies (see Section 2), these improvements likely also hold for code-switching with sense translations – making these techniques complementary to our work." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.418, + 0.424, + 0.433 + ], + "angle": 0, + "content": "3.3 Word Sense Pretraining for NMT" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.439, + 0.489, + 0.471 + ], + "angle": 0, + "content": "We depict the WSP-NMT pipeline, and compare it with AA, in Figure 2. It involves three stages:" + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.48, + 0.456, + 0.496 + ], + "angle": 0, + "content": "3.3.1 Word Sense Disambiguation (WSD)" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.499, + 0.49, + 0.756 + ], + "angle": 0, + "content": "To determine the most appropriate translation for a word \\( w_{i} \\) in a sentence, we begin by identifying its intended meaning in context using WSD systems. To measure the impact of disambiguation quality on the final translation performance, we adopt two WSD systems, namely, EsCHER, a SOTA open-inventory WSD model, and AMuSE-WSD (Orlando et al., 2021), a faster but still competitive, off-the-shelf classification system. We note that, since EsCHER was originally only released for English, we also trained models for other languages on the multilingual datasets in XL-WSD (Pasini et al., 2021). We provide further training details in Appendix A.2. As a result of this stage, each content word in the input sentence is linked to a specific synset5 in BabelNet." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.765, + 0.482, + 0.78 + ], + "angle": 0, + "content": "3.3.2 Extracting Translations from BabelNet" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.784, + 0.49, + 0.897 + ], + "angle": 0, + "content": "Given the synset associated with a disambiguated word, we retrieve its possible translations in the languages of experimentation by using BabelNet. Indeed, in BabelNet, each synset in each language comes with a set of lexicalizations that can express the concept represented by that synset. At the moment of writing, BabelNet contains concept lexical-" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.279, + 0.885, + 0.343 + ], + "angle": 0, + "content": "izations for 520 languages with varying degrees of coverage. Thus, at the end of this stage, all content words will have a list of possible translations in the target languages." + }, + { + "type": "title", + "bbox": [ + 0.508, + 0.353, + 0.883, + 0.368 + ], + "angle": 0, + "content": "3.3.3 Generation of Morphological Inflections" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.372, + 0.885, + 0.612 + ], + "angle": 0, + "content": "Finally, given that concept lexicalizations in Babel-Net are present as lemmas, we include an additional postprocessing stage to convert target lemmas \\( l_{i} \\) of sense \\( s \\) into their contextually appropriate morphological variant \\( m_{i} \\). We do this by leveraging MUSE lexicons \\( M \\). We first preprocess entries in \\( M \\) using a lemmatizer \\( L \\) like so: given word translation pairs \\( (x_{j}, y_{j}) \\) in \\( M \\), we create a hashmap \\( H \\) where \\( H(x_{j}, L(y_{j})) = y_{j} \\). Given \\( H \\), during code-switching, if the source word \\( w_{i} \\) is not a lemma we do a lookup for the key \\( H(w_{i}, l_{i}) \\) and return the corresponding value as the contextually appropriate morphological inflection \\( m_{i} \\) for sense \\( s \\) - which is then used for code-switching. If the key is unavailable in \\( H \\), we code-switch \\( w_{i} \\) with \\( l_{i} \\) itself." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.614, + 0.884, + 0.807 + ], + "angle": 0, + "content": "This step allows us to generate translations that take into account both word senses and morphology – thus combining the best of both worlds between 'sense-agnostic' lexicons and canonicalized6 Knowledge Graphs storing sense information. While this postprocessing does improve performance, it is optional and we show in Section 4.2 that baselines without this stage also yield decent improvements, while minimizing the overhead. We use Trankit (Nguyen et al., 2021) for lemmatization, which was shown to achieve SOTA results on this task on treebanks from 90 languages7." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.818, + 0.627, + 0.833 + ], + "angle": 0, + "content": "3.4 Training" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.84, + 0.882, + 0.872 + ], + "angle": 0, + "content": "For fair comparison, we follow the experimental setup proposed by Pan et al. (2021) for training our" + }, + { + "type": "page_footnote", + "bbox": [ + 0.509, + 0.88, + 0.863, + 0.894 + ], + "angle": 0, + "content": "\\(^{6}\\)i.e. KGs representing concepts as canonicalized lemmas." + }, + { + "type": "page_footnote", + "bbox": [ + 0.511, + 0.894, + 0.83, + 0.918 + ], + "angle": 0, + "content": "7https://trankit.readthedocs.io/en/latest/ performance.htm1" + }, + { + "type": "list", + "bbox": [ + 0.509, + 0.88, + 0.863, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.904, + 0.483, + 0.919 + ], + "angle": 0, + "content": "\\( {}^{5} \\) A synset is a group of semantically equivalent word senses." + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12892" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.12, + 0.081, + 0.5, + 0.174 + ], + "angle": 0, + "content": "
MonolingualParallel
En7.5MFr7.5MIt7.5MEn-Es1.8MEn-It1.7M
Es7.5MPt7.5MRo7.5MEn-Fr1.8MEn-Ro365K
(a) Size of Romance language corpora (sentence count)
MonolingualParallel
En20MHi6MFa6MEn-Hi1.9MEn-Fa1M
" + }, + { + "type": "table_caption", + "bbox": [ + 0.123, + 0.179, + 0.489, + 0.193 + ], + "angle": 0, + "content": "(b) Size of Indo-Iranian language corpora (sentence count)" + }, + { + "type": "table_caption", + "bbox": [ + 0.12, + 0.198, + 0.482, + 0.213 + ], + "angle": 0, + "content": "Table 1: Monolingual and Parallel Data statistics." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.246, + 0.49, + 0.536 + ], + "angle": 0, + "content": "AA and WSP-NMT models. We code-switch parallel and monolingual sentences (with translations generated using the respective approaches) and shuffle them to create our training dataset \\(D\\). We input the code-switched sentences to the encoder, while the target sentences are the reference sentences for parallel data and the original 'denoised' sentences for monolingual data. We pretend a special language token indicating language ID to each input and target sentence. Finally, we train the model using a loss function \\(\\mathcal{L}\\) that jointly optimizes Contrastive Loss \\(\\mathcal{L}_{\\mathrm{CON}}\\) and Cross Entropy Loss \\(\\mathcal{L}_{CE}\\). In principle, Contrastive Loss minimizes the semantic representation gap between positive examples (code-switched and reference sentences) and maximizes the distance between negative examples (approximated to other random samples in the minibatch). With this in mind, we define \\(\\mathcal{L}\\) as:" + }, + { + "type": "equation", + "bbox": [ + 0.207, + 0.558, + 0.393, + 0.575 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} = \\mathcal {L} _ {C E} + | s | * \\mathcal {L} _ {C O N}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.143, + 0.602, + 0.46, + 0.645 + ], + "angle": 0, + "content": "where: \\(\\mathcal{L}_{CE} = -\\sum_{(x,y)\\in D}\\log P_{\\theta}(y|x),\\) and" + }, + { + "type": "equation", + "bbox": [ + 0.116, + 0.672, + 0.486, + 0.716 + ], + "angle": 0, + "content": "\\[\n\\mathcal {L} _ {\\mathrm {C O N}} = - \\sum_ {(x, y) \\in D} \\log \\frac {e ^ {\\operatorname {s i m} ^ {+} (\\mathcal {E} (x) , \\mathcal {E} (y)) / \\tau}}{\\sum_ {(a , b) \\in B} e ^ {\\operatorname {s i m} ^ {-} (\\mathcal {E} (x) , \\mathcal {E} (b)) / \\tau}}\n\\]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.743, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Here, \\(\\mathcal{E}\\) signifies the average pooled encoder representations for the input sentence, while 'sim' computes positive and negative semantic similarities between the contrastive examples, denoted by \\(\\mathrm{sim}^+\\) and \\(\\mathrm{sim}^-\\) respectively. Temperature \\(\\tau\\) controls the difficulty of distinguishing between positive and negative samples, and is set to 0.1. \\(B\\) denotes the mini-batch in dataset \\(D\\) that \\((x,y)\\) belongs to. Lastly, \\(|s|\\) is the average token count of sentence \\(s\\) that balances token-level cross entropy loss and sentence-level contrastive loss." + }, + { + "type": "table", + "bbox": [ + 0.51, + 0.082, + 0.885, + 0.16 + ], + "angle": 0, + "content": "
Language PairEn-EsEn-FrEn-ItEn-Ro
Test SetWMT'13WMT'14WMT'09WMT'16
Language PairEn-PtEn-HiEn-Fa
Test SetFLORES 200WMT'19FLORES 200
" + }, + { + "type": "table_caption", + "bbox": [ + 0.528, + 0.169, + 0.862, + 0.183 + ], + "angle": 0, + "content": "Table 2: Test sets used per language in this work." + }, + { + "type": "table", + "bbox": [ + 0.511, + 0.184, + 0.885, + 0.247 + ], + "angle": 0, + "content": "
ModelEnItFrEsAvgRunning Time (for 330K sents)
AMuSE-WSD77.1376.0380.3572.7776.5778 mins
ESCHER78.7279.1483.9477.5279.83180 mins
" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.256, + 0.884, + 0.356 + ], + "angle": 0, + "content": "Table 3: F1-scores of ESCHER and AMuSE-WSD on XL-WSD (Pasini et al., 2021) for English (En), Italian (It), French (Fr), Spanish (Es), and the Average (Avg) of all scores. All results are statistically significant (\\( p < 0.01 \\) as per McNemar's test (Dietterich, 1998)). For comparing efficiencies, we also report the running time for disambiguating 330K sentences on 1 RTX 3090." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.38, + 0.656, + 0.396 + ], + "angle": 0, + "content": "4 Experiments" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.406, + 0.715, + 0.422 + ], + "angle": 0, + "content": "4.1 Experimental Setup" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.426, + 0.885, + 0.683 + ], + "angle": 0, + "content": "Table 1 shows the statistics for our training data. In this work, we primarily experiment with the Romance languages and pretrain multilingual NMT models on the monolingual and parallel data in Table 1a, following the training setup described previously. We use Portuguese later for our zero-shot experiments, so no parallel data is provided. We also explore NMT for Indo-Iranian languages in Section 4.3.3, and use the data given in Table 1b to train those models. We note here that since our objective in this work is to explore the utility of KGs for sense-pivoted pretraining, our data setups follow a similar scale as other works on KG-enhanced NMT (Zhao et al., 2020a; Xie et al., 2022; Hu et al., 2022), and diverges from the massively multilingual paradigm of Pan et al. (2021)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.684, + 0.884, + 0.828 + ], + "angle": 0, + "content": "For validation, we sample the last 1000 sentences from the parallel corpus per pair. As shown in Table 2, for testing, we use either the latest WMT test sets per pair, if available, or FLORES 200 sets (Costa-jussà et al., 2022) otherwise. We evaluate NMT results using spBLEU\\(^{8}\\) (Costa-jussà et al., 2022), \\(\\mathrm{chrF}++^{9}\\) (Popović, 2017) and COMET22 (Rei et al., 2022) metrics, and compute statistical significance using Student's T-test (Student, 1908)." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.829, + 0.883, + 0.861 + ], + "angle": 0, + "content": "We use the Transformer (Vaswani et al., 2017) architecture with 6 encoder and 6 decoder layers" + }, + { + "type": "ref_text", + "bbox": [ + 0.509, + 0.868, + 0.875, + 0.893 + ], + "angle": 0, + "content": "8nrefs:1|case:mixed|eff:no|tok:flores101|smooth: exp|version:2.3.1" + }, + { + "type": "ref_text", + "bbox": [ + 0.51, + 0.894, + 0.844, + 0.918 + ], + "angle": 0, + "content": "\\(9\\)nrefs:1|case:mixed|eff:yes|nc:6|nw:2|space: no|version:2.3.1" + }, + { + "type": "list", + "bbox": [ + 0.509, + 0.868, + 0.875, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12893" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.129, + 0.085, + 0.473, + 0.245 + ], + "angle": 0, + "content": null + }, + { + "type": "image", + "bbox": [ + 0.123, + 0.248, + 0.47, + 0.414 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.114, + 0.417, + 0.49, + 0.446 + ], + "angle": 0, + "content": "Figure 3: Improvements in the average performance of WSP over AA for each language pair." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.462, + 0.49, + 0.606 + ], + "angle": 0, + "content": "for training our models. For tokenization, we use sentencepiece (Kudo and Richardson, 2018). We train the sentencepiece model on concatenated and shuffled data from Table 1, using a unigram language model with a vocabulary size of 32,000 and character coverage of 1.0. We use replacement ratios of 0.1 and 0.05 for our Romance and Indo-Iranian models respectively. We provide further hyperparameter settings in Appendix A.1." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.607, + 0.49, + 0.687 + ], + "angle": 0, + "content": "Lastly, in Table 3, we evaluate and report key performance statistics for our two WSD systems, AMuSE-WSD and ESCHER. We shall use these to better interpret our NMT results and comment on the observed quality/speed tradeoff in Section 4.2." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.697, + 0.267, + 0.712 + ], + "angle": 0, + "content": "4.2 Main Results" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.718, + 0.49, + 0.784 + ], + "angle": 0, + "content": "We show overall results for the Romance language experiments, averaged across 5 runs, in Table 4. We also report language pair-specific improvements in Figure 3. We make the following key observations:" + }, + { + "type": "text", + "bbox": [ + 0.108, + 0.791, + 0.49, + 0.919 + ], + "angle": 0, + "content": "1. WSP-NMT consistently outperforms AA. We observe that our best WSP-NMT model, i.e. the one using EsCHER for disambiguation and MUSE lexicons for generating morphological predictions, consistently beats AA models by significant margins across all metrics – including a +1.2 boost in spBLEU for En-X and +0.7 for X-En. Except for Fr-En where WSP-NMT" + }, + { + "type": "text", + "bbox": [ + 0.52, + 0.086, + 0.888, + 0.11 + ], + "angle": 0, + "content": "1. And when Federer levelled the match, one-time British No 1 Petchey temia (fear->fear->temer->temia) the worst." + }, + { + "type": "text", + "bbox": [ + 0.52, + 0.12, + 0.88, + 0.133 + ], + "angle": 0, + "content": "2. The world was mirando (looking->look->mirar->mirando) at him." + }, + { + "type": "text", + "bbox": [ + 0.52, + 0.143, + 0.883, + 0.178 + ], + "angle": 0, + "content": "3. GM deber (owes->owe->debe->deber) $23.4bn, excluding $3.9bn in realised Treasury perdidas (losses->loss->perdida->perdidas), according to a Treasury statement dated Friday." + }, + { + "type": "list", + "bbox": [ + 0.52, + 0.086, + 0.888, + 0.178 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.508, + 0.193, + 0.885, + 0.294 + ], + "angle": 0, + "content": "Figure 4: WSP-NMT with Morphological Inflection. Code-switched words are highlighted. a' ->a->b->b' denotes the inflection generation process explained in Section 3.3.3 where a' and b' are source and target words, while a and b are the corresponding lemmas. a->b is extracted from BabelNet, while the hashmap lookup yields b' given (a', b)." + }, + { + "type": "text", + "bbox": [ + 0.521, + 0.315, + 0.884, + 0.396 + ], + "angle": 0, + "content": "marginally underperforms\\(^{10}\\), these gains also extend to individual language pairs (Figure 3). This suggests that minimising errors in pretraining data with 'sense-pivoted pretraining' can enhance overall convergence and yield stronger models." + }, + { + "type": "text", + "bbox": [ + 0.502, + 0.405, + 0.884, + 0.567 + ], + "angle": 0, + "content": "2. Superior disambiguation helps, but cheaper WSD systems work well too. We observe in Figure 3 that EsCHER consistently induces greater gains than AMuSE-WSD across all pairs. This makes sense given the superior disambiguation quality of the former (Table 3). However, we note that AMuSE-WSD, which is about \\(2.3\\mathrm{x}\\) faster, also outperforms AA and can be used as an effective, but cheaper alternative, suitable for disambiguating large corpora under budget constraints." + }, + { + "type": "text", + "bbox": [ + 0.502, + 0.576, + 0.885, + 0.833 + ], + "angle": 0, + "content": "3. Postprocessing KG lemmas to predict the relevant morphological inflection is beneficial. We observe generating morphological inflections by intersecting with MUSE lexicons (Section 3.3.3) yields major boosts across the board. We understand this qualitatively by showing examples of such inflections from our dataset, in Figure 4. We observe that this approach helps in ensuring linguistic agreement (such as for tense and number) which, in turn, enhances the quality of code-switching and, thus, pretraining. Our technique can thus be used as an effective way to bridge the gap between KG lemmas and morphologically inflected words in corpora – a gap which has proved to be one of the major roadblocks in leveraging structured knowledge in NMT so far." + }, + { + "type": "list", + "bbox": [ + 0.502, + 0.405, + 0.885, + 0.833 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.502, + 0.843, + 0.885, + 0.874 + ], + "angle": 0, + "content": "4. Higher gains are observed for the lower resourced En-Ro pair. WSP-NMT obtains a \\(+2\\)" + }, + { + "type": "page_footnote", + "bbox": [ + 0.51, + 0.88, + 0.883, + 0.919 + ], + "angle": 0, + "content": "This is possibly because the WordNet that BabelNet uses for French is WOLF (Sagot and Fiser, 2008), an automatically constructed silver quality resource" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12894" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.115, + 0.082, + 0.885, + 0.19 + ], + "angle": 0, + "content": "
BaselineEn-XX-En
spBLEUchrF++COMET22spBLEUchrF++COMET22
AA24.385 ± 0.63947.890 ± 0.6470.714 ± 0.00924.725 ± 0.57749.660 ± 0.4530.716 ± 0.006
WSP-NMT (AMuSE-WSD)24.910 ± 0.33648.525 ± 0.3040.723 ± 0.00624.935 ± 0.31349.880 ± 0.2430.724 ± 0.005
WSP-NMT (ESCHER)25.310 ± 0.90948.765 ± 0.7170.728 ± 0.01325.095 ± 0.90349.905 ± 0.7050.725 ± 0.010
WSP-NMT (ESCHER) + morph. inflection25.595 ± 0.27949.115 ± 0.2350.731 ± 0.00325.435 ± 0.17950.130 ± 0.2290.729 ± 0.002
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.199, + 0.884, + 0.243 + ], + "angle": 0, + "content": "Table 4: Overall results of the Romance language experiments with respect to spBLEU, \\(\\mathrm{chrF}++\\) and COMET22 metrics. Mean and standard deviation after 5 runs, initialised with different random seeds (0-4) has been reported. Statistically significant improvements \\((p\\leq 0.05)\\) over our primary baseline, AA, are highlighted in bold." + }, + { + "type": "text", + "bbox": [ + 0.127, + 0.259, + 0.489, + 0.356 + ], + "angle": 0, + "content": "spBLEU improvement over AA for the En-Ro pair – which is the lowest resourced in our setup, with 365K parallel sentences (Table 1). This suggests our approach could be even more useful for medium and low data setups – something we empirically verify in Section 4.3.1." + }, + { + "type": "text", + "bbox": [ + 0.107, + 0.369, + 0.49, + 0.642 + ], + "angle": 0, + "content": "5. More significant boosts are obtained for COMET22 than string-based spBLEU or \\(\\mathrm{chrF}++\\) metrics. While our best model improves across all the metrics, we observe this in Table 4 for our weaker models. This is probably because the errors made by incorrect word sense translations can sometimes be too subtle to be adequately penalized by weaker string-based metrics. On the other hand, neural metrics like COMET22 are more robust and have been trained to detect word-level as well as sentence-level errors. It has shown high correlations with human evaluation, ranking second in the WMT'22 Metrics shared task (Freitag et al., 2022). We, thus, conclude that statistically significant gains in COMET scores, when averaged across 5 seeds, help in increasing the strength and reliability of our results." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.658, + 0.486, + 0.689 + ], + "angle": 0, + "content": "4.3 How well does WSP-NMT extend to more challenging MT scenarios?" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.696, + 0.489, + 0.76 + ], + "angle": 0, + "content": "Here, we try to evaluate the robustness of our approach to scale to various challenging translation scenarios: a) data scarcity, b) zero-shot translation and c) translation of under-represented languages." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.771, + 0.411, + 0.787 + ], + "angle": 0, + "content": "4.3.1 Scaling to data-scarce settings" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.791, + 0.49, + 0.919 + ], + "angle": 0, + "content": "In Figure 5, we explore how performance varies with the scale of parallel data, while keeping monolingual data constant - since the latter is usually more abundant. We observe an improvement margin of \\(+3\\) to \\(+4\\) spBLEU in the low-resource setting (50-100K sentences) that widens to \\(+5\\) spBLEU in the medium-resource setup (250-500K sentences). The gap then narrows as we move towards high" + }, + { + "type": "image", + "bbox": [ + 0.517, + 0.261, + 0.875, + 0.432 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.509, + 0.441, + 0.883, + 0.485 + ], + "angle": 0, + "content": "Figure 5: Average En-X and X-En spBLEU scores for AA and WSP-NMT models, with variation in parallel data (in terms of maximum sentence count per language)" + }, + { + "type": "table", + "bbox": [ + 0.551, + 0.498, + 0.844, + 0.556 + ], + "angle": 0, + "content": "
BaselineEn-PtPt-En
AA2.92 ± 0.646.88 ± 1.56
WSP-NMT (best)3.60 ± 0.198.52 ± 0.53
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.565, + 0.884, + 0.622 + ], + "angle": 0, + "content": "Table 5: Zero-Shot Translation scores (spBLEU) for the English-Portuguese (En-Pt) pair. We use the best WSP-NMT model from Table 4 and compare with AA. Statistical significance \\((p = 0.04)\\) is highlighted in bold." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.644, + 0.884, + 0.723 + ], + "angle": 0, + "content": "resource scenarios (750K-1.5M sentences), suggesting AA models become more robust to noise when high quantities of parallel data are provided. Based on these findings, we discuss potential applications of our method in Section 4.5." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.737, + 0.826, + 0.753 + ], + "angle": 0, + "content": "4.3.2 Scaling to Zero-Shot Translation" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.759, + 0.883, + 0.919 + ], + "angle": 0, + "content": "Continuing our exploration into data scarcity, we now evaluate the performance of WSP-NMT with no parallel data (i.e. zero-shot) in Table 5. We use En-Pt as a simulated zero-shot pair, following the setup in Table 1a. We compare our best WSP-NMT model from Table 4 with AA, averaged across 5 runs as before. We observe statistically significant gains of about \\(+0.7\\) and \\(+1.64\\) spBLEU for En-Pt and Pt-En pairs respectively. We conclude that WSP-NMT is strong in a wide range of scenarios" + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12895" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.124, + 0.082, + 0.481, + 0.187 + ], + "angle": 0, + "content": "
En-XX-En
AA22.79 ± 1.06320.49 ± 0.893
WSP-MT (AMuSE-WSD)22 ± 0.70419.58 ± 0.559
WSP-MT (AMuSE-WSD) + morph. inflection21.83 ± 0.72719.53 ± 0.72
WSP-MT (AMuSE-WSD) + synonyms + hypernyms22.71 ± 0.9320.23 ± 0.906
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.196, + 0.487, + 0.225 + ], + "angle": 0, + "content": "Table 6: spBLEU scores for Indo-Iranian languages (Hindi and Farsi) to English, averaged across 5 seeds" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.256, + 0.486, + 0.287 + ], + "angle": 0, + "content": "and can improve performance at varying degrees of resourcedness, including in zero-shot tasks." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.307, + 0.484, + 0.323 + ], + "angle": 0, + "content": "4.3.3 Scaling to under-represented languages" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.331, + 0.49, + 0.524 + ], + "angle": 0, + "content": "Lastly, we explore how WSP-NMT performs for languages under-represented in external resources such as WSD systems, lexicons, and KGs. The issues faced here include low coverage, poor quality, and unreliable WSD. To study the impact of these factors (in isolation from data scarcity), we train a multilingual NMT model between English and 2 Indo-Iranian languages (Hindi and Farsi) using the data in Table 1b. We choose these languages since they are under-represented in BabelNet\\(^{11}\\), are supported by AMuSE-WSD\\(^{12}\\) and have MUSE lexicons available for training AA baselines." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.527, + 0.49, + 0.851 + ], + "angle": 0, + "content": "In Table 6, we find that integrating morphological inflection does not yield gains, likely because - due to poor coverage - we find matches in MUSE lexicons far fewer times (only \\(18.3\\%\\) compared to \\(74\\%\\) for the Romance data). BabelNet also suffers from poor coverage (\\(45\\%\\) of disambiguated senses do not have translations in either Hindi or Farsi). To address this, we explore if translations of synonyms and hypernyms of a KG concept could be used as substitutes. In practice, we find that, while this does improve the vanilla WSP-NMT model, it is unable to beat AA. This is likely rooted in the fact that low-resource disambiguation is an unaddressed challenge in NLP, primarily because of a lack of resources - be it training datasets, reliable WSD models, or even evaluation benchmarks. Despite these hurdles, we note that, since WSP-NMT is effective in data-scarce settings, creating a small amount of sense-annotated data in these languages might suffice to yield potential gains." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.085, + 0.773, + 0.099 + ], + "angle": 0, + "content": "4.4 DiBiMT benchmark results" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.108, + 0.885, + 0.365 + ], + "angle": 0, + "content": "Finally, we test our models on the DiBiMT disambiguation benchmark (Campolungo et al., 2022a) in Figure 6. The DiBiMT test set comprises sentences with an ambiguous word, paired with \"good\" and \"bad\" translations of this word. Then, given an NMT model's hypotheses, it computes accuracy, i.e. the ratio of sentences with \"good\" translations compared to the sum of \"good\" and \"bad\" ones. Hypotheses that fall in neither of these categories are discarded as 'MISS' sentences. We compare AA and our best WSP-NMT model on Italian and Spanish, the two Romance languages supported by DiBiMT, and report overall accuracies. In addition, we also include fine-grained scores on disambiguation of specific POS tags like nouns and verbs to better understand the capabilities of our models." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.368, + 0.885, + 0.737 + ], + "angle": 0, + "content": "We observe a small increase in overall accuracy. Looking more closely, we find that while WSP-NMT's accuracy for nouns is comparable to AA, significant improvements are observed for verb disambiguation - especially for Italian, where average accuracy increases from \\(15.34\\%\\) to \\(17.65\\%\\) (15% increase). Prior research has shown that verbs are much harder to disambiguate than nouns since they are highly polysemous (Barba et al., 2021a,b; Campolungo et al., 2022a) and require much larger contexts to disambiguate (Wang et al., 2021). Thus, while sense-agnostic AA models are able to disambiguate nouns, verb disambiguation proves more challenging, which is where sense-pivoted pretraining with WSP-NMT helps. We provide example translations in Appendix A.3 to drive intuition of this further. Finally, we note that WSP-NMT also reduces the average \\(\\mathrm{MISS\\%}\\) - from \\(39.3\\%\\) to \\(37.2\\%\\) for Spanish, and \\(41.2\\%\\) to \\(40.2\\%\\) for Italian. These trends are encouraging, since errors such as word omission, word copying and hallucination are the most common issues and constitute about \\(50\\%\\) of all 'MISS' cases (Campolungo et al., 2022a)." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.752, + 0.657, + 0.768 + ], + "angle": 0, + "content": "4.5 Applications" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.775, + 0.885, + 0.919 + ], + "angle": 0, + "content": "We conclude our results section by noting that while WSP-NMT is not ideally suited for either very low-resource (Section 4.3.3) or very resource-rich (Section 4.3.1) settings, it does yield significant performance gains for low and medium-data settings of well-resourced (e.g. European) languages, as shown in Figure 5. We hypothesize that this can, thus, be quite useful for domain-specific translation in these languages, such as in news," + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.868, + 0.488, + 0.919 + ], + "angle": 0, + "content": "\\(^{11}\\)https://babelnet.org/statistics \n\\(^{12}\\)https://nlp.uniroma1.it/amuse-wsd/ api-documentation. We are unable to use EsCHER here due to lack of relevant training data in XL-WSD." + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12896" + } + ], + [ + { + "type": "image", + "bbox": [ + 0.14, + 0.083, + 0.465, + 0.233 + ], + "angle": 0, + "content": null + }, + { + "type": "image_caption", + "bbox": [ + 0.114, + 0.242, + 0.49, + 0.271 + ], + "angle": 0, + "content": "Figure 6: Accuracy of our AA and WSP-NMT models, in Spanish and Italian, on the DiBiMT benchmark." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.29, + 0.49, + 0.354 + ], + "angle": 0, + "content": "healthcare, e-commerce, etc. In such information-centric domains, minimising disambiguation errors and improving translation quality with reliable, general-purpose KGs would likely bring value." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.368, + 0.248, + 0.384 + ], + "angle": 0, + "content": "5 Conclusion" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.395, + 0.49, + 0.587 + ], + "angle": 0, + "content": "We propose WSP-NMT, a 'sense-pivoted' algorithm leveraging word sense information from KBs for pretraining multilingual NMT models. We observe significant performance gains over the baseline, AA, and note various factors of interest including the impact of WSD quality and morphology. We then study how WSP-NMT scales to various data and resource-constrained scenarios and, finally, note significant accuracy gains in verb disambiguation on the DiBiMT benchmark. Our results help emphasize the utility and strength of WSP-NMT." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.603, + 0.22, + 0.618 + ], + "angle": 0, + "content": "Limitations" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.63, + 0.49, + 0.919 + ], + "angle": 0, + "content": "While our approach attempts to minimize the risk of low-quality translations creeping into the pretraining data by using human-curated structured knowledge, it is possible certain biased translations enter our data nonetheless. For instance, during code-switching, there is a possibility of gender bias in the sense translations chosen, as certain gendered translations of a concept that is ungendered in the source language are provided in the same word sense in BabelNet. Though we use random sampling to mitigate such risks, the propagation of potential biases depends heavily on the fairness and diversity of translations available in BabelNet. While such issues are similar to those that would arise in the current paradigm of dictionary-based code-switching, a principled approach to resolve gender based on sentence-level context and to choose the appropriate translation from the BabelNet synset" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.883, + 0.149 + ], + "angle": 0, + "content": "would be a useful direction of future research. The BabelNet KG also has the potential for improving in this regard, allowing for the addition of gender categories to specific concepts." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.151, + 0.885, + 0.473 + ], + "angle": 0, + "content": "We also note that WSP-NMT may not be as effective in the translation of under-represented languages. As we note in Section 4.3.3, this is partly rooted in the unavailability of disambiguation resources and high-quality Knowledge Bases for such languages. However this is quickly changing: i) WSD for low-resource languages has been a very emerging area of research recently (Saeed et al., 2021; Bhatia et al., 2022; Boruah, 2022), and, at the same time, ii) BabelNet itself is constantly being updated and scaled up. For example, due to the creation of newer low-resource wordnets, BabelNet expanded from 500 supported languages (v5.1 from Jul 2022) to 520 (v5.2 from Nov 2022) in just 4 months. As the quality of these curated resources improves with community contributions and advances in low-resource NLP/WSD, we anticipate that methods such as WSP-NMT, which we show to be robust in low-data settings (<1M parallel sents), could be increasingly useful." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.488, + 0.682, + 0.505 + ], + "angle": 0, + "content": "Acknowledgements" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.513, + 0.884, + 0.607 + ], + "angle": 0, + "content": "This work was funded by UK Research and Innovation (UKRI) under the UK government's Horizon Europe funding guarantee [grant number 10039436]. The authors also gratefully acknowledge the support of the PNRR MUR project PE0000013-FAIR." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.609, + 0.884, + 0.753 + ], + "angle": 0, + "content": "The computations described in this research were performed using the Baskerville Tier 2 HPC service (https://www.baskerville.ac.uk/). Baskerville was funded by the EPSRC and UKRI through the World Class Labs scheme (EP/T022221/1) and the Digital Research Infrastructure programme (EP/W032244/1) and is operated by Advanced Research Computing at the University of Birmingham." + }, + { + "type": "title", + "bbox": [ + 0.511, + 0.787, + 0.61, + 0.802 + ], + "angle": 0, + "content": "References" + }, + { + "type": "ref_text", + "bbox": [ + 0.51, + 0.812, + 0.884, + 0.864 + ], + "angle": 0, + "content": "Benyamin Ahmadnia, Bonnie J Dorr, and Parisa Kordjamshidi. 2020. Knowledge graphs effectiveness in neural machine translation improvement. Computer Science, 21." + }, + { + "type": "ref_text", + "bbox": [ + 0.51, + 0.878, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Farhad Akhbardeh, Arkady Arkhangorodsky, Magdalena Biesialska, Ondrej Bojar, Rajen Chatterjee, Vishrav Chaudhary, Marta R. Costa-jussa," + }, + { + "type": "list", + "bbox": [ + 0.51, + 0.812, + 0.885, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12897" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.135, + 0.086, + 0.49, + 0.282 + ], + "angle": 0, + "content": "Cristina Espana-Bonet, Angela Fan, Christian Federmann, Markus Freitag, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Leonie Harter, Kenneth Heafield, Christopher Homan, Matthias Huck, Kwabena Amponsah-Kaakyire, Jungo Kasai, Daniel Khashabi, Kevin Knight, Tom Kocmi, Philipp Koehn, Nicholas Lourie, Christof Monz, Makoto Morishita, Masaaki Nagata, Ajay Nagesh, Toshiaki Nakazawa, Matteo Negri, Santanu Pal, Allahsera Auguste Tapo, Marco Turchi, Valentin Vydrin, and Marcos Zampieri. 2021. Findings of the 2021 conference on machine translation (WMT21). In Proceedings of the Sixth Conference on Machine Translation, pages 1-88, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.294, + 0.49, + 0.374 + ], + "angle": 0, + "content": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.385, + 0.49, + 0.478 + ], + "angle": 0, + "content": "Edoardo Barba, Tommaso Pasini, and Roberto Navigli. 2021a. ESC: Redesigning WSD with extractive sense comprehension. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4661-4672, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.489, + 0.49, + 0.581 + ], + "angle": 0, + "content": "Edoardo Barba, Luigi Procopio, and Roberto Navigli. 2021b. ConSeC: Word sense disambiguation as continuous sense comprehension. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 1492-1503, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.593, + 0.49, + 0.645 + ], + "angle": 0, + "content": "Surbhi Bhatia, Ankit Kumar, and Mohammed Mutilah Khan. 2022. Role of genetic algorithm in optimization of Hindi word sense disambiguation. IEEE Access, 10:75693-75707." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.658, + 0.49, + 0.723 + ], + "angle": 0, + "content": "Puberun Boruah. 2022. A novel approach to word sense disambiguation for a low-resource morphologically rich language. In 2022 IEEE 6th Conference on Information and Communication Technology (CICT), pages 1-6. IEEE." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.736, + 0.49, + 0.841 + ], + "angle": 0, + "content": "Niccolò Campolungo, Federico Martelli, Francesco Saina, and Roberto Navigli. 2022a. DiBiMT: A novel benchmark for measuring Word Sense Disambiguation biases in Machine Translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4331-4352, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.852, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Niccolò Campolungo, Tommaso Pasini, Denis Emelin, and Roberto Navigli. 2022b. Reducing disambiguation biases in NMT by leveraging explicit word sense information. In Proceedings of the 2022 Conference of the North American Chapter of the Association for" + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.53, + 0.086, + 0.885, + 0.127 + ], + "angle": 0, + "content": "Computational Linguistics: Human Language Technologies, pages 4824-4838, Seattle, United States. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.139, + 0.885, + 0.232 + ], + "angle": 0, + "content": "Marine Carpuat and Dekai Wu. 2007. Improving statistical machine translation using word sense disambiguation. In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), pages 61-72, Prague, Czech Republic. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.245, + 0.885, + 0.311 + ], + "angle": 0, + "content": "Yee Seng Chan, Hwee Tou Ng, and David Chiang. 2007. Word sense disambiguation improves statistical machine translation. In Proceedings of the 45th annual meeting of the association of computational linguistics, pages 33-40." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.324, + 0.885, + 0.378 + ], + "angle": 0, + "content": "Heeyoul Choi, Kyunghyun Cho, and Yoshua Bengio. 2017. Context-dependent word representation for neural machine translation. Computer Speech Language, 45:149-160." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.39, + 0.885, + 0.469 + ], + "angle": 0, + "content": "Marta R Costa-jussa, James Cross, Onur Celebi, Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, et al. 2022. No language left behind: Scaling human-centered machine translation. arXiv preprint arXiv:2207.04672." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.482, + 0.885, + 0.524 + ], + "angle": 0, + "content": "Thomas G Dietterich. 1998. Approximate statistical tests for comparing supervised classification learning algorithms. *Neural computation*, 10(7):1895-1923." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.536, + 0.885, + 0.628 + ], + "angle": 0, + "content": "Denis Emelin, Ivan Titov, and Rico Sennrich. 2020. Detecting word sense disambiguation biases in machine translation for model-agnostic adversarial attacks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7635–7653, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.641, + 0.885, + 0.721 + ], + "angle": 0, + "content": "Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, et al. 2021. Beyond english-centric multilingual machine translation. The Journal of Machine Learning Research, 22(1):4839-4886." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.734, + 0.885, + 0.853 + ], + "angle": 0, + "content": "Markus Freitag, Ricardo Rei, Nitika Mathur, Chi-kiu Lo, Craig Stewart, Eleftherios Avramidis, Tom Kocmi, George Foster, Alon Lavie, and André F. T. Martins. 2022. Results of WMT22 metrics shared task: Stop using BLEU – neural metrics are better and more robust. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 46–68, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.866, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Pengcheng He, Jianfeng Gao, and Weizhu Chen. 2023. Debertav3: Improving deberta using electra-style pretraining with gradient-disentangled embedding sharing." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.525, + 0.941 + ], + "angle": 0, + "content": "12898" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.179 + ], + "angle": 0, + "content": "Junjie Hu, Hiroaki Hayashi, Kyunghyun Cho, and Graham Neubig. 2022. DEEP: DEnoising entity pretraining for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1753-1766, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.187, + 0.49, + 0.254 + ], + "angle": 0, + "content": "Vivek Iyer, Arturo Oncevay, and Alexandra Birch. 2023. Exploring enhanced code-switched noising for pretraining in neural machine translation. In *Findings of the Association for Computational Linguistics: EACL* 2023, pages 954-968." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.261, + 0.488, + 0.316 + ], + "angle": 0, + "content": "Alex Jones, Isaac Caswell, Ishank Saxena, and Orhan First. 2023. Bilex rx: Lexical data augmentation for massively multilingual machine translation. arXiv preprint arXiv:2303.15265." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.323, + 0.488, + 0.415 + ], + "angle": 0, + "content": "Tom Kocmi, Rachel Bawden, Ondrej Bojar, Anton Dvorkovich, Christian Federmann, Mark Fishel, Thamme Gowda, Yvette Graham, Roman Grundkiewicz, Barry Haddow, et al. 2022. Findings of the 2022 conference on machine translation (wmt22). In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 1-45." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.423, + 0.488, + 0.516 + ], + "angle": 0, + "content": "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, Brussels, Belgium. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.524, + 0.49, + 0.617 + ], + "angle": 0, + "content": "Pengfei Li, Liangyou Li, Meng Zhang, Minghao Wu, and Qun Liu. 2022. Universal conditional masked language pre-training for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6379-6391, Dublin, Ireland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.625, + 0.49, + 0.731 + ], + "angle": 0, + "content": "Zehui Lin, Xiao Pan, Mingxuan Wang, Xipeng Qiu, Jiangtao Feng, Hao Zhou, and Lei Li. 2020. Pretraining multilingual neural machine translation by leveraging alignment information. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2649-2663, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.739, + 0.49, + 0.844 + ], + "angle": 0, + "content": "Frederick Liu, Han Lu, and Graham Neubig. 2018. Handling homographs in neural machine translation. 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 1336-1345, New Orleans, Louisiana. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.852, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Yu Lu, Jiajun Zhang, and Chengqing Zong. 2019. Exploiting knowledge graph in neural machine translation. In Machine Translation: 14th China Workshop, CWMT 2018, Wuyishan, China, October 25-26, 2018, Proceedings 14, pages 27-38. Springer." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.179 + ], + "angle": 0, + "content": "Diego Moussallem, Axel-Cyrille Ngonga Ngomo, Paul Buitelaar, and Mihael Arcan. 2019. Utilizing knowledge graphs for neural machine translation augmentation. In Proceedings of the 10th International Conference on Knowledge Capture, K-CAP '19, page 139-146, New York, NY, USA. Association for Computing Machinery." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.191, + 0.885, + 0.243 + ], + "angle": 0, + "content": "Roberto Navigli, Michele Bevilacqua, Simone Conia, Dario Montagnini, and Francesco Ceconi. 2021. Ten years of BabelNet: A survey. In *IJCAI*, pages 4559-4567." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.257, + 0.885, + 0.363 + ], + "angle": 0, + "content": "Minh Van Nguyen, Viet Duc Lai, Amir Pouran Ben Veyseh, and Thien Huu Nguyen. 2021. Trankit: A lightweight transformer-based toolkit for multilingual natural language processing. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 80-90, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.376, + 0.885, + 0.43 + ], + "angle": 0, + "content": "Quang-Phuoc Nguyen, Anh-Dung Vo, Joon-Choul Shin, and Cheol-Young Ock. 2018. Effect of word sense disambiguation on neural machine translation: A case study in korean. IEEE Access, 6:38512-38523." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.442, + 0.885, + 0.548 + ], + "angle": 0, + "content": "Riccardo Orlando, Simone Conia, Fabrizio Brignone, Francesco Cecconi, and Roberto Navigli. 2021. AMuSE-WSD: An all-in-one multilingual system for easy Word Sense Disambiguation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 298-307, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.561, + 0.885, + 0.667 + ], + "angle": 0, + "content": "Xiao Pan, Mingxuan Wang, Liwei Wu, and Lei Li. 2021. Contrastive learning for many-to-many multilingual neural machine translation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 244-258, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.68, + 0.885, + 0.746 + ], + "angle": 0, + "content": "Tommaso Pasini, Alessandro Raganato, and Roberto Navigli. 2021. Xl-wsd: An extra-large and cross-lingual evaluation framework for word sense disambiguation. Proceedings of the AAAI Conference on Artificial Intelligence, 35(15):13648-13656." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.758, + 0.885, + 0.8 + ], + "angle": 0, + "content": "Maja Popovic. 2017. chrf++: words helping character n-grams. In Proceedings of the second conference on machine translation, pages 612-618." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.812, + 0.885, + 0.879 + ], + "angle": 0, + "content": "Xiao Pu, Nikolaos Pappas, James Henderson, and Andrei Popescu-Belis. 2018. Integrating weakly supervised word sense disambiguation into neural machine translation. Transactions of the Association for Computational Linguistics, 6:635-649." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.892, + 0.885, + 0.918 + ], + "angle": 0, + "content": "Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2019. The MuCoW test suite at WMT" + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12899" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.133, + 0.086, + 0.49, + 0.153 + ], + "angle": 0, + "content": "2019: Automatically harvested multilingual contrastive word sense disambiguation test sets for machine translation. In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pages 470-480." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.163, + 0.49, + 0.241 + ], + "angle": 0, + "content": "Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2020. An evaluation benchmark for testing the word sense disambiguation capabilities of machine translation systems. In Proceedings of The 12th Language Resources and Evaluation Conference. European Language Resources Association (ELRA)." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.252, + 0.49, + 0.358 + ], + "angle": 0, + "content": "Ricardo Rei, José G. C. de Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022. COMET-22: Unbabel-IST 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.367, + 0.49, + 0.473 + ], + "angle": 0, + "content": "Machel Reid and Mikel Artetxe. 2022. PARADISE: Exploiting parallel data for multilingual sequence-to-sequence pretraining. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 800-810, Seattle, United States. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.483, + 0.489, + 0.549 + ], + "angle": 0, + "content": "Ali Saeed, Rao Muhammad Adeel Nawab, and Mark Stevenson. 2021. Investigating the feasibility of deep learning methods for urdu word sense disambiguation. Transactions on Asian and Low-Resource Language Information Processing, 21(2):1-16." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.56, + 0.489, + 0.599 + ], + "angle": 0, + "content": "Benoit Sagot and Darja Fiser. 2008. Building a free french wordnet from multilingual resources. In OntoLex." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.61, + 0.489, + 0.637 + ], + "angle": 0, + "content": "Student. 1908. The probable error of a mean. Biometrika, 6(1):1-25." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.648, + 0.49, + 0.74 + ], + "angle": 0, + "content": "Gongbo Tang, Rico Senrich, and Joakim Nivre. 2018. An analysis of attention mechanisms: The case of word sense disambiguation in neural machine translation. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 26-35, Brussels, Belgium. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.75, + 0.49, + 0.856 + ], + "angle": 0, + "content": "Gongbo Tang, Rico Senrich, and Joakim Nivre. 2019. Encoders help you disambiguate word senses in neural machine translation. 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 1429-1435, Hong Kong, China. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.866, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, and Angela Fan. 2021. Multilingual translation from denoising pre-training. In Findings of the Association" + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.529, + 0.086, + 0.884, + 0.126 + ], + "angle": 0, + "content": "for Computational Linguistics: ACL-IJCNLP 2021, pages 3450-3466, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.136, + 0.885, + 0.202 + ], + "angle": 0, + "content": "Jörg Tiedemann and Santhosh Thottingal. 2020. Opusmt-building open translation services for the world. In Proceedings of the 22nd Annual Conference of the European Association for Machine Translation. European Association for Machine Translation." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.212, + 0.883, + 0.277 + ], + "angle": 0, + "content": "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." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.287, + 0.884, + 0.352 + ], + "angle": 0, + "content": "Daphne Wang, Mehrnoosh Sadrzadeh, Samson Abramsky, H Víctor, and VH Cervantes. 2021. Analysing ambiguous nouns and verbs with quantum contextuality tools. Journal of Cognitive Science, 22(3):391-420." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.363, + 0.884, + 0.39 + ], + "angle": 0, + "content": "Warren Weaver. 1952. Translation. In Proceedings of the Conference on Mechanical Translation." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.4, + 0.884, + 0.453 + ], + "angle": 0, + "content": "Shufang Xie, Yingce Xia, Lijun Wu, Yiqing Huang, Yang Fan, and Tao Qin. 2022. End-to-end entity-aware neural machine translation. Machine Learning, pages 1-23." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.463, + 0.884, + 0.542 + ], + "angle": 0, + "content": "Deyi Xiong and Min Zhang. 2014. A sense-based translation model for statistical machine translation. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1459-1469, Baltimore, Maryland. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.552, + 0.883, + 0.63 + ], + "angle": 0, + "content": "Zhen Yang, Bojie Hu, Ambyera Han, Shen Huang, and Qi Ju. 2020. CSP:code-switching pre-training for neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2624-2636, Online. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.64, + 0.884, + 0.719 + ], + "angle": 0, + "content": "Yang Zhao, Lu Xiang, Junnan Zhu, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020a. Knowledge graph enhanced neural machine translation via multitask learning on sub-entity granularity. In Proceedings of the 28th International Conference on Computational Linguistics, pages 4495-4505." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.729, + 0.884, + 0.821 + ], + "angle": 0, + "content": "Yang Zhao, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020b. Knowledge graphs enhanced neural machine translation. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 4039-4045. International Joint Conferences on Artificial Intelligence Organization. Main track." + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.821 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.929, + 0.526, + 0.941 + ], + "angle": 0, + "content": "12900" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.116, + 0.082, + 0.506, + 0.309 + ], + "angle": 0, + "content": "
HyperparameterRomanceIndo-Iranian
Batch Size40004000
Learning Rate0.00010.0001
Update Frequency44
OptimizerAdamAdam
w/ eps=5e-07w/ eps=1e-08
Weight Decay0.00010.01
Dropout0.050.01
Label Smoothing0.10.1
Contrastive Lambda1.01.0
Temperature0.10.01
Clip Norm1010
Replacement Ratio0.10.05
" + }, + { + "type": "table_caption", + "bbox": [ + 0.115, + 0.318, + 0.486, + 0.334 + ], + "angle": 0, + "content": "Table 7: Hyperparameters used for training our models." + }, + { + "type": "table", + "bbox": [ + 0.116, + 0.349, + 0.487, + 0.414 + ], + "angle": 0, + "content": "
ModelEnItFrEsParamsRunning Time (for 100K sents)
ESCHER78.7279.1483.9477.52692 M63 mins
ConSeC79.0079.3084.4077.40287 M213 mins
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.424, + 0.487, + 0.468 + ], + "angle": 0, + "content": "Table 8: Results of four different EsCHER models trained on English (En), Italian (It), French (Fr) and Spanish (Es) and ConSeC." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.478, + 0.239, + 0.494 + ], + "angle": 0, + "content": "A Appendix" + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.506, + 0.305, + 0.522 + ], + "angle": 0, + "content": "A.1 Hyperparameters" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.529, + 0.489, + 0.592 + ], + "angle": 0, + "content": "We provide our detailed hyperparameter settings in Table 7. We optimize each hyperparameter independently in separate runs, and use the best settings in our experiments." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.607, + 0.334, + 0.623 + ], + "angle": 0, + "content": "A.2 WSD Systems Details" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.63, + 0.49, + 0.919 + ], + "angle": 0, + "content": "In the original AMuSE-WSD work, a multilingual version of the system was made available; however, EsCHER currently offers only an English model. For this reason, we train three distinct EsCHER models specifically tailored for Italian, Spanish, and French. We adopt the methodology outlined in the original work but adapt it to train the models using the XL-WSD (Pasini et al., 2021) splits for the respective languages and use mDeBERTa (He et al., 2023) as the underlying multilingual transformer architecture. By doing so, we ensure compatibility and improve performance in the targeted linguistic contexts as reported in Barba et al. (2021b) without incurring prohibitive computational costs. As a reference, we report in Table 8 the difference in performance between our EsCHER models and the results reported in Barba et al. (2021b) for the multilingual version of their system, ConSeC." + }, + { + "type": "title", + "bbox": [ + 0.511, + 0.085, + 0.809, + 0.101 + ], + "angle": 0, + "content": "A.3 Verb Disambiguation Examples" + }, + { + "type": "image", + "bbox": [ + 0.516, + 0.12, + 0.556, + 0.135 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.56, + 0.123, + 0.838, + 0.134 + ], + "angle": 0, + "content": "Source: The company turned a good profit after a year." + }, + { + "type": "image", + "bbox": [ + 0.517, + 0.139, + 0.556, + 0.153 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.56, + 0.14, + 0.885, + 0.151 + ], + "angle": 0, + "content": "AA: L'impresa ha trasformato un buon profitto dopo un anno." + }, + { + "type": "image", + "bbox": [ + 0.517, + 0.158, + 0.556, + 0.172 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.56, + 0.158, + 0.852, + 0.169 + ], + "angle": 0, + "content": "WSP-NMT: La société ha fatto un bon profitti dopo un anno." + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.18, + 0.882, + 0.217 + ], + "angle": 0, + "content": "(a) \"trasformato\" means \"transformed\" and is an incorrect sense translation of \"turned\". \"fatto\" means \"made\", as in \"made a good profit\" and is a correct translation in context." + }, + { + "type": "image", + "bbox": [ + 0.516, + 0.225, + 0.558, + 0.241 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.561, + 0.228, + 0.883, + 0.239 + ], + "angle": 0, + "content": "Source: To appropriate money for the increase of the navy." + }, + { + "type": "image", + "bbox": [ + 0.517, + 0.245, + 0.556, + 0.26 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.56, + 0.246, + 0.875, + 0.258 + ], + "angle": 0, + "content": "AA: Per adeguare il denaro per l'augimento della tassa." + }, + { + "type": "image", + "bbox": [ + 0.517, + 0.264, + 0.556, + 0.28 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.561, + 0.266, + 0.886, + 0.277 + ], + "angle": 0, + "content": "WSP-NMT: Per stanziare fondi per l'auento dell'imbarcazione." + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.288, + 0.882, + 0.325 + ], + "angle": 0, + "content": "(b) \"adequate\" is a verb meaning \"adapt\" or \"adjust\" and is an incorrect sense translation of \"appropriate\". \"stanziare\" means \"allocate\", as in \"allocate funds\", and is correct in context." + }, + { + "type": "image", + "bbox": [ + 0.516, + 0.333, + 0.558, + 0.349 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.559, + 0.336, + 0.853, + 0.346 + ], + "angle": 0, + "content": "Source: The player had to backpedal before catching the ball." + }, + { + "type": "image", + "bbox": [ + 0.517, + 0.352, + 0.556, + 0.365 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.56, + 0.353, + 0.885, + 0.364 + ], + "angle": 0, + "content": "AA: Il giocatore aveva dovuto tornare prima di catturare la balla." + }, + { + "type": "image", + "bbox": [ + 0.517, + 0.37, + 0.556, + 0.384 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.56, + 0.37, + 0.874, + 0.381 + ], + "angle": 0, + "content": "WSP-NMT: Il glacatore era tornato indietro prima di prendere la palla." + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.391, + 0.884, + 0.428 + ], + "angle": 0, + "content": "(c) \"aveva dovuto tornare\" translates to \"had to return\" and is an incorrect translation of \"backpedal\". \"tornado indietro\" means to \"move (or run) back\" and contextually correct." + }, + { + "type": "image_caption", + "bbox": [ + 0.509, + 0.433, + 0.883, + 0.462 + ], + "angle": 0, + "content": "Figure 7: Examples of verb disambiguation in DiBiMT Italian hypothesis translations by AA and WSP-NMT." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.478, + 0.884, + 0.801 + ], + "angle": 0, + "content": "We show some examples of improved verb disambiguation of WSP-NMT in Figure 7, using examples from the DiBiMT test set. The AA hypotheses for these sentences contain translations that could have been appropriate in certain contexts but are incorrect here. For example, in Figure 7a, turned could translate into transformato when the context is referring to \"turning into something\". A similar explanation holds for Figure 7b where appropriate could translate into adeguare when talking about \"appropriating style\", \"appropriating language\" or \"appropriating software\", to name a few examples. Figure 7c is very interesting since backpedal does mean tornado indietro (\"move back\") in this context, but \"tornare\" (\"return\") is not an appropriate sense translation. These cases reflect how by carefully modelling for cross-lingual convergence of word senses during pretraining, WSP-NMT can avoid subtle translation errors that may arise when encountering ambiguous words." + }, + { + "type": "page_number", + "bbox": [ + 0.478, + 0.928, + 0.524, + 0.941 + ], + "angle": 0, + "content": "12901" + } + ] +] \ No newline at end of file diff --git a/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_origin.pdf b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f3495d3827714384f1005cf08bfa259ab6378f45 --- /dev/null +++ b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/3d1f2425-d75f-4360-9706-417c5ada7db3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e4c25135b536ecd393bf0320de791daae7267758930e66ee9a2a745a2d9db7c +size 741993 diff --git a/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/full.md b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1d56e442e6fa0ca0042c7ddac0068c16ad71be4d --- /dev/null +++ b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/full.md @@ -0,0 +1,389 @@ +# Code-Switching with Word Senses for Pretraining in Neural Machine Translation + +Vivek Iyer1 Edoardo Barba2 Alexandra Birch1 Jeff Z. Pan1 Roberto Navigli2 + +$^{1}$ School of Informatics, University of Edinburgh + +Sapienza NLP Group, Sapienza University of Rome + +{vivek. iyer, pinzhen.chen, a.birch}@ed.ac.uk + +{barba, navigli}@diag.uniroma1.it + +# Abstract + +Lexical ambiguity is a significant and pervasive challenge in Neural Machine Translation (NMT), with many state-of-the-art (SOTA) NMT systems struggling to handle polysemous words (Campolungo et al., 2022a). The same holds for the NMT pretraining paradigm of de-noising synthetic "code-switched" text (Pan et al., 2021; Iyer et al., 2023), where word senses are ignored in the noising stage – leading to harmful sense biases in the pretraining data that are subsequently inherited by the resulting models. In this work, we introduce Word Sense Pretraining for Neural Machine Translation (WSP-NMT) - an end-to-end approach for pretraining multilingual NMT models leveraging word sense-specific information from Knowledge Bases. Our experiments show significant improvements in overall translation quality. Then, we show the robustness of our approach to scale to various challenging data and resource-scarce scenarios and, finally, report fine-grained accuracy improvements on the DiBiMT disambiguation benchmark. Our studies yield interesting and novel insights into the merits and challenges of integrating word sense information and structured knowledge in multilingual pretraining for NMT. + +# 1 Introduction + +Lexical ambiguity is a long-standing challenge in Machine Translation (Weaver, 1952) due to polysemy being one of the most commonly occurring phenomena in natural language. Indeed, thanks to a plethora of context-dependent ambiguities (e.g. the word run could mean run a marathon, run a mill, run for elections etc.), words can convey very distant meanings, which may be translated with entirely different words in the target language. To deal with this challenge, traditional Statistical Machine Translation approaches tried to incorporate Word Sense Disambiguation (WSD) systems in MT with mostly positive results (Carpuat and Wu, 2007; Xiong and Zhang, 2014). These were followed by + +similar efforts to plug sense information in NMT frameworks (Liu et al., 2018; Pu et al., 2018). But, since the introduction of the Transformer (Vaswani et al., 2017), the task of disambiguation has largely been left to the attention mechanism (Tang et al., 2018, 2019). + +In the last three years, though, many works have challenged the ability of modern-day NMT systems to accurately translate highly polysemous and/or rare word senses (Emelin et al., 2020; Raganato et al., 2020; Campolungo et al., 2022a). For example, Campolungo et al. (2022a) expose major word sense biases in not just bilingual NMT models like OPUS (Tiedemann and Thottingal, 2020), but also commercial systems like DeepL1 and Google Translate2, and massively pretrained multilingual models (Tang et al., 2021; Fan et al., 2021). A likely explanation is that these models capture inherent data biases during pretraining. This particularly holds for the pretraining paradigm of denoising code-switched text3 — most notably, Aligned Augmentation (AA, Pan et al., 2021), where, during the pretraining phase, input sentences are noised by substituting words with their translations from multilingual lexicons, and NMT models are then tasked to reconstruct (or 'de-noise') these sentences. AA and subsequent works (Reid and Artetxe, 2022; Iyer et al., 2023; Jones et al., 2023) show the benefits of code-switched pretraining for high- and low-resource, supervised and unsupervised translation tasks. Despite their success, a major limitation of these substitution mechanisms is that they are unable to handle lexical ambiguity adequately, given their usage of 'sense-agnostic' translation lexicons. In fact, in most of these works, substitutions for polysemes are chosen randomly, regardless of context (Pan et al., 2021; + +![](images/b42ed18606b688e8c68b31c82381117dd8a37415de13fd25b36e770ade2ecb5f.jpg) + +![](images/f5bc1dd4d51b944b56b07c6623dd00236bbe11a6055d9eca827cac207fd85877.jpg) + +![](images/00dbe17620a61dc0dc61499cb92851bd912e5ca91889f228d495b6e9be7a0f11.jpg) + +Source Sentence: + +Baseline Translation (AA): + +He had an edge on the competition. + +Ha avuto un margine alla concorrenza. + +Our Translation (WSP-NMT): + +Aveva unvantaggio sullacoccorrenza. + +Figure 1: Italian translations of a sentence from the DiBiMT disambiguation benchmark (Campolungo et al., 2022a) by: a) our main baseline, Aligned Augmentation (AA, Pan et al., 2021), and b) our approach, WSP-NMT. AA mistranslates the ambiguous word edge as marginine (border, rim). Due to 'sense-pivoted pretraining', WSP-NMT correctly translates it as vantaggio (advantage). + +Reid and Artetxe, 2022; Jones et al., 2023). + +In an effort to introduce knowledge grounding at the word sense level during pretraining and potentially minimise data errors, enhance convergence, and improve performance, we propose the notion of 'sense-pivoted pretraining' - to move code-switched pretraining from the word level to the sense level. Specifically, we propose an approach called Word Sense Pretraining for Neural Machine Translation (WSP-NMT) that first disambiguates word senses in the input sentence, and then code-switches with sense translations for denoising-based pretraining. Figure 1 provides an intuition of how integrating disambiguation in pretraining helps our model handle ambiguous words better, avoiding defaulting to more frequent senses, and reducing errors in translation. + +Indeed, our experiments on using WSP-NMT yield significant gains in multilingual NMT – about $+1.2$ spBLEU and $+0.02$ COMET22 points over comparable AA baselines in high-resourced setups. Among other interesting performance trends, we observe that our margin of improvement increases substantially as we move towards low-resource $(+3$ to $+4$ spBLEU) and medium-resource $(+5$ spBLEU) settings. Lastly, for more fine-grained evaluation, we also compare our models on the DiBiMT disambiguation benchmark (Campolungo et al., 2022a) for Italian and Spanish, and note accuracy improvements of up to $15\%$ in the challenging task of verb disambiguation. + +Our key novel contributions are, thus, as follows: + +1. We show how incorporating WSD in NMT pretraining can outperform the widely used paradigm of lexicon-based code-switching. +2. We demonstrate how reliable structured knowledge can be incorporated into the multilingual pretraining of NMT models, leading to error reduction and improved performance. + +3. We evaluate the robustness of WSP-NMT to scale to various challenging data and resource-constrained scenarios in NMT, and point out its efficacy in low-resource and zero-shot translation tasks. +4. Finally, we evaluate the disambiguation capabilities of our models on the DiBiMT benchmark, and contribute a fine-grained understanding of the scenarios where WSP-NMT helps resolve lexical ambiguity in translation. + +# 2 Related Work + +Multilingual pretraining for NMT The success of multilingual NMT in the latest WMT shared tasks (Akhbardeh et al., 2021; Kocmi et al., 2022) has heightened the research focus on noisy functions used in the denoising-based multilingual pretraining of NMT models. While masking has been successful in scaling to massive models (Tang et al., 2021; Costa-jussa et al., 2022), there has also been a parallel strand of research exploring more optimal noisy functions that grant superior performance at lower data quantities. In particular, code-switched pretraining (Yang et al., 2020; Lin et al., 2020; Pan et al., 2021) has gained popularity since it moves the denoising task from language modelling to machine translation, and induces superior cross-lingual transfer. Notably, Pan et al. (2021) proposed Aligned Augmentation that code-switches text using MUSE lexicons, and trained the mRASP2 model - yielding SOTA results on a wide variety of translation tasks, beating strong baselines pretrained on more data. Subsequent research has tried to extend this: Li et al. (2022) and Reid and Artetxe (2022) combine AA-like lexicon-based code-switching with masking, while Iyer et al. (2023) and Jones et al. (2023) explore optimal code-switching strategies. While effective, none of these works have attempted to move code-switching to the word sense level. Most of them sample random sense translations when encountering polysemes, with these errors further propagating during pretraining. Li et al. (2022) attempt to partially circumvent this issue by choosing the appropriate sense translation based on the reference sentence, but this trick cannot scale to code-switching (abundant) monolingual data or for code-switching in languages other than the target one. Iyer et al. (2023) use pretrained translation and word alignment models to provide empirical gains, but the reliability is low with these black + +box systems since such techniques lack grounding. In order to handle lexical ambiguity in a principled manner, we propose WSP-NMT to provide knowledge grounding at the word sense level while pretraining multilingual NMT models. + +WSD for Machine Translation In the traditional Statistical Machine Translation paradigm, incorporating WSD was shown to improve translation quality (Carpuat and Wu, 2007; Chan et al., 2007; Xiong and Zhang, 2014). With the rise of NMT, various techniques were proposed to integrate word sense information. Nguyen et al. (2018) simply provided annotations of Korean word senses to an NMT model, while other works then computed sense embeddings using tricks like Neural Bag-of-Words (Choi et al., 2017), bidirectional LSTMs (Liu et al., 2018) and adaptive clustering (Pu et al., 2018) – using these to augment word embeddings in the training of sequence-to-sequence models (Bahdanau et al., 2015). With the introduction of the Transformer (Vaswani et al., 2017), Tang et al. (2019) hypothesized that Transformer encoders are quite strong at disambiguation, and used higher-layer encoder representations to report sense classification accuracies of up to $97\%$ on their test sets. + +However, with the creation of challenging disambiguation benchmarks more recently (Raganato et al., 2019, 2020; Campolungo et al., 2022a), the purported capabilities of NMT models have been called into question once again. Indeed, when top-performing open-source and commercial systems were evaluated on the DiBiMT benchmark (Campolungo et al., 2022a), it was found that even the best models (i.e. DeepL and Google Translate) yielded accuracies $< 50\%$ when translating ambiguous words, biasing heavily towards more frequent senses, and vastly underperformed compared to the (then) SOTA WSD system, EsCHER (Barba et al., 2021a) – indicating significant room for improvement. While recent works have tried to address this by fine-tuning models with sense information (Campolungo et al., 2022b), we explore if we can avoid an extra fine-tuning stage and incorporate WSD information while pretraining itself, so as to yield enhanced off-the-shelf performance. + +# Structured Knowledge for Machine Translation + +Though limited, there have been some scattered efforts to use Knowledge Graphs (KGs) in MT. In bilingual NMT, Zhao et al. (2020b) generate synthetic parallel sentences by inducing relations + +between a pair of KGs, while Moussallem et al. (2019) augment Named Entities with KG Embeddings, comparing RNNs and Transformers. Lu et al. (2019) and Ahmadnia et al. (2020) enforce monolingual and bilingual constraints with KG relations and observe small gains for bilingual English-Chinese and English-Spanish pairs respectively. It remains unclear how these constraint-based methods would scale to the current paradigm of pretraining multilingual NMT models. Relatedly, Hu et al. (2022) proposed multilingual pretraining leveraging Wikidata, but their sole focus was on Named Entity (NE) translation. They showed that their approach performs comparably overall, while improving NE translation accuracy. Our work is complementary to theirs and shows how a KG could be used to pretrain a multilingual NMT model with generic concept translations, improving overall NMT as well as disambiguation performance. + +# 3 Approach + +# 3.1 Definitions + +Code-switching is defined as the phenomenon of shifting between two or more languages in a sentence. In this work, it refers to the 'noising' function used for synthesising pretraining data. + +Word Sense Disambiguation is the task of linking a word $w$ in a context $C$ to its most suitable sense $s$ in a predefined inventory $I$ and can thus be represented as a mapping function $f(w, C, I) = s$ . In this work, we use BabelNet (Navigli et al., 2021) as our reference sense inventory. + +# 3.2 Aligned Augmentation + +Aligned Augmentation (AA, Pan et al., 2021) is a denoising-based pretraining technique that uses MUSE lexicons $^4$ $M$ for code-switching the source sentence. These lexicons provide non-contextual, one-to-one word translations. If a word has multiple possible translations (e.g. polysemes), AA (and subsequent works) randomly choose one regardless of context – making this approach 'sense-agnostic'. Moreover, in order to code-switch in multiple languages, Pan et al. (2021) also chain bilingual lexicons together, by pivoting through English, and this causes a further propagation of 'sense-agnostic' errors. Nevertheless, AA achieved SOTA results in massively multilingual NMT, so we use it as our primary baseline and aim to verify + +![](images/054a1c0910d33aa6a81e0b61a55d2d8ae0c41547344857c1359db0f99024d3cb.jpg) +Figure 2: Pipelines contrasting the approach used by the AA and WSP-NMT pretraining algorithms. + +the impact of 'sense-pivoted' pretraining by comparing against similarly trained WSP-NMT models. We also note that while some extensions to AA have been proposed recently, by combining it with masking or other code-switching strategies (see Section 2), these improvements likely also hold for code-switching with sense translations – making these techniques complementary to our work. + +# 3.3 Word Sense Pretraining for NMT + +We depict the WSP-NMT pipeline, and compare it with AA, in Figure 2. It involves three stages: + +# 3.3.1 Word Sense Disambiguation (WSD) + +To determine the most appropriate translation for a word $w_{i}$ in a sentence, we begin by identifying its intended meaning in context using WSD systems. To measure the impact of disambiguation quality on the final translation performance, we adopt two WSD systems, namely, EsCHER, a SOTA open-inventory WSD model, and AMuSE-WSD (Orlando et al., 2021), a faster but still competitive, off-the-shelf classification system. We note that, since EsCHER was originally only released for English, we also trained models for other languages on the multilingual datasets in XL-WSD (Pasini et al., 2021). We provide further training details in Appendix A.2. As a result of this stage, each content word in the input sentence is linked to a specific synset5 in BabelNet. + +# 3.3.2 Extracting Translations from BabelNet + +Given the synset associated with a disambiguated word, we retrieve its possible translations in the languages of experimentation by using BabelNet. Indeed, in BabelNet, each synset in each language comes with a set of lexicalizations that can express the concept represented by that synset. At the moment of writing, BabelNet contains concept lexical- + +izations for 520 languages with varying degrees of coverage. Thus, at the end of this stage, all content words will have a list of possible translations in the target languages. + +# 3.3.3 Generation of Morphological Inflections + +Finally, given that concept lexicalizations in Babel-Net are present as lemmas, we include an additional postprocessing stage to convert target lemmas $l_{i}$ of sense $s$ into their contextually appropriate morphological variant $m_{i}$ . We do this by leveraging MUSE lexicons $M$ . We first preprocess entries in $M$ using a lemmatizer $L$ like so: given word translation pairs $(x_{j}, y_{j})$ in $M$ , we create a hashmap $H$ where $H(x_{j}, L(y_{j})) = y_{j}$ . Given $H$ , during code-switching, if the source word $w_{i}$ is not a lemma we do a lookup for the key $H(w_{i}, l_{i})$ and return the corresponding value as the contextually appropriate morphological inflection $m_{i}$ for sense $s$ - which is then used for code-switching. If the key is unavailable in $H$ , we code-switch $w_{i}$ with $l_{i}$ itself. + +This step allows us to generate translations that take into account both word senses and morphology – thus combining the best of both worlds between 'sense-agnostic' lexicons and canonicalized6 Knowledge Graphs storing sense information. While this postprocessing does improve performance, it is optional and we show in Section 4.2 that baselines without this stage also yield decent improvements, while minimizing the overhead. We use Trankit (Nguyen et al., 2021) for lemmatization, which was shown to achieve SOTA results on this task on treebanks from 90 languages7. + +# 3.4 Training + +For fair comparison, we follow the experimental setup proposed by Pan et al. (2021) for training our + +
MonolingualParallel
En7.5MFr7.5MIt7.5MEn-Es1.8MEn-It1.7M
Es7.5MPt7.5MRo7.5MEn-Fr1.8MEn-Ro365K
(a) Size of Romance language corpora (sentence count)
MonolingualParallel
En20MHi6MFa6MEn-Hi1.9MEn-Fa1M
+ +Table 1: Monolingual and Parallel Data statistics. + +AA and WSP-NMT models. We code-switch parallel and monolingual sentences (with translations generated using the respective approaches) and shuffle them to create our training dataset $D$ . We input the code-switched sentences to the encoder, while the target sentences are the reference sentences for parallel data and the original 'denoised' sentences for monolingual data. We pretend a special language token indicating language ID to each input and target sentence. Finally, we train the model using a loss function $\mathcal{L}$ that jointly optimizes Contrastive Loss $\mathcal{L}_{\mathrm{CON}}$ and Cross Entropy Loss $\mathcal{L}_{CE}$ . In principle, Contrastive Loss minimizes the semantic representation gap between positive examples (code-switched and reference sentences) and maximizes the distance between negative examples (approximated to other random samples in the minibatch). With this in mind, we define $\mathcal{L}$ as: + +$$ +\mathcal {L} = \mathcal {L} _ {C E} + | s | * \mathcal {L} _ {C O N} +$$ + +where: $\mathcal{L}_{CE} = -\sum_{(x,y)\in D}\log P_{\theta}(y|x),$ and + +$$ +\mathcal {L} _ {\mathrm {C O N}} = - \sum_ {(x, y) \in D} \log \frac {e ^ {\operatorname {s i m} ^ {+} (\mathcal {E} (x) , \mathcal {E} (y)) / \tau}}{\sum_ {(a , b) \in B} e ^ {\operatorname {s i m} ^ {-} (\mathcal {E} (x) , \mathcal {E} (b)) / \tau}} +$$ + +Here, $\mathcal{E}$ signifies the average pooled encoder representations for the input sentence, while 'sim' computes positive and negative semantic similarities between the contrastive examples, denoted by $\mathrm{sim}^+$ and $\mathrm{sim}^-$ respectively. Temperature $\tau$ controls the difficulty of distinguishing between positive and negative samples, and is set to 0.1. $B$ denotes the mini-batch in dataset $D$ that $(x,y)$ belongs to. Lastly, $|s|$ is the average token count of sentence $s$ that balances token-level cross entropy loss and sentence-level contrastive loss. + +(b) Size of Indo-Iranian language corpora (sentence count) + +
Language PairEn-EsEn-FrEn-ItEn-Ro
Test SetWMT'13WMT'14WMT'09WMT'16
Language PairEn-PtEn-HiEn-Fa
Test SetFLORES 200WMT'19FLORES 200
+ +Table 2: Test sets used per language in this work. + +
ModelEnItFrEsAvgRunning Time (for 330K sents)
AMuSE-WSD77.1376.0380.3572.7776.5778 mins
ESCHER78.7279.1483.9477.5279.83180 mins
+ +Table 3: F1-scores of ESCHER and AMuSE-WSD on XL-WSD (Pasini et al., 2021) for English (En), Italian (It), French (Fr), Spanish (Es), and the Average (Avg) of all scores. All results are statistically significant ( $p < 0.01$ as per McNemar's test (Dietterich, 1998)). For comparing efficiencies, we also report the running time for disambiguating 330K sentences on 1 RTX 3090. + +# 4 Experiments + +# 4.1 Experimental Setup + +Table 1 shows the statistics for our training data. In this work, we primarily experiment with the Romance languages and pretrain multilingual NMT models on the monolingual and parallel data in Table 1a, following the training setup described previously. We use Portuguese later for our zero-shot experiments, so no parallel data is provided. We also explore NMT for Indo-Iranian languages in Section 4.3.3, and use the data given in Table 1b to train those models. We note here that since our objective in this work is to explore the utility of KGs for sense-pivoted pretraining, our data setups follow a similar scale as other works on KG-enhanced NMT (Zhao et al., 2020a; Xie et al., 2022; Hu et al., 2022), and diverges from the massively multilingual paradigm of Pan et al. (2021). + +For validation, we sample the last 1000 sentences from the parallel corpus per pair. As shown in Table 2, for testing, we use either the latest WMT test sets per pair, if available, or FLORES 200 sets (Costa-jussà et al., 2022) otherwise. We evaluate NMT results using spBLEU $^{8}$ (Costa-jussà et al., 2022), $\mathrm{chrF}++^{9}$ (Popović, 2017) and COMET22 (Rei et al., 2022) metrics, and compute statistical significance using Student's T-test (Student, 1908). + +We use the Transformer (Vaswani et al., 2017) architecture with 6 encoder and 6 decoder layers + +8nrefs:1|case:mixed|eff:no|tok:flores101|smooth: exp|version:2.3.1 +$9$ nrefs:1|case:mixed|eff:yes|nc:6|nw:2|space: no|version:2.3.1 + +![](images/2f58cc0eb6a8bff9dc56e2f5ccab1e2d44c515d7336696a6c3531aa8c2caf53d.jpg) +Figure 4: WSP-NMT with Morphological Inflection. Code-switched words are highlighted. a' ->a->b->b' denotes the inflection generation process explained in Section 3.3.3 where a' and b' are source and target words, while a and b are the corresponding lemmas. a->b is extracted from BabelNet, while the hashmap lookup yields b' given (a', b). + +![](images/1b7a717969038a0323dce20b704896c22b934c5406950e4e206bfed9fcc5adbf.jpg) +Figure 3: Improvements in the average performance of WSP over AA for each language pair. + +for training our models. For tokenization, we use sentencepiece (Kudo and Richardson, 2018). We train the sentencepiece model on concatenated and shuffled data from Table 1, using a unigram language model with a vocabulary size of 32,000 and character coverage of 1.0. We use replacement ratios of 0.1 and 0.05 for our Romance and Indo-Iranian models respectively. We provide further hyperparameter settings in Appendix A.1. + +Lastly, in Table 3, we evaluate and report key performance statistics for our two WSD systems, AMuSE-WSD and ESCHER. We shall use these to better interpret our NMT results and comment on the observed quality/speed tradeoff in Section 4.2. + +# 4.2 Main Results + +We show overall results for the Romance language experiments, averaged across 5 runs, in Table 4. We also report language pair-specific improvements in Figure 3. We make the following key observations: + +1. WSP-NMT consistently outperforms AA. We observe that our best WSP-NMT model, i.e. the one using EsCHER for disambiguation and MUSE lexicons for generating morphological predictions, consistently beats AA models by significant margins across all metrics – including a +1.2 boost in spBLEU for En-X and +0.7 for X-En. Except for Fr-En where WSP-NMT + +1. And when Federer levelled the match, one-time British No 1 Petchey temia (fear->fear->temer->temia) the worst. +2. The world was mirando (looking->look->mirar->mirando) at him. +3. GM deber (owes->owe->debe->deber) $23.4bn, excluding $3.9bn in realised Treasury perdidas (losses->loss->perdida->perdidas), according to a Treasury statement dated Friday. + +marginally underperforms $^{10}$ , these gains also extend to individual language pairs (Figure 3). This suggests that minimising errors in pretraining data with 'sense-pivoted pretraining' can enhance overall convergence and yield stronger models. + +2. Superior disambiguation helps, but cheaper WSD systems work well too. We observe in Figure 3 that EsCHER consistently induces greater gains than AMuSE-WSD across all pairs. This makes sense given the superior disambiguation quality of the former (Table 3). However, we note that AMuSE-WSD, which is about $2.3\mathrm{x}$ faster, also outperforms AA and can be used as an effective, but cheaper alternative, suitable for disambiguating large corpora under budget constraints. +3. Postprocessing KG lemmas to predict the relevant morphological inflection is beneficial. We observe generating morphological inflections by intersecting with MUSE lexicons (Section 3.3.3) yields major boosts across the board. We understand this qualitatively by showing examples of such inflections from our dataset, in Figure 4. We observe that this approach helps in ensuring linguistic agreement (such as for tense and number) which, in turn, enhances the quality of code-switching and, thus, pretraining. Our technique can thus be used as an effective way to bridge the gap between KG lemmas and morphologically inflected words in corpora – a gap which has proved to be one of the major roadblocks in leveraging structured knowledge in NMT so far. + +4. Higher gains are observed for the lower resourced En-Ro pair. WSP-NMT obtains a $+2$ + +
BaselineEn-XX-En
spBLEUchrF++COMET22spBLEUchrF++COMET22
AA24.385 ± 0.63947.890 ± 0.6470.714 ± 0.00924.725 ± 0.57749.660 ± 0.4530.716 ± 0.006
WSP-NMT (AMuSE-WSD)24.910 ± 0.33648.525 ± 0.3040.723 ± 0.00624.935 ± 0.31349.880 ± 0.2430.724 ± 0.005
WSP-NMT (ESCHER)25.310 ± 0.90948.765 ± 0.7170.728 ± 0.01325.095 ± 0.90349.905 ± 0.7050.725 ± 0.010
WSP-NMT (ESCHER) + morph. inflection25.595 ± 0.27949.115 ± 0.2350.731 ± 0.00325.435 ± 0.17950.130 ± 0.2290.729 ± 0.002
+ +spBLEU improvement over AA for the En-Ro pair – which is the lowest resourced in our setup, with 365K parallel sentences (Table 1). This suggests our approach could be even more useful for medium and low data setups – something we empirically verify in Section 4.3.1. + +5. More significant boosts are obtained for COMET22 than string-based spBLEU or $\mathrm{chrF}++$ metrics. While our best model improves across all the metrics, we observe this in Table 4 for our weaker models. This is probably because the errors made by incorrect word sense translations can sometimes be too subtle to be adequately penalized by weaker string-based metrics. On the other hand, neural metrics like COMET22 are more robust and have been trained to detect word-level as well as sentence-level errors. It has shown high correlations with human evaluation, ranking second in the WMT'22 Metrics shared task (Freitag et al., 2022). We, thus, conclude that statistically significant gains in COMET scores, when averaged across 5 seeds, help in increasing the strength and reliability of our results. + +# 4.3 How well does WSP-NMT extend to more challenging MT scenarios? + +Here, we try to evaluate the robustness of our approach to scale to various challenging translation scenarios: a) data scarcity, b) zero-shot translation and c) translation of under-represented languages. + +# 4.3.1 Scaling to data-scarce settings + +In Figure 5, we explore how performance varies with the scale of parallel data, while keeping monolingual data constant - since the latter is usually more abundant. We observe an improvement margin of $+3$ to $+4$ spBLEU in the low-resource setting (50-100K sentences) that widens to $+5$ spBLEU in the medium-resource setup (250-500K sentences). The gap then narrows as we move towards high + +![](images/8158e53c47bc5e5cbc3b9bc896b67a1bad6b3984dbf22a58d3bf2e32e79931d5.jpg) +Figure 5: Average En-X and X-En spBLEU scores for AA and WSP-NMT models, with variation in parallel data (in terms of maximum sentence count per language) + +Table 4: Overall results of the Romance language experiments with respect to spBLEU, $\mathrm{chrF}++$ and COMET22 metrics. Mean and standard deviation after 5 runs, initialised with different random seeds (0-4) has been reported. Statistically significant improvements $(p\leq 0.05)$ over our primary baseline, AA, are highlighted in bold. + +
BaselineEn-PtPt-En
AA2.92 ± 0.646.88 ± 1.56
WSP-NMT (best)3.60 ± 0.198.52 ± 0.53
+ +Table 5: Zero-Shot Translation scores (spBLEU) for the English-Portuguese (En-Pt) pair. We use the best WSP-NMT model from Table 4 and compare with AA. Statistical significance $(p = 0.04)$ is highlighted in bold. + +resource scenarios (750K-1.5M sentences), suggesting AA models become more robust to noise when high quantities of parallel data are provided. Based on these findings, we discuss potential applications of our method in Section 4.5. + +# 4.3.2 Scaling to Zero-Shot Translation + +Continuing our exploration into data scarcity, we now evaluate the performance of WSP-NMT with no parallel data (i.e. zero-shot) in Table 5. We use En-Pt as a simulated zero-shot pair, following the setup in Table 1a. We compare our best WSP-NMT model from Table 4 with AA, averaged across 5 runs as before. We observe statistically significant gains of about $+0.7$ and $+1.64$ spBLEU for En-Pt and Pt-En pairs respectively. We conclude that WSP-NMT is strong in a wide range of scenarios + +
En-XX-En
AA22.79 ± 1.06320.49 ± 0.893
WSP-MT (AMuSE-WSD)22 ± 0.70419.58 ± 0.559
WSP-MT (AMuSE-WSD) + morph. inflection21.83 ± 0.72719.53 ± 0.72
WSP-MT (AMuSE-WSD) + synonyms + hypernyms22.71 ± 0.9320.23 ± 0.906
+ +Table 6: spBLEU scores for Indo-Iranian languages (Hindi and Farsi) to English, averaged across 5 seeds + +and can improve performance at varying degrees of resourcedness, including in zero-shot tasks. + +# 4.3.3 Scaling to under-represented languages + +Lastly, we explore how WSP-NMT performs for languages under-represented in external resources such as WSD systems, lexicons, and KGs. The issues faced here include low coverage, poor quality, and unreliable WSD. To study the impact of these factors (in isolation from data scarcity), we train a multilingual NMT model between English and 2 Indo-Iranian languages (Hindi and Farsi) using the data in Table 1b. We choose these languages since they are under-represented in BabelNet $^{11}$ , are supported by AMuSE-WSD $^{12}$ and have MUSE lexicons available for training AA baselines. + +In Table 6, we find that integrating morphological inflection does not yield gains, likely because - due to poor coverage - we find matches in MUSE lexicons far fewer times (only $18.3\%$ compared to $74\%$ for the Romance data). BabelNet also suffers from poor coverage ( $45\%$ of disambiguated senses do not have translations in either Hindi or Farsi). To address this, we explore if translations of synonyms and hypernyms of a KG concept could be used as substitutes. In practice, we find that, while this does improve the vanilla WSP-NMT model, it is unable to beat AA. This is likely rooted in the fact that low-resource disambiguation is an unaddressed challenge in NLP, primarily because of a lack of resources - be it training datasets, reliable WSD models, or even evaluation benchmarks. Despite these hurdles, we note that, since WSP-NMT is effective in data-scarce settings, creating a small amount of sense-annotated data in these languages might suffice to yield potential gains. + +# 4.4 DiBiMT benchmark results + +Finally, we test our models on the DiBiMT disambiguation benchmark (Campolungo et al., 2022a) in Figure 6. The DiBiMT test set comprises sentences with an ambiguous word, paired with "good" and "bad" translations of this word. Then, given an NMT model's hypotheses, it computes accuracy, i.e. the ratio of sentences with "good" translations compared to the sum of "good" and "bad" ones. Hypotheses that fall in neither of these categories are discarded as 'MISS' sentences. We compare AA and our best WSP-NMT model on Italian and Spanish, the two Romance languages supported by DiBiMT, and report overall accuracies. In addition, we also include fine-grained scores on disambiguation of specific POS tags like nouns and verbs to better understand the capabilities of our models. + +We observe a small increase in overall accuracy. Looking more closely, we find that while WSP-NMT's accuracy for nouns is comparable to AA, significant improvements are observed for verb disambiguation - especially for Italian, where average accuracy increases from $15.34\%$ to $17.65\%$ (15% increase). Prior research has shown that verbs are much harder to disambiguate than nouns since they are highly polysemous (Barba et al., 2021a,b; Campolungo et al., 2022a) and require much larger contexts to disambiguate (Wang et al., 2021). Thus, while sense-agnostic AA models are able to disambiguate nouns, verb disambiguation proves more challenging, which is where sense-pivoted pretraining with WSP-NMT helps. We provide example translations in Appendix A.3 to drive intuition of this further. Finally, we note that WSP-NMT also reduces the average $\mathrm{MISS\%}$ - from $39.3\%$ to $37.2\%$ for Spanish, and $41.2\%$ to $40.2\%$ for Italian. These trends are encouraging, since errors such as word omission, word copying and hallucination are the most common issues and constitute about $50\%$ of all 'MISS' cases (Campolungo et al., 2022a). + +# 4.5 Applications + +We conclude our results section by noting that while WSP-NMT is not ideally suited for either very low-resource (Section 4.3.3) or very resource-rich (Section 4.3.1) settings, it does yield significant performance gains for low and medium-data settings of well-resourced (e.g. European) languages, as shown in Figure 5. We hypothesize that this can, thus, be quite useful for domain-specific translation in these languages, such as in news, + +![](images/22fa89c9c999cc492a08b3d10c323a4d8fecbe00187a6c3a739925e92a46c2d3.jpg) +Figure 6: Accuracy of our AA and WSP-NMT models, in Spanish and Italian, on the DiBiMT benchmark. + +healthcare, e-commerce, etc. In such information-centric domains, minimising disambiguation errors and improving translation quality with reliable, general-purpose KGs would likely bring value. + +# 5 Conclusion + +We propose WSP-NMT, a 'sense-pivoted' algorithm leveraging word sense information from KBs for pretraining multilingual NMT models. We observe significant performance gains over the baseline, AA, and note various factors of interest including the impact of WSD quality and morphology. We then study how WSP-NMT scales to various data and resource-constrained scenarios and, finally, note significant accuracy gains in verb disambiguation on the DiBiMT benchmark. Our results help emphasize the utility and strength of WSP-NMT. + +# Limitations + +While our approach attempts to minimize the risk of low-quality translations creeping into the pretraining data by using human-curated structured knowledge, it is possible certain biased translations enter our data nonetheless. For instance, during code-switching, there is a possibility of gender bias in the sense translations chosen, as certain gendered translations of a concept that is ungendered in the source language are provided in the same word sense in BabelNet. Though we use random sampling to mitigate such risks, the propagation of potential biases depends heavily on the fairness and diversity of translations available in BabelNet. While such issues are similar to those that would arise in the current paradigm of dictionary-based code-switching, a principled approach to resolve gender based on sentence-level context and to choose the appropriate translation from the BabelNet synset + +would be a useful direction of future research. The BabelNet KG also has the potential for improving in this regard, allowing for the addition of gender categories to specific concepts. + +We also note that WSP-NMT may not be as effective in the translation of under-represented languages. As we note in Section 4.3.3, this is partly rooted in the unavailability of disambiguation resources and high-quality Knowledge Bases for such languages. However this is quickly changing: i) WSD for low-resource languages has been a very emerging area of research recently (Saeed et al., 2021; Bhatia et al., 2022; Boruah, 2022), and, at the same time, ii) BabelNet itself is constantly being updated and scaled up. For example, due to the creation of newer low-resource wordnets, BabelNet expanded from 500 supported languages (v5.1 from Jul 2022) to 520 (v5.2 from Nov 2022) in just 4 months. As the quality of these curated resources improves with community contributions and advances in low-resource NLP/WSD, we anticipate that methods such as WSP-NMT, which we show to be robust in low-data settings (<1M parallel sents), could be increasingly useful. + +# Acknowledgements + +This work was funded by UK Research and Innovation (UKRI) under the UK government's Horizon Europe funding guarantee [grant number 10039436]. The authors also gratefully acknowledge the support of the PNRR MUR project PE0000013-FAIR. + +The computations described in this research were performed using the Baskerville Tier 2 HPC service (https://www.baskerville.ac.uk/). Baskerville was funded by the EPSRC and UKRI through the World Class Labs scheme (EP/T022221/1) and the Digital Research Infrastructure programme (EP/W032244/1) and is operated by Advanced Research Computing at the University of Birmingham. + +# References + +Benyamin Ahmadnia, Bonnie J Dorr, and Parisa Kordjamshidi. 2020. Knowledge graphs effectiveness in neural machine translation improvement. Computer Science, 21. +Farhad Akhbardeh, Arkady Arkhangorodsky, Magdalena Biesialska, Ondrej Bojar, Rajen Chatterjee, Vishrav Chaudhary, Marta R. Costa-jussa, + +Cristina Espana-Bonet, Angela Fan, Christian Federmann, Markus Freitag, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Leonie Harter, Kenneth Heafield, Christopher Homan, Matthias Huck, Kwabena Amponsah-Kaakyire, Jungo Kasai, Daniel Khashabi, Kevin Knight, Tom Kocmi, Philipp Koehn, Nicholas Lourie, Christof Monz, Makoto Morishita, Masaaki Nagata, Ajay Nagesh, Toshiaki Nakazawa, Matteo Negri, Santanu Pal, Allahsera Auguste Tapo, Marco Turchi, Valentin Vydrin, and Marcos Zampieri. 2021. Findings of the 2021 conference on machine translation (WMT21). In Proceedings of the Sixth Conference on Machine Translation, pages 1-88, Online. Association for Computational Linguistics. +Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings. +Edoardo Barba, Tommaso Pasini, and Roberto Navigli. 2021a. ESC: Redesigning WSD with extractive sense comprehension. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4661-4672, Online. Association for Computational Linguistics. +Edoardo Barba, Luigi Procopio, and Roberto Navigli. 2021b. ConSeC: Word sense disambiguation as continuous sense comprehension. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 1492-1503, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. +Surbhi Bhatia, Ankit Kumar, and Mohammed Mutilah Khan. 2022. Role of genetic algorithm in optimization of Hindi word sense disambiguation. IEEE Access, 10:75693-75707. +Puberun Boruah. 2022. A novel approach to word sense disambiguation for a low-resource morphologically rich language. In 2022 IEEE 6th Conference on Information and Communication Technology (CICT), pages 1-6. IEEE. +Niccolò Campolungo, Federico Martelli, Francesco Saina, and Roberto Navigli. 2022a. DiBiMT: A novel benchmark for measuring Word Sense Disambiguation biases in Machine Translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4331-4352, Dublin, Ireland. Association for Computational Linguistics. +Niccolò Campolungo, Tommaso Pasini, Denis Emelin, and Roberto Navigli. 2022b. Reducing disambiguation biases in NMT by leveraging explicit word sense information. In Proceedings of the 2022 Conference of the North American Chapter of the Association for + +Computational Linguistics: Human Language Technologies, pages 4824-4838, Seattle, United States. Association for Computational Linguistics. +Marine Carpuat and Dekai Wu. 2007. Improving statistical machine translation using word sense disambiguation. In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), pages 61-72, Prague, Czech Republic. Association for Computational Linguistics. +Yee Seng Chan, Hwee Tou Ng, and David Chiang. 2007. Word sense disambiguation improves statistical machine translation. In Proceedings of the 45th annual meeting of the association of computational linguistics, pages 33-40. +Heeyoul Choi, Kyunghyun Cho, and Yoshua Bengio. 2017. Context-dependent word representation for neural machine translation. Computer Speech Language, 45:149-160. +Marta R Costa-jussa, James Cross, Onur Celebi, Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, et al. 2022. No language left behind: Scaling human-centered machine translation. arXiv preprint arXiv:2207.04672. +Thomas G Dietterich. 1998. Approximate statistical tests for comparing supervised classification learning algorithms. *Neural computation*, 10(7):1895-1923. +Denis Emelin, Ivan Titov, and Rico Sennrich. 2020. Detecting word sense disambiguation biases in machine translation for model-agnostic adversarial attacks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7635–7653, Online. Association for Computational Linguistics. +Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, et al. 2021. Beyond english-centric multilingual machine translation. The Journal of Machine Learning Research, 22(1):4839-4886. +Markus Freitag, Ricardo Rei, Nitika Mathur, Chi-kiu Lo, Craig Stewart, Eleftherios Avramidis, Tom Kocmi, George Foster, Alon Lavie, and André F. T. Martins. 2022. Results of WMT22 metrics shared task: Stop using BLEU – neural metrics are better and more robust. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 46–68, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics. +Pengcheng He, Jianfeng Gao, and Weizhu Chen. 2023. Debertav3: Improving deberta using electra-style pretraining with gradient-disentangled embedding sharing. + +Junjie Hu, Hiroaki Hayashi, Kyunghyun Cho, and Graham Neubig. 2022. DEEP: DEnoising entity pretraining for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1753-1766, Dublin, Ireland. Association for Computational Linguistics. +Vivek Iyer, Arturo Oncevay, and Alexandra Birch. 2023. Exploring enhanced code-switched noising for pretraining in neural machine translation. In *Findings of the Association for Computational Linguistics: EACL* 2023, pages 954-968. +Alex Jones, Isaac Caswell, Ishank Saxena, and Orhan First. 2023. Bilex rx: Lexical data augmentation for massively multilingual machine translation. arXiv preprint arXiv:2303.15265. +Tom Kocmi, Rachel Bawden, Ondrej Bojar, Anton Dvorkovich, Christian Federmann, Mark Fishel, Thamme Gowda, Yvette Graham, Roman Grundkiewicz, Barry Haddow, et al. 2022. Findings of the 2022 conference on machine translation (wmt22). In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 1-45. +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, Brussels, Belgium. Association for Computational Linguistics. +Pengfei Li, Liangyou Li, Meng Zhang, Minghao Wu, and Qun Liu. 2022. Universal conditional masked language pre-training for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6379-6391, Dublin, Ireland. Association for Computational Linguistics. +Zehui Lin, Xiao Pan, Mingxuan Wang, Xipeng Qiu, Jiangtao Feng, Hao Zhou, and Lei Li. 2020. Pretraining multilingual neural machine translation by leveraging alignment information. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2649-2663, Online. Association for Computational Linguistics. +Frederick Liu, Han Lu, and Graham Neubig. 2018. Handling homographs in neural machine translation. 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 1336-1345, New Orleans, Louisiana. Association for Computational Linguistics. +Yu Lu, Jiajun Zhang, and Chengqing Zong. 2019. Exploiting knowledge graph in neural machine translation. In Machine Translation: 14th China Workshop, CWMT 2018, Wuyishan, China, October 25-26, 2018, Proceedings 14, pages 27-38. Springer. + +Diego Moussallem, Axel-Cyrille Ngonga Ngomo, Paul Buitelaar, and Mihael Arcan. 2019. Utilizing knowledge graphs for neural machine translation augmentation. In Proceedings of the 10th International Conference on Knowledge Capture, K-CAP '19, page 139-146, New York, NY, USA. Association for Computing Machinery. +Roberto Navigli, Michele Bevilacqua, Simone Conia, Dario Montagnini, and Francesco Ceconi. 2021. Ten years of BabelNet: A survey. In *IJCAI*, pages 4559-4567. +Minh Van Nguyen, Viet Duc Lai, Amir Pouran Ben Veyseh, and Thien Huu Nguyen. 2021. Trankit: A lightweight transformer-based toolkit for multilingual natural language processing. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 80-90, Online. Association for Computational Linguistics. +Quang-Phuoc Nguyen, Anh-Dung Vo, Joon-Choul Shin, and Cheol-Young Ock. 2018. Effect of word sense disambiguation on neural machine translation: A case study in korean. IEEE Access, 6:38512-38523. +Riccardo Orlando, Simone Conia, Fabrizio Brignone, Francesco Cecconi, and Roberto Navigli. 2021. AMuSE-WSD: An all-in-one multilingual system for easy Word Sense Disambiguation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 298-307, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. +Xiao Pan, Mingxuan Wang, Liwei Wu, and Lei Li. 2021. Contrastive learning for many-to-many multilingual neural machine translation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 244-258, Online. Association for Computational Linguistics. +Tommaso Pasini, Alessandro Raganato, and Roberto Navigli. 2021. Xl-wsd: An extra-large and cross-lingual evaluation framework for word sense disambiguation. Proceedings of the AAAI Conference on Artificial Intelligence, 35(15):13648-13656. +Maja Popovic. 2017. chrf++: words helping character n-grams. In Proceedings of the second conference on machine translation, pages 612-618. +Xiao Pu, Nikolaos Pappas, James Henderson, and Andrei Popescu-Belis. 2018. Integrating weakly supervised word sense disambiguation into neural machine translation. Transactions of the Association for Computational Linguistics, 6:635-649. +Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2019. The MuCoW test suite at WMT + +2019: Automatically harvested multilingual contrastive word sense disambiguation test sets for machine translation. In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pages 470-480. +Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2020. An evaluation benchmark for testing the word sense disambiguation capabilities of machine translation systems. In Proceedings of The 12th Language Resources and Evaluation Conference. European Language Resources Association (ELRA). +Ricardo Rei, José G. C. de Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022. COMET-22: Unbabel-IST 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics. +Machel Reid and Mikel Artetxe. 2022. PARADISE: Exploiting parallel data for multilingual sequence-to-sequence pretraining. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 800-810, Seattle, United States. Association for Computational Linguistics. +Ali Saeed, Rao Muhammad Adeel Nawab, and Mark Stevenson. 2021. Investigating the feasibility of deep learning methods for urdu word sense disambiguation. Transactions on Asian and Low-Resource Language Information Processing, 21(2):1-16. +Benoit Sagot and Darja Fiser. 2008. Building a free french wordnet from multilingual resources. In OntoLex. +Student. 1908. The probable error of a mean. Biometrika, 6(1):1-25. +Gongbo Tang, Rico Senrich, and Joakim Nivre. 2018. An analysis of attention mechanisms: The case of word sense disambiguation in neural machine translation. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 26-35, Brussels, Belgium. Association for Computational Linguistics. +Gongbo Tang, Rico Senrich, and Joakim Nivre. 2019. Encoders help you disambiguate word senses in neural machine translation. 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 1429-1435, Hong Kong, China. Association for Computational Linguistics. +Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, and Angela Fan. 2021. Multilingual translation from denoising pre-training. In Findings of the Association + +for Computational Linguistics: ACL-IJCNLP 2021, pages 3450-3466, Online. Association for Computational Linguistics. +Jörg Tiedemann and Santhosh Thottingal. 2020. Opusmt-building open translation services for the world. In Proceedings of the 22nd Annual Conference of the European Association for Machine Translation. European Association for Machine Translation. +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. +Daphne Wang, Mehrnoosh Sadrzadeh, Samson Abramsky, H Víctor, and VH Cervantes. 2021. Analysing ambiguous nouns and verbs with quantum contextuality tools. Journal of Cognitive Science, 22(3):391-420. +Warren Weaver. 1952. Translation. In Proceedings of the Conference on Mechanical Translation. +Shufang Xie, Yingce Xia, Lijun Wu, Yiqing Huang, Yang Fan, and Tao Qin. 2022. End-to-end entity-aware neural machine translation. Machine Learning, pages 1-23. +Deyi Xiong and Min Zhang. 2014. A sense-based translation model for statistical machine translation. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1459-1469, Baltimore, Maryland. Association for Computational Linguistics. +Zhen Yang, Bojie Hu, Ambyera Han, Shen Huang, and Qi Ju. 2020. CSP:code-switching pre-training for neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2624-2636, Online. Association for Computational Linguistics. +Yang Zhao, Lu Xiang, Junnan Zhu, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020a. Knowledge graph enhanced neural machine translation via multitask learning on sub-entity granularity. In Proceedings of the 28th International Conference on Computational Linguistics, pages 4495-4505. +Yang Zhao, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020b. Knowledge graphs enhanced neural machine translation. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 4039-4045. International Joint Conferences on Artificial Intelligence Organization. Main track. + +
HyperparameterRomanceIndo-Iranian
Batch Size40004000
Learning Rate0.00010.0001
Update Frequency44
OptimizerAdamAdam
w/ eps=5e-07w/ eps=1e-08
Weight Decay0.00010.01
Dropout0.050.01
Label Smoothing0.10.1
Contrastive Lambda1.01.0
Temperature0.10.01
Clip Norm1010
Replacement Ratio0.10.05
+ +Table 7: Hyperparameters used for training our models. + +
ModelEnItFrEsParamsRunning Time (for 100K sents)
ESCHER78.7279.1483.9477.52692 M63 mins
ConSeC79.0079.3084.4077.40287 M213 mins
+ +Table 8: Results of four different EsCHER models trained on English (En), Italian (It), French (Fr) and Spanish (Es) and ConSeC. + +# A Appendix + +# A.1 Hyperparameters + +We provide our detailed hyperparameter settings in Table 7. We optimize each hyperparameter independently in separate runs, and use the best settings in our experiments. + +# A.2 WSD Systems Details + +In the original AMuSE-WSD work, a multilingual version of the system was made available; however, EsCHER currently offers only an English model. For this reason, we train three distinct EsCHER models specifically tailored for Italian, Spanish, and French. We adopt the methodology outlined in the original work but adapt it to train the models using the XL-WSD (Pasini et al., 2021) splits for the respective languages and use mDeBERTa (He et al., 2023) as the underlying multilingual transformer architecture. By doing so, we ensure compatibility and improve performance in the targeted linguistic contexts as reported in Barba et al. (2021b) without incurring prohibitive computational costs. As a reference, we report in Table 8 the difference in performance between our EsCHER models and the results reported in Barba et al. (2021b) for the multilingual version of their system, ConSeC. + +# A.3 Verb Disambiguation Examples + +![](images/9a5ac047c023630dbed70d8d8decf27ca2cb72d983d11e1e38c7ff33933c5052.jpg) + +Source: The company turned a good profit after a year. + +![](images/4e3cc23e105be67d106965a947aef2acf5de7ebf7b2465a684744523f46486be.jpg) + +AA: L'impresa ha trasformato un buon profitto dopo un anno. + +![](images/6c7c4d54c434a853f057263aa7b1680129de3fdcf43434fe2c3c71798d99e3a9.jpg) + +WSP-NMT: La société ha fatto un bon profitti dopo un anno. + +(a) "trasformato" means "transformed" and is an incorrect sense translation of "turned". "fatto" means "made", as in "made a good profit" and is a correct translation in context. + +![](images/e4cbf7128272323c8b5478c0aa25a809315aee109c01f5c0d8819b537899f795.jpg) + +Source: To appropriate money for the increase of the navy. + +![](images/e347c7e1bb7eb4a728964114195a8ca28ab98bfaf3ac69db36bb9cc38be9fa1a.jpg) + +AA: Per adeguare il denaro per l'augimento della tassa. + +![](images/891006b6464f8c37d8775b333c1f356fe8550163858d78a0b153a094c14b1a56.jpg) + +WSP-NMT: Per stanziare fondi per l'auento dell'imbarcazione. + +(b) "adequate" is a verb meaning "adapt" or "adjust" and is an incorrect sense translation of "appropriate". "stanziare" means "allocate", as in "allocate funds", and is correct in context. + +![](images/c0481bae738555daa72d9eac5359ba6d253d3a730e199c3f1a658803868ff8cb.jpg) +Figure 7: Examples of verb disambiguation in DiBiMT Italian hypothesis translations by AA and WSP-NMT. + +Source: The player had to backpedal before catching the ball. + +![](images/d66f9393fa7e560b2de433b209ee0ec75083884d58b06353a4ab08bba295c902.jpg) + +AA: Il giocatore aveva dovuto tornare prima di catturare la balla. + +![](images/afdb87b28a5889620426f25be3f98fbfb8a7d83316af957ff6eaa6b416e12828.jpg) + +WSP-NMT: Il glacatore era tornato indietro prima di prendere la palla. + +(c) "aveva dovuto tornare" translates to "had to return" and is an incorrect translation of "backpedal". "tornado indietro" means to "move (or run) back" and contextually correct. + +We show some examples of improved verb disambiguation of WSP-NMT in Figure 7, using examples from the DiBiMT test set. The AA hypotheses for these sentences contain translations that could have been appropriate in certain contexts but are incorrect here. For example, in Figure 7a, turned could translate into transformato when the context is referring to "turning into something". A similar explanation holds for Figure 7b where appropriate could translate into adeguare when talking about "appropriating style", "appropriating language" or "appropriating software", to name a few examples. Figure 7c is very interesting since backpedal does mean tornado indietro ("move back") in this context, but "tornare" ("return") is not an appropriate sense translation. These cases reflect how by carefully modelling for cross-lingual convergence of word senses during pretraining, WSP-NMT can avoid subtle translation errors that may arise when encountering ambiguous words. \ No newline at end of file diff --git a/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/images.zip b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9d6ffe6fef063b7366c8ae8e72c9ab28c10854d9 --- /dev/null +++ b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31d77d92fd4126e7dd2b2c0dd14d0d0409871105aeb61a4a49d6ff3ffc5c33cc +size 382490 diff --git a/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/layout.json b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3a75f3aed80b6d1d6dc33cbe47bd8daa767b4fdb --- /dev/null +++ b/2023/Code-Switching with Word Senses for Pretraining in Neural Machine Translation/layout.json @@ -0,0 +1,10444 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 83, + 74, + 509, + 105 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 83, + 74, + 509, + 105 + ], + "spans": [ + { + "bbox": [ + 83, + 74, + 509, + 105 + ], + "type": "text", + "content": "Code-Switching with Word Senses for Pretraining in Neural Machine Translation" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 80, + 119, + 518, + 133 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 119, + 518, + 133 + ], + "spans": [ + { + "bbox": [ + 80, + 119, + 518, + 133 + ], + "type": "text", + "content": "Vivek Iyer1 Edoardo Barba2 Alexandra Birch1 Jeff Z. Pan1 Roberto Navigli2" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 182, + 134, + 414, + 148 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 182, + 134, + 414, + 148 + ], + "spans": [ + { + "bbox": [ + 182, + 134, + 414, + 148 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 182, + 134, + 414, + 148 + ], + "type": "text", + "content": "School of Informatics, University of Edinburgh" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 170, + 148, + 426, + 162 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 170, + 148, + 426, + 162 + ], + "spans": [ + { + "bbox": [ + 170, + 148, + 426, + 162 + ], + "type": "text", + "content": "Sapienza NLP Group, Sapienza University of Rome" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 166, + 163, + 430, + 176 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 163, + 430, + 176 + ], + "spans": [ + { + "bbox": [ + 166, + 163, + 430, + 176 + ], + "type": "text", + "content": "{vivek. iyer, pinzhen.chen, a.birch}@ed.ac.uk" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 198, + 177, + 397, + 190 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 198, + 177, + 397, + 190 + ], + "spans": [ + { + "bbox": [ + 198, + 177, + 397, + 190 + ], + "type": "text", + "content": "{barba, navigli}@diag.uniroma1.it" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "spans": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "text", + "content": "Abstract" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 86, + 232, + 274, + 555 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 232, + 274, + 555 + ], + "spans": [ + { + "bbox": [ + 86, + 232, + 274, + 555 + ], + "type": "text", + "content": "Lexical ambiguity is a significant and pervasive challenge in Neural Machine Translation (NMT), with many state-of-the-art (SOTA) NMT systems struggling to handle polysemous words (Campolungo et al., 2022a). The same holds for the NMT pretraining paradigm of de-noising synthetic \"code-switched\" text (Pan et al., 2021; Iyer et al., 2023), where word senses are ignored in the noising stage – leading to harmful sense biases in the pretraining data that are subsequently inherited by the resulting models. In this work, we introduce Word Sense Pretraining for Neural Machine Translation (WSP-NMT) - an end-to-end approach for pretraining multilingual NMT models leveraging word sense-specific information from Knowledge Bases. Our experiments show significant improvements in overall translation quality. Then, we show the robustness of our approach to scale to various challenging data and resource-scarce scenarios and, finally, report fine-grained accuracy improvements on the DiBiMT disambiguation benchmark. Our studies yield interesting and novel insights into the merits and challenges of integrating word sense information and structured knowledge in multilingual pretraining for NMT." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 68, + 562, + 154, + 576 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 562, + 154, + 576 + ], + "spans": [ + { + "bbox": [ + 68, + 562, + 154, + 576 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 583, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 583, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 583, + 291, + 773 + ], + "type": "text", + "content": "Lexical ambiguity is a long-standing challenge in Machine Translation (Weaver, 1952) due to polysemy being one of the most commonly occurring phenomena in natural language. Indeed, thanks to a plethora of context-dependent ambiguities (e.g. the word run could mean run a marathon, run a mill, run for elections etc.), words can convey very distant meanings, which may be translated with entirely different words in the target language. To deal with this challenge, traditional Statistical Machine Translation approaches tried to incorporate Word Sense Disambiguation (WSD) systems in MT with mostly positive results (Carpuat and Wu, 2007; Xiong and Zhang, 2014). These were followed by" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 212, + 526, + 293 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 212, + 526, + 293 + ], + "spans": [ + { + "bbox": [ + 302, + 212, + 526, + 293 + ], + "type": "text", + "content": "similar efforts to plug sense information in NMT frameworks (Liu et al., 2018; Pu et al., 2018). But, since the introduction of the Transformer (Vaswani et al., 2017), the task of disambiguation has largely been left to the attention mechanism (Tang et al., 2018, 2019)." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 296, + 526, + 715 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 296, + 526, + 715 + ], + "spans": [ + { + "bbox": [ + 302, + 296, + 526, + 715 + ], + "type": "text", + "content": "In the last three years, though, many works have challenged the ability of modern-day NMT systems to accurately translate highly polysemous and/or rare word senses (Emelin et al., 2020; Raganato et al., 2020; Campolungo et al., 2022a). For example, Campolungo et al. (2022a) expose major word sense biases in not just bilingual NMT models like OPUS (Tiedemann and Thottingal, 2020), but also commercial systems like DeepL1 and Google Translate2, and massively pretrained multilingual models (Tang et al., 2021; Fan et al., 2021). A likely explanation is that these models capture inherent data biases during pretraining. This particularly holds for the pretraining paradigm of denoising code-switched text3 — most notably, Aligned Augmentation (AA, Pan et al., 2021), where, during the pretraining phase, input sentences are noised by substituting words with their translations from multilingual lexicons, and NMT models are then tasked to reconstruct (or 'de-noise') these sentences. AA and subsequent works (Reid and Artetxe, 2022; Iyer et al., 2023; Jones et al., 2023) show the benefits of code-switched pretraining for high- and low-resource, supervised and unsupervised translation tasks. Despite their success, a major limitation of these substitution mechanisms is that they are unable to handle lexical ambiguity adequately, given their usage of 'sense-agnostic' translation lexicons. In fact, in most of these works, substitutions for polysemes are chosen randomly, regardless of context (Pan et al., 2021;" + } + ] + } + ], + "index": 11 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 302, + 729, + 465, + 740 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 729, + 465, + 740 + ], + "spans": [ + { + "bbox": [ + 302, + 729, + 465, + 740 + ], + "type": "text", + "content": "4https://github.com/facebookresearch/MUSE" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "type": "text", + "content": "12891" + } + ] + } + ], + "index": 13 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 71, + 69, + 524, + 200 + ], + "blocks": [ + { + "bbox": [ + 71, + 69, + 524, + 200 + ], + "lines": [ + { + "bbox": [ + 71, + 69, + 524, + 200 + ], + "spans": [ + { + "bbox": [ + 71, + 69, + 524, + 200 + ], + "type": "image", + "image_path": "054a1c0910d33aa6a81e0b61a55d2d8ae0c41547344857c1359db0f99024d3cb.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 94, + 207, + 498, + 222 + ], + "lines": [ + { + "bbox": [ + 94, + 207, + 498, + 222 + ], + "spans": [ + { + "bbox": [ + 94, + 207, + 498, + 222 + ], + "type": "text", + "content": "Figure 2: Pipelines contrasting the approach used by the AA and WSP-NMT pretraining algorithms." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 234, + 291, + 343 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 234, + 291, + 343 + ], + "spans": [ + { + "bbox": [ + 67, + 234, + 291, + 343 + ], + "type": "text", + "content": "the impact of 'sense-pivoted' pretraining by comparing against similarly trained WSP-NMT models. We also note that while some extensions to AA have been proposed recently, by combining it with masking or other code-switching strategies (see Section 2), these improvements likely also hold for code-switching with sense translations – making these techniques complementary to our work." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 351, + 252, + 364 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 351, + 252, + 364 + ], + "spans": [ + { + "bbox": [ + 67, + 351, + 252, + 364 + ], + "type": "text", + "content": "3.3 Word Sense Pretraining for NMT" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 369, + 290, + 396 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 369, + 290, + 396 + ], + "spans": [ + { + "bbox": [ + 67, + 369, + 290, + 396 + ], + "type": "text", + "content": "We depict the WSP-NMT pipeline, and compare it with AA, in Figure 2. It involves three stages:" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 403, + 271, + 417 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 403, + 271, + 417 + ], + "spans": [ + { + "bbox": [ + 67, + 403, + 271, + 417 + ], + "type": "text", + "content": "3.3.1 Word Sense Disambiguation (WSD)" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 419, + 291, + 635 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 419, + 291, + 635 + ], + "spans": [ + { + "bbox": [ + 67, + 419, + 291, + 635 + ], + "type": "text", + "content": "To determine the most appropriate translation for a word " + }, + { + "bbox": [ + 67, + 419, + 291, + 635 + ], + "type": "inline_equation", + "content": "w_{i}" + }, + { + "bbox": [ + 67, + 419, + 291, + 635 + ], + "type": "text", + "content": " in a sentence, we begin by identifying its intended meaning in context using WSD systems. To measure the impact of disambiguation quality on the final translation performance, we adopt two WSD systems, namely, EsCHER, a SOTA open-inventory WSD model, and AMuSE-WSD (Orlando et al., 2021), a faster but still competitive, off-the-shelf classification system. We note that, since EsCHER was originally only released for English, we also trained models for other languages on the multilingual datasets in XL-WSD (Pasini et al., 2021). We provide further training details in Appendix A.2. As a result of this stage, each content word in the input sentence is linked to a specific synset5 in BabelNet." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 643, + 286, + 655 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 643, + 286, + 655 + ], + "spans": [ + { + "bbox": [ + 67, + 643, + 286, + 655 + ], + "type": "text", + "content": "3.3.2 Extracting Translations from BabelNet" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 659, + 291, + 754 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 659, + 291, + 754 + ], + "spans": [ + { + "bbox": [ + 67, + 659, + 291, + 754 + ], + "type": "text", + "content": "Given the synset associated with a disambiguated word, we retrieve its possible translations in the languages of experimentation by using BabelNet. Indeed, in BabelNet, each synset in each language comes with a set of lexicalizations that can express the concept represented by that synset. At the moment of writing, BabelNet contains concept lexical-" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 234, + 526, + 288 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 234, + 526, + 288 + ], + "spans": [ + { + "bbox": [ + 302, + 234, + 526, + 288 + ], + "type": "text", + "content": "izations for 520 languages with varying degrees of coverage. Thus, at the end of this stage, all content words will have a list of possible translations in the target languages." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 296, + 525, + 309 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 296, + 525, + 309 + ], + "spans": [ + { + "bbox": [ + 302, + 296, + 525, + 309 + ], + "type": "text", + "content": "3.3.3 Generation of Morphological Inflections" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "spans": [ + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": "Finally, given that concept lexicalizations in Babel-Net are present as lemmas, we include an additional postprocessing stage to convert target lemmas " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "l_{i}" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " of sense " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "s" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " into their contextually appropriate morphological variant " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "m_{i}" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": ". We do this by leveraging MUSE lexicons " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "M" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": ". We first preprocess entries in " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "M" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " using a lemmatizer " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "L" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " like so: given word translation pairs " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "(x_{j}, y_{j})" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " in " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "M" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": ", we create a hashmap " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "H" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " where " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "H(x_{j}, L(y_{j})) = y_{j}" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": ". Given " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "H" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": ", during code-switching, if the source word " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "w_{i}" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " is not a lemma we do a lookup for the key " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "H(w_{i}, l_{i})" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " and return the corresponding value as the contextually appropriate morphological inflection " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "m_{i}" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " for sense " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "s" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " - which is then used for code-switching. If the key is unavailable in " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "H" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": ", we code-switch " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "w_{i}" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " with " + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "inline_equation", + "content": "l_{i}" + }, + { + "bbox": [ + 301, + 312, + 526, + 514 + ], + "type": "text", + "content": " itself." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 516, + 525, + 678 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 516, + 525, + 678 + ], + "spans": [ + { + "bbox": [ + 302, + 516, + 525, + 678 + ], + "type": "text", + "content": "This step allows us to generate translations that take into account both word senses and morphology – thus combining the best of both worlds between 'sense-agnostic' lexicons and canonicalized6 Knowledge Graphs storing sense information. While this postprocessing does improve performance, it is optional and we show in Section 4.2 that baselines without this stage also yield decent improvements, while minimizing the overhead. We use Trankit (Nguyen et al., 2021) for lemmatization, which was shown to achieve SOTA results on this task on treebanks from 90 languages7." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 687, + 373, + 700 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 687, + 373, + 700 + ], + "spans": [ + { + "bbox": [ + 302, + 687, + 373, + 700 + ], + "type": "text", + "content": "3.4 Training" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 706, + 524, + 733 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 706, + 524, + 733 + ], + "spans": [ + { + "bbox": [ + 302, + 706, + 524, + 733 + ], + "type": "text", + "content": "For fair comparison, we follow the experimental setup proposed by Pan et al. (2021) for training our" + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 302, + 740, + 513, + 751 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 740, + 513, + 751 + ], + "spans": [ + { + "bbox": [ + 302, + 740, + 513, + 751 + ], + "type": "inline_equation", + "content": "^{6}" + }, + { + "bbox": [ + 302, + 740, + 513, + 751 + ], + "type": "text", + "content": "i.e. KGs representing concepts as canonicalized lemmas." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 751, + 493, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 751, + 493, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 751, + 493, + 772 + ], + "type": "text", + "content": "7https://trankit.readthedocs.io/en/latest/ performance.htm1" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 67, + 760, + 287, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 760, + 287, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 760, + 287, + 772 + ], + "type": "inline_equation", + "content": "{}^{5}" + }, + { + "bbox": [ + 67, + 760, + 287, + 772 + ], + "type": "text", + "content": " A synset is a group of semantically equivalent word senses." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12892" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 71, + 68, + 297, + 146 + ], + "blocks": [ + { + "bbox": [ + 71, + 68, + 297, + 146 + ], + "lines": [ + { + "bbox": [ + 71, + 68, + 297, + 146 + ], + "spans": [ + { + "bbox": [ + 71, + 68, + 297, + 146 + ], + "type": "table", + "html": "
MonolingualParallel
En7.5MFr7.5MIt7.5MEn-Es1.8MEn-It1.7M
Es7.5MPt7.5MRo7.5MEn-Fr1.8MEn-Ro365K
(a) Size of Romance language corpora (sentence count)
MonolingualParallel
En20MHi6MFa6MEn-Hi1.9MEn-Fa1M
", + "image_path": "4ea1c5665b159a85ddac6e679cd676ed817af2df2df86ee5ff4cdbb2e409f6bc.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 71, + 166, + 286, + 179 + ], + "lines": [ + { + "bbox": [ + 71, + 166, + 286, + 179 + ], + "spans": [ + { + "bbox": [ + 71, + 166, + 286, + 179 + ], + "type": "text", + "content": "Table 1: Monolingual and Parallel Data statistics." + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "spans": [ + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "text", + "content": "AA and WSP-NMT models. We code-switch parallel and monolingual sentences (with translations generated using the respective approaches) and shuffle them to create our training dataset " + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "inline_equation", + "content": "D" + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "text", + "content": ". We input the code-switched sentences to the encoder, while the target sentences are the reference sentences for parallel data and the original 'denoised' sentences for monolingual data. We pretend a special language token indicating language ID to each input and target sentence. Finally, we train the model using a loss function " + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "inline_equation", + "content": "\\mathcal{L}" + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "text", + "content": " that jointly optimizes Contrastive Loss " + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{\\mathrm{CON}}" + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "text", + "content": " and Cross Entropy Loss " + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{CE}" + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "text", + "content": ". In principle, Contrastive Loss minimizes the semantic representation gap between positive examples (code-switched and reference sentences) and maximizes the distance between negative examples (approximated to other random samples in the minibatch). With this in mind, we define " + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "inline_equation", + "content": "\\mathcal{L}" + }, + { + "bbox": [ + 67, + 206, + 291, + 450 + ], + "type": "text", + "content": " as:" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 123, + 469, + 233, + 483 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 123, + 469, + 233, + 483 + ], + "spans": [ + { + "bbox": [ + 123, + 469, + 233, + 483 + ], + "type": "interline_equation", + "content": "\\mathcal {L} = \\mathcal {L} _ {C E} + | s | * \\mathcal {L} _ {C O N}", + "image_path": "c7428984dcbe01a88ea435708c2953703ee6417747a9270628ac817b95655c59.jpg" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 85, + 506, + 273, + 542 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 85, + 506, + 273, + 542 + ], + "spans": [ + { + "bbox": [ + 85, + 506, + 273, + 542 + ], + "type": "text", + "content": "where: " + }, + { + "bbox": [ + 85, + 506, + 273, + 542 + ], + "type": "inline_equation", + "content": "\\mathcal{L}_{CE} = -\\sum_{(x,y)\\in D}\\log P_{\\theta}(y|x)," + }, + { + "bbox": [ + 85, + 506, + 273, + 542 + ], + "type": "text", + "content": " and" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 565, + 289, + 602 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 565, + 289, + 602 + ], + "spans": [ + { + "bbox": [ + 69, + 565, + 289, + 602 + ], + "type": "interline_equation", + "content": "\\mathcal {L} _ {\\mathrm {C O N}} = - \\sum_ {(x, y) \\in D} \\log \\frac {e ^ {\\operatorname {s i m} ^ {+} (\\mathcal {E} (x) , \\mathcal {E} (y)) / \\tau}}{\\sum_ {(a , b) \\in B} e ^ {\\operatorname {s i m} ^ {-} (\\mathcal {E} (x) , \\mathcal {E} (b)) / \\tau}}", + "image_path": "602f9b02420a10c1b956248f65ad05112007f526aa93913e44f48b3156f65f5f.jpg" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": "Here, " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathcal{E}" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " signifies the average pooled encoder representations for the input sentence, while 'sim' computes positive and negative semantic similarities between the contrastive examples, denoted by " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{sim}^+" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\mathrm{sim}^-" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " respectively. Temperature " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "\\tau" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " controls the difficulty of distinguishing between positive and negative samples, and is set to 0.1. " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "B" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " denotes the mini-batch in dataset " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "D" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " that " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "(x,y)" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " belongs to. Lastly, " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "|s|" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " is the average token count of sentence " + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "inline_equation", + "content": "s" + }, + { + "bbox": [ + 67, + 624, + 291, + 772 + ], + "type": "text", + "content": " that balances token-level cross entropy loss and sentence-level contrastive loss." + } + ] + } + ], + "index": 7 + }, + { + "type": "table", + "bbox": [ + 303, + 68, + 526, + 134 + ], + "blocks": [ + { + "bbox": [ + 73, + 150, + 290, + 162 + ], + "lines": [ + { + "bbox": [ + 73, + 150, + 290, + 162 + ], + "spans": [ + { + "bbox": [ + 73, + 150, + 290, + 162 + ], + "type": "text", + "content": "(b) Size of Indo-Iranian language corpora (sentence count)" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 303, + 68, + 526, + 134 + ], + "lines": [ + { + "bbox": [ + 303, + 68, + 526, + 134 + ], + "spans": [ + { + "bbox": [ + 303, + 68, + 526, + 134 + ], + "type": "table", + "html": "
Language PairEn-EsEn-FrEn-ItEn-Ro
Test SetWMT'13WMT'14WMT'09WMT'16
Language PairEn-PtEn-HiEn-Fa
Test SetFLORES 200WMT'19FLORES 200
", + "image_path": "126c244732edab919d17979aa056b9fe8762ec6cb1b34426dfbaeb3ffb1fac31.jpg" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "table_body" + } + ], + "index": 8 + }, + { + "type": "table", + "bbox": [ + 304, + 154, + 526, + 207 + ], + "blocks": [ + { + "bbox": [ + 314, + 142, + 512, + 153 + ], + "lines": [ + { + "bbox": [ + 314, + 142, + 512, + 153 + ], + "spans": [ + { + "bbox": [ + 314, + 142, + 512, + 153 + ], + "type": "text", + "content": "Table 2: Test sets used per language in this work." + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 304, + 154, + 526, + 207 + ], + "lines": [ + { + "bbox": [ + 304, + 154, + 526, + 207 + ], + "spans": [ + { + "bbox": [ + 304, + 154, + 526, + 207 + ], + "type": "table", + "html": "
ModelEnItFrEsAvgRunning Time (for 330K sents)
AMuSE-WSD77.1376.0380.3572.7776.5778 mins
ESCHER78.7279.1483.9477.5279.83180 mins
", + "image_path": "6810a1bc693011144abfb373be5a217e6e9e6f4de9cccdd27964f724185ae733.jpg" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "table_body" + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 215, + 525, + 299 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 215, + 525, + 299 + ], + "spans": [ + { + "bbox": [ + 302, + 215, + 525, + 299 + ], + "type": "text", + "content": "Table 3: F1-scores of ESCHER and AMuSE-WSD on XL-WSD (Pasini et al., 2021) for English (En), Italian (It), French (Fr), Spanish (Es), and the Average (Avg) of all scores. All results are statistically significant (" + }, + { + "bbox": [ + 302, + 215, + 525, + 299 + ], + "type": "inline_equation", + "content": "p < 0.01" + }, + { + "bbox": [ + 302, + 215, + 525, + 299 + ], + "type": "text", + "content": " as per McNemar's test (Dietterich, 1998)). For comparing efficiencies, we also report the running time for disambiguating 330K sentences on 1 RTX 3090." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 319, + 390, + 333 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 319, + 390, + 333 + ], + "spans": [ + { + "bbox": [ + 302, + 319, + 390, + 333 + ], + "type": "text", + "content": "4 Experiments" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 341, + 425, + 354 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 341, + 425, + 354 + ], + "spans": [ + { + "bbox": [ + 302, + 341, + 425, + 354 + ], + "type": "text", + "content": "4.1 Experimental Setup" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 301, + 358, + 526, + 574 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 358, + 526, + 574 + ], + "spans": [ + { + "bbox": [ + 301, + 358, + 526, + 574 + ], + "type": "text", + "content": "Table 1 shows the statistics for our training data. In this work, we primarily experiment with the Romance languages and pretrain multilingual NMT models on the monolingual and parallel data in Table 1a, following the training setup described previously. We use Portuguese later for our zero-shot experiments, so no parallel data is provided. We also explore NMT for Indo-Iranian languages in Section 4.3.3, and use the data given in Table 1b to train those models. We note here that since our objective in this work is to explore the utility of KGs for sense-pivoted pretraining, our data setups follow a similar scale as other works on KG-enhanced NMT (Zhao et al., 2020a; Xie et al., 2022; Hu et al., 2022), and diverges from the massively multilingual paradigm of Pan et al. (2021)." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 302, + 575, + 525, + 696 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 575, + 525, + 696 + ], + "spans": [ + { + "bbox": [ + 302, + 575, + 525, + 696 + ], + "type": "text", + "content": "For validation, we sample the last 1000 sentences from the parallel corpus per pair. As shown in Table 2, for testing, we use either the latest WMT test sets per pair, if available, or FLORES 200 sets (Costa-jussà et al., 2022) otherwise. We evaluate NMT results using spBLEU" + }, + { + "bbox": [ + 302, + 575, + 525, + 696 + ], + "type": "inline_equation", + "content": "^{8}" + }, + { + "bbox": [ + 302, + 575, + 525, + 696 + ], + "type": "text", + "content": " (Costa-jussà et al., 2022), " + }, + { + "bbox": [ + 302, + 575, + 525, + 696 + ], + "type": "inline_equation", + "content": "\\mathrm{chrF}++^{9}" + }, + { + "bbox": [ + 302, + 575, + 525, + 696 + ], + "type": "text", + "content": " (Popović, 2017) and COMET22 (Rei et al., 2022) metrics, and compute statistical significance using Student's T-test (Student, 1908)." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 697, + 525, + 724 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 697, + 525, + 724 + ], + "spans": [ + { + "bbox": [ + 302, + 697, + 525, + 724 + ], + "type": "text", + "content": "We use the Transformer (Vaswani et al., 2017) architecture with 6 encoder and 6 decoder layers" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 729, + 520, + 772 + ], + "type": "list", + "angle": 0, + "index": 19, + "blocks": [ + { + "bbox": [ + 302, + 729, + 520, + 751 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 729, + 520, + 751 + ], + "spans": [ + { + "bbox": [ + 302, + 729, + 520, + 751 + ], + "type": "text", + "content": "8nrefs:1|case:mixed|eff:no|tok:flores101|smooth: exp|version:2.3.1" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 303, + 751, + 502, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 751, + 502, + 772 + ], + "spans": [ + { + "bbox": [ + 303, + 751, + 502, + 772 + ], + "type": "inline_equation", + "content": "9" + }, + { + "bbox": [ + 303, + 751, + 502, + 772 + ], + "type": "text", + "content": "nrefs:1|case:mixed|eff:yes|nc:6|nw:2|space: no|version:2.3.1" + } + ] + } + ], + "index": 18 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12893" + } + ] + } + ], + "index": 20 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 76, + 71, + 281, + 206 + ], + "blocks": [ + { + "bbox": [ + 76, + 71, + 281, + 206 + ], + "lines": [ + { + "bbox": [ + 76, + 71, + 281, + 206 + ], + "spans": [ + { + "bbox": [ + 76, + 71, + 281, + 206 + ], + "type": "image", + "image_path": "2f58cc0eb6a8bff9dc56e2f5ccab1e2d44c515d7336696a6c3531aa8c2caf53d.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 162, + 526, + 247 + ], + "lines": [ + { + "bbox": [ + 302, + 162, + 526, + 247 + ], + "spans": [ + { + "bbox": [ + 302, + 162, + 526, + 247 + ], + "type": "text", + "content": "Figure 4: WSP-NMT with Morphological Inflection. Code-switched words are highlighted. a' ->a->b->b' denotes the inflection generation process explained in Section 3.3.3 where a' and b' are source and target words, while a and b are the corresponding lemmas. a->b is extracted from BabelNet, while the hashmap lookup yields b' given (a', b)." + } + ] + } + ], + "index": 12, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "type": "image", + "bbox": [ + 73, + 208, + 279, + 348 + ], + "blocks": [ + { + "bbox": [ + 73, + 208, + 279, + 348 + ], + "lines": [ + { + "bbox": [ + 73, + 208, + 279, + 348 + ], + "spans": [ + { + "bbox": [ + 73, + 208, + 279, + 348 + ], + "type": "image", + "image_path": "1b7a717969038a0323dce20b704896c22b934c5406950e4e206bfed9fcc5adbf.jpg" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 350, + 291, + 375 + ], + "lines": [ + { + "bbox": [ + 67, + 350, + 291, + 375 + ], + "spans": [ + { + "bbox": [ + 67, + 350, + 291, + 375 + ], + "type": "text", + "content": "Figure 3: Improvements in the average performance of WSP over AA for each language pair." + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_caption" + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 388, + 291, + 509 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 388, + 291, + 509 + ], + "spans": [ + { + "bbox": [ + 67, + 388, + 291, + 509 + ], + "type": "text", + "content": "for training our models. For tokenization, we use sentencepiece (Kudo and Richardson, 2018). We train the sentencepiece model on concatenated and shuffled data from Table 1, using a unigram language model with a vocabulary size of 32,000 and character coverage of 1.0. We use replacement ratios of 0.1 and 0.05 for our Romance and Indo-Iranian models respectively. We provide further hyperparameter settings in Appendix A.1." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 510, + 291, + 577 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 510, + 291, + 577 + ], + "spans": [ + { + "bbox": [ + 67, + 510, + 291, + 577 + ], + "type": "text", + "content": "Lastly, in Table 3, we evaluate and report key performance statistics for our two WSD systems, AMuSE-WSD and ESCHER. We shall use these to better interpret our NMT results and comment on the observed quality/speed tradeoff in Section 4.2." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 586, + 158, + 598 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 586, + 158, + 598 + ], + "spans": [ + { + "bbox": [ + 67, + 586, + 158, + 598 + ], + "type": "text", + "content": "4.2 Main Results" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 603, + 291, + 659 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 603, + 291, + 659 + ], + "spans": [ + { + "bbox": [ + 67, + 603, + 291, + 659 + ], + "type": "text", + "content": "We show overall results for the Romance language experiments, averaged across 5 runs, in Table 4. We also report language pair-specific improvements in Figure 3. We make the following key observations:" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 64, + 665, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 64, + 665, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 64, + 665, + 291, + 772 + ], + "type": "text", + "content": "1. WSP-NMT consistently outperforms AA. We observe that our best WSP-NMT model, i.e. the one using EsCHER for disambiguation and MUSE lexicons for generating morphological predictions, consistently beats AA models by significant margins across all metrics – including a +1.2 boost in spBLEU for En-X and +0.7 for X-En. Except for Fr-En where WSP-NMT" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 309, + 72, + 528, + 149 + ], + "type": "list", + "angle": 0, + "index": 11, + "blocks": [ + { + "bbox": [ + 309, + 72, + 528, + 92 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 309, + 72, + 528, + 92 + ], + "spans": [ + { + "bbox": [ + 309, + 72, + 528, + 92 + ], + "type": "text", + "content": "1. And when Federer levelled the match, one-time British No 1 Petchey temia (fear->fear->temer->temia) the worst." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 309, + 100, + 523, + 111 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 309, + 100, + 523, + 111 + ], + "spans": [ + { + "bbox": [ + 309, + 100, + 523, + 111 + ], + "type": "text", + "content": "2. The world was mirando (looking->look->mirar->mirando) at him." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 309, + 120, + 525, + 149 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 309, + 120, + 525, + 149 + ], + "spans": [ + { + "bbox": [ + 309, + 120, + 525, + 149 + ], + "type": "text", + "content": "3. GM deber (owes->owe->debe->deber) $23.4bn, excluding $3.9bn in realised Treasury perdidas (losses->loss->perdida->perdidas), according to a Treasury statement dated Friday." + } + ] + } + ], + "index": 10 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 309, + 264, + 525, + 333 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 309, + 264, + 525, + 333 + ], + "spans": [ + { + "bbox": [ + 309, + 264, + 525, + 333 + ], + "type": "text", + "content": "marginally underperforms" + }, + { + "bbox": [ + 309, + 264, + 525, + 333 + ], + "type": "inline_equation", + "content": "^{10}" + }, + { + "bbox": [ + 309, + 264, + 525, + 333 + ], + "type": "text", + "content": ", these gains also extend to individual language pairs (Figure 3). This suggests that minimising errors in pretraining data with 'sense-pivoted pretraining' can enhance overall convergence and yield stronger models." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 298, + 340, + 526, + 700 + ], + "type": "list", + "angle": 0, + "index": 16, + "blocks": [ + { + "bbox": [ + 298, + 340, + 525, + 476 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 298, + 340, + 525, + 476 + ], + "spans": [ + { + "bbox": [ + 298, + 340, + 525, + 476 + ], + "type": "text", + "content": "2. Superior disambiguation helps, but cheaper WSD systems work well too. We observe in Figure 3 that EsCHER consistently induces greater gains than AMuSE-WSD across all pairs. This makes sense given the superior disambiguation quality of the former (Table 3). However, we note that AMuSE-WSD, which is about " + }, + { + "bbox": [ + 298, + 340, + 525, + 476 + ], + "type": "inline_equation", + "content": "2.3\\mathrm{x}" + }, + { + "bbox": [ + 298, + 340, + 525, + 476 + ], + "type": "text", + "content": " faster, also outperforms AA and can be used as an effective, but cheaper alternative, suitable for disambiguating large corpora under budget constraints." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 298, + 484, + 526, + 700 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 298, + 484, + 526, + 700 + ], + "spans": [ + { + "bbox": [ + 298, + 484, + 526, + 700 + ], + "type": "text", + "content": "3. Postprocessing KG lemmas to predict the relevant morphological inflection is beneficial. We observe generating morphological inflections by intersecting with MUSE lexicons (Section 3.3.3) yields major boosts across the board. We understand this qualitatively by showing examples of such inflections from our dataset, in Figure 4. We observe that this approach helps in ensuring linguistic agreement (such as for tense and number) which, in turn, enhances the quality of code-switching and, thus, pretraining. Our technique can thus be used as an effective way to bridge the gap between KG lemmas and morphologically inflected words in corpora – a gap which has proved to be one of the major roadblocks in leveraging structured knowledge in NMT so far." + } + ] + } + ], + "index": 15 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 298, + 708, + 526, + 735 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 298, + 708, + 526, + 735 + ], + "spans": [ + { + "bbox": [ + 298, + 708, + 526, + 735 + ], + "type": "text", + "content": "4. Higher gains are observed for the lower resourced En-Ro pair. WSP-NMT obtains a " + }, + { + "bbox": [ + 298, + 708, + 526, + 735 + ], + "type": "inline_equation", + "content": "+2" + } + ] + } + ], + "index": 17 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 303, + 740, + 525, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 740, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 303, + 740, + 525, + 772 + ], + "type": "text", + "content": "This is possibly because the WordNet that BabelNet uses for French is WOLF (Sagot and Fiser, 2008), an automatically constructed silver quality resource" + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12894" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 68, + 68, + 526, + 159 + ], + "blocks": [ + { + "bbox": [ + 68, + 68, + 526, + 159 + ], + "lines": [ + { + "bbox": [ + 68, + 68, + 526, + 159 + ], + "spans": [ + { + "bbox": [ + 68, + 68, + 526, + 159 + ], + "type": "table", + "html": "
BaselineEn-XX-En
spBLEUchrF++COMET22spBLEUchrF++COMET22
AA24.385 ± 0.63947.890 ± 0.6470.714 ± 0.00924.725 ± 0.57749.660 ± 0.4530.716 ± 0.006
WSP-NMT (AMuSE-WSD)24.910 ± 0.33648.525 ± 0.3040.723 ± 0.00624.935 ± 0.31349.880 ± 0.2430.724 ± 0.005
WSP-NMT (ESCHER)25.310 ± 0.90948.765 ± 0.7170.728 ± 0.01325.095 ± 0.90349.905 ± 0.7050.725 ± 0.010
WSP-NMT (ESCHER) + morph. inflection25.595 ± 0.27949.115 ± 0.2350.731 ± 0.00325.435 ± 0.17950.130 ± 0.2290.729 ± 0.002
", + "image_path": "61ec466240e6d69ff387547f4287a6c70c4c5c46a15dc998cd7ea09f736b8bdc.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 75, + 217, + 290, + 299 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 75, + 217, + 290, + 299 + ], + "spans": [ + { + "bbox": [ + 75, + 217, + 290, + 299 + ], + "type": "text", + "content": "spBLEU improvement over AA for the En-Ro pair – which is the lowest resourced in our setup, with 365K parallel sentences (Table 1). This suggests our approach could be even more useful for medium and low data setups – something we empirically verify in Section 4.3.1." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 63, + 310, + 291, + 539 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 63, + 310, + 291, + 539 + ], + "spans": [ + { + "bbox": [ + 63, + 310, + 291, + 539 + ], + "type": "text", + "content": "5. More significant boosts are obtained for COMET22 than string-based spBLEU or " + }, + { + "bbox": [ + 63, + 310, + 291, + 539 + ], + "type": "inline_equation", + "content": "\\mathrm{chrF}++" + }, + { + "bbox": [ + 63, + 310, + 291, + 539 + ], + "type": "text", + "content": " metrics. While our best model improves across all the metrics, we observe this in Table 4 for our weaker models. This is probably because the errors made by incorrect word sense translations can sometimes be too subtle to be adequately penalized by weaker string-based metrics. On the other hand, neural metrics like COMET22 are more robust and have been trained to detect word-level as well as sentence-level errors. It has shown high correlations with human evaluation, ranking second in the WMT'22 Metrics shared task (Freitag et al., 2022). We, thus, conclude that statistically significant gains in COMET scores, when averaged across 5 seeds, help in increasing the strength and reliability of our results." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 553, + 289, + 579 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 553, + 289, + 579 + ], + "spans": [ + { + "bbox": [ + 67, + 553, + 289, + 579 + ], + "type": "text", + "content": "4.3 How well does WSP-NMT extend to more challenging MT scenarios?" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 585, + 290, + 639 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 585, + 290, + 639 + ], + "spans": [ + { + "bbox": [ + 67, + 585, + 290, + 639 + ], + "type": "text", + "content": "Here, we try to evaluate the robustness of our approach to scale to various challenging translation scenarios: a) data scarcity, b) zero-shot translation and c) translation of under-represented languages." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 648, + 244, + 661 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 648, + 244, + 661 + ], + "spans": [ + { + "bbox": [ + 67, + 648, + 244, + 661 + ], + "type": "text", + "content": "4.3.1 Scaling to data-scarce settings" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "content": "In Figure 5, we explore how performance varies with the scale of parallel data, while keeping monolingual data constant - since the latter is usually more abundant. We observe an improvement margin of " + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "inline_equation", + "content": "+3" + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "inline_equation", + "content": "+4" + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "content": " spBLEU in the low-resource setting (50-100K sentences) that widens to " + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "inline_equation", + "content": "+5" + }, + { + "bbox": [ + 67, + 665, + 291, + 772 + ], + "type": "text", + "content": " spBLEU in the medium-resource setup (250-500K sentences). The gap then narrows as we move towards high" + } + ] + } + ], + "index": 7 + }, + { + "type": "image", + "bbox": [ + 307, + 219, + 520, + 363 + ], + "blocks": [ + { + "bbox": [ + 307, + 219, + 520, + 363 + ], + "lines": [ + { + "bbox": [ + 307, + 219, + 520, + 363 + ], + "spans": [ + { + "bbox": [ + 307, + 219, + 520, + 363 + ], + "type": "image", + "image_path": "8158e53c47bc5e5cbc3b9bc896b67a1bad6b3984dbf22a58d3bf2e32e79931d5.jpg" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 370, + 525, + 407 + ], + "lines": [ + { + "bbox": [ + 302, + 370, + 525, + 407 + ], + "spans": [ + { + "bbox": [ + 302, + 370, + 525, + 407 + ], + "type": "text", + "content": "Figure 5: Average En-X and X-En spBLEU scores for AA and WSP-NMT models, with variation in parallel data (in terms of maximum sentence count per language)" + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_caption" + } + ], + "index": 8 + }, + { + "type": "table", + "bbox": [ + 327, + 418, + 502, + 467 + ], + "blocks": [ + { + "bbox": [ + 67, + 167, + 525, + 204 + ], + "lines": [ + { + "bbox": [ + 67, + 167, + 525, + 204 + ], + "spans": [ + { + "bbox": [ + 67, + 167, + 525, + 204 + ], + "type": "text", + "content": "Table 4: Overall results of the Romance language experiments with respect to spBLEU, " + }, + { + "bbox": [ + 67, + 167, + 525, + 204 + ], + "type": "inline_equation", + "content": "\\mathrm{chrF}++" + }, + { + "bbox": [ + 67, + 167, + 525, + 204 + ], + "type": "text", + "content": " and COMET22 metrics. Mean and standard deviation after 5 runs, initialised with different random seeds (0-4) has been reported. Statistically significant improvements " + }, + { + "bbox": [ + 67, + 167, + 525, + 204 + ], + "type": "inline_equation", + "content": "(p\\leq 0.05)" + }, + { + "bbox": [ + 67, + 167, + 525, + 204 + ], + "type": "text", + "content": " over our primary baseline, AA, are highlighted in bold." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 327, + 418, + 502, + 467 + ], + "lines": [ + { + "bbox": [ + 327, + 418, + 502, + 467 + ], + "spans": [ + { + "bbox": [ + 327, + 418, + 502, + 467 + ], + "type": "table", + "html": "
BaselineEn-PtPt-En
AA2.92 ± 0.646.88 ± 1.56
WSP-NMT (best)3.60 ± 0.198.52 ± 0.53
", + "image_path": "e51c8018afcbcc70ee9a3ad010153c7368e5d64bec88a3f62dbb2947c4a6c995.jpg" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "table_body" + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 475, + 525, + 523 + ], + "lines": [ + { + "bbox": [ + 302, + 475, + 525, + 523 + ], + "spans": [ + { + "bbox": [ + 302, + 475, + 525, + 523 + ], + "type": "text", + "content": "Table 5: Zero-Shot Translation scores (spBLEU) for the English-Portuguese (En-Pt) pair. We use the best WSP-NMT model from Table 4 and compare with AA. Statistical significance " + }, + { + "bbox": [ + 302, + 475, + 525, + 523 + ], + "type": "inline_equation", + "content": "(p = 0.04)" + }, + { + "bbox": [ + 302, + 475, + 525, + 523 + ], + "type": "text", + "content": " is highlighted in bold." + } + ] + } + ], + "index": 11, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 541, + 525, + 608 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 541, + 525, + 608 + ], + "spans": [ + { + "bbox": [ + 302, + 541, + 525, + 608 + ], + "type": "text", + "content": "resource scenarios (750K-1.5M sentences), suggesting AA models become more robust to noise when high quantities of parallel data are provided. Based on these findings, we discuss potential applications of our method in Section 4.5." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 619, + 491, + 633 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 619, + 491, + 633 + ], + "spans": [ + { + "bbox": [ + 302, + 619, + 491, + 633 + ], + "type": "text", + "content": "4.3.2 Scaling to Zero-Shot Translation" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 638, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 638, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 638, + 525, + 772 + ], + "type": "text", + "content": "Continuing our exploration into data scarcity, we now evaluate the performance of WSP-NMT with no parallel data (i.e. zero-shot) in Table 5. We use En-Pt as a simulated zero-shot pair, following the setup in Table 1a. We compare our best WSP-NMT model from Table 4 with AA, averaged across 5 runs as before. We observe statistically significant gains of about " + }, + { + "bbox": [ + 302, + 638, + 525, + 772 + ], + "type": "inline_equation", + "content": "+0.7" + }, + { + "bbox": [ + 302, + 638, + 525, + 772 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 302, + 638, + 525, + 772 + ], + "type": "inline_equation", + "content": "+1.64" + }, + { + "bbox": [ + 302, + 638, + 525, + 772 + ], + "type": "text", + "content": " spBLEU for En-Pt and Pt-En pairs respectively. We conclude that WSP-NMT is strong in a wide range of scenarios" + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12895" + } + ] + } + ], + "index": 15 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 73, + 68, + 286, + 157 + ], + "blocks": [ + { + "bbox": [ + 73, + 68, + 286, + 157 + ], + "lines": [ + { + "bbox": [ + 73, + 68, + 286, + 157 + ], + "spans": [ + { + "bbox": [ + 73, + 68, + 286, + 157 + ], + "type": "table", + "html": "
En-XX-En
AA22.79 ± 1.06320.49 ± 0.893
WSP-MT (AMuSE-WSD)22 ± 0.70419.58 ± 0.559
WSP-MT (AMuSE-WSD) + morph. inflection21.83 ± 0.72719.53 ± 0.72
WSP-MT (AMuSE-WSD) + synonyms + hypernyms22.71 ± 0.9320.23 ± 0.906
", + "image_path": "07d741915b98095eabb74ee5e48bf4c2f85487fa5bc1b41a9633e89d325114ea.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 164, + 289, + 189 + ], + "lines": [ + { + "bbox": [ + 67, + 164, + 289, + 189 + ], + "spans": [ + { + "bbox": [ + 67, + 164, + 289, + 189 + ], + "type": "text", + "content": "Table 6: spBLEU scores for Indo-Iranian languages (Hindi and Farsi) to English, averaged across 5 seeds" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 215, + 289, + 241 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 215, + 289, + 241 + ], + "spans": [ + { + "bbox": [ + 67, + 215, + 289, + 241 + ], + "type": "text", + "content": "and can improve performance at varying degrees of resourcedness, including in zero-shot tasks." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 258, + 287, + 271 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 258, + 287, + 271 + ], + "spans": [ + { + "bbox": [ + 67, + 258, + 287, + 271 + ], + "type": "text", + "content": "4.3.3 Scaling to under-represented languages" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 278, + 291, + 440 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 278, + 291, + 440 + ], + "spans": [ + { + "bbox": [ + 67, + 278, + 291, + 440 + ], + "type": "text", + "content": "Lastly, we explore how WSP-NMT performs for languages under-represented in external resources such as WSD systems, lexicons, and KGs. The issues faced here include low coverage, poor quality, and unreliable WSD. To study the impact of these factors (in isolation from data scarcity), we train a multilingual NMT model between English and 2 Indo-Iranian languages (Hindi and Farsi) using the data in Table 1b. We choose these languages since they are under-represented in BabelNet" + }, + { + "bbox": [ + 67, + 278, + 291, + 440 + ], + "type": "inline_equation", + "content": "^{11}" + }, + { + "bbox": [ + 67, + 278, + 291, + 440 + ], + "type": "text", + "content": ", are supported by AMuSE-WSD" + }, + { + "bbox": [ + 67, + 278, + 291, + 440 + ], + "type": "inline_equation", + "content": "^{12}" + }, + { + "bbox": [ + 67, + 278, + 291, + 440 + ], + "type": "text", + "content": " and have MUSE lexicons available for training AA baselines." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "spans": [ + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "text", + "content": "In Table 6, we find that integrating morphological inflection does not yield gains, likely because - due to poor coverage - we find matches in MUSE lexicons far fewer times (only " + }, + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "inline_equation", + "content": "18.3\\%" + }, + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "text", + "content": " compared to " + }, + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "inline_equation", + "content": "74\\%" + }, + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "text", + "content": " for the Romance data). BabelNet also suffers from poor coverage (" + }, + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "inline_equation", + "content": "45\\%" + }, + { + "bbox": [ + 67, + 443, + 291, + 715 + ], + "type": "text", + "content": " of disambiguated senses do not have translations in either Hindi or Farsi). To address this, we explore if translations of synonyms and hypernyms of a KG concept could be used as substitutes. In practice, we find that, while this does improve the vanilla WSP-NMT model, it is unable to beat AA. This is likely rooted in the fact that low-resource disambiguation is an unaddressed challenge in NLP, primarily because of a lack of resources - be it training datasets, reliable WSD models, or even evaluation benchmarks. Despite these hurdles, we note that, since WSP-NMT is effective in data-scarce settings, creating a small amount of sense-annotated data in these languages might suffice to yield potential gains." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 71, + 459, + 83 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 459, + 83 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 459, + 83 + ], + "type": "text", + "content": "4.4 DiBiMT benchmark results" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 301, + 90, + 526, + 306 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 90, + 526, + 306 + ], + "spans": [ + { + "bbox": [ + 301, + 90, + 526, + 306 + ], + "type": "text", + "content": "Finally, we test our models on the DiBiMT disambiguation benchmark (Campolungo et al., 2022a) in Figure 6. The DiBiMT test set comprises sentences with an ambiguous word, paired with \"good\" and \"bad\" translations of this word. Then, given an NMT model's hypotheses, it computes accuracy, i.e. the ratio of sentences with \"good\" translations compared to the sum of \"good\" and \"bad\" ones. Hypotheses that fall in neither of these categories are discarded as 'MISS' sentences. We compare AA and our best WSP-NMT model on Italian and Spanish, the two Romance languages supported by DiBiMT, and report overall accuracies. In addition, we also include fine-grained scores on disambiguation of specific POS tags like nouns and verbs to better understand the capabilities of our models." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "spans": [ + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": "We observe a small increase in overall accuracy. Looking more closely, we find that while WSP-NMT's accuracy for nouns is comparable to AA, significant improvements are observed for verb disambiguation - especially for Italian, where average accuracy increases from " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "15.34\\%" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "17.65\\%" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " (15% increase). Prior research has shown that verbs are much harder to disambiguate than nouns since they are highly polysemous (Barba et al., 2021a,b; Campolungo et al., 2022a) and require much larger contexts to disambiguate (Wang et al., 2021). Thus, while sense-agnostic AA models are able to disambiguate nouns, verb disambiguation proves more challenging, which is where sense-pivoted pretraining with WSP-NMT helps. We provide example translations in Appendix A.3 to drive intuition of this further. Finally, we note that WSP-NMT also reduces the average " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "\\mathrm{MISS\\%}" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " - from " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "39.3\\%" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "37.2\\%" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " for Spanish, and " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "41.2\\%" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " to " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "40.2\\%" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " for Italian. These trends are encouraging, since errors such as word omission, word copying and hallucination are the most common issues and constitute about " + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "inline_equation", + "content": "50\\%" + }, + { + "bbox": [ + 302, + 309, + 526, + 619 + ], + "type": "text", + "content": " of all 'MISS' cases (Campolungo et al., 2022a)." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 632, + 390, + 645 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 632, + 390, + 645 + ], + "spans": [ + { + "bbox": [ + 302, + 632, + 390, + 645 + ], + "type": "text", + "content": "4.5 Applications" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 301, + 651, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 651, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 301, + 651, + 526, + 772 + ], + "type": "text", + "content": "We conclude our results section by noting that while WSP-NMT is not ideally suited for either very low-resource (Section 4.3.3) or very resource-rich (Section 4.3.1) settings, it does yield significant performance gains for low and medium-data settings of well-resourced (e.g. European) languages, as shown in Figure 5. We hypothesize that this can, thus, be quite useful for domain-specific translation in these languages, such as in news," + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 729, + 290, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 729, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 729, + 290, + 772 + ], + "type": "inline_equation", + "content": "^{11}" + }, + { + "bbox": [ + 67, + 729, + 290, + 772 + ], + "type": "text", + "content": "https://babelnet.org/statistics \n" + }, + { + "bbox": [ + 67, + 729, + 290, + 772 + ], + "type": "inline_equation", + "content": "^{12}" + }, + { + "bbox": [ + 67, + 729, + 290, + 772 + ], + "type": "text", + "content": "https://nlp.uniroma1.it/amuse-wsd/ api-documentation. We are unable to use EsCHER here due to lack of relevant training data in XL-WSD." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12896" + } + ] + } + ], + "index": 12 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 83, + 69, + 276, + 195 + ], + "blocks": [ + { + "bbox": [ + 83, + 69, + 276, + 195 + ], + "lines": [ + { + "bbox": [ + 83, + 69, + 276, + 195 + ], + "spans": [ + { + "bbox": [ + 83, + 69, + 276, + 195 + ], + "type": "image", + "image_path": "22fa89c9c999cc492a08b3d10c323a4d8fecbe00187a6c3a739925e92a46c2d3.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 67, + 203, + 291, + 227 + ], + "lines": [ + { + "bbox": [ + 67, + 203, + 291, + 227 + ], + "spans": [ + { + "bbox": [ + 67, + 203, + 291, + 227 + ], + "type": "text", + "content": "Figure 6: Accuracy of our AA and WSP-NMT models, in Spanish and Italian, on the DiBiMT benchmark." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "image_caption" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 243, + 291, + 297 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 243, + 291, + 297 + ], + "spans": [ + { + "bbox": [ + 67, + 243, + 291, + 297 + ], + "type": "text", + "content": "healthcare, e-commerce, etc. In such information-centric domains, minimising disambiguation errors and improving translation quality with reliable, general-purpose KGs would likely bring value." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 309, + 147, + 322 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 309, + 147, + 322 + ], + "spans": [ + { + "bbox": [ + 67, + 309, + 147, + 322 + ], + "type": "text", + "content": "5 Conclusion" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 332, + 291, + 493 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 332, + 291, + 493 + ], + "spans": [ + { + "bbox": [ + 67, + 332, + 291, + 493 + ], + "type": "text", + "content": "We propose WSP-NMT, a 'sense-pivoted' algorithm leveraging word sense information from KBs for pretraining multilingual NMT models. We observe significant performance gains over the baseline, AA, and note various factors of interest including the impact of WSD quality and morphology. We then study how WSP-NMT scales to various data and resource-constrained scenarios and, finally, note significant accuracy gains in verb disambiguation on the DiBiMT benchmark. Our results help emphasize the utility and strength of WSP-NMT." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 507, + 130, + 519 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 507, + 130, + 519 + ], + "spans": [ + { + "bbox": [ + 68, + 507, + 130, + 519 + ], + "type": "text", + "content": "Limitations" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 529, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 529, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 529, + 291, + 772 + ], + "type": "text", + "content": "While our approach attempts to minimize the risk of low-quality translations creeping into the pretraining data by using human-curated structured knowledge, it is possible certain biased translations enter our data nonetheless. For instance, during code-switching, there is a possibility of gender bias in the sense translations chosen, as certain gendered translations of a concept that is ungendered in the source language are provided in the same word sense in BabelNet. Though we use random sampling to mitigate such risks, the propagation of potential biases depends heavily on the fairness and diversity of translations available in BabelNet. While such issues are similar to those that would arise in the current paradigm of dictionary-based code-switching, a principled approach to resolve gender based on sentence-level context and to choose the appropriate translation from the BabelNet synset" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 71, + 525, + 125 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 525, + 125 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 525, + 125 + ], + "type": "text", + "content": "would be a useful direction of future research. The BabelNet KG also has the potential for improving in this regard, allowing for the addition of gender categories to specific concepts." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 126, + 526, + 397 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 126, + 526, + 397 + ], + "spans": [ + { + "bbox": [ + 302, + 126, + 526, + 397 + ], + "type": "text", + "content": "We also note that WSP-NMT may not be as effective in the translation of under-represented languages. As we note in Section 4.3.3, this is partly rooted in the unavailability of disambiguation resources and high-quality Knowledge Bases for such languages. However this is quickly changing: i) WSD for low-resource languages has been a very emerging area of research recently (Saeed et al., 2021; Bhatia et al., 2022; Boruah, 2022), and, at the same time, ii) BabelNet itself is constantly being updated and scaled up. For example, due to the creation of newer low-resource wordnets, BabelNet expanded from 500 supported languages (v5.1 from Jul 2022) to 520 (v5.2 from Nov 2022) in just 4 months. As the quality of these curated resources improves with community contributions and advances in low-resource NLP/WSD, we anticipate that methods such as WSP-NMT, which we show to be robust in low-data settings (<1M parallel sents), could be increasingly useful." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 303, + 410, + 405, + 424 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 410, + 405, + 424 + ], + "spans": [ + { + "bbox": [ + 303, + 410, + 405, + 424 + ], + "type": "text", + "content": "Acknowledgements" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 431, + 525, + 510 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 431, + 525, + 510 + ], + "spans": [ + { + "bbox": [ + 302, + 431, + 525, + 510 + ], + "type": "text", + "content": "This work was funded by UK Research and Innovation (UKRI) under the UK government's Horizon Europe funding guarantee [grant number 10039436]. The authors also gratefully acknowledge the support of the PNRR MUR project PE0000013-FAIR." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 512, + 525, + 633 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 512, + 525, + 633 + ], + "spans": [ + { + "bbox": [ + 302, + 512, + 525, + 633 + ], + "type": "text", + "content": "The computations described in this research were performed using the Baskerville Tier 2 HPC service (https://www.baskerville.ac.uk/). Baskerville was funded by the EPSRC and UKRI through the World Class Labs scheme (EP/T022221/1) and the Digital Research Infrastructure programme (EP/W032244/1) and is operated by Advanced Research Computing at the University of Birmingham." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 661, + 362, + 674 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 661, + 362, + 674 + ], + "spans": [ + { + "bbox": [ + 304, + 661, + 362, + 674 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 303, + 682, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 15, + "blocks": [ + { + "bbox": [ + 303, + 682, + 525, + 726 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 682, + 525, + 726 + ], + "spans": [ + { + "bbox": [ + 303, + 682, + 525, + 726 + ], + "type": "text", + "content": "Benyamin Ahmadnia, Bonnie J Dorr, and Parisa Kordjamshidi. 2020. Knowledge graphs effectiveness in neural machine translation improvement. Computer Science, 21." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 303, + 738, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 738, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 303, + 738, + 526, + 772 + ], + "type": "text", + "content": "Farhad Akhbardeh, Arkady Arkhangorodsky, Magdalena Biesialska, Ondrej Bojar, Rajen Chatterjee, Vishrav Chaudhary, Marta R. Costa-jussa," + } + ] + } + ], + "index": 14 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12897" + } + ] + } + ], + "index": 16 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 8, + "blocks": [ + { + "bbox": [ + 80, + 72, + 291, + 237 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 72, + 291, + 237 + ], + "spans": [ + { + "bbox": [ + 80, + 72, + 291, + 237 + ], + "type": "text", + "content": "Cristina Espana-Bonet, Angela Fan, Christian Federmann, Markus Freitag, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Leonie Harter, Kenneth Heafield, Christopher Homan, Matthias Huck, Kwabena Amponsah-Kaakyire, Jungo Kasai, Daniel Khashabi, Kevin Knight, Tom Kocmi, Philipp Koehn, Nicholas Lourie, Christof Monz, Makoto Morishita, Masaaki Nagata, Ajay Nagesh, Toshiaki Nakazawa, Matteo Negri, Santanu Pal, Allahsera Auguste Tapo, Marco Turchi, Valentin Vydrin, and Marcos Zampieri. 2021. Findings of the 2021 conference on machine translation (WMT21). In Proceedings of the Sixth Conference on Machine Translation, pages 1-88, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 247, + 291, + 314 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 247, + 291, + 314 + ], + "spans": [ + { + "bbox": [ + 69, + 247, + 291, + 314 + ], + "type": "text", + "content": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 323, + 291, + 401 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 323, + 291, + 401 + ], + "spans": [ + { + "bbox": [ + 69, + 323, + 291, + 401 + ], + "type": "text", + "content": "Edoardo Barba, Tommaso Pasini, and Roberto Navigli. 2021a. ESC: Redesigning WSD with extractive sense comprehension. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4661-4672, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 411, + 291, + 488 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 411, + 291, + 488 + ], + "spans": [ + { + "bbox": [ + 69, + 411, + 291, + 488 + ], + "type": "text", + "content": "Edoardo Barba, Luigi Procopio, and Roberto Navigli. 2021b. ConSeC: Word sense disambiguation as continuous sense comprehension. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 1492-1503, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 498, + 291, + 542 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 498, + 291, + 542 + ], + "spans": [ + { + "bbox": [ + 69, + 498, + 291, + 542 + ], + "type": "text", + "content": "Surbhi Bhatia, Ankit Kumar, and Mohammed Mutilah Khan. 2022. Role of genetic algorithm in optimization of Hindi word sense disambiguation. IEEE Access, 10:75693-75707." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 553, + 291, + 608 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 553, + 291, + 608 + ], + "spans": [ + { + "bbox": [ + 69, + 553, + 291, + 608 + ], + "type": "text", + "content": "Puberun Boruah. 2022. A novel approach to word sense disambiguation for a low-resource morphologically rich language. In 2022 IEEE 6th Conference on Information and Communication Technology (CICT), pages 1-6. IEEE." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 618, + 291, + 707 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 618, + 291, + 707 + ], + "spans": [ + { + "bbox": [ + 69, + 618, + 291, + 707 + ], + "type": "text", + "content": "Niccolò Campolungo, Federico Martelli, Francesco Saina, and Roberto Navigli. 2022a. DiBiMT: A novel benchmark for measuring Word Sense Disambiguation biases in Machine Translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4331-4352, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "type": "text", + "content": "Niccolò Campolungo, Tommaso Pasini, Denis Emelin, and Roberto Navigli. 2022b. Reducing disambiguation biases in NMT by leveraging explicit word sense information. In Proceedings of the 2022 Conference of the North American Chapter of the Association for" + } + ] + } + ], + "index": 7 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 19, + "blocks": [ + { + "bbox": [ + 315, + 72, + 526, + 106 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 315, + 72, + 526, + 106 + ], + "spans": [ + { + "bbox": [ + 315, + 72, + 526, + 106 + ], + "type": "text", + "content": "Computational Linguistics: Human Language Technologies, pages 4824-4838, Seattle, United States. Association for Computational Linguistics." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 304, + 116, + 526, + 195 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 116, + 526, + 195 + ], + "spans": [ + { + "bbox": [ + 304, + 116, + 526, + 195 + ], + "type": "text", + "content": "Marine Carpuat and Dekai Wu. 2007. Improving statistical machine translation using word sense disambiguation. In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), pages 61-72, Prague, Czech Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 206, + 526, + 261 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 206, + 526, + 261 + ], + "spans": [ + { + "bbox": [ + 304, + 206, + 526, + 261 + ], + "type": "text", + "content": "Yee Seng Chan, Hwee Tou Ng, and David Chiang. 2007. Word sense disambiguation improves statistical machine translation. In Proceedings of the 45th annual meeting of the association of computational linguistics, pages 33-40." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 272, + 526, + 317 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 272, + 526, + 317 + ], + "spans": [ + { + "bbox": [ + 304, + 272, + 526, + 317 + ], + "type": "text", + "content": "Heeyoul Choi, Kyunghyun Cho, and Yoshua Bengio. 2017. Context-dependent word representation for neural machine translation. Computer Speech Language, 45:149-160." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 327, + 526, + 394 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 327, + 526, + 394 + ], + "spans": [ + { + "bbox": [ + 304, + 327, + 526, + 394 + ], + "type": "text", + "content": "Marta R Costa-jussa, James Cross, Onur Celebi, Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, et al. 2022. No language left behind: Scaling human-centered machine translation. arXiv preprint arXiv:2207.04672." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 405, + 526, + 440 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 405, + 526, + 440 + ], + "spans": [ + { + "bbox": [ + 304, + 405, + 526, + 440 + ], + "type": "text", + "content": "Thomas G Dietterich. 1998. Approximate statistical tests for comparing supervised classification learning algorithms. *Neural computation*, 10(7):1895-1923." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 450, + 526, + 528 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 450, + 526, + 528 + ], + "spans": [ + { + "bbox": [ + 304, + 450, + 526, + 528 + ], + "type": "text", + "content": "Denis Emelin, Ivan Titov, and Rico Sennrich. 2020. Detecting word sense disambiguation biases in machine translation for model-agnostic adversarial attacks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7635–7653, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 539, + 526, + 606 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 539, + 526, + 606 + ], + "spans": [ + { + "bbox": [ + 304, + 539, + 526, + 606 + ], + "type": "text", + "content": "Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, et al. 2021. Beyond english-centric multilingual machine translation. The Journal of Machine Learning Research, 22(1):4839-4886." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 617, + 526, + 717 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 617, + 526, + 717 + ], + "spans": [ + { + "bbox": [ + 304, + 617, + 526, + 717 + ], + "type": "text", + "content": "Markus Freitag, Ricardo Rei, Nitika Mathur, Chi-kiu Lo, Craig Stewart, Eleftherios Avramidis, Tom Kocmi, George Foster, Alon Lavie, and André F. T. Martins. 2022. Results of WMT22 metrics shared task: Stop using BLEU – neural metrics are better and more robust. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 46–68, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 728, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 728, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 728, + 526, + 772 + ], + "type": "text", + "content": "Pengcheng He, Jianfeng Gao, and Weizhu Chen. 2023. Debertav3: Improving deberta using electra-style pretraining with gradient-disentangled embedding sharing." + } + ] + } + ], + "index": 18 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12898" + } + ] + } + ], + "index": 20 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 9 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 9, + "blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 150 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 72, + 291, + 150 + ], + "spans": [ + { + "bbox": [ + 69, + 72, + 291, + 150 + ], + "type": "text", + "content": "Junjie Hu, Hiroaki Hayashi, Kyunghyun Cho, and Graham Neubig. 2022. DEEP: DEnoising entity pretraining for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1753-1766, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 157, + 291, + 213 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 157, + 291, + 213 + ], + "spans": [ + { + "bbox": [ + 69, + 157, + 291, + 213 + ], + "type": "text", + "content": "Vivek Iyer, Arturo Oncevay, and Alexandra Birch. 2023. Exploring enhanced code-switched noising for pretraining in neural machine translation. In *Findings of the Association for Computational Linguistics: EACL* 2023, pages 954-968." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 219, + 290, + 265 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 219, + 290, + 265 + ], + "spans": [ + { + "bbox": [ + 69, + 219, + 290, + 265 + ], + "type": "text", + "content": "Alex Jones, Isaac Caswell, Ishank Saxena, and Orhan First. 2023. Bilex rx: Lexical data augmentation for massively multilingual machine translation. arXiv preprint arXiv:2303.15265." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 271, + 290, + 349 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 271, + 290, + 349 + ], + "spans": [ + { + "bbox": [ + 69, + 271, + 290, + 349 + ], + "type": "text", + "content": "Tom Kocmi, Rachel Bawden, Ondrej Bojar, Anton Dvorkovich, Christian Federmann, Mark Fishel, Thamme Gowda, Yvette Graham, Roman Grundkiewicz, Barry Haddow, et al. 2022. Findings of the 2022 conference on machine translation (wmt22). In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 1-45." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 355, + 290, + 433 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 355, + 290, + 433 + ], + "spans": [ + { + "bbox": [ + 69, + 355, + 290, + 433 + ], + "type": "text", + "content": "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, Brussels, Belgium. Association for Computational Linguistics." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 440, + 291, + 518 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 440, + 291, + 518 + ], + "spans": [ + { + "bbox": [ + 69, + 440, + 291, + 518 + ], + "type": "text", + "content": "Pengfei Li, Liangyou Li, Meng Zhang, Minghao Wu, and Qun Liu. 2022. Universal conditional masked language pre-training for neural machine translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6379-6391, Dublin, Ireland. Association for Computational Linguistics." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 525, + 291, + 614 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 525, + 291, + 614 + ], + "spans": [ + { + "bbox": [ + 69, + 525, + 291, + 614 + ], + "type": "text", + "content": "Zehui Lin, Xiao Pan, Mingxuan Wang, Xipeng Qiu, Jiangtao Feng, Hao Zhou, and Lei Li. 2020. Pretraining multilingual neural machine translation by leveraging alignment information. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2649-2663, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 621, + 291, + 709 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 621, + 291, + 709 + ], + "spans": [ + { + "bbox": [ + 69, + 621, + 291, + 709 + ], + "type": "text", + "content": "Frederick Liu, Han Lu, and Graham Neubig. 2018. Handling homographs in neural machine translation. 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 1336-1345, New Orleans, Louisiana. Association for Computational Linguistics." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 716, + 291, + 772 + ], + "type": "text", + "content": "Yu Lu, Jiajun Zhang, and Chengqing Zong. 2019. Exploiting knowledge graph in neural machine translation. In Machine Translation: 14th China Workshop, CWMT 2018, Wuyishan, China, October 25-26, 2018, Proceedings 14, pages 27-38. Springer." + } + ] + } + ], + "index": 8 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 20, + "blocks": [ + { + "bbox": [ + 304, + 72, + 526, + 150 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 526, + 150 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 526, + 150 + ], + "type": "text", + "content": "Diego Moussallem, Axel-Cyrille Ngonga Ngomo, Paul Buitelaar, and Mihael Arcan. 2019. Utilizing knowledge graphs for neural machine translation augmentation. In Proceedings of the 10th International Conference on Knowledge Capture, K-CAP '19, page 139-146, New York, NY, USA. Association for Computing Machinery." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 160, + 526, + 204 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 160, + 526, + 204 + ], + "spans": [ + { + "bbox": [ + 304, + 160, + 526, + 204 + ], + "type": "text", + "content": "Roberto Navigli, Michele Bevilacqua, Simone Conia, Dario Montagnini, and Francesco Ceconi. 2021. Ten years of BabelNet: A survey. In *IJCAI*, pages 4559-4567." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 216, + 526, + 305 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 216, + 526, + 305 + ], + "spans": [ + { + "bbox": [ + 304, + 216, + 526, + 305 + ], + "type": "text", + "content": "Minh Van Nguyen, Viet Duc Lai, Amir Pouran Ben Veyseh, and Thien Huu Nguyen. 2021. Trankit: A lightweight transformer-based toolkit for multilingual natural language processing. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 80-90, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 316, + 526, + 361 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 316, + 526, + 361 + ], + "spans": [ + { + "bbox": [ + 304, + 316, + 526, + 361 + ], + "type": "text", + "content": "Quang-Phuoc Nguyen, Anh-Dung Vo, Joon-Choul Shin, and Cheol-Young Ock. 2018. Effect of word sense disambiguation on neural machine translation: A case study in korean. IEEE Access, 6:38512-38523." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 371, + 526, + 460 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 371, + 526, + 460 + ], + "spans": [ + { + "bbox": [ + 304, + 371, + 526, + 460 + ], + "type": "text", + "content": "Riccardo Orlando, Simone Conia, Fabrizio Brignone, Francesco Cecconi, and Roberto Navigli. 2021. AMuSE-WSD: An all-in-one multilingual system for easy Word Sense Disambiguation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 298-307, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 471, + 526, + 560 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 471, + 526, + 560 + ], + "spans": [ + { + "bbox": [ + 304, + 471, + 526, + 560 + ], + "type": "text", + "content": "Xiao Pan, Mingxuan Wang, Liwei Wu, and Lei Li. 2021. Contrastive learning for many-to-many multilingual neural machine translation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 244-258, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 571, + 526, + 627 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 571, + 526, + 627 + ], + "spans": [ + { + "bbox": [ + 304, + 571, + 526, + 627 + ], + "type": "text", + "content": "Tommaso Pasini, Alessandro Raganato, and Roberto Navigli. 2021. Xl-wsd: An extra-large and cross-lingual evaluation framework for word sense disambiguation. Proceedings of the AAAI Conference on Artificial Intelligence, 35(15):13648-13656." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 637, + 526, + 672 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 637, + 526, + 672 + ], + "spans": [ + { + "bbox": [ + 304, + 637, + 526, + 672 + ], + "type": "text", + "content": "Maja Popovic. 2017. chrf++: words helping character n-grams. In Proceedings of the second conference on machine translation, pages 612-618." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 682, + 526, + 739 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 682, + 526, + 739 + ], + "spans": [ + { + "bbox": [ + 304, + 682, + 526, + 739 + ], + "type": "text", + "content": "Xiao Pu, Nikolaos Pappas, James Henderson, and Andrei Popescu-Belis. 2018. Integrating weakly supervised word sense disambiguation into neural machine translation. Transactions of the Association for Computational Linguistics, 6:635-649." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "type": "text", + "content": "Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2019. The MuCoW test suite at WMT" + } + ] + } + ], + "index": 19 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 312, + 791 + ], + "type": "text", + "content": "12899" + } + ] + } + ], + "index": 21 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 10 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 10, + "blocks": [ + { + "bbox": [ + 79, + 72, + 291, + 128 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 79, + 72, + 291, + 128 + ], + "spans": [ + { + "bbox": [ + 79, + 72, + 291, + 128 + ], + "type": "text", + "content": "2019: Automatically harvested multilingual contrastive word sense disambiguation test sets for machine translation. In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pages 470-480." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 137, + 291, + 202 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 137, + 291, + 202 + ], + "spans": [ + { + "bbox": [ + 69, + 137, + 291, + 202 + ], + "type": "text", + "content": "Alessandro Raganato, Yves Scherrer, and Jörg Tiedemann. 2020. An evaluation benchmark for testing the word sense disambiguation capabilities of machine translation systems. In Proceedings of The 12th Language Resources and Evaluation Conference. European Language Resources Association (ELRA)." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 211, + 291, + 301 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 211, + 291, + 301 + ], + "spans": [ + { + "bbox": [ + 69, + 211, + 291, + 301 + ], + "type": "text", + "content": "Ricardo Rei, José G. C. de Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022. COMET-22: Unbabel-IST 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 308, + 291, + 397 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 308, + 291, + 397 + ], + "spans": [ + { + "bbox": [ + 69, + 308, + 291, + 397 + ], + "type": "text", + "content": "Machel Reid and Mikel Artetxe. 2022. PARADISE: Exploiting parallel data for multilingual sequence-to-sequence pretraining. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 800-810, Seattle, United States. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 406, + 290, + 461 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 406, + 290, + 461 + ], + "spans": [ + { + "bbox": [ + 69, + 406, + 290, + 461 + ], + "type": "text", + "content": "Ali Saeed, Rao Muhammad Adeel Nawab, and Mark Stevenson. 2021. Investigating the feasibility of deep learning methods for urdu word sense disambiguation. Transactions on Asian and Low-Resource Language Information Processing, 21(2):1-16." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 470, + 290, + 503 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 470, + 290, + 503 + ], + "spans": [ + { + "bbox": [ + 69, + 470, + 290, + 503 + ], + "type": "text", + "content": "Benoit Sagot and Darja Fiser. 2008. Building a free french wordnet from multilingual resources. In OntoLex." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 513, + 290, + 535 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 513, + 290, + 535 + ], + "spans": [ + { + "bbox": [ + 69, + 513, + 290, + 535 + ], + "type": "text", + "content": "Student. 1908. The probable error of a mean. Biometrika, 6(1):1-25." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 544, + 291, + 622 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 544, + 291, + 622 + ], + "spans": [ + { + "bbox": [ + 69, + 544, + 291, + 622 + ], + "type": "text", + "content": "Gongbo Tang, Rico Senrich, and Joakim Nivre. 2018. An analysis of attention mechanisms: The case of word sense disambiguation in neural machine translation. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 26-35, Brussels, Belgium. Association for Computational Linguistics." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 630, + 291, + 719 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 630, + 291, + 719 + ], + "spans": [ + { + "bbox": [ + 69, + 630, + 291, + 719 + ], + "type": "text", + "content": "Gongbo Tang, Rico Senrich, and Joakim Nivre. 2019. Encoders help you disambiguate word senses in neural machine translation. 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 1429-1435, Hong Kong, China. Association for Computational Linguistics." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 69, + 728, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 728, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 728, + 291, + 772 + ], + "type": "text", + "content": "Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, and Angela Fan. 2021. Multilingual translation from denoising pre-training. In Findings of the Association" + } + ] + } + ], + "index": 9 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 690 + ], + "type": "list", + "angle": 0, + "index": 21, + "blocks": [ + { + "bbox": [ + 314, + 72, + 525, + 105 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 72, + 525, + 105 + ], + "spans": [ + { + "bbox": [ + 314, + 72, + 525, + 105 + ], + "type": "text", + "content": "for Computational Linguistics: ACL-IJCNLP 2021, pages 3450-3466, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 114, + 526, + 169 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 114, + 526, + 169 + ], + "spans": [ + { + "bbox": [ + 304, + 114, + 526, + 169 + ], + "type": "text", + "content": "Jörg Tiedemann and Santhosh Thottingal. 2020. Opusmt-building open translation services for the world. In Proceedings of the 22nd Annual Conference of the European Association for Machine Translation. European Association for Machine Translation." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 178, + 525, + 232 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 178, + 525, + 232 + ], + "spans": [ + { + "bbox": [ + 304, + 178, + 525, + 232 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 241, + 525, + 296 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 241, + 525, + 296 + ], + "spans": [ + { + "bbox": [ + 304, + 241, + 525, + 296 + ], + "type": "text", + "content": "Daphne Wang, Mehrnoosh Sadrzadeh, Samson Abramsky, H Víctor, and VH Cervantes. 2021. Analysing ambiguous nouns and verbs with quantum contextuality tools. Journal of Cognitive Science, 22(3):391-420." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 305, + 525, + 327 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 305, + 525, + 327 + ], + "spans": [ + { + "bbox": [ + 304, + 305, + 525, + 327 + ], + "type": "text", + "content": "Warren Weaver. 1952. Translation. In Proceedings of the Conference on Mechanical Translation." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 336, + 525, + 380 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 336, + 525, + 380 + ], + "spans": [ + { + "bbox": [ + 304, + 336, + 525, + 380 + ], + "type": "text", + "content": "Shufang Xie, Yingce Xia, Lijun Wu, Yiqing Huang, Yang Fan, and Tao Qin. 2022. End-to-end entity-aware neural machine translation. Machine Learning, pages 1-23." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 389, + 525, + 455 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 389, + 525, + 455 + ], + "spans": [ + { + "bbox": [ + 304, + 389, + 525, + 455 + ], + "type": "text", + "content": "Deyi Xiong and Min Zhang. 2014. A sense-based translation model for statistical machine translation. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1459-1469, Baltimore, Maryland. Association for Computational Linguistics." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 464, + 525, + 529 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 464, + 525, + 529 + ], + "spans": [ + { + "bbox": [ + 304, + 464, + 525, + 529 + ], + "type": "text", + "content": "Zhen Yang, Bojie Hu, Ambyera Han, Shen Huang, and Qi Ju. 2020. CSP:code-switching pre-training for neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2624-2636, Online. Association for Computational Linguistics." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 538, + 525, + 604 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 538, + 525, + 604 + ], + "spans": [ + { + "bbox": [ + 304, + 538, + 525, + 604 + ], + "type": "text", + "content": "Yang Zhao, Lu Xiang, Junnan Zhu, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020a. Knowledge graph enhanced neural machine translation via multitask learning on sub-entity granularity. In Proceedings of the 28th International Conference on Computational Linguistics, pages 4495-4505." + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 304, + 613, + 525, + 690 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 613, + 525, + 690 + ], + "spans": [ + { + "bbox": [ + 304, + 613, + 525, + 690 + ], + "type": "text", + "content": "Yang Zhao, Jiajun Zhang, Yu Zhou, and Chengqing Zong. 2020b. Knowledge graphs enhanced neural machine translation. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 4039-4045. International Joint Conferences on Artificial Intelligence Organization. Main track." + } + ] + } + ], + "index": 20 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 781, + 312, + 791 + ], + "type": "text", + "content": "12900" + } + ] + } + ], + "index": 22 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 11 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 69, + 68, + 301, + 259 + ], + "blocks": [ + { + "bbox": [ + 69, + 68, + 301, + 259 + ], + "lines": [ + { + "bbox": [ + 69, + 68, + 301, + 259 + ], + "spans": [ + { + "bbox": [ + 69, + 68, + 301, + 259 + ], + "type": "table", + "html": "
HyperparameterRomanceIndo-Iranian
Batch Size40004000
Learning Rate0.00010.0001
Update Frequency44
OptimizerAdamAdam
w/ eps=5e-07w/ eps=1e-08
Weight Decay0.00010.01
Dropout0.050.01
Label Smoothing0.10.1
Contrastive Lambda1.01.0
Temperature0.10.01
Clip Norm1010
Replacement Ratio0.10.05
", + "image_path": "31ada28d65e82d7d8adee0dc62dba9eb2f02c22ceb71f5501528e27586a1b826.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 69, + 293, + 289, + 348 + ], + "blocks": [ + { + "bbox": [ + 68, + 267, + 289, + 280 + ], + "lines": [ + { + "bbox": [ + 68, + 267, + 289, + 280 + ], + "spans": [ + { + "bbox": [ + 68, + 267, + 289, + 280 + ], + "type": "text", + "content": "Table 7: Hyperparameters used for training our models." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 69, + 293, + 289, + 348 + ], + "lines": [ + { + "bbox": [ + 69, + 293, + 289, + 348 + ], + "spans": [ + { + "bbox": [ + 69, + 293, + 289, + 348 + ], + "type": "table", + "html": "
ModelEnItFrEsParamsRunning Time (for 100K sents)
ESCHER78.7279.1483.9477.52692 M63 mins
ConSeC79.0079.3084.4077.40287 M213 mins
", + "image_path": "27288b1cb359f0255c7a6cd1f0c58c67866846aaf51835270e3fc7ecf1499152.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 356, + 289, + 393 + ], + "lines": [ + { + "bbox": [ + 67, + 356, + 289, + 393 + ], + "spans": [ + { + "bbox": [ + 67, + 356, + 289, + 393 + ], + "type": "text", + "content": "Table 8: Results of four different EsCHER models trained on English (En), Italian (It), French (Fr) and Spanish (Es) and ConSeC." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 68, + 401, + 142, + 415 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 401, + 142, + 415 + ], + "spans": [ + { + "bbox": [ + 68, + 401, + 142, + 415 + ], + "type": "text", + "content": "A Appendix" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 425, + 181, + 439 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 425, + 181, + 439 + ], + "spans": [ + { + "bbox": [ + 68, + 425, + 181, + 439 + ], + "type": "text", + "content": "A.1 Hyperparameters" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 444, + 290, + 497 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 444, + 290, + 497 + ], + "spans": [ + { + "bbox": [ + 67, + 444, + 290, + 497 + ], + "type": "text", + "content": "We provide our detailed hyperparameter settings in Table 7. We optimize each hyperparameter independently in separate runs, and use the best settings in our experiments." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 68, + 510, + 198, + 523 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 510, + 198, + 523 + ], + "spans": [ + { + "bbox": [ + 68, + 510, + 198, + 523 + ], + "type": "text", + "content": "A.2 WSD Systems Details" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 529, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 529, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 529, + 291, + 772 + ], + "type": "text", + "content": "In the original AMuSE-WSD work, a multilingual version of the system was made available; however, EsCHER currently offers only an English model. For this reason, we train three distinct EsCHER models specifically tailored for Italian, Spanish, and French. We adopt the methodology outlined in the original work but adapt it to train the models using the XL-WSD (Pasini et al., 2021) splits for the respective languages and use mDeBERTa (He et al., 2023) as the underlying multilingual transformer architecture. By doing so, we ensure compatibility and improve performance in the targeted linguistic contexts as reported in Barba et al. (2021b) without incurring prohibitive computational costs. As a reference, we report in Table 8 the difference in performance between our EsCHER models and the results reported in Barba et al. (2021b) for the multilingual version of their system, ConSeC." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 304, + 71, + 481, + 84 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 71, + 481, + 84 + ], + "spans": [ + { + "bbox": [ + 304, + 71, + 481, + 84 + ], + "type": "text", + "content": "A.3 Verb Disambiguation Examples" + } + ] + } + ], + "index": 9 + }, + { + "type": "image", + "bbox": [ + 307, + 100, + 330, + 113 + ], + "blocks": [ + { + "bbox": [ + 307, + 100, + 330, + 113 + ], + "lines": [ + { + "bbox": [ + 307, + 100, + 330, + 113 + ], + "spans": [ + { + "bbox": [ + 307, + 100, + 330, + 113 + ], + "type": "image", + "image_path": "9a5ac047c023630dbed70d8d8decf27ca2cb72d983d11e1e38c7ff33933c5052.jpg" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "image_body" + } + ], + "index": 10 + }, + { + "bbox": [ + 333, + 103, + 498, + 112 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 103, + 498, + 112 + ], + "spans": [ + { + "bbox": [ + 333, + 103, + 498, + 112 + ], + "type": "text", + "content": "Source: The company turned a good profit after a year." + } + ] + } + ], + "index": 11 + }, + { + "type": "image", + "bbox": [ + 307, + 116, + 330, + 128 + ], + "blocks": [ + { + "bbox": [ + 307, + 116, + 330, + 128 + ], + "lines": [ + { + "bbox": [ + 307, + 116, + 330, + 128 + ], + "spans": [ + { + "bbox": [ + 307, + 116, + 330, + 128 + ], + "type": "image", + "image_path": "4e3cc23e105be67d106965a947aef2acf5de7ebf7b2465a684744523f46486be.jpg" + } + ] + } + ], + "index": 12, + "angle": 0, + "type": "image_body" + } + ], + "index": 12 + }, + { + "bbox": [ + 333, + 117, + 526, + 126 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 117, + 526, + 126 + ], + "spans": [ + { + "bbox": [ + 333, + 117, + 526, + 126 + ], + "type": "text", + "content": "AA: L'impresa ha trasformato un buon profitto dopo un anno." + } + ] + } + ], + "index": 13 + }, + { + "type": "image", + "bbox": [ + 307, + 132, + 330, + 144 + ], + "blocks": [ + { + "bbox": [ + 307, + 132, + 330, + 144 + ], + "lines": [ + { + "bbox": [ + 307, + 132, + 330, + 144 + ], + "spans": [ + { + "bbox": [ + 307, + 132, + 330, + 144 + ], + "type": "image", + "image_path": "6c7c4d54c434a853f057263aa7b1680129de3fdcf43434fe2c3c71798d99e3a9.jpg" + } + ] + } + ], + "index": 14, + "angle": 0, + "type": "image_body" + } + ], + "index": 14 + }, + { + "bbox": [ + 333, + 132, + 506, + 142 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 132, + 506, + 142 + ], + "spans": [ + { + "bbox": [ + 333, + 132, + 506, + 142 + ], + "type": "text", + "content": "WSP-NMT: La société ha fatto un bon profitti dopo un anno." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 151, + 524, + 182 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 151, + 524, + 182 + ], + "spans": [ + { + "bbox": [ + 302, + 151, + 524, + 182 + ], + "type": "text", + "content": "(a) \"trasformato\" means \"transformed\" and is an incorrect sense translation of \"turned\". \"fatto\" means \"made\", as in \"made a good profit\" and is a correct translation in context." + } + ] + } + ], + "index": 16 + }, + { + "type": "image", + "bbox": [ + 307, + 189, + 332, + 202 + ], + "blocks": [ + { + "bbox": [ + 307, + 189, + 332, + 202 + ], + "lines": [ + { + "bbox": [ + 307, + 189, + 332, + 202 + ], + "spans": [ + { + "bbox": [ + 307, + 189, + 332, + 202 + ], + "type": "image", + "image_path": "e4cbf7128272323c8b5478c0aa25a809315aee109c01f5c0d8819b537899f795.jpg" + } + ] + } + ], + "index": 17, + "angle": 0, + "type": "image_body" + } + ], + "index": 17 + }, + { + "bbox": [ + 333, + 191, + 525, + 200 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 191, + 525, + 200 + ], + "spans": [ + { + "bbox": [ + 333, + 191, + 525, + 200 + ], + "type": "text", + "content": "Source: To appropriate money for the increase of the navy." + } + ] + } + ], + "index": 18 + }, + { + "type": "image", + "bbox": [ + 307, + 206, + 330, + 218 + ], + "blocks": [ + { + "bbox": [ + 307, + 206, + 330, + 218 + ], + "lines": [ + { + "bbox": [ + 307, + 206, + 330, + 218 + ], + "spans": [ + { + "bbox": [ + 307, + 206, + 330, + 218 + ], + "type": "image", + "image_path": "e347c7e1bb7eb4a728964114195a8ca28ab98bfaf3ac69db36bb9cc38be9fa1a.jpg" + } + ] + } + ], + "index": 19, + "angle": 0, + "type": "image_body" + } + ], + "index": 19 + }, + { + "bbox": [ + 333, + 206, + 520, + 216 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 206, + 520, + 216 + ], + "spans": [ + { + "bbox": [ + 333, + 206, + 520, + 216 + ], + "type": "text", + "content": "AA: Per adeguare il denaro per l'augimento della tassa." + } + ] + } + ], + "index": 20 + }, + { + "type": "image", + "bbox": [ + 307, + 222, + 330, + 235 + ], + "blocks": [ + { + "bbox": [ + 307, + 222, + 330, + 235 + ], + "lines": [ + { + "bbox": [ + 307, + 222, + 330, + 235 + ], + "spans": [ + { + "bbox": [ + 307, + 222, + 330, + 235 + ], + "type": "image", + "image_path": "891006b6464f8c37d8775b333c1f356fe8550163858d78a0b153a094c14b1a56.jpg" + } + ] + } + ], + "index": 21, + "angle": 0, + "type": "image_body" + } + ], + "index": 21 + }, + { + "bbox": [ + 333, + 223, + 527, + 232 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 223, + 527, + 232 + ], + "spans": [ + { + "bbox": [ + 333, + 223, + 527, + 232 + ], + "type": "text", + "content": "WSP-NMT: Per stanziare fondi per l'auento dell'imbarcazione." + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 302, + 242, + 524, + 273 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 242, + 524, + 273 + ], + "spans": [ + { + "bbox": [ + 302, + 242, + 524, + 273 + ], + "type": "text", + "content": "(b) \"adequate\" is a verb meaning \"adapt\" or \"adjust\" and is an incorrect sense translation of \"appropriate\". \"stanziare\" means \"allocate\", as in \"allocate funds\", and is correct in context." + } + ] + } + ], + "index": 23 + }, + { + "type": "image", + "bbox": [ + 307, + 280, + 332, + 293 + ], + "blocks": [ + { + "bbox": [ + 307, + 280, + 332, + 293 + ], + "lines": [ + { + "bbox": [ + 307, + 280, + 332, + 293 + ], + "spans": [ + { + "bbox": [ + 307, + 280, + 332, + 293 + ], + "type": "image", + "image_path": "c0481bae738555daa72d9eac5359ba6d253d3a730e199c3f1a658803868ff8cb.jpg" + } + ] + } + ], + "index": 24, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 302, + 364, + 525, + 388 + ], + "lines": [ + { + "bbox": [ + 302, + 364, + 525, + 388 + ], + "spans": [ + { + "bbox": [ + 302, + 364, + 525, + 388 + ], + "type": "text", + "content": "Figure 7: Examples of verb disambiguation in DiBiMT Italian hypothesis translations by AA and WSP-NMT." + } + ] + } + ], + "index": 31, + "angle": 0, + "type": "image_caption" + } + ], + "index": 24 + }, + { + "bbox": [ + 332, + 282, + 507, + 290 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 332, + 282, + 507, + 290 + ], + "spans": [ + { + "bbox": [ + 332, + 282, + 507, + 290 + ], + "type": "text", + "content": "Source: The player had to backpedal before catching the ball." + } + ] + } + ], + "index": 25 + }, + { + "type": "image", + "bbox": [ + 307, + 296, + 330, + 306 + ], + "blocks": [ + { + "bbox": [ + 307, + 296, + 330, + 306 + ], + "lines": [ + { + "bbox": [ + 307, + 296, + 330, + 306 + ], + "spans": [ + { + "bbox": [ + 307, + 296, + 330, + 306 + ], + "type": "image", + "image_path": "d66f9393fa7e560b2de433b209ee0ec75083884d58b06353a4ab08bba295c902.jpg" + } + ] + } + ], + "index": 26, + "angle": 0, + "type": "image_body" + } + ], + "index": 26 + }, + { + "bbox": [ + 333, + 296, + 526, + 306 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 296, + 526, + 306 + ], + "spans": [ + { + "bbox": [ + 333, + 296, + 526, + 306 + ], + "type": "text", + "content": "AA: Il giocatore aveva dovuto tornare prima di catturare la balla." + } + ] + } + ], + "index": 27 + }, + { + "type": "image", + "bbox": [ + 307, + 311, + 330, + 322 + ], + "blocks": [ + { + "bbox": [ + 307, + 311, + 330, + 322 + ], + "lines": [ + { + "bbox": [ + 307, + 311, + 330, + 322 + ], + "spans": [ + { + "bbox": [ + 307, + 311, + 330, + 322 + ], + "type": "image", + "image_path": "afdb87b28a5889620426f25be3f98fbfb8a7d83316af957ff6eaa6b416e12828.jpg" + } + ] + } + ], + "index": 28, + "angle": 0, + "type": "image_body" + } + ], + "index": 28 + }, + { + "bbox": [ + 333, + 311, + 520, + 320 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 333, + 311, + 520, + 320 + ], + "spans": [ + { + "bbox": [ + 333, + 311, + 520, + 320 + ], + "type": "text", + "content": "WSP-NMT: Il glacatore era tornato indietro prima di prendere la palla." + } + ] + } + ], + "index": 29 + }, + { + "bbox": [ + 302, + 328, + 525, + 359 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 328, + 525, + 359 + ], + "spans": [ + { + "bbox": [ + 302, + 328, + 525, + 359 + ], + "type": "text", + "content": "(c) \"aveva dovuto tornare\" translates to \"had to return\" and is an incorrect translation of \"backpedal\". \"tornado indietro\" means to \"move (or run) back\" and contextually correct." + } + ] + } + ], + "index": 30 + }, + { + "bbox": [ + 302, + 401, + 525, + 673 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 401, + 525, + 673 + ], + "spans": [ + { + "bbox": [ + 302, + 401, + 525, + 673 + ], + "type": "text", + "content": "We show some examples of improved verb disambiguation of WSP-NMT in Figure 7, using examples from the DiBiMT test set. The AA hypotheses for these sentences contain translations that could have been appropriate in certain contexts but are incorrect here. For example, in Figure 7a, turned could translate into transformato when the context is referring to \"turning into something\". A similar explanation holds for Figure 7b where appropriate could translate into adeguare when talking about \"appropriating style\", \"appropriating language\" or \"appropriating software\", to name a few examples. Figure 7c is very interesting since backpedal does mean tornado indietro (\"move back\") in this context, but \"tornare\" (\"return\") is not an appropriate sense translation. These cases reflect how by carefully modelling for cross-lingual convergence of word senses during pretraining, WSP-NMT can avoid subtle translation errors that may arise when encountering ambiguous words." + } + ] + } + ], + "index": 32 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "spans": [ + { + "bbox": [ + 284, + 780, + 311, + 791 + ], + "type": "text", + "content": "12901" + } + ] + } + ], + "index": 33 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 12 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file diff --git a/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_content_list.json b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a6b5013ec2a032bcb8d822e933988fd7a1fdc279 --- /dev/null +++ b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_content_list.json @@ -0,0 +1,3158 @@ +[ + { + "type": "text", + "text": "CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translation", + "text_level": 1, + "bbox": [ + 178, + 82, + 818, + 120 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Weixiang Yan $^{1*}$", + "bbox": [ + 147, + 130, + 287, + 148 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Yuchen Tian\\*", + "bbox": [ + 317, + 131, + 445, + 147 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Yunzhe Li3", + "bbox": [ + 480, + 131, + 581, + 147 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Qian Chen", + "bbox": [ + 621, + 131, + 727, + 147 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Wen Wang", + "bbox": [ + 754, + 131, + 858, + 148 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1University of California, Santa Barbara 2The University of Hong Kong 3University of Illinois at Urbana-Champaign 4Speech Lab, Alibaba Group weixiangyan@ucsb.edu yuchent@connect.hku.hk yunzhel2@illinois.edu {tanqing.cq,w.wang}@alibaba-inc.com", + "bbox": [ + 144, + 162, + 850, + 230 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 339, + 266 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Recent code translation techniques exploit neural machine translation models to translate source code from one programming language to another to satisfy production compatibility or to improve efficiency of codebase maintenance. Most existing code translation datasets only focus on a single pair of popular programming languages. To advance research on code translation and meet diverse requirements of real-world applications, we construct CodeTransOcean, a large-scale comprehensive benchmark that supports the largest variety of programming languages for code translation. CodeTransOcean consists of three novel multilingual datasets, namely, MultilingualTrans supporting translations between multiple popular programming languages, NicheTrans for translating between niche programming languages and popular ones, and LLMTrans for evaluating executability of translated code by large language models (LLMs). CodeTransOcean also includes a novel cross-framework dataset, DLTrans, for translating deep learning code across different frameworks. We develop multilingual modeling approaches for code translation and demonstrate their great potential in improving the translation quality of both low-resource and high-resource language pairs and boosting the training efficiency. We also propose a novel evaluation metric Debugging Success Rate@K for program-level code translation. Last but not least, we evaluate LLM ChatGPT on our datasets and investigate its potential for fuzzy execution predictions. We build baselines for CodeTransOcean and analyze challenges of code translation for guiding future research. The CodeTransOcean datasets and code are publicly available at https://github.com/WeixiangYAN/CodeTransOcean.", + "bbox": [ + 144, + 300, + 460, + 868 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 510, + 252, + 653, + 266 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Early software systems are developed using programming languages such as Fortran and COBOL, which have a significantly smaller user base compared to modern mainstream programming languages (e.g., Python and Java). Hence maintaining and modernizing early software systems are expensive (Opidi, 2020). Moreover, the readability and compatibility of the mixed multitude of programming languages are challenging when migrating existing software systems to new technology ecosystems or integrating software systems using different programming languages. The code translation task aims to convert source code from one programming language to another and is of great value in industry.", + "bbox": [ + 507, + 287, + 884, + 527 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Code translation methods evolve from the inefficient, costly, and error-prone manual rewriting method to automatic methods. Automatic code translation methods can be categorized into compilers and transpilers, rule-based methods, and neural network based methods. Neural models (Feng et al., 2020; Wang et al., 2021, 2023b) have become dominant in code translation. Details of code translation methods are presented in Appendix A.1. The performance of neural models relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are limited by insufficient coverage of programming languages and mostly focusing on a single pair of popular programming languages, limited scale, and uneven data distribution. The widely used CodeTrans (Lu et al., 2021) is a small dataset containing only JavaC# parallel data for quite short code samples. Other datasets (Ahmad et al., 2023; Rozière et al., 2020; Zhu et al., 2022b; Nguyen et al., 2013; Chen et al., 2018) suffer from the same limitations. Consequently, existing code translation models (Feng et al., 2020; Wang et al., 2021; Ahmad et al., 2021) are confined to a narrow range of one-to-one code", + "bbox": [ + 507, + 533, + 884, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_footnote", + "text": "*Equal contribution. Work is supported by Speech Lab, Alibaba Group.", + "bbox": [ + 112, + 892, + 487, + 917 + ], + "page_idx": 0 + }, + { + "type": "page_number", + "text": "5067", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 0 + }, + { + "type": "footer", + "text": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5067-5089 December 6-10, 2023 ©2023 Association for Computational Linguistics", + "bbox": [ + 216, + 945, + 779, + 972 + ], + "page_idx": 0 + }, + { + "type": "table", + "img_path": "images/398bb1d135aaa49d2e09e6f0578a7e68bfad556cff83ed7d65042eeea2d8fe8f.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
CategoryLanguage/FrameworkDataset NameTrain/Dev/Test #SamplesAvg. #Tokens/SampleAvg. Length
MultilingualPython, C, C++, Visual Basic, Go, PHP, Java, C#MultilingualTrans19,115 / 3,759 / 7,545398 / 421 / 4911099 / 1135 / 1358
Swift, R, Rust, Fortran, Ada, Perl, COBOL, Lua, ...NicheTrans165,457 / 23,509 / 47,502292 / 375 / 505785 / 995 / 1372
Python, C, C++, Visual Basic, Go, PHP, Java, C#LLMTrans-/-/350-/-/270-/-/745
Cross-FrameworkPyTorch, TensorFlow, MXNet, PaddleDLTrans282 / 36 / 90625 / 1102 / 8751318 / 2441 / 1841
", + "bbox": [ + 117, + 80, + 884, + 254 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Table 1: Summary of our CodeTransOcean. We report #Samples, Avg. #Tokens Sample and Avg. Length for Train/Dev/Test sets of each dataset. Note that LLMTrans is only for testing. #Samples are on the program-level. #Tokens are based on RoBERTa tokenizer (Liu et al., 2019). Length is the number of characters.", + "bbox": [ + 112, + 262, + 882, + 306 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "translation scenarios. Moreover, deep learning has been broadly used and achieved unprecedented success. However, there are barriers between different deep learning frameworks during the actual production process. Existing code translation datasets also neglect important demands from real-world applications, including modernizing early software systems developed in niche programming languages and migrating code across different deep learning frameworks.", + "bbox": [ + 110, + 331, + 487, + 491 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "To address these limitations and advance neural code translation models, we construct a large-scale comprehensive multilingual code translation benchmark CodeTransOcean, summarized in Table 1. CodeTransOcean is an innovative benchmark that aims to provide a unified platform for evaluating various models on a comprehensive set of code translation tasks that reflect real-world demands. Based on this goal, each dataset in CodeTransOcean is specifically designed to tackle a key challenge in the field of code translation. CodeTransOcean includes three multilingual datasets, namely, the MultilingualTrans dataset (including eight popular programming languages), the NicheTrans dataset (translating between thirty-seven niche programming languages and the eight popular ones $^{1}$ ), and a specialized dataset LLMTrans (including 350 data samples and their executed results) to evaluate executability of code translated by large language models (LLMs), and a cross-framework dataset DLTrans facilitating our proposed task for translating code between deep learning frameworks to enhance code reusability.", + "bbox": [ + 110, + 494, + 489, + 865 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "DLTrans includes 408 samples covering four mainstream deep learning frameworks.", + "bbox": [ + 507, + 331, + 882, + 363 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Multilingual modeling shows great potential in neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023), but it has not been systematically explored for code translation. We investigate multilingual modeling for code translation using our MultilingualTrans, NicheTrans, and DLTrans datasets. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves the model training efficiency.", + "bbox": [ + 507, + 367, + 884, + 545 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Recent research indicates that the proficiency of the LLM ChatGPT in natural language translation is on par with commercial-grade translation systems (Jiao et al., 2023). To the best of our knowledge, our work is the first to systematically investigate the potential of ChatGPT in code translation. We develop a fully automated translation-execution-evaluation pipeline AutoTransExecutor to support this study. Note that match-based metrics and execution-based metrics have been used for evaluating code translation methods, with details in Appendix A.1. In order to accurately evaluate the usability of translated code from ChatGPT, we propose a novel execution-based evaluation metric Debugging Success Rate @K (DSR@K), which is the percentage of samples with translation results that successfully execute and produce the expected functionality after $K$ debugging rounds. On our LLMTrans dataset, the baseline ChatGPT setting achieves $48.57\\%$ DSR@0. We find that self-debugging and one-shot improve the performance while chain-of-thought strategies degrade the translation accuracy. Since our AutoTransEx", + "bbox": [ + 507, + 549, + 884, + 917 + ], + "page_idx": 1 + }, + { + "type": "page_footnote", + "text": "1We define popular and niche programming languages based on the TIOBE Programming Community Index, which is a metric of the popularity of programming languages.", + "bbox": [ + 112, + 879, + 487, + 919 + ], + "page_idx": 1 + }, + { + "type": "page_number", + "text": "5068", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "ecuter still cannot cover arbitrary programming languages, we also propose a novel metric fuzzy execution, attempting to address the limitations of existing evaluation metrics for code translation. Our preliminary study using ChatGPT shows that ChatGPT is still inadequate to predict fuzzy execution for any arbitrary programming language, which demands future research.", + "bbox": [ + 112, + 84, + 489, + 211 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Our contributions can be summarized as follows:", + "bbox": [ + 131, + 212, + 489, + 227 + ], + "page_idx": 2 + }, + { + "type": "list", + "sub_type": "text", + "list_items": [ + "- A large-scale multilingual code translation benchmark: CodeTransOcean covers the largest number of popular and niche programming languages so far with the largest scale. It also includes an unprecedented dataset for translating code across different deep learning frameworks and a dataset and an automated pipeline for evaluating LLMs on code translation. We establish baselines for all datasets in CodeTransOcean.", + "- Multilingual modeling for code translation: We are the first to systematically evaluate multilingual modeling on code translation for both high-resource and low-resource language pairs. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves training efficiency.", + "- ChatGPT on code translation: We conduct the first comprehensive study of the potential of ChatGPT on code translation, investigating efficacy of prompting strategies, hyperparameters, self-debugging, One-shot, and Chain-of-Thought.", + "- New evaluation metrics: We propose $DSR@K$ to evaluate translation and debugging capabilities of LLMs. We also propose a fuzzy execution metric based on LLMs and conduct a preliminary study using ChatGPT on this metric." + ], + "bbox": [ + 114, + 239, + 490, + 671 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "2 Related Work", + "text_level": 1, + "bbox": [ + 112, + 684, + 270, + 699 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Code Translation Datasets The success of neural models for code translation relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are plagued by issues such as insufficient coverage of programming languages, limited scale, and imbalanced data distribution. The widely used code translation dataset CodeTrans (Lu et al., 2021) in the CodeXGLUE benchmark consists of Java-C# function pairs. The small parallel corpus AVATAR (Ahmad et al., 2023) is constructed for Java-Python code translation. Nguyen et al. (2013) construct a Java-C# dataset to explore statistical machine", + "bbox": [ + 112, + 709, + 490, + 917 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "translation on code translation tasks $^2$ . Chen et al. (2018) explore this dataset from Nguyen et al. and also construct a CoffeeScript-JavaScript parallel dataset for investigating tree-to-tree neural models for code translation. Rozière et al. (2020) create a dataset containing 852 programs to evaluate unsupervised methods. Recently, Zhu et al. (2022b) construct a new translation dataset CoST from the GeeksForGeeks website $^3$ . Subsequently, they release the translation dataset XLCoST (Zhu et al., 2022a), which expands the CoST dataset by 7.3 times. However, the limited language coverage of these datasets and their imbalanced data distribution hinder their practical applications. Rozière et al. (2022) construct the TransCoder-ST dataset to perform unsupervised code translation using automated unit tests. Details of these datasets are summarized in Table 2. Rithy et al. (2022) proposes a code translation dataset XTest containing nine programming languages with unit tests, but it is not open-sourced $^4$ . Although CodeNet (Puri et al., 2021) comprises many problem statements and provides corresponding solutions, experts have proven that about half of the CodeNet dataset has incorrect solutions (Zhu et al., 2022b), making it unsuitable for code translation tasks. With the limitations of existing code translation datasets, neural models trained on them may encounter overfitting, underfitting, and poor generalizability. Clearly, these issues impede the development of neural models for code translation. Therefore, constructing datasets that effectively address these problems is critical to enhance performance of code translation algorithms.", + "bbox": [ + 505, + 84, + 885, + 615 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Code Translation Methods and Evaluation Metrics Details of code translation methods and evaluation metrics are presented in Appendix A.1.", + "bbox": [ + 507, + 625, + 885, + 673 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3 The CodeTransOcean Benchmark", + "text_level": 1, + "bbox": [ + 507, + 684, + 838, + 699 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "In this section, we provide detailed descriptions and analyses of our CodeTransOcean benchmark, including the code translation tasks, their associated datasets, and dataset statistics. Details of data collection methods and licensing information as well as quality control and quality assessment are presented in Appendix A.2. Note that the vast", + "bbox": [ + 505, + 709, + 884, + 822 + ], + "page_idx": 2 + }, + { + "type": "page_footnote", + "text": "It was not possible to count specific information about this dataset because it was not released to the public and we were unable to obtain response from the authors.", + "bbox": [ + 507, + 831, + 882, + 866 + ], + "page_idx": 2 + }, + { + "type": "page_footnote", + "text": "3In Table 2, we report the program-level counts for the CoST dataset to facilitate a fair comparison with our own program-level datasets.", + "bbox": [ + 507, + 866, + 880, + 904 + ], + "page_idx": 2 + }, + { + "type": "page_footnote", + "text": "4We tried to contact the authors but there was no response.", + "bbox": [ + 531, + 904, + 880, + 917 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "5069", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 2 + }, + { + "type": "table", + "img_path": "images/0000d049d6b66d6351311be18b210c24a3bfbf37b429937ccbf1f309c3c8d954.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Dataset SourceProgramming Languages#SamplesAvg. #Tokens/SampleAvg. Length
CodeTrans (Lu et al., 2021)Java, C#11,80059 / 63 / 58205 / 218 / 202
Avatar (Ahmad et al., 2023)Java, Python9,517239 / 235 / 234691 / 687 / 688
Nguyen et al.(Nguyen et al., 2013)Java, C#16,966--
Lachaux et al.(Rozière et al., 2020)C++, Java, Python852- / 119 / 120- / 313 / 311
CoST (Zhu et al., 2022b)C++, Java, Python, C#, Javascript, PHP, C16,738272 / 180 / 199770 / 458 / 511
TransCoder-ST (Rozière et al., 2022)Java, C++, Python437,030--
XLCoST (Zhu et al., 2022a)C++, Java, Python, C#, Javascript, PHP, C122,151234 / 232 / 222644 / 634 / 606
", + "bbox": [ + 119, + 80, + 884, + 229 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Table 2: Summary of existing code translation datasets. For #Samples, we report program-level counts for Avatar, CoST, and XLCoST. Given that the original samples from other datasets are not organized at the program-level, we report counts at the snippet-level for these datasets. Avg. #Tokens/Sample and Avg. Length are counted in the same way as Table 1.", + "bbox": [ + 112, + 237, + 882, + 297 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "majority of the samples in CodeTransOcean provides explicit input and output, which is equivalent to unit tests. Overall, CodeTransOcean consists of 270,507 samples (over 200K unit tests), covering 45 programming languages for multilingual code translation and 4 deep learning frameworks for cross-framework code translation5. Note that all samples in all CodeTransOcean datasets are constructed at the program-level. We ensure a balanced distribution of each language/framework when constructing the datasets (Appendix A.2). There is no overlap between CodeTransOcean datasets and existing code translation datasets.", + "bbox": [ + 110, + 321, + 489, + 530 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.1 Multilingual Code Translation", + "text_level": 1, + "bbox": [ + 112, + 544, + 401, + 560 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "With the increasing need to unify the language variety when implementing system integration or extensions with multilingual programming environments, we construct the MultilingualTrans dataset for multiple popular programming languages6. Among programming languages in the rankings, we select the Top-10 languages as popular ones except JavaScript and SQL7 and construct the MultilingualTrans dataset based on the 8 pro", + "bbox": [ + 112, + 567, + 489, + 712 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "gramming languages. We treat the other languages in the rankings as niche languages and construct the NicheTrans dataset for translating between niche languages and popular languages. Additionally, in order to quantitatively evaluate the execution capabilities of the code generated by LLMs (e.g., ChatGPT, PaLM2 (Anil et al., 2023)), we construct LLMTrans, which includes the execution results for a subset of MultilingualTrans and facilitates evaluating LLMs for multilingual code translation.", + "bbox": [ + 507, + 321, + 884, + 482 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "MultilingualTrans Dataset This dataset contains 30,419 program samples covering eight popular programming languages, namely, C, C++, C#, Java, Python, Go, PHP, and Visual Basic. Table 11 shows the statistics of each language pair. Note that XLCoST (Zhu et al., 2022a) is the only existing multilingual code translation dataset. Compared to XLCoST, MultilingualTrans is advantageous in more balanced data distribution across various programming languages, practicality of language pairs, and data quality. For example, the real-world requirement for translating Java into JavaScript as in XLCoST is quite limited. As to data quality, our MultilingualTrans originates from a programming chrestomathy website, with all data already reviewed and verified by the website.", + "bbox": [ + 507, + 491, + 884, + 749 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "NicheTrans Dataset The NicheTrans dataset contains 236,468 program samples, covering code translation pairs from thirty-seven niche programming languages, including Ada, COBOL, Pascal, Perl, Erlang, Fortran, Scala, Julia and others, to the eight popular ones. Table 12 shows statistics of each niche language. Although many studies have highlighted the practical necessity of code translation for modernizing niche programming languages (Chen et al., 2018; Zhu et al., 2022b; Rozière et al.,", + "bbox": [ + 507, + 758, + 885, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "$^{5}$ Code Translation also extends to conversions between different versions of the same language, e.g., Python 2 to Python 3. However, according to our survey, these translation tasks are quite straightforward. Naive Copy methods, specific translation tools, and tutorials (e.g., Python 2 to 3 Conversion Guide) already achieve high translation accuracy. As a result, we no longer include these types of tasks in our benchmark.", + "bbox": [ + 112, + 724, + 487, + 809 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "6We categorize languages as popular or niche based on the TIOBE Index Programming Language Rankings released in April 2023 https://www.tiobe.com/tiobe-index/.", + "bbox": [ + 112, + 809, + 485, + 857 + ], + "page_idx": 3 + }, + { + "type": "page_footnote", + "text": "7It is important to note that JavaScript and SQL, both within the top 10, are mainly used for front-end programming and database management respectively, signifying considerable differences in their usage scenarios compared to the other 8 languages.", + "bbox": [ + 112, + 857, + 485, + 917 + ], + "page_idx": 3 + }, + { + "type": "page_number", + "text": "5070", + "bbox": [ + 480, + 927, + 521, + 940 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "2020), our NicheTrans dataset is the first dataset for code translation between these niche languages and popular ones. We believe this dataset will not only facilitate modernization of outdated programming languages more effectively, but also augment and evaluate generalizability of neural models.", + "bbox": [ + 112, + 84, + 487, + 180 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "LLMTrans Dataset The LLMTrans dataset aims to provide a benchmark for evaluating the performance of LLMs on code translation. The dataset translates seven popular programming languages to Python, totaling 350 program samples. We compile and test these samples and record the execution results. Based on this dataset, we design and implement an automated pipeline, AutoTransExecutor $^{8}$ , automatically using LLMs to conduct code translation, execution, debugging, and calculating the success rate. This dataset and the automated pipeline ease investigation of the actual debugging success rate of LLMs on code translation and effectively measure the practical usability of LLMs. Details of the LLMTrans dataset are in Table 1.", + "bbox": [ + 112, + 187, + 489, + 429 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "3.2 Cross-framework Code Translation", + "text_level": 1, + "bbox": [ + 112, + 441, + 438, + 455 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Cross-Deep-Learning-Framework Translation Task The widespread applications of deep learning (DL) has spawned emergence of various DL frameworks, such as PyTorch, TensorFlow, MXNet, and Paddle. However, there are significant differences in syntax and dependency libraries between different frameworks, severely impeding reusability of projects9. Moreover, studies illustrate significant disparities in energy consumption and economic costs during training and inference between various frameworks (Georgiou et al., 2022). Selecting an appropriate DL framework for green AI has become paramount in an era of large models (Ananthaswamy, 2023). Code reusability and energy-economic efficiency in DL have emerged as critical considerations for both research and practical engineering implementation. Converting code between different DL frameworks is challenging, mainly due to differences between frameworks, code complexity, structural inconsistencies, and cross-platform compatibility (more details are in Appendix A.3). Existing cross-DL-framework adaptive technologies such as the ONNX10 model conversion protocol require both parties to import", + "bbox": [ + 112, + 461, + 487, + 847 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "and export based on agreed data formats or to convert only the final model through the computation graphs. These technologies have obvious limitations. In contrast, we propose a Cross-DL-framework Translation task for code migration between different DL frameworks through code translation (Appendix A.4). Compared to existing cross-framework adaptive technologies, Cross-DL-framework Translation achieves re-implementation under multiple DL frameworks through an automated process, which not only generates highly readable code and enables secondary development, but also provides developers with flexibility on combining advantages of multiple frameworks.", + "bbox": [ + 507, + 84, + 884, + 311 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "DLTrans Dataset We construct the DLTrans dataset for Cross-DL-framework Translation, including four deep learning frameworks and spanning twelve directions. To the best of our knowledge, our work is the first to define the cross-DL-framework translation task and construct a corresponding dataset. We create two subsets of different granularities based on the collected code, namely, coarse-grained at the program level and fine-grained at the function or class level. Each code pair comprises code that shares the same functionality but is written in different popular DL frameworks, including PyTorch, TensorFlow, MXNet, and Paddle. The coarse-grained and fine-grained datasets have 408 and 3,270 samples, respectively. In this work, we only experiment on the coarse-grained subset.", + "bbox": [ + 505, + 322, + 884, + 595 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4 Experiments", + "text_level": 1, + "bbox": [ + 507, + 612, + 653, + 627 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "We present experiments of multilingual training for code translation (Section 4.1). We then introduce a novel evaluation metric Debugging Success Rate@K for program-level code translation (Section 4.2) and the first comprehensive exploration of ChatGPT for code translation (Section 4.3).", + "bbox": [ + 507, + 640, + 882, + 736 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "4.1 Multilingual Modeling", + "text_level": 1, + "bbox": [ + 507, + 751, + 732, + 766 + ], + "page_idx": 4 + }, + { + "type": "text", + "text": "Multilingual modeling has been pivotal in broadening the applicability of neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023; Johnson et al., 2017). This is primarily evidenced in enhancing the performance of low-resource languages and cross-language transfer learning (Mohammadshahi et al., 2022; Zoph et al., 2016; Nguyen and Chiang, 2017; Johnson et al., 2017). CodeTransOcean covers nearly fifty", + "bbox": [ + 507, + 774, + 884, + 919 + ], + "page_idx": 4 + }, + { + "type": "page_footnote", + "text": "$^{8}$ AutoTransExecutor only supports translation from any source language to Python. We discuss it in Limitations. \n $^{9}$ https://www.assemblyai.com/blog/pytorch-vs-tensorflow-in-2023/ \n $^{10}$ https://onnx.ai/", + "bbox": [ + 112, + 853, + 487, + 917 + ], + "page_idx": 4 + }, + { + "type": "page_number", + "text": "5071", + "bbox": [ + 480, + 928, + 517, + 940 + ], + "page_idx": 4 + }, + { + "type": "table", + "img_path": "images/22b0cdbc94b4527d6aa88b060bf77e375850d3c2d3133e89bd374ce1de4cc19d.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
AverageOne-to-One (baseline)Many-to-OneMany-to-ManyOne-to-Many
High-resource4.685.56 (↑ 0.88)5.94 (↑ 1.26)6.18 (↑ 1.50)
Low-resource4.834.85 (↑ 0.02)4.95 (↑ 0.12)5.84 (↑ 1.01)
All5.195.31 (↑ 0.12)5.81 (↑ 0.62)6.42 (↑ 1.23)
", + "bbox": [ + 228, + 80, + 766, + 143 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Table 3: Average BLEU scores of the four multilingual modeling strategies, One-to-One, Many-to-One, Many-to-Many, and One-to-Many, for All language pairs, High-resource language pairs, and Low-resource language pairs.", + "bbox": [ + 112, + 153, + 884, + 184 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "programming languages and deep learning frameworks. We use its datasets to explore multilingual modeling on code translation tasks.", + "bbox": [ + 112, + 208, + 489, + 256 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Experimental Setups In this work, we use pretrained CodeT5+ (Wang et al., 2023b) $^{11}$ as the backbone based on its superior performance on code understanding and generation evaluations reported in (Wang et al., 2023b). We use the MultilingualTrans dataset to investigate four multilingual modeling strategies based on data sharing in the source or target language or both, namely, One-to-One, One-to-Many, Many-to-One, and Many-to-Many, with One-to-One as the baseline. Details of the four strategies are in Appendix A.5. To understand the strengths and weaknesses of the four strategies, we compare their average performance on all language pairs and focus on low-resource and high-resource pairs. Since the CodeBLEU metric (Ren et al., 2020) does not cover all eight languages in MultilingualTrans, we use BLEU to measure translation accuracy for the four strategies. Then, we establish baselines for the DLTrans and NicheTrans datasets.", + "bbox": [ + 115, + 266, + 489, + 586 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "We rank the resource richness of the eight programming languages in MultilingualTrans in descending order based on their amounts in the CodeT5+ pre-training data, as Java, PHP, C, C#, Python, C++, and Go (Visual Basic is not covered by the CodeT5+ pre-training data). Based on this ranking, we consider Visual Basic, C++, and Go as low-resource languages and Java, PHP and C as high-resource languages.", + "bbox": [ + 112, + 588, + 489, + 733 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Results and Analysis Detailed experimental results are shown in Table 14 in Appendix. For All language pairs, the performance of the four strategies is ranked as One-to-Many $>$ Many-to-Many $>$ Many-to-One $>$ One-to-One. (1) Under One-to-Many strategy, the model encoder can provide more comprehensive information for source language translation due to its ability to absorb more source", + "bbox": [ + 112, + 741, + 489, + 872 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "language features, thereby improving generalizability of the model. (2) Many-to-Many can be considered as expanding the One-to-Many strategy by employing a greater volume of non-source language data for training. Since the encoder must be attuned to the features of various languages simultaneously under Many-to-Many, parameter sharing may potentially undermine the performance. (3) Many-to-One helps the model to learn from a broader range of data than the baseline. Specific patterns or expressions in diverse source languages assist the model in more precisely comprehending how to translate into the target language. The shared semantic representations across different source languages allow the model to implement effective transfer learning strategies. Furthermore, increase in training samples enables the model to optimize the loss function more stably. These results are consistent with previous findings on multilingual modeling for natural language translation (Aharoni et al., 2019): Many-to-Many models, trained across multiple target languages instead of just one target language, can function effectively as a regularization strategy for Many-to-One, thereby reducing the possibility of over-matching.", + "bbox": [ + 507, + 208, + 884, + 609 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "For High-resource and Low-resource languages, as shown in Table 3, the ranking of the four strategies is the same as for All, but there is notable difference in their adaptability across languages of varying resource scales. High-resource languages can take advantage more effectively from the shared information across multiple source languages; whereas, low-resource languages are relatively less equipped to handle the additional uncertainty and noise introduced by shared parameters, and thus often have to rely on a larger volume of source language data to optimize their benefits.", + "bbox": [ + 507, + 612, + 885, + 804 + ], + "page_idx": 5 + }, + { + "type": "text", + "text": "Results from the Many-to-Many strategy on DL-Trans and NicheTrans datasets are shown in Tables 4 and 5. The experimental results suggest that significant improvements in translation accuracy can be achieved by swapping the source and target languages in the training set to facilitate data augmentation and training a bidirectional model.", + "bbox": [ + 507, + 806, + 885, + 919 + ], + "page_idx": 5 + }, + { + "type": "page_footnote", + "text": "11We will conduct evaluations of a broader selection of models on our datasets in future work, including LLaMA (Touvron et al., 2023), WizardCoder (Luo et al., 2023), etc.", + "bbox": [ + 112, + 879, + 489, + 917 + ], + "page_idx": 5 + }, + { + "type": "page_number", + "text": "5072", + "bbox": [ + 480, + 927, + 521, + 940 + ], + "page_idx": 5 + }, + { + "type": "table", + "img_path": "images/5a5c925ac7cf9c581b879bc1de16263cf7b0bd79c7070ee13083410b244afaf7.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
MethodMetricPyTorchTensorFlowMXNetPaddle
EMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEU
NaivePyTorch---27.2766.2569.4628.1872.7776.6330.9180.3583.13
TensorFlow27.2766.3268.92---29.0963.7967.9427.2763.0465.81
MXNet28.1872.8674.1529.0963.8466.06---28.1869.4971.09
Paddle30.9180.2584.8327.2762.9467.7828.1869.4375.09---
CodeT5+PyTorch---35.45±0.9171.16±0.7370.54±0.7542.73±2.4181.76±0.4582.52±0.5643.64±1.5885.76±0.6085.07±0.74
TensorFlow34.85±1.3871.97±0.5671.08±0.72---36.67±1.8972.77±0.6173.04±0.1829.70±2.6369.38±0.3868.76±0.32
MXNet32.12±2.2977.79±0.1376.43±0.1431.82±1.5867.22±0.3967.68±0.27---29.09±0.9174.26±0.4673.27±0.42
Paddle43.03±4.1086.25±0.8686.09±0.8829.39±2.9369.43±0.5769.57±0.5135.75±0.5378.65±0.6279.46±0.38---
", + "bbox": [ + 115, + 82, + 884, + 183 + ], + "page_idx": 6 + }, + { + "type": "table", + "img_path": "images/b5184ffc51f6f38a6b0e744edd995df25c5860875dbc5d6837cfe9a6a692608e.jpg", + "table_caption": [ + "Table 4: Results on DLTrans of Naive and CodeT5+_220M with Many-to-Many strategy. We run each experiment with 3 random seeds and report the mean and standard deviation of EM, BLEU, and CodeBLEU scores." + ], + "table_footnote": [], + "table_body": "
BLEUNaiveTwo-wayOne-way
Many-to-C2.364.604.86
Many-to-C#2.534.483.82
Many-to-C++1.994.783.32
Many-to-Go3.115.243.19
Many-to-Java3.185.235.34
Many-to-PHP4.372.461.98
Many-to-Python2.872.381.67
Many-to-VB1.692.171.97
Average2.763.923.27
", + "bbox": [ + 146, + 241, + 455, + 385 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Table 5: BLEU scores on NicheTrans of Naive and CodeT5+_220M with Many-to-Many strategy. One-way denotes training models only from niche to popular, while Two-way denotes training in both directions.", + "bbox": [ + 112, + 393, + 489, + 453 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Notably, prior studies on multilingual neural machine translation often overlook the comparison between One-to-Many and other strategies. Nevertheless, One-to-Many demonstrates superiority over the One-to-One baseline across all our experiments. Overall, our results strongly recommend a targeted multilingual modeling strategy for code translation, as it not only can translate multiple language pairs with a single model, but also achieves better and more stable accuracy than baselines.", + "bbox": [ + 112, + 479, + 489, + 640 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.2 Debugging Success Rate@K", + "text_level": 1, + "bbox": [ + 112, + 653, + 381, + 671 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "For evaluations, we adopt existing code translation evaluation metrics in our experiments, including Exact Match (EM), BLEU, and CodeBLEU (details are in Appendix A.1.2). However, all these metrics are based on surface-form matching (or with some adaptations as for CodeBLEU) and are not suitable for our program-level translation tasks since they cannot reliably evaluate functional correctness of translated code. Moreover, in real-world software development scenarios, developers typically ensure the functionality of code by testing and debugging upon completion, rather than writing and testing multiple versions of the code to achieve the expected functionality as measured by the existing pass@k (Kulal et al., 2019) metric.", + "bbox": [ + 112, + 677, + 489, + 919 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "Meanwhile, recent research shows that LLMs such as ChatGPT demonstrate preliminary code debugging capabilities (Chen et al., 2023b,a). Hence, we propose a novel and robust evaluation metric for LLM on code translation, Debugging Success Rate@K (DSR@K), by measuring whether the translated code can be compiled and executed with the same behavior as the input source code, with K rounds of debugging. To the best of our knowledge, $DSR@K$ is the first metric designed to accurately reflect real-world software development scenarios.", + "bbox": [ + 507, + 244, + 884, + 436 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "$DSR@K$ is the percentage of the samples that successfully execute and produce the expected results among all samples. Each sample is given $K$ generation and debugging attempts by an LLM. If the generated code successfully executes and produces the expected results with these $K$ rounds, the sample is marked as successful. $DSR@K$ is computed as $\\frac{1}{N}\\sum_{i=1}^{N}S(i,K)$ , where $N$ denotes the total number of samples. If the $i^{th}$ code sample succeeds within $K$ attempts, then $S(i,K) = 1$ ; otherwise, $S(i,K) = 0$ . Note that DSR@0 can be used for program-level code translation evaluation for any models. In this work, we employ DSR@K to evaluate the ability of LLMs such as ChatGPT for debugging code and translating code with debugging results.", + "bbox": [ + 507, + 438, + 884, + 696 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "4.3 ChatGPT for Code Translation", + "text_level": 1, + "bbox": [ + 507, + 705, + 801, + 720 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "The recent LLM ChatGPT demonstrates competitive performance on language generation tasks such as summarization and machine translation (Yang et al., 2023; Peng et al., 2023; Gao et al., 2023). However, ChatGPT for code translation has not been systematically explored. We study the effectiveness and potential of ChatGPT on code translation and investigate strategies to improve its performance. We use DSR@K as the principal evaluation metric since we focus on the practical usability of ChatGPT. We use the ChatGPT API and gpt-3.5-turbo as the default model and evaluate on the", + "bbox": [ + 507, + 726, + 884, + 917 + ], + "page_idx": 6 + }, + { + "type": "page_number", + "text": "5073", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 6 + }, + { + "type": "text", + "text": "LLMTrans dataset for all experiments. We investigate the efficacy of prompts and hyperparameters and context in zero-shot setting, then compare one-shot versus zero-shot and study Chain-of-Thought.", + "bbox": [ + 112, + 84, + 489, + 149 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Effect of Prompts and Hyperparameters Prior works show that prompts can influence the performance of ChatGPT (Zhong et al., 2023; Peng et al., 2023; Jiao et al., 2023). We set an initial prompt \"Translate [SL] to [TL]: [SC].\" as the baseline, where [SL] and [TL] denote the source language and the target language respectively and [SC] denotes the source code. We also add \"Do not return anything other than the translated code.\" for each prompting strategy to require ChatGPT to return only code in order to ease code execution. We design three prompt variants. Details of the experimental settings and prompt variants are in Appendix A.6. We also investigate the effect of hyperparameters on code translation performance.", + "bbox": [ + 110, + 161, + 489, + 401 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "As shown in Table 6, implementing role assignments, clarifying usage, and polite inquiry in prompts all degrade the performance compared to the baseline prompt. These results show that the baseline with the most straightforward prompt produces the best performance, possibly because it provides clear, short, and unambiguous instructions for the task to the model. More intricate prompting strategies may introduce noise and confuse ChatGPT. The performance of polite inquiry prompt is comparable to but still worse than the baseline performance. We speculate that the improvement from polite inquiries in prior studies (Akin, 2023) may stem from their explicit and comprehensive formulations which make it easier for the model to understand the task requirements. We also observe in Table 6 that same as prior findings, BLEU and CodeBLEU have no obvious positive correlations with the debugging success rate (DSR@0). Since the reference target code exhibits the same functionality as the source language code but their execution results could differ slightly, EM also does not correlate with DSR@0. Therefore, in subsequent experiments, we only report DSR@0. We also evaluate the CodeT5+_220M model on LLMTrans with the Many-to-Many strategy and find that DSR@0 is 0, suggesting that CodeT5+_220M Zero-shot is unable to generate executable translation results.", + "bbox": [ + 115, + 401, + 489, + 853 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "ChatGPT selects the token with the highest probability during generation. The hyperparameter temperature influences the randomness of the generated text, while top $p$ controls the range of vocabu", + "bbox": [ + 110, + 854, + 489, + 919 + ], + "page_idx": 7 + }, + { + "type": "table", + "img_path": "images/d801725d42e22778939a72bce379c9029a327873f84dd8bd8d2c0ee14f432bb7.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
StrategyExpt #numEMBLEUCodeBLEUDSR@0
Baseline-0.2910.8324.4648.57%
Role assignments10.0011.0624.3643.43%
20.0011.0624.4843.14%
30.0010.7024.0841.71%
40.0010.7324.0840.86%
Polite inquiry10.2910.8324.3747.71%
20.8610.8724.2647.71%
Clarify usage-0.2910.6324.1144.00%
Divide-and-Conquer-0.007.4425.3022.86%
", + "bbox": [ + 510, + 80, + 882, + 199 + ], + "page_idx": 7 + }, + { + "type": "table", + "img_path": "images/54e89413900c3c974a948b5c00504a5e4d9852c7dcc00035cc534ac19c706f5b.jpg", + "table_caption": [ + "Table 6: Zero-shot performance of ChatGPT with different prompt variants and contextual strategies. Baseline denotes ChatGPT with the baseline prompt. Details of the prompt variants (Expt #num) are in Appendix A.6." + ], + "table_footnote": [], + "table_body": "
KthDebugDSRKthDebugDSR
048.57%252.29%
151.43%352.57%
", + "bbox": [ + 539, + 287, + 850, + 340 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Table 7: ChatGPT performance at the ${K}^{th}$ debugging.", + "bbox": [ + 509, + 349, + 878, + 365 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "lary considered during generation. Higher temperature or top_p could increase diversity in the generated results from ChatGPT. However, as shown in Table 16 in Appendix, independently varying temperature or top_p does not notably change the performance of ChatGPT; hence for the other ChatGPT experiments, we set both temperature and top_p as 0 to ensure stability an reproducibility.", + "bbox": [ + 507, + 384, + 884, + 513 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Effect of Context We explore a Divide-and-Conquer strategy, which segments the source language code into snippets (e.g., functions and subfunctions), translate each snippet independently, then merge their outputs as the final result. As shown in Table 6, Divide-and-Conquer significantly degrades the performance. We hypothesize that lack of the global context in Divide-and-Conquer could prevent ChatGPT from considering the overall structure and variable configurations of the code for translation.", + "bbox": [ + 507, + 523, + 884, + 699 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "Effect of Self-debugging Since ChatGPT has shown preliminary capability in error detection and correction during code generation (Shinn et al., 2023; Chen et al., 2023b; Kim et al., 2023; Nair et al., 2023; Madaan et al., 2023), we use ChatGPT to perform multiple rounds of self-debugging and investigate the impact on DSR. Specifically, ChatGPT first translates the source language code into the target language (which is Python as in our AutoTransExecutor) and then attempts to execute the translated code. If the execution passes and executing the translated code exhibits the same functionality as the source code, it is regarded as", + "bbox": [ + 507, + 709, + 882, + 917 + ], + "page_idx": 7 + }, + { + "type": "page_number", + "text": "5074", + "bbox": [ + 480, + 927, + 521, + 940 + ], + "page_idx": 7 + }, + { + "type": "text", + "text": "a successful execution. Otherwise, feedback from the compiler will be also fed to ChatGPT for the next round of translation, and this process is repeated until reaching a pre-defined number $K$ of debugging rounds. The whole process is shown in Table 17 in Appendix. As shown in Table 7, DSR improves significantly with multiple rounds of self-debugging. The first self-debugging improves DSR by $3\\%$ absolutely. Each subsequent round of self-debugging brings further gain but DSR begins to plateau after the second debugging round. This suggests that ChatGPT has limitations in its capacity to rectify errors after multiple debugging cycles, which is consistent with human behaviors.", + "bbox": [ + 112, + 84, + 492, + 311 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Effect of One-shot In-context learning (Brown et al., 2020) allows the model to learn from input examples, enabling it to understand and manage each new task. This method has been validated as an effective strategy for enhancing the performance of model inference (Peng et al., 2023; Liu et al., 2023a). Therefore, we explore one-shot learning for ChatGPT on code translation. We investigate three one-shot learning sample selection strategies. Descriptions of the strategies and the corresponding prompts are in Appendix A.7.", + "bbox": [ + 112, + 324, + 489, + 500 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Table 8 shows that all three One-shot learning strategies effectively improve DSR@0 of ChatGPT over the Zero-shot baseline. The Experiment#2 strategy (provided contextual example has both same source and target languages as the original task) achieves the best performance, yielding $1.72\\%$ absolute gain in DSR@0, with Experiment #1 (example has the same target language but different source language) and #3 (example has different source and target languages) following closely with $1.14\\%$ and $0.29\\%$ absolute gains, respectively. These results show that One-shot learning entirely tailored to the translation requirements is most effective in boosting code translation performance for ChatGPT. The results corroborate previous findings in natural language translation (Peng et al., 2023) that the performance of ChatGPT is sensitive to the provided contextual example in One-shot learning.", + "bbox": [ + 115, + 502, + 490, + 793 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Effect of Chain-of-Thought Chain-of-Thought (CoT) allows the model to simulate an orderly and structured way of thinking by sorting out the thinking process. It helps guide the model to output the final answer step by step (Wei et al., 2022; Peng et al., 2023; Kojima et al., 2022). For code translation, we investigate four CoT strategies. Detailed", + "bbox": [ + 112, + 806, + 489, + 919 + ], + "page_idx": 8 + }, + { + "type": "table", + "img_path": "images/30dbaeeb4c821542f1b133c2e584de1440a53c0f2c8c636ca82d25ab489ec5a4.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
StrategyExpts #numDSR@0StrategyExpts #numDSR@0
Baseline-48.57%CoT146.00%
One-shot149.71%242.57%
250.29%348.29%
348.86%445.43%
", + "bbox": [ + 512, + 82, + 884, + 149 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Table 8: Performance of ChatGPT with One-shot and CoT strategies compared to the Zero-shot Baseline. Details of Expt #num are in Appendix A.7 and A.8.", + "bbox": [ + 507, + 159, + 884, + 203 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "descriptions and translation prompts for each strategy are in Appendix A.8. As shown in Table 8, CoT degrades executability of the translated code. In Experiment #2, DSR@0 even declines by $6\\%$ absolutely. We study the translation results of ChatGPT and find that when CoT strategies are applied, the model tends to translate the source code line by line, neglecting compatibility issues between libraries and functions in different languages. CoT also compromises the global planning ability of the model. These observations are consistent with the findings in (Peng et al., 2023) that CoT may lead to word-by-word translations of natural language, thereby degrading the translation quality.", + "bbox": [ + 507, + 233, + 885, + 461 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "Fuzzy Execution To address the limitations of existing evaluation metrics and our AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution using LLMs in Section Limitations, inspired by recent progress in using LLMs as evaluation metrics for NLP tasks. Our preliminary studies evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also for predicting the executed output. Experimental results show that using ChatGPT for fuzzy execution is not yet practical and demands future research.", + "bbox": [ + 507, + 478, + 885, + 671 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "5 Conclusion", + "text_level": 1, + "bbox": [ + 507, + 693, + 640, + 709 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "We construct CodeTransOcean, a comprehensive code translation benchmark that includes multilingual and cross-framework datasets. We demonstrate that multilingual modeling has remarkable potential in enhancing code translation quality. We also reveal the superior code translation capability of ChatGPT and advanced strategies lead to significant performance gains. Moreover, we introduce fuzzy execution that may overcome limitations of existing metrics but requires future research. In summary, we provide a comprehensive suite of resources, tools, and baselines for code translation.", + "bbox": [ + 507, + 726, + 885, + 917 + ], + "page_idx": 8 + }, + { + "type": "page_number", + "text": "5075", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 8 + }, + { + "type": "text", + "text": "6 Limitations", + "text_level": 1, + "bbox": [ + 114, + 84, + 250, + 98 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Existing match-based evaluation metrics for code translation (Papineni et al., 2002; Ren et al., 2020; Eghbali and Pradel, 2022; Zhou et al., 2023; Tran et al., 2019) focus solely on semantics, overlooking executability of the code and the functional equivalence under different implementations. Execution-based metrics (Kulal et al., 2019; Hao et al., 2022; Hendrycks et al., 2021; Rozière et al., 2020; Dong et al., 2023) that require providing test cases are expensive to conduct in practice, and the significant overhead of executing numerous test cases and the heightened security risks during the execution process remain unresolved. It is crucial to establish an evaluation metric that overcomes these limitations.", + "bbox": [ + 112, + 111, + 489, + 335 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Our proposed DSR@K and the automated AutoTransExecutor aim to measure the executability of the code and reflect the real-world software development scenarios. However, AutoTransExecutor currently only supports Python as the target language. This is mainly due to the fact that different programming languages necessitate distinct runtime environments and libraries, making it particularly challenging to automatically detect and install the required dependencies for each code. While certain existing tools, such as Dynatrace12, can carry out dependency detection, the range of supported programming languages remains limited. Moreover, the configuration methods for compilers vary substantially among different programming languages, which further complicates automated configuration. In addition, fully automated execution systems could be exploited by malicious code, thus necessitating further security measures. Therefore, achieving this goal requires overcoming many technical and practical difficulties.", + "bbox": [ + 115, + 337, + 489, + 674 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "To address limitations of existing evaluation metrics and limitations of AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution.", + "bbox": [ + 112, + 676, + 489, + 739 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Recent studies have begun to utilize LLMs as evaluation metrics in the field of NLP (Chen et al., 2023c; Wang et al., 2023a; Fu et al., 2023; Kocmi and Federmann, 2023; Ji et al., 2023). Inspired by these works, we create a new dataset ExecuteStatus by randomly selecting 300 executable samples from MultilingualTrans and 300 non-executable samples from the translation results of ChatGPT.", + "bbox": [ + 112, + 741, + 489, + 869 + ], + "page_idx": 9 + }, + { + "type": "table", + "img_path": "images/c96a633021ed283ac49dce0087279b0f71622e62f051638468f8371f691748f3.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
Zero-ShotFew-Shot
TNFPFNTPTNFPFNTP
292823862294424258
✓12 ×280✓14 ×282
", + "bbox": [ + 510, + 80, + 882, + 152 + ], + "page_idx": 9 + }, + { + "type": "table", + "img_path": "images/f8cd2a43b84555b9d607637de4a01eb6a5eef994d2372dba55e8c45f3d75d214.jpg", + "table_caption": [ + "Table 9: Confusion matrix of fuzzy execution prediction by ChatGPT with Zero-shot and Few-shot settings." + ], + "table_footnote": [], + "table_body": "
MetricsCalculation formulaZero-ShotFew-Shot
AccuracyTP + TN59.00%59.00%
TP + TN + FN + FP
PrecisionTP88.57%93.55%
TP + FP
RecallTP20.67%19.33%
TP + FN
F1 scores2 · Precision · Recall33.52%32.04%
Precision + Recall
", + "bbox": [ + 510, + 208, + 880, + 349 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Table 10: Performance of ChatGPT on predicting fuzzy execution.", + "bbox": [ + 507, + 360, + 882, + 388 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "Each entry in this dataset includes the execution status and, if executable, the result of the execution. We use ExecuteStatus and AutoTransExecutor to evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also predict the executed output. The Zero-shot prompts are shown in Table 18 in Appendix. For the Few-shot strategy, in addition to the Zero-shot baseline, we include an example of executable code and an example of non-executable code, as detailed in Table 18.", + "bbox": [ + 505, + 418, + 884, + 594 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "We define fuzzy execution as first testing the consistency between the actual pass rate and the predicted pass rate of ChatGPT, followed by further testing the accuracy in predicting execution results using ChatGPT without relying on a compiler. Since we are interested in the ability of ChatGPT to identify samples that cannot actually be executed accurately, we present the confusion matrix in Table 9 based on the results. To evaluate the performance of ChatGPT on the fuzzy execution prediction task, we use the standard accuracy, precision, recall, and F1 scores. Experimental results based on these evaluation metrics are in Table 10. The low accuracy, recall and F1 scores show that ChatGPT still has difficulty in identifying errors in the code, exhibiting about an $88\\%$ tendency to predict that the code is executable. Overall, ChatGPT has low accuracy in the binary classification task of \"whether it can be executed\", and its ability to predict execution results, being at a scant $4\\%$ , clearly", + "bbox": [ + 505, + 596, + 884, + 919 + ], + "page_idx": 9 + }, + { + "type": "page_footnote", + "text": "$^{12}$ https://www.dynatrace.com/ platform/artificial-intelligence/ dependency-detection/", + "bbox": [ + 112, + 879, + 416, + 917 + ], + "page_idx": 9 + }, + { + "type": "page_number", + "text": "5076", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 9 + }, + { + "type": "text", + "text": "requires further enhancement. Thus, using ChatGPT for fuzzy execution is not yet practical (Liu et al., 2023b). Despite this, fuzzy execution with LLMs holds the potential to overcome the deficiencies of current code translation evaluation metrics. We will continue this exploration in future work.", + "bbox": [ + 112, + 84, + 492, + 181 + ], + "page_idx": 10 + }, + { + "type": "text", + "text": "References", + "text_level": 1, + "bbox": [ + 115, + 206, + 213, + 221 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Roee Aharoni, Melvin Johnson, and Orhan First. 2019. Massively multilingual neural machine translation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 3874-3884. Association for Computational Linguistics.", + "Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. 2021. Unified pre-training for program understanding and generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 2655-2668. Association for Computational Linguistics.", + "Wasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, and Kai-Wei Chang. 2023. AVATAR: A parallel corpus for javapython program translation. In Findings of the Association for Computational Linguistics: ACL 2023, Toronto, Canada, July 9-14, 2023, pages 2268-2281. Association for Computational Linguistics.", + "Fatih Kadir Akın. 2023. awesome-chatgpt-prompts.", + "Badr AlKhamissi, Siddharth Verma, Ping Yu, Zhijing Jin, Asli Celikyilmaz, and Mona T. Diab. 2023. OPTR: exploring the role of explanations in finetuning and prompting for reasoning skills of large language models. CoRR, abs/2305.12001.", + "Anil Ananthaswamy. 2023. In ai, is bigger always better? Nature.", + "Rohan Anil, Andrew M. Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, Eric Chu, Jonathan H. Clark, Laurent El Shafey, Yanping Huang, Kathy Meier-Hellstern, Gaurav Mishra, Erica Moreira, Mark Omernick, Kevin Robinson, Sebastian Ruder, Yi Tay, Kefan Xiao, Yuanzhong Xu, Yujing Zhang, Gustavo Hernandez Abrego, Junwhan Ahn, Jacob Austin, Paul Barham, Jan A. Botha, James Bradbury, Siddhartha Brahma, Kevin Brooks, Michele Catasta, Yong Cheng, Colin Cherry, Christopher A. Choquette-Choo, Aakanksha Chowdhery, Clement Crepy, Shachi Dave, Mostafa Dehghani, Sunipa Dev, Jacob Devlin, Mark Diaz, Nan Du, Ethan Dyer, Vladimir Feinberg, Fangxiaoyu Feng, Vlad Fienber, Markus Freitag, Xavier Garcia, Sebastian Gehrmann, Lucas Gonzalez, and" + ], + "bbox": [ + 115, + 229, + 489, + 917 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "et al. 2023. Palm 2 technical report. CoRR, abs/2305.10403.", + "Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual.", + "Saikat Chakraborty, Toufique Ahmed, Yangruibo Ding, Premkumar T. Devanbu, and Baishakhi Ray. 2022. Natgen: generative pre-training by \"naturalizing\" source code. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2022, Singapore, Singapore, November 14-18, 2022, pages 18-30. ACM.", + "Angelica Chen, Jérémy Scheurer, Tomasz Korbak, Jon Ander Campos, Jun Shern Chan, Samuel R. Bowman, Kyunhyun Cho, and Ethan Perez. 2023a. Improving code generation by training with natural language feedback. CoRR, abs/2303.16749.", + "Xinyun Chen, Maxwell Lin, Nathanael Scharli, and Denny Zhou. 2023b. Teaching large language models to self-debug. CoRR, abs/2304.05128.", + "Xinyun Chen, Chang Liu, and Dawn Song. 2018. Tree-to-tree neural networks for program translation. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pages 2552-2562.", + "Yi Chen, Rui Wang, Haiyun Jiang, Shuming Shi, and Ruifeng Xu. 2023c. Exploring the use of large language models for reference-free text quality evaluation: A preliminary empirical study. CoRR, abs/2304.00723.", + "Yihong Dong, Jiazheng Ding, Xue Jiang, Zhuo Li, Ge Li, and Zhi Jin. 2023. Codescore: Evaluating code generation by learning code execution. CoRR, abs/2301.09043.", + "Aryaz Eghbali and Michael Pradel. 2022. Crystalbleu: Precisely and efficiently measuring the similarity of code. In 37th IEEE/ACM International Conference on Automated Software Engineering, ASE 2022, Rochester, MI, USA, October 10-14, 2022, pages 28:1-28:12. ACM.", + "Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin," + ], + "bbox": [ + 510, + 85, + 884, + 917 + ], + "page_idx": 10 + }, + { + "type": "page_number", + "text": "5077", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 10 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Ting Liu, Daxin Jiang, and Ming Zhou. 2020. Codebert: A pre-trained model for programming and natural languages. In Findings of the Association for Computational Linguistics: EMNLP 2020, Online Event, 16-20 November 2020, volume EMNLP 2020 of Findings of ACL, pages 1536-1547. Association for Computational Linguistics.", + "Jinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. 2023. Gptscore: Evaluate as you desire. CoRR, abs/2302.04166.", + "Mingqi Gao, Jie Ruan, Renliang Sun, Xunjian Yin, Shiping Yang, and Xiaojun Wan. 2023. Humanlike summarization evaluation with chatgpt. CoRR, abs/2304.02554.", + "Stefanos Georgiou, Maria Kechagia, Tushar Sharma, Federica Sarro, and Ying Zou. 2022. Green AI: do deep learning frameworks have different costs? In 44th IEEE/ACM 44th International Conference on Software Engineering, ICSE 2022, Pittsburgh, PA, USA, May 25-27, 2022, pages 1082-1094. ACM.", + "Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun Deng, Colin B. Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. 2021. Graphcodebert: Pre-training code representations with data flow. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net.", + "Yiyang Hao, Ge Li, Yongqiang Liu, Xiaowei Miao, He Zong, Siyuan Jiang, Yang Liu, and He Wei. 2022. Aixbench: A code generation benchmark dataset. CoRR, abs/2206.13179.", + "Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. 2021. Measuring coding challenge competence with APPS. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual.", + "Yunjie Ji, Yan Gong, Yiping Peng, Chao Ni, Peiyan Sun, Dongyu Pan, Baochang Ma, and Xiangang Li. 2023. Exploring chatgpt's ability to rank content: A preliminary study on consistency with human preferences. CoRR, abs/2303.07610.", + "Wenxiang Jiao, Wenxuan Wang, Jen tse Huang, Xing Wang, and Zhaopeng Tu. 2023. Is chatgpt a good translator? yes with gpt-4 as the engine.", + "Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda B. Viégas, Martin Wattenberg, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2017. Google's multilingual neural machine translation system: Enabling zero-shot translation. Trans. Assoc. Comput. Linguistics, 5:339-351." + ], + "bbox": [ + 115, + 85, + 485, + 917 + ], + "page_idx": 11 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Geunwoo Kim, Pierre Baldi, and Stephen McAleer. 2023. Language models can solve computer tasks. CoRR, abs/2303.17491.", + "Tom Kocmi and Christian Federmann. 2023. Large language models are state-of-the-art evaluators of translation quality. In Proceedings of the 24th Annual Conference of the European Association for Machine Translation, EAMT 2023, Tampere, Finland, 12-15 June 2023, pages 193-203. European Association for Machine Translation.", + "Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. In NeurIPS.", + "Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy Liang. 2019. Spoc: Search-based pseudocode to code. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 11883-11894.", + "Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023a. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv., 55(9):195:1-195:35.", + "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692.", + "Yongkang Liu, Shi Feng, Daling Wang, Yifei Zhang, and Hinrich Schütze. 2023b. Evaluate what you can't evaluate: Unassessable generated responses quality. CoRR, abs/2305.14658.", + "Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin B. Clement, Dawn Drain, Daxin Jiang, Duyu Tang, Ge Li, Li-dong Zhou, Linjun Shou, Long Zhou, Michele Tufano, Ming Gong, Ming Zhou, Nan Duan, Neel Sundaresan, Shao Kun Deng, Shengyu Fu, and Shujie Liu. 2021. Codexglue: A machine learning benchmark dataset for code understanding and generation. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual.", + "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. CoRR, abs/2306.08568.", + "Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Sean Welleck, Bodhisattwa Prasad Majumder, Shashank Gupta, Amir Yazdanbakhsh, and Peter" + ], + "bbox": [ + 510, + 85, + 880, + 917 + ], + "page_idx": 11 + }, + { + "type": "page_number", + "text": "5078", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 11 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "Clark. 2023. Self-refine: Iterative refinement with self-feedback. CoRR, abs/2303.17651.", + "Alireza Mohammadshahi, Vassilina Nikoulina, Alexandre Berard, Caroline Brun, James Henderson, and Laurent Besacier. 2022. Small-100: Introducing shallow multilingual machine translation model for low-resource languages. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 8348-8359. Association for Computational Linguistics.", + "Varun Nair, Elliot Schumacher, Geoffrey J. Tso, and Anitha Kannan. 2023. DERA: enhancing large language model completions with dialog-enabled resolving agents. CoRR, abs/2303.17071.", + "Anh Tuan Nguyen, Tung Thanh Nguyen, and Tien N. Nguyen. 2013. Lexical statistical machine translation for language migration. In Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE'13, Saint Petersburg, Russian Federation, August 18-26, 2013, pages 651-654. ACM.", + "Toan Q. Nguyen and David Chiang. 2017. Transfer learning across low-resource, related languages for neural machine translation. In Proceedings of the Eighth International Joint Conference on Natural Language Processing, IJCNLP 2017, Taipei, Taiwan, November 27 - December 1, 2017, Volume 2: Short Papers, pages 296-301. Asian Federation of Natural Language Processing.", + "OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774.", + "Alfrick Opidi. 2020. Why your legacy software is hard to maintain and what to do about it.", + "Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, July 6-12, 2002, Philadelphia, PA, USA, pages 311-318. ACL.", + "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. CoRR, abs/2303.13780.", + "Ruchir Puri, David S. Kung, Geert Janssen, Wei Zhang, Giacomo Domeniconi, Vladimir Zolotov, Julian Dolby, Jie Chen, Mihir R. Choudhury, Lindsey Decker, Veronika Thost, Luca Buratti, Saurabh Pajar, and Ulrich Finkler. 2021. Project codenet: A largescale AI for code dataset for learning a diversity of coding tasks. CoRR, abs/2105.12655.", + "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" + ], + "bbox": [ + 115, + 85, + 489, + 917 + ], + "page_idx": 12 + }, + { + "type": "list", + "sub_type": "ref_text", + "list_items": [ + "for automatic evaluation of code synthesis. CoRR, abs/2009.10297.", + "Israt Jahan Rithy, Hasib Hossain Shakil, Niloy Mondal, Fatema Sultana, and Faisal Muhammad Shah. 2022. Xtest: A parallel multilingual corpus with test cases for code translation and its evaluation*. In 2022 25th International Conference on Computer and Information Technology (ICCIT), pages 623-628.", + "Baptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, and Guillaume Lample. 2020. Unsupervised translation of programming languages. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual.", + "Baptiste Rozière, Jie Zhang, François Charton, Mark Harman, Gabriel Synnaeve, and Guillaume Lample. 2022. Leveraging automated unit tests for unsupervised code translation. In *The Tenth International Conference on Learning Representations*, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net.", + "Noah Shinn, Federico Cassano, Beck Labash, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language agents with verbal reinforcement learning.", + "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models.", + "Ngoc M. Tran, Hieu Tran, Son Nguyen, Hoan Nguyen, and Tien N. Nguyen. 2019. Does BLEU score work for code migration? In Proceedings of the 27th International Conference on Program Comprehension, ICPC 2019, Montreal, QC, Canada, May 25-31, 2019, pages 165-176. IEEE / ACM.", + "Jiaan Wang, Yunlong Liang, Fandong Meng, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023a. Is chatgpt a good NLG evaluator? A preliminary study. CoRR, abs/2303.04048.", + "Yiren Wang, ChengXiang Zhai, and Hany Hassan. 2020. Multi-task learning for multilingual neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 1022-1034. Association for Computational Linguistics.", + "Yue Wang, Hung Le, Akhilesh Deepak Gotmare, Nghi D. Q. Bui, Junnan Li, and Steven C. H. Hoi. 2023b. Codet5+: Open code large language models for code understanding and generation. CoRR, abs/2305.07922.", + "Yue Wang, Weishi Wang, Shafiq R. Joty, and Steven C. H. Hoi. 2021. Codet5: Identifier-aware unified" + ], + "bbox": [ + 510, + 85, + 884, + 917 + ], + "page_idx": 12 + }, + { + "type": "page_number", + "text": "5079", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 12 + }, + { + "type": "text", + "text": "pre-trained encoder-decoder models for code understanding and generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 8696-8708. Association for Computational Linguistics.", + "bbox": [ + 131, + 85, + 489, + 178 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "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.", + "bbox": [ + 114, + 187, + 489, + 254 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Justin D. Weisz, Michael J. Muller, Stephanie Houde, John T. Richards, Steven I. Ross, Fernando Martinez, Mayank Agarwal, and Kartik Talamadupula. 2021. Perfection not required? human-ai partnerships in code translation. In IUI '21: 26th International Conference on Intelligent User Interfaces, College Station, TX, USA, April 13-17, 2021, pages 402-412. ACM.", + "bbox": [ + 114, + 263, + 489, + 368 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Justin D. Weisz, Michael J. Muller, Steven I. Ross, Fernando Martinez, Stephanie Houde, Mayank Agarwal, Kartik Talamadupula, and John T. Richards. 2022. Better together? an evaluation of ai-supported code translation. In IUI 2022: 27th International Conference on Intelligent User Interfaces, Helsinki, Finland, March 22 - 25, 2022, pages 369-391. ACM.", + "bbox": [ + 114, + 379, + 489, + 472 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Ning Wu, Ming Gong, Linjun Shou, Shining Liang, and Daxin Jiang. 2023. Large language models are diverse role-players for summarization evaluation. In *Natural Language Processing and Chinese Computing - 12th National CCF Conference*, NLPCC 2023, Foshan, China, October 12-15, 2023, Proceedings, Part I, volume 14302 of Lecture Notes in Computer Science, pages 695-707. Springer.", + "bbox": [ + 114, + 482, + 489, + 588 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Jingfeng Yang, Hongye Jin, Ruixiang Tang, Xiaotian Han, Qizhang Feng, Haoming Jiang, Bing Yin, and Xia Hu. 2023. Harnessing the power of llms in practice: A survey on chatgpt and beyond. CoRR, abs/2304.13712.", + "bbox": [ + 114, + 596, + 489, + 663 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "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. CoRR, abs/2302.10198.", + "bbox": [ + 114, + 674, + 489, + 727 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Shuyan Zhou, Uri Alon, Sumit Agarwal, and Graham Neubig. 2023. Codebertscore: Evaluating code generation with pretrained models of code. CoRR, abs/2302.05527.", + "bbox": [ + 114, + 737, + 489, + 790 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Ming Zhu, Aneesh Jain, Karthik Suresh, Roshan Ravindran, Sindhu Tipirneni, and Chandan K. Reddy. 2022a. Xlcost: A benchmark dataset for cross-lingual code intelligence. CoRR, abs/2206.08474.", + "bbox": [ + 114, + 801, + 489, + 854 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Ming Zhu, Karthik Suresh, and Chandan K. Reddy. 2022b. Multilingual code snippets training for program translation. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth", + "bbox": [ + 114, + 865, + 489, + 917 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11783-11790. AAAI Press.", + "bbox": [ + 526, + 85, + 884, + 152 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Wenhao Zhu, Hongyi Liu, Qingxiu Dong, Jingjing Xu, Lingpeng Kong, Jiajun Chen, Lei Li, and Shujian Huang. 2023. Multilingual machine translation with large language models: Empirical results and analysis. CoRR, abs/2304.04675.", + "bbox": [ + 509, + 160, + 884, + 225 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016. Transfer learning for low-resource neural machine translation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pages 1568-1575. The Association for Computational Linguistics.", + "bbox": [ + 509, + 236, + 884, + 329 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "A Appendix", + "text_level": 1, + "bbox": [ + 509, + 338, + 633, + 356 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "A.1 Related Work", + "text_level": 1, + "bbox": [ + 509, + 365, + 670, + 379 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "A.1.1 Code Translation Methods", + "text_level": 1, + "bbox": [ + 509, + 386, + 781, + 400 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Naive Copy directly duplicates the source code as the target code without making any modifications. Given that the results produced by this method are often unusable, it is treated as the lower bound of performance for code translation. Early code translation relies heavily on manual rewriting, which requires developers to have a deep understanding of both source and target languages along with the ability to navigate various complex programming structures and semantic challenges. This method is inefficient, costly, and prone to errors.", + "bbox": [ + 507, + 405, + 884, + 580 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Automatic code translation methods fall into several categories. Compilers and transpilers13 can automatically translate the source code into a target language, significantly saving time and effort. However, these methods cannot fully preserve all the linguistic features and behaviors of the source code, nor can they comprehend the intent and semantics inherent to the source code as humans do. Rule-based methods (Weisz et al., 2021, 2022; Rozière et al., 2020) treat the code translation task as a program synthesis problem. They define a set of transformation rules and employ the rules or pattern matching for code translation. Research on rule-based methods is quite scarce, mainly because they overly rely on the completeness of the rules and also require a considerable amount of manual preprocessing.", + "bbox": [ + 507, + 582, + 884, + 854 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "Neural network based methods have become dominant in the field of code translation in recent", + "bbox": [ + 507, + 854, + 882, + 885 + ], + "page_idx": 13 + }, + { + "type": "page_footnote", + "text": "13https://en.wikipedia.org/wiki/ Source-to-source_compiler", + "bbox": [ + 509, + 891, + 811, + 917 + ], + "page_idx": 13 + }, + { + "type": "page_number", + "text": "5080", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 13 + }, + { + "type": "text", + "text": "years. These methods mainly treat code translation as a sequence-to-sequence generation problem. Among them, Chen et al. (Chen et al., 2018) are the first to successfully apply neural networks to code translation, designing a tree-to-tree neural model. CodeBERT (Feng et al., 2020) significantly improves code translation accuracy by pretraining models with masked language modeling and replaced token detection. GraphCodeBERT (Guo et al., 2021) further improves code translation accuracy by introducing two additional pre-training tasks as edge prediction and node alignment. CodeT5 (Wang et al., 2021), based on the Transformer encoder-decoder architecture, achieves excellent performance on code translation through four pre-training tasks, namely, masked span prediction, identifier tagging, masked identifier prediction, and bimodal dual generation. With a similar architecture as CodeT5, PLBART (Ahmad et al., 2021) adopts three tasks of token masking, token deletion and token infilling for denoising seq2seq pre-training, which enables PLBART to infer language syntax and semantics and to learn how to generate language coherently. NatGen (Chakraborty et al., 2022) forces the model to learn to capture intent of the source code by setting up \"Code-Naturalization\" tasks during pre-training, and forces the model to make the generated code closer to the human-written style.", + "bbox": [ + 115, + 84, + 490, + 549 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "In the line of neural network based methods, recently released large language models (LLMs) (e.g., ChatGPT (OpenAI, 2023)) have shown remarkable performance in a wide range of NLP tasks with instructions and a few in-context examples. ChatGPT is built upon GPT and is optimized with Reinforcement Learning from Human Feedback. ChatGPT can efficiently understand and generate code sequences, and can self-learn from human feedback to improve the quality and accuracy of its outputs. This significant advancement has markedly propelled progress in the field of code translation.", + "bbox": [ + 115, + 552, + 489, + 759 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "A.1.2 Code Translation Metrics", + "text_level": 1, + "bbox": [ + 117, + 771, + 376, + 785 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Match-Based Evaluation Metrics These evaluation metrics are based on the similarity between the translation output and the reference translation. Among them, the Exact Match (EM) metric calculates the percentage of translation outputs that exactly match the reference translation, which overlooks the fact that the same function can be implemented in various ways. The Bilingual Evalu", + "bbox": [ + 115, + 791, + 489, + 917 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "ation Understudy (BLEU) (Papineni et al., 2002) metric evaluates the similarity between the translation output and the reference translation by multiplying the geometric average of n-gram precision scores with a brevity penalty. The CodeBLEU (Ren et al., 2020) metric extends BLEU by considering syntactic and semantic characteristics of programming languages; it not only considers shallow matching but also pays attention to syntactic and semantic matching. CrystalBLEU (Eghbali and Pradel, 2022) focuses more on the inherent differences between source code and natural language, such as trivial shared n-gram syntax. CodeBERTScore (Zhou et al., 2023) uses pre-trained models to encode the translation output and reference translation, then calculates the dot product similarity between them, enabling comparisons of code pairs with distinct lexical forms. However, CodeBLEU, CrystalBLEU, and CodeBERTScore have limitations as they only support a limited range of programming languages and cannot be used in general multilingual scenarios. Ruby (Tran et al., 2019), a new method for evaluating code translation, considers the lexical, syntactic, and semantic representations of source code. However, its codebase has not yet been open-sourced. These match-based evaluation metrics can only evaluate the surface form and semantic differences of the code, while neglecting the executability of the code and the functional equivalence of implementation variations.", + "bbox": [ + 510, + 84, + 882, + 582 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Execution-Based Evaluation Metrics", + "text_level": 1, + "bbox": [ + 512, + 598, + 880, + 612 + ], + "page_idx": 14 + }, + { + "type": "text", + "text": "Execution-based evaluation metrics mainly compare the executed result of the generated code with the expected result. The PASS@k score (Kulal et al., 2019) is evaluated by unit tests: if any of the $k$ samples meets the expected result, the generated result is deemed successful. AvgPassRatio (Hao et al., 2022; Hendrycks et al., 2021) evaluates the overall executable result of code by calculating the average pass rate of test cases. Computational accuracy (Rozière et al., 2020) measures the quality of the generated code snippet by comparing the output of this snippet with the reference code snippet when given the same input. Additionally, CodeScore (Dong et al., 2023) claims that it can estimate the PassRatio of test cases for the generated code without executing the code, but its codebase has not yet been open-sourced. These execution-based evaluation metrics require construction of executable test", + "bbox": [ + 510, + 614, + 882, + 917 + ], + "page_idx": 14 + }, + { + "type": "page_number", + "text": "5081", + "bbox": [ + 482, + 928, + 517, + 940 + ], + "page_idx": 14 + }, + { + "type": "table", + "img_path": "images/6ea2bfc583331c27bcb5d4e6a79bdd59fce7e2e5d388cec77b8147809be39a8b.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
MethodTrainDevTestTotalMethodTrainDevTestTotal
C ↔ C#796841691049C ↔ C++7991492981246
C ↔ Go8772274541558C ↔ Java8131713431327
C ↔ Python9012134261540C ↔ PHP29651102449
C ↔ VB61797194908C++ ↔ C#74879160987
C++ ↔ Go7922084181418C++ ↔ Java7531723451270
C++ ↔ Python8422024051449C++ ↔ PHP29153106450
C++ ↔ VB58697195888C# ↔ Go7771002021079
C# ↔ Java750861741010C# ↔ Python813991991111
C# ↔ PHP2934080413C# ↔ VB59770142809
Java ↔ Go7932214431457Java ↔ Python8382174361491
Java ↔ PHP574119239932Java ↔ VB610104210924
Go ↔ Python8873146281828Go ↔ PHP606128258992
Go ↔ VB618116232966PHP ↔ Python9271853701482
PHP ↔ VB2674488399VB ↔ Python644114229987
", + "bbox": [ + 137, + 80, + 858, + 340 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Table 11: Composition and Distribution of the Multilingual Dataset. The numbers refer to the number of code pair samples. VB is short for Visual Basic. [Return to Section 3.1]", + "bbox": [ + 112, + 349, + 882, + 380 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "sets, which could be costly. Furthermore, due to potential security threats from the execution environment and the code, they need to be run in an isolated sandbox.", + "bbox": [ + 112, + 404, + 487, + 467 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "A.2 Data Management", + "text_level": 1, + "bbox": [ + 112, + 483, + 312, + 499 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "A.2.1 Data Sources & Licenses", + "text_level": 1, + "bbox": [ + 112, + 506, + 371, + 520 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "We collect CodeTransOcean from two different platforms. The MultilingualTrans and NicheTrans datasets are collected from Rosetta Code $^{14}$ , a programming site presenting solution strategies for identical tasks across as many programming languages as possible, thereby demonstrating both similarities and differences among these languages. We strictly adhere to the data distribution license of the platform as Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license $^{15}$ .", + "bbox": [ + 112, + 527, + 489, + 687 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "The DLTrans dataset is derived from an open-source teaching platform *Dive into Deep Learning* $^{16}$ , which is dedicated to teaching deep learning knowledge ranging from theoretical background, conceptual understanding, to coding practices. We strictly adhere to the data distribution license of this platform as *Apache-2.0* $^{17}$ . To ensure legal and regulated use of these datasets, we require strict", + "bbox": [ + 112, + 689, + 489, + 818 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "adherence to these licenses.", + "bbox": [ + 507, + 404, + 717, + 419 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "A.2.2 Data Processing", + "text_level": 1, + "bbox": [ + 507, + 429, + 700, + 445 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Multilingual Datasets Given the variations in compilation requirements among programming languages, we keep the original format as much as possible to ensure the compileability of the data while ensuring its accuracy. Additionally, we employ a duplicate-file-detection tool to identify and remove duplicate data from the dataset to avoid any potential data leakage problems during model training.", + "bbox": [ + 507, + 448, + 884, + 577 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Cross-Framework Dataset To ensure the comparability of Python, we keep the original formatting information. We manually verify all automatically collected samples, identify and exclude samples that do not meet the requirements.", + "bbox": [ + 507, + 586, + 882, + 665 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "A.2.3 Data Quality", + "text_level": 1, + "bbox": [ + 507, + 674, + 675, + 690 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "We randomly select 1K samples from each dataset within CodeTransOcean for manual quality assessment. We find that for the MultilingualTrans dataset with compilation requirements, the comparability rate exceeds $90\\%$ . We verify that the code pairs in each dataset are functionally identical and confirm that CodeTransOcean is of high quality.", + "bbox": [ + 505, + 694, + 882, + 806 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "Additionally, during data collection, we pay special attention to the diversity of domain knowledge and code styles. CodeTransOcean includes various code examples ranging from basic syntactic structures to complex algorithm implementations, as well as building neural networks from scratch and conducting training and inference. This rich", + "bbox": [ + 507, + 807, + 884, + 917 + ], + "page_idx": 15 + }, + { + "type": "page_footnote", + "text": "$^{14}$ https://rosettacode.org/wiki/Rosetta_Code", + "bbox": [ + 112, + 829, + 484, + 854 + ], + "page_idx": 15 + }, + { + "type": "page_footnote", + "text": "15 https://creativecommons.org/licenses/by-sa/4.0/", + "bbox": [ + 112, + 854, + 480, + 879 + ], + "page_idx": 15 + }, + { + "type": "page_footnote", + "text": "16https://github.com/d2l-ai/d2l-zh", + "bbox": [ + 132, + 879, + 438, + 892 + ], + "page_idx": 15 + }, + { + "type": "page_footnote", + "text": "17https://github.com/d2l-ai/d2l-zh/ .ob/master/License", + "bbox": [ + 132, + 892, + 445, + 917 + ], + "page_idx": 15 + }, + { + "type": "page_number", + "text": "5082", + "bbox": [ + 480, + 928, + 521, + 940 + ], + "page_idx": 15 + }, + { + "type": "text", + "text": "diversity ensures that CodeTransOcean reflects a wide variety of real-world scenarios.", + "bbox": [ + 112, + 84, + 485, + 116 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "A.3 Specific Challenges in Implementing Cross-framework Translation", + "text_level": 1, + "bbox": [ + 114, + 127, + 448, + 158 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Firstly, there are significant design differences between frameworks, including data processing methods, model-building strategies, and network connection techniques. Secondly, the inherent complexity of DL code increases the difficulty of conversion, as these codes usually contain various components such as neural network layers, loss functions, optimizers, and learning rate schedulers. Thirdly, there are significant inconsistencies in the code structure of different frameworks, such as code organization and variable naming rules. Lastly, cross-platform compatibility must be considered because DL code may encounter compatibility issues when executing on different hardware platforms (e.g., GPUs, CPUs, TPUs) and operating systems.", + "bbox": [ + 112, + 165, + 489, + 423 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "A.4 Code Examples on Different Deep Learning Frameworks", + "text_level": 1, + "bbox": [ + 114, + 434, + 430, + 464 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Figures 1 and 2 show the implementation of two different deep learning components in various deep learning frameworks.", + "bbox": [ + 112, + 470, + 487, + 519 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "A.5 Multilingual Modeling", + "text_level": 1, + "bbox": [ + 114, + 531, + 341, + 546 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "One-to-One For each language pair in the dataset, we train an independent model, e.g., translating $\\mathrm{C + + }$ to Java.", + "bbox": [ + 112, + 552, + 487, + 600 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "One-to-Many We train individual models from one language to many other languages, e.g., translating Python to all other languages.", + "bbox": [ + 112, + 609, + 487, + 658 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Many-to-One We train individual models from multiple languages to one language, e.g., translating all other languages to Python.", + "bbox": [ + 112, + 668, + 487, + 715 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Many-to-Many We train a unified model for the multiple to multiple languages in the dataset, which can handle translations between all languages.", + "bbox": [ + 112, + 725, + 485, + 772 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "We ensure all experiments are performed under the same hyperparameters and environment for comparison. Table 13 shows these in detail.", + "bbox": [ + 112, + 774, + 487, + 822 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "A.6 Prompt Variations", + "text_level": 1, + "bbox": [ + 114, + 834, + 310, + 848 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Role Assignment (Peng et al., 2023; AlKhamissi et al., 2023; Wu et al., 2023; Akin, 2023) We configured two distinct roles for the model, each with unique skills. This arrangement empowers the", + "bbox": [ + 112, + 854, + 487, + 917 + ], + "page_idx": 16 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [ + "PyTorch" + ], + "code_body": "1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): \n2 def forward(self, pred, label, valid_len): \n3 weights $=$ torch.ones_like.label) \n4 weights $=$ sequence_mask(weights,valid_len) \n5 self.reduce $\\equiv$ 'none' \n6 unweighted_loss $=$ super(MaskedSoftmaxCELoss,self).forward( \n7 pred.permute(0,2,1),label) \n8 weighted_loss $=$ (unweighted_loss \\* weights).mean( dim=1) \n9 return weighted_loss", + "guess_lang": "python", + "bbox": [ + 515, + 101, + 882, + 195 + ], + "page_idx": 16 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [ + "TensorFlow" + ], + "code_body": "1 class MaskedSoftmaxCELoss(tf.keras.losses.Loss): \n2 def __init__(self, valid_len): \n3 super().init_(reduction='none') \n4 self.valid_len = valid_len \n5 \n6 def call(self, label, pred): \n7 weights = tf.ones_like.label, dtype=tf.float32) \n8 weights = sequence_mask(weights, self.valid_len) \n9 label_one-hot = tf.one-hot.label, depth=pred.shape[-1]) \n10 unweighted_loss = tf.keras.losses. CategoricalCrossentropy( from_logits=True, reduction='none')( label_one-hot, pred) \n11 weighted_loss = tf.reduce_mean((unweighted_loss* weights), axis=1) \n13 return weighted_loss", + "guess_lang": "python", + "bbox": [ + 515, + 219, + 873, + 362 + ], + "page_idx": 16 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [ + "MXNet" + ], + "code_body": "1 class MaskedSoftmaxCELoss(gluon.loss.SoftmaxCELoss): \n2 def forward(self, pred, label, valid_len): \n3 weights = npexpand_dims(np.ones_like.label), axis=1) \n4 weights = npx(sequenceMask(weights, valid_len, True, axis=1)) \n5 return super(MaskedSoftmaxCELoss, self).forward(pred, label, weights)", + "guess_lang": "prolog", + "bbox": [ + 517, + 387, + 875, + 455 + ], + "page_idx": 16 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [ + "Paddle" + ], + "code_body": "1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): \n2 def forward(self, pred, label, valid_len): \n3 weights $=$ paddle.ones_like.label) \n4 weights $=$ sequence_mask(weights,valid_len) \n5 self.reduction $\\equiv$ 'none' \n6 unweighted_loss $=$ super(MaskedSoftmaxCELoss,self).forward( \n7 pred, label) \n8 weighted_loss $=$ (unweighted_loss \\* weights).mean( axis=1) \n9 return weighted_loss", + "guess_lang": "python", + "bbox": [ + 517, + 479, + 880, + 573 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Figure 1: Softmax cross-entropy loss function with masking in PyTorch, TensorFlow, MXNet and Paddle.", + "bbox": [ + 507, + 592, + 882, + 620 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "model to simulate more domain-adaptable and specialized expert roles.", + "bbox": [ + 507, + 644, + 882, + 677 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Polite inquiry (Akin, 2023) These strategies add polite expression and set up imperative and interrogative requests. Given that ChatGPT is designed to simulate human conversation styles as closely as possible, including understanding and simulating polite language expressions. Therefore, we expect these strategies to boost the comprehension of the model and augment the quality of its generated results.", + "bbox": [ + 507, + 684, + 882, + 829 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "Clarify usage This strategy aims to make the model clearly aware of its requirements during the code translation process - the generated code needs to be guaranteed to execute without issues.", + "bbox": [ + 507, + 839, + 880, + 902 + ], + "page_idx": 16 + }, + { + "type": "text", + "text": "The translation prompts of the above four strategies", + "bbox": [ + 507, + 903, + 880, + 917 + ], + "page_idx": 16 + }, + { + "type": "page_number", + "text": "5083", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 16 + }, + { + "type": "table", + "img_path": "images/f0cace98cc4d7f929bf025e21b033b115bada33ed11b4aaf6fd9eb9a9facd2cd.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
MethodTrainDevTestTotalMethodTrainDevTestTotal
Ada60224649377423Elixir36182975994514
Arturo38024709475219Erlang32692174493935
AutoHotKey430555511205980Factor472486017567340
AWK388057811625620Forth36193396904648
BBC Basic36632394854387Fortran40503056174972
Clojure36173106334560Groovy37732274674467
Common Lisp50854679336485Haskell5647104520978789
D554182516628028Icon26461583263130
Delphi35474368894872J5476120424229102
Julia58291511305510395Ruby5793129026009683
Lua531667713667359COBOL24381673552960
Mathematica5485104621058636REXX5595111822418954
MATLAB28721573223351R28031974023402
Nim5814132126759810Racket564690118178364
OCaml42864058175508Rust514671714397302
Pascal33934659424800Tcl535474015027596
Perl58181445291410177PowerShell35632404904293
Scala5852107421649090F#451763812876442
Swift36534048184875
", + "bbox": [ + 139, + 80, + 857, + 420 + ], + "page_idx": 17 + }, + { + "type": "table", + "img_path": "images/bcf438ca098eaf8e94dce34e823932c140e4e106a40a5f999db05a7cbb5edea6.jpg", + "table_caption": [ + "Table 12: The number of code samples for each language in the NicheTrans datasets. [Return to Section 3.1]" + ], + "table_footnote": [], + "table_body": "
MultilingualTransNicheTransDLTrans
Learning rate3e-52e-53e-5
Beam size115
Max source length15361536512
Max target length15361536512
Batch size16
Max epoch5
Fp16True
GPUNVIDIA Tesla V100 32GB
", + "bbox": [ + 115, + 467, + 485, + 583 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Table 13: Parameters and hardware configuration for training CodeT5+_220M (220M is the model size) on CodeTransOcean.", + "bbox": [ + 112, + 593, + 487, + 636 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "are shown in Table 15.", + "bbox": [ + 114, + 665, + 284, + 681 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "A.7 One-Shot", + "text_level": 1, + "bbox": [ + 114, + 700, + 238, + 714 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Experiment #1 selects a training sample from a high-resource language code pair as an example. In this case, the target language type aligns with the target language type of the translation request, but the source language does not.", + "bbox": [ + 112, + 725, + 487, + 806 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Experiment #2 selects a code pair whose source and target language directions are congruent with the translation requirements as an example. That is, the source and target languages of the example dynamically adjust following the translation requirements.", + "bbox": [ + 112, + 822, + 487, + 917 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Experiment #3 randomly selects a code pair as an example, in which neither the source nor the target languages match the translation requirements. The specific translation prompts are shown in Table 19.", + "bbox": [ + 507, + 470, + 882, + 551 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "A.8 Chain of Thought", + "text_level": 1, + "bbox": [ + 507, + 563, + 700, + 579 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Experiment #1 First, describe the function of the source code in the natural language, then translate it according to the source code and the corresponding natural language description.", + "bbox": [ + 507, + 583, + 882, + 650 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Experiment #2 First, let ChatGPT understand the function of the source code, followed by the translation, while ensuring that the function of the code remains unchanged during the translation process.", + "bbox": [ + 507, + 658, + 882, + 737 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Experiment #3 First, let ChatGPT understand the function of the source code, then predict the output result of the source code, and finally perform the translation, demanding that the translated code successfully executes.", + "bbox": [ + 507, + 747, + 882, + 829 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "Experiment #4 Building upon Experiment #3 and the one-shot approach of Experiment #2, we introduce a CoT one-shot variation. That is, first, provide a case in the same direction for ChatGPT reference, then require it to understand the func", + "bbox": [ + 507, + 839, + 884, + 917 + ], + "page_idx": 17 + }, + { + "type": "page_number", + "text": "5084", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 17 + }, + { + "type": "text", + "text": "PyTorch", + "text_level": 1, + "bbox": [ + 117, + 108, + 188, + 123 + ], + "page_idx": 18 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [], + "code_body": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 self_embedding = nn.Embedding(vocab_size, embed_size) \n5 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout) \n6 self>dense = nn.Linear(num_hiddens, vocab_size) \n7 \n8 def init_state(self, enc_outputs, *args): \n9 return enc_outputs[1] \n10 \n11 def forward(self, X, state): \n12 X = self_embedding(X).permute(1, 0, 2) \n13 context = state[-1].repeat(X.shape[0], 1, 1) \n14 X_and_context = torch.cat((X, context), 2) \n15 output, state = self.rnn(X_and_context, state) \n16 output = self.dense(output).permute(1, 0, 2) \n17 return output, state", + "guess_lang": "python", + "bbox": [ + 124, + 128, + 478, + 296 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "MXNet", + "text_level": 1, + "bbox": [ + 119, + 368, + 179, + 382 + ], + "page_idx": 18 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [], + "code_body": "1 class Seq2SeqDecoder(d21.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 selfembedding = nn.Embedding(vocab_size, embed_size) \n5 self.rnn = rnn.GRU(num_hiddens, num_layers, dropout=dropout) \n6 self.dense = nn.Dense(vocab_size, flatten=False) \n7 \n8 def init_state(self, enc_outputs, *args): \n9 return enc_outputs[1] \n10 \n11 def forward(self, x, state): \n12 X = self_embedding(X).swapaxes(0, 1) \n13 context = state[0][-1] \n14 context = nproadcast_to(context, (X.shape[0], context.shape[0], context.shape[1])) \n15 X_and_context = np concatenate((X, context), 2) \n16 output, state = self.rnn(X_and_context, state) \n17 output = self.dense(output).swapaxes(0, 1) \n18 return output, state", + "guess_lang": "python", + "bbox": [ + 124, + 388, + 480, + 571 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "TensorFlow", + "text_level": 1, + "bbox": [ + 507, + 80, + 603, + 93 + ], + "page_idx": 18 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [], + "code_body": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super().__init__(**kwargs) \n4 self_embedding = tf keras.layers.Embedding(vocab_size, embed_size) \n5 self.rnn = tf keras.layers.RNN(tf keras.layers.StackedRNNCells() \n6 [tf keras.layers.GRUCell(num_hiddens, dropout=dropout) \n7 for _ in range(num_layers)], return_sequences=True, return_state=True) \n8 self.dense = tf keras.layers.Dense(vocab_size) \n9 \n10 def init_state(self, enc_outputs, *args): \n11 return enc_outputs[1] \n12 \n13 def call(self, X, state, **kwargs): \n14 X = self_embedding(X) \n15 context = tf.reduce(tfexpand_dims(state[-1], axis=1), repeats=X.shape[1], axis=1) \n16 X_and_context = tf.cat((X(context), axis=2)) \n17 rnn_output = self.rnn(X_and_context, state, ** kwargs) \n18 output = self>dense(rnn_output[0]) \n19 return output, rnn_output[1:]", + "guess_lang": "python", + "bbox": [ + 512, + 99, + 875, + 325 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "Paddle", + "text_level": 1, + "bbox": [ + 507, + 331, + 566, + 344 + ], + "page_idx": 18 + }, + { + "type": "code", + "sub_type": "code", + "code_caption": [], + "code_body": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 self_embedding = nn.Embedding(vocab_size, embed_size) \n5 weight_attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n6 weight ih attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n7 weight hh attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n8 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout, time major=True, weight ih attr =weight ih attr, weight hh attr = weight hh attr) \n9 \n10 self.dense = nn.Linear(num_hiddens, vocab_size, weight_attr=weight_attr) \n11 \n12 def init_state(self, enc_outputs, *args): \n13 return enc_outputs[1] \n14 \n15 def forward(self, X, state): \n16 X = self_embedding(X).transpose([1, 0, 2]) \n17 context = state[-1].tile([X.shape[0], 1, 1]) \n18 X_and_context = paddle跖cat((X, context), 2) \n19 output, state = self.rnn(X_and_context, state) \n20 output = selfdense(output).transpose([1, 0, 2]) \n21 return output, state", + "guess_lang": "python", + "bbox": [ + 512, + 350, + 875, + 609 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "Figure 2: Implementing RNN Decoder for Seq2Seq Learning in PyTorch, TensorFlow, MXNet and Paddle. [Return to Section 3.2]", + "bbox": [ + 112, + 627, + 880, + 656 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "tion of the source code, then predict the output of the source code, and finally translate it, with the condition that the translated code must successfully execute.", + "bbox": [ + 112, + 682, + 487, + 745 + ], + "page_idx": 18 + }, + { + "type": "text", + "text": "The specific translation prompts are shown in Table 19.", + "bbox": [ + 112, + 747, + 485, + 776 + ], + "page_idx": 18 + }, + { + "type": "page_number", + "text": "5085", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 18 + }, + { + "type": "table", + "img_path": "images/64ad9d57f511fc7a98b79ea7680086ab564d8658f71530e237ceaaf8f1e198ee.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
MethodCC++C#GoVBPythonJavaPHP
CNaive-14.619.084.521.642.1711.232.09
OtO-11.13±0.284.77±0.858.18±0.402.02±0.231.85±0.146.50±2.911.71±0.32
OtM-12.33±0.587.56±0.989.58±0.742.22±0.892.82±0.588.92±0.673.42±0.09
MtO-7.99±1.945.35±0.416.94±0.833.77±0.442.09±0.258.65±0.521.93±0.49
MtM-9.61±0.327.15±1.417.54±0.332.30±0.712.11±0.438.29±0.453.30±0.92
C++Naive14.88-10.083.873.761.6911.391.92
OtO10.58±0.37-6.52±1.966.77±1.082.34±0.901.82±0.379.41±1.591.50±0.03
OtM13.32±2.46-9.87±1.159.83±1.372.62±1.152.93±0.1812.10±1.512.87±0.82
MtO10.54±2.33-6.98±1.467.29±0.733.57±0.742.28±0.187.82±1.261.96±0.20
MtM9.92±1.14-7.79±1.497.70±0.482.06±0.742.38±0.3010.20±1.204.12±0.81
C#Naive9.0510.03-5.057.201.8313.602.58
OtO5.41±1.256.45±1.68-7.10±0.639.42±5.501.73±0.4610.55±1.671.97±0.76
OtM7.42±1.828.99±0.17-9.81±0.686.13±2.922.80±0.4311.92±2.524.55±0.81
MtO6.37±0.696.13±1.60-7.53±0.949.92±1.002.47±0.6210.16±1.401.70±0.20
MtM6.19±0.887.22±0.93-9.36±0.924.60±2.872.23±0.3612.50±1.354.70±0.27
GoNaive4.523.755.04-2.463.006.562.14
OtO5.65±0.416.88±0.474.70±1.28-1.87±0.542.89±0.165.41±1.062.48±0.23
OtM6.06±0.996.56±0.897.28±0.82-2.12±0.653.32±0.368.79±1.063.48±0.20
MtO5.41±0.634.77±0.766.89±0.33-2.94±0.633.12±0.487.81±0.321.79±0.51
MtM5.18±1.236.06±0.287.12±0.72-1.82±0.932.83±0.508.99±1.282.55±0.40
VBNaive1.643.767.292.54-1.422.890.46
OtO3.96±0.205.25±0.6817.34±1.795.85±0.64-1.34±0.065.51±0.430.61±0.18
OtM5.15±0.156.10±0.3019.63±1.037.83±0.45-2.02±0.327.91±0.922.02±0.20
MtO4.25±0.864.15±1.0911.96±1.966.38±0.45-1.66±0.587.26±1.391.18±0.33
MtM5.18±0.655.09±0.1514.13±1.836.97±1.30-2.34±0.118.39±0.772.92±0.22
PythonNaive1.731.141.442.500.89-1.821.28
OtO4.35±0.443.66±0.955.38±0.765.67±0.342.53±1.11-4.70±0.073.24±0.60
OtM4.51±1.335.18±0.526.48±0.716.04±0.961.50±0.56-6.29±0.396.55±0.94
MtO4.70±0.283.44±0.765.48±0.554.80±0.632.42±0.18-5.32±0.662.74±0.39
MtM4.54±0.674.74±0.145.69±0.725.84±0.362.09±0.94-6.45±0.114.49±0.63
JavaNaive11.2311.1513.446.572.842.24-2.60
OtO7.15±1.599.09±1.0010.92±1.6111.05±0.522.66±0.132.54±0.35-2.05±0.95
OtM9.27±1.529.33±0.8613.52±0.9512.57±0.962.92±0.783.98±0.86-6.20±1.08
MtO6.69±0.836.32±1.6610.57±1.168.79±0.443.91±0.572.86±0.36-2.48±0.34
MtM6.56±0.337.60±0.469.40±1.088.30±0.872.20±0.852.53±0.15-3.57±0.94
PHPNaive1.791.512.362.000.371.302.30-
OtO4.18±1.442.91±0.436.45±0.435.85±0.540.42±0.091.98±0.266.47±0.59-
OtM3.78±1.801.93±1.355.51±0.605.13±0.600.56±0.362.70±0.805.51±1.91-
MtO4.97±1.093.69±0.466.08±3.036.44±0.782.28±0.123.55±0.188.66±0.84-
MtM6.03±0.615.15±0.6710.64±1.276.69±0.311.69±0.572.46±0.467.87±1.90-
", + "bbox": [ + 114, + 185, + 882, + 715 + ], + "page_idx": 19 + }, + { + "type": "text", + "text": "Table 14: BLEU scores from different multilingual modeling strategies by fine-tuning the pre-trained CodeT5+_220M model (220M is the model size) (Wang et al., 2023b). Naive denotes Naive Copy, which directly duplicates the source code as the target code without making any modifications. Method OtO, OtM, MtO, and MtM denote One-to-One, One-to-Many, Many-to-One, and Many-to-Many, respectively. The rows correspond to the source language while the columns correspond to the target language. We run each experiment with three different random seeds and report the mean and standard deviation of BLEU scores. [Return to Section 4.1.]", + "bbox": [ + 115, + 724, + 880, + 809 + ], + "page_idx": 19 + }, + { + "type": "page_number", + "text": "5086", + "bbox": [ + 482, + 928, + 519, + 940 + ], + "page_idx": 19 + }, + { + "type": "table", + "img_path": "images/b09776464eaa41cabb1ddc345e4af3d570a408e13422002e397edd614c575cf8.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
MethodTranslation Prompt
Role Assignment #1"role": "system", "content": "Your are a code translation system.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #2"role": "system", "content": "You are a code translation system that specializes in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #3"role": "system", "content": "You are a programmer proficient in multiple programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #4"role": "system", "content": "You are a programmer proficient in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Polite Inquiry #1Please translate the following [SL] code into [TL] code:[SC]
Polite Inquiry #2Can you rewrite this [SL] code in [TL]? [SC]
Clarify UsageTranslating [SL] to [TL] ensures that Python code can be executed. [SC]
Divide & ConquerTranslate [SL] to [TL]: [SC]
", + "bbox": [ + 225, + 93, + 771, + 690 + ], + "page_idx": 20 + }, + { + "type": "table", + "img_path": "images/2cb5b8c4ca4ffad12a508ce9c81dbe78640b0b1eb836563dc43ff7edfda7ce23.jpg", + "table_caption": [ + "Table 15: Translation prompts for prompt variants and contextual strategies on ChatGPT. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language. [Return to Section 4.3]" + ], + "table_footnote": [], + "table_body": "
StrategyTemp.EMBLEUCodeBLEUDSR@0StrategyTop-KEMBLEUCodeBLEUDSR@0
Top-K=000.5710.8324.4548.57%Temp.=000.5710.8324.4548.57%
0.20.5710.8224.4347.71%0.20.5710.8124.4548.29%
0.40.5710.8024.3748.00%0.40.5710.8124.4448.29%
0.60.5710.7824.4548.00%0.60.5710.8224.4248.29%
0.80.5710.8224.4947.71%0.80.5710.8024.3847.71%
1.00.5710.8124.4148.00%1.00.5710.8124.3848.00%
", + "bbox": [ + 115, + 759, + 884, + 864 + ], + "page_idx": 20 + }, + { + "type": "text", + "text": "Table 16: Code translation performance of ChatGPT under different parameter settings. Temp. refers to temperature. [Return to Section 4.3]", + "bbox": [ + 112, + 873, + 882, + 902 + ], + "page_idx": 20 + }, + { + "type": "page_number", + "text": "5087", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 20 + }, + { + "type": "text", + "text": "Self-debug@0", + "text_level": 1, + "bbox": [ + 142, + 151, + 257, + 167 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Translate [source_language] to [target_language]: [source_code].", + "bbox": [ + 332, + 185, + 815, + 202 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "CTO", + "bbox": [ + 828, + 181, + 855, + 199 + ], + "page_idx": 21 + }, + { + "type": "image", + "img_path": "images/3a74811546de4d1af7aa37ef432dc41b7f5159de9c2483282fef0ed1cd5b6377.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 137, + 206, + 169, + 229 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Here is the [target_language] code equivalent", + "bbox": [ + 174, + 212, + 510, + 228 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "of the given [source_language] code: [translated_code].", + "bbox": [ + 174, + 229, + 586, + 244 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Self-debug@n", + "text_level": 1, + "bbox": [ + 142, + 253, + 257, + 269 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "The above python code executes with the following errors, please correct them. [Compiler reports errors]", + "bbox": [ + 383, + 277, + 821, + 307 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "CTO", + "bbox": [ + 828, + 272, + 855, + 291 + ], + "page_idx": 21 + }, + { + "type": "image", + "img_path": "images/3ebce668c0b38ae85b19b0b90b2b829e62fa821d692df2591b34172a63508b41.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 137, + 309, + 169, + 332 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Here is the modified [target_language] code: [translated_code].", + "bbox": [ + 174, + 315, + 642, + 332 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Table 17: A simple demo: Translation prompting of ChatGPT in the multi-round debugging strategy. The content in red is returned by the compiler. [Return to section 4.3.]", + "bbox": [ + 112, + 346, + 880, + 376 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Zero-shot prompting", + "text_level": 1, + "bbox": [ + 142, + 518, + 310, + 533 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Does the following Python code execute? [python_code].", + "bbox": [ + 389, + 552, + 815, + 569 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "CTO", + "bbox": [ + 828, + 546, + 855, + 565 + ], + "page_idx": 21 + }, + { + "type": "image", + "img_path": "images/5793b71ac1800d590d464d56bd1830c8a6a92cb46cf9712bce0b208ece634004.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 139, + 573, + 169, + 595 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Yes, the Python code executes without errors.", + "bbox": [ + 174, + 579, + 510, + 594 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Please predict the executed output of the Python code above.", + "bbox": [ + 366, + 615, + 815, + 633 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "CTO", + "bbox": [ + 828, + 612, + 855, + 631 + ], + "page_idx": 21 + }, + { + "type": "image", + "img_path": "images/275f577a0869f194476f2efdd99bd7b37d41f1fa68958d021ba7891587b6f9db.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 137, + 638, + 169, + 659 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "The predicted execution result of the Python code above is [output].", + "bbox": [ + 174, + 643, + 675, + 659 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Few-shot prompting", + "text_level": 1, + "bbox": [ + 142, + 667, + 305, + 683 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "This is a executable Python code [python_code], and this is a Python code [python_code] that cannot be executed. Does the following Python code execute? [python_code].", + "bbox": [ + 161, + 701, + 821, + 730 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "CTO", + "bbox": [ + 828, + 697, + 855, + 715 + ], + "page_idx": 21 + }, + { + "type": "image", + "img_path": "images/d1fe881fc0f50f4dad68b4a17fa49aa28d55d76a86da992401ef9a8fe23d2676.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 139, + 734, + 169, + 756 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Yes, the Python code executes without errors.", + "bbox": [ + 174, + 740, + 510, + 755 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Please predict the executed output of the Python code above.", + "bbox": [ + 366, + 778, + 815, + 794 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "CTO", + "bbox": [ + 828, + 772, + 855, + 793 + ], + "page_idx": 21 + }, + { + "type": "image", + "img_path": "images/ea3c3b966256479b55dffc4c796ace793468139d99956a638be7c38ef75f461f.jpg", + "image_caption": [], + "image_footnote": [], + "bbox": [ + 137, + 799, + 169, + 821 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "The predicted execution result of the Python code above is [output].", + "bbox": [ + 174, + 804, + 675, + 821 + ], + "page_idx": 21 + }, + { + "type": "text", + "text": "Table 18: Two simple demos: prompting in fuzzy execution experiments. [Return to Section 6.]", + "bbox": [ + 173, + 835, + 820, + 851 + ], + "page_idx": 21 + }, + { + "type": "page_number", + "text": "5088", + "bbox": [ + 480, + 928, + 519, + 940 + ], + "page_idx": 21 + }, + { + "type": "table", + "img_path": "images/d6f80f264d7af8aac05dd8dd564507318374481017566db60a4ded4b6f2d21bd.jpg", + "table_caption": [], + "table_footnote": [], + "table_body": "
MethodTranslation Prompt
One-ShotHere is an example of a translation from [ESL] to [ETL].[ESL]: [ESC], [ETL]: [ETC]. Please imitate this example to translate following code from [SL] to [TL]:[TC].
One-Shot #1where [ESL]≠[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]=[TL] where [ESL]≠[SL] and [ETL]≠[TL]
One-Shot #2where [ESL]=[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]≠[TL]
One-Shot #3where [ESL]≠[SL] and [ETL]≠[TL]
CoT #11.Please explain the function of the following [SL] code, which is limited to 200 words.[SC] 2.Please translate into [TL] code according to the following [SL] code and its functional description.[SL]:[SC].Function description:[DSC]
CoT #2First, understand the function of the following [SL] code. Then, translate the [SL] code into [TL] code while keeping the function unchanged.[SC]
CoT #3First, understand the functionality of the following [SL] code and predict the execution output. Then, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.[SL]
CoT #4First, learn how to translate [ESL] code to [ETL] based on the example, [SL]:[ESC],[TL]:[ETC]. Then, understand the functionality of the following [SL] code and predict the execution output, [SL]:[SC]. Finally, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.
", + "bbox": [ + 240, + 105, + 754, + 809 + ], + "page_idx": 22 + }, + { + "type": "text", + "text": "Table 19: ChatGPT translation prompts on one-shot & CoT strategies. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language,[ESL] refers to the source language in the example, [ESC] refers to the source code in the example, [ETL] refers to the target language in the example, [ETC] refers to the target code in the example, [DSC] refers to the natural language description of the source code. [Return to Section 4.3]", + "bbox": [ + 112, + 818, + 884, + 891 + ], + "page_idx": 22 + }, + { + "type": "page_number", + "text": "5089", + "bbox": [ + 480, + 928, + 521, + 940 + ], + "page_idx": 22 + } +] \ No newline at end of file diff --git a/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_model.json b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3c944d9e500a8b8ad1cb07fbe592b285e958ae7d --- /dev/null +++ b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_model.json @@ -0,0 +1,3810 @@ +[ + [ + { + "type": "title", + "bbox": [ + 0.179, + 0.083, + 0.82, + 0.121 + ], + "angle": 0, + "content": "CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translation" + }, + { + "type": "text", + "bbox": [ + 0.148, + 0.131, + 0.288, + 0.149 + ], + "angle": 0, + "content": "Weixiang Yan\\(^{1*}\\)" + }, + { + "type": "text", + "bbox": [ + 0.319, + 0.132, + 0.446, + 0.148 + ], + "angle": 0, + "content": "Yuchen Tian\\*" + }, + { + "type": "text", + "bbox": [ + 0.482, + 0.132, + 0.582, + 0.148 + ], + "angle": 0, + "content": "Yunzhe Li3" + }, + { + "type": "text", + "bbox": [ + 0.623, + 0.132, + 0.728, + 0.148 + ], + "angle": 0, + "content": "Qian Chen" + }, + { + "type": "text", + "bbox": [ + 0.755, + 0.132, + 0.86, + 0.149 + ], + "angle": 0, + "content": "Wen Wang" + }, + { + "type": "text", + "bbox": [ + 0.146, + 0.163, + 0.852, + 0.231 + ], + "angle": 0, + "content": "1University of California, Santa Barbara 2The University of Hong Kong 3University of Illinois at Urbana-Champaign 4Speech Lab, Alibaba Group weixiangyan@ucsb.edu yuchent@connect.hku.hk yunzhel2@illinois.edu {tanqing.cq,w.wang}@alibaba-inc.com" + }, + { + "type": "title", + "bbox": [ + 0.261, + 0.253, + 0.341, + 0.267 + ], + "angle": 0, + "content": "Abstract" + }, + { + "type": "text", + "bbox": [ + 0.145, + 0.302, + 0.461, + 0.869 + ], + "angle": 0, + "content": "Recent code translation techniques exploit neural machine translation models to translate source code from one programming language to another to satisfy production compatibility or to improve efficiency of codebase maintenance. Most existing code translation datasets only focus on a single pair of popular programming languages. To advance research on code translation and meet diverse requirements of real-world applications, we construct CodeTransOcean, a large-scale comprehensive benchmark that supports the largest variety of programming languages for code translation. CodeTransOcean consists of three novel multilingual datasets, namely, MultilingualTrans supporting translations between multiple popular programming languages, NicheTrans for translating between niche programming languages and popular ones, and LLMTrans for evaluating executability of translated code by large language models (LLMs). CodeTransOcean also includes a novel cross-framework dataset, DLTrans, for translating deep learning code across different frameworks. We develop multilingual modeling approaches for code translation and demonstrate their great potential in improving the translation quality of both low-resource and high-resource language pairs and boosting the training efficiency. We also propose a novel evaluation metric Debugging Success Rate@K for program-level code translation. Last but not least, we evaluate LLM ChatGPT on our datasets and investigate its potential for fuzzy execution predictions. We build baselines for CodeTransOcean and analyze challenges of code translation for guiding future research. The CodeTransOcean datasets and code are publicly available at https://github.com/WeixiangYAN/CodeTransOcean." + }, + { + "type": "title", + "bbox": [ + 0.511, + 0.253, + 0.655, + 0.267 + ], + "angle": 0, + "content": "1 Introduction" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.288, + 0.885, + 0.529 + ], + "angle": 0, + "content": "Early software systems are developed using programming languages such as Fortran and COBOL, which have a significantly smaller user base compared to modern mainstream programming languages (e.g., Python and Java). Hence maintaining and modernizing early software systems are expensive (Opidi, 2020). Moreover, the readability and compatibility of the mixed multitude of programming languages are challenging when migrating existing software systems to new technology ecosystems or integrating software systems using different programming languages. The code translation task aims to convert source code from one programming language to another and is of great value in industry." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.534, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Code translation methods evolve from the inefficient, costly, and error-prone manual rewriting method to automatic methods. Automatic code translation methods can be categorized into compilers and transpilers, rule-based methods, and neural network based methods. Neural models (Feng et al., 2020; Wang et al., 2021, 2023b) have become dominant in code translation. Details of code translation methods are presented in Appendix A.1. The performance of neural models relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are limited by insufficient coverage of programming languages and mostly focusing on a single pair of popular programming languages, limited scale, and uneven data distribution. The widely used CodeTrans (Lu et al., 2021) is a small dataset containing only JavaC# parallel data for quite short code samples. Other datasets (Ahmad et al., 2023; Rozière et al., 2020; Zhu et al., 2022b; Nguyen et al., 2013; Chen et al., 2018) suffer from the same limitations. Consequently, existing code translation models (Feng et al., 2020; Wang et al., 2021; Ahmad et al., 2021) are confined to a narrow range of one-to-one code" + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.893, + 0.489, + 0.919 + ], + "angle": 0, + "content": "*Equal contribution. Work is supported by Speech Lab, Alibaba Group." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5067" + }, + { + "type": "footer", + "bbox": [ + 0.218, + 0.946, + 0.78, + 0.973 + ], + "angle": 0, + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5067-5089 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.119, + 0.082, + 0.885, + 0.255 + ], + "angle": 0, + "content": "
CategoryLanguage/FrameworkDataset NameTrain/Dev/Test #SamplesAvg. #Tokens/SampleAvg. Length
MultilingualPython, C, C++, Visual Basic, Go, PHP, Java, C#MultilingualTrans19,115 / 3,759 / 7,545398 / 421 / 4911099 / 1135 / 1358
Swift, R, Rust, Fortran, Ada, Perl, COBOL, Lua, ...NicheTrans165,457 / 23,509 / 47,502292 / 375 / 505785 / 995 / 1372
Python, C, C++, Visual Basic, Go, PHP, Java, C#LLMTrans-/-/350-/-/270-/-/745
Cross-FrameworkPyTorch, TensorFlow, MXNet, PaddleDLTrans282 / 36 / 90625 / 1102 / 8751318 / 2441 / 1841
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.263, + 0.884, + 0.307 + ], + "angle": 0, + "content": "Table 1: Summary of our CodeTransOcean. We report #Samples, Avg. #Tokens Sample and Avg. Length for Train/Dev/Test sets of each dataset. Note that LLMTrans is only for testing. #Samples are on the program-level. #Tokens are based on RoBERTa tokenizer (Liu et al., 2019). Length is the number of characters." + }, + { + "type": "text", + "bbox": [ + 0.112, + 0.332, + 0.489, + 0.492 + ], + "angle": 0, + "content": "translation scenarios. Moreover, deep learning has been broadly used and achieved unprecedented success. However, there are barriers between different deep learning frameworks during the actual production process. Existing code translation datasets also neglect important demands from real-world applications, including modernizing early software systems developed in niche programming languages and migrating code across different deep learning frameworks." + }, + { + "type": "text", + "bbox": [ + 0.112, + 0.495, + 0.49, + 0.866 + ], + "angle": 0, + "content": "To address these limitations and advance neural code translation models, we construct a large-scale comprehensive multilingual code translation benchmark CodeTransOcean, summarized in Table 1. CodeTransOcean is an innovative benchmark that aims to provide a unified platform for evaluating various models on a comprehensive set of code translation tasks that reflect real-world demands. Based on this goal, each dataset in CodeTransOcean is specifically designed to tackle a key challenge in the field of code translation. CodeTransOcean includes three multilingual datasets, namely, the MultilingualTrans dataset (including eight popular programming languages), the NicheTrans dataset (translating between thirty-seven niche programming languages and the eight popular ones\\(^{1}\\)), and a specialized dataset LLMTrans (including 350 data samples and their executed results) to evaluate executability of code translated by large language models (LLMs), and a cross-framework dataset DLTrans facilitating our proposed task for translating code between deep learning frameworks to enhance code reusability." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.332, + 0.884, + 0.364 + ], + "angle": 0, + "content": "DLTrans includes 408 samples covering four mainstream deep learning frameworks." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.368, + 0.885, + 0.546 + ], + "angle": 0, + "content": "Multilingual modeling shows great potential in neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023), but it has not been systematically explored for code translation. We investigate multilingual modeling for code translation using our MultilingualTrans, NicheTrans, and DLTrans datasets. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves the model training efficiency." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.55, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Recent research indicates that the proficiency of the LLM ChatGPT in natural language translation is on par with commercial-grade translation systems (Jiao et al., 2023). To the best of our knowledge, our work is the first to systematically investigate the potential of ChatGPT in code translation. We develop a fully automated translation-execution-evaluation pipeline AutoTransExecutor to support this study. Note that match-based metrics and execution-based metrics have been used for evaluating code translation methods, with details in Appendix A.1. In order to accurately evaluate the usability of translated code from ChatGPT, we propose a novel execution-based evaluation metric Debugging Success Rate @K (DSR@K), which is the percentage of samples with translation results that successfully execute and produce the expected functionality after \\( K \\) debugging rounds. On our LLMTrans dataset, the baseline ChatGPT setting achieves \\( 48.57\\% \\) DSR@0. We find that self-debugging and one-shot improve the performance while chain-of-thought strategies degrade the translation accuracy. Since our AutoTransEx" + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.881, + 0.488, + 0.92 + ], + "angle": 0, + "content": "1We define popular and niche programming languages based on the TIOBE Programming Community Index, which is a metric of the popularity of programming languages." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5068" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.49, + 0.212 + ], + "angle": 0, + "content": "ecuter still cannot cover arbitrary programming languages, we also propose a novel metric fuzzy execution, attempting to address the limitations of existing evaluation metrics for code translation. Our preliminary study using ChatGPT shows that ChatGPT is still inadequate to predict fuzzy execution for any arbitrary programming language, which demands future research." + }, + { + "type": "text", + "bbox": [ + 0.132, + 0.214, + 0.49, + 0.228 + ], + "angle": 0, + "content": "Our contributions can be summarized as follows:" + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.24, + 0.492, + 0.383 + ], + "angle": 0, + "content": "- A large-scale multilingual code translation benchmark: CodeTransOcean covers the largest number of popular and niche programming languages so far with the largest scale. It also includes an unprecedented dataset for translating code across different deep learning frameworks and a dataset and an automated pipeline for evaluating LLMs on code translation. We establish baselines for all datasets in CodeTransOcean." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.385, + 0.491, + 0.513 + ], + "angle": 0, + "content": "- Multilingual modeling for code translation: We are the first to systematically evaluate multilingual modeling on code translation for both high-resource and low-resource language pairs. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves training efficiency." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.513, + 0.49, + 0.593 + ], + "angle": 0, + "content": "- ChatGPT on code translation: We conduct the first comprehensive study of the potential of ChatGPT on code translation, investigating efficacy of prompting strategies, hyperparameters, self-debugging, One-shot, and Chain-of-Thought." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.594, + 0.49, + 0.673 + ], + "angle": 0, + "content": "- New evaluation metrics: We propose \\(DSR@K\\) to evaluate translation and debugging capabilities of LLMs. We also propose a fuzzy execution metric based on LLMs and conduct a preliminary study using ChatGPT on this metric." + }, + { + "type": "list", + "bbox": [ + 0.115, + 0.24, + 0.492, + 0.673 + ], + "angle": 0, + "content": null + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.685, + 0.271, + 0.7 + ], + "angle": 0, + "content": "2 Related Work" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.71, + 0.491, + 0.919 + ], + "angle": 0, + "content": "Code Translation Datasets The success of neural models for code translation relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are plagued by issues such as insufficient coverage of programming languages, limited scale, and imbalanced data distribution. The widely used code translation dataset CodeTrans (Lu et al., 2021) in the CodeXGLUE benchmark consists of Java-C# function pairs. The small parallel corpus AVATAR (Ahmad et al., 2023) is constructed for Java-Python code translation. Nguyen et al. (2013) construct a Java-C# dataset to explore statistical machine" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.085, + 0.886, + 0.617 + ], + "angle": 0, + "content": "translation on code translation tasks\\(^2\\). Chen et al. (2018) explore this dataset from Nguyen et al. and also construct a CoffeeScript-JavaScript parallel dataset for investigating tree-to-tree neural models for code translation. Rozière et al. (2020) create a dataset containing 852 programs to evaluate unsupervised methods. Recently, Zhu et al. (2022b) construct a new translation dataset CoST from the GeeksForGeeks website\\(^3\\). Subsequently, they release the translation dataset XLCoST (Zhu et al., 2022a), which expands the CoST dataset by 7.3 times. However, the limited language coverage of these datasets and their imbalanced data distribution hinder their practical applications. Rozière et al. (2022) construct the TransCoder-ST dataset to perform unsupervised code translation using automated unit tests. Details of these datasets are summarized in Table 2. Rithy et al. (2022) proposes a code translation dataset XTest containing nine programming languages with unit tests, but it is not open-sourced\\(^4\\). Although CodeNet (Puri et al., 2021) comprises many problem statements and provides corresponding solutions, experts have proven that about half of the CodeNet dataset has incorrect solutions (Zhu et al., 2022b), making it unsuitable for code translation tasks. With the limitations of existing code translation datasets, neural models trained on them may encounter overfitting, underfitting, and poor generalizability. Clearly, these issues impede the development of neural models for code translation. Therefore, constructing datasets that effectively address these problems is critical to enhance performance of code translation algorithms." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.626, + 0.886, + 0.674 + ], + "angle": 0, + "content": "Code Translation Methods and Evaluation Metrics Details of code translation methods and evaluation metrics are presented in Appendix A.1." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.685, + 0.84, + 0.7 + ], + "angle": 0, + "content": "3 The CodeTransOcean Benchmark" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.71, + 0.885, + 0.823 + ], + "angle": 0, + "content": "In this section, we provide detailed descriptions and analyses of our CodeTransOcean benchmark, including the code translation tasks, their associated datasets, and dataset statistics. Details of data collection methods and licensing information as well as quality control and quality assessment are presented in Appendix A.2. Note that the vast" + }, + { + "type": "page_footnote", + "bbox": [ + 0.508, + 0.832, + 0.883, + 0.868 + ], + "angle": 0, + "content": "It was not possible to count specific information about this dataset because it was not released to the public and we were unable to obtain response from the authors." + }, + { + "type": "page_footnote", + "bbox": [ + 0.508, + 0.868, + 0.882, + 0.905 + ], + "angle": 0, + "content": "3In Table 2, we report the program-level counts for the CoST dataset to facilitate a fair comparison with our own program-level datasets." + }, + { + "type": "page_footnote", + "bbox": [ + 0.532, + 0.906, + 0.881, + 0.919 + ], + "angle": 0, + "content": "4We tried to contact the authors but there was no response." + }, + { + "type": "list", + "bbox": [ + 0.508, + 0.832, + 0.883, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5069" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.12, + 0.082, + 0.885, + 0.23 + ], + "angle": 0, + "content": "
Dataset SourceProgramming Languages#SamplesAvg. #Tokens/SampleAvg. Length
CodeTrans (Lu et al., 2021)Java, C#11,80059 / 63 / 58205 / 218 / 202
Avatar (Ahmad et al., 2023)Java, Python9,517239 / 235 / 234691 / 687 / 688
Nguyen et al.(Nguyen et al., 2013)Java, C#16,966--
Lachaux et al.(Rozière et al., 2020)C++, Java, Python852- / 119 / 120- / 313 / 311
CoST (Zhu et al., 2022b)C++, Java, Python, C#, Javascript, PHP, C16,738272 / 180 / 199770 / 458 / 511
TransCoder-ST (Rozière et al., 2022)Java, C++, Python437,030--
XLCoST (Zhu et al., 2022a)C++, Java, Python, C#, Javascript, PHP, C122,151234 / 232 / 222644 / 634 / 606
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.239, + 0.884, + 0.298 + ], + "angle": 0, + "content": "Table 2: Summary of existing code translation datasets. For #Samples, we report program-level counts for Avatar, CoST, and XLCoST. Given that the original samples from other datasets are not organized at the program-level, we report counts at the snippet-level for these datasets. Avg. #Tokens/Sample and Avg. Length are counted in the same way as Table 1." + }, + { + "type": "text", + "bbox": [ + 0.112, + 0.322, + 0.49, + 0.531 + ], + "angle": 0, + "content": "majority of the samples in CodeTransOcean provides explicit input and output, which is equivalent to unit tests. Overall, CodeTransOcean consists of 270,507 samples (over 200K unit tests), covering 45 programming languages for multilingual code translation and 4 deep learning frameworks for cross-framework code translation5. Note that all samples in all CodeTransOcean datasets are constructed at the program-level. We ensure a balanced distribution of each language/framework when constructing the datasets (Appendix A.2). There is no overlap between CodeTransOcean datasets and existing code translation datasets." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.545, + 0.403, + 0.561 + ], + "angle": 0, + "content": "3.1 Multilingual Code Translation" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.568, + 0.49, + 0.713 + ], + "angle": 0, + "content": "With the increasing need to unify the language variety when implementing system integration or extensions with multilingual programming environments, we construct the MultilingualTrans dataset for multiple popular programming languages6. Among programming languages in the rankings, we select the Top-10 languages as popular ones except JavaScript and SQL7 and construct the MultilingualTrans dataset based on the 8 pro" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.322, + 0.885, + 0.483 + ], + "angle": 0, + "content": "gramming languages. We treat the other languages in the rankings as niche languages and construct the NicheTrans dataset for translating between niche languages and popular languages. Additionally, in order to quantitatively evaluate the execution capabilities of the code generated by LLMs (e.g., ChatGPT, PaLM2 (Anil et al., 2023)), we construct LLMTrans, which includes the execution results for a subset of MultilingualTrans and facilitates evaluating LLMs for multilingual code translation." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.492, + 0.885, + 0.75 + ], + "angle": 0, + "content": "MultilingualTrans Dataset This dataset contains 30,419 program samples covering eight popular programming languages, namely, C, C++, C#, Java, Python, Go, PHP, and Visual Basic. Table 11 shows the statistics of each language pair. Note that XLCoST (Zhu et al., 2022a) is the only existing multilingual code translation dataset. Compared to XLCoST, MultilingualTrans is advantageous in more balanced data distribution across various programming languages, practicality of language pairs, and data quality. For example, the real-world requirement for translating Java into JavaScript as in XLCoST is quite limited. As to data quality, our MultilingualTrans originates from a programming chrestomathy website, with all data already reviewed and verified by the website." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.759, + 0.887, + 0.919 + ], + "angle": 0, + "content": "NicheTrans Dataset The NicheTrans dataset contains 236,468 program samples, covering code translation pairs from thirty-seven niche programming languages, including Ada, COBOL, Pascal, Perl, Erlang, Fortran, Scala, Julia and others, to the eight popular ones. Table 12 shows statistics of each niche language. Although many studies have highlighted the practical necessity of code translation for modernizing niche programming languages (Chen et al., 2018; Zhu et al., 2022b; Rozière et al.," + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.725, + 0.488, + 0.81 + ], + "angle": 0, + "content": "\\(^{5}\\)Code Translation also extends to conversions between different versions of the same language, e.g., Python 2 to Python 3. However, according to our survey, these translation tasks are quite straightforward. Naive Copy methods, specific translation tools, and tutorials (e.g., Python 2 to 3 Conversion Guide) already achieve high translation accuracy. As a result, we no longer include these types of tasks in our benchmark." + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.81, + 0.487, + 0.858 + ], + "angle": 0, + "content": "6We categorize languages as popular or niche based on the TIOBE Index Programming Language Rankings released in April 2023 https://www.tiobe.com/tiobe-index/." + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.858, + 0.487, + 0.919 + ], + "angle": 0, + "content": "7It is important to note that JavaScript and SQL, both within the top 10, are mainly used for front-end programming and database management respectively, signifying considerable differences in their usage scenarios compared to the other 8 languages." + }, + { + "type": "list", + "bbox": [ + 0.113, + 0.725, + 0.488, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.522, + 0.941 + ], + "angle": 0, + "content": "5070" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.488, + 0.181 + ], + "angle": 0, + "content": "2020), our NicheTrans dataset is the first dataset for code translation between these niche languages and popular ones. We believe this dataset will not only facilitate modernization of outdated programming languages more effectively, but also augment and evaluate generalizability of neural models." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.189, + 0.49, + 0.43 + ], + "angle": 0, + "content": "LLMTrans Dataset The LLMTrans dataset aims to provide a benchmark for evaluating the performance of LLMs on code translation. The dataset translates seven popular programming languages to Python, totaling 350 program samples. We compile and test these samples and record the execution results. Based on this dataset, we design and implement an automated pipeline, AutoTransExecutor\\(^{8}\\), automatically using LLMs to conduct code translation, execution, debugging, and calculating the success rate. This dataset and the automated pipeline ease investigation of the actual debugging success rate of LLMs on code translation and effectively measure the practical usability of LLMs. Details of the LLMTrans dataset are in Table 1." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.442, + 0.44, + 0.456 + ], + "angle": 0, + "content": "3.2 Cross-framework Code Translation" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.462, + 0.488, + 0.848 + ], + "angle": 0, + "content": "Cross-Deep-Learning-Framework Translation Task The widespread applications of deep learning (DL) has spawned emergence of various DL frameworks, such as PyTorch, TensorFlow, MXNet, and Paddle. However, there are significant differences in syntax and dependency libraries between different frameworks, severely impeding reusability of projects9. Moreover, studies illustrate significant disparities in energy consumption and economic costs during training and inference between various frameworks (Georgiou et al., 2022). Selecting an appropriate DL framework for green AI has become paramount in an era of large models (Ananthaswamy, 2023). Code reusability and energy-economic efficiency in DL have emerged as critical considerations for both research and practical engineering implementation. Converting code between different DL frameworks is challenging, mainly due to differences between frameworks, code complexity, structural inconsistencies, and cross-platform compatibility (more details are in Appendix A.3). Existing cross-DL-framework adaptive technologies such as the ONNX10 model conversion protocol require both parties to import" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.085, + 0.885, + 0.312 + ], + "angle": 0, + "content": "and export based on agreed data formats or to convert only the final model through the computation graphs. These technologies have obvious limitations. In contrast, we propose a Cross-DL-framework Translation task for code migration between different DL frameworks through code translation (Appendix A.4). Compared to existing cross-framework adaptive technologies, Cross-DL-framework Translation achieves re-implementation under multiple DL frameworks through an automated process, which not only generates highly readable code and enables secondary development, but also provides developers with flexibility on combining advantages of multiple frameworks." + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.323, + 0.885, + 0.596 + ], + "angle": 0, + "content": "DLTrans Dataset We construct the DLTrans dataset for Cross-DL-framework Translation, including four deep learning frameworks and spanning twelve directions. To the best of our knowledge, our work is the first to define the cross-DL-framework translation task and construct a corresponding dataset. We create two subsets of different granularities based on the collected code, namely, coarse-grained at the program level and fine-grained at the function or class level. Each code pair comprises code that shares the same functionality but is written in different popular DL frameworks, including PyTorch, TensorFlow, MXNet, and Paddle. The coarse-grained and fine-grained datasets have 408 and 3,270 samples, respectively. In this work, we only experiment on the coarse-grained subset." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.613, + 0.655, + 0.629 + ], + "angle": 0, + "content": "4 Experiments" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.641, + 0.884, + 0.737 + ], + "angle": 0, + "content": "We present experiments of multilingual training for code translation (Section 4.1). We then introduce a novel evaluation metric Debugging Success Rate@K for program-level code translation (Section 4.2) and the first comprehensive exploration of ChatGPT for code translation (Section 4.3)." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.752, + 0.734, + 0.768 + ], + "angle": 0, + "content": "4.1 Multilingual Modeling" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.775, + 0.885, + 0.92 + ], + "angle": 0, + "content": "Multilingual modeling has been pivotal in broadening the applicability of neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023; Johnson et al., 2017). This is primarily evidenced in enhancing the performance of low-resource languages and cross-language transfer learning (Mohammadshahi et al., 2022; Zoph et al., 2016; Nguyen and Chiang, 2017; Johnson et al., 2017). CodeTransOcean covers nearly fifty" + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.854, + 0.488, + 0.919 + ], + "angle": 0, + "content": "\\(^{8}\\)AutoTransExecutor only supports translation from any source language to Python. We discuss it in Limitations. \n\\(^{9}\\)https://www.assemblyai.com/blog/pytorch-vs-tensorflow-in-2023/ \n\\(^{10}\\)https://onnx.ai/" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.519, + 0.941 + ], + "angle": 0, + "content": "5071" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.23, + 0.082, + 0.768, + 0.145 + ], + "angle": 0, + "content": "
AverageOne-to-One (baseline)Many-to-OneMany-to-ManyOne-to-Many
High-resource4.685.56 (↑ 0.88)5.94 (↑ 1.26)6.18 (↑ 1.50)
Low-resource4.834.85 (↑ 0.02)4.95 (↑ 0.12)5.84 (↑ 1.01)
All5.195.31 (↑ 0.12)5.81 (↑ 0.62)6.42 (↑ 1.23)
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.154, + 0.885, + 0.185 + ], + "angle": 0, + "content": "Table 3: Average BLEU scores of the four multilingual modeling strategies, One-to-One, Many-to-One, Many-to-Many, and One-to-Many, for All language pairs, High-resource language pairs, and Low-resource language pairs." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.209, + 0.49, + 0.258 + ], + "angle": 0, + "content": "programming languages and deep learning frameworks. We use its datasets to explore multilingual modeling on code translation tasks." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.267, + 0.49, + 0.587 + ], + "angle": 0, + "content": "Experimental Setups In this work, we use pretrained CodeT5+ (Wang et al., 2023b)\\(^{11}\\) as the backbone based on its superior performance on code understanding and generation evaluations reported in (Wang et al., 2023b). We use the MultilingualTrans dataset to investigate four multilingual modeling strategies based on data sharing in the source or target language or both, namely, One-to-One, One-to-Many, Many-to-One, and Many-to-Many, with One-to-One as the baseline. Details of the four strategies are in Appendix A.5. To understand the strengths and weaknesses of the four strategies, we compare their average performance on all language pairs and focus on low-resource and high-resource pairs. Since the CodeBLEU metric (Ren et al., 2020) does not cover all eight languages in MultilingualTrans, we use BLEU to measure translation accuracy for the four strategies. Then, we establish baselines for the DLTrans and NicheTrans datasets." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.589, + 0.49, + 0.734 + ], + "angle": 0, + "content": "We rank the resource richness of the eight programming languages in MultilingualTrans in descending order based on their amounts in the CodeT5+ pre-training data, as Java, PHP, C, C#, Python, C++, and Go (Visual Basic is not covered by the CodeT5+ pre-training data). Based on this ranking, we consider Visual Basic, C++, and Go as low-resource languages and Java, PHP and C as high-resource languages." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.743, + 0.49, + 0.873 + ], + "angle": 0, + "content": "Results and Analysis Detailed experimental results are shown in Table 14 in Appendix. For All language pairs, the performance of the four strategies is ranked as One-to-Many \\(>\\) Many-to-Many \\(>\\) Many-to-One \\(>\\) One-to-One. (1) Under One-to-Many strategy, the model encoder can provide more comprehensive information for source language translation due to its ability to absorb more source" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.209, + 0.885, + 0.61 + ], + "angle": 0, + "content": "language features, thereby improving generalizability of the model. (2) Many-to-Many can be considered as expanding the One-to-Many strategy by employing a greater volume of non-source language data for training. Since the encoder must be attuned to the features of various languages simultaneously under Many-to-Many, parameter sharing may potentially undermine the performance. (3) Many-to-One helps the model to learn from a broader range of data than the baseline. Specific patterns or expressions in diverse source languages assist the model in more precisely comprehending how to translate into the target language. The shared semantic representations across different source languages allow the model to implement effective transfer learning strategies. Furthermore, increase in training samples enables the model to optimize the loss function more stably. These results are consistent with previous findings on multilingual modeling for natural language translation (Aharoni et al., 2019): Many-to-Many models, trained across multiple target languages instead of just one target language, can function effectively as a regularization strategy for Many-to-One, thereby reducing the possibility of over-matching." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.613, + 0.887, + 0.805 + ], + "angle": 0, + "content": "For High-resource and Low-resource languages, as shown in Table 3, the ranking of the four strategies is the same as for All, but there is notable difference in their adaptability across languages of varying resource scales. High-resource languages can take advantage more effectively from the shared information across multiple source languages; whereas, low-resource languages are relatively less equipped to handle the additional uncertainty and noise introduced by shared parameters, and thus often have to rely on a larger volume of source language data to optimize their benefits." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.807, + 0.887, + 0.92 + ], + "angle": 0, + "content": "Results from the Many-to-Many strategy on DL-Trans and NicheTrans datasets are shown in Tables 4 and 5. The experimental results suggest that significant improvements in translation accuracy can be achieved by swapping the source and target languages in the training set to facilitate data augmentation and training a bidirectional model." + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.881, + 0.49, + 0.919 + ], + "angle": 0, + "content": "11We will conduct evaluations of a broader selection of models on our datasets in future work, including LLaMA (Touvron et al., 2023), WizardCoder (Luo et al., 2023), etc." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.522, + 0.941 + ], + "angle": 0, + "content": "5072" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.116, + 0.083, + 0.885, + 0.184 + ], + "angle": 0, + "content": "
MethodMetricPyTorchTensorFlowMXNetPaddle
EMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEU
NaivePyTorch---27.2766.2569.4628.1872.7776.6330.9180.3583.13
TensorFlow27.2766.3268.92---29.0963.7967.9427.2763.0465.81
MXNet28.1872.8674.1529.0963.8466.06---28.1869.4971.09
Paddle30.9180.2584.8327.2762.9467.7828.1869.4375.09---
CodeT5+PyTorch---35.45±0.9171.16±0.7370.54±0.7542.73±2.4181.76±0.4582.52±0.5643.64±1.5885.76±0.6085.07±0.74
TensorFlow34.85±1.3871.97±0.5671.08±0.72---36.67±1.8972.77±0.6173.04±0.1829.70±2.6369.38±0.3868.76±0.32
MXNet32.12±2.2977.79±0.1376.43±0.1431.82±1.5867.22±0.3967.68±0.27---29.09±0.9174.26±0.4673.27±0.42
Paddle43.03±4.1086.25±0.8686.09±0.8829.39±2.9369.43±0.5769.57±0.5135.75±0.5378.65±0.6279.46±0.38---
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.191, + 0.884, + 0.222 + ], + "angle": 0, + "content": "Table 4: Results on DLTrans of Naive and CodeT5+_220M with Many-to-Many strategy. We run each experiment with 3 random seeds and report the mean and standard deviation of EM, BLEU, and CodeBLEU scores." + }, + { + "type": "table", + "bbox": [ + 0.147, + 0.242, + 0.457, + 0.386 + ], + "angle": 0, + "content": "
BLEUNaiveTwo-wayOne-way
Many-to-C2.364.604.86
Many-to-C#2.534.483.82
Many-to-C++1.994.783.32
Many-to-Go3.115.243.19
Many-to-Java3.185.235.34
Many-to-PHP4.372.461.98
Many-to-Python2.872.381.67
Many-to-VB1.692.171.97
Average2.763.923.27
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.394, + 0.49, + 0.454 + ], + "angle": 0, + "content": "Table 5: BLEU scores on NicheTrans of Naive and CodeT5+_220M with Many-to-Many strategy. One-way denotes training models only from niche to popular, while Two-way denotes training in both directions." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.48, + 0.49, + 0.641 + ], + "angle": 0, + "content": "Notably, prior studies on multilingual neural machine translation often overlook the comparison between One-to-Many and other strategies. Nevertheless, One-to-Many demonstrates superiority over the One-to-One baseline across all our experiments. Overall, our results strongly recommend a targeted multilingual modeling strategy for code translation, as it not only can translate multiple language pairs with a single model, but also achieves better and more stable accuracy than baselines." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.655, + 0.383, + 0.672 + ], + "angle": 0, + "content": "4.2 Debugging Success Rate@K" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.678, + 0.49, + 0.92 + ], + "angle": 0, + "content": "For evaluations, we adopt existing code translation evaluation metrics in our experiments, including Exact Match (EM), BLEU, and CodeBLEU (details are in Appendix A.1.2). However, all these metrics are based on surface-form matching (or with some adaptations as for CodeBLEU) and are not suitable for our program-level translation tasks since they cannot reliably evaluate functional correctness of translated code. Moreover, in real-world software development scenarios, developers typically ensure the functionality of code by testing and debugging upon completion, rather than writing and testing multiple versions of the code to achieve the expected functionality as measured by the existing pass@k (Kulal et al., 2019) metric." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.246, + 0.885, + 0.437 + ], + "angle": 0, + "content": "Meanwhile, recent research shows that LLMs such as ChatGPT demonstrate preliminary code debugging capabilities (Chen et al., 2023b,a). Hence, we propose a novel and robust evaluation metric for LLM on code translation, Debugging Success Rate@K (DSR@K), by measuring whether the translated code can be compiled and executed with the same behavior as the input source code, with K rounds of debugging. To the best of our knowledge, \\(DSR@K\\) is the first metric designed to accurately reflect real-world software development scenarios." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.439, + 0.885, + 0.697 + ], + "angle": 0, + "content": "\\(DSR@K\\) is the percentage of the samples that successfully execute and produce the expected results among all samples. Each sample is given \\(K\\) generation and debugging attempts by an LLM. If the generated code successfully executes and produces the expected results with these \\(K\\) rounds, the sample is marked as successful. \\(DSR@K\\) is computed as \\(\\frac{1}{N}\\sum_{i=1}^{N}S(i,K)\\), where \\(N\\) denotes the total number of samples. If the \\(i^{th}\\) code sample succeeds within \\(K\\) attempts, then \\(S(i,K) = 1\\); otherwise, \\(S(i,K) = 0\\). Note that DSR@0 can be used for program-level code translation evaluation for any models. In this work, we employ DSR@K to evaluate the ability of LLMs such as ChatGPT for debugging code and translating code with debugging results." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.706, + 0.803, + 0.721 + ], + "angle": 0, + "content": "4.3 ChatGPT for Code Translation" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.727, + 0.885, + 0.919 + ], + "angle": 0, + "content": "The recent LLM ChatGPT demonstrates competitive performance on language generation tasks such as summarization and machine translation (Yang et al., 2023; Peng et al., 2023; Gao et al., 2023). However, ChatGPT for code translation has not been systematically explored. We study the effectiveness and potential of ChatGPT on code translation and investigate strategies to improve its performance. We use DSR@K as the principal evaluation metric since we focus on the practical usability of ChatGPT. We use the ChatGPT API and gpt-3.5-turbo as the default model and evaluate on the" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5073" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.114, + 0.085, + 0.49, + 0.15 + ], + "angle": 0, + "content": "LLMTrans dataset for all experiments. We investigate the efficacy of prompts and hyperparameters and context in zero-shot setting, then compare one-shot versus zero-shot and study Chain-of-Thought." + }, + { + "type": "text", + "bbox": [ + 0.112, + 0.162, + 0.49, + 0.403 + ], + "angle": 0, + "content": "Effect of Prompts and Hyperparameters Prior works show that prompts can influence the performance of ChatGPT (Zhong et al., 2023; Peng et al., 2023; Jiao et al., 2023). We set an initial prompt \"Translate [SL] to [TL]: [SC].\" as the baseline, where [SL] and [TL] denote the source language and the target language respectively and [SC] denotes the source code. We also add \"Do not return anything other than the translated code.\" for each prompting strategy to require ChatGPT to return only code in order to ease code execution. We design three prompt variants. Details of the experimental settings and prompt variants are in Appendix A.6. We also investigate the effect of hyperparameters on code translation performance." + }, + { + "type": "text", + "bbox": [ + 0.116, + 0.403, + 0.49, + 0.854 + ], + "angle": 0, + "content": "As shown in Table 6, implementing role assignments, clarifying usage, and polite inquiry in prompts all degrade the performance compared to the baseline prompt. These results show that the baseline with the most straightforward prompt produces the best performance, possibly because it provides clear, short, and unambiguous instructions for the task to the model. More intricate prompting strategies may introduce noise and confuse ChatGPT. The performance of polite inquiry prompt is comparable to but still worse than the baseline performance. We speculate that the improvement from polite inquiries in prior studies (Akin, 2023) may stem from their explicit and comprehensive formulations which make it easier for the model to understand the task requirements. We also observe in Table 6 that same as prior findings, BLEU and CodeBLEU have no obvious positive correlations with the debugging success rate (DSR@0). Since the reference target code exhibits the same functionality as the source language code but their execution results could differ slightly, EM also does not correlate with DSR@0. Therefore, in subsequent experiments, we only report DSR@0. We also evaluate the CodeT5+_220M model on LLMTrans with the Many-to-Many strategy and find that DSR@0 is 0, suggesting that CodeT5+_220M Zero-shot is unable to generate executable translation results." + }, + { + "type": "text", + "bbox": [ + 0.112, + 0.856, + 0.49, + 0.92 + ], + "angle": 0, + "content": "ChatGPT selects the token with the highest probability during generation. The hyperparameter temperature influences the randomness of the generated text, while top \\( p \\) controls the range of vocabu" + }, + { + "type": "table", + "bbox": [ + 0.512, + 0.082, + 0.883, + 0.2 + ], + "angle": 0, + "content": "
StrategyExpt #numEMBLEUCodeBLEUDSR@0
Baseline-0.2910.8324.4648.57%
Role assignments10.0011.0624.3643.43%
20.0011.0624.4843.14%
30.0010.7024.0841.71%
40.0010.7324.0840.86%
Polite inquiry10.2910.8324.3747.71%
20.8610.8724.2647.71%
Clarify usage-0.2910.6324.1144.00%
Divide-and-Conquer-0.007.4425.3022.86%
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.207, + 0.885, + 0.267 + ], + "angle": 0, + "content": "Table 6: Zero-shot performance of ChatGPT with different prompt variants and contextual strategies. Baseline denotes ChatGPT with the baseline prompt. Details of the prompt variants (Expt #num) are in Appendix A.6." + }, + { + "type": "table", + "bbox": [ + 0.54, + 0.288, + 0.851, + 0.341 + ], + "angle": 0, + "content": "
KthDebugDSRKthDebugDSR
048.57%252.29%
151.43%352.57%
" + }, + { + "type": "table_caption", + "bbox": [ + 0.51, + 0.35, + 0.88, + 0.366 + ], + "angle": 0, + "content": "Table 7: ChatGPT performance at the \\( {K}^{th} \\) debugging." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.385, + 0.885, + 0.514 + ], + "angle": 0, + "content": "lary considered during generation. Higher temperature or top_p could increase diversity in the generated results from ChatGPT. However, as shown in Table 16 in Appendix, independently varying temperature or top_p does not notably change the performance of ChatGPT; hence for the other ChatGPT experiments, we set both temperature and top_p as 0 to ensure stability an reproducibility." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.524, + 0.885, + 0.7 + ], + "angle": 0, + "content": "Effect of Context We explore a Divide-and-Conquer strategy, which segments the source language code into snippets (e.g., functions and subfunctions), translate each snippet independently, then merge their outputs as the final result. As shown in Table 6, Divide-and-Conquer significantly degrades the performance. We hypothesize that lack of the global context in Divide-and-Conquer could prevent ChatGPT from considering the overall structure and variable configurations of the code for translation." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.71, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Effect of Self-debugging Since ChatGPT has shown preliminary capability in error detection and correction during code generation (Shinn et al., 2023; Chen et al., 2023b; Kim et al., 2023; Nair et al., 2023; Madaan et al., 2023), we use ChatGPT to perform multiple rounds of self-debugging and investigate the impact on DSR. Specifically, ChatGPT first translates the source language code into the target language (which is Python as in our AutoTransExecutor) and then attempts to execute the translated code. If the execution passes and executing the translated code exhibits the same functionality as the source code, it is regarded as" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.522, + 0.941 + ], + "angle": 0, + "content": "5074" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.493, + 0.312 + ], + "angle": 0, + "content": "a successful execution. Otherwise, feedback from the compiler will be also fed to ChatGPT for the next round of translation, and this process is repeated until reaching a pre-defined number \\( K \\) of debugging rounds. The whole process is shown in Table 17 in Appendix. As shown in Table 7, DSR improves significantly with multiple rounds of self-debugging. The first self-debugging improves DSR by \\( 3\\% \\) absolutely. Each subsequent round of self-debugging brings further gain but DSR begins to plateau after the second debugging round. This suggests that ChatGPT has limitations in its capacity to rectify errors after multiple debugging cycles, which is consistent with human behaviors." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.325, + 0.49, + 0.501 + ], + "angle": 0, + "content": "Effect of One-shot In-context learning (Brown et al., 2020) allows the model to learn from input examples, enabling it to understand and manage each new task. This method has been validated as an effective strategy for enhancing the performance of model inference (Peng et al., 2023; Liu et al., 2023a). Therefore, we explore one-shot learning for ChatGPT on code translation. We investigate three one-shot learning sample selection strategies. Descriptions of the strategies and the corresponding prompts are in Appendix A.7." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.504, + 0.492, + 0.794 + ], + "angle": 0, + "content": "Table 8 shows that all three One-shot learning strategies effectively improve DSR@0 of ChatGPT over the Zero-shot baseline. The Experiment#2 strategy (provided contextual example has both same source and target languages as the original task) achieves the best performance, yielding \\(1.72\\%\\) absolute gain in DSR@0, with Experiment #1 (example has the same target language but different source language) and #3 (example has different source and target languages) following closely with \\(1.14\\%\\) and \\(0.29\\%\\) absolute gains, respectively. These results show that One-shot learning entirely tailored to the translation requirements is most effective in boosting code translation performance for ChatGPT. The results corroborate previous findings in natural language translation (Peng et al., 2023) that the performance of ChatGPT is sensitive to the provided contextual example in One-shot learning." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.807, + 0.49, + 0.92 + ], + "angle": 0, + "content": "Effect of Chain-of-Thought Chain-of-Thought (CoT) allows the model to simulate an orderly and structured way of thinking by sorting out the thinking process. It helps guide the model to output the final answer step by step (Wei et al., 2022; Peng et al., 2023; Kojima et al., 2022). For code translation, we investigate four CoT strategies. Detailed" + }, + { + "type": "table", + "bbox": [ + 0.513, + 0.083, + 0.885, + 0.151 + ], + "angle": 0, + "content": "
StrategyExpts #numDSR@0StrategyExpts #numDSR@0
Baseline-48.57%CoT146.00%
One-shot149.71%242.57%
250.29%348.29%
348.86%445.43%
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.16, + 0.885, + 0.204 + ], + "angle": 0, + "content": "Table 8: Performance of ChatGPT with One-shot and CoT strategies compared to the Zero-shot Baseline. Details of Expt #num are in Appendix A.7 and A.8." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.234, + 0.887, + 0.462 + ], + "angle": 0, + "content": "descriptions and translation prompts for each strategy are in Appendix A.8. As shown in Table 8, CoT degrades executability of the translated code. In Experiment #2, DSR@0 even declines by \\(6\\%\\) absolutely. We study the translation results of ChatGPT and find that when CoT strategies are applied, the model tends to translate the source code line by line, neglecting compatibility issues between libraries and functions in different languages. CoT also compromises the global planning ability of the model. These observations are consistent with the findings in (Peng et al., 2023) that CoT may lead to word-by-word translations of natural language, thereby degrading the translation quality." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.479, + 0.886, + 0.673 + ], + "angle": 0, + "content": "Fuzzy Execution To address the limitations of existing evaluation metrics and our AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution using LLMs in Section Limitations, inspired by recent progress in using LLMs as evaluation metrics for NLP tasks. Our preliminary studies evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also for predicting the executed output. Experimental results show that using ChatGPT for fuzzy execution is not yet practical and demands future research." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.694, + 0.642, + 0.71 + ], + "angle": 0, + "content": "5 Conclusion" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.727, + 0.886, + 0.919 + ], + "angle": 0, + "content": "We construct CodeTransOcean, a comprehensive code translation benchmark that includes multilingual and cross-framework datasets. We demonstrate that multilingual modeling has remarkable potential in enhancing code translation quality. We also reveal the superior code translation capability of ChatGPT and advanced strategies lead to significant performance gains. Moreover, we introduce fuzzy execution that may overcome limitations of existing metrics but requires future research. In summary, we provide a comprehensive suite of resources, tools, and baselines for code translation." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5075" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.115, + 0.085, + 0.251, + 0.099 + ], + "angle": 0, + "content": "6 Limitations" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.112, + 0.49, + 0.336 + ], + "angle": 0, + "content": "Existing match-based evaluation metrics for code translation (Papineni et al., 2002; Ren et al., 2020; Eghbali and Pradel, 2022; Zhou et al., 2023; Tran et al., 2019) focus solely on semantics, overlooking executability of the code and the functional equivalence under different implementations. Execution-based metrics (Kulal et al., 2019; Hao et al., 2022; Hendrycks et al., 2021; Rozière et al., 2020; Dong et al., 2023) that require providing test cases are expensive to conduct in practice, and the significant overhead of executing numerous test cases and the heightened security risks during the execution process remain unresolved. It is crucial to establish an evaluation metric that overcomes these limitations." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.338, + 0.49, + 0.675 + ], + "angle": 0, + "content": "Our proposed DSR@K and the automated AutoTransExecutor aim to measure the executability of the code and reflect the real-world software development scenarios. However, AutoTransExecutor currently only supports Python as the target language. This is mainly due to the fact that different programming languages necessitate distinct runtime environments and libraries, making it particularly challenging to automatically detect and install the required dependencies for each code. While certain existing tools, such as Dynatrace12, can carry out dependency detection, the range of supported programming languages remains limited. Moreover, the configuration methods for compilers vary substantially among different programming languages, which further complicates automated configuration. In addition, fully automated execution systems could be exploited by malicious code, thus necessitating further security measures. Therefore, achieving this goal requires overcoming many technical and practical difficulties." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.677, + 0.49, + 0.74 + ], + "angle": 0, + "content": "To address limitations of existing evaluation metrics and limitations of AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.742, + 0.49, + 0.87 + ], + "angle": 0, + "content": "Recent studies have begun to utilize LLMs as evaluation metrics in the field of NLP (Chen et al., 2023c; Wang et al., 2023a; Fu et al., 2023; Kocmi and Federmann, 2023; Ji et al., 2023). Inspired by these works, we create a new dataset ExecuteStatus by randomly selecting 300 executable samples from MultilingualTrans and 300 non-executable samples from the translation results of ChatGPT." + }, + { + "type": "table", + "bbox": [ + 0.512, + 0.082, + 0.883, + 0.153 + ], + "angle": 0, + "content": "
Zero-ShotFew-Shot
TNFPFNTPTNFPFNTP
292823862294424258
✓12 ×280✓14 ×282
" + }, + { + "type": "table_caption", + "bbox": [ + 0.509, + 0.162, + 0.882, + 0.192 + ], + "angle": 0, + "content": "Table 9: Confusion matrix of fuzzy execution prediction by ChatGPT with Zero-shot and Few-shot settings." + }, + { + "type": "table", + "bbox": [ + 0.512, + 0.209, + 0.882, + 0.35 + ], + "angle": 0, + "content": "
MetricsCalculation formulaZero-ShotFew-Shot
AccuracyTP + TN59.00%59.00%
TP + TN + FN + FP
PrecisionTP88.57%93.55%
TP + FP
RecallTP20.67%19.33%
TP + FN
F1 scores2 · Precision · Recall33.52%32.04%
Precision + Recall
" + }, + { + "type": "table_caption", + "bbox": [ + 0.508, + 0.361, + 0.883, + 0.389 + ], + "angle": 0, + "content": "Table 10: Performance of ChatGPT on predicting fuzzy execution." + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.419, + 0.885, + 0.595 + ], + "angle": 0, + "content": "Each entry in this dataset includes the execution status and, if executable, the result of the execution. We use ExecuteStatus and AutoTransExecutor to evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also predict the executed output. The Zero-shot prompts are shown in Table 18 in Appendix. For the Few-shot strategy, in addition to the Zero-shot baseline, we include an example of executable code and an example of non-executable code, as detailed in Table 18." + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.598, + 0.885, + 0.92 + ], + "angle": 0, + "content": "We define fuzzy execution as first testing the consistency between the actual pass rate and the predicted pass rate of ChatGPT, followed by further testing the accuracy in predicting execution results using ChatGPT without relying on a compiler. Since we are interested in the ability of ChatGPT to identify samples that cannot actually be executed accurately, we present the confusion matrix in Table 9 based on the results. To evaluate the performance of ChatGPT on the fuzzy execution prediction task, we use the standard accuracy, precision, recall, and F1 scores. Experimental results based on these evaluation metrics are in Table 10. The low accuracy, recall and F1 scores show that ChatGPT still has difficulty in identifying errors in the code, exhibiting about an \\(88\\%\\) tendency to predict that the code is executable. Overall, ChatGPT has low accuracy in the binary classification task of \"whether it can be executed\", and its ability to predict execution results, being at a scant \\(4\\%\\), clearly" + }, + { + "type": "page_footnote", + "bbox": [ + 0.114, + 0.88, + 0.418, + 0.919 + ], + "angle": 0, + "content": "\\(^{12}\\)https://www.dynatrace.com/ platform/artificial-intelligence/ dependency-detection/" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.928, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5076" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.113, + 0.085, + 0.493, + 0.182 + ], + "angle": 0, + "content": "requires further enhancement. Thus, using ChatGPT for fuzzy execution is not yet practical (Liu et al., 2023b). Despite this, fuzzy execution with LLMs holds the potential to overcome the deficiencies of current code translation evaluation metrics. We will continue this exploration in future work." + }, + { + "type": "title", + "bbox": [ + 0.116, + 0.208, + 0.214, + 0.222 + ], + "angle": 0, + "content": "References" + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.23, + 0.49, + 0.336 + ], + "angle": 0, + "content": "Roee Aharoni, Melvin Johnson, and Orhan First. 2019. Massively multilingual neural machine translation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 3874-3884. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.345, + 0.49, + 0.451 + ], + "angle": 0, + "content": "Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. 2021. Unified pre-training for program understanding and generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 2655-2668. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.459, + 0.49, + 0.552 + ], + "angle": 0, + "content": "Wasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, and Kai-Wei Chang. 2023. AVATAR: A parallel corpus for javapython program translation. In Findings of the Association for Computational Linguistics: ACL 2023, Toronto, Canada, July 9-14, 2023, pages 2268-2281. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.561, + 0.467, + 0.575 + ], + "angle": 0, + "content": "Fatih Kadir Akın. 2023. awesome-chatgpt-prompts." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.584, + 0.488, + 0.649 + ], + "angle": 0, + "content": "Badr AlKhamissi, Siddharth Verma, Ping Yu, Zhijing Jin, Asli Celikyilmaz, and Mona T. Diab. 2023. OPTR: exploring the role of explanations in finetuning and prompting for reasoning skills of large language models. CoRR, abs/2305.12001." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.659, + 0.488, + 0.685 + ], + "angle": 0, + "content": "Anil Ananthaswamy. 2023. In ai, is bigger always better? Nature." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.695, + 0.49, + 0.918 + ], + "angle": 0, + "content": "Rohan Anil, Andrew M. Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, Eric Chu, Jonathan H. Clark, Laurent El Shafey, Yanping Huang, Kathy Meier-Hellstern, Gaurav Mishra, Erica Moreira, Mark Omernick, Kevin Robinson, Sebastian Ruder, Yi Tay, Kefan Xiao, Yuanzhong Xu, Yujing Zhang, Gustavo Hernandez Abrego, Junwhan Ahn, Jacob Austin, Paul Barham, Jan A. Botha, James Bradbury, Siddhartha Brahma, Kevin Brooks, Michele Catasta, Yong Cheng, Colin Cherry, Christopher A. Choquette-Choo, Aakanksha Chowdhery, Clement Crepy, Shachi Dave, Mostafa Dehghani, Sunipa Dev, Jacob Devlin, Mark Diaz, Nan Du, Ethan Dyer, Vladimir Feinberg, Fangxiaoyu Feng, Vlad Fienber, Markus Freitag, Xavier Garcia, Sebastian Gehrmann, Lucas Gonzalez, and" + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.23, + 0.49, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.529, + 0.086, + 0.883, + 0.112 + ], + "angle": 0, + "content": "et al. 2023. Palm 2 technical report. CoRR, abs/2305.10403." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.123, + 0.885, + 0.319 + ], + "angle": 0, + "content": "Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.33, + 0.885, + 0.435 + ], + "angle": 0, + "content": "Saikat Chakraborty, Toufique Ahmed, Yangruibo Ding, Premkumar T. Devanbu, and Baishakhi Ray. 2022. Natgen: generative pre-training by \"naturalizing\" source code. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2022, Singapore, Singapore, November 14-18, 2022, pages 18-30. ACM." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.446, + 0.885, + 0.512 + ], + "angle": 0, + "content": "Angelica Chen, Jérémy Scheurer, Tomasz Korbak, Jon Ander Campos, Jun Shern Chan, Samuel R. Bowman, Kyunhyun Cho, and Ethan Perez. 2023a. Improving code generation by training with natural language feedback. CoRR, abs/2303.16749." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.522, + 0.885, + 0.562 + ], + "angle": 0, + "content": "Xinyun Chen, Maxwell Lin, Nathanael Scharli, and Denny Zhou. 2023b. Teaching large language models to self-debug. CoRR, abs/2304.05128." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.573, + 0.885, + 0.652 + ], + "angle": 0, + "content": "Xinyun Chen, Chang Liu, and Dawn Song. 2018. Tree-to-tree neural networks for program translation. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pages 2552-2562." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.662, + 0.885, + 0.728 + ], + "angle": 0, + "content": "Yi Chen, Rui Wang, Haiyun Jiang, Shuming Shi, and Ruifeng Xu. 2023c. Exploring the use of large language models for reference-free text quality evaluation: A preliminary empirical study. CoRR, abs/2304.00723." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.738, + 0.885, + 0.791 + ], + "angle": 0, + "content": "Yihong Dong, Jiazheng Ding, Xue Jiang, Zhuo Li, Ge Li, and Zhi Jin. 2023. Codescore: Evaluating code generation by learning code execution. CoRR, abs/2301.09043." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.802, + 0.885, + 0.88 + ], + "angle": 0, + "content": "Aryaz Eghbali and Michael Pradel. 2022. Crystalbleu: Precisely and efficiently measuring the similarity of code. In 37th IEEE/ACM International Conference on Automated Software Engineering, ASE 2022, Rochester, MI, USA, October 10-14, 2022, pages 28:1-28:12. ACM." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.892, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin," + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.919 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5077" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.135, + 0.086, + 0.487, + 0.178 + ], + "angle": 0, + "content": "Ting Liu, Daxin Jiang, and Ming Zhou. 2020. Codebert: A pre-trained model for programming and natural languages. In Findings of the Association for Computational Linguistics: EMNLP 2020, Online Event, 16-20 November 2020, volume EMNLP 2020 of Findings of ACL, pages 1536-1547. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.189, + 0.487, + 0.227 + ], + "angle": 0, + "content": "Jinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. 2023. Gptscore: Evaluate as you desire. CoRR, abs/2302.04166." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.24, + 0.487, + 0.29 + ], + "angle": 0, + "content": "Mingqi Gao, Jie Ruan, Renliang Sun, Xunjian Yin, Shiping Yang, and Xiaojun Wan. 2023. Humanlike summarization evaluation with chatgpt. CoRR, abs/2304.02554." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.304, + 0.487, + 0.381 + ], + "angle": 0, + "content": "Stefanos Georgiou, Maria Kechagia, Tushar Sharma, Federica Sarro, and Ying Zou. 2022. Green AI: do deep learning frameworks have different costs? In 44th IEEE/ACM 44th International Conference on Software Engineering, ICSE 2022, Pittsburgh, PA, USA, May 25-27, 2022, pages 1082-1094. ACM." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.393, + 0.487, + 0.509 + ], + "angle": 0, + "content": "Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun Deng, Colin B. Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. 2021. Graphcodebert: Pre-training code representations with data flow. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.522, + 0.487, + 0.573 + ], + "angle": 0, + "content": "Yiyang Hao, Ge Li, Yongqiang Liu, Xiaowei Miao, He Zong, Siyuan Jiang, Yang Liu, and He Wei. 2022. Aixbench: A code generation benchmark dataset. CoRR, abs/2206.13179." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.585, + 0.487, + 0.687 + ], + "angle": 0, + "content": "Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. 2021. Measuring coding challenge competence with APPS. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.7, + 0.487, + 0.764 + ], + "angle": 0, + "content": "Yunjie Ji, Yan Gong, Yiping Peng, Chao Ni, Peiyan Sun, Dongyu Pan, Baochang Ma, and Xiangang Li. 2023. Exploring chatgpt's ability to rank content: A preliminary study on consistency with human preferences. CoRR, abs/2303.07610." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.777, + 0.486, + 0.816 + ], + "angle": 0, + "content": "Wenxiang Jiao, Wenxuan Wang, Jen tse Huang, Xing Wang, and Zhaopeng Tu. 2023. Is chatgpt a good translator? yes with gpt-4 as the engine." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.827, + 0.487, + 0.918 + ], + "angle": 0, + "content": "Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda B. Viégas, Martin Wattenberg, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2017. Google's multilingual neural machine translation system: Enabling zero-shot translation. Trans. Assoc. Comput. Linguistics, 5:339-351." + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.487, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.086, + 0.882, + 0.125 + ], + "angle": 0, + "content": "Geunwoo Kim, Pierre Baldi, and Stephen McAleer. 2023. Language models can solve computer tasks. CoRR, abs/2303.17491." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.137, + 0.882, + 0.227 + ], + "angle": 0, + "content": "Tom Kocmi and Christian Federmann. 2023. Large language models are state-of-the-art evaluators of translation quality. In Proceedings of the 24th Annual Conference of the European Association for Machine Translation, EAMT 2023, Tampere, Finland, 12-15 June 2023, pages 193-203. European Association for Machine Translation." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.24, + 0.882, + 0.278 + ], + "angle": 0, + "content": "Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. In NeurIPS." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.29, + 0.882, + 0.381 + ], + "angle": 0, + "content": "Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy Liang. 2019. Spoc: Search-based pseudocode to code. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 11883-11894." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.393, + 0.882, + 0.457 + ], + "angle": 0, + "content": "Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023a. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv., 55(9):195:1-195:35." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.469, + 0.882, + 0.534 + ], + "angle": 0, + "content": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.546, + 0.882, + 0.597 + ], + "angle": 0, + "content": "Yongkang Liu, Shi Feng, Daling Wang, Yifei Zhang, and Hinrich Schütze. 2023b. Evaluate what you can't evaluate: Unassessable generated responses quality. CoRR, abs/2305.14658." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.609, + 0.882, + 0.764 + ], + "angle": 0, + "content": "Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin B. Clement, Dawn Drain, Daxin Jiang, Duyu Tang, Ge Li, Li-dong Zhou, Linjun Shou, Long Zhou, Michele Tufano, Ming Gong, Ming Zhou, Nan Duan, Neel Sundaresan, Shao Kun Deng, Shengyu Fu, and Shujie Liu. 2021. Codexglue: A machine learning benchmark dataset for code understanding and generation. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.777, + 0.882, + 0.841 + ], + "angle": 0, + "content": "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. CoRR, abs/2306.08568." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.853, + 0.882, + 0.918 + ], + "angle": 0, + "content": "Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Sean Welleck, Bodhisattwa Prasad Majumder, Shashank Gupta, Amir Yazdanbakhsh, and Peter" + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.882, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5078" + } + ], + [ + { + "type": "ref_text", + "bbox": [ + 0.135, + 0.086, + 0.486, + 0.113 + ], + "angle": 0, + "content": "Clark. 2023. Self-refine: Iterative refinement with self-feedback. CoRR, abs/2303.17651." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.122, + 0.49, + 0.241 + ], + "angle": 0, + "content": "Alireza Mohammadshahi, Vassilina Nikoulina, Alexandre Berard, Caroline Brun, James Henderson, and Laurent Besacier. 2022. Small-100: Introducing shallow multilingual machine translation model for low-resource languages. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 8348-8359. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.25, + 0.489, + 0.303 + ], + "angle": 0, + "content": "Varun Nair, Elliot Schumacher, Geoffrey J. Tso, and Anitha Kannan. 2023. DERA: enhancing large language model completions with dialog-enabled resolving agents. CoRR, abs/2303.17071." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.312, + 0.489, + 0.416 + ], + "angle": 0, + "content": "Anh Tuan Nguyen, Tung Thanh Nguyen, and Tien N. Nguyen. 2013. Lexical statistical machine translation for language migration. In Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE'13, Saint Petersburg, Russian Federation, August 18-26, 2013, pages 651-654. ACM." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.427, + 0.488, + 0.532 + ], + "angle": 0, + "content": "Toan Q. Nguyen and David Chiang. 2017. Transfer learning across low-resource, related languages for neural machine translation. In Proceedings of the Eighth International Joint Conference on Natural Language Processing, IJCNLP 2017, Taipei, Taiwan, November 27 - December 1, 2017, Volume 2: Short Papers, pages 296-301. Asian Federation of Natural Language Processing." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.541, + 0.488, + 0.567 + ], + "angle": 0, + "content": "OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.577, + 0.486, + 0.604 + ], + "angle": 0, + "content": "Alfrick Opidi. 2020. Why your legacy software is hard to maintain and what to do about it." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.613, + 0.489, + 0.693 + ], + "angle": 0, + "content": "Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, July 6-12, 2002, Philadelphia, PA, USA, pages 311-318. ACL." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.702, + 0.489, + 0.767 + ], + "angle": 0, + "content": "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. CoRR, abs/2303.13780." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.777, + 0.489, + 0.87 + ], + "angle": 0, + "content": "Ruchir Puri, David S. Kung, Geert Janssen, Wei Zhang, Giacomo Domeniconi, Vladimir Zolotov, Julian Dolby, Jie Chen, Mihir R. Choudhury, Lindsey Decker, Veronika Thost, Luca Buratti, Saurabh Pajar, and Ulrich Finkler. 2021. Project codenet: A largescale AI for code dataset for learning a diversity of coding tasks. CoRR, abs/2105.12655." + }, + { + "type": "ref_text", + "bbox": [ + 0.117, + 0.879, + 0.489, + 0.918 + ], + "angle": 0, + "content": "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" + }, + { + "type": "list", + "bbox": [ + 0.117, + 0.086, + 0.49, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "ref_text", + "bbox": [ + 0.53, + 0.086, + 0.883, + 0.113 + ], + "angle": 0, + "content": "for automatic evaluation of code synthesis. CoRR, abs/2009.10297." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.123, + 0.885, + 0.203 + ], + "angle": 0, + "content": "Israt Jahan Rithy, Hasib Hossain Shakil, Niloy Mondal, Fatema Sultana, and Faisal Muhammad Shah. 2022. Xtest: A parallel multilingual corpus with test cases for code translation and its evaluation*. In 2022 25th International Conference on Computer and Information Technology (ICCIT), pages 623-628." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.214, + 0.885, + 0.305 + ], + "angle": 0, + "content": "Baptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, and Guillaume Lample. 2020. Unsupervised translation of programming languages. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.316, + 0.883, + 0.395 + ], + "angle": 0, + "content": "Baptiste Rozière, Jie Zhang, François Charton, Mark Harman, Gabriel Synnaeve, and Guillaume Lample. 2022. Leveraging automated unit tests for unsupervised code translation. In *The Tenth International Conference on Learning Representations*, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.406, + 0.883, + 0.459 + ], + "angle": 0, + "content": "Noah Shinn, Federico Cassano, Beck Labash, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language agents with verbal reinforcement learning." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.469, + 0.883, + 0.549 + ], + "angle": 0, + "content": "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.56, + 0.883, + 0.638 + ], + "angle": 0, + "content": "Ngoc M. Tran, Hieu Tran, Son Nguyen, Hoan Nguyen, and Tien N. Nguyen. 2019. Does BLEU score work for code migration? In Proceedings of the 27th International Conference on Program Comprehension, ICPC 2019, Montreal, QC, Canada, May 25-31, 2019, pages 165-176. IEEE / ACM." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.649, + 0.883, + 0.702 + ], + "angle": 0, + "content": "Jiaan Wang, Yunlong Liang, Fandong Meng, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023a. Is chatgpt a good NLG evaluator? A preliminary study. CoRR, abs/2303.04048." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.712, + 0.883, + 0.805 + ], + "angle": 0, + "content": "Yiren Wang, ChengXiang Zhai, and Hany Hassan. 2020. Multi-task learning for multilingual neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 1022-1034. Association for Computational Linguistics." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.814, + 0.883, + 0.88 + ], + "angle": 0, + "content": "Yue Wang, Hung Le, Akhilesh Deepak Gotmare, Nghi D. Q. Bui, Junnan Li, and Steven C. H. Hoi. 2023b. Codet5+: Open code large language models for code understanding and generation. CoRR, abs/2305.07922." + }, + { + "type": "ref_text", + "bbox": [ + 0.512, + 0.892, + 0.883, + 0.918 + ], + "angle": 0, + "content": "Yue Wang, Weishi Wang, Shafiq R. Joty, and Steven C. H. Hoi. 2021. Codet5: Identifier-aware unified" + }, + { + "type": "list", + "bbox": [ + 0.512, + 0.086, + 0.885, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5079" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.132, + 0.086, + 0.49, + 0.179 + ], + "angle": 0, + "content": "pre-trained encoder-decoder models for code understanding and generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 8696-8708. Association for Computational Linguistics." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.188, + 0.49, + 0.255 + ], + "angle": 0, + "content": "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." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.265, + 0.49, + 0.369 + ], + "angle": 0, + "content": "Justin D. Weisz, Michael J. Muller, Stephanie Houde, John T. Richards, Steven I. Ross, Fernando Martinez, Mayank Agarwal, and Kartik Talamadupula. 2021. Perfection not required? human-ai partnerships in code translation. In IUI '21: 26th International Conference on Intelligent User Interfaces, College Station, TX, USA, April 13-17, 2021, pages 402-412. ACM." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.38, + 0.49, + 0.473 + ], + "angle": 0, + "content": "Justin D. Weisz, Michael J. Muller, Steven I. Ross, Fernando Martinez, Stephanie Houde, Mayank Agarwal, Kartik Talamadupula, and John T. Richards. 2022. Better together? an evaluation of ai-supported code translation. In IUI 2022: 27th International Conference on Intelligent User Interfaces, Helsinki, Finland, March 22 - 25, 2022, pages 369-391. ACM." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.483, + 0.49, + 0.589 + ], + "angle": 0, + "content": "Ning Wu, Ming Gong, Linjun Shou, Shining Liang, and Daxin Jiang. 2023. Large language models are diverse role-players for summarization evaluation. In *Natural Language Processing and Chinese Computing - 12th National CCF Conference*, NLPCC 2023, Foshan, China, October 12-15, 2023, Proceedings, Part I, volume 14302 of Lecture Notes in Computer Science, pages 695-707. Springer." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.598, + 0.49, + 0.664 + ], + "angle": 0, + "content": "Jingfeng Yang, Hongye Jin, Ruixiang Tang, Xiaotian Han, Qizhang Feng, Haoming Jiang, Bing Yin, and Xia Hu. 2023. Harnessing the power of llms in practice: A survey on chatgpt and beyond. CoRR, abs/2304.13712." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.675, + 0.49, + 0.728 + ], + "angle": 0, + "content": "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. CoRR, abs/2302.10198." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.738, + 0.49, + 0.791 + ], + "angle": 0, + "content": "Shuyan Zhou, Uri Alon, Sumit Agarwal, and Graham Neubig. 2023. Codebertscore: Evaluating code generation with pretrained models of code. CoRR, abs/2302.05527." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.802, + 0.49, + 0.856 + ], + "angle": 0, + "content": "Ming Zhu, Aneesh Jain, Karthik Suresh, Roshan Ravindran, Sindhu Tipirneni, and Chandan K. Reddy. 2022a. Xlcost: A benchmark dataset for cross-lingual code intelligence. CoRR, abs/2206.08474." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.866, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Ming Zhu, Karthik Suresh, and Chandan K. Reddy. 2022b. Multilingual code snippets training for program translation. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth" + }, + { + "type": "text", + "bbox": [ + 0.527, + 0.086, + 0.885, + 0.153 + ], + "angle": 0, + "content": "Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11783-11790. AAAI Press." + }, + { + "type": "text", + "bbox": [ + 0.51, + 0.161, + 0.885, + 0.227 + ], + "angle": 0, + "content": "Wenhao Zhu, Hongyi Liu, Qingxiu Dong, Jingjing Xu, Lingpeng Kong, Jiajun Chen, Lei Li, and Shujian Huang. 2023. Multilingual machine translation with large language models: Empirical results and analysis. CoRR, abs/2304.04675." + }, + { + "type": "text", + "bbox": [ + 0.51, + 0.237, + 0.885, + 0.33 + ], + "angle": 0, + "content": "Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016. Transfer learning for low-resource neural machine translation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pages 1568-1575. The Association for Computational Linguistics." + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.34, + 0.634, + 0.357 + ], + "angle": 0, + "content": "A Appendix" + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.366, + 0.671, + 0.38 + ], + "angle": 0, + "content": "A.1 Related Work" + }, + { + "type": "title", + "bbox": [ + 0.51, + 0.387, + 0.783, + 0.401 + ], + "angle": 0, + "content": "A.1.1 Code Translation Methods" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.406, + 0.885, + 0.581 + ], + "angle": 0, + "content": "Naive Copy directly duplicates the source code as the target code without making any modifications. Given that the results produced by this method are often unusable, it is treated as the lower bound of performance for code translation. Early code translation relies heavily on manual rewriting, which requires developers to have a deep understanding of both source and target languages along with the ability to navigate various complex programming structures and semantic challenges. This method is inefficient, costly, and prone to errors." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.583, + 0.885, + 0.856 + ], + "angle": 0, + "content": "Automatic code translation methods fall into several categories. Compilers and transpilers13 can automatically translate the source code into a target language, significantly saving time and effort. However, these methods cannot fully preserve all the linguistic features and behaviors of the source code, nor can they comprehend the intent and semantics inherent to the source code as humans do. Rule-based methods (Weisz et al., 2021, 2022; Rozière et al., 2020) treat the code translation task as a program synthesis problem. They define a set of transformation rules and employ the rules or pattern matching for code translation. Research on rule-based methods is quite scarce, mainly because they overly rely on the completeness of the rules and also require a considerable amount of manual preprocessing." + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.856, + 0.884, + 0.887 + ], + "angle": 0, + "content": "Neural network based methods have become dominant in the field of code translation in recent" + }, + { + "type": "page_footnote", + "bbox": [ + 0.51, + 0.892, + 0.813, + 0.919 + ], + "angle": 0, + "content": "13https://en.wikipedia.org/wiki/ Source-to-source_compiler" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5080" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.117, + 0.085, + 0.491, + 0.55 + ], + "angle": 0, + "content": "years. These methods mainly treat code translation as a sequence-to-sequence generation problem. Among them, Chen et al. (Chen et al., 2018) are the first to successfully apply neural networks to code translation, designing a tree-to-tree neural model. CodeBERT (Feng et al., 2020) significantly improves code translation accuracy by pretraining models with masked language modeling and replaced token detection. GraphCodeBERT (Guo et al., 2021) further improves code translation accuracy by introducing two additional pre-training tasks as edge prediction and node alignment. CodeT5 (Wang et al., 2021), based on the Transformer encoder-decoder architecture, achieves excellent performance on code translation through four pre-training tasks, namely, masked span prediction, identifier tagging, masked identifier prediction, and bimodal dual generation. With a similar architecture as CodeT5, PLBART (Ahmad et al., 2021) adopts three tasks of token masking, token deletion and token infilling for denoising seq2seq pre-training, which enables PLBART to infer language syntax and semantics and to learn how to generate language coherently. NatGen (Chakraborty et al., 2022) forces the model to learn to capture intent of the source code by setting up \"Code-Naturalization\" tasks during pre-training, and forces the model to make the generated code closer to the human-written style." + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.553, + 0.49, + 0.76 + ], + "angle": 0, + "content": "In the line of neural network based methods, recently released large language models (LLMs) (e.g., ChatGPT (OpenAI, 2023)) have shown remarkable performance in a wide range of NLP tasks with instructions and a few in-context examples. ChatGPT is built upon GPT and is optimized with Reinforcement Learning from Human Feedback. ChatGPT can efficiently understand and generate code sequences, and can self-learn from human feedback to improve the quality and accuracy of its outputs. This significant advancement has markedly propelled progress in the field of code translation." + }, + { + "type": "title", + "bbox": [ + 0.118, + 0.772, + 0.378, + 0.786 + ], + "angle": 0, + "content": "A.1.2 Code Translation Metrics" + }, + { + "type": "text", + "bbox": [ + 0.117, + 0.792, + 0.49, + 0.919 + ], + "angle": 0, + "content": "Match-Based Evaluation Metrics These evaluation metrics are based on the similarity between the translation output and the reference translation. Among them, the Exact Match (EM) metric calculates the percentage of translation outputs that exactly match the reference translation, which overlooks the fact that the same function can be implemented in various ways. The Bilingual Evalu" + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.085, + 0.884, + 0.583 + ], + "angle": 0, + "content": "ation Understudy (BLEU) (Papineni et al., 2002) metric evaluates the similarity between the translation output and the reference translation by multiplying the geometric average of n-gram precision scores with a brevity penalty. The CodeBLEU (Ren et al., 2020) metric extends BLEU by considering syntactic and semantic characteristics of programming languages; it not only considers shallow matching but also pays attention to syntactic and semantic matching. CrystalBLEU (Eghbali and Pradel, 2022) focuses more on the inherent differences between source code and natural language, such as trivial shared n-gram syntax. CodeBERTScore (Zhou et al., 2023) uses pre-trained models to encode the translation output and reference translation, then calculates the dot product similarity between them, enabling comparisons of code pairs with distinct lexical forms. However, CodeBLEU, CrystalBLEU, and CodeBERTScore have limitations as they only support a limited range of programming languages and cannot be used in general multilingual scenarios. Ruby (Tran et al., 2019), a new method for evaluating code translation, considers the lexical, syntactic, and semantic representations of source code. However, its codebase has not yet been open-sourced. These match-based evaluation metrics can only evaluate the surface form and semantic differences of the code, while neglecting the executability of the code and the functional equivalence of implementation variations." + }, + { + "type": "title", + "bbox": [ + 0.513, + 0.599, + 0.882, + 0.613 + ], + "angle": 0, + "content": "Execution-Based Evaluation Metrics" + }, + { + "type": "text", + "bbox": [ + 0.512, + 0.615, + 0.884, + 0.919 + ], + "angle": 0, + "content": "Execution-based evaluation metrics mainly compare the executed result of the generated code with the expected result. The PASS@k score (Kulal et al., 2019) is evaluated by unit tests: if any of the \\( k \\) samples meets the expected result, the generated result is deemed successful. AvgPassRatio (Hao et al., 2022; Hendrycks et al., 2021) evaluates the overall executable result of code by calculating the average pass rate of test cases. Computational accuracy (Rozière et al., 2020) measures the quality of the generated code snippet by comparing the output of this snippet with the reference code snippet when given the same input. Additionally, CodeScore (Dong et al., 2023) claims that it can estimate the PassRatio of test cases for the generated code without executing the code, but its codebase has not yet been open-sourced. These execution-based evaluation metrics require construction of executable test" + }, + { + "type": "page_number", + "bbox": [ + 0.483, + 0.929, + 0.518, + 0.941 + ], + "angle": 0, + "content": "5081" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.139, + 0.082, + 0.86, + 0.341 + ], + "angle": 0, + "content": "
MethodTrainDevTestTotalMethodTrainDevTestTotal
C ↔ C#796841691049C ↔ C++7991492981246
C ↔ Go8772274541558C ↔ Java8131713431327
C ↔ Python9012134261540C ↔ PHP29651102449
C ↔ VB61797194908C++ ↔ C#74879160987
C++ ↔ Go7922084181418C++ ↔ Java7531723451270
C++ ↔ Python8422024051449C++ ↔ PHP29153106450
C++ ↔ VB58697195888C# ↔ Go7771002021079
C# ↔ Java750861741010C# ↔ Python813991991111
C# ↔ PHP2934080413C# ↔ VB59770142809
Java ↔ Go7932214431457Java ↔ Python8382174361491
Java ↔ PHP574119239932Java ↔ VB610104210924
Go ↔ Python8873146281828Go ↔ PHP606128258992
Go ↔ VB618116232966PHP ↔ Python9271853701482
PHP ↔ VB2674488399VB ↔ Python644114229987
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.35, + 0.884, + 0.381 + ], + "angle": 0, + "content": "Table 11: Composition and Distribution of the Multilingual Dataset. The numbers refer to the number of code pair samples. VB is short for Visual Basic. [Return to Section 3.1]" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.405, + 0.489, + 0.468 + ], + "angle": 0, + "content": "sets, which could be costly. Furthermore, due to potential security threats from the execution environment and the code, they need to be run in an isolated sandbox." + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.484, + 0.313, + 0.5 + ], + "angle": 0, + "content": "A.2 Data Management" + }, + { + "type": "title", + "bbox": [ + 0.114, + 0.507, + 0.373, + 0.521 + ], + "angle": 0, + "content": "A.2.1 Data Sources & Licenses" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.528, + 0.49, + 0.688 + ], + "angle": 0, + "content": "We collect CodeTransOcean from two different platforms. The MultilingualTrans and NicheTrans datasets are collected from Rosetta Code\\(^{14}\\), a programming site presenting solution strategies for identical tasks across as many programming languages as possible, thereby demonstrating both similarities and differences among these languages. We strictly adhere to the data distribution license of the platform as Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license\\(^{15}\\)." + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.69, + 0.49, + 0.819 + ], + "angle": 0, + "content": "The DLTrans dataset is derived from an open-source teaching platform *Dive into Deep Learning*\\(^{16}\\), which is dedicated to teaching deep learning knowledge ranging from theoretical background, conceptual understanding, to coding practices. We strictly adhere to the data distribution license of this platform as *Apache-2.0*\\(^{17}\\). To ensure legal and regulated use of these datasets, we require strict" + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.405, + 0.719, + 0.42 + ], + "angle": 0, + "content": "adherence to these licenses." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.43, + 0.702, + 0.446 + ], + "angle": 0, + "content": "A.2.2 Data Processing" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.449, + 0.885, + 0.578 + ], + "angle": 0, + "content": "Multilingual Datasets Given the variations in compilation requirements among programming languages, we keep the original format as much as possible to ensure the compileability of the data while ensuring its accuracy. Additionally, we employ a duplicate-file-detection tool to identify and remove duplicate data from the dataset to avoid any potential data leakage problems during model training." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.587, + 0.884, + 0.667 + ], + "angle": 0, + "content": "Cross-Framework Dataset To ensure the comparability of Python, we keep the original formatting information. We manually verify all automatically collected samples, identify and exclude samples that do not meet the requirements." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.675, + 0.677, + 0.691 + ], + "angle": 0, + "content": "A.2.3 Data Quality" + }, + { + "type": "text", + "bbox": [ + 0.507, + 0.695, + 0.884, + 0.807 + ], + "angle": 0, + "content": "We randomly select 1K samples from each dataset within CodeTransOcean for manual quality assessment. We find that for the MultilingualTrans dataset with compilation requirements, the comparability rate exceeds \\(90\\%\\). We verify that the code pairs in each dataset are functionally identical and confirm that CodeTransOcean is of high quality." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.808, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Additionally, during data collection, we pay special attention to the diversity of domain knowledge and code styles. CodeTransOcean includes various code examples ranging from basic syntactic structures to complex algorithm implementations, as well as building neural networks from scratch and conducting training and inference. This rich" + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.83, + 0.485, + 0.855 + ], + "angle": 0, + "content": "\\(^{14}\\)https://rosettacode.org/wiki/Rosetta_Code" + }, + { + "type": "page_footnote", + "bbox": [ + 0.113, + 0.856, + 0.482, + 0.88 + ], + "angle": 0, + "content": "15 https://creativecommons.org/licenses/by-sa/4.0/" + }, + { + "type": "page_footnote", + "bbox": [ + 0.134, + 0.881, + 0.439, + 0.893 + ], + "angle": 0, + "content": "16https://github.com/d2l-ai/d2l-zh" + }, + { + "type": "page_footnote", + "bbox": [ + 0.134, + 0.894, + 0.446, + 0.918 + ], + "angle": 0, + "content": "17https://github.com/d2l-ai/d2l-zh/ .ob/master/License" + }, + { + "type": "list", + "bbox": [ + 0.113, + 0.83, + 0.485, + 0.918 + ], + "angle": 0, + "content": null + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.522, + 0.941 + ], + "angle": 0, + "content": "5082" + } + ], + [ + { + "type": "text", + "bbox": [ + 0.114, + 0.085, + 0.486, + 0.117 + ], + "angle": 0, + "content": "diversity ensures that CodeTransOcean reflects a wide variety of real-world scenarios." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.128, + 0.45, + 0.159 + ], + "angle": 0, + "content": "A.3 Specific Challenges in Implementing Cross-framework Translation" + }, + { + "type": "text", + "bbox": [ + 0.113, + 0.166, + 0.49, + 0.424 + ], + "angle": 0, + "content": "Firstly, there are significant design differences between frameworks, including data processing methods, model-building strategies, and network connection techniques. Secondly, the inherent complexity of DL code increases the difficulty of conversion, as these codes usually contain various components such as neural network layers, loss functions, optimizers, and learning rate schedulers. Thirdly, there are significant inconsistencies in the code structure of different frameworks, such as code organization and variable naming rules. Lastly, cross-platform compatibility must be considered because DL code may encounter compatibility issues when executing on different hardware platforms (e.g., GPUs, CPUs, TPUs) and operating systems." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.435, + 0.431, + 0.466 + ], + "angle": 0, + "content": "A.4 Code Examples on Different Deep Learning Frameworks" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.472, + 0.488, + 0.52 + ], + "angle": 0, + "content": "Figures 1 and 2 show the implementation of two different deep learning components in various deep learning frameworks." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.532, + 0.342, + 0.548 + ], + "angle": 0, + "content": "A.5 Multilingual Modeling" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.553, + 0.489, + 0.601 + ], + "angle": 0, + "content": "One-to-One For each language pair in the dataset, we train an independent model, e.g., translating \\(\\mathrm{C + + }\\) to Java." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.61, + 0.489, + 0.659 + ], + "angle": 0, + "content": "One-to-Many We train individual models from one language to many other languages, e.g., translating Python to all other languages." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.669, + 0.489, + 0.716 + ], + "angle": 0, + "content": "Many-to-One We train individual models from multiple languages to one language, e.g., translating all other languages to Python." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.726, + 0.487, + 0.773 + ], + "angle": 0, + "content": "Many-to-Many We train a unified model for the multiple to multiple languages in the dataset, which can handle translations between all languages." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.775, + 0.489, + 0.823 + ], + "angle": 0, + "content": "We ensure all experiments are performed under the same hyperparameters and environment for comparison. Table 13 shows these in detail." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.835, + 0.311, + 0.85 + ], + "angle": 0, + "content": "A.6 Prompt Variations" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.855, + 0.489, + 0.919 + ], + "angle": 0, + "content": "Role Assignment (Peng et al., 2023; AlKhamissi et al., 2023; Wu et al., 2023; Akin, 2023) We configured two distinct roles for the model, each with unique skills. This arrangement empowers the" + }, + { + "type": "code_caption", + "bbox": [ + 0.512, + 0.081, + 0.581, + 0.096 + ], + "angle": 0, + "content": "PyTorch" + }, + { + "type": "code", + "bbox": [ + 0.517, + 0.102, + 0.883, + 0.196 + ], + "angle": 0, + "content": "1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): \n2 def forward(self, pred, label, valid_len): \n3 weights \\(=\\) torch.ones_like.label) \n4 weights \\(=\\) sequence_mask(weights,valid_len) \n5 self.reduce \\(\\equiv\\) 'none' \n6 unweighted_loss \\(=\\) super(MaskedSoftmaxCELoss,self).forward( \n7 pred.permute(0,2,1),label) \n8 weighted_loss \\(=\\) (unweighted_loss \\* weights).mean( dim=1) \n9 return weighted_loss" + }, + { + "type": "code_caption", + "bbox": [ + 0.512, + 0.201, + 0.607, + 0.214 + ], + "angle": 0, + "content": "TensorFlow" + }, + { + "type": "code", + "bbox": [ + 0.517, + 0.22, + 0.875, + 0.363 + ], + "angle": 0, + "content": "1 class MaskedSoftmaxCELoss(tf.keras.losses.Loss): \n2 def __init__(self, valid_len): \n3 super().init_(reduction='none') \n4 self.valid_len = valid_len \n5 \n6 def call(self, label, pred): \n7 weights = tf.ones_like.label, dtype=tf.float32) \n8 weights = sequence_mask(weights, self.valid_len) \n9 label_one-hot = tf.one-hot.label, depth=pred.shape[-1]) \n10 unweighted_loss = tf.keras.losses. CategoricalCrossentropy( from_logits=True, reduction='none')( label_one-hot, pred) \n11 weighted_loss = tf.reduce_mean((unweighted_loss* weights), axis=1) \n13 return weighted_loss" + }, + { + "type": "code_caption", + "bbox": [ + 0.512, + 0.369, + 0.573, + 0.382 + ], + "angle": 0, + "content": "MXNet" + }, + { + "type": "code", + "bbox": [ + 0.518, + 0.388, + 0.876, + 0.456 + ], + "angle": 0, + "content": "1 class MaskedSoftmaxCELoss(gluon.loss.SoftmaxCELoss): \n2 def forward(self, pred, label, valid_len): \n3 weights = npexpand_dims(np.ones_like.label), axis=1) \n4 weights = npx(sequenceMask(weights, valid_len, True, axis=1)) \n5 return super(MaskedSoftmaxCELoss, self).forward(pred, label, weights)" + }, + { + "type": "code_caption", + "bbox": [ + 0.512, + 0.461, + 0.569, + 0.474 + ], + "angle": 0, + "content": "Paddle" + }, + { + "type": "code", + "bbox": [ + 0.518, + 0.48, + 0.882, + 0.574 + ], + "angle": 0, + "content": "1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): \n2 def forward(self, pred, label, valid_len): \n3 weights \\(=\\) paddle.ones_like.label) \n4 weights \\(=\\) sequence_mask(weights,valid_len) \n5 self.reduction \\(\\equiv\\) 'none' \n6 unweighted_loss \\(=\\) super(MaskedSoftmaxCELoss,self).forward( \n7 pred, label) \n8 weighted_loss \\(=\\) (unweighted_loss \\* weights).mean( axis=1) \n9 return weighted_loss" + }, + { + "type": "image_caption", + "bbox": [ + 0.509, + 0.593, + 0.884, + 0.621 + ], + "angle": 0, + "content": "Figure 1: Softmax cross-entropy loss function with masking in PyTorch, TensorFlow, MXNet and Paddle." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.645, + 0.884, + 0.678 + ], + "angle": 0, + "content": "model to simulate more domain-adaptable and specialized expert roles." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.686, + 0.884, + 0.83 + ], + "angle": 0, + "content": "Polite inquiry (Akin, 2023) These strategies add polite expression and set up imperative and interrogative requests. Given that ChatGPT is designed to simulate human conversation styles as closely as possible, including understanding and simulating polite language expressions. Therefore, we expect these strategies to boost the comprehension of the model and augment the quality of its generated results." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.84, + 0.882, + 0.903 + ], + "angle": 0, + "content": "Clarify usage This strategy aims to make the model clearly aware of its requirements during the code translation process - the generated code needs to be guaranteed to execute without issues." + }, + { + "type": "text", + "bbox": [ + 0.509, + 0.904, + 0.882, + 0.919 + ], + "angle": 0, + "content": "The translation prompts of the above four strategies" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.52, + 0.941 + ], + "angle": 0, + "content": "5083" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.141, + 0.082, + 0.858, + 0.422 + ], + "angle": 0, + "content": "
MethodTrainDevTestTotalMethodTrainDevTestTotal
Ada60224649377423Elixir36182975994514
Arturo38024709475219Erlang32692174493935
AutoHotKey430555511205980Factor472486017567340
AWK388057811625620Forth36193396904648
BBC Basic36632394854387Fortran40503056174972
Clojure36173106334560Groovy37732274674467
Common Lisp50854679336485Haskell5647104520978789
D554182516628028Icon26461583263130
Delphi35474368894872J5476120424229102
Julia58291511305510395Ruby5793129026009683
Lua531667713667359COBOL24381673552960
Mathematica5485104621058636REXX5595111822418954
MATLAB28721573223351R28031974023402
Nim5814132126759810Racket564690118178364
OCaml42864058175508Rust514671714397302
Pascal33934659424800Tcl535474015027596
Perl58181445291410177PowerShell35632404904293
Scala5852107421649090F#451763812876442
Swift36534048184875
" + }, + { + "type": "table_caption", + "bbox": [ + 0.131, + 0.431, + 0.866, + 0.447 + ], + "angle": 0, + "content": "Table 12: The number of code samples for each language in the NicheTrans datasets. [Return to Section 3.1]" + }, + { + "type": "table", + "bbox": [ + 0.117, + 0.468, + 0.487, + 0.584 + ], + "angle": 0, + "content": "
MultilingualTransNicheTransDLTrans
Learning rate3e-52e-53e-5
Beam size115
Max source length15361536512
Max target length15361536512
Batch size16
Max epoch5
Fp16True
GPUNVIDIA Tesla V100 32GB
" + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.594, + 0.489, + 0.637 + ], + "angle": 0, + "content": "Table 13: Parameters and hardware configuration for training CodeT5+_220M (220M is the model size) on CodeTransOcean." + }, + { + "type": "text", + "bbox": [ + 0.115, + 0.667, + 0.285, + 0.682 + ], + "angle": 0, + "content": "are shown in Table 15." + }, + { + "type": "title", + "bbox": [ + 0.115, + 0.701, + 0.24, + 0.715 + ], + "angle": 0, + "content": "A.7 One-Shot" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.726, + 0.489, + 0.807 + ], + "angle": 0, + "content": "Experiment #1 selects a training sample from a high-resource language code pair as an example. In this case, the target language type aligns with the target language type of the translation request, but the source language does not." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.823, + 0.489, + 0.919 + ], + "angle": 0, + "content": "Experiment #2 selects a code pair whose source and target language directions are congruent with the translation requirements as an example. That is, the source and target languages of the example dynamically adjust following the translation requirements." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.471, + 0.883, + 0.552 + ], + "angle": 0, + "content": "Experiment #3 randomly selects a code pair as an example, in which neither the source nor the target languages match the translation requirements. The specific translation prompts are shown in Table 19." + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.564, + 0.702, + 0.58 + ], + "angle": 0, + "content": "A.8 Chain of Thought" + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.585, + 0.884, + 0.651 + ], + "angle": 0, + "content": "Experiment #1 First, describe the function of the source code in the natural language, then translate it according to the source code and the corresponding natural language description." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.659, + 0.884, + 0.738 + ], + "angle": 0, + "content": "Experiment #2 First, let ChatGPT understand the function of the source code, followed by the translation, while ensuring that the function of the code remains unchanged during the translation process." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.749, + 0.883, + 0.83 + ], + "angle": 0, + "content": "Experiment #3 First, let ChatGPT understand the function of the source code, then predict the output result of the source code, and finally perform the translation, demanding that the translated code successfully executes." + }, + { + "type": "text", + "bbox": [ + 0.508, + 0.84, + 0.885, + 0.919 + ], + "angle": 0, + "content": "Experiment #4 Building upon Experiment #3 and the one-shot approach of Experiment #2, we introduce a CoT one-shot variation. That is, first, provide a case in the same direction for ChatGPT reference, then require it to understand the func" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5084" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.119, + 0.109, + 0.189, + 0.124 + ], + "angle": 0, + "content": "PyTorch" + }, + { + "type": "code", + "bbox": [ + 0.126, + 0.129, + 0.48, + 0.297 + ], + "angle": 0, + "content": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 self_embedding = nn.Embedding(vocab_size, embed_size) \n5 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout) \n6 self>dense = nn.Linear(num_hiddens, vocab_size) \n7 \n8 def init_state(self, enc_outputs, *args): \n9 return enc_outputs[1] \n10 \n11 def forward(self, X, state): \n12 X = self_embedding(X).permute(1, 0, 2) \n13 context = state[-1].repeat(X.shape[0], 1, 1) \n14 X_and_context = torch.cat((X, context), 2) \n15 output, state = self.rnn(X_and_context, state) \n16 output = self.dense(output).permute(1, 0, 2) \n17 return output, state" + }, + { + "type": "title", + "bbox": [ + 0.12, + 0.369, + 0.181, + 0.383 + ], + "angle": 0, + "content": "MXNet" + }, + { + "type": "code", + "bbox": [ + 0.126, + 0.389, + 0.481, + 0.573 + ], + "angle": 0, + "content": "1 class Seq2SeqDecoder(d21.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 selfembedding = nn.Embedding(vocab_size, embed_size) \n5 self.rnn = rnn.GRU(num_hiddens, num_layers, dropout=dropout) \n6 self.dense = nn.Dense(vocab_size, flatten=False) \n7 \n8 def init_state(self, enc_outputs, *args): \n9 return enc_outputs[1] \n10 \n11 def forward(self, x, state): \n12 X = self_embedding(X).swapaxes(0, 1) \n13 context = state[0][-1] \n14 context = nproadcast_to(context, (X.shape[0], context.shape[0], context.shape[1])) \n15 X_and_context = np concatenate((X, context), 2) \n16 output, state = self.rnn(X_and_context, state) \n17 output = self.dense(output).swapaxes(0, 1) \n18 return output, state" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.081, + 0.604, + 0.095 + ], + "angle": 0, + "content": "TensorFlow" + }, + { + "type": "code", + "bbox": [ + 0.514, + 0.1, + 0.877, + 0.326 + ], + "angle": 0, + "content": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super().__init__(**kwargs) \n4 self_embedding = tf keras.layers.Embedding(vocab_size, embed_size) \n5 self.rnn = tf keras.layers.RNN(tf keras.layers.StackedRNNCells() \n6 [tf keras.layers.GRUCell(num_hiddens, dropout=dropout) \n7 for _ in range(num_layers)], return_sequences=True, return_state=True) \n8 self.dense = tf keras.layers.Dense(vocab_size) \n9 \n10 def init_state(self, enc_outputs, *args): \n11 return enc_outputs[1] \n12 \n13 def call(self, X, state, **kwargs): \n14 X = self_embedding(X) \n15 context = tf.reduce(tfexpand_dims(state[-1], axis=1), repeats=X.shape[1], axis=1) \n16 X_and_context = tf.cat((X(context), axis=2)) \n17 rnn_output = self.rnn(X_and_context, state, ** kwargs) \n18 output = self>dense(rnn_output[0]) \n19 return output, rnn_output[1:]" + }, + { + "type": "title", + "bbox": [ + 0.509, + 0.332, + 0.567, + 0.345 + ], + "angle": 0, + "content": "Paddle" + }, + { + "type": "code", + "bbox": [ + 0.513, + 0.351, + 0.877, + 0.61 + ], + "angle": 0, + "content": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 self_embedding = nn.Embedding(vocab_size, embed_size) \n5 weight_attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n6 weight ih attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n7 weight hh attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n8 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout, time major=True, weight ih attr =weight ih attr, weight hh attr = weight hh attr) \n9 \n10 self.dense = nn.Linear(num_hiddens, vocab_size, weight_attr=weight_attr) \n11 \n12 def init_state(self, enc_outputs, *args): \n13 return enc_outputs[1] \n14 \n15 def forward(self, X, state): \n16 X = self_embedding(X).transpose([1, 0, 2]) \n17 context = state[-1].tile([X.shape[0], 1, 1]) \n18 X_and_context = paddle跖cat((X, context), 2) \n19 output, state = self.rnn(X_and_context, state) \n20 output = selfdense(output).transpose([1, 0, 2]) \n21 return output, state" + }, + { + "type": "image_caption", + "bbox": [ + 0.113, + 0.629, + 0.882, + 0.657 + ], + "angle": 0, + "content": "Figure 2: Implementing RNN Decoder for Seq2Seq Learning in PyTorch, TensorFlow, MXNet and Paddle. [Return to Section 3.2]" + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.683, + 0.489, + 0.746 + ], + "angle": 0, + "content": "tion of the source code, then predict the output of the source code, and finally translate it, with the condition that the translated code must successfully execute." + }, + { + "type": "text", + "bbox": [ + 0.114, + 0.748, + 0.487, + 0.777 + ], + "angle": 0, + "content": "The specific translation prompts are shown in Table 19." + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.52, + 0.941 + ], + "angle": 0, + "content": "5085" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.115, + 0.186, + 0.884, + 0.716 + ], + "angle": 0, + "content": "
MethodCC++C#GoVBPythonJavaPHP
CNaive-14.619.084.521.642.1711.232.09
OtO-11.13±0.284.77±0.858.18±0.402.02±0.231.85±0.146.50±2.911.71±0.32
OtM-12.33±0.587.56±0.989.58±0.742.22±0.892.82±0.588.92±0.673.42±0.09
MtO-7.99±1.945.35±0.416.94±0.833.77±0.442.09±0.258.65±0.521.93±0.49
MtM-9.61±0.327.15±1.417.54±0.332.30±0.712.11±0.438.29±0.453.30±0.92
C++Naive14.88-10.083.873.761.6911.391.92
OtO10.58±0.37-6.52±1.966.77±1.082.34±0.901.82±0.379.41±1.591.50±0.03
OtM13.32±2.46-9.87±1.159.83±1.372.62±1.152.93±0.1812.10±1.512.87±0.82
MtO10.54±2.33-6.98±1.467.29±0.733.57±0.742.28±0.187.82±1.261.96±0.20
MtM9.92±1.14-7.79±1.497.70±0.482.06±0.742.38±0.3010.20±1.204.12±0.81
C#Naive9.0510.03-5.057.201.8313.602.58
OtO5.41±1.256.45±1.68-7.10±0.639.42±5.501.73±0.4610.55±1.671.97±0.76
OtM7.42±1.828.99±0.17-9.81±0.686.13±2.922.80±0.4311.92±2.524.55±0.81
MtO6.37±0.696.13±1.60-7.53±0.949.92±1.002.47±0.6210.16±1.401.70±0.20
MtM6.19±0.887.22±0.93-9.36±0.924.60±2.872.23±0.3612.50±1.354.70±0.27
GoNaive4.523.755.04-2.463.006.562.14
OtO5.65±0.416.88±0.474.70±1.28-1.87±0.542.89±0.165.41±1.062.48±0.23
OtM6.06±0.996.56±0.897.28±0.82-2.12±0.653.32±0.368.79±1.063.48±0.20
MtO5.41±0.634.77±0.766.89±0.33-2.94±0.633.12±0.487.81±0.321.79±0.51
MtM5.18±1.236.06±0.287.12±0.72-1.82±0.932.83±0.508.99±1.282.55±0.40
VBNaive1.643.767.292.54-1.422.890.46
OtO3.96±0.205.25±0.6817.34±1.795.85±0.64-1.34±0.065.51±0.430.61±0.18
OtM5.15±0.156.10±0.3019.63±1.037.83±0.45-2.02±0.327.91±0.922.02±0.20
MtO4.25±0.864.15±1.0911.96±1.966.38±0.45-1.66±0.587.26±1.391.18±0.33
MtM5.18±0.655.09±0.1514.13±1.836.97±1.30-2.34±0.118.39±0.772.92±0.22
PythonNaive1.731.141.442.500.89-1.821.28
OtO4.35±0.443.66±0.955.38±0.765.67±0.342.53±1.11-4.70±0.073.24±0.60
OtM4.51±1.335.18±0.526.48±0.716.04±0.961.50±0.56-6.29±0.396.55±0.94
MtO4.70±0.283.44±0.765.48±0.554.80±0.632.42±0.18-5.32±0.662.74±0.39
MtM4.54±0.674.74±0.145.69±0.725.84±0.362.09±0.94-6.45±0.114.49±0.63
JavaNaive11.2311.1513.446.572.842.24-2.60
OtO7.15±1.599.09±1.0010.92±1.6111.05±0.522.66±0.132.54±0.35-2.05±0.95
OtM9.27±1.529.33±0.8613.52±0.9512.57±0.962.92±0.783.98±0.86-6.20±1.08
MtO6.69±0.836.32±1.6610.57±1.168.79±0.443.91±0.572.86±0.36-2.48±0.34
MtM6.56±0.337.60±0.469.40±1.088.30±0.872.20±0.852.53±0.15-3.57±0.94
PHPNaive1.791.512.362.000.371.302.30-
OtO4.18±1.442.91±0.436.45±0.435.85±0.540.42±0.091.98±0.266.47±0.59-
OtM3.78±1.801.93±1.355.51±0.605.13±0.600.56±0.362.70±0.805.51±1.91-
MtO4.97±1.093.69±0.466.08±3.036.44±0.782.28±0.123.55±0.188.66±0.84-
MtM6.03±0.615.15±0.6710.64±1.276.69±0.311.69±0.572.46±0.467.87±1.90-
" + }, + { + "type": "table_caption", + "bbox": [ + 0.117, + 0.725, + 0.882, + 0.81 + ], + "angle": 0, + "content": "Table 14: BLEU scores from different multilingual modeling strategies by fine-tuning the pre-trained CodeT5+_220M model (220M is the model size) (Wang et al., 2023b). Naive denotes Naive Copy, which directly duplicates the source code as the target code without making any modifications. Method OtO, OtM, MtO, and MtM denote One-to-One, One-to-Many, Many-to-One, and Many-to-Many, respectively. The rows correspond to the source language while the columns correspond to the target language. We run each experiment with three different random seeds and report the mean and standard deviation of BLEU scores. [Return to Section 4.1.]" + }, + { + "type": "page_number", + "bbox": [ + 0.483, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5086" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.226, + 0.094, + 0.773, + 0.691 + ], + "angle": 0, + "content": "
MethodTranslation Prompt
Role Assignment #1"role": "system", "content": "Your are a code translation system.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #2"role": "system", "content": "You are a code translation system that specializes in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #3"role": "system", "content": "You are a programmer proficient in multiple programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #4"role": "system", "content": "You are a programmer proficient in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Polite Inquiry #1Please translate the following [SL] code into [TL] code:[SC]
Polite Inquiry #2Can you rewrite this [SL] code in [TL]? [SC]
Clarify UsageTranslating [SL] to [TL] ensures that Python code can be executed. [SC]
Divide & ConquerTranslate [SL] to [TL]: [SC]
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.7, + 0.884, + 0.731 + ], + "angle": 0, + "content": "Table 15: Translation prompts for prompt variants and contextual strategies on ChatGPT. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language. [Return to Section 4.3]" + }, + { + "type": "table", + "bbox": [ + 0.116, + 0.76, + 0.885, + 0.865 + ], + "angle": 0, + "content": "
StrategyTemp.EMBLEUCodeBLEUDSR@0StrategyTop-KEMBLEUCodeBLEUDSR@0
Top-K=000.5710.8324.4548.57%Temp.=000.5710.8324.4548.57%
0.20.5710.8224.4347.71%0.20.5710.8124.4548.29%
0.40.5710.8024.3748.00%0.40.5710.8124.4448.29%
0.60.5710.7824.4548.00%0.60.5710.8224.4248.29%
0.80.5710.8224.4947.71%0.80.5710.8024.3847.71%
1.00.5710.8124.4148.00%1.00.5710.8124.3848.00%
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.874, + 0.884, + 0.903 + ], + "angle": 0, + "content": "Table 16: Code translation performance of ChatGPT under different parameter settings. Temp. refers to temperature. [Return to Section 4.3]" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.52, + 0.941 + ], + "angle": 0, + "content": "5087" + } + ], + [ + { + "type": "title", + "bbox": [ + 0.143, + 0.152, + 0.258, + 0.168 + ], + "angle": 0, + "content": "Self-debug@0" + }, + { + "type": "text", + "bbox": [ + 0.333, + 0.186, + 0.816, + 0.203 + ], + "angle": 0, + "content": "Translate [source_language] to [target_language]: [source_code]." + }, + { + "type": "text", + "bbox": [ + 0.83, + 0.183, + 0.857, + 0.2 + ], + "angle": 0, + "content": "CTO" + }, + { + "type": "image", + "bbox": [ + 0.139, + 0.208, + 0.171, + 0.23 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.176, + 0.213, + 0.512, + 0.229 + ], + "angle": 0, + "content": "Here is the [target_language] code equivalent" + }, + { + "type": "text", + "bbox": [ + 0.176, + 0.23, + 0.588, + 0.246 + ], + "angle": 0, + "content": "of the given [source_language] code: [translated_code]." + }, + { + "type": "title", + "bbox": [ + 0.143, + 0.254, + 0.258, + 0.27 + ], + "angle": 0, + "content": "Self-debug@n" + }, + { + "type": "text", + "bbox": [ + 0.384, + 0.278, + 0.822, + 0.308 + ], + "angle": 0, + "content": "The above python code executes with the following errors, please correct them. [Compiler reports errors]" + }, + { + "type": "text", + "bbox": [ + 0.83, + 0.273, + 0.857, + 0.292 + ], + "angle": 0, + "content": "CTO" + }, + { + "type": "image", + "bbox": [ + 0.139, + 0.31, + 0.171, + 0.333 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.176, + 0.316, + 0.643, + 0.333 + ], + "angle": 0, + "content": "Here is the modified [target_language] code: [translated_code]." + }, + { + "type": "table_caption", + "bbox": [ + 0.114, + 0.347, + 0.882, + 0.377 + ], + "angle": 0, + "content": "Table 17: A simple demo: Translation prompting of ChatGPT in the multi-round debugging strategy. The content in red is returned by the compiler. [Return to section 4.3.]" + }, + { + "type": "title", + "bbox": [ + 0.143, + 0.519, + 0.312, + 0.535 + ], + "angle": 0, + "content": "Zero-shot prompting" + }, + { + "type": "text", + "bbox": [ + 0.391, + 0.553, + 0.816, + 0.57 + ], + "angle": 0, + "content": "Does the following Python code execute? [python_code]." + }, + { + "type": "text", + "bbox": [ + 0.83, + 0.548, + 0.857, + 0.566 + ], + "angle": 0, + "content": "CTO" + }, + { + "type": "image", + "bbox": [ + 0.14, + 0.574, + 0.171, + 0.596 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.176, + 0.58, + 0.512, + 0.595 + ], + "angle": 0, + "content": "Yes, the Python code executes without errors." + }, + { + "type": "text", + "bbox": [ + 0.368, + 0.617, + 0.816, + 0.634 + ], + "angle": 0, + "content": "Please predict the executed output of the Python code above." + }, + { + "type": "text", + "bbox": [ + 0.83, + 0.613, + 0.857, + 0.632 + ], + "angle": 0, + "content": "CTO" + }, + { + "type": "image", + "bbox": [ + 0.139, + 0.639, + 0.171, + 0.661 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.176, + 0.644, + 0.676, + 0.66 + ], + "angle": 0, + "content": "The predicted execution result of the Python code above is [output]." + }, + { + "type": "title", + "bbox": [ + 0.143, + 0.668, + 0.307, + 0.684 + ], + "angle": 0, + "content": "Few-shot prompting" + }, + { + "type": "text", + "bbox": [ + 0.163, + 0.702, + 0.822, + 0.731 + ], + "angle": 0, + "content": "This is a executable Python code [python_code], and this is a Python code [python_code] that cannot be executed. Does the following Python code execute? [python_code]." + }, + { + "type": "text", + "bbox": [ + 0.83, + 0.698, + 0.857, + 0.716 + ], + "angle": 0, + "content": "CTO" + }, + { + "type": "image", + "bbox": [ + 0.14, + 0.735, + 0.171, + 0.757 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.176, + 0.741, + 0.512, + 0.756 + ], + "angle": 0, + "content": "Yes, the Python code executes without errors." + }, + { + "type": "text", + "bbox": [ + 0.368, + 0.779, + 0.816, + 0.795 + ], + "angle": 0, + "content": "Please predict the executed output of the Python code above." + }, + { + "type": "text", + "bbox": [ + 0.83, + 0.774, + 0.857, + 0.794 + ], + "angle": 0, + "content": "CTO" + }, + { + "type": "image", + "bbox": [ + 0.139, + 0.8, + 0.171, + 0.822 + ], + "angle": 0, + "content": null + }, + { + "type": "text", + "bbox": [ + 0.176, + 0.806, + 0.676, + 0.822 + ], + "angle": 0, + "content": "The predicted execution result of the Python code above is [output]." + }, + { + "type": "table_caption", + "bbox": [ + 0.174, + 0.837, + 0.821, + 0.852 + ], + "angle": 0, + "content": "Table 18: Two simple demos: prompting in fuzzy execution experiments. [Return to Section 6.]" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.521, + 0.941 + ], + "angle": 0, + "content": "5088" + } + ], + [ + { + "type": "table", + "bbox": [ + 0.241, + 0.106, + 0.756, + 0.81 + ], + "angle": 0, + "content": "
MethodTranslation Prompt
One-ShotHere is an example of a translation from [ESL] to [ETL].[ESL]: [ESC], [ETL]: [ETC]. Please imitate this example to translate following code from [SL] to [TL]:[TC].
One-Shot #1where [ESL]≠[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]=[TL] where [ESL]≠[SL] and [ETL]≠[TL]
One-Shot #2where [ESL]=[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]≠[TL]
One-Shot #3where [ESL]≠[SL] and [ETL]≠[TL]
CoT #11.Please explain the function of the following [SL] code, which is limited to 200 words.[SC] 2.Please translate into [TL] code according to the following [SL] code and its functional description.[SL]:[SC].Function description:[DSC]
CoT #2First, understand the function of the following [SL] code. Then, translate the [SL] code into [TL] code while keeping the function unchanged.[SC]
CoT #3First, understand the functionality of the following [SL] code and predict the execution output. Then, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.[SL]
CoT #4First, learn how to translate [ESL] code to [ETL] based on the example, [SL]:[ESC],[TL]:[ETC]. Then, understand the functionality of the following [SL] code and predict the execution output, [SL]:[SC]. Finally, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.
" + }, + { + "type": "table_caption", + "bbox": [ + 0.113, + 0.819, + 0.885, + 0.892 + ], + "angle": 0, + "content": "Table 19: ChatGPT translation prompts on one-shot & CoT strategies. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language,[ESL] refers to the source language in the example, [ESC] refers to the source code in the example, [ETL] refers to the target language in the example, [ETC] refers to the target code in the example, [DSC] refers to the natural language description of the source code. [Return to Section 4.3]" + }, + { + "type": "page_number", + "bbox": [ + 0.481, + 0.929, + 0.522, + 0.941 + ], + "angle": 0, + "content": "5089" + } + ] +] \ No newline at end of file diff --git a/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_origin.pdf b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7954cbcce60dcc63c0c6a905a301686ae83c46eb --- /dev/null +++ b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/4840c497-c98d-4886-85a5-c02f7eda3689_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17f9b93bddd97db45f08f3729160240662cd8c16e6830b4741ac625254e6025d +size 453792 diff --git a/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/full.md b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..51eee1d548b8b87767165969a1fd29a26178d96e --- /dev/null +++ b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/full.md @@ -0,0 +1,641 @@ +# CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translation + +Weixiang Yan $^{1*}$ + +Yuchen Tian\* + +Yunzhe Li3 + +Qian Chen + +Wen Wang + +1University of California, Santa Barbara 2The University of Hong Kong 3University of Illinois at Urbana-Champaign 4Speech Lab, Alibaba Group weixiangyan@ucsb.edu yuchent@connect.hku.hk yunzhel2@illinois.edu {tanqing.cq,w.wang}@alibaba-inc.com + +# Abstract + +Recent code translation techniques exploit neural machine translation models to translate source code from one programming language to another to satisfy production compatibility or to improve efficiency of codebase maintenance. Most existing code translation datasets only focus on a single pair of popular programming languages. To advance research on code translation and meet diverse requirements of real-world applications, we construct CodeTransOcean, a large-scale comprehensive benchmark that supports the largest variety of programming languages for code translation. CodeTransOcean consists of three novel multilingual datasets, namely, MultilingualTrans supporting translations between multiple popular programming languages, NicheTrans for translating between niche programming languages and popular ones, and LLMTrans for evaluating executability of translated code by large language models (LLMs). CodeTransOcean also includes a novel cross-framework dataset, DLTrans, for translating deep learning code across different frameworks. We develop multilingual modeling approaches for code translation and demonstrate their great potential in improving the translation quality of both low-resource and high-resource language pairs and boosting the training efficiency. We also propose a novel evaluation metric Debugging Success Rate@K for program-level code translation. Last but not least, we evaluate LLM ChatGPT on our datasets and investigate its potential for fuzzy execution predictions. We build baselines for CodeTransOcean and analyze challenges of code translation for guiding future research. The CodeTransOcean datasets and code are publicly available at https://github.com/WeixiangYAN/CodeTransOcean. + +# 1 Introduction + +Early software systems are developed using programming languages such as Fortran and COBOL, which have a significantly smaller user base compared to modern mainstream programming languages (e.g., Python and Java). Hence maintaining and modernizing early software systems are expensive (Opidi, 2020). Moreover, the readability and compatibility of the mixed multitude of programming languages are challenging when migrating existing software systems to new technology ecosystems or integrating software systems using different programming languages. The code translation task aims to convert source code from one programming language to another and is of great value in industry. + +Code translation methods evolve from the inefficient, costly, and error-prone manual rewriting method to automatic methods. Automatic code translation methods can be categorized into compilers and transpilers, rule-based methods, and neural network based methods. Neural models (Feng et al., 2020; Wang et al., 2021, 2023b) have become dominant in code translation. Details of code translation methods are presented in Appendix A.1. The performance of neural models relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are limited by insufficient coverage of programming languages and mostly focusing on a single pair of popular programming languages, limited scale, and uneven data distribution. The widely used CodeTrans (Lu et al., 2021) is a small dataset containing only JavaC# parallel data for quite short code samples. Other datasets (Ahmad et al., 2023; Rozière et al., 2020; Zhu et al., 2022b; Nguyen et al., 2013; Chen et al., 2018) suffer from the same limitations. Consequently, existing code translation models (Feng et al., 2020; Wang et al., 2021; Ahmad et al., 2021) are confined to a narrow range of one-to-one code + +
CategoryLanguage/FrameworkDataset NameTrain/Dev/Test #SamplesAvg. #Tokens/SampleAvg. Length
MultilingualPython, C, C++, Visual Basic, Go, PHP, Java, C#MultilingualTrans19,115 / 3,759 / 7,545398 / 421 / 4911099 / 1135 / 1358
Swift, R, Rust, Fortran, Ada, Perl, COBOL, Lua, ...NicheTrans165,457 / 23,509 / 47,502292 / 375 / 505785 / 995 / 1372
Python, C, C++, Visual Basic, Go, PHP, Java, C#LLMTrans-/-/350-/-/270-/-/745
Cross-FrameworkPyTorch, TensorFlow, MXNet, PaddleDLTrans282 / 36 / 90625 / 1102 / 8751318 / 2441 / 1841
+ +Table 1: Summary of our CodeTransOcean. We report #Samples, Avg. #Tokens Sample and Avg. Length for Train/Dev/Test sets of each dataset. Note that LLMTrans is only for testing. #Samples are on the program-level. #Tokens are based on RoBERTa tokenizer (Liu et al., 2019). Length is the number of characters. + +translation scenarios. Moreover, deep learning has been broadly used and achieved unprecedented success. However, there are barriers between different deep learning frameworks during the actual production process. Existing code translation datasets also neglect important demands from real-world applications, including modernizing early software systems developed in niche programming languages and migrating code across different deep learning frameworks. + +To address these limitations and advance neural code translation models, we construct a large-scale comprehensive multilingual code translation benchmark CodeTransOcean, summarized in Table 1. CodeTransOcean is an innovative benchmark that aims to provide a unified platform for evaluating various models on a comprehensive set of code translation tasks that reflect real-world demands. Based on this goal, each dataset in CodeTransOcean is specifically designed to tackle a key challenge in the field of code translation. CodeTransOcean includes three multilingual datasets, namely, the MultilingualTrans dataset (including eight popular programming languages), the NicheTrans dataset (translating between thirty-seven niche programming languages and the eight popular ones $^{1}$ ), and a specialized dataset LLMTrans (including 350 data samples and their executed results) to evaluate executability of code translated by large language models (LLMs), and a cross-framework dataset DLTrans facilitating our proposed task for translating code between deep learning frameworks to enhance code reusability. + +DLTrans includes 408 samples covering four mainstream deep learning frameworks. + +Multilingual modeling shows great potential in neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023), but it has not been systematically explored for code translation. We investigate multilingual modeling for code translation using our MultilingualTrans, NicheTrans, and DLTrans datasets. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves the model training efficiency. + +Recent research indicates that the proficiency of the LLM ChatGPT in natural language translation is on par with commercial-grade translation systems (Jiao et al., 2023). To the best of our knowledge, our work is the first to systematically investigate the potential of ChatGPT in code translation. We develop a fully automated translation-execution-evaluation pipeline AutoTransExecutor to support this study. Note that match-based metrics and execution-based metrics have been used for evaluating code translation methods, with details in Appendix A.1. In order to accurately evaluate the usability of translated code from ChatGPT, we propose a novel execution-based evaluation metric Debugging Success Rate @K (DSR@K), which is the percentage of samples with translation results that successfully execute and produce the expected functionality after $K$ debugging rounds. On our LLMTrans dataset, the baseline ChatGPT setting achieves $48.57\%$ DSR@0. We find that self-debugging and one-shot improve the performance while chain-of-thought strategies degrade the translation accuracy. Since our AutoTransEx + +ecuter still cannot cover arbitrary programming languages, we also propose a novel metric fuzzy execution, attempting to address the limitations of existing evaluation metrics for code translation. Our preliminary study using ChatGPT shows that ChatGPT is still inadequate to predict fuzzy execution for any arbitrary programming language, which demands future research. + +Our contributions can be summarized as follows: + +- A large-scale multilingual code translation benchmark: CodeTransOcean covers the largest number of popular and niche programming languages so far with the largest scale. It also includes an unprecedented dataset for translating code across different deep learning frameworks and a dataset and an automated pipeline for evaluating LLMs on code translation. We establish baselines for all datasets in CodeTransOcean. +- Multilingual modeling for code translation: We are the first to systematically evaluate multilingual modeling on code translation for both high-resource and low-resource language pairs. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves training efficiency. +- ChatGPT on code translation: We conduct the first comprehensive study of the potential of ChatGPT on code translation, investigating efficacy of prompting strategies, hyperparameters, self-debugging, One-shot, and Chain-of-Thought. +- New evaluation metrics: We propose $DSR@K$ to evaluate translation and debugging capabilities of LLMs. We also propose a fuzzy execution metric based on LLMs and conduct a preliminary study using ChatGPT on this metric. + +# 2 Related Work + +Code Translation Datasets The success of neural models for code translation relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are plagued by issues such as insufficient coverage of programming languages, limited scale, and imbalanced data distribution. The widely used code translation dataset CodeTrans (Lu et al., 2021) in the CodeXGLUE benchmark consists of Java-C# function pairs. The small parallel corpus AVATAR (Ahmad et al., 2023) is constructed for Java-Python code translation. Nguyen et al. (2013) construct a Java-C# dataset to explore statistical machine + +translation on code translation tasks $^2$ . Chen et al. (2018) explore this dataset from Nguyen et al. and also construct a CoffeeScript-JavaScript parallel dataset for investigating tree-to-tree neural models for code translation. Rozière et al. (2020) create a dataset containing 852 programs to evaluate unsupervised methods. Recently, Zhu et al. (2022b) construct a new translation dataset CoST from the GeeksForGeeks website $^3$ . Subsequently, they release the translation dataset XLCoST (Zhu et al., 2022a), which expands the CoST dataset by 7.3 times. However, the limited language coverage of these datasets and their imbalanced data distribution hinder their practical applications. Rozière et al. (2022) construct the TransCoder-ST dataset to perform unsupervised code translation using automated unit tests. Details of these datasets are summarized in Table 2. Rithy et al. (2022) proposes a code translation dataset XTest containing nine programming languages with unit tests, but it is not open-sourced $^4$ . Although CodeNet (Puri et al., 2021) comprises many problem statements and provides corresponding solutions, experts have proven that about half of the CodeNet dataset has incorrect solutions (Zhu et al., 2022b), making it unsuitable for code translation tasks. With the limitations of existing code translation datasets, neural models trained on them may encounter overfitting, underfitting, and poor generalizability. Clearly, these issues impede the development of neural models for code translation. Therefore, constructing datasets that effectively address these problems is critical to enhance performance of code translation algorithms. + +Code Translation Methods and Evaluation Metrics Details of code translation methods and evaluation metrics are presented in Appendix A.1. + +# 3 The CodeTransOcean Benchmark + +In this section, we provide detailed descriptions and analyses of our CodeTransOcean benchmark, including the code translation tasks, their associated datasets, and dataset statistics. Details of data collection methods and licensing information as well as quality control and quality assessment are presented in Appendix A.2. Note that the vast + +
Dataset SourceProgramming Languages#SamplesAvg. #Tokens/SampleAvg. Length
CodeTrans (Lu et al., 2021)Java, C#11,80059 / 63 / 58205 / 218 / 202
Avatar (Ahmad et al., 2023)Java, Python9,517239 / 235 / 234691 / 687 / 688
Nguyen et al.(Nguyen et al., 2013)Java, C#16,966--
Lachaux et al.(Rozière et al., 2020)C++, Java, Python852- / 119 / 120- / 313 / 311
CoST (Zhu et al., 2022b)C++, Java, Python, C#, Javascript, PHP, C16,738272 / 180 / 199770 / 458 / 511
TransCoder-ST (Rozière et al., 2022)Java, C++, Python437,030--
XLCoST (Zhu et al., 2022a)C++, Java, Python, C#, Javascript, PHP, C122,151234 / 232 / 222644 / 634 / 606
+ +Table 2: Summary of existing code translation datasets. For #Samples, we report program-level counts for Avatar, CoST, and XLCoST. Given that the original samples from other datasets are not organized at the program-level, we report counts at the snippet-level for these datasets. Avg. #Tokens/Sample and Avg. Length are counted in the same way as Table 1. + +majority of the samples in CodeTransOcean provides explicit input and output, which is equivalent to unit tests. Overall, CodeTransOcean consists of 270,507 samples (over 200K unit tests), covering 45 programming languages for multilingual code translation and 4 deep learning frameworks for cross-framework code translation5. Note that all samples in all CodeTransOcean datasets are constructed at the program-level. We ensure a balanced distribution of each language/framework when constructing the datasets (Appendix A.2). There is no overlap between CodeTransOcean datasets and existing code translation datasets. + +# 3.1 Multilingual Code Translation + +With the increasing need to unify the language variety when implementing system integration or extensions with multilingual programming environments, we construct the MultilingualTrans dataset for multiple popular programming languages6. Among programming languages in the rankings, we select the Top-10 languages as popular ones except JavaScript and SQL7 and construct the MultilingualTrans dataset based on the 8 pro + +gramming languages. We treat the other languages in the rankings as niche languages and construct the NicheTrans dataset for translating between niche languages and popular languages. Additionally, in order to quantitatively evaluate the execution capabilities of the code generated by LLMs (e.g., ChatGPT, PaLM2 (Anil et al., 2023)), we construct LLMTrans, which includes the execution results for a subset of MultilingualTrans and facilitates evaluating LLMs for multilingual code translation. + +MultilingualTrans Dataset This dataset contains 30,419 program samples covering eight popular programming languages, namely, C, C++, C#, Java, Python, Go, PHP, and Visual Basic. Table 11 shows the statistics of each language pair. Note that XLCoST (Zhu et al., 2022a) is the only existing multilingual code translation dataset. Compared to XLCoST, MultilingualTrans is advantageous in more balanced data distribution across various programming languages, practicality of language pairs, and data quality. For example, the real-world requirement for translating Java into JavaScript as in XLCoST is quite limited. As to data quality, our MultilingualTrans originates from a programming chrestomathy website, with all data already reviewed and verified by the website. + +NicheTrans Dataset The NicheTrans dataset contains 236,468 program samples, covering code translation pairs from thirty-seven niche programming languages, including Ada, COBOL, Pascal, Perl, Erlang, Fortran, Scala, Julia and others, to the eight popular ones. Table 12 shows statistics of each niche language. Although many studies have highlighted the practical necessity of code translation for modernizing niche programming languages (Chen et al., 2018; Zhu et al., 2022b; Rozière et al., + +2020), our NicheTrans dataset is the first dataset for code translation between these niche languages and popular ones. We believe this dataset will not only facilitate modernization of outdated programming languages more effectively, but also augment and evaluate generalizability of neural models. + +LLMTrans Dataset The LLMTrans dataset aims to provide a benchmark for evaluating the performance of LLMs on code translation. The dataset translates seven popular programming languages to Python, totaling 350 program samples. We compile and test these samples and record the execution results. Based on this dataset, we design and implement an automated pipeline, AutoTransExecutor $^{8}$ , automatically using LLMs to conduct code translation, execution, debugging, and calculating the success rate. This dataset and the automated pipeline ease investigation of the actual debugging success rate of LLMs on code translation and effectively measure the practical usability of LLMs. Details of the LLMTrans dataset are in Table 1. + +# 3.2 Cross-framework Code Translation + +Cross-Deep-Learning-Framework Translation Task The widespread applications of deep learning (DL) has spawned emergence of various DL frameworks, such as PyTorch, TensorFlow, MXNet, and Paddle. However, there are significant differences in syntax and dependency libraries between different frameworks, severely impeding reusability of projects9. Moreover, studies illustrate significant disparities in energy consumption and economic costs during training and inference between various frameworks (Georgiou et al., 2022). Selecting an appropriate DL framework for green AI has become paramount in an era of large models (Ananthaswamy, 2023). Code reusability and energy-economic efficiency in DL have emerged as critical considerations for both research and practical engineering implementation. Converting code between different DL frameworks is challenging, mainly due to differences between frameworks, code complexity, structural inconsistencies, and cross-platform compatibility (more details are in Appendix A.3). Existing cross-DL-framework adaptive technologies such as the ONNX10 model conversion protocol require both parties to import + +and export based on agreed data formats or to convert only the final model through the computation graphs. These technologies have obvious limitations. In contrast, we propose a Cross-DL-framework Translation task for code migration between different DL frameworks through code translation (Appendix A.4). Compared to existing cross-framework adaptive technologies, Cross-DL-framework Translation achieves re-implementation under multiple DL frameworks through an automated process, which not only generates highly readable code and enables secondary development, but also provides developers with flexibility on combining advantages of multiple frameworks. + +DLTrans Dataset We construct the DLTrans dataset for Cross-DL-framework Translation, including four deep learning frameworks and spanning twelve directions. To the best of our knowledge, our work is the first to define the cross-DL-framework translation task and construct a corresponding dataset. We create two subsets of different granularities based on the collected code, namely, coarse-grained at the program level and fine-grained at the function or class level. Each code pair comprises code that shares the same functionality but is written in different popular DL frameworks, including PyTorch, TensorFlow, MXNet, and Paddle. The coarse-grained and fine-grained datasets have 408 and 3,270 samples, respectively. In this work, we only experiment on the coarse-grained subset. + +# 4 Experiments + +We present experiments of multilingual training for code translation (Section 4.1). We then introduce a novel evaluation metric Debugging Success Rate@K for program-level code translation (Section 4.2) and the first comprehensive exploration of ChatGPT for code translation (Section 4.3). + +# 4.1 Multilingual Modeling + +Multilingual modeling has been pivotal in broadening the applicability of neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023; Johnson et al., 2017). This is primarily evidenced in enhancing the performance of low-resource languages and cross-language transfer learning (Mohammadshahi et al., 2022; Zoph et al., 2016; Nguyen and Chiang, 2017; Johnson et al., 2017). CodeTransOcean covers nearly fifty + +
AverageOne-to-One (baseline)Many-to-OneMany-to-ManyOne-to-Many
High-resource4.685.56 (↑ 0.88)5.94 (↑ 1.26)6.18 (↑ 1.50)
Low-resource4.834.85 (↑ 0.02)4.95 (↑ 0.12)5.84 (↑ 1.01)
All5.195.31 (↑ 0.12)5.81 (↑ 0.62)6.42 (↑ 1.23)
+ +Table 3: Average BLEU scores of the four multilingual modeling strategies, One-to-One, Many-to-One, Many-to-Many, and One-to-Many, for All language pairs, High-resource language pairs, and Low-resource language pairs. + +programming languages and deep learning frameworks. We use its datasets to explore multilingual modeling on code translation tasks. + +Experimental Setups In this work, we use pretrained CodeT5+ (Wang et al., 2023b) $^{11}$ as the backbone based on its superior performance on code understanding and generation evaluations reported in (Wang et al., 2023b). We use the MultilingualTrans dataset to investigate four multilingual modeling strategies based on data sharing in the source or target language or both, namely, One-to-One, One-to-Many, Many-to-One, and Many-to-Many, with One-to-One as the baseline. Details of the four strategies are in Appendix A.5. To understand the strengths and weaknesses of the four strategies, we compare their average performance on all language pairs and focus on low-resource and high-resource pairs. Since the CodeBLEU metric (Ren et al., 2020) does not cover all eight languages in MultilingualTrans, we use BLEU to measure translation accuracy for the four strategies. Then, we establish baselines for the DLTrans and NicheTrans datasets. + +We rank the resource richness of the eight programming languages in MultilingualTrans in descending order based on their amounts in the CodeT5+ pre-training data, as Java, PHP, C, C#, Python, C++, and Go (Visual Basic is not covered by the CodeT5+ pre-training data). Based on this ranking, we consider Visual Basic, C++, and Go as low-resource languages and Java, PHP and C as high-resource languages. + +Results and Analysis Detailed experimental results are shown in Table 14 in Appendix. For All language pairs, the performance of the four strategies is ranked as One-to-Many $>$ Many-to-Many $>$ Many-to-One $>$ One-to-One. (1) Under One-to-Many strategy, the model encoder can provide more comprehensive information for source language translation due to its ability to absorb more source + +language features, thereby improving generalizability of the model. (2) Many-to-Many can be considered as expanding the One-to-Many strategy by employing a greater volume of non-source language data for training. Since the encoder must be attuned to the features of various languages simultaneously under Many-to-Many, parameter sharing may potentially undermine the performance. (3) Many-to-One helps the model to learn from a broader range of data than the baseline. Specific patterns or expressions in diverse source languages assist the model in more precisely comprehending how to translate into the target language. The shared semantic representations across different source languages allow the model to implement effective transfer learning strategies. Furthermore, increase in training samples enables the model to optimize the loss function more stably. These results are consistent with previous findings on multilingual modeling for natural language translation (Aharoni et al., 2019): Many-to-Many models, trained across multiple target languages instead of just one target language, can function effectively as a regularization strategy for Many-to-One, thereby reducing the possibility of over-matching. + +For High-resource and Low-resource languages, as shown in Table 3, the ranking of the four strategies is the same as for All, but there is notable difference in their adaptability across languages of varying resource scales. High-resource languages can take advantage more effectively from the shared information across multiple source languages; whereas, low-resource languages are relatively less equipped to handle the additional uncertainty and noise introduced by shared parameters, and thus often have to rely on a larger volume of source language data to optimize their benefits. + +Results from the Many-to-Many strategy on DL-Trans and NicheTrans datasets are shown in Tables 4 and 5. The experimental results suggest that significant improvements in translation accuracy can be achieved by swapping the source and target languages in the training set to facilitate data augmentation and training a bidirectional model. + +
MethodMetricPyTorchTensorFlowMXNetPaddle
EMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEU
NaivePyTorch---27.2766.2569.4628.1872.7776.6330.9180.3583.13
TensorFlow27.2766.3268.92---29.0963.7967.9427.2763.0465.81
MXNet28.1872.8674.1529.0963.8466.06---28.1869.4971.09
Paddle30.9180.2584.8327.2762.9467.7828.1869.4375.09---
CodeT5+PyTorch---35.45±0.9171.16±0.7370.54±0.7542.73±2.4181.76±0.4582.52±0.5643.64±1.5885.76±0.6085.07±0.74
TensorFlow34.85±1.3871.97±0.5671.08±0.72---36.67±1.8972.77±0.6173.04±0.1829.70±2.6369.38±0.3868.76±0.32
MXNet32.12±2.2977.79±0.1376.43±0.1431.82±1.5867.22±0.3967.68±0.27---29.09±0.9174.26±0.4673.27±0.42
Paddle43.03±4.1086.25±0.8686.09±0.8829.39±2.9369.43±0.5769.57±0.5135.75±0.5378.65±0.6279.46±0.38---
+ +Table 4: Results on DLTrans of Naive and CodeT5+_220M with Many-to-Many strategy. We run each experiment with 3 random seeds and report the mean and standard deviation of EM, BLEU, and CodeBLEU scores. + +
BLEUNaiveTwo-wayOne-way
Many-to-C2.364.604.86
Many-to-C#2.534.483.82
Many-to-C++1.994.783.32
Many-to-Go3.115.243.19
Many-to-Java3.185.235.34
Many-to-PHP4.372.461.98
Many-to-Python2.872.381.67
Many-to-VB1.692.171.97
Average2.763.923.27
+ +Table 5: BLEU scores on NicheTrans of Naive and CodeT5+_220M with Many-to-Many strategy. One-way denotes training models only from niche to popular, while Two-way denotes training in both directions. + +Notably, prior studies on multilingual neural machine translation often overlook the comparison between One-to-Many and other strategies. Nevertheless, One-to-Many demonstrates superiority over the One-to-One baseline across all our experiments. Overall, our results strongly recommend a targeted multilingual modeling strategy for code translation, as it not only can translate multiple language pairs with a single model, but also achieves better and more stable accuracy than baselines. + +# 4.2 Debugging Success Rate@K + +For evaluations, we adopt existing code translation evaluation metrics in our experiments, including Exact Match (EM), BLEU, and CodeBLEU (details are in Appendix A.1.2). However, all these metrics are based on surface-form matching (or with some adaptations as for CodeBLEU) and are not suitable for our program-level translation tasks since they cannot reliably evaluate functional correctness of translated code. Moreover, in real-world software development scenarios, developers typically ensure the functionality of code by testing and debugging upon completion, rather than writing and testing multiple versions of the code to achieve the expected functionality as measured by the existing pass@k (Kulal et al., 2019) metric. + +Meanwhile, recent research shows that LLMs such as ChatGPT demonstrate preliminary code debugging capabilities (Chen et al., 2023b,a). Hence, we propose a novel and robust evaluation metric for LLM on code translation, Debugging Success Rate@K (DSR@K), by measuring whether the translated code can be compiled and executed with the same behavior as the input source code, with K rounds of debugging. To the best of our knowledge, $DSR@K$ is the first metric designed to accurately reflect real-world software development scenarios. + +$DSR@K$ is the percentage of the samples that successfully execute and produce the expected results among all samples. Each sample is given $K$ generation and debugging attempts by an LLM. If the generated code successfully executes and produces the expected results with these $K$ rounds, the sample is marked as successful. $DSR@K$ is computed as $\frac{1}{N}\sum_{i=1}^{N}S(i,K)$ , where $N$ denotes the total number of samples. If the $i^{th}$ code sample succeeds within $K$ attempts, then $S(i,K) = 1$ ; otherwise, $S(i,K) = 0$ . Note that DSR@0 can be used for program-level code translation evaluation for any models. In this work, we employ DSR@K to evaluate the ability of LLMs such as ChatGPT for debugging code and translating code with debugging results. + +# 4.3 ChatGPT for Code Translation + +The recent LLM ChatGPT demonstrates competitive performance on language generation tasks such as summarization and machine translation (Yang et al., 2023; Peng et al., 2023; Gao et al., 2023). However, ChatGPT for code translation has not been systematically explored. We study the effectiveness and potential of ChatGPT on code translation and investigate strategies to improve its performance. We use DSR@K as the principal evaluation metric since we focus on the practical usability of ChatGPT. We use the ChatGPT API and gpt-3.5-turbo as the default model and evaluate on the + +LLMTrans dataset for all experiments. We investigate the efficacy of prompts and hyperparameters and context in zero-shot setting, then compare one-shot versus zero-shot and study Chain-of-Thought. + +Effect of Prompts and Hyperparameters Prior works show that prompts can influence the performance of ChatGPT (Zhong et al., 2023; Peng et al., 2023; Jiao et al., 2023). We set an initial prompt "Translate [SL] to [TL]: [SC]." as the baseline, where [SL] and [TL] denote the source language and the target language respectively and [SC] denotes the source code. We also add "Do not return anything other than the translated code." for each prompting strategy to require ChatGPT to return only code in order to ease code execution. We design three prompt variants. Details of the experimental settings and prompt variants are in Appendix A.6. We also investigate the effect of hyperparameters on code translation performance. + +As shown in Table 6, implementing role assignments, clarifying usage, and polite inquiry in prompts all degrade the performance compared to the baseline prompt. These results show that the baseline with the most straightforward prompt produces the best performance, possibly because it provides clear, short, and unambiguous instructions for the task to the model. More intricate prompting strategies may introduce noise and confuse ChatGPT. The performance of polite inquiry prompt is comparable to but still worse than the baseline performance. We speculate that the improvement from polite inquiries in prior studies (Akin, 2023) may stem from their explicit and comprehensive formulations which make it easier for the model to understand the task requirements. We also observe in Table 6 that same as prior findings, BLEU and CodeBLEU have no obvious positive correlations with the debugging success rate (DSR@0). Since the reference target code exhibits the same functionality as the source language code but their execution results could differ slightly, EM also does not correlate with DSR@0. Therefore, in subsequent experiments, we only report DSR@0. We also evaluate the CodeT5+_220M model on LLMTrans with the Many-to-Many strategy and find that DSR@0 is 0, suggesting that CodeT5+_220M Zero-shot is unable to generate executable translation results. + +ChatGPT selects the token with the highest probability during generation. The hyperparameter temperature influences the randomness of the generated text, while top $p$ controls the range of vocabu + +
StrategyExpt #numEMBLEUCodeBLEUDSR@0
Baseline-0.2910.8324.4648.57%
Role assignments10.0011.0624.3643.43%
20.0011.0624.4843.14%
30.0010.7024.0841.71%
40.0010.7324.0840.86%
Polite inquiry10.2910.8324.3747.71%
20.8610.8724.2647.71%
Clarify usage-0.2910.6324.1144.00%
Divide-and-Conquer-0.007.4425.3022.86%
+ +Table 6: Zero-shot performance of ChatGPT with different prompt variants and contextual strategies. Baseline denotes ChatGPT with the baseline prompt. Details of the prompt variants (Expt #num) are in Appendix A.6. + +
KthDebugDSRKthDebugDSR
048.57%252.29%
151.43%352.57%
+ +Table 7: ChatGPT performance at the ${K}^{th}$ debugging. + +lary considered during generation. Higher temperature or top_p could increase diversity in the generated results from ChatGPT. However, as shown in Table 16 in Appendix, independently varying temperature or top_p does not notably change the performance of ChatGPT; hence for the other ChatGPT experiments, we set both temperature and top_p as 0 to ensure stability an reproducibility. + +Effect of Context We explore a Divide-and-Conquer strategy, which segments the source language code into snippets (e.g., functions and subfunctions), translate each snippet independently, then merge their outputs as the final result. As shown in Table 6, Divide-and-Conquer significantly degrades the performance. We hypothesize that lack of the global context in Divide-and-Conquer could prevent ChatGPT from considering the overall structure and variable configurations of the code for translation. + +Effect of Self-debugging Since ChatGPT has shown preliminary capability in error detection and correction during code generation (Shinn et al., 2023; Chen et al., 2023b; Kim et al., 2023; Nair et al., 2023; Madaan et al., 2023), we use ChatGPT to perform multiple rounds of self-debugging and investigate the impact on DSR. Specifically, ChatGPT first translates the source language code into the target language (which is Python as in our AutoTransExecutor) and then attempts to execute the translated code. If the execution passes and executing the translated code exhibits the same functionality as the source code, it is regarded as + +a successful execution. Otherwise, feedback from the compiler will be also fed to ChatGPT for the next round of translation, and this process is repeated until reaching a pre-defined number $K$ of debugging rounds. The whole process is shown in Table 17 in Appendix. As shown in Table 7, DSR improves significantly with multiple rounds of self-debugging. The first self-debugging improves DSR by $3\%$ absolutely. Each subsequent round of self-debugging brings further gain but DSR begins to plateau after the second debugging round. This suggests that ChatGPT has limitations in its capacity to rectify errors after multiple debugging cycles, which is consistent with human behaviors. + +Effect of One-shot In-context learning (Brown et al., 2020) allows the model to learn from input examples, enabling it to understand and manage each new task. This method has been validated as an effective strategy for enhancing the performance of model inference (Peng et al., 2023; Liu et al., 2023a). Therefore, we explore one-shot learning for ChatGPT on code translation. We investigate three one-shot learning sample selection strategies. Descriptions of the strategies and the corresponding prompts are in Appendix A.7. + +Table 8 shows that all three One-shot learning strategies effectively improve DSR@0 of ChatGPT over the Zero-shot baseline. The Experiment#2 strategy (provided contextual example has both same source and target languages as the original task) achieves the best performance, yielding $1.72\%$ absolute gain in DSR@0, with Experiment #1 (example has the same target language but different source language) and #3 (example has different source and target languages) following closely with $1.14\%$ and $0.29\%$ absolute gains, respectively. These results show that One-shot learning entirely tailored to the translation requirements is most effective in boosting code translation performance for ChatGPT. The results corroborate previous findings in natural language translation (Peng et al., 2023) that the performance of ChatGPT is sensitive to the provided contextual example in One-shot learning. + +Effect of Chain-of-Thought Chain-of-Thought (CoT) allows the model to simulate an orderly and structured way of thinking by sorting out the thinking process. It helps guide the model to output the final answer step by step (Wei et al., 2022; Peng et al., 2023; Kojima et al., 2022). For code translation, we investigate four CoT strategies. Detailed + +
StrategyExpts #numDSR@0StrategyExpts #numDSR@0
Baseline-48.57%CoT146.00%
One-shot149.71%242.57%
250.29%348.29%
348.86%445.43%
+ +Table 8: Performance of ChatGPT with One-shot and CoT strategies compared to the Zero-shot Baseline. Details of Expt #num are in Appendix A.7 and A.8. + +descriptions and translation prompts for each strategy are in Appendix A.8. As shown in Table 8, CoT degrades executability of the translated code. In Experiment #2, DSR@0 even declines by $6\%$ absolutely. We study the translation results of ChatGPT and find that when CoT strategies are applied, the model tends to translate the source code line by line, neglecting compatibility issues between libraries and functions in different languages. CoT also compromises the global planning ability of the model. These observations are consistent with the findings in (Peng et al., 2023) that CoT may lead to word-by-word translations of natural language, thereby degrading the translation quality. + +Fuzzy Execution To address the limitations of existing evaluation metrics and our AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution using LLMs in Section Limitations, inspired by recent progress in using LLMs as evaluation metrics for NLP tasks. Our preliminary studies evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also for predicting the executed output. Experimental results show that using ChatGPT for fuzzy execution is not yet practical and demands future research. + +# 5 Conclusion + +We construct CodeTransOcean, a comprehensive code translation benchmark that includes multilingual and cross-framework datasets. We demonstrate that multilingual modeling has remarkable potential in enhancing code translation quality. We also reveal the superior code translation capability of ChatGPT and advanced strategies lead to significant performance gains. Moreover, we introduce fuzzy execution that may overcome limitations of existing metrics but requires future research. In summary, we provide a comprehensive suite of resources, tools, and baselines for code translation. + +# 6 Limitations + +Existing match-based evaluation metrics for code translation (Papineni et al., 2002; Ren et al., 2020; Eghbali and Pradel, 2022; Zhou et al., 2023; Tran et al., 2019) focus solely on semantics, overlooking executability of the code and the functional equivalence under different implementations. Execution-based metrics (Kulal et al., 2019; Hao et al., 2022; Hendrycks et al., 2021; Rozière et al., 2020; Dong et al., 2023) that require providing test cases are expensive to conduct in practice, and the significant overhead of executing numerous test cases and the heightened security risks during the execution process remain unresolved. It is crucial to establish an evaluation metric that overcomes these limitations. + +Our proposed DSR@K and the automated AutoTransExecutor aim to measure the executability of the code and reflect the real-world software development scenarios. However, AutoTransExecutor currently only supports Python as the target language. This is mainly due to the fact that different programming languages necessitate distinct runtime environments and libraries, making it particularly challenging to automatically detect and install the required dependencies for each code. While certain existing tools, such as Dynatrace12, can carry out dependency detection, the range of supported programming languages remains limited. Moreover, the configuration methods for compilers vary substantially among different programming languages, which further complicates automated configuration. In addition, fully automated execution systems could be exploited by malicious code, thus necessitating further security measures. Therefore, achieving this goal requires overcoming many technical and practical difficulties. + +To address limitations of existing evaluation metrics and limitations of AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution. + +Recent studies have begun to utilize LLMs as evaluation metrics in the field of NLP (Chen et al., 2023c; Wang et al., 2023a; Fu et al., 2023; Kocmi and Federmann, 2023; Ji et al., 2023). Inspired by these works, we create a new dataset ExecuteStatus by randomly selecting 300 executable samples from MultilingualTrans and 300 non-executable samples from the translation results of ChatGPT. + +
Zero-ShotFew-Shot
TNFPFNTPTNFPFNTP
292823862294424258
✓12 ×280✓14 ×282
+ +Table 9: Confusion matrix of fuzzy execution prediction by ChatGPT with Zero-shot and Few-shot settings. + +
MetricsCalculation formulaZero-ShotFew-Shot
AccuracyTP + TN59.00%59.00%
TP + TN + FN + FP
PrecisionTP88.57%93.55%
TP + FP
RecallTP20.67%19.33%
TP + FN
F1 scores2 · Precision · Recall33.52%32.04%
Precision + Recall
+ +Table 10: Performance of ChatGPT on predicting fuzzy execution. + +Each entry in this dataset includes the execution status and, if executable, the result of the execution. We use ExecuteStatus and AutoTransExecutor to evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also predict the executed output. The Zero-shot prompts are shown in Table 18 in Appendix. For the Few-shot strategy, in addition to the Zero-shot baseline, we include an example of executable code and an example of non-executable code, as detailed in Table 18. + +We define fuzzy execution as first testing the consistency between the actual pass rate and the predicted pass rate of ChatGPT, followed by further testing the accuracy in predicting execution results using ChatGPT without relying on a compiler. Since we are interested in the ability of ChatGPT to identify samples that cannot actually be executed accurately, we present the confusion matrix in Table 9 based on the results. To evaluate the performance of ChatGPT on the fuzzy execution prediction task, we use the standard accuracy, precision, recall, and F1 scores. Experimental results based on these evaluation metrics are in Table 10. The low accuracy, recall and F1 scores show that ChatGPT still has difficulty in identifying errors in the code, exhibiting about an $88\%$ tendency to predict that the code is executable. Overall, ChatGPT has low accuracy in the binary classification task of "whether it can be executed", and its ability to predict execution results, being at a scant $4\%$ , clearly + +requires further enhancement. Thus, using ChatGPT for fuzzy execution is not yet practical (Liu et al., 2023b). Despite this, fuzzy execution with LLMs holds the potential to overcome the deficiencies of current code translation evaluation metrics. We will continue this exploration in future work. + +# References + +Roee Aharoni, Melvin Johnson, and Orhan First. 2019. Massively multilingual neural machine translation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 3874-3884. Association for Computational Linguistics. +Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. 2021. Unified pre-training for program understanding and generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 2655-2668. Association for Computational Linguistics. +Wasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, and Kai-Wei Chang. 2023. AVATAR: A parallel corpus for javapython program translation. In Findings of the Association for Computational Linguistics: ACL 2023, Toronto, Canada, July 9-14, 2023, pages 2268-2281. Association for Computational Linguistics. +Fatih Kadir Akın. 2023. awesome-chatgpt-prompts. +Badr AlKhamissi, Siddharth Verma, Ping Yu, Zhijing Jin, Asli Celikyilmaz, and Mona T. Diab. 2023. OPTR: exploring the role of explanations in finetuning and prompting for reasoning skills of large language models. CoRR, abs/2305.12001. +Anil Ananthaswamy. 2023. In ai, is bigger always better? Nature. +Rohan Anil, Andrew M. Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, Eric Chu, Jonathan H. Clark, Laurent El Shafey, Yanping Huang, Kathy Meier-Hellstern, Gaurav Mishra, Erica Moreira, Mark Omernick, Kevin Robinson, Sebastian Ruder, Yi Tay, Kefan Xiao, Yuanzhong Xu, Yujing Zhang, Gustavo Hernandez Abrego, Junwhan Ahn, Jacob Austin, Paul Barham, Jan A. Botha, James Bradbury, Siddhartha Brahma, Kevin Brooks, Michele Catasta, Yong Cheng, Colin Cherry, Christopher A. Choquette-Choo, Aakanksha Chowdhery, Clement Crepy, Shachi Dave, Mostafa Dehghani, Sunipa Dev, Jacob Devlin, Mark Diaz, Nan Du, Ethan Dyer, Vladimir Feinberg, Fangxiaoyu Feng, Vlad Fienber, Markus Freitag, Xavier Garcia, Sebastian Gehrmann, Lucas Gonzalez, and + +et al. 2023. Palm 2 technical report. CoRR, abs/2305.10403. +Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual. +Saikat Chakraborty, Toufique Ahmed, Yangruibo Ding, Premkumar T. Devanbu, and Baishakhi Ray. 2022. Natgen: generative pre-training by "naturalizing" source code. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2022, Singapore, Singapore, November 14-18, 2022, pages 18-30. ACM. +Angelica Chen, Jérémy Scheurer, Tomasz Korbak, Jon Ander Campos, Jun Shern Chan, Samuel R. Bowman, Kyunhyun Cho, and Ethan Perez. 2023a. Improving code generation by training with natural language feedback. CoRR, abs/2303.16749. +Xinyun Chen, Maxwell Lin, Nathanael Scharli, and Denny Zhou. 2023b. Teaching large language models to self-debug. CoRR, abs/2304.05128. +Xinyun Chen, Chang Liu, and Dawn Song. 2018. Tree-to-tree neural networks for program translation. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pages 2552-2562. +Yi Chen, Rui Wang, Haiyun Jiang, Shuming Shi, and Ruifeng Xu. 2023c. Exploring the use of large language models for reference-free text quality evaluation: A preliminary empirical study. CoRR, abs/2304.00723. +Yihong Dong, Jiazheng Ding, Xue Jiang, Zhuo Li, Ge Li, and Zhi Jin. 2023. Codescore: Evaluating code generation by learning code execution. CoRR, abs/2301.09043. +Aryaz Eghbali and Michael Pradel. 2022. Crystalbleu: Precisely and efficiently measuring the similarity of code. In 37th IEEE/ACM International Conference on Automated Software Engineering, ASE 2022, Rochester, MI, USA, October 10-14, 2022, pages 28:1-28:12. ACM. +Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, + +Ting Liu, Daxin Jiang, and Ming Zhou. 2020. Codebert: A pre-trained model for programming and natural languages. In Findings of the Association for Computational Linguistics: EMNLP 2020, Online Event, 16-20 November 2020, volume EMNLP 2020 of Findings of ACL, pages 1536-1547. Association for Computational Linguistics. +Jinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. 2023. Gptscore: Evaluate as you desire. CoRR, abs/2302.04166. +Mingqi Gao, Jie Ruan, Renliang Sun, Xunjian Yin, Shiping Yang, and Xiaojun Wan. 2023. Humanlike summarization evaluation with chatgpt. CoRR, abs/2304.02554. +Stefanos Georgiou, Maria Kechagia, Tushar Sharma, Federica Sarro, and Ying Zou. 2022. Green AI: do deep learning frameworks have different costs? In 44th IEEE/ACM 44th International Conference on Software Engineering, ICSE 2022, Pittsburgh, PA, USA, May 25-27, 2022, pages 1082-1094. ACM. +Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun Deng, Colin B. Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. 2021. Graphcodebert: Pre-training code representations with data flow. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net. +Yiyang Hao, Ge Li, Yongqiang Liu, Xiaowei Miao, He Zong, Siyuan Jiang, Yang Liu, and He Wei. 2022. Aixbench: A code generation benchmark dataset. CoRR, abs/2206.13179. +Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. 2021. Measuring coding challenge competence with APPS. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual. +Yunjie Ji, Yan Gong, Yiping Peng, Chao Ni, Peiyan Sun, Dongyu Pan, Baochang Ma, and Xiangang Li. 2023. Exploring chatgpt's ability to rank content: A preliminary study on consistency with human preferences. CoRR, abs/2303.07610. +Wenxiang Jiao, Wenxuan Wang, Jen tse Huang, Xing Wang, and Zhaopeng Tu. 2023. Is chatgpt a good translator? yes with gpt-4 as the engine. +Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda B. Viégas, Martin Wattenberg, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2017. Google's multilingual neural machine translation system: Enabling zero-shot translation. Trans. Assoc. Comput. Linguistics, 5:339-351. + +Geunwoo Kim, Pierre Baldi, and Stephen McAleer. 2023. Language models can solve computer tasks. CoRR, abs/2303.17491. +Tom Kocmi and Christian Federmann. 2023. Large language models are state-of-the-art evaluators of translation quality. In Proceedings of the 24th Annual Conference of the European Association for Machine Translation, EAMT 2023, Tampere, Finland, 12-15 June 2023, pages 193-203. European Association for Machine Translation. +Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. In NeurIPS. +Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy Liang. 2019. Spoc: Search-based pseudocode to code. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 11883-11894. +Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023a. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv., 55(9):195:1-195:35. +Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692. +Yongkang Liu, Shi Feng, Daling Wang, Yifei Zhang, and Hinrich Schütze. 2023b. Evaluate what you can't evaluate: Unassessable generated responses quality. CoRR, abs/2305.14658. +Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin B. Clement, Dawn Drain, Daxin Jiang, Duyu Tang, Ge Li, Li-dong Zhou, Linjun Shou, Long Zhou, Michele Tufano, Ming Gong, Ming Zhou, Nan Duan, Neel Sundaresan, Shao Kun Deng, Shengyu Fu, and Shujie Liu. 2021. Codexglue: A machine learning benchmark dataset for code understanding and generation. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual. +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. CoRR, abs/2306.08568. +Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Sean Welleck, Bodhisattwa Prasad Majumder, Shashank Gupta, Amir Yazdanbakhsh, and Peter + +Clark. 2023. Self-refine: Iterative refinement with self-feedback. CoRR, abs/2303.17651. +Alireza Mohammadshahi, Vassilina Nikoulina, Alexandre Berard, Caroline Brun, James Henderson, and Laurent Besacier. 2022. Small-100: Introducing shallow multilingual machine translation model for low-resource languages. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 8348-8359. Association for Computational Linguistics. +Varun Nair, Elliot Schumacher, Geoffrey J. Tso, and Anitha Kannan. 2023. DERA: enhancing large language model completions with dialog-enabled resolving agents. CoRR, abs/2303.17071. +Anh Tuan Nguyen, Tung Thanh Nguyen, and Tien N. Nguyen. 2013. Lexical statistical machine translation for language migration. In Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE'13, Saint Petersburg, Russian Federation, August 18-26, 2013, pages 651-654. ACM. +Toan Q. Nguyen and David Chiang. 2017. Transfer learning across low-resource, related languages for neural machine translation. In Proceedings of the Eighth International Joint Conference on Natural Language Processing, IJCNLP 2017, Taipei, Taiwan, November 27 - December 1, 2017, Volume 2: Short Papers, pages 296-301. Asian Federation of Natural Language Processing. +OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774. +Alfrick Opidi. 2020. Why your legacy software is hard to maintain and what to do about it. +Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, July 6-12, 2002, Philadelphia, PA, USA, pages 311-318. ACL. +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. CoRR, abs/2303.13780. +Ruchir Puri, David S. Kung, Geert Janssen, Wei Zhang, Giacomo Domeniconi, Vladimir Zolotov, Julian Dolby, Jie Chen, Mihir R. Choudhury, Lindsey Decker, Veronika Thost, Luca Buratti, Saurabh Pajar, and Ulrich Finkler. 2021. Project codenet: A largescale AI for code dataset for learning a diversity of coding tasks. CoRR, abs/2105.12655. +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. CoRR, abs/2009.10297. +Israt Jahan Rithy, Hasib Hossain Shakil, Niloy Mondal, Fatema Sultana, and Faisal Muhammad Shah. 2022. Xtest: A parallel multilingual corpus with test cases for code translation and its evaluation*. In 2022 25th International Conference on Computer and Information Technology (ICCIT), pages 623-628. +Baptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, and Guillaume Lample. 2020. Unsupervised translation of programming languages. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual. +Baptiste Rozière, Jie Zhang, François Charton, Mark Harman, Gabriel Synnaeve, and Guillaume Lample. 2022. Leveraging automated unit tests for unsupervised code translation. In *The Tenth International Conference on Learning Representations*, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net. +Noah Shinn, Federico Cassano, Beck Labash, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language agents with verbal reinforcement learning. +Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models. +Ngoc M. Tran, Hieu Tran, Son Nguyen, Hoan Nguyen, and Tien N. Nguyen. 2019. Does BLEU score work for code migration? In Proceedings of the 27th International Conference on Program Comprehension, ICPC 2019, Montreal, QC, Canada, May 25-31, 2019, pages 165-176. IEEE / ACM. +Jiaan Wang, Yunlong Liang, Fandong Meng, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023a. Is chatgpt a good NLG evaluator? A preliminary study. CoRR, abs/2303.04048. +Yiren Wang, ChengXiang Zhai, and Hany Hassan. 2020. Multi-task learning for multilingual neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 1022-1034. Association for Computational Linguistics. +Yue Wang, Hung Le, Akhilesh Deepak Gotmare, Nghi D. Q. Bui, Junnan Li, and Steven C. H. Hoi. 2023b. Codet5+: Open code large language models for code understanding and generation. CoRR, abs/2305.07922. +Yue Wang, Weishi Wang, Shafiq R. Joty, and Steven C. H. Hoi. 2021. Codet5: Identifier-aware unified + +pre-trained encoder-decoder models for code understanding and generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 8696-8708. Association for Computational Linguistics. + +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. + +Justin D. Weisz, Michael J. Muller, Stephanie Houde, John T. Richards, Steven I. Ross, Fernando Martinez, Mayank Agarwal, and Kartik Talamadupula. 2021. Perfection not required? human-ai partnerships in code translation. In IUI '21: 26th International Conference on Intelligent User Interfaces, College Station, TX, USA, April 13-17, 2021, pages 402-412. ACM. + +Justin D. Weisz, Michael J. Muller, Steven I. Ross, Fernando Martinez, Stephanie Houde, Mayank Agarwal, Kartik Talamadupula, and John T. Richards. 2022. Better together? an evaluation of ai-supported code translation. In IUI 2022: 27th International Conference on Intelligent User Interfaces, Helsinki, Finland, March 22 - 25, 2022, pages 369-391. ACM. + +Ning Wu, Ming Gong, Linjun Shou, Shining Liang, and Daxin Jiang. 2023. Large language models are diverse role-players for summarization evaluation. In *Natural Language Processing and Chinese Computing - 12th National CCF Conference*, NLPCC 2023, Foshan, China, October 12-15, 2023, Proceedings, Part I, volume 14302 of Lecture Notes in Computer Science, pages 695-707. Springer. + +Jingfeng Yang, Hongye Jin, Ruixiang Tang, Xiaotian Han, Qizhang Feng, Haoming Jiang, Bing Yin, and Xia Hu. 2023. Harnessing the power of llms in practice: A survey on chatgpt and beyond. CoRR, abs/2304.13712. + +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. CoRR, abs/2302.10198. + +Shuyan Zhou, Uri Alon, Sumit Agarwal, and Graham Neubig. 2023. Codebertscore: Evaluating code generation with pretrained models of code. CoRR, abs/2302.05527. + +Ming Zhu, Aneesh Jain, Karthik Suresh, Roshan Ravindran, Sindhu Tipirneni, and Chandan K. Reddy. 2022a. Xlcost: A benchmark dataset for cross-lingual code intelligence. CoRR, abs/2206.08474. + +Ming Zhu, Karthik Suresh, and Chandan K. Reddy. 2022b. Multilingual code snippets training for program translation. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth + +Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11783-11790. AAAI Press. + +Wenhao Zhu, Hongyi Liu, Qingxiu Dong, Jingjing Xu, Lingpeng Kong, Jiajun Chen, Lei Li, and Shujian Huang. 2023. Multilingual machine translation with large language models: Empirical results and analysis. CoRR, abs/2304.04675. + +Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016. Transfer learning for low-resource neural machine translation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pages 1568-1575. The Association for Computational Linguistics. + +# A Appendix + +# A.1 Related Work + +# A.1.1 Code Translation Methods + +Naive Copy directly duplicates the source code as the target code without making any modifications. Given that the results produced by this method are often unusable, it is treated as the lower bound of performance for code translation. Early code translation relies heavily on manual rewriting, which requires developers to have a deep understanding of both source and target languages along with the ability to navigate various complex programming structures and semantic challenges. This method is inefficient, costly, and prone to errors. + +Automatic code translation methods fall into several categories. Compilers and transpilers13 can automatically translate the source code into a target language, significantly saving time and effort. However, these methods cannot fully preserve all the linguistic features and behaviors of the source code, nor can they comprehend the intent and semantics inherent to the source code as humans do. Rule-based methods (Weisz et al., 2021, 2022; Rozière et al., 2020) treat the code translation task as a program synthesis problem. They define a set of transformation rules and employ the rules or pattern matching for code translation. Research on rule-based methods is quite scarce, mainly because they overly rely on the completeness of the rules and also require a considerable amount of manual preprocessing. + +Neural network based methods have become dominant in the field of code translation in recent + +years. These methods mainly treat code translation as a sequence-to-sequence generation problem. Among them, Chen et al. (Chen et al., 2018) are the first to successfully apply neural networks to code translation, designing a tree-to-tree neural model. CodeBERT (Feng et al., 2020) significantly improves code translation accuracy by pretraining models with masked language modeling and replaced token detection. GraphCodeBERT (Guo et al., 2021) further improves code translation accuracy by introducing two additional pre-training tasks as edge prediction and node alignment. CodeT5 (Wang et al., 2021), based on the Transformer encoder-decoder architecture, achieves excellent performance on code translation through four pre-training tasks, namely, masked span prediction, identifier tagging, masked identifier prediction, and bimodal dual generation. With a similar architecture as CodeT5, PLBART (Ahmad et al., 2021) adopts three tasks of token masking, token deletion and token infilling for denoising seq2seq pre-training, which enables PLBART to infer language syntax and semantics and to learn how to generate language coherently. NatGen (Chakraborty et al., 2022) forces the model to learn to capture intent of the source code by setting up "Code-Naturalization" tasks during pre-training, and forces the model to make the generated code closer to the human-written style. + +In the line of neural network based methods, recently released large language models (LLMs) (e.g., ChatGPT (OpenAI, 2023)) have shown remarkable performance in a wide range of NLP tasks with instructions and a few in-context examples. ChatGPT is built upon GPT and is optimized with Reinforcement Learning from Human Feedback. ChatGPT can efficiently understand and generate code sequences, and can self-learn from human feedback to improve the quality and accuracy of its outputs. This significant advancement has markedly propelled progress in the field of code translation. + +# A.1.2 Code Translation Metrics + +Match-Based Evaluation Metrics These evaluation metrics are based on the similarity between the translation output and the reference translation. Among them, the Exact Match (EM) metric calculates the percentage of translation outputs that exactly match the reference translation, which overlooks the fact that the same function can be implemented in various ways. The Bilingual Evalu + +ation Understudy (BLEU) (Papineni et al., 2002) metric evaluates the similarity between the translation output and the reference translation by multiplying the geometric average of n-gram precision scores with a brevity penalty. The CodeBLEU (Ren et al., 2020) metric extends BLEU by considering syntactic and semantic characteristics of programming languages; it not only considers shallow matching but also pays attention to syntactic and semantic matching. CrystalBLEU (Eghbali and Pradel, 2022) focuses more on the inherent differences between source code and natural language, such as trivial shared n-gram syntax. CodeBERTScore (Zhou et al., 2023) uses pre-trained models to encode the translation output and reference translation, then calculates the dot product similarity between them, enabling comparisons of code pairs with distinct lexical forms. However, CodeBLEU, CrystalBLEU, and CodeBERTScore have limitations as they only support a limited range of programming languages and cannot be used in general multilingual scenarios. Ruby (Tran et al., 2019), a new method for evaluating code translation, considers the lexical, syntactic, and semantic representations of source code. However, its codebase has not yet been open-sourced. These match-based evaluation metrics can only evaluate the surface form and semantic differences of the code, while neglecting the executability of the code and the functional equivalence of implementation variations. + +# Execution-Based Evaluation Metrics + +Execution-based evaluation metrics mainly compare the executed result of the generated code with the expected result. The PASS@k score (Kulal et al., 2019) is evaluated by unit tests: if any of the $k$ samples meets the expected result, the generated result is deemed successful. AvgPassRatio (Hao et al., 2022; Hendrycks et al., 2021) evaluates the overall executable result of code by calculating the average pass rate of test cases. Computational accuracy (Rozière et al., 2020) measures the quality of the generated code snippet by comparing the output of this snippet with the reference code snippet when given the same input. Additionally, CodeScore (Dong et al., 2023) claims that it can estimate the PassRatio of test cases for the generated code without executing the code, but its codebase has not yet been open-sourced. These execution-based evaluation metrics require construction of executable test + +
MethodTrainDevTestTotalMethodTrainDevTestTotal
C ↔ C#796841691049C ↔ C++7991492981246
C ↔ Go8772274541558C ↔ Java8131713431327
C ↔ Python9012134261540C ↔ PHP29651102449
C ↔ VB61797194908C++ ↔ C#74879160987
C++ ↔ Go7922084181418C++ ↔ Java7531723451270
C++ ↔ Python8422024051449C++ ↔ PHP29153106450
C++ ↔ VB58697195888C# ↔ Go7771002021079
C# ↔ Java750861741010C# ↔ Python813991991111
C# ↔ PHP2934080413C# ↔ VB59770142809
Java ↔ Go7932214431457Java ↔ Python8382174361491
Java ↔ PHP574119239932Java ↔ VB610104210924
Go ↔ Python8873146281828Go ↔ PHP606128258992
Go ↔ VB618116232966PHP ↔ Python9271853701482
PHP ↔ VB2674488399VB ↔ Python644114229987
+ +Table 11: Composition and Distribution of the Multilingual Dataset. The numbers refer to the number of code pair samples. VB is short for Visual Basic. [Return to Section 3.1] + +sets, which could be costly. Furthermore, due to potential security threats from the execution environment and the code, they need to be run in an isolated sandbox. + +# A.2 Data Management + +# A.2.1 Data Sources & Licenses + +We collect CodeTransOcean from two different platforms. The MultilingualTrans and NicheTrans datasets are collected from Rosetta Code $^{14}$ , a programming site presenting solution strategies for identical tasks across as many programming languages as possible, thereby demonstrating both similarities and differences among these languages. We strictly adhere to the data distribution license of the platform as Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license $^{15}$ . + +The DLTrans dataset is derived from an open-source teaching platform *Dive into Deep Learning* $^{16}$ , which is dedicated to teaching deep learning knowledge ranging from theoretical background, conceptual understanding, to coding practices. We strictly adhere to the data distribution license of this platform as *Apache-2.0* $^{17}$ . To ensure legal and regulated use of these datasets, we require strict + +adherence to these licenses. + +# A.2.2 Data Processing + +Multilingual Datasets Given the variations in compilation requirements among programming languages, we keep the original format as much as possible to ensure the compileability of the data while ensuring its accuracy. Additionally, we employ a duplicate-file-detection tool to identify and remove duplicate data from the dataset to avoid any potential data leakage problems during model training. + +Cross-Framework Dataset To ensure the comparability of Python, we keep the original formatting information. We manually verify all automatically collected samples, identify and exclude samples that do not meet the requirements. + +# A.2.3 Data Quality + +We randomly select 1K samples from each dataset within CodeTransOcean for manual quality assessment. We find that for the MultilingualTrans dataset with compilation requirements, the comparability rate exceeds $90\%$ . We verify that the code pairs in each dataset are functionally identical and confirm that CodeTransOcean is of high quality. + +Additionally, during data collection, we pay special attention to the diversity of domain knowledge and code styles. CodeTransOcean includes various code examples ranging from basic syntactic structures to complex algorithm implementations, as well as building neural networks from scratch and conducting training and inference. This rich + +diversity ensures that CodeTransOcean reflects a wide variety of real-world scenarios. + +# A.3 Specific Challenges in Implementing Cross-framework Translation + +Firstly, there are significant design differences between frameworks, including data processing methods, model-building strategies, and network connection techniques. Secondly, the inherent complexity of DL code increases the difficulty of conversion, as these codes usually contain various components such as neural network layers, loss functions, optimizers, and learning rate schedulers. Thirdly, there are significant inconsistencies in the code structure of different frameworks, such as code organization and variable naming rules. Lastly, cross-platform compatibility must be considered because DL code may encounter compatibility issues when executing on different hardware platforms (e.g., GPUs, CPUs, TPUs) and operating systems. + +# A.4 Code Examples on Different Deep Learning Frameworks + +Figures 1 and 2 show the implementation of two different deep learning components in various deep learning frameworks. + +# A.5 Multilingual Modeling + +One-to-One For each language pair in the dataset, we train an independent model, e.g., translating $\mathrm{C + + }$ to Java. + +One-to-Many We train individual models from one language to many other languages, e.g., translating Python to all other languages. + +Many-to-One We train individual models from multiple languages to one language, e.g., translating all other languages to Python. + +Many-to-Many We train a unified model for the multiple to multiple languages in the dataset, which can handle translations between all languages. + +We ensure all experiments are performed under the same hyperparameters and environment for comparison. Table 13 shows these in detail. + +# A.6 Prompt Variations + +Role Assignment (Peng et al., 2023; AlKhamissi et al., 2023; Wu et al., 2023; Akin, 2023) We configured two distinct roles for the model, each with unique skills. This arrangement empowers the + +PyTorch +```python +1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): +2 def forward(self, pred, label, valid_len): +3 weights $=$ torch.ones_like.label) +4 weights $=$ sequence_mask(weights,valid_len) +5 self.reduce $\equiv$ 'none' +6 unweighted_loss $=$ super(MaskedSoftmaxCELoss,self).forward( +7 pred.permute(0,2,1),label) +8 weighted_loss $=$ (unweighted_loss \* weights).mean( dim=1) +9 return weighted_loss +``` + +TensorFlow +```python +1 class MaskedSoftmaxCELoss(tf.keras.losses.Loss): +2 def __init__(self, valid_len): +3 super().init_(reduction='none') +4 self.valid_len = valid_len +5 +6 def call(self, label, pred): +7 weights = tf.ones_like.label, dtype=tf.float32) +8 weights = sequence_mask(weights, self.valid_len) +9 label_one-hot = tf.one-hot.label, depth=pred.shape[-1]) +10 unweighted_loss = tf.keras.losses. CategoricalCrossentropy( from_logits=True, reduction='none')( label_one-hot, pred) +11 weighted_loss = tf.reduce_mean((unweighted_loss* weights), axis=1) +13 return weighted_loss +``` + +MXNet +```prolog +1 class MaskedSoftmaxCELoss(gluon.loss.SoftmaxCELoss): +2 def forward(self, pred, label, valid_len): +3 weights = npexpand_dims(np.ones_like.label), axis=1) +4 weights = npx(sequenceMask(weights, valid_len, True, axis=1)) +5 return super(MaskedSoftmaxCELoss, self).forward(pred, label, weights) +``` + +Paddle +```python +1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): +2 def forward(self, pred, label, valid_len): +3 weights $=$ paddle.ones_like.label) +4 weights $=$ sequence_mask(weights,valid_len) +5 self.reduction $\equiv$ 'none' +6 unweighted_loss $=$ super(MaskedSoftmaxCELoss,self).forward( +7 pred, label) +8 weighted_loss $=$ (unweighted_loss \* weights).mean( axis=1) +9 return weighted_loss +``` + +Figure 1: Softmax cross-entropy loss function with masking in PyTorch, TensorFlow, MXNet and Paddle. + +model to simulate more domain-adaptable and specialized expert roles. + +Polite inquiry (Akin, 2023) These strategies add polite expression and set up imperative and interrogative requests. Given that ChatGPT is designed to simulate human conversation styles as closely as possible, including understanding and simulating polite language expressions. Therefore, we expect these strategies to boost the comprehension of the model and augment the quality of its generated results. + +Clarify usage This strategy aims to make the model clearly aware of its requirements during the code translation process - the generated code needs to be guaranteed to execute without issues. + +The translation prompts of the above four strategies + +
MethodTrainDevTestTotalMethodTrainDevTestTotal
Ada60224649377423Elixir36182975994514
Arturo38024709475219Erlang32692174493935
AutoHotKey430555511205980Factor472486017567340
AWK388057811625620Forth36193396904648
BBC Basic36632394854387Fortran40503056174972
Clojure36173106334560Groovy37732274674467
Common Lisp50854679336485Haskell5647104520978789
D554182516628028Icon26461583263130
Delphi35474368894872J5476120424229102
Julia58291511305510395Ruby5793129026009683
Lua531667713667359COBOL24381673552960
Mathematica5485104621058636REXX5595111822418954
MATLAB28721573223351R28031974023402
Nim5814132126759810Racket564690118178364
OCaml42864058175508Rust514671714397302
Pascal33934659424800Tcl535474015027596
Perl58181445291410177PowerShell35632404904293
Scala5852107421649090F#451763812876442
Swift36534048184875
+ +Table 12: The number of code samples for each language in the NicheTrans datasets. [Return to Section 3.1] + +
MultilingualTransNicheTransDLTrans
Learning rate3e-52e-53e-5
Beam size115
Max source length15361536512
Max target length15361536512
Batch size16
Max epoch5
Fp16True
GPUNVIDIA Tesla V100 32GB
+ +Table 13: Parameters and hardware configuration for training CodeT5+_220M (220M is the model size) on CodeTransOcean. + +are shown in Table 15. + +# A.7 One-Shot + +Experiment #1 selects a training sample from a high-resource language code pair as an example. In this case, the target language type aligns with the target language type of the translation request, but the source language does not. + +Experiment #2 selects a code pair whose source and target language directions are congruent with the translation requirements as an example. That is, the source and target languages of the example dynamically adjust following the translation requirements. + +Experiment #3 randomly selects a code pair as an example, in which neither the source nor the target languages match the translation requirements. The specific translation prompts are shown in Table 19. + +# A.8 Chain of Thought + +Experiment #1 First, describe the function of the source code in the natural language, then translate it according to the source code and the corresponding natural language description. + +Experiment #2 First, let ChatGPT understand the function of the source code, followed by the translation, while ensuring that the function of the code remains unchanged during the translation process. + +Experiment #3 First, let ChatGPT understand the function of the source code, then predict the output result of the source code, and finally perform the translation, demanding that the translated code successfully executes. + +Experiment #4 Building upon Experiment #3 and the one-shot approach of Experiment #2, we introduce a CoT one-shot variation. That is, first, provide a case in the same direction for ChatGPT reference, then require it to understand the func + +# PyTorch + +```python +1 class Seq2SeqDecoder(d2l.Decoder): +2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): +3 super(Seq2SeqDecoder, self).__init__(**kwargs) +4 self_embedding = nn.Embedding(vocab_size, embed_size) +5 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout) +6 self>dense = nn.Linear(num_hiddens, vocab_size) +7 +8 def init_state(self, enc_outputs, *args): +9 return enc_outputs[1] +10 +11 def forward(self, X, state): +12 X = self_embedding(X).permute(1, 0, 2) +13 context = state[-1].repeat(X.shape[0], 1, 1) +14 X_and_context = torch.cat((X, context), 2) +15 output, state = self.rnn(X_and_context, state) +16 output = self.dense(output).permute(1, 0, 2) +17 return output, state +``` + +# MXNet + +```python +1 class Seq2SeqDecoder(d21.Decoder): +2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): +3 super(Seq2SeqDecoder, self).__init__(**kwargs) +4 selfembedding = nn.Embedding(vocab_size, embed_size) +5 self.rnn = rnn.GRU(num_hiddens, num_layers, dropout=dropout) +6 self.dense = nn.Dense(vocab_size, flatten=False) +7 +8 def init_state(self, enc_outputs, *args): +9 return enc_outputs[1] +10 +11 def forward(self, x, state): +12 X = self_embedding(X).swapaxes(0, 1) +13 context = state[0][-1] +14 context = nproadcast_to(context, (X.shape[0], context.shape[0], context.shape[1])) +15 X_and_context = np concatenate((X, context), 2) +16 output, state = self.rnn(X_and_context, state) +17 output = self.dense(output).swapaxes(0, 1) +18 return output, state +``` + +# TensorFlow + +```python +1 class Seq2SeqDecoder(d2l.Decoder): +2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): +3 super().__init__(**kwargs) +4 self_embedding = tf keras.layers.Embedding(vocab_size, embed_size) +5 self.rnn = tf keras.layers.RNN(tf keras.layers.StackedRNNCells() +6 [tf keras.layers.GRUCell(num_hiddens, dropout=dropout) +7 for _ in range(num_layers)], return_sequences=True, return_state=True) +8 self.dense = tf keras.layers.Dense(vocab_size) +9 +10 def init_state(self, enc_outputs, *args): +11 return enc_outputs[1] +12 +13 def call(self, X, state, **kwargs): +14 X = self_embedding(X) +15 context = tf.reduce(tfexpand_dims(state[-1], axis=1), repeats=X.shape[1], axis=1) +16 X_and_context = tf.cat((X(context), axis=2)) +17 rnn_output = self.rnn(X_and_context, state, ** kwargs) +18 output = self>dense(rnn_output[0]) +19 return output, rnn_output[1:] +``` + +# Paddle + +```python +1 class Seq2SeqDecoder(d2l.Decoder): +2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): +3 super(Seq2SeqDecoder, self).__init__(**kwargs) +4 self_embedding = nn.Embedding(vocab_size, embed_size) +5 weight_attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) +6 weight ih attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) +7 weight hh attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) +8 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout, time major=True, weight ih attr =weight ih attr, weight hh attr = weight hh attr) +9 +10 self.dense = nn.Linear(num_hiddens, vocab_size, weight_attr=weight_attr) +11 +12 def init_state(self, enc_outputs, *args): +13 return enc_outputs[1] +14 +15 def forward(self, X, state): +16 X = self_embedding(X).transpose([1, 0, 2]) +17 context = state[-1].tile([X.shape[0], 1, 1]) +18 X_and_context = paddle跖cat((X, context), 2) +19 output, state = self.rnn(X_and_context, state) +20 output = selfdense(output).transpose([1, 0, 2]) +21 return output, state +``` + +Figure 2: Implementing RNN Decoder for Seq2Seq Learning in PyTorch, TensorFlow, MXNet and Paddle. [Return to Section 3.2] + +tion of the source code, then predict the output of the source code, and finally translate it, with the condition that the translated code must successfully execute. + +The specific translation prompts are shown in Table 19. + +
MethodCC++C#GoVBPythonJavaPHP
CNaive-14.619.084.521.642.1711.232.09
OtO-11.13±0.284.77±0.858.18±0.402.02±0.231.85±0.146.50±2.911.71±0.32
OtM-12.33±0.587.56±0.989.58±0.742.22±0.892.82±0.588.92±0.673.42±0.09
MtO-7.99±1.945.35±0.416.94±0.833.77±0.442.09±0.258.65±0.521.93±0.49
MtM-9.61±0.327.15±1.417.54±0.332.30±0.712.11±0.438.29±0.453.30±0.92
C++Naive14.88-10.083.873.761.6911.391.92
OtO10.58±0.37-6.52±1.966.77±1.082.34±0.901.82±0.379.41±1.591.50±0.03
OtM13.32±2.46-9.87±1.159.83±1.372.62±1.152.93±0.1812.10±1.512.87±0.82
MtO10.54±2.33-6.98±1.467.29±0.733.57±0.742.28±0.187.82±1.261.96±0.20
MtM9.92±1.14-7.79±1.497.70±0.482.06±0.742.38±0.3010.20±1.204.12±0.81
C#Naive9.0510.03-5.057.201.8313.602.58
OtO5.41±1.256.45±1.68-7.10±0.639.42±5.501.73±0.4610.55±1.671.97±0.76
OtM7.42±1.828.99±0.17-9.81±0.686.13±2.922.80±0.4311.92±2.524.55±0.81
MtO6.37±0.696.13±1.60-7.53±0.949.92±1.002.47±0.6210.16±1.401.70±0.20
MtM6.19±0.887.22±0.93-9.36±0.924.60±2.872.23±0.3612.50±1.354.70±0.27
GoNaive4.523.755.04-2.463.006.562.14
OtO5.65±0.416.88±0.474.70±1.28-1.87±0.542.89±0.165.41±1.062.48±0.23
OtM6.06±0.996.56±0.897.28±0.82-2.12±0.653.32±0.368.79±1.063.48±0.20
MtO5.41±0.634.77±0.766.89±0.33-2.94±0.633.12±0.487.81±0.321.79±0.51
MtM5.18±1.236.06±0.287.12±0.72-1.82±0.932.83±0.508.99±1.282.55±0.40
VBNaive1.643.767.292.54-1.422.890.46
OtO3.96±0.205.25±0.6817.34±1.795.85±0.64-1.34±0.065.51±0.430.61±0.18
OtM5.15±0.156.10±0.3019.63±1.037.83±0.45-2.02±0.327.91±0.922.02±0.20
MtO4.25±0.864.15±1.0911.96±1.966.38±0.45-1.66±0.587.26±1.391.18±0.33
MtM5.18±0.655.09±0.1514.13±1.836.97±1.30-2.34±0.118.39±0.772.92±0.22
PythonNaive1.731.141.442.500.89-1.821.28
OtO4.35±0.443.66±0.955.38±0.765.67±0.342.53±1.11-4.70±0.073.24±0.60
OtM4.51±1.335.18±0.526.48±0.716.04±0.961.50±0.56-6.29±0.396.55±0.94
MtO4.70±0.283.44±0.765.48±0.554.80±0.632.42±0.18-5.32±0.662.74±0.39
MtM4.54±0.674.74±0.145.69±0.725.84±0.362.09±0.94-6.45±0.114.49±0.63
JavaNaive11.2311.1513.446.572.842.24-2.60
OtO7.15±1.599.09±1.0010.92±1.6111.05±0.522.66±0.132.54±0.35-2.05±0.95
OtM9.27±1.529.33±0.8613.52±0.9512.57±0.962.92±0.783.98±0.86-6.20±1.08
MtO6.69±0.836.32±1.6610.57±1.168.79±0.443.91±0.572.86±0.36-2.48±0.34
MtM6.56±0.337.60±0.469.40±1.088.30±0.872.20±0.852.53±0.15-3.57±0.94
PHPNaive1.791.512.362.000.371.302.30-
OtO4.18±1.442.91±0.436.45±0.435.85±0.540.42±0.091.98±0.266.47±0.59-
OtM3.78±1.801.93±1.355.51±0.605.13±0.600.56±0.362.70±0.805.51±1.91-
MtO4.97±1.093.69±0.466.08±3.036.44±0.782.28±0.123.55±0.188.66±0.84-
MtM6.03±0.615.15±0.6710.64±1.276.69±0.311.69±0.572.46±0.467.87±1.90-
+ +Table 14: BLEU scores from different multilingual modeling strategies by fine-tuning the pre-trained CodeT5+_220M model (220M is the model size) (Wang et al., 2023b). Naive denotes Naive Copy, which directly duplicates the source code as the target code without making any modifications. Method OtO, OtM, MtO, and MtM denote One-to-One, One-to-Many, Many-to-One, and Many-to-Many, respectively. The rows correspond to the source language while the columns correspond to the target language. We run each experiment with three different random seeds and report the mean and standard deviation of BLEU scores. [Return to Section 4.1.] + +
MethodTranslation Prompt
Role Assignment #1"role": "system", "content": "Your are a code translation system.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #2"role": "system", "content": "You are a code translation system that specializes in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #3"role": "system", "content": "You are a programmer proficient in multiple programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #4"role": "system", "content": "You are a programmer proficient in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Polite Inquiry #1Please translate the following [SL] code into [TL] code:[SC]
Polite Inquiry #2Can you rewrite this [SL] code in [TL]? [SC]
Clarify UsageTranslating [SL] to [TL] ensures that Python code can be executed. [SC]
Divide & ConquerTranslate [SL] to [TL]: [SC]
+ +Table 15: Translation prompts for prompt variants and contextual strategies on ChatGPT. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language. [Return to Section 4.3] + +
StrategyTemp.EMBLEUCodeBLEUDSR@0StrategyTop-KEMBLEUCodeBLEUDSR@0
Top-K=000.5710.8324.4548.57%Temp.=000.5710.8324.4548.57%
0.20.5710.8224.4347.71%0.20.5710.8124.4548.29%
0.40.5710.8024.3748.00%0.40.5710.8124.4448.29%
0.60.5710.7824.4548.00%0.60.5710.8224.4248.29%
0.80.5710.8224.4947.71%0.80.5710.8024.3847.71%
1.00.5710.8124.4148.00%1.00.5710.8124.3848.00%
+ +Table 16: Code translation performance of ChatGPT under different parameter settings. Temp. refers to temperature. [Return to Section 4.3] + +# Self-debug@0 + +Translate [source_language] to [target_language]: [source_code]. + +CTO + +![](images/3a74811546de4d1af7aa37ef432dc41b7f5159de9c2483282fef0ed1cd5b6377.jpg) + +Here is the [target_language] code equivalent + +of the given [source_language] code: [translated_code]. + +# Self-debug@n + +The above python code executes with the following errors, please correct them. [Compiler reports errors] + +CTO + +![](images/3ebce668c0b38ae85b19b0b90b2b829e62fa821d692df2591b34172a63508b41.jpg) + +Here is the modified [target_language] code: [translated_code]. + +Table 17: A simple demo: Translation prompting of ChatGPT in the multi-round debugging strategy. The content in red is returned by the compiler. [Return to section 4.3.] + +# Zero-shot prompting + +Does the following Python code execute? [python_code]. + +CTO + +![](images/5793b71ac1800d590d464d56bd1830c8a6a92cb46cf9712bce0b208ece634004.jpg) + +Yes, the Python code executes without errors. + +Please predict the executed output of the Python code above. + +CTO + +![](images/275f577a0869f194476f2efdd99bd7b37d41f1fa68958d021ba7891587b6f9db.jpg) + +The predicted execution result of the Python code above is [output]. + +# Few-shot prompting + +This is a executable Python code [python_code], and this is a Python code [python_code] that cannot be executed. Does the following Python code execute? [python_code]. + +CTO + +![](images/d1fe881fc0f50f4dad68b4a17fa49aa28d55d76a86da992401ef9a8fe23d2676.jpg) + +Yes, the Python code executes without errors. + +Please predict the executed output of the Python code above. + +CTO + +![](images/ea3c3b966256479b55dffc4c796ace793468139d99956a638be7c38ef75f461f.jpg) + +The predicted execution result of the Python code above is [output]. + +Table 18: Two simple demos: prompting in fuzzy execution experiments. [Return to Section 6.] + +
MethodTranslation Prompt
One-ShotHere is an example of a translation from [ESL] to [ETL].[ESL]: [ESC], [ETL]: [ETC]. Please imitate this example to translate following code from [SL] to [TL]:[TC].
One-Shot #1where [ESL]≠[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]=[TL] where [ESL]≠[SL] and [ETL]≠[TL]
One-Shot #2where [ESL]=[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]≠[TL]
One-Shot #3where [ESL]≠[SL] and [ETL]≠[TL]
CoT #11.Please explain the function of the following [SL] code, which is limited to 200 words.[SC] 2.Please translate into [TL] code according to the following [SL] code and its functional description.[SL]:[SC].Function description:[DSC]
CoT #2First, understand the function of the following [SL] code. Then, translate the [SL] code into [TL] code while keeping the function unchanged.[SC]
CoT #3First, understand the functionality of the following [SL] code and predict the execution output. Then, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.[SL]
CoT #4First, learn how to translate [ESL] code to [ETL] based on the example, [SL]:[ESC],[TL]:[ETC]. Then, understand the functionality of the following [SL] code and predict the execution output, [SL]:[SC]. Finally, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.
+ +Table 19: ChatGPT translation prompts on one-shot & CoT strategies. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language,[ESL] refers to the source language in the example, [ESC] refers to the source code in the example, [ETL] refers to the target language in the example, [ETC] refers to the target code in the example, [DSC] refers to the natural language description of the source code. [Return to Section 4.3] \ No newline at end of file diff --git a/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/images.zip b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e16c9744cbe7395c778bbc4801da6571efd97bdf --- /dev/null +++ b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58ec474139b00c03411b75bcc57b88ebac562fdce0f4e78749574f899f6a73b3 +size 1351296 diff --git a/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/layout.json b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e19f7b8760fd64036706d2025d0059f33b156f9c --- /dev/null +++ b/2023/CodeTransOcean_ A Comprehensive Multilingual Benchmark for Code Translation/layout.json @@ -0,0 +1,12798 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 106, + 69, + 487, + 101 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 106, + 69, + 487, + 101 + ], + "spans": [ + { + "bbox": [ + 106, + 69, + 487, + 101 + ], + "type": "text", + "content": "CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translation" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 88, + 110, + 171, + 125 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 88, + 110, + 171, + 125 + ], + "spans": [ + { + "bbox": [ + 88, + 110, + 171, + 125 + ], + "type": "text", + "content": "Weixiang Yan" + }, + { + "bbox": [ + 88, + 110, + 171, + 125 + ], + "type": "inline_equation", + "content": "^{1*}" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 189, + 111, + 265, + 124 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 189, + 111, + 265, + 124 + ], + "spans": [ + { + "bbox": [ + 189, + 111, + 265, + 124 + ], + "type": "text", + "content": "Yuchen Tian\\*" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 286, + 111, + 346, + 124 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 111, + 346, + 124 + ], + "spans": [ + { + "bbox": [ + 286, + 111, + 346, + 124 + ], + "type": "text", + "content": "Yunzhe Li3" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 370, + 111, + 433, + 124 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 370, + 111, + 433, + 124 + ], + "spans": [ + { + "bbox": [ + 370, + 111, + 433, + 124 + ], + "type": "text", + "content": "Qian Chen" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 449, + 111, + 511, + 125 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 449, + 111, + 511, + 125 + ], + "spans": [ + { + "bbox": [ + 449, + 111, + 511, + 125 + ], + "type": "text", + "content": "Wen Wang" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 86, + 137, + 506, + 194 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 137, + 506, + 194 + ], + "spans": [ + { + "bbox": [ + 86, + 137, + 506, + 194 + ], + "type": "text", + "content": "1University of California, Santa Barbara 2The University of Hong Kong 3University of Illinois at Urbana-Champaign 4Speech Lab, Alibaba Group weixiangyan@ucsb.edu yuchent@connect.hku.hk yunzhel2@illinois.edu {tanqing.cq,w.wang}@alibaba-inc.com" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "spans": [ + { + "bbox": [ + 155, + 212, + 202, + 224 + ], + "type": "text", + "content": "Abstract" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 86, + 253, + 274, + 730 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 86, + 253, + 274, + 730 + ], + "spans": [ + { + "bbox": [ + 86, + 253, + 274, + 730 + ], + "type": "text", + "content": "Recent code translation techniques exploit neural machine translation models to translate source code from one programming language to another to satisfy production compatibility or to improve efficiency of codebase maintenance. Most existing code translation datasets only focus on a single pair of popular programming languages. To advance research on code translation and meet diverse requirements of real-world applications, we construct CodeTransOcean, a large-scale comprehensive benchmark that supports the largest variety of programming languages for code translation. CodeTransOcean consists of three novel multilingual datasets, namely, MultilingualTrans supporting translations between multiple popular programming languages, NicheTrans for translating between niche programming languages and popular ones, and LLMTrans for evaluating executability of translated code by large language models (LLMs). CodeTransOcean also includes a novel cross-framework dataset, DLTrans, for translating deep learning code across different frameworks. We develop multilingual modeling approaches for code translation and demonstrate their great potential in improving the translation quality of both low-resource and high-resource language pairs and boosting the training efficiency. We also propose a novel evaluation metric Debugging Success Rate@K for program-level code translation. Last but not least, we evaluate LLM ChatGPT on our datasets and investigate its potential for fuzzy execution predictions. We build baselines for CodeTransOcean and analyze challenges of code translation for guiding future research. The CodeTransOcean datasets and code are publicly available at https://github.com/WeixiangYAN/CodeTransOcean." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 304, + 212, + 389, + 224 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 212, + 389, + 224 + ], + "spans": [ + { + "bbox": [ + 304, + 212, + 389, + 224 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 242, + 526, + 444 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 242, + 526, + 444 + ], + "spans": [ + { + "bbox": [ + 302, + 242, + 526, + 444 + ], + "type": "text", + "content": "Early software systems are developed using programming languages such as Fortran and COBOL, which have a significantly smaller user base compared to modern mainstream programming languages (e.g., Python and Java). Hence maintaining and modernizing early software systems are expensive (Opidi, 2020). Moreover, the readability and compatibility of the mixed multitude of programming languages are challenging when migrating existing software systems to new technology ecosystems or integrating software systems using different programming languages. The code translation task aims to convert source code from one programming language to another and is of great value in industry." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 449, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 449, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 449, + 526, + 772 + ], + "type": "text", + "content": "Code translation methods evolve from the inefficient, costly, and error-prone manual rewriting method to automatic methods. Automatic code translation methods can be categorized into compilers and transpilers, rule-based methods, and neural network based methods. Neural models (Feng et al., 2020; Wang et al., 2021, 2023b) have become dominant in code translation. Details of code translation methods are presented in Appendix A.1. The performance of neural models relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are limited by insufficient coverage of programming languages and mostly focusing on a single pair of popular programming languages, limited scale, and uneven data distribution. The widely used CodeTrans (Lu et al., 2021) is a small dataset containing only JavaC# parallel data for quite short code samples. Other datasets (Ahmad et al., 2023; Rozière et al., 2020; Zhu et al., 2022b; Nguyen et al., 2013; Chen et al., 2018) suffer from the same limitations. Consequently, existing code translation models (Feng et al., 2020; Wang et al., 2021; Ahmad et al., 2021) are confined to a narrow range of one-to-one code" + } + ] + } + ], + "index": 11 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 751, + 290, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 751, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 751, + 290, + 772 + ], + "type": "text", + "content": "*Equal contribution. Work is supported by Speech Lab, Alibaba Group." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5067" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "type": "footer", + "angle": 0, + "lines": [ + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "spans": [ + { + "bbox": [ + 129, + 795, + 464, + 818 + ], + "type": "text", + "content": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5067-5089 December 6-10, 2023 ©2023 Association for Computational Linguistics" + } + ] + } + ], + "index": 14 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 0 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 70, + 68, + 526, + 214 + ], + "blocks": [ + { + "bbox": [ + 70, + 68, + 526, + 214 + ], + "lines": [ + { + "bbox": [ + 70, + 68, + 526, + 214 + ], + "spans": [ + { + "bbox": [ + 70, + 68, + 526, + 214 + ], + "type": "table", + "html": "
CategoryLanguage/FrameworkDataset NameTrain/Dev/Test #SamplesAvg. #Tokens/SampleAvg. Length
MultilingualPython, C, C++, Visual Basic, Go, PHP, Java, C#MultilingualTrans19,115 / 3,759 / 7,545398 / 421 / 4911099 / 1135 / 1358
Swift, R, Rust, Fortran, Ada, Perl, COBOL, Lua, ...NicheTrans165,457 / 23,509 / 47,502292 / 375 / 505785 / 995 / 1372
Python, C, C++, Visual Basic, Go, PHP, Java, C#LLMTrans-/-/350-/-/270-/-/745
Cross-FrameworkPyTorch, TensorFlow, MXNet, PaddleDLTrans282 / 36 / 90625 / 1102 / 8751318 / 2441 / 1841
", + "image_path": "398bb1d135aaa49d2e09e6f0578a7e68bfad556cff83ed7d65042eeea2d8fe8f.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 221, + 525, + 258 + ], + "lines": [ + { + "bbox": [ + 67, + 221, + 525, + 258 + ], + "spans": [ + { + "bbox": [ + 67, + 221, + 525, + 258 + ], + "type": "text", + "content": "Table 1: Summary of our CodeTransOcean. We report #Samples, Avg. #Tokens Sample and Avg. Length for Train/Dev/Test sets of each dataset. Note that LLMTrans is only for testing. #Samples are on the program-level. #Tokens are based on RoBERTa tokenizer (Liu et al., 2019). Length is the number of characters." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 66, + 279, + 290, + 413 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 66, + 279, + 290, + 413 + ], + "spans": [ + { + "bbox": [ + 66, + 279, + 290, + 413 + ], + "type": "text", + "content": "translation scenarios. Moreover, deep learning has been broadly used and achieved unprecedented success. However, there are barriers between different deep learning frameworks during the actual production process. Existing code translation datasets also neglect important demands from real-world applications, including modernizing early software systems developed in niche programming languages and migrating code across different deep learning frameworks." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 66, + 416, + 291, + 728 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 66, + 416, + 291, + 728 + ], + "spans": [ + { + "bbox": [ + 66, + 416, + 291, + 728 + ], + "type": "text", + "content": "To address these limitations and advance neural code translation models, we construct a large-scale comprehensive multilingual code translation benchmark CodeTransOcean, summarized in Table 1. CodeTransOcean is an innovative benchmark that aims to provide a unified platform for evaluating various models on a comprehensive set of code translation tasks that reflect real-world demands. Based on this goal, each dataset in CodeTransOcean is specifically designed to tackle a key challenge in the field of code translation. CodeTransOcean includes three multilingual datasets, namely, the MultilingualTrans dataset (including eight popular programming languages), the NicheTrans dataset (translating between thirty-seven niche programming languages and the eight popular ones" + }, + { + "bbox": [ + 66, + 416, + 291, + 728 + ], + "type": "inline_equation", + "content": "^{1}" + }, + { + "bbox": [ + 66, + 416, + 291, + 728 + ], + "type": "text", + "content": "), and a specialized dataset LLMTrans (including 350 data samples and their executed results) to evaluate executability of code translated by large language models (LLMs), and a cross-framework dataset DLTrans facilitating our proposed task for translating code between deep learning frameworks to enhance code reusability." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 302, + 279, + 525, + 306 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 279, + 525, + 306 + ], + "spans": [ + { + "bbox": [ + 302, + 279, + 525, + 306 + ], + "type": "text", + "content": "DLTrans includes 408 samples covering four mainstream deep learning frameworks." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 309, + 526, + 459 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 309, + 526, + 459 + ], + "spans": [ + { + "bbox": [ + 302, + 309, + 526, + 459 + ], + "type": "text", + "content": "Multilingual modeling shows great potential in neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023), but it has not been systematically explored for code translation. We investigate multilingual modeling for code translation using our MultilingualTrans, NicheTrans, and DLTrans datasets. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves the model training efficiency." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 462, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 462, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 462, + 526, + 772 + ], + "type": "text", + "content": "Recent research indicates that the proficiency of the LLM ChatGPT in natural language translation is on par with commercial-grade translation systems (Jiao et al., 2023). To the best of our knowledge, our work is the first to systematically investigate the potential of ChatGPT in code translation. We develop a fully automated translation-execution-evaluation pipeline AutoTransExecutor to support this study. Note that match-based metrics and execution-based metrics have been used for evaluating code translation methods, with details in Appendix A.1. In order to accurately evaluate the usability of translated code from ChatGPT, we propose a novel execution-based evaluation metric Debugging Success Rate @K (DSR@K), which is the percentage of samples with translation results that successfully execute and produce the expected functionality after " + }, + { + "bbox": [ + 302, + 462, + 526, + 772 + ], + "type": "inline_equation", + "content": "K" + }, + { + "bbox": [ + 302, + 462, + 526, + 772 + ], + "type": "text", + "content": " debugging rounds. On our LLMTrans dataset, the baseline ChatGPT setting achieves " + }, + { + "bbox": [ + 302, + 462, + 526, + 772 + ], + "type": "inline_equation", + "content": "48.57\\%" + }, + { + "bbox": [ + 302, + 462, + 526, + 772 + ], + "type": "text", + "content": " DSR@0. We find that self-debugging and one-shot improve the performance while chain-of-thought strategies degrade the translation accuracy. Since our AutoTransEx" + } + ] + } + ], + "index": 6 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 740, + 290, + 773 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 740, + 290, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 740, + 290, + 773 + ], + "type": "text", + "content": "1We define popular and niche programming languages based on the TIOBE Programming Community Index, which is a metric of the popularity of programming languages." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5068" + } + ] + } + ], + "index": 8 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 1 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 291, + 178 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 291, + 178 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 291, + 178 + ], + "type": "text", + "content": "ecuter still cannot cover arbitrary programming languages, we also propose a novel metric fuzzy execution, attempting to address the limitations of existing evaluation metrics for code translation. Our preliminary study using ChatGPT shows that ChatGPT is still inadequate to predict fuzzy execution for any arbitrary programming language, which demands future research." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 78, + 179, + 291, + 191 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 78, + 179, + 291, + 191 + ], + "spans": [ + { + "bbox": [ + 78, + 179, + 291, + 191 + ], + "type": "text", + "content": "Our contributions can be summarized as follows:" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 68, + 201, + 292, + 565 + ], + "type": "list", + "angle": 0, + "index": 6, + "blocks": [ + { + "bbox": [ + 68, + 201, + 292, + 322 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 201, + 292, + 322 + ], + "spans": [ + { + "bbox": [ + 68, + 201, + 292, + 322 + ], + "type": "text", + "content": "- A large-scale multilingual code translation benchmark: CodeTransOcean covers the largest number of popular and niche programming languages so far with the largest scale. It also includes an unprecedented dataset for translating code across different deep learning frameworks and a dataset and an automated pipeline for evaluating LLMs on code translation. We establish baselines for all datasets in CodeTransOcean." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 68, + 323, + 292, + 431 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 323, + 292, + 431 + ], + "spans": [ + { + "bbox": [ + 68, + 323, + 292, + 431 + ], + "type": "text", + "content": "- Multilingual modeling for code translation: We are the first to systematically evaluate multilingual modeling on code translation for both high-resource and low-resource language pairs. Experimental results demonstrate that multilingual modeling significantly improves translation quality for both high-resource and low-resource language pairs and improves training efficiency." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 68, + 431, + 291, + 498 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 431, + 291, + 498 + ], + "spans": [ + { + "bbox": [ + 68, + 431, + 291, + 498 + ], + "type": "text", + "content": "- ChatGPT on code translation: We conduct the first comprehensive study of the potential of ChatGPT on code translation, investigating efficacy of prompting strategies, hyperparameters, self-debugging, One-shot, and Chain-of-Thought." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 499, + 291, + 565 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 499, + 291, + 565 + ], + "spans": [ + { + "bbox": [ + 68, + 499, + 291, + 565 + ], + "type": "text", + "content": "- New evaluation metrics: We propose " + }, + { + "bbox": [ + 68, + 499, + 291, + 565 + ], + "type": "inline_equation", + "content": "DSR@K" + }, + { + "bbox": [ + 68, + 499, + 291, + 565 + ], + "type": "text", + "content": " to evaluate translation and debugging capabilities of LLMs. We also propose a fuzzy execution metric based on LLMs and conduct a preliminary study using ChatGPT on this metric." + } + ] + } + ], + "index": 5 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 67, + 576, + 161, + 588 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 576, + 161, + 588 + ], + "spans": [ + { + "bbox": [ + 67, + 576, + 161, + 588 + ], + "type": "text", + "content": "2 Related Work" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 597, + 292, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 597, + 292, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 597, + 292, + 772 + ], + "type": "text", + "content": "Code Translation Datasets The success of neural models for code translation relies heavily on large-scale high-quality parallel data. However, existing code translation datasets are plagued by issues such as insufficient coverage of programming languages, limited scale, and imbalanced data distribution. The widely used code translation dataset CodeTrans (Lu et al., 2021) in the CodeXGLUE benchmark consists of Java-C# function pairs. The small parallel corpus AVATAR (Ahmad et al., 2023) is constructed for Java-Python code translation. Nguyen et al. (2013) construct a Java-C# dataset to explore statistical machine" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "spans": [ + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "text", + "content": "translation on code translation tasks" + }, + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "inline_equation", + "content": "^2" + }, + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "text", + "content": ". Chen et al. (2018) explore this dataset from Nguyen et al. and also construct a CoffeeScript-JavaScript parallel dataset for investigating tree-to-tree neural models for code translation. Rozière et al. (2020) create a dataset containing 852 programs to evaluate unsupervised methods. Recently, Zhu et al. (2022b) construct a new translation dataset CoST from the GeeksForGeeks website" + }, + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "inline_equation", + "content": "^3" + }, + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "text", + "content": ". Subsequently, they release the translation dataset XLCoST (Zhu et al., 2022a), which expands the CoST dataset by 7.3 times. However, the limited language coverage of these datasets and their imbalanced data distribution hinder their practical applications. Rozière et al. (2022) construct the TransCoder-ST dataset to perform unsupervised code translation using automated unit tests. Details of these datasets are summarized in Table 2. Rithy et al. (2022) proposes a code translation dataset XTest containing nine programming languages with unit tests, but it is not open-sourced" + }, + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "inline_equation", + "content": "^4" + }, + { + "bbox": [ + 301, + 71, + 527, + 518 + ], + "type": "text", + "content": ". Although CodeNet (Puri et al., 2021) comprises many problem statements and provides corresponding solutions, experts have proven that about half of the CodeNet dataset has incorrect solutions (Zhu et al., 2022b), making it unsuitable for code translation tasks. With the limitations of existing code translation datasets, neural models trained on them may encounter overfitting, underfitting, and poor generalizability. Clearly, these issues impede the development of neural models for code translation. Therefore, constructing datasets that effectively address these problems is critical to enhance performance of code translation algorithms." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 526, + 527, + 566 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 526, + 527, + 566 + ], + "spans": [ + { + "bbox": [ + 302, + 526, + 527, + 566 + ], + "type": "text", + "content": "Code Translation Methods and Evaluation Metrics Details of code translation methods and evaluation metrics are presented in Appendix A.1." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 576, + 499, + 588 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 576, + 499, + 588 + ], + "spans": [ + { + "bbox": [ + 302, + 576, + 499, + 588 + ], + "type": "text", + "content": "3 The CodeTransOcean Benchmark" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 301, + 597, + 526, + 692 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 597, + 526, + 692 + ], + "spans": [ + { + "bbox": [ + 301, + 597, + 526, + 692 + ], + "type": "text", + "content": "In this section, we provide detailed descriptions and analyses of our CodeTransOcean benchmark, including the code translation tasks, their associated datasets, and dataset statistics. Details of data collection methods and licensing information as well as quality control and quality assessment are presented in Appendix A.2. Note that the vast" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 302, + 699, + 525, + 729 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 699, + 525, + 729 + ], + "spans": [ + { + "bbox": [ + 302, + 699, + 525, + 729 + ], + "type": "text", + "content": "It was not possible to count specific information about this dataset because it was not released to the public and we were unable to obtain response from the authors." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 302, + 729, + 524, + 761 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 729, + 524, + 761 + ], + "spans": [ + { + "bbox": [ + 302, + 729, + 524, + 761 + ], + "type": "text", + "content": "3In Table 2, we report the program-level counts for the CoST dataset to facilitate a fair comparison with our own program-level datasets." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 316, + 761, + 524, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 316, + 761, + 524, + 772 + ], + "spans": [ + { + "bbox": [ + 316, + 761, + 524, + 772 + ], + "type": "text", + "content": "4We tried to contact the authors but there was no response." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5069" + } + ] + } + ], + "index": 17 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 71, + 68, + 526, + 193 + ], + "blocks": [ + { + "bbox": [ + 71, + 68, + 526, + 193 + ], + "lines": [ + { + "bbox": [ + 71, + 68, + 526, + 193 + ], + "spans": [ + { + "bbox": [ + 71, + 68, + 526, + 193 + ], + "type": "table", + "html": "
Dataset SourceProgramming Languages#SamplesAvg. #Tokens/SampleAvg. Length
CodeTrans (Lu et al., 2021)Java, C#11,80059 / 63 / 58205 / 218 / 202
Avatar (Ahmad et al., 2023)Java, Python9,517239 / 235 / 234691 / 687 / 688
Nguyen et al.(Nguyen et al., 2013)Java, C#16,966--
Lachaux et al.(Rozière et al., 2020)C++, Java, Python852- / 119 / 120- / 313 / 311
CoST (Zhu et al., 2022b)C++, Java, Python, C#, Javascript, PHP, C16,738272 / 180 / 199770 / 458 / 511
TransCoder-ST (Rozière et al., 2022)Java, C++, Python437,030--
XLCoST (Zhu et al., 2022a)C++, Java, Python, C#, Javascript, PHP, C122,151234 / 232 / 222644 / 634 / 606
", + "image_path": "0000d049d6b66d6351311be18b210c24a3bfbf37b429937ccbf1f309c3c8d954.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 200, + 525, + 250 + ], + "lines": [ + { + "bbox": [ + 67, + 200, + 525, + 250 + ], + "spans": [ + { + "bbox": [ + 67, + 200, + 525, + 250 + ], + "type": "text", + "content": "Table 2: Summary of existing code translation datasets. For #Samples, we report program-level counts for Avatar, CoST, and XLCoST. Given that the original samples from other datasets are not organized at the program-level, we report counts at the snippet-level for these datasets. Avg. #Tokens/Sample and Avg. Length are counted in the same way as Table 1." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 66, + 270, + 291, + 446 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 66, + 270, + 291, + 446 + ], + "spans": [ + { + "bbox": [ + 66, + 270, + 291, + 446 + ], + "type": "text", + "content": "majority of the samples in CodeTransOcean provides explicit input and output, which is equivalent to unit tests. Overall, CodeTransOcean consists of 270,507 samples (over 200K unit tests), covering 45 programming languages for multilingual code translation and 4 deep learning frameworks for cross-framework code translation5. Note that all samples in all CodeTransOcean datasets are constructed at the program-level. We ensure a balanced distribution of each language/framework when constructing the datasets (Appendix A.2). There is no overlap between CodeTransOcean datasets and existing code translation datasets." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 458, + 239, + 471 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 458, + 239, + 471 + ], + "spans": [ + { + "bbox": [ + 67, + 458, + 239, + 471 + ], + "type": "text", + "content": "3.1 Multilingual Code Translation" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 477, + 291, + 599 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 477, + 291, + 599 + ], + "spans": [ + { + "bbox": [ + 67, + 477, + 291, + 599 + ], + "type": "text", + "content": "With the increasing need to unify the language variety when implementing system integration or extensions with multilingual programming environments, we construct the MultilingualTrans dataset for multiple popular programming languages6. Among programming languages in the rankings, we select the Top-10 languages as popular ones except JavaScript and SQL7 and construct the MultilingualTrans dataset based on the 8 pro" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 270, + 526, + 406 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 270, + 526, + 406 + ], + "spans": [ + { + "bbox": [ + 302, + 270, + 526, + 406 + ], + "type": "text", + "content": "gramming languages. We treat the other languages in the rankings as niche languages and construct the NicheTrans dataset for translating between niche languages and popular languages. Additionally, in order to quantitatively evaluate the execution capabilities of the code generated by LLMs (e.g., ChatGPT, PaLM2 (Anil et al., 2023)), we construct LLMTrans, which includes the execution results for a subset of MultilingualTrans and facilitates evaluating LLMs for multilingual code translation." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 413, + 526, + 630 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 413, + 526, + 630 + ], + "spans": [ + { + "bbox": [ + 302, + 413, + 526, + 630 + ], + "type": "text", + "content": "MultilingualTrans Dataset This dataset contains 30,419 program samples covering eight popular programming languages, namely, C, C++, C#, Java, Python, Go, PHP, and Visual Basic. Table 11 shows the statistics of each language pair. Note that XLCoST (Zhu et al., 2022a) is the only existing multilingual code translation dataset. Compared to XLCoST, MultilingualTrans is advantageous in more balanced data distribution across various programming languages, practicality of language pairs, and data quality. For example, the real-world requirement for translating Java into JavaScript as in XLCoST is quite limited. As to data quality, our MultilingualTrans originates from a programming chrestomathy website, with all data already reviewed and verified by the website." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 638, + 527, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 638, + 527, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 638, + 527, + 772 + ], + "type": "text", + "content": "NicheTrans Dataset The NicheTrans dataset contains 236,468 program samples, covering code translation pairs from thirty-seven niche programming languages, including Ada, COBOL, Pascal, Perl, Erlang, Fortran, Scala, Julia and others, to the eight popular ones. Table 12 shows statistics of each niche language. Although many studies have highlighted the practical necessity of code translation for modernizing niche programming languages (Chen et al., 2018; Zhu et al., 2022b; Rozière et al.," + } + ] + } + ], + "index": 7 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 609, + 290, + 681 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 609, + 290, + 681 + ], + "spans": [ + { + "bbox": [ + 67, + 609, + 290, + 681 + ], + "type": "inline_equation", + "content": "^{5}" + }, + { + "bbox": [ + 67, + 609, + 290, + 681 + ], + "type": "text", + "content": "Code Translation also extends to conversions between different versions of the same language, e.g., Python 2 to Python 3. However, according to our survey, these translation tasks are quite straightforward. Naive Copy methods, specific translation tools, and tutorials (e.g., Python 2 to 3 Conversion Guide) already achieve high translation accuracy. As a result, we no longer include these types of tasks in our benchmark." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 681, + 289, + 721 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 681, + 289, + 721 + ], + "spans": [ + { + "bbox": [ + 67, + 681, + 289, + 721 + ], + "type": "text", + "content": "6We categorize languages as popular or niche based on the TIOBE Index Programming Language Rankings released in April 2023 https://www.tiobe.com/tiobe-index/." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 721, + 289, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 721, + 289, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 721, + 289, + 772 + ], + "type": "text", + "content": "7It is important to note that JavaScript and SQL, both within the top 10, are mainly used for front-end programming and database management respectively, signifying considerable differences in their usage scenarios compared to the other 8 languages." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "text", + "content": "5070" + } + ] + } + ], + "index": 12 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 290, + 152 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 290, + 152 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 290, + 152 + ], + "type": "text", + "content": "2020), our NicheTrans dataset is the first dataset for code translation between these niche languages and popular ones. We believe this dataset will not only facilitate modernization of outdated programming languages more effectively, but also augment and evaluate generalizability of neural models." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 158, + 291, + 361 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 158, + 291, + 361 + ], + "spans": [ + { + "bbox": [ + 67, + 158, + 291, + 361 + ], + "type": "text", + "content": "LLMTrans Dataset The LLMTrans dataset aims to provide a benchmark for evaluating the performance of LLMs on code translation. The dataset translates seven popular programming languages to Python, totaling 350 program samples. We compile and test these samples and record the execution results. Based on this dataset, we design and implement an automated pipeline, AutoTransExecutor" + }, + { + "bbox": [ + 67, + 158, + 291, + 361 + ], + "type": "inline_equation", + "content": "^{8}" + }, + { + "bbox": [ + 67, + 158, + 291, + 361 + ], + "type": "text", + "content": ", automatically using LLMs to conduct code translation, execution, debugging, and calculating the success rate. This dataset and the automated pipeline ease investigation of the actual debugging success rate of LLMs on code translation and effectively measure the practical usability of LLMs. Details of the LLMTrans dataset are in Table 1." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 371, + 261, + 383 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 371, + 261, + 383 + ], + "spans": [ + { + "bbox": [ + 67, + 371, + 261, + 383 + ], + "type": "text", + "content": "3.2 Cross-framework Code Translation" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 388, + 290, + 713 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 388, + 290, + 713 + ], + "spans": [ + { + "bbox": [ + 67, + 388, + 290, + 713 + ], + "type": "text", + "content": "Cross-Deep-Learning-Framework Translation Task The widespread applications of deep learning (DL) has spawned emergence of various DL frameworks, such as PyTorch, TensorFlow, MXNet, and Paddle. However, there are significant differences in syntax and dependency libraries between different frameworks, severely impeding reusability of projects9. Moreover, studies illustrate significant disparities in energy consumption and economic costs during training and inference between various frameworks (Georgiou et al., 2022). Selecting an appropriate DL framework for green AI has become paramount in an era of large models (Ananthaswamy, 2023). Code reusability and energy-economic efficiency in DL have emerged as critical considerations for both research and practical engineering implementation. Converting code between different DL frameworks is challenging, mainly due to differences between frameworks, code complexity, structural inconsistencies, and cross-platform compatibility (more details are in Appendix A.3). Existing cross-DL-framework adaptive technologies such as the ONNX10 model conversion protocol require both parties to import" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 302, + 71, + 526, + 262 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 71, + 526, + 262 + ], + "spans": [ + { + "bbox": [ + 302, + 71, + 526, + 262 + ], + "type": "text", + "content": "and export based on agreed data formats or to convert only the final model through the computation graphs. These technologies have obvious limitations. In contrast, we propose a Cross-DL-framework Translation task for code migration between different DL frameworks through code translation (Appendix A.4). Compared to existing cross-framework adaptive technologies, Cross-DL-framework Translation achieves re-implementation under multiple DL frameworks through an automated process, which not only generates highly readable code and enables secondary development, but also provides developers with flexibility on combining advantages of multiple frameworks." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 301, + 271, + 526, + 501 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 271, + 526, + 501 + ], + "spans": [ + { + "bbox": [ + 301, + 271, + 526, + 501 + ], + "type": "text", + "content": "DLTrans Dataset We construct the DLTrans dataset for Cross-DL-framework Translation, including four deep learning frameworks and spanning twelve directions. To the best of our knowledge, our work is the first to define the cross-DL-framework translation task and construct a corresponding dataset. We create two subsets of different granularities based on the collected code, namely, coarse-grained at the program level and fine-grained at the function or class level. Each code pair comprises code that shares the same functionality but is written in different popular DL frameworks, including PyTorch, TensorFlow, MXNet, and Paddle. The coarse-grained and fine-grained datasets have 408 and 3,270 samples, respectively. In this work, we only experiment on the coarse-grained subset." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 515, + 389, + 528 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 515, + 389, + 528 + ], + "spans": [ + { + "bbox": [ + 302, + 515, + 389, + 528 + ], + "type": "text", + "content": "4 Experiments" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 539, + 525, + 619 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 539, + 525, + 619 + ], + "spans": [ + { + "bbox": [ + 302, + 539, + 525, + 619 + ], + "type": "text", + "content": "We present experiments of multilingual training for code translation (Section 4.1). We then introduce a novel evaluation metric Debugging Success Rate@K for program-level code translation (Section 4.2) and the first comprehensive exploration of ChatGPT for code translation (Section 4.3)." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 632, + 436, + 645 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 632, + 436, + 645 + ], + "spans": [ + { + "bbox": [ + 302, + 632, + 436, + 645 + ], + "type": "text", + "content": "4.1 Multilingual Modeling" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 651, + 526, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 651, + 526, + 773 + ], + "spans": [ + { + "bbox": [ + 302, + 651, + 526, + 773 + ], + "type": "text", + "content": "Multilingual modeling has been pivotal in broadening the applicability of neural machine translation (Aharoni et al., 2019; Wang et al., 2020; Zhu et al., 2023; Johnson et al., 2017). This is primarily evidenced in enhancing the performance of low-resource languages and cross-language transfer learning (Mohammadshahi et al., 2022; Zoph et al., 2016; Nguyen and Chiang, 2017; Johnson et al., 2017). CodeTransOcean covers nearly fifty" + } + ] + } + ], + "index": 9 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "type": "inline_equation", + "content": "^{8}" + }, + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "type": "text", + "content": "AutoTransExecutor only supports translation from any source language to Python. We discuss it in Limitations. \n" + }, + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "type": "inline_equation", + "content": "^{9}" + }, + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "type": "text", + "content": "https://www.assemblyai.com/blog/pytorch-vs-tensorflow-in-2023/ \n" + }, + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "type": "inline_equation", + "content": "^{10}" + }, + { + "bbox": [ + 67, + 718, + 290, + 772 + ], + "type": "text", + "content": "https://onnx.ai/" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 308, + 791 + ], + "type": "text", + "content": "5071" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 136, + 68, + 456, + 121 + ], + "blocks": [ + { + "bbox": [ + 136, + 68, + 456, + 121 + ], + "lines": [ + { + "bbox": [ + 136, + 68, + 456, + 121 + ], + "spans": [ + { + "bbox": [ + 136, + 68, + 456, + 121 + ], + "type": "table", + "html": "
AverageOne-to-One (baseline)Many-to-OneMany-to-ManyOne-to-Many
High-resource4.685.56 (↑ 0.88)5.94 (↑ 1.26)6.18 (↑ 1.50)
Low-resource4.834.85 (↑ 0.02)4.95 (↑ 0.12)5.84 (↑ 1.01)
All5.195.31 (↑ 0.12)5.81 (↑ 0.62)6.42 (↑ 1.23)
", + "image_path": "22b0cdbc94b4527d6aa88b060bf77e375850d3c2d3133e89bd374ce1de4cc19d.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 129, + 526, + 155 + ], + "lines": [ + { + "bbox": [ + 67, + 129, + 526, + 155 + ], + "spans": [ + { + "bbox": [ + 67, + 129, + 526, + 155 + ], + "type": "text", + "content": "Table 3: Average BLEU scores of the four multilingual modeling strategies, One-to-One, Many-to-One, Many-to-Many, and One-to-Many, for All language pairs, High-resource language pairs, and Low-resource language pairs." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 175, + 291, + 216 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 175, + 291, + 216 + ], + "spans": [ + { + "bbox": [ + 67, + 175, + 291, + 216 + ], + "type": "text", + "content": "programming languages and deep learning frameworks. We use its datasets to explore multilingual modeling on code translation tasks." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 224, + 291, + 493 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 224, + 291, + 493 + ], + "spans": [ + { + "bbox": [ + 69, + 224, + 291, + 493 + ], + "type": "text", + "content": "Experimental Setups In this work, we use pretrained CodeT5+ (Wang et al., 2023b)" + }, + { + "bbox": [ + 69, + 224, + 291, + 493 + ], + "type": "inline_equation", + "content": "^{11}" + }, + { + "bbox": [ + 69, + 224, + 291, + 493 + ], + "type": "text", + "content": " as the backbone based on its superior performance on code understanding and generation evaluations reported in (Wang et al., 2023b). We use the MultilingualTrans dataset to investigate four multilingual modeling strategies based on data sharing in the source or target language or both, namely, One-to-One, One-to-Many, Many-to-One, and Many-to-Many, with One-to-One as the baseline. Details of the four strategies are in Appendix A.5. To understand the strengths and weaknesses of the four strategies, we compare their average performance on all language pairs and focus on low-resource and high-resource pairs. Since the CodeBLEU metric (Ren et al., 2020) does not cover all eight languages in MultilingualTrans, we use BLEU to measure translation accuracy for the four strategies. Then, we establish baselines for the DLTrans and NicheTrans datasets." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 495, + 291, + 617 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 495, + 291, + 617 + ], + "spans": [ + { + "bbox": [ + 67, + 495, + 291, + 617 + ], + "type": "text", + "content": "We rank the resource richness of the eight programming languages in MultilingualTrans in descending order based on their amounts in the CodeT5+ pre-training data, as Java, PHP, C, C#, Python, C++, and Go (Visual Basic is not covered by the CodeT5+ pre-training data). Based on this ranking, we consider Visual Basic, C++, and Go as low-resource languages and Java, PHP and C as high-resource languages." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "spans": [ + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "text", + "content": "Results and Analysis Detailed experimental results are shown in Table 14 in Appendix. For All language pairs, the performance of the four strategies is ranked as One-to-Many " + }, + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "inline_equation", + "content": ">" + }, + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "text", + "content": " Many-to-Many " + }, + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "inline_equation", + "content": ">" + }, + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "text", + "content": " Many-to-One " + }, + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "inline_equation", + "content": ">" + }, + { + "bbox": [ + 67, + 624, + 291, + 734 + ], + "type": "text", + "content": " One-to-One. (1) Under One-to-Many strategy, the model encoder can provide more comprehensive information for source language translation due to its ability to absorb more source" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 302, + 175, + 526, + 513 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 175, + 526, + 513 + ], + "spans": [ + { + "bbox": [ + 302, + 175, + 526, + 513 + ], + "type": "text", + "content": "language features, thereby improving generalizability of the model. (2) Many-to-Many can be considered as expanding the One-to-Many strategy by employing a greater volume of non-source language data for training. Since the encoder must be attuned to the features of various languages simultaneously under Many-to-Many, parameter sharing may potentially undermine the performance. (3) Many-to-One helps the model to learn from a broader range of data than the baseline. Specific patterns or expressions in diverse source languages assist the model in more precisely comprehending how to translate into the target language. The shared semantic representations across different source languages allow the model to implement effective transfer learning strategies. Furthermore, increase in training samples enables the model to optimize the loss function more stably. These results are consistent with previous findings on multilingual modeling for natural language translation (Aharoni et al., 2019): Many-to-Many models, trained across multiple target languages instead of just one target language, can function effectively as a regularization strategy for Many-to-One, thereby reducing the possibility of over-matching." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 515, + 527, + 677 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 515, + 527, + 677 + ], + "spans": [ + { + "bbox": [ + 302, + 515, + 527, + 677 + ], + "type": "text", + "content": "For High-resource and Low-resource languages, as shown in Table 3, the ranking of the four strategies is the same as for All, but there is notable difference in their adaptability across languages of varying resource scales. High-resource languages can take advantage more effectively from the shared information across multiple source languages; whereas, low-resource languages are relatively less equipped to handle the additional uncertainty and noise introduced by shared parameters, and thus often have to rely on a larger volume of source language data to optimize their benefits." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 678, + 527, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 678, + 527, + 773 + ], + "spans": [ + { + "bbox": [ + 302, + 678, + 527, + 773 + ], + "type": "text", + "content": "Results from the Many-to-Many strategy on DL-Trans and NicheTrans datasets are shown in Tables 4 and 5. The experimental results suggest that significant improvements in translation accuracy can be achieved by swapping the source and target languages in the training set to facilitate data augmentation and training a bidirectional model." + } + ] + } + ], + "index": 8 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 740, + 291, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 740, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 740, + 291, + 772 + ], + "type": "text", + "content": "11We will conduct evaluations of a broader selection of models on our datasets in future work, including LLaMA (Touvron et al., 2023), WizardCoder (Luo et al., 2023), etc." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "text", + "content": "5072" + } + ] + } + ], + "index": 10 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 69, + 69, + 526, + 154 + ], + "blocks": [ + { + "bbox": [ + 69, + 69, + 526, + 154 + ], + "lines": [ + { + "bbox": [ + 69, + 69, + 526, + 154 + ], + "spans": [ + { + "bbox": [ + 69, + 69, + 526, + 154 + ], + "type": "table", + "html": "
MethodMetricPyTorchTensorFlowMXNetPaddle
EMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEUEMBLEUCodeBLEU
NaivePyTorch---27.2766.2569.4628.1872.7776.6330.9180.3583.13
TensorFlow27.2766.3268.92---29.0963.7967.9427.2763.0465.81
MXNet28.1872.8674.1529.0963.8466.06---28.1869.4971.09
Paddle30.9180.2584.8327.2762.9467.7828.1869.4375.09---
CodeT5+PyTorch---35.45±0.9171.16±0.7370.54±0.7542.73±2.4181.76±0.4582.52±0.5643.64±1.5885.76±0.6085.07±0.74
TensorFlow34.85±1.3871.97±0.5671.08±0.72---36.67±1.8972.77±0.6173.04±0.1829.70±2.6369.38±0.3868.76±0.32
MXNet32.12±2.2977.79±0.1376.43±0.1431.82±1.5867.22±0.3967.68±0.27---29.09±0.9174.26±0.4673.27±0.42
Paddle43.03±4.1086.25±0.8686.09±0.8829.39±2.9369.43±0.5769.57±0.5135.75±0.5378.65±0.6279.46±0.38---
", + "image_path": "5a5c925ac7cf9c581b879bc1de16263cf7b0bd79c7070ee13083410b244afaf7.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 87, + 203, + 271, + 324 + ], + "blocks": [ + { + "bbox": [ + 67, + 160, + 525, + 186 + ], + "lines": [ + { + "bbox": [ + 67, + 160, + 525, + 186 + ], + "spans": [ + { + "bbox": [ + 67, + 160, + 525, + 186 + ], + "type": "text", + "content": "Table 4: Results on DLTrans of Naive and CodeT5+_220M with Many-to-Many strategy. We run each experiment with 3 random seeds and report the mean and standard deviation of EM, BLEU, and CodeBLEU scores." + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 87, + 203, + 271, + 324 + ], + "lines": [ + { + "bbox": [ + 87, + 203, + 271, + 324 + ], + "spans": [ + { + "bbox": [ + 87, + 203, + 271, + 324 + ], + "type": "table", + "html": "
BLEUNaiveTwo-wayOne-way
Many-to-C2.364.604.86
Many-to-C#2.534.483.82
Many-to-C++1.994.783.32
Many-to-Go3.115.243.19
Many-to-Java3.185.235.34
Many-to-PHP4.372.461.98
Many-to-Python2.872.381.67
Many-to-VB1.692.171.97
Average2.763.923.27
", + "image_path": "b5184ffc51f6f38a6b0e744edd995df25c5860875dbc5d6837cfe9a6a692608e.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 331, + 291, + 381 + ], + "lines": [ + { + "bbox": [ + 67, + 331, + 291, + 381 + ], + "spans": [ + { + "bbox": [ + 67, + 331, + 291, + 381 + ], + "type": "text", + "content": "Table 5: BLEU scores on NicheTrans of Naive and CodeT5+_220M with Many-to-Many strategy. One-way denotes training models only from niche to popular, while Two-way denotes training in both directions." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 403, + 291, + 539 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 403, + 291, + 539 + ], + "spans": [ + { + "bbox": [ + 67, + 403, + 291, + 539 + ], + "type": "text", + "content": "Notably, prior studies on multilingual neural machine translation often overlook the comparison between One-to-Many and other strategies. Nevertheless, One-to-Many demonstrates superiority over the One-to-One baseline across all our experiments. Overall, our results strongly recommend a targeted multilingual modeling strategy for code translation, as it not only can translate multiple language pairs with a single model, but also achieves better and more stable accuracy than baselines." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 550, + 227, + 565 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 550, + 227, + 565 + ], + "spans": [ + { + "bbox": [ + 67, + 550, + 227, + 565 + ], + "type": "text", + "content": "4.2 Debugging Success Rate@K" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 570, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 570, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 570, + 291, + 773 + ], + "type": "text", + "content": "For evaluations, we adopt existing code translation evaluation metrics in our experiments, including Exact Match (EM), BLEU, and CodeBLEU (details are in Appendix A.1.2). However, all these metrics are based on surface-form matching (or with some adaptations as for CodeBLEU) and are not suitable for our program-level translation tasks since they cannot reliably evaluate functional correctness of translated code. Moreover, in real-world software development scenarios, developers typically ensure the functionality of code by testing and debugging upon completion, rather than writing and testing multiple versions of the code to achieve the expected functionality as measured by the existing pass@k (Kulal et al., 2019) metric." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 206, + 526, + 367 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 206, + 526, + 367 + ], + "spans": [ + { + "bbox": [ + 302, + 206, + 526, + 367 + ], + "type": "text", + "content": "Meanwhile, recent research shows that LLMs such as ChatGPT demonstrate preliminary code debugging capabilities (Chen et al., 2023b,a). Hence, we propose a novel and robust evaluation metric for LLM on code translation, Debugging Success Rate@K (DSR@K), by measuring whether the translated code can be compiled and executed with the same behavior as the input source code, with K rounds of debugging. To the best of our knowledge, " + }, + { + "bbox": [ + 302, + 206, + 526, + 367 + ], + "type": "inline_equation", + "content": "DSR@K" + }, + { + "bbox": [ + 302, + 206, + 526, + 367 + ], + "type": "text", + "content": " is the first metric designed to accurately reflect real-world software development scenarios." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "spans": [ + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "DSR@K" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": " is the percentage of the samples that successfully execute and produce the expected results among all samples. Each sample is given " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "K" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": " generation and debugging attempts by an LLM. If the generated code successfully executes and produces the expected results with these " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "K" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": " rounds, the sample is marked as successful. " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "DSR@K" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": " is computed as " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "\\frac{1}{N}\\sum_{i=1}^{N}S(i,K)" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": ", where " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "N" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": " denotes the total number of samples. If the " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "i^{th}" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": " code sample succeeds within " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "K" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": " attempts, then " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "S(i,K) = 1" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": "; otherwise, " + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "inline_equation", + "content": "S(i,K) = 0" + }, + { + "bbox": [ + 302, + 369, + 526, + 586 + ], + "type": "text", + "content": ". Note that DSR@0 can be used for program-level code translation evaluation for any models. In this work, we employ DSR@K to evaluate the ability of LLMs such as ChatGPT for debugging code and translating code with debugging results." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 593, + 477, + 606 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 593, + 477, + 606 + ], + "spans": [ + { + "bbox": [ + 302, + 593, + 477, + 606 + ], + "type": "text", + "content": "4.3 ChatGPT for Code Translation" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 611, + 526, + 772 + ], + "type": "text", + "content": "The recent LLM ChatGPT demonstrates competitive performance on language generation tasks such as summarization and machine translation (Yang et al., 2023; Peng et al., 2023; Gao et al., 2023). However, ChatGPT for code translation has not been systematically explored. We study the effectiveness and potential of ChatGPT on code translation and investigate strategies to improve its performance. We use DSR@K as the principal evaluation metric since we focus on the practical usability of ChatGPT. We use the ChatGPT API and gpt-3.5-turbo as the default model and evaluate on the" + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5073" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 291, + 126 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 291, + 126 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 291, + 126 + ], + "type": "text", + "content": "LLMTrans dataset for all experiments. We investigate the efficacy of prompts and hyperparameters and context in zero-shot setting, then compare one-shot versus zero-shot and study Chain-of-Thought." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 66, + 136, + 291, + 338 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 66, + 136, + 291, + 338 + ], + "spans": [ + { + "bbox": [ + 66, + 136, + 291, + 338 + ], + "type": "text", + "content": "Effect of Prompts and Hyperparameters Prior works show that prompts can influence the performance of ChatGPT (Zhong et al., 2023; Peng et al., 2023; Jiao et al., 2023). We set an initial prompt \"Translate [SL] to [TL]: [SC].\" as the baseline, where [SL] and [TL] denote the source language and the target language respectively and [SC] denotes the source code. We also add \"Do not return anything other than the translated code.\" for each prompting strategy to require ChatGPT to return only code in order to ease code execution. We design three prompt variants. Details of the experimental settings and prompt variants are in Appendix A.6. We also investigate the effect of hyperparameters on code translation performance." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 338, + 291, + 718 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 338, + 291, + 718 + ], + "spans": [ + { + "bbox": [ + 69, + 338, + 291, + 718 + ], + "type": "text", + "content": "As shown in Table 6, implementing role assignments, clarifying usage, and polite inquiry in prompts all degrade the performance compared to the baseline prompt. These results show that the baseline with the most straightforward prompt produces the best performance, possibly because it provides clear, short, and unambiguous instructions for the task to the model. More intricate prompting strategies may introduce noise and confuse ChatGPT. The performance of polite inquiry prompt is comparable to but still worse than the baseline performance. We speculate that the improvement from polite inquiries in prior studies (Akin, 2023) may stem from their explicit and comprehensive formulations which make it easier for the model to understand the task requirements. We also observe in Table 6 that same as prior findings, BLEU and CodeBLEU have no obvious positive correlations with the debugging success rate (DSR@0). Since the reference target code exhibits the same functionality as the source language code but their execution results could differ slightly, EM also does not correlate with DSR@0. Therefore, in subsequent experiments, we only report DSR@0. We also evaluate the CodeT5+_220M model on LLMTrans with the Many-to-Many strategy and find that DSR@0 is 0, suggesting that CodeT5+_220M Zero-shot is unable to generate executable translation results." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 66, + 719, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 66, + 719, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 66, + 719, + 291, + 773 + ], + "type": "text", + "content": "ChatGPT selects the token with the highest probability during generation. The hyperparameter temperature influences the randomness of the generated text, while top " + }, + { + "bbox": [ + 66, + 719, + 291, + 773 + ], + "type": "inline_equation", + "content": "p" + }, + { + "bbox": [ + 66, + 719, + 291, + 773 + ], + "type": "text", + "content": " controls the range of vocabu" + } + ] + } + ], + "index": 3 + }, + { + "type": "table", + "bbox": [ + 304, + 68, + 525, + 168 + ], + "blocks": [ + { + "bbox": [ + 304, + 68, + 525, + 168 + ], + "lines": [ + { + "bbox": [ + 304, + 68, + 525, + 168 + ], + "spans": [ + { + "bbox": [ + 304, + 68, + 525, + 168 + ], + "type": "table", + "html": "
StrategyExpt #numEMBLEUCodeBLEUDSR@0
Baseline-0.2910.8324.4648.57%
Role assignments10.0011.0624.3643.43%
20.0011.0624.4843.14%
30.0010.7024.0841.71%
40.0010.7324.0840.86%
Polite inquiry10.2910.8324.3747.71%
20.8610.8724.2647.71%
Clarify usage-0.2910.6324.1144.00%
Divide-and-Conquer-0.007.4425.3022.86%
", + "image_path": "d801725d42e22778939a72bce379c9029a327873f84dd8bd8d2c0ee14f432bb7.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "table_body" + } + ], + "index": 4 + }, + { + "type": "table", + "bbox": [ + 321, + 242, + 506, + 286 + ], + "blocks": [ + { + "bbox": [ + 302, + 174, + 526, + 224 + ], + "lines": [ + { + "bbox": [ + 302, + 174, + 526, + 224 + ], + "spans": [ + { + "bbox": [ + 302, + 174, + 526, + 224 + ], + "type": "text", + "content": "Table 6: Zero-shot performance of ChatGPT with different prompt variants and contextual strategies. Baseline denotes ChatGPT with the baseline prompt. Details of the prompt variants (Expt #num) are in Appendix A.6." + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 321, + 242, + 506, + 286 + ], + "lines": [ + { + "bbox": [ + 321, + 242, + 506, + 286 + ], + "spans": [ + { + "bbox": [ + 321, + 242, + 506, + 286 + ], + "type": "table", + "html": "
KthDebugDSRKthDebugDSR
048.57%252.29%
151.43%352.57%
", + "image_path": "54e89413900c3c974a948b5c00504a5e4d9852c7dcc00035cc534ac19c706f5b.jpg" + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "table_body" + } + ], + "index": 6 + }, + { + "bbox": [ + 303, + 294, + 523, + 307 + ], + "lines": [ + { + "bbox": [ + 303, + 294, + 523, + 307 + ], + "spans": [ + { + "bbox": [ + 303, + 294, + 523, + 307 + ], + "type": "text", + "content": "Table 7: ChatGPT performance at the " + }, + { + "bbox": [ + 303, + 294, + 523, + 307 + ], + "type": "inline_equation", + "content": "{K}^{th}" + }, + { + "bbox": [ + 303, + 294, + 523, + 307 + ], + "type": "text", + "content": " debugging." + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 323, + 526, + 432 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 323, + 526, + 432 + ], + "spans": [ + { + "bbox": [ + 302, + 323, + 526, + 432 + ], + "type": "text", + "content": "lary considered during generation. Higher temperature or top_p could increase diversity in the generated results from ChatGPT. However, as shown in Table 16 in Appendix, independently varying temperature or top_p does not notably change the performance of ChatGPT; hence for the other ChatGPT experiments, we set both temperature and top_p as 0 to ensure stability an reproducibility." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 440, + 526, + 588 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 440, + 526, + 588 + ], + "spans": [ + { + "bbox": [ + 302, + 440, + 526, + 588 + ], + "type": "text", + "content": "Effect of Context We explore a Divide-and-Conquer strategy, which segments the source language code into snippets (e.g., functions and subfunctions), translate each snippet independently, then merge their outputs as the final result. As shown in Table 6, Divide-and-Conquer significantly degrades the performance. We hypothesize that lack of the global context in Divide-and-Conquer could prevent ChatGPT from considering the overall structure and variable configurations of the code for translation." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 597, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 597, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 597, + 525, + 772 + ], + "type": "text", + "content": "Effect of Self-debugging Since ChatGPT has shown preliminary capability in error detection and correction during code generation (Shinn et al., 2023; Chen et al., 2023b; Kim et al., 2023; Nair et al., 2023; Madaan et al., 2023), we use ChatGPT to perform multiple rounds of self-debugging and investigate the impact on DSR. Specifically, ChatGPT first translates the source language code into the target language (which is Python as in our AutoTransExecutor) and then attempts to execute the translated code. If the execution passes and executing the translated code exhibits the same functionality as the source code, it is regarded as" + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 310, + 791 + ], + "type": "text", + "content": "5074" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 293, + 262 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 293, + 262 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 293, + 262 + ], + "type": "text", + "content": "a successful execution. Otherwise, feedback from the compiler will be also fed to ChatGPT for the next round of translation, and this process is repeated until reaching a pre-defined number " + }, + { + "bbox": [ + 67, + 71, + 293, + 262 + ], + "type": "inline_equation", + "content": "K" + }, + { + "bbox": [ + 67, + 71, + 293, + 262 + ], + "type": "text", + "content": " of debugging rounds. The whole process is shown in Table 17 in Appendix. As shown in Table 7, DSR improves significantly with multiple rounds of self-debugging. The first self-debugging improves DSR by " + }, + { + "bbox": [ + 67, + 71, + 293, + 262 + ], + "type": "inline_equation", + "content": "3\\%" + }, + { + "bbox": [ + 67, + 71, + 293, + 262 + ], + "type": "text", + "content": " absolutely. Each subsequent round of self-debugging brings further gain but DSR begins to plateau after the second debugging round. This suggests that ChatGPT has limitations in its capacity to rectify errors after multiple debugging cycles, which is consistent with human behaviors." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 273, + 291, + 421 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 273, + 291, + 421 + ], + "spans": [ + { + "bbox": [ + 67, + 273, + 291, + 421 + ], + "type": "text", + "content": "Effect of One-shot In-context learning (Brown et al., 2020) allows the model to learn from input examples, enabling it to understand and manage each new task. This method has been validated as an effective strategy for enhancing the performance of model inference (Peng et al., 2023; Liu et al., 2023a). Therefore, we explore one-shot learning for ChatGPT on code translation. We investigate three one-shot learning sample selection strategies. Descriptions of the strategies and the corresponding prompts are in Appendix A.7." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "spans": [ + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "text", + "content": "Table 8 shows that all three One-shot learning strategies effectively improve DSR@0 of ChatGPT over the Zero-shot baseline. The Experiment#2 strategy (provided contextual example has both same source and target languages as the original task) achieves the best performance, yielding " + }, + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "inline_equation", + "content": "1.72\\%" + }, + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "text", + "content": " absolute gain in DSR@0, with Experiment #1 (example has the same target language but different source language) and #3 (example has different source and target languages) following closely with " + }, + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "inline_equation", + "content": "1.14\\%" + }, + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "text", + "content": " and " + }, + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "inline_equation", + "content": "0.29\\%" + }, + { + "bbox": [ + 69, + 423, + 292, + 667 + ], + "type": "text", + "content": " absolute gains, respectively. These results show that One-shot learning entirely tailored to the translation requirements is most effective in boosting code translation performance for ChatGPT. The results corroborate previous findings in natural language translation (Peng et al., 2023) that the performance of ChatGPT is sensitive to the provided contextual example in One-shot learning." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 678, + 291, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 678, + 291, + 773 + ], + "spans": [ + { + "bbox": [ + 67, + 678, + 291, + 773 + ], + "type": "text", + "content": "Effect of Chain-of-Thought Chain-of-Thought (CoT) allows the model to simulate an orderly and structured way of thinking by sorting out the thinking process. It helps guide the model to output the final answer step by step (Wei et al., 2022; Peng et al., 2023; Kojima et al., 2022). For code translation, we investigate four CoT strategies. Detailed" + } + ] + } + ], + "index": 3 + }, + { + "type": "table", + "bbox": [ + 305, + 69, + 526, + 126 + ], + "blocks": [ + { + "bbox": [ + 305, + 69, + 526, + 126 + ], + "lines": [ + { + "bbox": [ + 305, + 69, + 526, + 126 + ], + "spans": [ + { + "bbox": [ + 305, + 69, + 526, + 126 + ], + "type": "table", + "html": "
StrategyExpts #numDSR@0StrategyExpts #numDSR@0
Baseline-48.57%CoT146.00%
One-shot149.71%242.57%
250.29%348.29%
348.86%445.43%
", + "image_path": "30dbaeeb4c821542f1b133c2e584de1440a53c0f2c8c636ca82d25ab489ec5a4.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "table_body" + } + ], + "index": 4 + }, + { + "bbox": [ + 302, + 134, + 526, + 171 + ], + "lines": [ + { + "bbox": [ + 302, + 134, + 526, + 171 + ], + "spans": [ + { + "bbox": [ + 302, + 134, + 526, + 171 + ], + "type": "text", + "content": "Table 8: Performance of ChatGPT with One-shot and CoT strategies compared to the Zero-shot Baseline. Details of Expt #num are in Appendix A.7 and A.8." + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 302, + 196, + 527, + 388 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 196, + 527, + 388 + ], + "spans": [ + { + "bbox": [ + 302, + 196, + 527, + 388 + ], + "type": "text", + "content": "descriptions and translation prompts for each strategy are in Appendix A.8. As shown in Table 8, CoT degrades executability of the translated code. In Experiment #2, DSR@0 even declines by " + }, + { + "bbox": [ + 302, + 196, + 527, + 388 + ], + "type": "inline_equation", + "content": "6\\%" + }, + { + "bbox": [ + 302, + 196, + 527, + 388 + ], + "type": "text", + "content": " absolutely. We study the translation results of ChatGPT and find that when CoT strategies are applied, the model tends to translate the source code line by line, neglecting compatibility issues between libraries and functions in different languages. CoT also compromises the global planning ability of the model. These observations are consistent with the findings in (Peng et al., 2023) that CoT may lead to word-by-word translations of natural language, thereby degrading the translation quality." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 402, + 527, + 565 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 402, + 527, + 565 + ], + "spans": [ + { + "bbox": [ + 302, + 402, + 527, + 565 + ], + "type": "text", + "content": "Fuzzy Execution To address the limitations of existing evaluation metrics and our AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution using LLMs in Section Limitations, inspired by recent progress in using LLMs as evaluation metrics for NLP tasks. Our preliminary studies evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also for predicting the executed output. Experimental results show that using ChatGPT for fuzzy execution is not yet practical and demands future research." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 583, + 381, + 597 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 583, + 381, + 597 + ], + "spans": [ + { + "bbox": [ + 302, + 583, + 381, + 597 + ], + "type": "text", + "content": "5 Conclusion" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 611, + 527, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 611, + 527, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 611, + 527, + 772 + ], + "type": "text", + "content": "We construct CodeTransOcean, a comprehensive code translation benchmark that includes multilingual and cross-framework datasets. We demonstrate that multilingual modeling has remarkable potential in enhancing code translation quality. We also reveal the superior code translation capability of ChatGPT and advanced strategies lead to significant performance gains. Moreover, we introduce fuzzy execution that may overcome limitations of existing metrics but requires future research. In summary, we provide a comprehensive suite of resources, tools, and baselines for code translation." + } + ] + } + ], + "index": 9 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5075" + } + ] + } + ], + "index": 10 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "bbox": [ + 68, + 71, + 149, + 83 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 71, + 149, + 83 + ], + "spans": [ + { + "bbox": [ + 68, + 71, + 149, + 83 + ], + "type": "text", + "content": "6 Limitations" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 94, + 291, + 282 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 94, + 291, + 282 + ], + "spans": [ + { + "bbox": [ + 67, + 94, + 291, + 282 + ], + "type": "text", + "content": "Existing match-based evaluation metrics for code translation (Papineni et al., 2002; Ren et al., 2020; Eghbali and Pradel, 2022; Zhou et al., 2023; Tran et al., 2019) focus solely on semantics, overlooking executability of the code and the functional equivalence under different implementations. Execution-based metrics (Kulal et al., 2019; Hao et al., 2022; Hendrycks et al., 2021; Rozière et al., 2020; Dong et al., 2023) that require providing test cases are expensive to conduct in practice, and the significant overhead of executing numerous test cases and the heightened security risks during the execution process remain unresolved. It is crucial to establish an evaluation metric that overcomes these limitations." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 284, + 291, + 567 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 284, + 291, + 567 + ], + "spans": [ + { + "bbox": [ + 69, + 284, + 291, + 567 + ], + "type": "text", + "content": "Our proposed DSR@K and the automated AutoTransExecutor aim to measure the executability of the code and reflect the real-world software development scenarios. However, AutoTransExecutor currently only supports Python as the target language. This is mainly due to the fact that different programming languages necessitate distinct runtime environments and libraries, making it particularly challenging to automatically detect and install the required dependencies for each code. While certain existing tools, such as Dynatrace12, can carry out dependency detection, the range of supported programming languages remains limited. Moreover, the configuration methods for compilers vary substantially among different programming languages, which further complicates automated configuration. In addition, fully automated execution systems could be exploited by malicious code, thus necessitating further security measures. Therefore, achieving this goal requires overcoming many technical and practical difficulties." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 569, + 291, + 622 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 569, + 291, + 622 + ], + "spans": [ + { + "bbox": [ + 67, + 569, + 291, + 622 + ], + "type": "text", + "content": "To address limitations of existing evaluation metrics and limitations of AutoTransExecutor, we propose another novel code translation evaluation metric fuzzy execution." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 624, + 291, + 731 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 624, + 291, + 731 + ], + "spans": [ + { + "bbox": [ + 67, + 624, + 291, + 731 + ], + "type": "text", + "content": "Recent studies have begun to utilize LLMs as evaluation metrics in the field of NLP (Chen et al., 2023c; Wang et al., 2023a; Fu et al., 2023; Kocmi and Federmann, 2023; Ji et al., 2023). Inspired by these works, we create a new dataset ExecuteStatus by randomly selecting 300 executable samples from MultilingualTrans and 300 non-executable samples from the translation results of ChatGPT." + } + ] + } + ], + "index": 4 + }, + { + "type": "table", + "bbox": [ + 304, + 68, + 525, + 128 + ], + "blocks": [ + { + "bbox": [ + 304, + 68, + 525, + 128 + ], + "lines": [ + { + "bbox": [ + 304, + 68, + 525, + 128 + ], + "spans": [ + { + "bbox": [ + 304, + 68, + 525, + 128 + ], + "type": "table", + "html": "
Zero-ShotFew-Shot
TNFPFNTPTNFPFNTP
292823862294424258
✓12 ×280✓14 ×282
", + "image_path": "c96a633021ed283ac49dce0087279b0f71622e62f051638468f8371f691748f3.jpg" + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "table_body" + } + ], + "index": 5 + }, + { + "type": "table", + "bbox": [ + 304, + 175, + 524, + 294 + ], + "blocks": [ + { + "bbox": [ + 302, + 136, + 524, + 161 + ], + "lines": [ + { + "bbox": [ + 302, + 136, + 524, + 161 + ], + "spans": [ + { + "bbox": [ + 302, + 136, + 524, + 161 + ], + "type": "text", + "content": "Table 9: Confusion matrix of fuzzy execution prediction by ChatGPT with Zero-shot and Few-shot settings." + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 304, + 175, + 524, + 294 + ], + "lines": [ + { + "bbox": [ + 304, + 175, + 524, + 294 + ], + "spans": [ + { + "bbox": [ + 304, + 175, + 524, + 294 + ], + "type": "table", + "html": "
MetricsCalculation formulaZero-ShotFew-Shot
AccuracyTP + TN59.00%59.00%
TP + TN + FN + FP
PrecisionTP88.57%93.55%
TP + FP
RecallTP20.67%19.33%
TP + FN
F1 scores2 · Precision · Recall33.52%32.04%
Precision + Recall
", + "image_path": "f8cd2a43b84555b9d607637de4a01eb6a5eef994d2372dba55e8c45f3d75d214.jpg" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "table_body" + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 303, + 525, + 327 + ], + "lines": [ + { + "bbox": [ + 302, + 303, + 525, + 327 + ], + "spans": [ + { + "bbox": [ + 302, + 303, + 525, + 327 + ], + "type": "text", + "content": "Table 10: Performance of ChatGPT on predicting fuzzy execution." + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 301, + 352, + 526, + 500 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 352, + 526, + 500 + ], + "spans": [ + { + "bbox": [ + 301, + 352, + 526, + 500 + ], + "type": "text", + "content": "Each entry in this dataset includes the execution status and, if executable, the result of the execution. We use ExecuteStatus and AutoTransExecutor to evaluate the performance of ChatGPT for predicting whether a given code can be executed or not, and if executable, also predict the executed output. The Zero-shot prompts are shown in Table 18 in Appendix. For the Few-shot strategy, in addition to the Zero-shot baseline, we include an example of executable code and an example of non-executable code, as detailed in Table 18." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 301, + 502, + 526, + 773 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 502, + 526, + 773 + ], + "spans": [ + { + "bbox": [ + 301, + 502, + 526, + 773 + ], + "type": "text", + "content": "We define fuzzy execution as first testing the consistency between the actual pass rate and the predicted pass rate of ChatGPT, followed by further testing the accuracy in predicting execution results using ChatGPT without relying on a compiler. Since we are interested in the ability of ChatGPT to identify samples that cannot actually be executed accurately, we present the confusion matrix in Table 9 based on the results. To evaluate the performance of ChatGPT on the fuzzy execution prediction task, we use the standard accuracy, precision, recall, and F1 scores. Experimental results based on these evaluation metrics are in Table 10. The low accuracy, recall and F1 scores show that ChatGPT still has difficulty in identifying errors in the code, exhibiting about an " + }, + { + "bbox": [ + 301, + 502, + 526, + 773 + ], + "type": "inline_equation", + "content": "88\\%" + }, + { + "bbox": [ + 301, + 502, + 526, + 773 + ], + "type": "text", + "content": " tendency to predict that the code is executable. Overall, ChatGPT has low accuracy in the binary classification task of \"whether it can be executed\", and its ability to predict execution results, being at a scant " + }, + { + "bbox": [ + 301, + 502, + 526, + 773 + ], + "type": "inline_equation", + "content": "4\\%" + }, + { + "bbox": [ + 301, + 502, + 526, + 773 + ], + "type": "text", + "content": ", clearly" + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 740, + 248, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 740, + 248, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 740, + 248, + 772 + ], + "type": "inline_equation", + "content": "^{12}" + }, + { + "bbox": [ + 67, + 740, + 248, + 772 + ], + "type": "text", + "content": "https://www.dynatrace.com/ platform/artificial-intelligence/ dependency-detection/" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 780, + 309, + 791 + ], + "type": "text", + "content": "5076" + } + ] + } + ], + "index": 12 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 9 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 293, + 153 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 293, + 153 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 293, + 153 + ], + "type": "text", + "content": "requires further enhancement. Thus, using ChatGPT for fuzzy execution is not yet practical (Liu et al., 2023b). Despite this, fuzzy execution with LLMs holds the potential to overcome the deficiencies of current code translation evaluation metrics. We will continue this exploration in future work." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 174, + 127, + 186 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 174, + 127, + 186 + ], + "spans": [ + { + "bbox": [ + 69, + 174, + 127, + 186 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 193, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 9, + "blocks": [ + { + "bbox": [ + 69, + 193, + 291, + 282 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 193, + 291, + 282 + ], + "spans": [ + { + "bbox": [ + 69, + 193, + 291, + 282 + ], + "type": "text", + "content": "Roee Aharoni, Melvin Johnson, and Orhan First. 2019. Massively multilingual neural machine translation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 3874-3884. Association for Computational Linguistics." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 290, + 291, + 379 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 290, + 291, + 379 + ], + "spans": [ + { + "bbox": [ + 69, + 290, + 291, + 379 + ], + "type": "text", + "content": "Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. 2021. Unified pre-training for program understanding and generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2021, Online, June 6-11, 2021, pages 2655-2668. Association for Computational Linguistics." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 386, + 291, + 464 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 386, + 291, + 464 + ], + "spans": [ + { + "bbox": [ + 69, + 386, + 291, + 464 + ], + "type": "text", + "content": "Wasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, and Kai-Wei Chang. 2023. AVATAR: A parallel corpus for javapython program translation. In Findings of the Association for Computational Linguistics: ACL 2023, Toronto, Canada, July 9-14, 2023, pages 2268-2281. Association for Computational Linguistics." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 471, + 277, + 483 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 471, + 277, + 483 + ], + "spans": [ + { + "bbox": [ + 69, + 471, + 277, + 483 + ], + "type": "text", + "content": "Fatih Kadir Akın. 2023. awesome-chatgpt-prompts." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 491, + 290, + 545 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 491, + 290, + 545 + ], + "spans": [ + { + "bbox": [ + 69, + 491, + 290, + 545 + ], + "type": "text", + "content": "Badr AlKhamissi, Siddharth Verma, Ping Yu, Zhijing Jin, Asli Celikyilmaz, and Mona T. Diab. 2023. OPTR: exploring the role of explanations in finetuning and prompting for reasoning skills of large language models. CoRR, abs/2305.12001." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 554, + 290, + 576 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 554, + 290, + 576 + ], + "spans": [ + { + "bbox": [ + 69, + 554, + 290, + 576 + ], + "type": "text", + "content": "Anil Ananthaswamy. 2023. In ai, is bigger always better? Nature." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 584, + 291, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 584, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 584, + 291, + 772 + ], + "type": "text", + "content": "Rohan Anil, Andrew M. Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, Eric Chu, Jonathan H. Clark, Laurent El Shafey, Yanping Huang, Kathy Meier-Hellstern, Gaurav Mishra, Erica Moreira, Mark Omernick, Kevin Robinson, Sebastian Ruder, Yi Tay, Kefan Xiao, Yuanzhong Xu, Yujing Zhang, Gustavo Hernandez Abrego, Junwhan Ahn, Jacob Austin, Paul Barham, Jan A. Botha, James Bradbury, Siddhartha Brahma, Kevin Brooks, Michele Catasta, Yong Cheng, Colin Cherry, Christopher A. Choquette-Choo, Aakanksha Chowdhery, Clement Crepy, Shachi Dave, Mostafa Dehghani, Sunipa Dev, Jacob Devlin, Mark Diaz, Nan Du, Ethan Dyer, Vladimir Feinberg, Fangxiaoyu Feng, Vlad Fienber, Markus Freitag, Xavier Garcia, Sebastian Gehrmann, Lucas Gonzalez, and" + } + ] + } + ], + "index": 8 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 20, + "blocks": [ + { + "bbox": [ + 314, + 72, + 525, + 94 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 314, + 72, + 525, + 94 + ], + "spans": [ + { + "bbox": [ + 314, + 72, + 525, + 94 + ], + "type": "text", + "content": "et al. 2023. Palm 2 technical report. CoRR, abs/2305.10403." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 304, + 103, + 526, + 268 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 103, + 526, + 268 + ], + "spans": [ + { + "bbox": [ + 304, + 103, + 526, + 268 + ], + "type": "text", + "content": "Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 277, + 526, + 365 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 277, + 526, + 365 + ], + "spans": [ + { + "bbox": [ + 304, + 277, + 526, + 365 + ], + "type": "text", + "content": "Saikat Chakraborty, Toufique Ahmed, Yangruibo Ding, Premkumar T. Devanbu, and Baishakhi Ray. 2022. Natgen: generative pre-training by \"naturalizing\" source code. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2022, Singapore, Singapore, November 14-18, 2022, pages 18-30. ACM." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 375, + 526, + 430 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 375, + 526, + 430 + ], + "spans": [ + { + "bbox": [ + 304, + 375, + 526, + 430 + ], + "type": "text", + "content": "Angelica Chen, Jérémy Scheurer, Tomasz Korbak, Jon Ander Campos, Jun Shern Chan, Samuel R. Bowman, Kyunhyun Cho, and Ethan Perez. 2023a. Improving code generation by training with natural language feedback. CoRR, abs/2303.16749." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 439, + 526, + 472 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 439, + 526, + 472 + ], + "spans": [ + { + "bbox": [ + 304, + 439, + 526, + 472 + ], + "type": "text", + "content": "Xinyun Chen, Maxwell Lin, Nathanael Scharli, and Denny Zhou. 2023b. Teaching large language models to self-debug. CoRR, abs/2304.05128." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 481, + 526, + 548 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 481, + 526, + 548 + ], + "spans": [ + { + "bbox": [ + 304, + 481, + 526, + 548 + ], + "type": "text", + "content": "Xinyun Chen, Chang Liu, and Dawn Song. 2018. Tree-to-tree neural networks for program translation. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pages 2552-2562." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 556, + 526, + 612 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 556, + 526, + 612 + ], + "spans": [ + { + "bbox": [ + 304, + 556, + 526, + 612 + ], + "type": "text", + "content": "Yi Chen, Rui Wang, Haiyun Jiang, Shuming Shi, and Ruifeng Xu. 2023c. Exploring the use of large language models for reference-free text quality evaluation: A preliminary empirical study. CoRR, abs/2304.00723." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 620, + 526, + 665 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 620, + 526, + 665 + ], + "spans": [ + { + "bbox": [ + 304, + 620, + 526, + 665 + ], + "type": "text", + "content": "Yihong Dong, Jiazheng Ding, Xue Jiang, Zhuo Li, Ge Li, and Zhi Jin. 2023. Codescore: Evaluating code generation by learning code execution. CoRR, abs/2301.09043." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 674, + 526, + 740 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 674, + 526, + 740 + ], + "spans": [ + { + "bbox": [ + 304, + 674, + 526, + 740 + ], + "type": "text", + "content": "Aryaz Eghbali and Michael Pradel. 2022. Crystalbleu: Precisely and efficiently measuring the similarity of code. In 37th IEEE/ACM International Conference on Automated Software Engineering, ASE 2022, Rochester, MI, USA, October 10-14, 2022, pages 28:1-28:12. ACM." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 750, + 526, + 772 + ], + "type": "text", + "content": "Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin," + } + ] + } + ], + "index": 19 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5077" + } + ] + } + ], + "index": 21 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 10 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 289, + 772 + ], + "type": "list", + "angle": 0, + "index": 10, + "blocks": [ + { + "bbox": [ + 80, + 72, + 289, + 149 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 72, + 289, + 149 + ], + "spans": [ + { + "bbox": [ + 80, + 72, + 289, + 149 + ], + "type": "text", + "content": "Ting Liu, Daxin Jiang, and Ming Zhou. 2020. Codebert: A pre-trained model for programming and natural languages. In Findings of the Association for Computational Linguistics: EMNLP 2020, Online Event, 16-20 November 2020, volume EMNLP 2020 of Findings of ACL, pages 1536-1547. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 158, + 289, + 190 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 158, + 289, + 190 + ], + "spans": [ + { + "bbox": [ + 69, + 158, + 289, + 190 + ], + "type": "text", + "content": "Jinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. 2023. Gptscore: Evaluate as you desire. CoRR, abs/2302.04166." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 201, + 289, + 243 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 201, + 289, + 243 + ], + "spans": [ + { + "bbox": [ + 69, + 201, + 289, + 243 + ], + "type": "text", + "content": "Mingqi Gao, Jie Ruan, Renliang Sun, Xunjian Yin, Shiping Yang, and Xiaojun Wan. 2023. Humanlike summarization evaluation with chatgpt. CoRR, abs/2304.02554." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 255, + 289, + 320 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 255, + 289, + 320 + ], + "spans": [ + { + "bbox": [ + 69, + 255, + 289, + 320 + ], + "type": "text", + "content": "Stefanos Georgiou, Maria Kechagia, Tushar Sharma, Federica Sarro, and Ying Zou. 2022. Green AI: do deep learning frameworks have different costs? In 44th IEEE/ACM 44th International Conference on Software Engineering, ICSE 2022, Pittsburgh, PA, USA, May 25-27, 2022, pages 1082-1094. ACM." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 330, + 289, + 428 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 330, + 289, + 428 + ], + "spans": [ + { + "bbox": [ + 69, + 330, + 289, + 428 + ], + "type": "text", + "content": "Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun Deng, Colin B. Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. 2021. Graphcodebert: Pre-training code representations with data flow. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 439, + 289, + 481 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 439, + 289, + 481 + ], + "spans": [ + { + "bbox": [ + 69, + 439, + 289, + 481 + ], + "type": "text", + "content": "Yiyang Hao, Ge Li, Yongqiang Liu, Xiaowei Miao, He Zong, Siyuan Jiang, Yang Liu, and He Wei. 2022. Aixbench: A code generation benchmark dataset. CoRR, abs/2206.13179." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 491, + 289, + 577 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 491, + 289, + 577 + ], + "spans": [ + { + "bbox": [ + 69, + 491, + 289, + 577 + ], + "type": "text", + "content": "Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. 2021. Measuring coding challenge competence with APPS. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 588, + 289, + 642 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 588, + 289, + 642 + ], + "spans": [ + { + "bbox": [ + 69, + 588, + 289, + 642 + ], + "type": "text", + "content": "Yunjie Ji, Yan Gong, Yiping Peng, Chao Ni, Peiyan Sun, Dongyu Pan, Baochang Ma, and Xiangang Li. 2023. Exploring chatgpt's ability to rank content: A preliminary study on consistency with human preferences. CoRR, abs/2303.07610." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 653, + 289, + 686 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 653, + 289, + 686 + ], + "spans": [ + { + "bbox": [ + 69, + 653, + 289, + 686 + ], + "type": "text", + "content": "Wenxiang Jiao, Wenxuan Wang, Jen tse Huang, Xing Wang, and Zhaopeng Tu. 2023. Is chatgpt a good translator? yes with gpt-4 as the engine." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 69, + 695, + 289, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 695, + 289, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 695, + 289, + 772 + ], + "type": "text", + "content": "Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda B. Viégas, Martin Wattenberg, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2017. Google's multilingual neural machine translation system: Enabling zero-shot translation. Trans. Assoc. Comput. Linguistics, 5:339-351." + } + ] + } + ], + "index": 9 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 524, + 772 + ], + "type": "list", + "angle": 0, + "index": 21, + "blocks": [ + { + "bbox": [ + 304, + 72, + 524, + 105 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 72, + 524, + 105 + ], + "spans": [ + { + "bbox": [ + 304, + 72, + 524, + 105 + ], + "type": "text", + "content": "Geunwoo Kim, Pierre Baldi, and Stephen McAleer. 2023. Language models can solve computer tasks. CoRR, abs/2303.17491." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 304, + 115, + 524, + 190 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 115, + 524, + 190 + ], + "spans": [ + { + "bbox": [ + 304, + 115, + 524, + 190 + ], + "type": "text", + "content": "Tom Kocmi and Christian Federmann. 2023. Large language models are state-of-the-art evaluators of translation quality. In Proceedings of the 24th Annual Conference of the European Association for Machine Translation, EAMT 2023, Tampere, Finland, 12-15 June 2023, pages 193-203. European Association for Machine Translation." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 201, + 524, + 233 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 201, + 524, + 233 + ], + "spans": [ + { + "bbox": [ + 304, + 201, + 524, + 233 + ], + "type": "text", + "content": "Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. In NeurIPS." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 243, + 524, + 320 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 243, + 524, + 320 + ], + "spans": [ + { + "bbox": [ + 304, + 243, + 524, + 320 + ], + "type": "text", + "content": "Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy Liang. 2019. Spoc: Search-based pseudocode to code. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 11883-11894." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 330, + 524, + 384 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 330, + 524, + 384 + ], + "spans": [ + { + "bbox": [ + 304, + 330, + 524, + 384 + ], + "type": "text", + "content": "Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023a. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv., 55(9):195:1-195:35." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 394, + 524, + 449 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 394, + 524, + 449 + ], + "spans": [ + { + "bbox": [ + 304, + 394, + 524, + 449 + ], + "type": "text", + "content": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 459, + 524, + 502 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 459, + 524, + 502 + ], + "spans": [ + { + "bbox": [ + 304, + 459, + 524, + 502 + ], + "type": "text", + "content": "Yongkang Liu, Shi Feng, Daling Wang, Yifei Zhang, and Hinrich Schütze. 2023b. Evaluate what you can't evaluate: Unassessable generated responses quality. CoRR, abs/2305.14658." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 512, + 524, + 642 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 512, + 524, + 642 + ], + "spans": [ + { + "bbox": [ + 304, + 512, + 524, + 642 + ], + "type": "text", + "content": "Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin B. Clement, Dawn Drain, Daxin Jiang, Duyu Tang, Ge Li, Li-dong Zhou, Linjun Shou, Long Zhou, Michele Tufano, Ming Gong, Ming Zhou, Nan Duan, Neel Sundaresan, Shao Kun Deng, Shengyu Fu, and Shujie Liu. 2021. Codexglue: A machine learning benchmark dataset for code understanding and generation. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 653, + 524, + 707 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 653, + 524, + 707 + ], + "spans": [ + { + "bbox": [ + 304, + 653, + 524, + 707 + ], + "type": "text", + "content": "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. CoRR, abs/2306.08568." + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 304, + 717, + 524, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 717, + 524, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 717, + 524, + 772 + ], + "type": "text", + "content": "Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Sean Welleck, Bodhisattwa Prasad Majumder, Shashank Gupta, Amir Yazdanbakhsh, and Peter" + } + ] + } + ], + "index": 20 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5078" + } + ] + } + ], + "index": 22 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 11 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 72, + 291, + 772 + ], + "type": "list", + "angle": 0, + "index": 11, + "blocks": [ + { + "bbox": [ + 80, + 72, + 289, + 95 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 80, + 72, + 289, + 95 + ], + "spans": [ + { + "bbox": [ + 80, + 72, + 289, + 95 + ], + "type": "text", + "content": "Clark. 2023. Self-refine: Iterative refinement with self-feedback. CoRR, abs/2303.17651." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 102, + 291, + 202 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 102, + 291, + 202 + ], + "spans": [ + { + "bbox": [ + 69, + 102, + 291, + 202 + ], + "type": "text", + "content": "Alireza Mohammadshahi, Vassilina Nikoulina, Alexandre Berard, Caroline Brun, James Henderson, and Laurent Besacier. 2022. Small-100: Introducing shallow multilingual machine translation model for low-resource languages. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 8348-8359. Association for Computational Linguistics." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 69, + 210, + 290, + 254 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 210, + 290, + 254 + ], + "spans": [ + { + "bbox": [ + 69, + 210, + 290, + 254 + ], + "type": "text", + "content": "Varun Nair, Elliot Schumacher, Geoffrey J. Tso, and Anitha Kannan. 2023. DERA: enhancing large language model completions with dialog-enabled resolving agents. CoRR, abs/2303.17071." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 262, + 290, + 349 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 262, + 290, + 349 + ], + "spans": [ + { + "bbox": [ + 69, + 262, + 290, + 349 + ], + "type": "text", + "content": "Anh Tuan Nguyen, Tung Thanh Nguyen, and Tien N. Nguyen. 2013. Lexical statistical machine translation for language migration. In Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE'13, Saint Petersburg, Russian Federation, August 18-26, 2013, pages 651-654. ACM." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 69, + 359, + 290, + 447 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 359, + 290, + 447 + ], + "spans": [ + { + "bbox": [ + 69, + 359, + 290, + 447 + ], + "type": "text", + "content": "Toan Q. Nguyen and David Chiang. 2017. Transfer learning across low-resource, related languages for neural machine translation. In Proceedings of the Eighth International Joint Conference on Natural Language Processing, IJCNLP 2017, Taipei, Taiwan, November 27 - December 1, 2017, Volume 2: Short Papers, pages 296-301. Asian Federation of Natural Language Processing." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 69, + 454, + 290, + 476 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 454, + 290, + 476 + ], + "spans": [ + { + "bbox": [ + 69, + 454, + 290, + 476 + ], + "type": "text", + "content": "OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 69, + 485, + 289, + 507 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 485, + 289, + 507 + ], + "spans": [ + { + "bbox": [ + 69, + 485, + 289, + 507 + ], + "type": "text", + "content": "Alfrick Opidi. 2020. Why your legacy software is hard to maintain and what to do about it." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 69, + 515, + 290, + 582 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 515, + 290, + 582 + ], + "spans": [ + { + "bbox": [ + 69, + 515, + 290, + 582 + ], + "type": "text", + "content": "Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, July 6-12, 2002, Philadelphia, PA, USA, pages 311-318. ACL." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 69, + 590, + 290, + 645 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 590, + 290, + 645 + ], + "spans": [ + { + "bbox": [ + 69, + 590, + 290, + 645 + ], + "type": "text", + "content": "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. CoRR, abs/2303.13780." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 69, + 653, + 290, + 731 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 653, + 290, + 731 + ], + "spans": [ + { + "bbox": [ + 69, + 653, + 290, + 731 + ], + "type": "text", + "content": "Ruchir Puri, David S. Kung, Geert Janssen, Wei Zhang, Giacomo Domeniconi, Vladimir Zolotov, Julian Dolby, Jie Chen, Mihir R. Choudhury, Lindsey Decker, Veronika Thost, Luca Buratti, Saurabh Pajar, and Ulrich Finkler. 2021. Project codenet: A largescale AI for code dataset for learning a diversity of coding tasks. CoRR, abs/2105.12655." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 69, + 739, + 290, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 739, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 739, + 290, + 772 + ], + "type": "text", + "content": "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" + } + ] + } + ], + "index": 10 + } + ], + "sub_type": "ref_text" + }, + { + "bbox": [ + 304, + 72, + 526, + 772 + ], + "type": "list", + "angle": 0, + "index": 23, + "blocks": [ + { + "bbox": [ + 315, + 72, + 525, + 95 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 315, + 72, + 525, + 95 + ], + "spans": [ + { + "bbox": [ + 315, + 72, + 525, + 95 + ], + "type": "text", + "content": "for automatic evaluation of code synthesis. CoRR, abs/2009.10297." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 304, + 103, + 526, + 170 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 103, + 526, + 170 + ], + "spans": [ + { + "bbox": [ + 304, + 103, + 526, + 170 + ], + "type": "text", + "content": "Israt Jahan Rithy, Hasib Hossain Shakil, Niloy Mondal, Fatema Sultana, and Faisal Muhammad Shah. 2022. Xtest: A parallel multilingual corpus with test cases for code translation and its evaluation*. In 2022 25th International Conference on Computer and Information Technology (ICCIT), pages 623-628." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 304, + 179, + 526, + 256 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 179, + 526, + 256 + ], + "spans": [ + { + "bbox": [ + 304, + 179, + 526, + 256 + ], + "type": "text", + "content": "Baptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, and Guillaume Lample. 2020. Unsupervised translation of programming languages. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual." + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 304, + 265, + 525, + 332 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 265, + 525, + 332 + ], + "spans": [ + { + "bbox": [ + 304, + 265, + 525, + 332 + ], + "type": "text", + "content": "Baptiste Rozière, Jie Zhang, François Charton, Mark Harman, Gabriel Synnaeve, and Guillaume Lample. 2022. Leveraging automated unit tests for unsupervised code translation. In *The Tenth International Conference on Learning Representations*, ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net." + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 304, + 341, + 525, + 386 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 341, + 525, + 386 + ], + "spans": [ + { + "bbox": [ + 304, + 341, + 525, + 386 + ], + "type": "text", + "content": "Noah Shinn, Federico Cassano, Beck Labash, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language agents with verbal reinforcement learning." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 304, + 394, + 525, + 461 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 394, + 525, + 461 + ], + "spans": [ + { + "bbox": [ + 304, + 394, + 525, + 461 + ], + "type": "text", + "content": "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. Llama: Open and efficient foundation language models." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 304, + 470, + 525, + 536 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 470, + 525, + 536 + ], + "spans": [ + { + "bbox": [ + 304, + 470, + 525, + 536 + ], + "type": "text", + "content": "Ngoc M. Tran, Hieu Tran, Son Nguyen, Hoan Nguyen, and Tien N. Nguyen. 2019. Does BLEU score work for code migration? In Proceedings of the 27th International Conference on Program Comprehension, ICPC 2019, Montreal, QC, Canada, May 25-31, 2019, pages 165-176. IEEE / ACM." + } + ] + } + ], + "index": 18 + }, + { + "bbox": [ + 304, + 545, + 525, + 590 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 545, + 525, + 590 + ], + "spans": [ + { + "bbox": [ + 304, + 545, + 525, + 590 + ], + "type": "text", + "content": "Jiaan Wang, Yunlong Liang, Fandong Meng, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. 2023a. Is chatgpt a good NLG evaluator? A preliminary study. CoRR, abs/2303.04048." + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 304, + 598, + 525, + 677 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 598, + 525, + 677 + ], + "spans": [ + { + "bbox": [ + 304, + 598, + 525, + 677 + ], + "type": "text", + "content": "Yiren Wang, ChengXiang Zhai, and Hany Hassan. 2020. Multi-task learning for multilingual neural machine translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 1022-1034. Association for Computational Linguistics." + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 304, + 684, + 525, + 740 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 684, + 525, + 740 + ], + "spans": [ + { + "bbox": [ + 304, + 684, + 525, + 740 + ], + "type": "text", + "content": "Yue Wang, Hung Le, Akhilesh Deepak Gotmare, Nghi D. Q. Bui, Junnan Li, and Steven C. H. Hoi. 2023b. Codet5+: Open code large language models for code understanding and generation. CoRR, abs/2305.07922." + } + ] + } + ], + "index": 21 + }, + { + "bbox": [ + 304, + 750, + 525, + 772 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 750, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 750, + 525, + 772 + ], + "type": "text", + "content": "Yue Wang, Weishi Wang, Shafiq R. Joty, and Steven C. H. Hoi. 2021. Codet5: Identifier-aware unified" + } + ] + } + ], + "index": 22 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5079" + } + ] + } + ], + "index": 24 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 12 + }, + { + "para_blocks": [ + { + "bbox": [ + 78, + 72, + 291, + 150 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 78, + 72, + 291, + 150 + ], + "spans": [ + { + "bbox": [ + 78, + 72, + 291, + 150 + ], + "type": "text", + "content": "pre-trained encoder-decoder models for code understanding and generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 8696-8708. Association for Computational Linguistics." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 68, + 158, + 291, + 214 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 158, + 291, + 214 + ], + "spans": [ + { + "bbox": [ + 68, + 158, + 291, + 214 + ], + "type": "text", + "content": "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." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 68, + 222, + 291, + 310 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 222, + 291, + 310 + ], + "spans": [ + { + "bbox": [ + 68, + 222, + 291, + 310 + ], + "type": "text", + "content": "Justin D. Weisz, Michael J. Muller, Stephanie Houde, John T. Richards, Steven I. Ross, Fernando Martinez, Mayank Agarwal, and Kartik Talamadupula. 2021. Perfection not required? human-ai partnerships in code translation. In IUI '21: 26th International Conference on Intelligent User Interfaces, College Station, TX, USA, April 13-17, 2021, pages 402-412. ACM." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 68, + 319, + 291, + 397 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 319, + 291, + 397 + ], + "spans": [ + { + "bbox": [ + 68, + 319, + 291, + 397 + ], + "type": "text", + "content": "Justin D. Weisz, Michael J. Muller, Steven I. Ross, Fernando Martinez, Stephanie Houde, Mayank Agarwal, Kartik Talamadupula, and John T. Richards. 2022. Better together? an evaluation of ai-supported code translation. In IUI 2022: 27th International Conference on Intelligent User Interfaces, Helsinki, Finland, March 22 - 25, 2022, pages 369-391. ACM." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 68, + 406, + 291, + 495 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 406, + 291, + 495 + ], + "spans": [ + { + "bbox": [ + 68, + 406, + 291, + 495 + ], + "type": "text", + "content": "Ning Wu, Ming Gong, Linjun Shou, Shining Liang, and Daxin Jiang. 2023. Large language models are diverse role-players for summarization evaluation. In *Natural Language Processing and Chinese Computing - 12th National CCF Conference*, NLPCC 2023, Foshan, China, October 12-15, 2023, Proceedings, Part I, volume 14302 of Lecture Notes in Computer Science, pages 695-707. Springer." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 502, + 291, + 558 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 502, + 291, + 558 + ], + "spans": [ + { + "bbox": [ + 68, + 502, + 291, + 558 + ], + "type": "text", + "content": "Jingfeng Yang, Hongye Jin, Ruixiang Tang, Xiaotian Han, Qizhang Feng, Haoming Jiang, Bing Yin, and Xia Hu. 2023. Harnessing the power of llms in practice: A survey on chatgpt and beyond. CoRR, abs/2304.13712." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 68, + 567, + 291, + 612 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 567, + 291, + 612 + ], + "spans": [ + { + "bbox": [ + 68, + 567, + 291, + 612 + ], + "type": "text", + "content": "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. CoRR, abs/2302.10198." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 68, + 620, + 291, + 665 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 620, + 291, + 665 + ], + "spans": [ + { + "bbox": [ + 68, + 620, + 291, + 665 + ], + "type": "text", + "content": "Shuyan Zhou, Uri Alon, Sumit Agarwal, and Graham Neubig. 2023. Codebertscore: Evaluating code generation with pretrained models of code. CoRR, abs/2302.05527." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 68, + 674, + 291, + 719 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 674, + 291, + 719 + ], + "spans": [ + { + "bbox": [ + 68, + 674, + 291, + 719 + ], + "type": "text", + "content": "Ming Zhu, Aneesh Jain, Karthik Suresh, Roshan Ravindran, Sindhu Tipirneni, and Chandan K. Reddy. 2022a. Xlcost: A benchmark dataset for cross-lingual code intelligence. CoRR, abs/2206.08474." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 68, + 728, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 728, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 68, + 728, + 291, + 772 + ], + "type": "text", + "content": "Ming Zhu, Karthik Suresh, and Chandan K. Reddy. 2022b. Multilingual code snippets training for program translation. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 313, + 72, + 526, + 128 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 313, + 72, + 526, + 128 + ], + "spans": [ + { + "bbox": [ + 313, + 72, + 526, + 128 + ], + "type": "text", + "content": "Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelveth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 11783-11790. AAAI Press." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 303, + 135, + 526, + 190 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 135, + 526, + 190 + ], + "spans": [ + { + "bbox": [ + 303, + 135, + 526, + 190 + ], + "type": "text", + "content": "Wenhao Zhu, Hongyi Liu, Qingxiu Dong, Jingjing Xu, Lingpeng Kong, Jiajun Chen, Lei Li, and Shujian Huang. 2023. Multilingual machine translation with large language models: Empirical results and analysis. CoRR, abs/2304.04675." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 303, + 199, + 526, + 277 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 199, + 526, + 277 + ], + "spans": [ + { + "bbox": [ + 303, + 199, + 526, + 277 + ], + "type": "text", + "content": "Barret Zoph, Deniz Yuret, Jonathan May, and Kevin Knight. 2016. Transfer learning for low-resource neural machine translation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pages 1568-1575. The Association for Computational Linguistics." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 303, + 285, + 377, + 300 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 285, + 377, + 300 + ], + "spans": [ + { + "bbox": [ + 303, + 285, + 377, + 300 + ], + "type": "text", + "content": "A Appendix" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 303, + 307, + 399, + 319 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 307, + 399, + 319 + ], + "spans": [ + { + "bbox": [ + 303, + 307, + 399, + 319 + ], + "type": "text", + "content": "A.1 Related Work" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 303, + 325, + 465, + 337 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 325, + 465, + 337 + ], + "spans": [ + { + "bbox": [ + 303, + 325, + 465, + 337 + ], + "type": "text", + "content": "A.1.1 Code Translation Methods" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 302, + 341, + 526, + 488 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 341, + 526, + 488 + ], + "spans": [ + { + "bbox": [ + 302, + 341, + 526, + 488 + ], + "type": "text", + "content": "Naive Copy directly duplicates the source code as the target code without making any modifications. Given that the results produced by this method are often unusable, it is treated as the lower bound of performance for code translation. Early code translation relies heavily on manual rewriting, which requires developers to have a deep understanding of both source and target languages along with the ability to navigate various complex programming structures and semantic challenges. This method is inefficient, costly, and prone to errors." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 302, + 490, + 526, + 719 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 490, + 526, + 719 + ], + "spans": [ + { + "bbox": [ + 302, + 490, + 526, + 719 + ], + "type": "text", + "content": "Automatic code translation methods fall into several categories. Compilers and transpilers13 can automatically translate the source code into a target language, significantly saving time and effort. However, these methods cannot fully preserve all the linguistic features and behaviors of the source code, nor can they comprehend the intent and semantics inherent to the source code as humans do. Rule-based methods (Weisz et al., 2021, 2022; Rozière et al., 2020) treat the code translation task as a program synthesis problem. They define a set of transformation rules and employ the rules or pattern matching for code translation. Research on rule-based methods is quite scarce, mainly because they overly rely on the completeness of the rules and also require a considerable amount of manual preprocessing." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 302, + 719, + 525, + 745 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 719, + 525, + 745 + ], + "spans": [ + { + "bbox": [ + 302, + 719, + 525, + 745 + ], + "type": "text", + "content": "Neural network based methods have become dominant in the field of code translation in recent" + } + ] + } + ], + "index": 18 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 303, + 750, + 483, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 303, + 750, + 483, + 772 + ], + "spans": [ + { + "bbox": [ + 303, + 750, + 483, + 772 + ], + "type": "text", + "content": "13https://en.wikipedia.org/wiki/ Source-to-source_compiler" + } + ] + } + ], + "index": 19 + }, + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5080" + } + ] + } + ], + "index": 20 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 13 + }, + { + "para_blocks": [ + { + "bbox": [ + 69, + 71, + 292, + 462 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 71, + 292, + 462 + ], + "spans": [ + { + "bbox": [ + 69, + 71, + 292, + 462 + ], + "type": "text", + "content": "years. These methods mainly treat code translation as a sequence-to-sequence generation problem. Among them, Chen et al. (Chen et al., 2018) are the first to successfully apply neural networks to code translation, designing a tree-to-tree neural model. CodeBERT (Feng et al., 2020) significantly improves code translation accuracy by pretraining models with masked language modeling and replaced token detection. GraphCodeBERT (Guo et al., 2021) further improves code translation accuracy by introducing two additional pre-training tasks as edge prediction and node alignment. CodeT5 (Wang et al., 2021), based on the Transformer encoder-decoder architecture, achieves excellent performance on code translation through four pre-training tasks, namely, masked span prediction, identifier tagging, masked identifier prediction, and bimodal dual generation. With a similar architecture as CodeT5, PLBART (Ahmad et al., 2021) adopts three tasks of token masking, token deletion and token infilling for denoising seq2seq pre-training, which enables PLBART to infer language syntax and semantics and to learn how to generate language coherently. NatGen (Chakraborty et al., 2022) forces the model to learn to capture intent of the source code by setting up \"Code-Naturalization\" tasks during pre-training, and forces the model to make the generated code closer to the human-written style." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 465, + 291, + 639 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 465, + 291, + 639 + ], + "spans": [ + { + "bbox": [ + 69, + 465, + 291, + 639 + ], + "type": "text", + "content": "In the line of neural network based methods, recently released large language models (LLMs) (e.g., ChatGPT (OpenAI, 2023)) have shown remarkable performance in a wide range of NLP tasks with instructions and a few in-context examples. ChatGPT is built upon GPT and is optimized with Reinforcement Learning from Human Feedback. ChatGPT can efficiently understand and generate code sequences, and can self-learn from human feedback to improve the quality and accuracy of its outputs. This significant advancement has markedly propelled progress in the field of code translation." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 70, + 649, + 224, + 661 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 70, + 649, + 224, + 661 + ], + "spans": [ + { + "bbox": [ + 70, + 649, + 224, + 661 + ], + "type": "text", + "content": "A.1.2 Code Translation Metrics" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 69, + 666, + 291, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 69, + 666, + 291, + 772 + ], + "spans": [ + { + "bbox": [ + 69, + 666, + 291, + 772 + ], + "type": "text", + "content": "Match-Based Evaluation Metrics These evaluation metrics are based on the similarity between the translation output and the reference translation. Among them, the Exact Match (EM) metric calculates the percentage of translation outputs that exactly match the reference translation, which overlooks the fact that the same function can be implemented in various ways. The Bilingual Evalu" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 304, + 71, + 525, + 490 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 71, + 525, + 490 + ], + "spans": [ + { + "bbox": [ + 304, + 71, + 525, + 490 + ], + "type": "text", + "content": "ation Understudy (BLEU) (Papineni et al., 2002) metric evaluates the similarity between the translation output and the reference translation by multiplying the geometric average of n-gram precision scores with a brevity penalty. The CodeBLEU (Ren et al., 2020) metric extends BLEU by considering syntactic and semantic characteristics of programming languages; it not only considers shallow matching but also pays attention to syntactic and semantic matching. CrystalBLEU (Eghbali and Pradel, 2022) focuses more on the inherent differences between source code and natural language, such as trivial shared n-gram syntax. CodeBERTScore (Zhou et al., 2023) uses pre-trained models to encode the translation output and reference translation, then calculates the dot product similarity between them, enabling comparisons of code pairs with distinct lexical forms. However, CodeBLEU, CrystalBLEU, and CodeBERTScore have limitations as they only support a limited range of programming languages and cannot be used in general multilingual scenarios. Ruby (Tran et al., 2019), a new method for evaluating code translation, considers the lexical, syntactic, and semantic representations of source code. However, its codebase has not yet been open-sourced. These match-based evaluation metrics can only evaluate the surface form and semantic differences of the code, while neglecting the executability of the code and the functional equivalence of implementation variations." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 305, + 503, + 524, + 515 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 305, + 503, + 524, + 515 + ], + "spans": [ + { + "bbox": [ + 305, + 503, + 524, + 515 + ], + "type": "text", + "content": "Execution-Based Evaluation Metrics" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 304, + 517, + 525, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 304, + 517, + 525, + 772 + ], + "spans": [ + { + "bbox": [ + 304, + 517, + 525, + 772 + ], + "type": "text", + "content": "Execution-based evaluation metrics mainly compare the executed result of the generated code with the expected result. The PASS@k score (Kulal et al., 2019) is evaluated by unit tests: if any of the " + }, + { + "bbox": [ + 304, + 517, + 525, + 772 + ], + "type": "inline_equation", + "content": "k" + }, + { + "bbox": [ + 304, + 517, + 525, + 772 + ], + "type": "text", + "content": " samples meets the expected result, the generated result is deemed successful. AvgPassRatio (Hao et al., 2022; Hendrycks et al., 2021) evaluates the overall executable result of code by calculating the average pass rate of test cases. Computational accuracy (Rozière et al., 2020) measures the quality of the generated code snippet by comparing the output of this snippet with the reference code snippet when given the same input. Additionally, CodeScore (Dong et al., 2023) claims that it can estimate the PassRatio of test cases for the generated code without executing the code, but its codebase has not yet been open-sourced. These execution-based evaluation metrics require construction of executable test" + } + ] + } + ], + "index": 6 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 287, + 781, + 308, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 287, + 781, + 308, + 791 + ], + "spans": [ + { + "bbox": [ + 287, + 781, + 308, + 791 + ], + "type": "text", + "content": "5081" + } + ] + } + ], + "index": 7 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 14 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 82, + 68, + 511, + 286 + ], + "blocks": [ + { + "bbox": [ + 82, + 68, + 511, + 286 + ], + "lines": [ + { + "bbox": [ + 82, + 68, + 511, + 286 + ], + "spans": [ + { + "bbox": [ + 82, + 68, + 511, + 286 + ], + "type": "table", + "html": "
MethodTrainDevTestTotalMethodTrainDevTestTotal
C ↔ C#796841691049C ↔ C++7991492981246
C ↔ Go8772274541558C ↔ Java8131713431327
C ↔ Python9012134261540C ↔ PHP29651102449
C ↔ VB61797194908C++ ↔ C#74879160987
C++ ↔ Go7922084181418C++ ↔ Java7531723451270
C++ ↔ Python8422024051449C++ ↔ PHP29153106450
C++ ↔ VB58697195888C# ↔ Go7771002021079
C# ↔ Java750861741010C# ↔ Python813991991111
C# ↔ PHP2934080413C# ↔ VB59770142809
Java ↔ Go7932214431457Java ↔ Python8382174361491
Java ↔ PHP574119239932Java ↔ VB610104210924
Go ↔ Python8873146281828Go ↔ PHP606128258992
Go ↔ VB618116232966PHP ↔ Python9271853701482
PHP ↔ VB2674488399VB ↔ Python644114229987
", + "image_path": "6ea2bfc583331c27bcb5d4e6a79bdd59fce7e2e5d388cec77b8147809be39a8b.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 294, + 525, + 320 + ], + "lines": [ + { + "bbox": [ + 67, + 294, + 525, + 320 + ], + "spans": [ + { + "bbox": [ + 67, + 294, + 525, + 320 + ], + "type": "text", + "content": "Table 11: Composition and Distribution of the Multilingual Dataset. The numbers refer to the number of code pair samples. VB is short for Visual Basic. [Return to Section 3.1]" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 67, + 340, + 290, + 393 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 340, + 290, + 393 + ], + "spans": [ + { + "bbox": [ + 67, + 340, + 290, + 393 + ], + "type": "text", + "content": "sets, which could be costly. Furthermore, due to potential security threats from the execution environment and the code, they need to be run in an isolated sandbox." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 407, + 186, + 420 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 407, + 186, + 420 + ], + "spans": [ + { + "bbox": [ + 67, + 407, + 186, + 420 + ], + "type": "text", + "content": "A.2 Data Management" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 426, + 221, + 438 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 426, + 221, + 438 + ], + "spans": [ + { + "bbox": [ + 67, + 426, + 221, + 438 + ], + "type": "text", + "content": "A.2.1 Data Sources & Licenses" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 67, + 444, + 291, + 578 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 444, + 291, + 578 + ], + "spans": [ + { + "bbox": [ + 67, + 444, + 291, + 578 + ], + "type": "text", + "content": "We collect CodeTransOcean from two different platforms. The MultilingualTrans and NicheTrans datasets are collected from Rosetta Code" + }, + { + "bbox": [ + 67, + 444, + 291, + 578 + ], + "type": "inline_equation", + "content": "^{14}" + }, + { + "bbox": [ + 67, + 444, + 291, + 578 + ], + "type": "text", + "content": ", a programming site presenting solution strategies for identical tasks across as many programming languages as possible, thereby demonstrating both similarities and differences among these languages. We strictly adhere to the data distribution license of the platform as Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license" + }, + { + "bbox": [ + 67, + 444, + 291, + 578 + ], + "type": "inline_equation", + "content": "^{15}" + }, + { + "bbox": [ + 67, + 444, + 291, + 578 + ], + "type": "text", + "content": "." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 580, + 291, + 688 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 580, + 291, + 688 + ], + "spans": [ + { + "bbox": [ + 67, + 580, + 291, + 688 + ], + "type": "text", + "content": "The DLTrans dataset is derived from an open-source teaching platform *Dive into Deep Learning*" + }, + { + "bbox": [ + 67, + 580, + 291, + 688 + ], + "type": "inline_equation", + "content": "^{16}" + }, + { + "bbox": [ + 67, + 580, + 291, + 688 + ], + "type": "text", + "content": ", which is dedicated to teaching deep learning knowledge ranging from theoretical background, conceptual understanding, to coding practices. We strictly adhere to the data distribution license of this platform as *Apache-2.0*" + }, + { + "bbox": [ + 67, + 580, + 291, + 688 + ], + "type": "inline_equation", + "content": "^{17}" + }, + { + "bbox": [ + 67, + 580, + 291, + 688 + ], + "type": "text", + "content": ". To ensure legal and regulated use of these datasets, we require strict" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 302, + 340, + 427, + 353 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 340, + 427, + 353 + ], + "spans": [ + { + "bbox": [ + 302, + 340, + 427, + 353 + ], + "type": "text", + "content": "adherence to these licenses." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 361, + 417, + 375 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 361, + 417, + 375 + ], + "spans": [ + { + "bbox": [ + 302, + 361, + 417, + 375 + ], + "type": "text", + "content": "A.2.2 Data Processing" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 377, + 526, + 486 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 377, + 526, + 486 + ], + "spans": [ + { + "bbox": [ + 302, + 377, + 526, + 486 + ], + "type": "text", + "content": "Multilingual Datasets Given the variations in compilation requirements among programming languages, we keep the original format as much as possible to ensure the compileability of the data while ensuring its accuracy. Additionally, we employ a duplicate-file-detection tool to identify and remove duplicate data from the dataset to avoid any potential data leakage problems during model training." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 493, + 525, + 560 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 493, + 525, + 560 + ], + "spans": [ + { + "bbox": [ + 302, + 493, + 525, + 560 + ], + "type": "text", + "content": "Cross-Framework Dataset To ensure the comparability of Python, we keep the original formatting information. We manually verify all automatically collected samples, identify and exclude samples that do not meet the requirements." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 567, + 402, + 581 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 567, + 402, + 581 + ], + "spans": [ + { + "bbox": [ + 302, + 567, + 402, + 581 + ], + "type": "text", + "content": "A.2.3 Data Quality" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 301, + 584, + 525, + 678 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 301, + 584, + 525, + 678 + ], + "spans": [ + { + "bbox": [ + 301, + 584, + 525, + 678 + ], + "type": "text", + "content": "We randomly select 1K samples from each dataset within CodeTransOcean for manual quality assessment. We find that for the MultilingualTrans dataset with compilation requirements, the comparability rate exceeds " + }, + { + "bbox": [ + 301, + 584, + 525, + 678 + ], + "type": "inline_equation", + "content": "90\\%" + }, + { + "bbox": [ + 301, + 584, + 525, + 678 + ], + "type": "text", + "content": ". We verify that the code pairs in each dataset are functionally identical and confirm that CodeTransOcean is of high quality." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 679, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 679, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 679, + 526, + 772 + ], + "type": "text", + "content": "Additionally, during data collection, we pay special attention to the diversity of domain knowledge and code styles. CodeTransOcean includes various code examples ranging from basic syntactic structures to complex algorithm implementations, as well as building neural networks from scratch and conducting training and inference. This rich" + } + ] + } + ], + "index": 13 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 67, + 698, + 288, + 719 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 698, + 288, + 719 + ], + "spans": [ + { + "bbox": [ + 67, + 698, + 288, + 719 + ], + "type": "inline_equation", + "content": "^{14}" + }, + { + "bbox": [ + 67, + 698, + 288, + 719 + ], + "type": "text", + "content": "https://rosettacode.org/wiki/Rosetta_Code" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 67, + 719, + 286, + 740 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 719, + 286, + 740 + ], + "spans": [ + { + "bbox": [ + 67, + 719, + 286, + 740 + ], + "type": "text", + "content": "15 https://creativecommons.org/licenses/by-sa/4.0/" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 79, + 740, + 261, + 751 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 79, + 740, + 261, + 751 + ], + "spans": [ + { + "bbox": [ + 79, + 740, + 261, + 751 + ], + "type": "text", + "content": "16https://github.com/d2l-ai/d2l-zh" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 79, + 751, + 265, + 772 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 79, + 751, + 265, + 772 + ], + "spans": [ + { + "bbox": [ + 79, + 751, + 265, + 772 + ], + "type": "text", + "content": "17https://github.com/d2l-ai/d2l-zh/ .ob/master/License" + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 286, + 781, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 310, + 791 + ], + "type": "text", + "content": "5082" + } + ] + } + ], + "index": 19 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 15 + }, + { + "para_blocks": [ + { + "bbox": [ + 67, + 71, + 289, + 98 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 71, + 289, + 98 + ], + "spans": [ + { + "bbox": [ + 67, + 71, + 289, + 98 + ], + "type": "text", + "content": "diversity ensures that CodeTransOcean reflects a wide variety of real-world scenarios." + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 68, + 107, + 267, + 133 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 107, + 267, + 133 + ], + "spans": [ + { + "bbox": [ + 68, + 107, + 267, + 133 + ], + "type": "text", + "content": "A.3 Specific Challenges in Implementing Cross-framework Translation" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 67, + 139, + 291, + 356 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 139, + 291, + 356 + ], + "spans": [ + { + "bbox": [ + 67, + 139, + 291, + 356 + ], + "type": "text", + "content": "Firstly, there are significant design differences between frameworks, including data processing methods, model-building strategies, and network connection techniques. Secondly, the inherent complexity of DL code increases the difficulty of conversion, as these codes usually contain various components such as neural network layers, loss functions, optimizers, and learning rate schedulers. Thirdly, there are significant inconsistencies in the code structure of different frameworks, such as code organization and variable naming rules. Lastly, cross-platform compatibility must be considered because DL code may encounter compatibility issues when executing on different hardware platforms (e.g., GPUs, CPUs, TPUs) and operating systems." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 68, + 365, + 256, + 391 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 365, + 256, + 391 + ], + "spans": [ + { + "bbox": [ + 68, + 365, + 256, + 391 + ], + "type": "text", + "content": "A.4 Code Examples on Different Deep Learning Frameworks" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 67, + 396, + 290, + 437 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 396, + 290, + 437 + ], + "spans": [ + { + "bbox": [ + 67, + 396, + 290, + 437 + ], + "type": "text", + "content": "Figures 1 and 2 show the implementation of two different deep learning components in various deep learning frameworks." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 447, + 203, + 460 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 447, + 203, + 460 + ], + "spans": [ + { + "bbox": [ + 68, + 447, + 203, + 460 + ], + "type": "text", + "content": "A.5 Multilingual Modeling" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 465, + 290, + 505 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 465, + 290, + 505 + ], + "spans": [ + { + "bbox": [ + 67, + 465, + 290, + 505 + ], + "type": "text", + "content": "One-to-One For each language pair in the dataset, we train an independent model, e.g., translating " + }, + { + "bbox": [ + 67, + 465, + 290, + 505 + ], + "type": "inline_equation", + "content": "\\mathrm{C + + }" + }, + { + "bbox": [ + 67, + 465, + 290, + 505 + ], + "type": "text", + "content": " to Java." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 513, + 290, + 554 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 513, + 290, + 554 + ], + "spans": [ + { + "bbox": [ + 67, + 513, + 290, + 554 + ], + "type": "text", + "content": "One-to-Many We train individual models from one language to many other languages, e.g., translating Python to all other languages." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 67, + 562, + 290, + 602 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 562, + 290, + 602 + ], + "spans": [ + { + "bbox": [ + 67, + 562, + 290, + 602 + ], + "type": "text", + "content": "Many-to-One We train individual models from multiple languages to one language, e.g., translating all other languages to Python." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 67, + 610, + 289, + 650 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 610, + 289, + 650 + ], + "spans": [ + { + "bbox": [ + 67, + 610, + 289, + 650 + ], + "type": "text", + "content": "Many-to-Many We train a unified model for the multiple to multiple languages in the dataset, which can handle translations between all languages." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 651, + 290, + 692 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 651, + 290, + 692 + ], + "spans": [ + { + "bbox": [ + 67, + 651, + 290, + 692 + ], + "type": "text", + "content": "We ensure all experiments are performed under the same hyperparameters and environment for comparison. Table 13 shows these in detail." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 68, + 702, + 185, + 714 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 702, + 185, + 714 + ], + "spans": [ + { + "bbox": [ + 68, + 702, + 185, + 714 + ], + "type": "text", + "content": "A.6 Prompt Variations" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 67, + 719, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 719, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 719, + 290, + 772 + ], + "type": "text", + "content": "Role Assignment (Peng et al., 2023; AlKhamissi et al., 2023; Wu et al., 2023; Akin, 2023) We configured two distinct roles for the model, each with unique skills. This arrangement empowers the" + } + ] + } + ], + "index": 12 + }, + { + "type": "code", + "bbox": [ + 307, + 85, + 525, + 164 + ], + "blocks": [ + { + "bbox": [ + 304, + 68, + 345, + 80 + ], + "lines": [ + { + "bbox": [ + 304, + 68, + 345, + 80 + ], + "spans": [ + { + "bbox": [ + 304, + 68, + 345, + 80 + ], + "type": "text", + "content": "PyTorch" + } + ] + } + ], + "index": 13, + "angle": 0, + "type": "code_caption" + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "lines": [ + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "spans": [ + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "text", + "content": "1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): \n2 def forward(self, pred, label, valid_len): \n3 weights " + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "text", + "content": " torch.ones_like.label) \n4 weights " + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "text", + "content": " sequence_mask(weights,valid_len) \n5 self.reduce " + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "inline_equation", + "content": "\\equiv" + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "text", + "content": " 'none' \n6 unweighted_loss " + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "text", + "content": " super(MaskedSoftmaxCELoss,self).forward( \n7 pred.permute(0,2,1),label) \n8 weighted_loss " + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 307, + 85, + 525, + 164 + ], + "type": "text", + "content": " (unweighted_loss \\* weights).mean( dim=1) \n9 return weighted_loss" + } + ] + } + ], + "index": 14, + "angle": 0, + "type": "code_body" + } + ], + "index": 14, + "sub_type": "code", + "guess_lang": "python" + }, + { + "type": "code", + "bbox": [ + 307, + 185, + 520, + 305 + ], + "blocks": [ + { + "bbox": [ + 304, + 169, + 361, + 179 + ], + "lines": [ + { + "bbox": [ + 304, + 169, + 361, + 179 + ], + "spans": [ + { + "bbox": [ + 304, + 169, + 361, + 179 + ], + "type": "text", + "content": "TensorFlow" + } + ] + } + ], + "index": 15, + "angle": 0, + "type": "code_caption" + }, + { + "bbox": [ + 307, + 185, + 520, + 305 + ], + "lines": [ + { + "bbox": [ + 307, + 185, + 520, + 305 + ], + "spans": [ + { + "bbox": [ + 307, + 185, + 520, + 305 + ], + "type": "text", + "content": "1 class MaskedSoftmaxCELoss(tf.keras.losses.Loss): \n2 def __init__(self, valid_len): \n3 super().init_(reduction='none') \n4 self.valid_len = valid_len \n5 \n6 def call(self, label, pred): \n7 weights = tf.ones_like.label, dtype=tf.float32) \n8 weights = sequence_mask(weights, self.valid_len) \n9 label_one-hot = tf.one-hot.label, depth=pred.shape[-1]) \n10 unweighted_loss = tf.keras.losses. CategoricalCrossentropy( from_logits=True, reduction='none')( label_one-hot, pred) \n11 weighted_loss = tf.reduce_mean((unweighted_loss* weights), axis=1) \n13 return weighted_loss" + } + ] + } + ], + "index": 16, + "angle": 0, + "type": "code_body" + } + ], + "index": 16, + "sub_type": "code", + "guess_lang": "python" + }, + { + "type": "code", + "bbox": [ + 308, + 326, + 521, + 383 + ], + "blocks": [ + { + "bbox": [ + 304, + 310, + 340, + 321 + ], + "lines": [ + { + "bbox": [ + 304, + 310, + 340, + 321 + ], + "spans": [ + { + "bbox": [ + 304, + 310, + 340, + 321 + ], + "type": "text", + "content": "MXNet" + } + ] + } + ], + "index": 17, + "angle": 0, + "type": "code_caption" + }, + { + "bbox": [ + 308, + 326, + 521, + 383 + ], + "lines": [ + { + "bbox": [ + 308, + 326, + 521, + 383 + ], + "spans": [ + { + "bbox": [ + 308, + 326, + 521, + 383 + ], + "type": "text", + "content": "1 class MaskedSoftmaxCELoss(gluon.loss.SoftmaxCELoss): \n2 def forward(self, pred, label, valid_len): \n3 weights = npexpand_dims(np.ones_like.label), axis=1) \n4 weights = npx(sequenceMask(weights, valid_len, True, axis=1)) \n5 return super(MaskedSoftmaxCELoss, self).forward(pred, label, weights)" + } + ] + } + ], + "index": 18, + "angle": 0, + "type": "code_body" + } + ], + "index": 18, + "sub_type": "code", + "guess_lang": "prolog" + }, + { + "type": "code", + "bbox": [ + 308, + 403, + 524, + 482 + ], + "blocks": [ + { + "bbox": [ + 304, + 387, + 338, + 398 + ], + "lines": [ + { + "bbox": [ + 304, + 387, + 338, + 398 + ], + "spans": [ + { + "bbox": [ + 304, + 387, + 338, + 398 + ], + "type": "text", + "content": "Paddle" + } + ] + } + ], + "index": 19, + "angle": 0, + "type": "code_caption" + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "lines": [ + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "spans": [ + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "text", + "content": "1 class MaskedSoftmaxCELoss(nn.CrossEntropyLoss): \n2 def forward(self, pred, label, valid_len): \n3 weights " + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "text", + "content": " paddle.ones_like.label) \n4 weights " + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "text", + "content": " sequence_mask(weights,valid_len) \n5 self.reduction " + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "inline_equation", + "content": "\\equiv" + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "text", + "content": " 'none' \n6 unweighted_loss " + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "text", + "content": " super(MaskedSoftmaxCELoss,self).forward( \n7 pred, label) \n8 weighted_loss " + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 308, + 403, + 524, + 482 + ], + "type": "text", + "content": " (unweighted_loss \\* weights).mean( axis=1) \n9 return weighted_loss" + } + ] + } + ], + "index": 20, + "angle": 0, + "type": "code_body" + } + ], + "index": 20, + "sub_type": "code", + "guess_lang": "python" + }, + { + "bbox": [ + 302, + 498, + 525, + 522 + ], + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 498, + 525, + 522 + ], + "spans": [ + { + "bbox": [ + 302, + 498, + 525, + 522 + ], + "type": "text", + "content": "Figure 1: Softmax cross-entropy loss function with masking in PyTorch, TensorFlow, MXNet and Paddle." + } + ] + } + ], + "index": 21, + "type": "text" + }, + { + "bbox": [ + 302, + 542, + 525, + 570 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 542, + 525, + 570 + ], + "spans": [ + { + "bbox": [ + 302, + 542, + 525, + 570 + ], + "type": "text", + "content": "model to simulate more domain-adaptable and specialized expert roles." + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 302, + 576, + 525, + 698 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 576, + 525, + 698 + ], + "spans": [ + { + "bbox": [ + 302, + 576, + 525, + 698 + ], + "type": "text", + "content": "Polite inquiry (Akin, 2023) These strategies add polite expression and set up imperative and interrogative requests. Given that ChatGPT is designed to simulate human conversation styles as closely as possible, including understanding and simulating polite language expressions. Therefore, we expect these strategies to boost the comprehension of the model and augment the quality of its generated results." + } + ] + } + ], + "index": 23 + }, + { + "bbox": [ + 302, + 706, + 524, + 759 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 706, + 524, + 759 + ], + "spans": [ + { + "bbox": [ + 302, + 706, + 524, + 759 + ], + "type": "text", + "content": "Clarify usage This strategy aims to make the model clearly aware of its requirements during the code translation process - the generated code needs to be guaranteed to execute without issues." + } + ] + } + ], + "index": 24 + }, + { + "bbox": [ + 302, + 760, + 524, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 760, + 524, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 760, + 524, + 772 + ], + "type": "text", + "content": "The translation prompts of the above four strategies" + } + ] + } + ], + "index": 25 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5083" + } + ] + } + ], + "index": 26 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 16 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 83, + 68, + 510, + 354 + ], + "blocks": [ + { + "bbox": [ + 83, + 68, + 510, + 354 + ], + "lines": [ + { + "bbox": [ + 83, + 68, + 510, + 354 + ], + "spans": [ + { + "bbox": [ + 83, + 68, + 510, + 354 + ], + "type": "table", + "html": "
MethodTrainDevTestTotalMethodTrainDevTestTotal
Ada60224649377423Elixir36182975994514
Arturo38024709475219Erlang32692174493935
AutoHotKey430555511205980Factor472486017567340
AWK388057811625620Forth36193396904648
BBC Basic36632394854387Fortran40503056174972
Clojure36173106334560Groovy37732274674467
Common Lisp50854679336485Haskell5647104520978789
D554182516628028Icon26461583263130
Delphi35474368894872J5476120424229102
Julia58291511305510395Ruby5793129026009683
Lua531667713667359COBOL24381673552960
Mathematica5485104621058636REXX5595111822418954
MATLAB28721573223351R28031974023402
Nim5814132126759810Racket564690118178364
OCaml42864058175508Rust514671714397302
Pascal33934659424800Tcl535474015027596
Perl58181445291410177PowerShell35632404904293
Scala5852107421649090F#451763812876442
Swift36534048184875
", + "image_path": "f0cace98cc4d7f929bf025e21b033b115bada33ed11b4aaf6fd9eb9a9facd2cd.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 69, + 393, + 289, + 491 + ], + "blocks": [ + { + "bbox": [ + 77, + 362, + 515, + 375 + ], + "lines": [ + { + "bbox": [ + 77, + 362, + 515, + 375 + ], + "spans": [ + { + "bbox": [ + 77, + 362, + 515, + 375 + ], + "type": "text", + "content": "Table 12: The number of code samples for each language in the NicheTrans datasets. [Return to Section 3.1]" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 69, + 393, + 289, + 491 + ], + "lines": [ + { + "bbox": [ + 69, + 393, + 289, + 491 + ], + "spans": [ + { + "bbox": [ + 69, + 393, + 289, + 491 + ], + "type": "table", + "html": "
MultilingualTransNicheTransDLTrans
Learning rate3e-52e-53e-5
Beam size115
Max source length15361536512
Max target length15361536512
Batch size16
Max epoch5
Fp16True
GPUNVIDIA Tesla V100 32GB
", + "image_path": "bcf438ca098eaf8e94dce34e823932c140e4e106a40a5f999db05a7cbb5edea6.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 499, + 290, + 535 + ], + "lines": [ + { + "bbox": [ + 67, + 499, + 290, + 535 + ], + "spans": [ + { + "bbox": [ + 67, + 499, + 290, + 535 + ], + "type": "text", + "content": "Table 13: Parameters and hardware configuration for training CodeT5+_220M (220M is the model size) on CodeTransOcean." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + }, + { + "bbox": [ + 68, + 560, + 169, + 573 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 560, + 169, + 573 + ], + "spans": [ + { + "bbox": [ + 68, + 560, + 169, + 573 + ], + "type": "text", + "content": "are shown in Table 15." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 68, + 589, + 142, + 601 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 68, + 589, + 142, + 601 + ], + "spans": [ + { + "bbox": [ + 68, + 589, + 142, + 601 + ], + "type": "text", + "content": "A.7 One-Shot" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 67, + 610, + 290, + 678 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 610, + 290, + 678 + ], + "spans": [ + { + "bbox": [ + 67, + 610, + 290, + 678 + ], + "type": "text", + "content": "Experiment #1 selects a training sample from a high-resource language code pair as an example. In this case, the target language type aligns with the target language type of the translation request, but the source language does not." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "spans": [ + { + "bbox": [ + 67, + 692, + 290, + 772 + ], + "type": "text", + "content": "Experiment #2 selects a code pair whose source and target language directions are congruent with the translation requirements as an example. That is, the source and target languages of the example dynamically adjust following the translation requirements." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 302, + 396, + 525, + 464 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 396, + 525, + 464 + ], + "spans": [ + { + "bbox": [ + 302, + 396, + 525, + 464 + ], + "type": "text", + "content": "Experiment #3 randomly selects a code pair as an example, in which neither the source nor the target languages match the translation requirements. The specific translation prompts are shown in Table 19." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 302, + 474, + 417, + 487 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 474, + 417, + 487 + ], + "spans": [ + { + "bbox": [ + 302, + 474, + 417, + 487 + ], + "type": "text", + "content": "A.8 Chain of Thought" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 302, + 491, + 525, + 547 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 491, + 525, + 547 + ], + "spans": [ + { + "bbox": [ + 302, + 491, + 525, + 547 + ], + "type": "text", + "content": "Experiment #1 First, describe the function of the source code in the natural language, then translate it according to the source code and the corresponding natural language description." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 302, + 554, + 525, + 620 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 554, + 525, + 620 + ], + "spans": [ + { + "bbox": [ + 302, + 554, + 525, + 620 + ], + "type": "text", + "content": "Experiment #2 First, let ChatGPT understand the function of the source code, followed by the translation, while ensuring that the function of the code remains unchanged during the translation process." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 302, + 629, + 525, + 698 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 629, + 525, + 698 + ], + "spans": [ + { + "bbox": [ + 302, + 629, + 525, + 698 + ], + "type": "text", + "content": "Experiment #3 First, let ChatGPT understand the function of the source code, then predict the output result of the source code, and finally perform the translation, demanding that the translated code successfully executes." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 302, + 706, + 526, + 772 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 706, + 526, + 772 + ], + "spans": [ + { + "bbox": [ + 302, + 706, + 526, + 772 + ], + "type": "text", + "content": "Experiment #4 Building upon Experiment #3 and the one-shot approach of Experiment #2, we introduce a CoT one-shot variation. That is, first, provide a case in the same direction for ChatGPT reference, then require it to understand the func" + } + ] + } + ], + "index": 13 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5084" + } + ] + } + ], + "index": 14 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 17 + }, + { + "para_blocks": [ + { + "bbox": [ + 70, + 91, + 112, + 104 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 70, + 91, + 112, + 104 + ], + "spans": [ + { + "bbox": [ + 70, + 91, + 112, + 104 + ], + "type": "text", + "content": "PyTorch" + } + ] + } + ], + "index": 0 + }, + { + "type": "code", + "bbox": [ + 74, + 108, + 285, + 249 + ], + "blocks": [ + { + "bbox": [ + 74, + 108, + 285, + 249 + ], + "lines": [ + { + "bbox": [ + 74, + 108, + 285, + 249 + ], + "spans": [ + { + "bbox": [ + 74, + 108, + 285, + 249 + ], + "type": "text", + "content": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 self_embedding = nn.Embedding(vocab_size, embed_size) \n5 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout) \n6 self>dense = nn.Linear(num_hiddens, vocab_size) \n7 \n8 def init_state(self, enc_outputs, *args): \n9 return enc_outputs[1] \n10 \n11 def forward(self, X, state): \n12 X = self_embedding(X).permute(1, 0, 2) \n13 context = state[-1].repeat(X.shape[0], 1, 1) \n14 X_and_context = torch.cat((X, context), 2) \n15 output, state = self.rnn(X_and_context, state) \n16 output = self.dense(output).permute(1, 0, 2) \n17 return output, state" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "code_body" + } + ], + "index": 1, + "sub_type": "code", + "guess_lang": "python" + }, + { + "bbox": [ + 71, + 310, + 107, + 322 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 71, + 310, + 107, + 322 + ], + "spans": [ + { + "bbox": [ + 71, + 310, + 107, + 322 + ], + "type": "text", + "content": "MXNet" + } + ] + } + ], + "index": 2 + }, + { + "type": "code", + "bbox": [ + 74, + 327, + 286, + 481 + ], + "blocks": [ + { + "bbox": [ + 74, + 327, + 286, + 481 + ], + "lines": [ + { + "bbox": [ + 74, + 327, + 286, + 481 + ], + "spans": [ + { + "bbox": [ + 74, + 327, + 286, + 481 + ], + "type": "text", + "content": "1 class Seq2SeqDecoder(d21.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 selfembedding = nn.Embedding(vocab_size, embed_size) \n5 self.rnn = rnn.GRU(num_hiddens, num_layers, dropout=dropout) \n6 self.dense = nn.Dense(vocab_size, flatten=False) \n7 \n8 def init_state(self, enc_outputs, *args): \n9 return enc_outputs[1] \n10 \n11 def forward(self, x, state): \n12 X = self_embedding(X).swapaxes(0, 1) \n13 context = state[0][-1] \n14 context = nproadcast_to(context, (X.shape[0], context.shape[0], context.shape[1])) \n15 X_and_context = np concatenate((X, context), 2) \n16 output, state = self.rnn(X_and_context, state) \n17 output = self.dense(output).swapaxes(0, 1) \n18 return output, state" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "code_body" + } + ], + "index": 3, + "sub_type": "code", + "guess_lang": "python" + }, + { + "bbox": [ + 302, + 68, + 359, + 79 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 68, + 359, + 79 + ], + "spans": [ + { + "bbox": [ + 302, + 68, + 359, + 79 + ], + "type": "text", + "content": "TensorFlow" + } + ] + } + ], + "index": 4 + }, + { + "type": "code", + "bbox": [ + 305, + 84, + 521, + 274 + ], + "blocks": [ + { + "bbox": [ + 305, + 84, + 521, + 274 + ], + "lines": [ + { + "bbox": [ + 305, + 84, + 521, + 274 + ], + "spans": [ + { + "bbox": [ + 305, + 84, + 521, + 274 + ], + "type": "text", + "content": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super().__init__(**kwargs) \n4 self_embedding = tf keras.layers.Embedding(vocab_size, embed_size) \n5 self.rnn = tf keras.layers.RNN(tf keras.layers.StackedRNNCells() \n6 [tf keras.layers.GRUCell(num_hiddens, dropout=dropout) \n7 for _ in range(num_layers)], return_sequences=True, return_state=True) \n8 self.dense = tf keras.layers.Dense(vocab_size) \n9 \n10 def init_state(self, enc_outputs, *args): \n11 return enc_outputs[1] \n12 \n13 def call(self, X, state, **kwargs): \n14 X = self_embedding(X) \n15 context = tf.reduce(tfexpand_dims(state[-1], axis=1), repeats=X.shape[1], axis=1) \n16 X_and_context = tf.cat((X(context), axis=2)) \n17 rnn_output = self.rnn(X_and_context, state, ** kwargs) \n18 output = self>dense(rnn_output[0]) \n19 return output, rnn_output[1:]" + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "code_body" + } + ], + "index": 5, + "sub_type": "code", + "guess_lang": "python" + }, + { + "bbox": [ + 302, + 279, + 337, + 290 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 302, + 279, + 337, + 290 + ], + "spans": [ + { + "bbox": [ + 302, + 279, + 337, + 290 + ], + "type": "text", + "content": "Paddle" + } + ] + } + ], + "index": 6 + }, + { + "type": "code", + "bbox": [ + 305, + 295, + 521, + 513 + ], + "blocks": [ + { + "bbox": [ + 305, + 295, + 521, + 513 + ], + "lines": [ + { + "bbox": [ + 305, + 295, + 521, + 513 + ], + "spans": [ + { + "bbox": [ + 305, + 295, + 521, + 513 + ], + "type": "text", + "content": "1 class Seq2SeqDecoder(d2l.Decoder): \n2 def __init__(self, vocab_size, embed_size, num_hiddens, num_layers, dropout=0, **kwargs): \n3 super(Seq2SeqDecoder, self).__init__(**kwargs) \n4 self_embedding = nn.Embedding(vocab_size, embed_size) \n5 weight_attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n6 weight ih attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n7 weight hh attr = paddle.ParamAttr(initializer=nn.initializer.XavierUniform()) \n8 self.rnn = nn.GRU(embed_size + num_hiddens, num_hiddens, num_layers, dropout=dropout, time major=True, weight ih attr =weight ih attr, weight hh attr = weight hh attr) \n9 \n10 self.dense = nn.Linear(num_hiddens, vocab_size, weight_attr=weight_attr) \n11 \n12 def init_state(self, enc_outputs, *args): \n13 return enc_outputs[1] \n14 \n15 def forward(self, X, state): \n16 X = self_embedding(X).transpose([1, 0, 2]) \n17 context = state[-1].tile([X.shape[0], 1, 1]) \n18 X_and_context = paddle跖cat((X, context), 2) \n19 output, state = self.rnn(X_and_context, state) \n20 output = selfdense(output).transpose([1, 0, 2]) \n21 return output, state" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "code_body" + } + ], + "index": 7, + "sub_type": "code", + "guess_lang": "python" + }, + { + "bbox": [ + 67, + 528, + 524, + 552 + ], + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 528, + 524, + 552 + ], + "spans": [ + { + "bbox": [ + 67, + 528, + 524, + 552 + ], + "type": "text", + "content": "Figure 2: Implementing RNN Decoder for Seq2Seq Learning in PyTorch, TensorFlow, MXNet and Paddle. [Return to Section 3.2]" + } + ] + } + ], + "index": 8, + "type": "text" + }, + { + "bbox": [ + 67, + 574, + 290, + 627 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 574, + 290, + 627 + ], + "spans": [ + { + "bbox": [ + 67, + 574, + 290, + 627 + ], + "type": "text", + "content": "tion of the source code, then predict the output of the source code, and finally translate it, with the condition that the translated code must successfully execute." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 67, + 629, + 289, + 653 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 629, + 289, + 653 + ], + "spans": [ + { + "bbox": [ + 67, + 629, + 289, + 653 + ], + "type": "text", + "content": "The specific translation prompts are shown in Table 19." + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5085" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 18 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 68, + 156, + 525, + 602 + ], + "blocks": [ + { + "bbox": [ + 68, + 156, + 525, + 602 + ], + "lines": [ + { + "bbox": [ + 68, + 156, + 525, + 602 + ], + "spans": [ + { + "bbox": [ + 68, + 156, + 525, + 602 + ], + "type": "table", + "html": "
MethodCC++C#GoVBPythonJavaPHP
CNaive-14.619.084.521.642.1711.232.09
OtO-11.13±0.284.77±0.858.18±0.402.02±0.231.85±0.146.50±2.911.71±0.32
OtM-12.33±0.587.56±0.989.58±0.742.22±0.892.82±0.588.92±0.673.42±0.09
MtO-7.99±1.945.35±0.416.94±0.833.77±0.442.09±0.258.65±0.521.93±0.49
MtM-9.61±0.327.15±1.417.54±0.332.30±0.712.11±0.438.29±0.453.30±0.92
C++Naive14.88-10.083.873.761.6911.391.92
OtO10.58±0.37-6.52±1.966.77±1.082.34±0.901.82±0.379.41±1.591.50±0.03
OtM13.32±2.46-9.87±1.159.83±1.372.62±1.152.93±0.1812.10±1.512.87±0.82
MtO10.54±2.33-6.98±1.467.29±0.733.57±0.742.28±0.187.82±1.261.96±0.20
MtM9.92±1.14-7.79±1.497.70±0.482.06±0.742.38±0.3010.20±1.204.12±0.81
C#Naive9.0510.03-5.057.201.8313.602.58
OtO5.41±1.256.45±1.68-7.10±0.639.42±5.501.73±0.4610.55±1.671.97±0.76
OtM7.42±1.828.99±0.17-9.81±0.686.13±2.922.80±0.4311.92±2.524.55±0.81
MtO6.37±0.696.13±1.60-7.53±0.949.92±1.002.47±0.6210.16±1.401.70±0.20
MtM6.19±0.887.22±0.93-9.36±0.924.60±2.872.23±0.3612.50±1.354.70±0.27
GoNaive4.523.755.04-2.463.006.562.14
OtO5.65±0.416.88±0.474.70±1.28-1.87±0.542.89±0.165.41±1.062.48±0.23
OtM6.06±0.996.56±0.897.28±0.82-2.12±0.653.32±0.368.79±1.063.48±0.20
MtO5.41±0.634.77±0.766.89±0.33-2.94±0.633.12±0.487.81±0.321.79±0.51
MtM5.18±1.236.06±0.287.12±0.72-1.82±0.932.83±0.508.99±1.282.55±0.40
VBNaive1.643.767.292.54-1.422.890.46
OtO3.96±0.205.25±0.6817.34±1.795.85±0.64-1.34±0.065.51±0.430.61±0.18
OtM5.15±0.156.10±0.3019.63±1.037.83±0.45-2.02±0.327.91±0.922.02±0.20
MtO4.25±0.864.15±1.0911.96±1.966.38±0.45-1.66±0.587.26±1.391.18±0.33
MtM5.18±0.655.09±0.1514.13±1.836.97±1.30-2.34±0.118.39±0.772.92±0.22
PythonNaive1.731.141.442.500.89-1.821.28
OtO4.35±0.443.66±0.955.38±0.765.67±0.342.53±1.11-4.70±0.073.24±0.60
OtM4.51±1.335.18±0.526.48±0.716.04±0.961.50±0.56-6.29±0.396.55±0.94
MtO4.70±0.283.44±0.765.48±0.554.80±0.632.42±0.18-5.32±0.662.74±0.39
MtM4.54±0.674.74±0.145.69±0.725.84±0.362.09±0.94-6.45±0.114.49±0.63
JavaNaive11.2311.1513.446.572.842.24-2.60
OtO7.15±1.599.09±1.0010.92±1.6111.05±0.522.66±0.132.54±0.35-2.05±0.95
OtM9.27±1.529.33±0.8613.52±0.9512.57±0.962.92±0.783.98±0.86-6.20±1.08
MtO6.69±0.836.32±1.6610.57±1.168.79±0.443.91±0.572.86±0.36-2.48±0.34
MtM6.56±0.337.60±0.469.40±1.088.30±0.872.20±0.852.53±0.15-3.57±0.94
PHPNaive1.791.512.362.000.371.302.30-
OtO4.18±1.442.91±0.436.45±0.435.85±0.540.42±0.091.98±0.266.47±0.59-
OtM3.78±1.801.93±1.355.51±0.605.13±0.600.56±0.362.70±0.805.51±1.91-
MtO4.97±1.093.69±0.466.08±3.036.44±0.782.28±0.123.55±0.188.66±0.84-
MtM6.03±0.615.15±0.6710.64±1.276.69±0.311.69±0.572.46±0.467.87±1.90-
", + "image_path": "64ad9d57f511fc7a98b79ea7680086ab564d8658f71530e237ceaaf8f1e198ee.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 69, + 609, + 524, + 681 + ], + "lines": [ + { + "bbox": [ + 69, + 609, + 524, + 681 + ], + "spans": [ + { + "bbox": [ + 69, + 609, + 524, + 681 + ], + "type": "text", + "content": "Table 14: BLEU scores from different multilingual modeling strategies by fine-tuning the pre-trained CodeT5+_220M model (220M is the model size) (Wang et al., 2023b). Naive denotes Naive Copy, which directly duplicates the source code as the target code without making any modifications. Method OtO, OtM, MtO, and MtM denote One-to-One, One-to-Many, Many-to-One, and Many-to-Many, respectively. The rows correspond to the source language while the columns correspond to the target language. We run each experiment with three different random seeds and report the mean and standard deviation of BLEU scores. [Return to Section 4.1.]" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 287, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 287, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 287, + 781, + 309, + 791 + ], + "type": "text", + "content": "5086" + } + ] + } + ], + "index": 2 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 19 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 134, + 79, + 459, + 581 + ], + "blocks": [ + { + "bbox": [ + 134, + 79, + 459, + 581 + ], + "lines": [ + { + "bbox": [ + 134, + 79, + 459, + 581 + ], + "spans": [ + { + "bbox": [ + 134, + 79, + 459, + 581 + ], + "type": "table", + "html": "
MethodTranslation Prompt
Role Assignment #1"role": "system", "content": "Your are a code translation system.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #2"role": "system", "content": "You are a code translation system that specializes in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #3"role": "system", "content": "You are a programmer proficient in multiple programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Role Assignment #4"role": "system", "content": "You are a programmer proficient in [SL] and [TL] programming languages.", "role": "user", "content": "Please provide the [TL] translation for the following [SL] code:[SC]
Polite Inquiry #1Please translate the following [SL] code into [TL] code:[SC]
Polite Inquiry #2Can you rewrite this [SL] code in [TL]? [SC]
Clarify UsageTranslating [SL] to [TL] ensures that Python code can be executed. [SC]
Divide & ConquerTranslate [SL] to [TL]: [SC]
", + "image_path": "b09776464eaa41cabb1ddc345e4af3d570a408e13422002e397edd614c575cf8.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "type": "table", + "bbox": [ + 69, + 639, + 526, + 727 + ], + "blocks": [ + { + "bbox": [ + 67, + 588, + 525, + 614 + ], + "lines": [ + { + "bbox": [ + 67, + 588, + 525, + 614 + ], + "spans": [ + { + "bbox": [ + 67, + 588, + 525, + 614 + ], + "type": "text", + "content": "Table 15: Translation prompts for prompt variants and contextual strategies on ChatGPT. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language. [Return to Section 4.3]" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 69, + 639, + 526, + 727 + ], + "lines": [ + { + "bbox": [ + 69, + 639, + 526, + 727 + ], + "spans": [ + { + "bbox": [ + 69, + 639, + 526, + 727 + ], + "type": "table", + "html": "
StrategyTemp.EMBLEUCodeBLEUDSR@0StrategyTop-KEMBLEUCodeBLEUDSR@0
Top-K=000.5710.8324.4548.57%Temp.=000.5710.8324.4548.57%
0.20.5710.8224.4347.71%0.20.5710.8124.4548.29%
0.40.5710.8024.3748.00%0.40.5710.8124.4448.29%
0.60.5710.7824.4548.00%0.60.5710.8224.4248.29%
0.80.5710.8224.4947.71%0.80.5710.8024.3847.71%
1.00.5710.8124.4148.00%1.00.5710.8124.3848.00%
", + "image_path": "2cb5b8c4ca4ffad12a508ce9c81dbe78640b0b1eb836563dc43ff7edfda7ce23.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_body" + } + ], + "index": 2 + }, + { + "bbox": [ + 67, + 735, + 525, + 759 + ], + "lines": [ + { + "bbox": [ + 67, + 735, + 525, + 759 + ], + "spans": [ + { + "bbox": [ + 67, + 735, + 525, + 759 + ], + "type": "text", + "content": "Table 16: Code translation performance of ChatGPT under different parameter settings. Temp. refers to temperature. [Return to Section 4.3]" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5087" + } + ] + } + ], + "index": 4 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 20 + }, + { + "para_blocks": [ + { + "bbox": [ + 85, + 127, + 153, + 141 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 85, + 127, + 153, + 141 + ], + "spans": [ + { + "bbox": [ + 85, + 127, + 153, + 141 + ], + "type": "text", + "content": "Self-debug@0" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 198, + 156, + 485, + 170 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 198, + 156, + 485, + 170 + ], + "spans": [ + { + "bbox": [ + 198, + 156, + 485, + 170 + ], + "type": "text", + "content": "Translate [source_language] to [target_language]: [source_code]." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 493, + 153, + 509, + 168 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 493, + 153, + 509, + 168 + ], + "spans": [ + { + "bbox": [ + 493, + 153, + 509, + 168 + ], + "type": "text", + "content": "CTO" + } + ] + } + ], + "index": 2 + }, + { + "type": "image", + "bbox": [ + 82, + 174, + 101, + 193 + ], + "blocks": [ + { + "bbox": [ + 82, + 174, + 101, + 193 + ], + "lines": [ + { + "bbox": [ + 82, + 174, + 101, + 193 + ], + "spans": [ + { + "bbox": [ + 82, + 174, + 101, + 193 + ], + "type": "image", + "image_path": "3a74811546de4d1af7aa37ef432dc41b7f5159de9c2483282fef0ed1cd5b6377.jpg" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_body" + } + ], + "index": 3 + }, + { + "bbox": [ + 104, + 179, + 304, + 192 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 104, + 179, + 304, + 192 + ], + "spans": [ + { + "bbox": [ + 104, + 179, + 304, + 192 + ], + "type": "text", + "content": "Here is the [target_language] code equivalent" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 104, + 193, + 349, + 206 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 104, + 193, + 349, + 206 + ], + "spans": [ + { + "bbox": [ + 104, + 193, + 349, + 206 + ], + "type": "text", + "content": "of the given [source_language] code: [translated_code]." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 85, + 213, + 153, + 227 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 85, + 213, + 153, + 227 + ], + "spans": [ + { + "bbox": [ + 85, + 213, + 153, + 227 + ], + "type": "text", + "content": "Self-debug@n" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 228, + 233, + 489, + 259 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 228, + 233, + 489, + 259 + ], + "spans": [ + { + "bbox": [ + 228, + 233, + 489, + 259 + ], + "type": "text", + "content": "The above python code executes with the following errors, please correct them. [Compiler reports errors]" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 493, + 229, + 509, + 245 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 493, + 229, + 509, + 245 + ], + "spans": [ + { + "bbox": [ + 493, + 229, + 509, + 245 + ], + "type": "text", + "content": "CTO" + } + ] + } + ], + "index": 8 + }, + { + "type": "image", + "bbox": [ + 82, + 260, + 101, + 280 + ], + "blocks": [ + { + "bbox": [ + 82, + 260, + 101, + 280 + ], + "lines": [ + { + "bbox": [ + 82, + 260, + 101, + 280 + ], + "spans": [ + { + "bbox": [ + 82, + 260, + 101, + 280 + ], + "type": "image", + "image_path": "3ebce668c0b38ae85b19b0b90b2b829e62fa821d692df2591b34172a63508b41.jpg" + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "image_body" + } + ], + "index": 9 + }, + { + "bbox": [ + 104, + 265, + 382, + 280 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 104, + 265, + 382, + 280 + ], + "spans": [ + { + "bbox": [ + 104, + 265, + 382, + 280 + ], + "type": "text", + "content": "Here is the modified [target_language] code: [translated_code]." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 67, + 291, + 524, + 317 + ], + "angle": 0, + "lines": [ + { + "bbox": [ + 67, + 291, + 524, + 317 + ], + "spans": [ + { + "bbox": [ + 67, + 291, + 524, + 317 + ], + "type": "text", + "content": "Table 17: A simple demo: Translation prompting of ChatGPT in the multi-round debugging strategy. The content in red is returned by the compiler. [Return to section 4.3.]" + } + ] + } + ], + "index": 11, + "type": "text" + }, + { + "bbox": [ + 85, + 436, + 185, + 449 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 85, + 436, + 185, + 449 + ], + "spans": [ + { + "bbox": [ + 85, + 436, + 185, + 449 + ], + "type": "text", + "content": "Zero-shot prompting" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 232, + 465, + 485, + 479 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 232, + 465, + 485, + 479 + ], + "spans": [ + { + "bbox": [ + 232, + 465, + 485, + 479 + ], + "type": "text", + "content": "Does the following Python code execute? [python_code]." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 493, + 460, + 509, + 476 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 493, + 460, + 509, + 476 + ], + "spans": [ + { + "bbox": [ + 493, + 460, + 509, + 476 + ], + "type": "text", + "content": "CTO" + } + ] + } + ], + "index": 14 + }, + { + "type": "image", + "bbox": [ + 83, + 482, + 101, + 501 + ], + "blocks": [ + { + "bbox": [ + 83, + 482, + 101, + 501 + ], + "lines": [ + { + "bbox": [ + 83, + 482, + 101, + 501 + ], + "spans": [ + { + "bbox": [ + 83, + 482, + 101, + 501 + ], + "type": "image", + "image_path": "5793b71ac1800d590d464d56bd1830c8a6a92cb46cf9712bce0b208ece634004.jpg" + } + ] + } + ], + "index": 15, + "angle": 0, + "type": "image_body" + } + ], + "index": 15 + }, + { + "bbox": [ + 104, + 487, + 304, + 500 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 104, + 487, + 304, + 500 + ], + "spans": [ + { + "bbox": [ + 104, + 487, + 304, + 500 + ], + "type": "text", + "content": "Yes, the Python code executes without errors." + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 218, + 518, + 485, + 533 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 218, + 518, + 485, + 533 + ], + "spans": [ + { + "bbox": [ + 218, + 518, + 485, + 533 + ], + "type": "text", + "content": "Please predict the executed output of the Python code above." + } + ] + } + ], + "index": 17 + }, + { + "bbox": [ + 493, + 515, + 509, + 531 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 493, + 515, + 509, + 531 + ], + "spans": [ + { + "bbox": [ + 493, + 515, + 509, + 531 + ], + "type": "text", + "content": "CTO" + } + ] + } + ], + "index": 18 + }, + { + "type": "image", + "bbox": [ + 82, + 537, + 101, + 555 + ], + "blocks": [ + { + "bbox": [ + 82, + 537, + 101, + 555 + ], + "lines": [ + { + "bbox": [ + 82, + 537, + 101, + 555 + ], + "spans": [ + { + "bbox": [ + 82, + 537, + 101, + 555 + ], + "type": "image", + "image_path": "275f577a0869f194476f2efdd99bd7b37d41f1fa68958d021ba7891587b6f9db.jpg" + } + ] + } + ], + "index": 19, + "angle": 0, + "type": "image_body" + } + ], + "index": 19 + }, + { + "bbox": [ + 104, + 541, + 402, + 555 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 104, + 541, + 402, + 555 + ], + "spans": [ + { + "bbox": [ + 104, + 541, + 402, + 555 + ], + "type": "text", + "content": "The predicted execution result of the Python code above is [output]." + } + ] + } + ], + "index": 20 + }, + { + "bbox": [ + 85, + 561, + 182, + 575 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 85, + 561, + 182, + 575 + ], + "spans": [ + { + "bbox": [ + 85, + 561, + 182, + 575 + ], + "type": "text", + "content": "Few-shot prompting" + } + ] + } + ], + "index": 21 + }, + { + "bbox": [ + 96, + 590, + 489, + 614 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 96, + 590, + 489, + 614 + ], + "spans": [ + { + "bbox": [ + 96, + 590, + 489, + 614 + ], + "type": "text", + "content": "This is a executable Python code [python_code], and this is a Python code [python_code] that cannot be executed. Does the following Python code execute? [python_code]." + } + ] + } + ], + "index": 22 + }, + { + "bbox": [ + 493, + 587, + 509, + 602 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 493, + 587, + 509, + 602 + ], + "spans": [ + { + "bbox": [ + 493, + 587, + 509, + 602 + ], + "type": "text", + "content": "CTO" + } + ] + } + ], + "index": 23 + }, + { + "type": "image", + "bbox": [ + 83, + 618, + 101, + 636 + ], + "blocks": [ + { + "bbox": [ + 83, + 618, + 101, + 636 + ], + "lines": [ + { + "bbox": [ + 83, + 618, + 101, + 636 + ], + "spans": [ + { + "bbox": [ + 83, + 618, + 101, + 636 + ], + "type": "image", + "image_path": "d1fe881fc0f50f4dad68b4a17fa49aa28d55d76a86da992401ef9a8fe23d2676.jpg" + } + ] + } + ], + "index": 24, + "angle": 0, + "type": "image_body" + } + ], + "index": 24 + }, + { + "bbox": [ + 104, + 623, + 304, + 635 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 104, + 623, + 304, + 635 + ], + "spans": [ + { + "bbox": [ + 104, + 623, + 304, + 635 + ], + "type": "text", + "content": "Yes, the Python code executes without errors." + } + ] + } + ], + "index": 25 + }, + { + "bbox": [ + 218, + 655, + 485, + 668 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 218, + 655, + 485, + 668 + ], + "spans": [ + { + "bbox": [ + 218, + 655, + 485, + 668 + ], + "type": "text", + "content": "Please predict the executed output of the Python code above." + } + ] + } + ], + "index": 26 + }, + { + "bbox": [ + 493, + 650, + 509, + 667 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 493, + 650, + 509, + 667 + ], + "spans": [ + { + "bbox": [ + 493, + 650, + 509, + 667 + ], + "type": "text", + "content": "CTO" + } + ] + } + ], + "index": 27 + }, + { + "type": "image", + "bbox": [ + 82, + 672, + 101, + 691 + ], + "blocks": [ + { + "bbox": [ + 82, + 672, + 101, + 691 + ], + "lines": [ + { + "bbox": [ + 82, + 672, + 101, + 691 + ], + "spans": [ + { + "bbox": [ + 82, + 672, + 101, + 691 + ], + "type": "image", + "image_path": "ea3c3b966256479b55dffc4c796ace793468139d99956a638be7c38ef75f461f.jpg" + } + ] + } + ], + "index": 28, + "angle": 0, + "type": "image_body" + } + ], + "index": 28 + }, + { + "bbox": [ + 104, + 677, + 402, + 691 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 104, + 677, + 402, + 691 + ], + "spans": [ + { + "bbox": [ + 104, + 677, + 402, + 691 + ], + "type": "text", + "content": "The predicted execution result of the Python code above is [output]." + } + ] + } + ], + "index": 29 + }, + { + "bbox": [ + 103, + 703, + 488, + 716 + ], + "angle": 0, + "lines": [ + { + "bbox": [ + 103, + 703, + 488, + 716 + ], + "spans": [ + { + "bbox": [ + 103, + 703, + 488, + 716 + ], + "type": "text", + "content": "Table 18: Two simple demos: prompting in fuzzy execution experiments. [Return to Section 6.]" + } + ] + } + ], + "index": 30, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 309, + 791 + ], + "type": "text", + "content": "5088" + } + ] + } + ], + "index": 31 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 21 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 143, + 89, + 449, + 681 + ], + "blocks": [ + { + "bbox": [ + 143, + 89, + 449, + 681 + ], + "lines": [ + { + "bbox": [ + 143, + 89, + 449, + 681 + ], + "spans": [ + { + "bbox": [ + 143, + 89, + 449, + 681 + ], + "type": "table", + "html": "
MethodTranslation Prompt
One-ShotHere is an example of a translation from [ESL] to [ETL].[ESL]: [ESC], [ETL]: [ETC]. Please imitate this example to translate following code from [SL] to [TL]:[TC].
One-Shot #1where [ESL]≠[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]=[TL] where [ESL]≠[SL] and [ETL]≠[TL]
One-Shot #2where [ESL]=[SL] and [ETL]=[TL] where [ESL]=[SL] and [ETL]≠[TL]
One-Shot #3where [ESL]≠[SL] and [ETL]≠[TL]
CoT #11.Please explain the function of the following [SL] code, which is limited to 200 words.[SC] 2.Please translate into [TL] code according to the following [SL] code and its functional description.[SL]:[SC].Function description:[DSC]
CoT #2First, understand the function of the following [SL] code. Then, translate the [SL] code into [TL] code while keeping the function unchanged.[SC]
CoT #3First, understand the functionality of the following [SL] code and predict the execution output. Then, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.[SL]
CoT #4First, learn how to translate [ESL] code to [ETL] based on the example, [SL]:[ESC],[TL]:[ETC]. Then, understand the functionality of the following [SL] code and predict the execution output, [SL]:[SC]. Finally, translate the [SL] code into [TL] while maintaining the same functionality, ensuring that the translated code can be successfully executed.
", + "image_path": "d6f80f264d7af8aac05dd8dd564507318374481017566db60a4ded4b6f2d21bd.jpg" + } + ] + } + ], + "index": 0, + "angle": 0, + "type": "table_body" + } + ], + "index": 0 + }, + { + "bbox": [ + 67, + 688, + 526, + 750 + ], + "lines": [ + { + "bbox": [ + 67, + 688, + 526, + 750 + ], + "spans": [ + { + "bbox": [ + 67, + 688, + 526, + 750 + ], + "type": "text", + "content": "Table 19: ChatGPT translation prompts on one-shot & CoT strategies. [SL] refers to the source language, [SC] refers to the source code, [TL] refers to the target language,[ESL] refers to the source language in the example, [ESC] refers to the source code in the example, [ETL] refers to the target language in the example, [ETC] refers to the target code in the example, [DSC] refers to the natural language description of the source code. [Return to Section 4.3]" + } + ] + } + ], + "index": 1, + "angle": 0, + "type": "text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 286, + 781, + 310, + 791 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 286, + 781, + 310, + 791 + ], + "spans": [ + { + "bbox": [ + 286, + 781, + 310, + 791 + ], + "type": "text", + "content": "5089" + } + ] + } + ], + "index": 2 + } + ], + "page_size": [ + 595, + 841 + ], + "page_idx": 22 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file diff --git a/2023/Coherent Entity Disambiguation via Modeling Topic and Categorical Dependency/30225b64-d6f3-465d-87d3-fb1ba2bded38_content_list.json b/2023/Coherent Entity Disambiguation via Modeling Topic and Categorical Dependency/30225b64-d6f3-465d-87d3-fb1ba2bded38_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f5c0d663eac9ea02b72c0f0d18e841d0d8101f3a --- /dev/null +++ b/2023/Coherent Entity Disambiguation via Modeling Topic and Categorical Dependency/30225b64-d6f3-465d-87d3-fb1ba2bded38_content_list.json @@ -0,0 +1,2033 @@ +[ + { + "type": "text", + "text": "Coherent Entity Disambiguation via Modeling Topic and Categorical Dependency", + "text_level": 1, + "bbox": [ + 142, + 87, + 855, + 129 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Zilin Xiao\\* Linjun Shou\\* Xingyao Zhang\\* Jie Wu\\* Ming Gong\\* Daxin Jiang\\*", + "bbox": [ + 290, + 140, + 709, + 175 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Rice University\\* Microsoft STCA", + "bbox": [ + 344, + 177, + 657, + 192 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "zilin@rice.edu", + "bbox": [ + 428, + 193, + 573, + 206 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "{lisho, xingyaozhang, jiewu1, migon, djiang}@microsoft.com", + "bbox": [ + 206, + 209, + 794, + 225 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Abstract", + "text_level": 1, + "bbox": [ + 260, + 252, + 339, + 267 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Previous entity disambiguation (ED) methods adopt a discriminative paradigm, where prediction is made based on matching scores between mention context and candidate entities using length-limited encoders. However, these methods often struggle to capture explicit discourse-level dependencies, resulting in incoherent predictions at the abstract level (e.g. topic or category). We propose COHERENTED, an ED system equipped with novel designs aimed at enhancing the coherence of entity predictions. Our method first introduces an unsupervised variational autoencoder (VAE) to extract latent topic vectors of context sentences. This approach not only allows the encoder to handle longer documents more effectively, conserves valuable input space, but also keeps a topic-level coherence. Additionally, we incorporate an external category memory, enabling the system to retrieve relevant categories for undecided mentions. By employing step-by-step entity decisions, this design facilitates the modeling of entity-entity interactions, thereby maintaining maximum coherence at the category level. We achieve new state-of-the-art results on popular ED benchmarks, with an average improvement of 1.3 F1 points. Our model demonstrates particularly outstanding performance on challenging long-text scenarios.", + "bbox": [ + 144, + 279, + 460, + 703 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "1 Introduction", + "text_level": 1, + "bbox": [ + 114, + 717, + 258, + 732 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Entity disambiguation (ED) is a typical knowledge-intensive task of resolving mentions in a document to their corresponding entities in a knowledge base (KB), e.g. Wikipedia. This task is of great importance due to its active presence in downstream tasks such as information extraction (Hoffart et al., 2011), question answering (Yih et al., 2015) and web search query (Blanco et al., 2015).", + "bbox": [ + 112, + 741, + 487, + 869 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "To perform efficient entity disambiguation (ED), one common approach is to encode mentions and candidate entities into different embedding spaces.", + "bbox": [ + 112, + 871, + 489, + 919 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Then a simple vector dot product is used to capture the alignment between mentions and candidate entities. While this method enables quick maximum inner product search (MIPS) over all candidates and efficiently determines the linked answer, it suffers from late and simplistic interaction between mentions and entities (Barba et al., 2022; Cao et al., 2021). Recently, researchers have proposed alternative paradigms for solving the ED problem, such as formulating it as a span extraction task (Barba et al., 2022). In this approach, a Longformer (Beltagy et al., 2020) is fine-tuned to predict the entity answer span within a long sequence consisting of the document and candidate entity identifiers. Another paradigm (Cao et al., 2021; De Cao et al., 2022) reduces the ED task to an auto-regressive style in which generation models are trained to produce entity identifiers token-by-token.", + "bbox": [ + 507, + 253, + 885, + 542 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "Although these approaches offer some mitigation for the late-and-simple interaction problem, they still exhibit certain vulnerabilities. For instance, Transformer-based encoders impose inherent limitations on input length, preventing the capture of long-range dependency for specific mentions. Also, these methods do not explicitly consider coherence constraints, while coherence is considered as important as context in early ED works (Hoffart et al., 2011; Chisholm and Hachey, 2015). We first propose to condition the model on compressed topic tokens, enabling the system to sustain topic coherence at the document level.", + "bbox": [ + 507, + 545, + 885, + 755 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "In addition, the relationship among entities holds significant importance in the ED task. For example, mentions in the document exhibit a high correlation at the category level, where we name it category coherence. However, previous bi-encoder and cross-encoder solutions have overlooked these entity dependencies and focused solely on learning contextualized representations. Among other works, extractive paradigm (Barba et al., 2022) neglects entity-entity relation as well; generative", + "bbox": [ + 507, + 758, + 885, + 919 + ], + "page_idx": 0 + }, + { + "type": "page_number", + "text": "7480", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 0 + }, + { + "type": "footer", + "text": "Findings of the Association for Computational Linguistics: EMNLP 2023, pages 7480-7492 December 6-10, 2023 ©2023 Association for Computational Linguistics", + "bbox": [ + 216, + 945, + 779, + 972 + ], + "page_idx": 0 + }, + { + "type": "text", + "text": "EL (Cao et al., 2021; De Cao et al., 2022) do possess some dependencies when linking an unknown mention. However, these dependencies arise from the auto-regressive decoding process and require heavy inference compute.", + "bbox": [ + 112, + 84, + 487, + 165 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "To address the above coherence problem, we propose two orthogonal solutions that target topic coherence and entity coherence, respectively. Following previous works that decode masked tokens to link unknown mentions (Yamada et al., 2020, 2022), we present the overview of our coherent entity disambiguation work in Figure 1, where document words and unresolved entities are treated as input tokens of Transformer (Vaswani et al., 2017). First, we bring an unsupervised variational auto-encoder (VAE) (Kingma and Welling, 2014) to extract topic embeddings of surrounding sentences, which are later utilized to guide entity prediction. By docking these two representative language learners, BERT (Devlin et al., 2019) and GPT-2 (Radford et al., 2019), the variational encoder can produce topic tokens of sentences without training on labeled datasets. This approach promotes a higher level of coherence in model predictions from an abstract level (Li et al., 2020) (e.g. tense, topic, sentiment).", + "bbox": [ + 115, + 175, + 489, + 512 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Moreover, in most KBs, categories serve as valuable sources of knowledge, grouping entities based on similar subjects. To enhance entity-entity coherence from a categorical perspective, we design a novel category memory bank for intermediate entity representations to query dynamically. As opposed to retrieving from a frozen memory layer, we introduce direct supervision from ground-truth category labels during pre-training. This enables the memory to be learned effectively even from random initialization.", + "bbox": [ + 112, + 523, + 489, + 699 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Named COHERENTED, experimental results show that our proposed methods surpass previous state-of-the-art peers on six popular ED datasets by 1.3 F1 points on average. Notably, on the challenging CWEB dataset, which has an average document length of 1,700 words, our approach elevates the score from the previous neural-based SOTA of 78.9 to 81.1. Through model ablations, we verify the effectiveness of the two orthogonal solutions through both quantitative performance evaluation and visualization analysis. These ablations further affirm the superiority of our methods in generating coherent disambiguation predictions.", + "bbox": [ + 112, + 709, + 489, + 917 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "2 Related Works", + "text_level": 1, + "bbox": [ + 509, + 83, + 672, + 98 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Entity disambiguation (ED) is a task of determining entities for unknown mention spans within the document. Early ED works (Hoffmann et al., 2011; Daiber et al., 2013) commonly rely on matching scores between mention contexts and entities, disregarding the knowledge-intensive nature of ED. Many studies aim to infuse external knowledge into ED. Bunescu and Paşa (2006) begin to utilize hyperlinks in Wikipedia to supervise disambiguation. Yamada et al. (2020, 2022) propose massive pre-training on paired text and entity tokens to implicitly inject knowledge for disambiguation usage. Li et al. (2022) first leverage knowledge graphs to enhance ED performance.", + "bbox": [ + 507, + 111, + 884, + 336 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Another intriguing feature for entities to differentiate from each other is their type, as entities with similar surface forms (text identifiers) often possess different types. Onoe and Durrett (2020) disambiguate similar entities solely through a refined entity type system derived from Wikipedia, without using any external information. Ayoola et al. (2022) augment the robustness of such a type system even further. Furthermore, many researchers have explored new paradigms for ED. Cao et al. (2021) propose using a prefix-constrained dictionary on casual language models to correctly generate entity strings. Barba et al. (2022) recast disambiguation as a task of machine reading comprehension (MRC), where the model selects a predicted entity based on the context fused with candidate identifiers and the document.", + "bbox": [ + 507, + 338, + 884, + 609 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "The architecture of our system seamlessly blends the advantages of type systems and knowledge pretraining: incorporating type systems as dynamically updating neural blocks within the model, our design enables simultaneous learning through a multi-task learning schema - facilitating topic variation learning, masked disambiguation learning, and knowledge pre-training concurrently.", + "bbox": [ + 507, + 612, + 882, + 740 + ], + "page_idx": 1 + }, + { + "type": "text", + "text": "Prompt Compression is a commonly used technique in language models to economize input space, closely related to topics such as prompt compression (Wingate et al., 2022) and context distillation (Snell et al., 2022). Their mutual goal is to dynamically generate soft prompt tokens that replace original tokens without hurting downstream application performance. Our topic token design mirrors context compression to some extent but differs in the compression ratio and purpose. Our design is more compact; each context sentence gets", + "bbox": [ + 507, + 741, + 882, + 917 + ], + "page_idx": 1 + }, + { + "type": "page_number", + "text": "7481", + "bbox": [ + 480, + 928, + 517, + 940 + ], + "page_idx": 1 + }, + { + "type": "image", + "img_path": "images/24b1fff104972eb28a8a179077586a99a71a0f1cbc074d99fa40f5d6821cb4da.jpg", + "image_caption": [ + "Figure 1: Overview of our baseline model. Legends are presented in the upper left corner. Position embedding for an entity is averaged on corresponding document positions, for example, $\\mathrm{E}_1 + \\mathrm{E}_2 / 2$ indicates the entity \"Lionel_Messi\" is predicted based on document tokens mess and ##i at position 1 and 2." + ], + "image_footnote": [], + "bbox": [ + 114, + 84, + 884, + 305 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "converted into a single topic token using a variational encoder, and in addition to saving input space, it also retains high-level semantics to guide a more coherent ED.", + "bbox": [ + 112, + 388, + 487, + 451 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3 Methodology", + "text_level": 1, + "bbox": [ + 112, + 466, + 262, + 483 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.1 Entity Disambiguation Definition", + "text_level": 1, + "bbox": [ + 112, + 493, + 420, + 508 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Let $X$ be a document with $N$ mentions $\\{m_1, m_2, \\ldots, m_N\\}$ , where each of mentions $m_i$ is associated with a set of entity candidates $C_i = \\{e_{i1}, e_{i2}, \\ldots, e_{i|C_i}|\\}$ . Given a KB with a set of triplets $G = \\{(h, r, t) | h, t \\in \\mathcal{E}, r \\in \\mathcal{R}\\}$ , where $h$ , $r$ and $t$ denote the head entity, relation and tail entity respectively, the goal of entity disambiguation is to link mentions $m_i$ to one of the corresponding mention candidates $C_i \\subseteq \\mathcal{E}$ .", + "bbox": [ + 112, + 514, + 487, + 659 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.2 Overview", + "text_level": 1, + "bbox": [ + 112, + 671, + 235, + 686 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "We present the overview of COHERENTED in Figure 1. Following Yamada et al. (2020), both words in the document and entities are considered input tokens for the BERT model. The final input representation sums over the following embeddings:", + "bbox": [ + 112, + 693, + 487, + 772 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Representation embedding denotes the topic latent, word embedding or entity embedding for topic inputs, document inputs or entity inputs accordingly. We set up two separate embedding layers for word and entity input respectively. $\\mathbf{X} \\in \\mathbb{R}^{V_w \\times H}$ denotes the word embedding matrices and $\\mathbf{Y} \\in \\mathbb{R}^{V_e \\times H}$ denotes the entity embedding matrices, where $V_w$ and $V_e$ represents the size of word vocabulary and entity vocabulary.", + "bbox": [ + 112, + 774, + 487, + 917 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Type embedding is for discrimination usage. There are three types of tokens available, each of which corresponds to a dedicated group of parameters, $\\mathbf{C}_{\\mathrm{word}}$ , $\\mathbf{C}_{\\mathrm{entity}}$ , $\\mathbf{C}_{\\mathrm{topic}}$ .", + "bbox": [ + 507, + 388, + 884, + 453 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Position embedding marks the position of input words and entities, avoiding the permutation-invariant property of the self-attention mechanism. The entity position embedding also indicates which word tokens the entity corresponds to. This is achieved by applying absolute position embedding to both words and entities. If a mention consists of multiple tokens, the entity position embedding is averaged over all corresponding positions.", + "bbox": [ + 507, + 454, + 882, + 599 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.3 Topic Variational Autoencoder", + "text_level": 1, + "bbox": [ + 507, + 609, + 794, + 625 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "To preserve maximum topic coherence and optimize input space utilization, we introduce an external component that facilitates topic-level guidance in ED prediction. Among various latent variable models, variational autoencoders (VAEs) have demonstrated success in modeling high-level syntactic latent factors such as style and topic. Our setup is based on the motivation that, after being trained on a massive corpus using the variational objective, the encoder gains the capacity to encode sentences into topic latent vectors. The entire topic VAE is composed of two parts, BERT and GPT-2, both of which are powerful Transformer-based language encoder and decoder.", + "bbox": [ + 505, + 632, + 882, + 857 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "3.3.1 Encoder", + "text_level": 1, + "bbox": [ + 507, + 866, + 636, + 881 + ], + "page_idx": 2 + }, + { + "type": "text", + "text": "Given a BERT encoder $\\mathrm{LM}_{\\phi}$ and input sentence token sequence $x$ , we collect the aggregated em", + "bbox": [ + 507, + 887, + 882, + 917 + ], + "page_idx": 2 + }, + { + "type": "page_number", + "text": "7482", + "bbox": [ + 480, + 927, + 519, + 940 + ], + "page_idx": 2 + }, + { + "type": "image", + "img_path": "images/ee89fe348ae3450e9c97deb799e796261e5fd474eb8349ced26acd3ec7a2173a.jpg", + "image_caption": [ + "Figure 2: Topic variational autoencoder injection illustration. $K$ topic sentences are converted into topic tokens appending on the start of model's input." + ], + "image_footnote": [], + "bbox": [ + 112, + 80, + 884, + 296 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "bedding $X$ from the last layer hidden states corresponding to the [CLS] token: $X = \\mathrm{BERT}_{[\\mathrm{CLS}]}(x)$ . With this, we can construct a multivariate Gaussian distribution from which the decoder will draw samples. The following formula describes the variational distribution for the approximation of the posterior:", + "bbox": [ + 112, + 367, + 490, + 481 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\nq _ {\\phi} \\left(z _ {n} \\mid \\boldsymbol {x} _ {\\leq n}, \\boldsymbol {z} _ {< n}\\right) = \\tag {1}\n$$\n", + "text_format": "latex", + "bbox": [ + 186, + 497, + 487, + 520 + ], + "page_idx": 3 + }, + { + "type": "equation", + "text": "\n$$\n\\mathcal {N} \\left(z _ {n} \\mid f _ {\\mu_ {\\phi}} \\left(x _ {n}\\right), f _ {\\sigma_ {\\phi}} \\left(x _ {n}\\right)\\right),\n$$\n", + "text_format": "latex", + "bbox": [ + 188, + 516, + 410, + 533 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "where $f_{\\mu_{\\phi}}$ and $f_{\\sigma_{\\phi}}$ denote separate linear layers for mean and variance representations, $\\mathcal{N}$ denotes Gaussian distribution and $z$ denotes intermediate information bottleneck.", + "bbox": [ + 112, + 543, + 487, + 606 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "3.3.2 Decoder", + "text_level": 1, + "bbox": [ + 112, + 620, + 240, + 634 + ], + "page_idx": 3 + }, + { + "type": "text", + "text": "Given a GPT-2 decoder $\\mathrm{LM}_{\\theta}$ , we first review how to generate a text sequence of length $T$ using such neural models. To generate word tokens of length $L$ , $\\mathbf{x} = [x_{1}, x_{2}, \\ldots, x_{T}]$ , a language decoder utilizes all its parameters $\\theta$ to predict the next token conditioned on all previous tokens generated $x_{