Add Batch d2959ce2-6877-428a-97ee-32a8e93baab7 data
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +64 -0
- 2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/28cdf19c-e388-472b-86e1-a5fa45041530_content_list.json +0 -0
- 2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/28cdf19c-e388-472b-86e1-a5fa45041530_model.json +0 -0
- 2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/28cdf19c-e388-472b-86e1-a5fa45041530_origin.pdf +3 -0
- 2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/full.md +428 -0
- 2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/images.zip +3 -0
- 2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/layout.json +0 -0
- 2025/CodeV_ Issue Resolving with Visual Data/7f6c3ec1-9cd2-4428-a242-409b35b428e7_content_list.json +1681 -0
- 2025/CodeV_ Issue Resolving with Visual Data/7f6c3ec1-9cd2-4428-a242-409b35b428e7_model.json +2171 -0
- 2025/CodeV_ Issue Resolving with Visual Data/7f6c3ec1-9cd2-4428-a242-409b35b428e7_origin.pdf +3 -0
- 2025/CodeV_ Issue Resolving with Visual Data/full.md +347 -0
- 2025/CodeV_ Issue Resolving with Visual Data/images.zip +3 -0
- 2025/CodeV_ Issue Resolving with Visual Data/layout.json +0 -0
- 2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/3970090c-6b96-4eb4-915a-cb60da22cae3_content_list.json +0 -0
- 2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/3970090c-6b96-4eb4-915a-cb60da22cae3_model.json +0 -0
- 2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/3970090c-6b96-4eb4-915a-cb60da22cae3_origin.pdf +3 -0
- 2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/full.md +418 -0
- 2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/images.zip +3 -0
- 2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/layout.json +0 -0
- 2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/760a004c-dbd3-4753-a421-fea5977279f9_content_list.json +1779 -0
- 2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/760a004c-dbd3-4753-a421-fea5977279f9_model.json +0 -0
- 2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/760a004c-dbd3-4753-a421-fea5977279f9_origin.pdf +3 -0
- 2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/full.md +314 -0
- 2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/images.zip +3 -0
- 2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/layout.json +0 -0
- 2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/614ae70a-82a1-4a03-8912-d0ba0d79c1e5_content_list.json +1679 -0
- 2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/614ae70a-82a1-4a03-8912-d0ba0d79c1e5_model.json +1923 -0
- 2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/614ae70a-82a1-4a03-8912-d0ba0d79c1e5_origin.pdf +3 -0
- 2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/full.md +291 -0
- 2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/images.zip +3 -0
- 2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/layout.json +0 -0
- 2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/35fafa4b-2140-486c-891b-5008eef2c8d7_content_list.json +0 -0
- 2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/35fafa4b-2140-486c-891b-5008eef2c8d7_model.json +0 -0
- 2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/35fafa4b-2140-486c-891b-5008eef2c8d7_origin.pdf +3 -0
- 2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/full.md +490 -0
- 2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/images.zip +3 -0
- 2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/layout.json +0 -0
- 2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/fbf882ad-ea83-4d16-9be3-66896daadabc_content_list.json +0 -0
- 2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/fbf882ad-ea83-4d16-9be3-66896daadabc_model.json +0 -0
- 2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/fbf882ad-ea83-4d16-9be3-66896daadabc_origin.pdf +3 -0
- 2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/full.md +540 -0
- 2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/images.zip +3 -0
- 2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/layout.json +0 -0
- 2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/ea72460d-d305-41d9-919b-812f11c036ef_content_list.json +0 -0
- 2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/ea72460d-d305-41d9-919b-812f11c036ef_model.json +0 -0
- 2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/ea72460d-d305-41d9-919b-812f11c036ef_origin.pdf +3 -0
- 2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/full.md +409 -0
- 2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/images.zip +3 -0
- 2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/layout.json +0 -0
- 2025/Compositional Syntactico-SemBanking for English as a Second or Foreign Language/69f8b9dd-c1a7-4dc3-8822-95c66d709083_content_list.json +1957 -0
.gitattributes
CHANGED
|
@@ -309,3 +309,67 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 309 |
2025/CodePRM_[[:space:]]Execution[[:space:]]Feedback-enhanced[[:space:]]Process[[:space:]]Reward[[:space:]]Model[[:space:]]for[[:space:]]Code[[:space:]]Generation/4da81742-3b74-4a6d-b06b-af5f83b702f8_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 310 |
2025/CodeReviewQA_[[:space:]]The[[:space:]]Code[[:space:]]Review[[:space:]]Comprehension[[:space:]]Assessment[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/00ef5238-947c-4368-9029-8a44aca8ca1e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 311 |
2025/CodeScientist_[[:space:]]End-to-End[[:space:]]Semi-Automated[[:space:]]Scientific[[:space:]]Discovery[[:space:]]with[[:space:]]Code-based[[:space:]]Experimentation/a7f3f54d-421d-4897-9047-44f7a56bc95d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
2025/CodePRM_[[:space:]]Execution[[:space:]]Feedback-enhanced[[:space:]]Process[[:space:]]Reward[[:space:]]Model[[:space:]]for[[:space:]]Code[[:space:]]Generation/4da81742-3b74-4a6d-b06b-af5f83b702f8_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 310 |
2025/CodeReviewQA_[[:space:]]The[[:space:]]Code[[:space:]]Review[[:space:]]Comprehension[[:space:]]Assessment[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/00ef5238-947c-4368-9029-8a44aca8ca1e_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 311 |
2025/CodeScientist_[[:space:]]End-to-End[[:space:]]Semi-Automated[[:space:]]Scientific[[:space:]]Discovery[[:space:]]with[[:space:]]Code-based[[:space:]]Experimentation/a7f3f54d-421d-4897-9047-44f7a56bc95d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 312 |
+
2025/CodeTaxo_[[:space:]]Enhancing[[:space:]]Taxonomy[[:space:]]Expansion[[:space:]]with[[:space:]]Limited[[:space:]]Examples[[:space:]]via[[:space:]]Code[[:space:]]Language[[:space:]]Prompts/28cdf19c-e388-472b-86e1-a5fa45041530_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 313 |
+
2025/CodeV_[[:space:]]Issue[[:space:]]Resolving[[:space:]]with[[:space:]]Visual[[:space:]]Data/7f6c3ec1-9cd2-4428-a242-409b35b428e7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 314 |
+
2025/CogSteer_[[:space:]]Cognition-Inspired[[:space:]]Selective[[:space:]]Layer[[:space:]]Intervention[[:space:]]for[[:space:]]Efficiently[[:space:]]Steering[[:space:]]Large[[:space:]]Language[[:space:]]Models/3970090c-6b96-4eb4-915a-cb60da22cae3_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 315 |
+
2025/CoinMath_[[:space:]]Harnessing[[:space:]]the[[:space:]]Power[[:space:]]of[[:space:]]Coding[[:space:]]Instruction[[:space:]]for[[:space:]]Math[[:space:]]LLM/760a004c-dbd3-4753-a421-fea5977279f9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 316 |
+
2025/Combining[[:space:]]the[[:space:]]Best[[:space:]]of[[:space:]]Both[[:space:]]Worlds_[[:space:]]A[[:space:]]Method[[:space:]]for[[:space:]]Hybrid[[:space:]]NMT[[:space:]]and[[:space:]]LLM[[:space:]]Translation/614ae70a-82a1-4a03-8912-d0ba0d79c1e5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 317 |
+
2025/Communication-Efficient[[:space:]]and[[:space:]]Tensorized[[:space:]]Federated[[:space:]]Fine-Tuning[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models/35fafa4b-2140-486c-891b-5008eef2c8d7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 318 |
+
2025/Comparing[[:space:]]Bad[[:space:]]Apples[[:space:]]to[[:space:]]Good[[:space:]]Oranges[[:space:]]Aligning[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]via[[:space:]]Joint[[:space:]]Preference[[:space:]]Optimization/fbf882ad-ea83-4d16-9be3-66896daadabc_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 319 |
+
2025/ComparisonQA_[[:space:]]Evaluating[[:space:]]Factuality[[:space:]]Robustness[[:space:]]of[[:space:]]LLMs[[:space:]]Through[[:space:]]Knowledge[[:space:]]Frequency[[:space:]]Control[[:space:]]and[[:space:]]Uncertainty/ea72460d-d305-41d9-919b-812f11c036ef_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 320 |
+
2025/Compositional[[:space:]]Syntactico-SemBanking[[:space:]]for[[:space:]]English[[:space:]]as[[:space:]]a[[:space:]]Second[[:space:]]or[[:space:]]Foreign[[:space:]]Language/69f8b9dd-c1a7-4dc3-8822-95c66d709083_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 321 |
+
2025/Compute[[:space:]]Optimal[[:space:]]Scaling[[:space:]]of[[:space:]]Skills_[[:space:]]Knowledge[[:space:]]vs[[:space:]]Reasoning/dec34515-134e-4d1c-844a-0fe0b52af48b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 322 |
+
2025/ConFit[[:space:]]v2_[[:space:]]Improving[[:space:]]Resume-Job[[:space:]]Matching[[:space:]]using[[:space:]]Hypothetical[[:space:]]Resume[[:space:]]Embedding[[:space:]]and[[:space:]]Runner-Up[[:space:]]Hard-Negative[[:space:]]Mining/998bb204-1ed6-430a-9423-b7e0b5fb8c24_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 323 |
+
2025/ConKE_[[:space:]]Conceptualization-Augmented[[:space:]]Knowledge[[:space:]]Editing[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]for[[:space:]]Commonsense[[:space:]]Reasoning/bd2382a3-6ee8-4d46-838d-9a6d60bf4d35_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 324 |
+
2025/Confidence[[:space:]]Improves[[:space:]]Self-Consistency[[:space:]]in[[:space:]]LLMs/bf14fb9a-8521-45aa-97c3-fe976b4b6c36_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 325 |
+
2025/Conservative[[:space:]]Bias[[:space:]]in[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]Measuring[[:space:]]Relation[[:space:]]Predictions/95915fb3-94df-4727-8250-5788e5670305_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 326 |
+
2025/Consultant[[:space:]]Decoding_[[:space:]]Yet[[:space:]]Another[[:space:]]Synergistic[[:space:]]Mechanism/51ab54f2-49ea-4947-b4e9-73fbaf1ee5c5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 327 |
+
2025/Context-Aware[[:space:]]Hierarchical[[:space:]]Merging[[:space:]]for[[:space:]]Long[[:space:]]Document[[:space:]]Summarization/56b6770f-ac1f-4c18-93b8-4c85989c3a98_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 328 |
+
2025/Context-DPO_[[:space:]]Aligning[[:space:]]Language[[:space:]]Models[[:space:]]for[[:space:]]Context-Faithfulness/8d538bbf-961b-4055-99c7-5b731d6b0b15_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 329 |
+
2025/Context-Robust[[:space:]]Knowledge[[:space:]]Editing[[:space:]]for[[:space:]]Language[[:space:]]Models/2e0ebc41-5127-4691-809f-a14b7f6049fe_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 330 |
+
2025/Continual[[:space:]]Quantization-Aware[[:space:]]Pre-Training_[[:space:]]When[[:space:]]to[[:space:]]transition[[:space:]]from[[:space:]]16-bit[[:space:]]to[[:space:]]1.58-bit[[:space:]]pre-training[[:space:]]for[[:space:]]BitNet[[:space:]]language[[:space:]]models_/b001c0d6-5722-427b-b859-1cad24ec4707_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 331 |
+
2025/Continued[[:space:]]Pretraining[[:space:]]and[[:space:]]Interpretability-Based[[:space:]]Evaluation[[:space:]]for[[:space:]]Low-Resource[[:space:]]Languages_[[:space:]]A[[:space:]]Galician[[:space:]]Case[[:space:]]Study/da9e9a4b-00ec-430b-a88f-43b12228d44a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 332 |
+
2025/Contrastive[[:space:]]Learning[[:space:]]for[[:space:]]Task-Independent[[:space:]]SpeechLLM-Pretraining/611331dc-fc98-4790-b1c6-6b3d5497c80f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 333 |
+
2025/Core_[[:space:]]Robust[[:space:]]Factual[[:space:]]Precision[[:space:]]with[[:space:]]Informative[[:space:]]Sub-Claim[[:space:]]Identification/9ef4ea13-6f8c-4eb7-a735-12673f64c43c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 334 |
+
2025/Corpus[[:space:]]Poisoning[[:space:]]via[[:space:]]Approximate[[:space:]]Greedy[[:space:]]Gradient[[:space:]]Descent/11b8ff9d-2b05-463a-8bad-6bd354948ef1_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 335 |
+
2025/Correcting[[:space:]]on[[:space:]]Graph_[[:space:]]Faithful[[:space:]]Semantic[[:space:]]Parsing[[:space:]]over[[:space:]]Knowledge[[:space:]]Graphs[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models/4ee7aebf-c86c-4b39-ac65-55c8f9b36d66_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 336 |
+
2025/CortexDebate_[[:space:]]Debating[[:space:]]Sparsely[[:space:]]and[[:space:]]Equally[[:space:]]for[[:space:]]Multi-Agent[[:space:]]Debate/826f60fe-e674-42ab-b85b-25a3f1d2bebd_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 337 |
+
2025/CourtEval_[[:space:]]A[[:space:]]Courtroom-Based[[:space:]]Multi-Agent[[:space:]]Evaluation[[:space:]]Framework/c2d2cbd5-4813-458e-9505-ebb02141fed2_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 338 |
+
2025/Crabs_[[:space:]]Consuming[[:space:]]Resource[[:space:]]via[[:space:]]Auto-generation[[:space:]]for[[:space:]]LLM-DoS[[:space:]]Attack[[:space:]]under[[:space:]]Black-box[[:space:]]Settings/30cb18a6-7497-4eb7-a443-f4791ac70491_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 339 |
+
2025/Craw4LLM_[[:space:]]Efficient[[:space:]]Web[[:space:]]Crawling[[:space:]]for[[:space:]]LLM[[:space:]]Pretraining/442fb879-bdba-406f-8752-8b75d29bce88_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 340 |
+
2025/Creating[[:space:]]a[[:space:]]Lens[[:space:]]of[[:space:]]Chinese[[:space:]]Culture_[[:space:]]A[[:space:]]Multimodal[[:space:]]Dataset[[:space:]]for[[:space:]]Chinese[[:space:]]Pun[[:space:]]Rebus[[:space:]]Art[[:space:]]Understanding/dbfef6a6-7776-48a9-a377-ebd5da6ae4fc_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 341 |
+
2025/Critic-CoT_[[:space:]]Boosting[[:space:]]the[[:space:]]Reasoning[[:space:]]Abilities[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]via[[:space:]]Chain-of-Thought[[:space:]]Critic/c2ad9449-5bd2-42e7-b51d-947fd1258890_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 342 |
+
2025/Cross-Lingual[[:space:]]Transfer[[:space:]]of[[:space:]]Debiasing[[:space:]]and[[:space:]]Detoxification[[:space:]]in[[:space:]]Multilingual[[:space:]]LLMs_[[:space:]]An[[:space:]]Extensive[[:space:]]Investigation/d7d6c752-0664-4f5e-9b6a-01c995d0d103_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 343 |
+
2025/Cross-lingual[[:space:]]Multimodal[[:space:]]Sentiment[[:space:]]Analysis[[:space:]]for[[:space:]]Low-Resource[[:space:]]Languages[[:space:]]via[[:space:]]Language[[:space:]]Family[[:space:]]Disentanglement[[:space:]]and[[:space:]]Rethinking[[:space:]]Transfer/2b168b4b-54c0-41f9-9cf7-c52395933e3c_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 344 |
+
2025/CtrlA_[[:space:]]Adaptive[[:space:]]Retrieval-Augmented[[:space:]]Generation[[:space:]]via[[:space:]]Inherent[[:space:]]Control/428ac4bc-4648-4be0-aba9-e1b5cc89ded7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 345 |
+
2025/Customizing[[:space:]]In-context[[:space:]]Learning[[:space:]]for[[:space:]]Dynamic[[:space:]]Interest[[:space:]]Adaption[[:space:]]in[[:space:]]LLM-based[[:space:]]Recommendation/97155722-8234-4810-bdb0-865b05604fd9_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 346 |
+
2025/C²RBench_[[:space:]]A[[:space:]]Chinese[[:space:]]Complex[[:space:]]Reasoning[[:space:]]Benchmark[[:space:]]for[[:space:]]Large[[:space:]]Language[[:space:]]Models/3a3cc028-ceb9-447e-bc32-f73f0e854147_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 347 |
+
2025/D-GEN_[[:space:]]Automatic[[:space:]]Distractor[[:space:]]Generation[[:space:]]and[[:space:]]Evaluation[[:space:]]for[[:space:]]Reliable[[:space:]]Assessment[[:space:]]of[[:space:]]Generative[[:space:]]Models/e1a93e50-bd24-48ca-8d16-6c068327e567_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 348 |
+
2025/DAGS_[[:space:]]A[[:space:]]Dependency-Based[[:space:]]Dual-Attention[[:space:]]and[[:space:]]Global[[:space:]]Semantic[[:space:]]Improvement[[:space:]]Framework[[:space:]]for[[:space:]]Metaphor[[:space:]]Recognition/e52752a6-29d9-4431-96b2-80eb3568074b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 349 |
+
2025/DALR_[[:space:]]Dual-level[[:space:]]Alignment[[:space:]]Learning[[:space:]]for[[:space:]]Multimodal[[:space:]]Sentence[[:space:]]Representation[[:space:]]Learning/ea00e703-ac55-4af8-938e-a34bec000fc2_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 350 |
+
2025/DAM_[[:space:]]Dynamic[[:space:]]Attention[[:space:]]Mask[[:space:]]for[[:space:]]Long-Context[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Inference[[:space:]]Acceleration/9a6e807f-fe30-473c-9837-1df378cf72af_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 351 |
+
2025/DAPI_[[:space:]]Domain[[:space:]]Adaptive[[:space:]]Toxicity[[:space:]]Probe[[:space:]]Vector[[:space:]]Intervention,[[:space:]]for[[:space:]]Fine-Grained[[:space:]]Detoxification/bc9da972-1c0e-46ee-af5e-182c11efa6bb_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 352 |
+
2025/DAST_[[:space:]]Context-Aware[[:space:]]Compression[[:space:]]in[[:space:]]LLMs[[:space:]]via[[:space:]]Dynamic[[:space:]]Allocation[[:space:]]of[[:space:]]Soft[[:space:]]Tokens/08123172-36ba-413c-b092-715fd6d0176f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 353 |
+
2025/DELMAN_[[:space:]]Dynamic[[:space:]]Defense[[:space:]]Against[[:space:]]Large[[:space:]]Language[[:space:]]Model[[:space:]]Jailbreaking[[:space:]]with[[:space:]]Model[[:space:]]Editing/e54d69a9-2ccd-44f4-a6f3-05facdf7d48f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 354 |
+
2025/DEMO_[[:space:]]Reframing[[:space:]]Dialogue[[:space:]]Interaction[[:space:]]with[[:space:]]Fine-grained[[:space:]]Element[[:space:]]Modeling/3d3586fa-e697-4618-ad37-557c44fb6339_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 355 |
+
2025/DI-BENCH_[[:space:]]Benchmarking[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]on[[:space:]]Dependency[[:space:]]Inference[[:space:]]with[[:space:]]Testable[[:space:]]Repositories[[:space:]]at[[:space:]]Scale/f57dd28a-cc2e-4a01-ae50-570141be8080_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 356 |
+
2025/DICE-BENCH_[[:space:]]Evaluating[[:space:]]the[[:space:]]Tool-Use[[:space:]]Capabilities[[:space:]]of[[:space:]]Large[[:space:]]Language[[:space:]]Models[[:space:]]in[[:space:]]Multi-Round,[[:space:]]Multi-Party[[:space:]]Dialogues/45af0235-0e40-492a-a3b6-3e7167d08071_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 357 |
+
2025/DIESEL_[[:space:]]A[[:space:]]Lightweight[[:space:]]Inference-Time[[:space:]]Safety[[:space:]]Enhancement[[:space:]]for[[:space:]]Language[[:space:]]Models/3f456f24-6906-4af8-aaeb-076603972c7f_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 358 |
+
2025/DOVE_[[:space:]]A[[:space:]]Large-Scale[[:space:]]Multi-Dimensional[[:space:]]Predictions[[:space:]]Dataset[[:space:]]Towards[[:space:]]Meaningful[[:space:]]LLM[[:space:]]Evaluation/a8ff3adf-0d0d-4214-89ae-c89e8ad88d61_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 359 |
+
2025/DPGA-TextSyn_[[:space:]]Differentially[[:space:]]Private[[:space:]]Genetic[[:space:]]Algorithm[[:space:]]for[[:space:]]Synthetic[[:space:]]Text[[:space:]]Generation/e3d3d5b3-ad63-49c0-a751-5a0d0533333b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 360 |
+
2025/DPO[[:space:]]Kernels_[[:space:]]A[[:space:]]Semantically-Aware,[[:space:]]Kernel-Enhanced,[[:space:]]and[[:space:]]Divergence-Rich[[:space:]]Paradigm[[:space:]]for[[:space:]]Direct[[:space:]]Preference[[:space:]]Optimization/6094842a-494a-4a2b-b0c6-0e1b73d5dd5b_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 361 |
+
2025/DRS_[[:space:]]Deep[[:space:]]Question[[:space:]]Reformulation[[:space:]]With[[:space:]]Structured[[:space:]]Output/4352abfd-23d7-43b1-811f-5b72b7a89104_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 362 |
+
2025/DRT_[[:space:]]Deep[[:space:]]Reasoning[[:space:]]Translation[[:space:]]via[[:space:]]Long[[:space:]]Chain-of-Thought/aa1e2930-81b8-44c8-bb18-244adcb7fdc0_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 363 |
+
2025/DReSD_[[:space:]]Dense[[:space:]]Retrieval[[:space:]]for[[:space:]]Speculative[[:space:]]Decoding/4ada5d3c-cb6d-404d-a7de-1d96de8b0912_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 364 |
+
2025/DYNTEXT_[[:space:]]Semantic-Aware[[:space:]]Dynamic[[:space:]]Text[[:space:]]Sanitization[[:space:]]for[[:space:]]Privacy-Preserving[[:space:]]LLM[[:space:]]Inference/1427a851-95c6-449d-bdcf-23b315d75967_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 365 |
+
2025/DaNet_[[:space:]]Dual-Aware[[:space:]]Enhanced[[:space:]]Alignment[[:space:]]Network[[:space:]]for[[:space:]]Multimodal[[:space:]]Aspect-Based[[:space:]]Sentiment[[:space:]]Analysis/f867f3bc-f51d-479a-9e08-8294de4d8b97_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 366 |
+
2025/Data[[:space:]]Interpreter_[[:space:]]An[[:space:]]LLM[[:space:]]Agent[[:space:]]for[[:space:]]Data[[:space:]]Science/ffc76eb8-9fd4-4ace-86e8-eabc62137d81_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 367 |
+
2025/Data-Centric[[:space:]]Improvements[[:space:]]for[[:space:]]Enhancing[[:space:]]Multi-Modal[[:space:]]Understanding[[:space:]]in[[:space:]]Spoken[[:space:]]Conversation[[:space:]]Modeling/6239f7ff-8d04-4fb8-862b-ae7f3a99c072_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 368 |
+
2025/DeFine_[[:space:]]Decision-Making[[:space:]]with[[:space:]]Analogical[[:space:]]Reasoning[[:space:]]over[[:space:]]Factor[[:space:]]Profiles/5975578b-d54c-4fc1-9e68-110742c96098_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 369 |
+
2025/DeRAGEC_[[:space:]]Denoising[[:space:]]Named[[:space:]]Entity[[:space:]]Candidates[[:space:]]with[[:space:]]Synthetic[[:space:]]Rationale[[:space:]]for[[:space:]]ASR[[:space:]]Error[[:space:]]Correction/058d138f-3a05-45ec-b1c6-e7da97acf0c8_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 370 |
+
2025/DeTAM_[[:space:]]Defending[[:space:]]LLMs[[:space:]]Against[[:space:]]Jailbreak[[:space:]]Attacks[[:space:]]via[[:space:]]Targeted[[:space:]]Attention[[:space:]]Modification/fc038736-1920-4586-9360-55987f467bb6_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 371 |
+
2025/Debate,[[:space:]]Reflect,[[:space:]]and[[:space:]]Distill_[[:space:]]Multi-Agent[[:space:]]Feedback[[:space:]]with[[:space:]]Tree-Structured[[:space:]]Preference[[:space:]]Optimization[[:space:]]for[[:space:]]Efficient[[:space:]]Language[[:space:]]Model[[:space:]]Enhancement/b42432c5-c613-4afd-be0a-cd1a50cf00e5_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 372 |
+
2025/Debate4MATH_[[:space:]]Multi-Agent[[:space:]]Debate[[:space:]]for[[:space:]]Fine-Grained[[:space:]]Reasoning[[:space:]]in[[:space:]]Math/7f3fc75d-15bd-4283-b376-21589dccb7bd_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 373 |
+
2025/Debiasing[[:space:]]Online[[:space:]]Preference[[:space:]]Learning[[:space:]]via[[:space:]]Preference[[:space:]]Feature[[:space:]]Preservation/59ecc318-7cce-4cd8-bf8f-2ecedd0427b7_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 374 |
+
2025/Debt[[:space:]]Collection[[:space:]]Negotiations[[:space:]]with[[:space:]]Large[[:space:]]Language[[:space:]]Models_[[:space:]]An[[:space:]]Evaluation[[:space:]]System[[:space:]]and[[:space:]]Optimizing[[:space:]]Decision[[:space:]]Making[[:space:]]with[[:space:]]Multi-Agent/247e5520-8333-463b-82ec-4f6ff9efe40d_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
| 375 |
+
2025/Decoding[[:space:]]LLM[[:space:]]Personality[[:space:]]Measurement_[[:space:]]Forced-Choice[[:space:]]vs.[[:space:]]Likert/f301d96f-8196-40b9-93d0-6d5c5a0e6e0a_origin.pdf filter=lfs diff=lfs merge=lfs -text
|
2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/28cdf19c-e388-472b-86e1-a5fa45041530_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/28cdf19c-e388-472b-86e1-a5fa45041530_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/28cdf19c-e388-472b-86e1-a5fa45041530_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f566930649ddbad2f3c32b02e388c537db038b2549659b0a01848f08cf338d83
|
| 3 |
+
size 1279886
|
2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/full.md
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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<sup>1</sup>University of Notre Dame <sup>2</sup> University of Washington
|
| 6 |
+
|
| 7 |
+
{qzeng, ybai3, ztan3, zwu23, mjiang2} @nd.edu, shangbin@cs.washington.edu
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Taxonomies provide structural representations of knowledge and are crucial in various applications. The task of taxonomy expansion involves integrating emerging entities into existing taxonomies by identifying appropriate parent entities for these new query entities. Previous methods rely on self-supervised techniques that generate annotation data from existing taxonomies but are less effective with small taxonomies (fewer than 100 entities). In this work, we introduce CODETAXO, a novel approach that leverages large language models through code language prompts to capture the taxonomic structure. Extensive experiments on five real-world benchmarks from different domains demonstrate that CODETAXO consistently achieves superior performance across all evaluation metrics, significantly outperforming previous state-of-the-art methods. The code and data are available at https://github.com/QingkaiZeng/CodeTaxo-official.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Taxonomies are hierarchical structures encoding hypernym-hyponym (i.e., "is-A") relations between concepts or entities. Relational knowledge derived from taxonomies has been widely leveraged to identify semantic relevance for web search (Yin and Shah, 2010; Liu et al., 2020; Kang et al., 2024), personalized recommendation (Zhang et al., 2014; Tan et al., 2022; Huang et al., 2019), and question answering (Yang et al., 2017). However, existing taxonomies are mainly constructed by experts or through crowd-sourcing, making the process time-consuming, labor-intensive, and restricted in coverage (Bordea et al., 2016; Jurgens and Pilehvar, 2016). As new entities emerge, continually enriching taxonomies with these additions becomes vital. To address these challenges, taxonomy expansion aims to integrate new entities into existing taxonomies automatically.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
|
| 19 |
+
(a) Discriminative Methods: A trained scoring function selects the most appropriate parent entity from the taxonomy for a given query entity.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Two Types Taxonomy Expansion Methods
|
| 23 |
+
|
| 24 |
+
(b) Generative Methods: LLMs generate the parent entity from the taxonomy based on the query entity.
|
| 25 |
+
|
| 26 |
+
As shown in Figure 1a, recent taxonomy expansion methods mainly rely on discriminative methods that model hierarchical structures through techniques like Egonets (Shen et al., 2020), minipaths (Yu et al., 2020), and Ego-Trees (Wang et al., 2021). Although pre-trained language models (PLMs) enhance these methods by encoding entities' textual descriptions (Wang et al., 2021, 2022; Liu et al., 2021b; Xu et al., 2022), their reliance on limited self-supervised annotations often restricts performance. In contrast, Generative Large Language Models (LLMs) such as GPT-4 (Achiam et al., 2023) and Llama family (Touvron et al., 2023; Dubey et al., 2024) have recently shown remarkable capabilities in text comprehension and generation, making them highly effective for tasks aimed at generating structural knowledge (Ye et al., 2022; Bi et al., 2024; Sun et al., 2024a,b). Increasing LLM parameters boosts generalization, surpassing smaller models and enabling superior few-shot or zero-shot performance. Even with limited annotations, LLMs effectively leverage extensive knowledge embedded within their parameters, acquired from large-scale pre-training corpora. In Figure 1b, we illustrate the pipeline to how generative methods are applied to the taxonomy expansion task.
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
Figure 2: The overview of the pipeline for CODETAXO: CODETAXO reformulates the task of integrating a query entity $q$ into an existing taxonomy $\mathcal{T}_0$ as a code completion task using code-based prompts for LLMs.
|
| 30 |
+
|
| 31 |
+
Two key challenges arise when applying LLMs to taxonomy expansion. First, unlike traditional text-to-text NLP tasks such as question answering and machine translation, representing the taxonomic structure for this task in natural language is inherently challenging. Specifically, the process requires "flattening" the taxonomy into a sequence of parent-child entity pairs (Madaan et al., 2022), effectively serializing a hierarchical structure into linear text. This serialized format is notably different from the unstructured text that LLMs primarily encounter during pre-training. Furthermore, while semantically related words in natural language are usually located near each other, linearizing a taxonomy can separate conceptually related entities by significant distances within the sequence. This disparity adds to the difficulty of aligning LLM outputs with the desired structured representation. Second, scaling to large taxonomies amplifies the problem, as including every entity from the existing taxonomy in the prompt is infeasible. The limited contextual window size of current LLMs and the associated computational overhead imposes strict constraints. Even if it were possible to include thousands of entities within a prompt, the resulting structural information loss would impair the clarity of entity-specific distinctions, reducing the model's capacity to effectively utilize the taxonomy.
|
| 32 |
+
|
| 33 |
+
To overcome these challenges, we propose CODETAXO, a novel taxonomy expansion approach that leverages code language as prompts. Code-based representations have shown promise in structure prediction tasks (Madaan et al., 2022; Li et al., 2023; Wang et al., 2023; Li et al., 2024; Bi et al., 2024), as code languages provide a more natural format for structural data. In CODETAXO, we frame taxonomy expansion as a code completion task. We introduce a base Entity class to store entity surface names, definitions, parent refer
|
| 34 |
+
|
| 35 |
+
ences, and child lists, along with two methods for modifying the taxonomic relations between entities. Each existing taxonomy entity is instantiated as a corresponding Entity object. Due to constraints of contextual window size, we apply a similarity-based filter, using SimCSE (Gao et al., 2021) to encode textual description for entities, to include only the most relevant entities in the prompt
|
| 36 |
+
|
| 37 |
+
We evaluate CODETAXO through extensive experiments on two sets of small-scale WordNet and Graphine sub-taxonomies (Bansal et al., 2014; Liu et al., 2021a), as well as three large-scale SemEval-2016 taxonomies (Bordea et al., 2016). Our one-shot CODETAXO surpasses all self-supervised baselines trained on large-scale SemEval-2016 annotations, achieving relative accuracy improvements of $10.26\%$ , $8.89\%$ , and $9.21\%$ on SemEval-Sci, SemEval-Env, and SemEval-Food, respectively. Additionally, we evaluated CODETAXO using various open-source LLMs, revealing several interesting observations discussed in this work.
|
| 38 |
+
|
| 39 |
+
In summary, our main contributions include:
|
| 40 |
+
|
| 41 |
+
- We introduce CODETAXO, an innovative in-context learning method that utilizes code language prompts to represent taxonomic relationships between entities, thereby improving the effectiveness of taxonomy expansion.
|
| 42 |
+
- We develop a similarity-based filter, which employs a small pre-trained model to encode the textual descriptions of entities, ensuring that only highly relevant entities are included in the prompt concerning the query entity.
|
| 43 |
+
- Extensive experiments demonstrate that CODETAXO significantly enhances the performance of taxonomy expansion across two sets of small-scale sub-taxonomies and three large-scale taxonomies.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 3: Prompt Overview of CODETAXO
|
| 47 |
+
|
| 48 |
+
# 2 Problem Definition
|
| 49 |
+
|
| 50 |
+
Definition 1 (Taxonomy) We follow the definition of taxonomy in (Jiang et al., 2023). A taxonomy $\mathcal{T} = (\mathcal{E},\mathcal{H})$ is a tree-like structure, where each entity $e\in \mathcal{E}$ is a conceptual entity, and each edge $h\in \mathcal{H}$ represents the hypernymy-hyponymy relation between the two entities connected by it. Each entity $e$ is associated with a set of textual description $\mathcal{X}_e = \{X_e^t,X_e^d\}$ , where $X_{e}^{t}$ is its term and $X_{e}^{d}$ is its definition. Meanwhile, each directed edge $h = \langle p,c\rangle \in \mathcal{H}$ represents a parent-child relationship that points to a child entity $c$ from its most exact hypernymy entity $p$ .
|
| 51 |
+
|
| 52 |
+
Definition 2 (Taxonomy Expansion) Given a set of emerging conceptual entities $\mathcal{E}'$ , taxonomy expansion aims to incorporate these entities into an existing seed taxonomy $\mathcal{T}_0 = (\mathcal{E}_0, \mathcal{H}_0)$ . The goal is to expand $\mathcal{T}_0$ to be a larger taxonomy $\mathcal{T} = (\mathcal{E}_0 \cup \mathcal{E}', \mathcal{H}')$ . To insert each query entity $q \in \mathcal{E}'$ , we identify an appropriate anchor entity $a \in \mathcal{E}_0$ and introduce a new edge $\langle q, a \rangle$ . Consequently, the updated edge set is $\mathcal{H}' = \mathcal{H}_0 \cup_{q \in \mathcal{E}'} \{\langle q, a \rangle\}$ .
|
| 53 |
+
|
| 54 |
+
# 3 Methodology
|
| 55 |
+
|
| 56 |
+
In this section, we provide a comprehensive overview of our proposed CODETAXO designed for addressing the taxonomy expansion task. Specifically, CODETAXO expands the existing taxonomy by prompting LLMs with code language. The pipeline of CODETAXO is shown in Figure 2. Our CODETAXO consists of three parts: Task Instruc
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 4: Python code in CODETAXO defining a Entity class for managing parent-child relations.
|
| 60 |
+
|
| 61 |
+
tion, Taxonomy Code Representation, and Few-shot Demonstrations Construction.
|
| 62 |
+
|
| 63 |
+
# 3.1 Task Instruction
|
| 64 |
+
|
| 65 |
+
To enhance the effectiveness and accuracy of LLMs in completing the taxonomy expansion task, we propose a detailed task description along with a set of fundamental rules, denoted as $\mathcal{R}$ , for expanding the existing taxonomy via the query entity. As illustrated in Figure 3, component (a) outlines the objectives of the taxonomy expansion task, framing it as a code completion task and specifying add_parent function should be employed. In component (b), we emphasize a set of fundamental rules $\mathcal{R}$ for the taxonomy expansion task. These rules include the following: 1. Do not use entities that are not covered in the existing taxonomy $\mathcal{T}_0 = (\mathcal{E}_0, \mathcal{H}_0)$ ( $\mathbf{r}_1$ ); 2. Maintain the output generation format by LLMs, consisting of one line of code followed by one line explaining why the model made that prediction ( $\mathbf{r}_2$ ); 3. Refrain from generating additional content ( $\mathbf{r}_3$ ). Additionally, the rule for generating an explanation for the prediction in $\mathbf{r}_2$ is optional for future analysis. In CODETAXO, this rule is omitted as generating explanations is not required.
|
| 66 |
+
|
| 67 |
+
# 3.2 Taxonomy Code Representation
|
| 68 |
+
|
| 69 |
+
To represent the existing taxonomy $\mathcal{T}_0 = (\mathcal{V}_0,\mathcal{E}_0)$ as code language, we concatenate the entity class definition, representation of existing taxonomic relations, and the code completion prompt. We use Python as the programming language for the code prompt due to its widespread popularity.
|
| 70 |
+
|
| 71 |
+
# 3.2.1 Entity Class Definition
|
| 72 |
+
|
| 73 |
+
First, we define a base type Entity to be inherited by each entity mentioned in the taxonomy expan
|
| 74 |
+
|
| 75 |
+
sion. In Figure 4, we define a Python class named Entity that models a taxonomic structure with parent-child relations. The first line imports the List type from the typing module, which is used for type hinting. This allows the child attribute to be explicitly declared as a list of Entity objects.
|
| 76 |
+
|
| 77 |
+
The Entity class encapsulates the attributes and methods for managing hierarchical entities. The __init__ method initializes an instance of the Entity class with the following parameters:
|
| 78 |
+
|
| 79 |
+
name: A string storing the term of the entity.
|
| 80 |
+
- description: A string storing the textual description of the entity
|
| 81 |
+
- parent: An instance of the Entity class, denoting the parent entity within the taxonomy.
|
| 82 |
+
- child: A list of entities, each an instance of the Entity class, storing the entity's children.
|
| 83 |
+
|
| 84 |
+
These instance attributes are assigned as follows: self.name, self.description, self.parent, and self(child. Additionally, since we consider that each entity in the taxonomy should only have one parent entity, we do not use the List type for the parent attribute, unlike the child attribute.
|
| 85 |
+
|
| 86 |
+
The Entity class includes two methods for modifying the parent-child relations between entities. The first method, add_parent, assigns a parent entity to the current entity. It takes one parameter, parent, which is an instance of the Entity class. The second method, add_child, appends the child entity to the self .child list of the current entity. This method also requires one parameter, child, which is an instance of the Entity class.
|
| 87 |
+
|
| 88 |
+
# 3.2.2 Representing the Existing Taxonomy
|
| 89 |
+
|
| 90 |
+
To facilitate the taxonomy expansion, the initial taxonomy $\mathcal{T}_0$ is encoded using a programming language. Instances of the Entity class, as defined in Section 3.2.1, are created for each entity $e$ in the set $\mathcal{E}_0$ of $\mathcal{T}_0$ . The taxonomy $\mathcal{T}_0$ is traversed from top to bottom, and for each entry, an entity $e \in \mathcal{E}_0$ is instantiated as follows:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\begin{array}{l} e = \text {E n t i t y} (n a m e = X _ {e} ^ {t}, \text {d e s c r i p t i o n} = X _ {e} ^ {d}, \\ \operatorname {p a r e n t} = p _ {e}, \operatorname {c h i l d} = \mathcal {C} _ {e}) \\ \end{array}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $p_e$ is the parent entity of $e$ , and $\mathcal{C}_e = [c_e^1, c_e^2, \ldots, c_e^n]$ is the list of its child entities.
|
| 97 |
+
|
| 98 |
+
# 3.2.3 Semantic Similarity Filter
|
| 99 |
+
|
| 100 |
+
Including all entity $e \in \mathcal{E}_0$ to represent the existing taxonomy $\mathcal{T}_0$ presents two problems. First, large-scale taxonomies overload the LLM's limited
|
| 101 |
+
|
| 102 |
+
context window. Second, it unnecessarily expands the search space, introducing irrelevant entities and redundant information. To mitigate these issues, we propose a Semantic Similarity Filter that selects only entities relevant to the query $q$ for inclusion in the prompt context.
|
| 103 |
+
|
| 104 |
+
To compute the similarity between a query entity $q$ with its descriptive text $\mathcal{X}q = \{X_q^t,X_q^d\}$ and an entity $e_i\in \mathcal{E}0$ with its descriptive text $\mathcal{X}e_i = \{X_{e_i}^t,X_{e_i}^d\}$ , we employ the pre-trained language model (PLM) as textual encoder. We concatenate the query entity $q$ and the $i$ -th entity $e_i$ with special tokens [CLS] and [SEP], then encode the sequence using a pre-trained SimCSE model (Gao et al., 2021). SimCSE converts them into $m$ -dimensional representation $\mathbf{q}$ , $\mathbf{e}_i\in \mathbb{R}^m$ :
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\mathbf {q} = \operatorname {P L M} \left(\left[ \mathrm {C L S} \right] \oplus X _ {q} ^ {t} \oplus X _ {q} ^ {d} \oplus [ \mathrm {S E P} ]\right)
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\mathbf {e} _ {i} = \operatorname {P L M} \left(\left[ \mathrm {C L S} \right] \oplus X _ {e _ {i}} ^ {t} \oplus X _ {e _ {i}} ^ {d} \oplus [ \mathrm {S E P} ]\right)
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
The semantic relevance is calculated using cosine similarity between $\{\mathbf{e}_i\}_{i=1}^n$ and $\mathbf{q}$ . We select the Top- $k$ entities most similar to query entity $q$ from the entity set $\mathcal{E}_0$ in $\mathcal{T}_0$ as follows:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathcal{I} = \operatorname *{argmax}_{\substack{\mathcal{I}\subseteq \{1,2,\ldots ,n\} ,\\ |\mathcal{I}| = k}}\sum_{i\in \mathcal{I}}\cos_{-}\mathrm{sim}(\mathbf{e}_{i},\mathbf{q})
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\mathcal{I}$ is the index set of the selected entities $\mathcal{E}_{sel} = \{e_i | i \in \mathcal{I}\}$ that represents the existing taxonomy. $k$ is set to $50\%$ of the entities in $\mathcal{E}_0$ .
|
| 121 |
+
|
| 122 |
+
# 3.2.4 Code Completion Prompt.
|
| 123 |
+
|
| 124 |
+
The code completion prompt involves the instantiation of a query entity $q$ as an instance of the Entity class, as defined in Section 3.2.1. Since the query entity $q$ lacks information about its parent and child entities, it is instantiated as follows:
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
q = \text {E n t i t y} (n a m e = X _ {q} ^ {t}, \text {d e s c r i p t i o n} = X _ {q} ^ {d},
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\operatorname {p a r e n t} = \text {N o n e}, \operatorname {c h i l d} = [ ])
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
Here, $X_{q}^{t}$ and $X_{q}^{d}$ define the query's name and description, while None and [] indicate the absence of parent and child entities.
|
| 135 |
+
|
| 136 |
+
We include the requirement "Find the parent of the query node" as a comment to guide LLMs in selecting an anchor entity $a \in \mathcal{E}_{\text{sel}}$ as the parent entity for entity $q$ . The output is the query $q$ , an instance of the Entity class, which invokes the predefined method add_parent() to assign $a$ as its parent entity like q.add_parent(a).
|
| 137 |
+
|
| 138 |
+
<table><tr><td>Dataset</td><td colspan="2">SemEval-Sci</td><td colspan="2">SemEval-Env</td><td colspan="2">SemEval-Food</td><td colspan="2">WordNet</td><td colspan="2">Graphine</td></tr><tr><td>Metric</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td></tr><tr><td colspan="11">Self-supervised Setting</td></tr><tr><td>TaxoExpan</td><td>27.8</td><td>57.6</td><td>11.1</td><td>54.8</td><td>27.6</td><td>54.2</td><td>19.8</td><td>64.8</td><td>24.5</td><td>65.9</td></tr><tr><td>STEAM</td><td>36.5</td><td>68.2</td><td>36.1</td><td>69.6</td><td>34.2</td><td>67.0</td><td>23.2</td><td>62.4</td><td>20.3</td><td>63.1</td></tr><tr><td>HEF</td><td>53.6</td><td>75.6</td><td>55.3</td><td>71.4</td><td>47.9</td><td>73.5</td><td>16.4</td><td>60.3</td><td>25.5</td><td>66.5</td></tr><tr><td>Musubu</td><td>44.9</td><td>76.2</td><td>45.3</td><td>65.4</td><td>42.3</td><td>72.4</td><td>28.5</td><td>64.0</td><td>35.4</td><td>75.2</td></tr><tr><td>TEMP</td><td>57.8</td><td>85.3</td><td>49.2</td><td>77.7</td><td>47.6</td><td>81.0</td><td>29.4</td><td>65.7</td><td>35.9</td><td>73.8</td></tr><tr><td>BoxTaxo</td><td>31.8</td><td>64.7</td><td>38.1</td><td>75.4</td><td>31.4</td><td>66.8</td><td>26.4</td><td>63.9</td><td>29.2</td><td>68.2</td></tr><tr><td>TaxoPrompt</td><td>61.4</td><td>85.6</td><td>57.4</td><td>83.6</td><td>53.2</td><td>83.1</td><td>40.3</td><td>71.5</td><td>33.9</td><td>74.4</td></tr><tr><td>TaxoInstruct</td><td>45.9</td><td>76.2</td><td>48.8</td><td>77.2</td><td>34.3</td><td>70.2</td><td>43.3</td><td>71.8</td><td>31.8</td><td>69.0</td></tr><tr><td colspan="11">1-shot Setting</td></tr><tr><td>NL (GPT-4o)</td><td>54.8</td><td>88.3</td><td>52.5</td><td>81.3</td><td>55.5</td><td>85.6</td><td>72.2</td><td>90.7</td><td>69.8</td><td>89.1</td></tr><tr><td>CODE TAXO (GPT-4o)</td><td>67.7</td><td>89.2</td><td>62.5</td><td>86.1</td><td>58.1</td><td>85.3</td><td>74.5</td><td>91.3</td><td>72.9</td><td>91.0</td></tr><tr><td>NL (GPT-4o-mini)</td><td>50.0</td><td>83.0</td><td>35.0</td><td>76.1</td><td>55.1</td><td>87.2</td><td>60.1</td><td>86.0</td><td>58.3</td><td>85.2</td></tr><tr><td>CODE TAXO (GPT-4o-mini)</td><td>58.1</td><td>85.6</td><td>42.5</td><td>76.0</td><td>55.9</td><td>85.3</td><td>68.8</td><td>89.2</td><td>61.5</td><td>85.1</td></tr><tr><td colspan="11">5-shot Setting</td></tr><tr><td>NL (GPT-4o)</td><td>56.5</td><td>84.3</td><td>60.0</td><td>85.5</td><td>52.5</td><td>86.9</td><td>72.2</td><td>90.1</td><td>69.3</td><td>90.0</td></tr><tr><td>CODE TAXO (GPT-4o)</td><td>66.1</td><td>88.0</td><td>67.5</td><td>87.0</td><td>60.2</td><td>85.7</td><td>76.5</td><td>91.9</td><td>77.6</td><td>93.4</td></tr><tr><td>NL (GPT-4o-mini)</td><td>53.2</td><td>84.8</td><td>42.5</td><td>80.2</td><td>57.2</td><td>87.6</td><td>63.4</td><td>87.3</td><td>63.5</td><td>88.6</td></tr><tr><td>CODE TAXO (GPT-4o-mini)</td><td>59.7</td><td>84.8</td><td>47.5</td><td>78.3</td><td>58.9</td><td>87.9</td><td>66.8</td><td>88.6</td><td>70.3</td><td>89.1</td></tr></table>
|
| 139 |
+
|
| 140 |
+
Table 1: Performance on taxonomy expansion across two small-scale taxonomies (WordNet and Graphine) and three large-scale taxonomies (SemEval2016: science, environment, food). Bold indicates the highest score; underlined indicates the second-highest. All metrics are in percentages (\%).
|
| 141 |
+
|
| 142 |
+
We propose incorporating an optional feature in the code completion prompt: "then generating a comment to explain why it is the parent of the given query node". This feature allows the LLM to simultaneously generate both the prediction and its rationale, improving explainability and revealing interesting insights, as discussed in Section 4.5.
|
| 143 |
+
|
| 144 |
+
# 3.3 Few-shot Demonstration Construction
|
| 145 |
+
|
| 146 |
+
To enhance LLMs' ability to expand our existing taxonomy, we propose a method for constructing demonstrations using the initial taxonomy $\mathcal{T}_0$ . Our demonstration selection strategy focuses on the semantic similarity between the query entity $q$ and entities $e \in \mathcal{E}_0$ in the existing taxonomy. Specifically, we use SimCSE encoding to calculate these similarities, selecting the top-5 entities from the existing set $\mathcal{E}_0$ based on their similarity to $q$ :
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\mathcal{I}_{d} = \operatorname *{argmax}_{\substack{\mathcal{I}_{d}\subseteq \{1,2,\ldots ,n\} ,\\ |\mathcal{I}_{d}| = 5}}\sum_{i\in \mathcal{I}_{d}}\cos_{-}\mathrm{sim}(\mathbf{e}_{i},\mathbf{q})
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
Here, $\mathcal{I}_d$ represents the indices of entities selected for the demonstration set $\mathcal{E}_{demo} = \{e_i | i \in \mathcal{I}_d\}$ . For each demonstration $d_i$ , we treat each entity $e_i \in \mathcal{E}_{demo}$ as a query entity and, following the procedure outlined in Section 3.2.4, add its parent entity using the add_parent method.
|
| 153 |
+
|
| 154 |
+
# 4 Experiments
|
| 155 |
+
|
| 156 |
+
# 4.1 Experimental Settings
|
| 157 |
+
|
| 158 |
+
Datasets. We evaluate taxonomy expansion on small-scale WordNet sub-taxonomies (Bansal et al., 2014) and Graphine taxonomies (Liu et al., 2021a). Additionally, we evaluate three large-scale taxonomies from SemEval-2016 (Bordea et al., 2016) across science, environment, and food domains. For all benchmarks, $20\%$ of leaf entities are reserved for testing, with the remaining entities used for training. See App. A.1 for details.
|
| 159 |
+
|
| 160 |
+
Baselines. We evaluate CODETAXO, using both GPT-4O and GPT-4O-MINI, against self-supervised baselines including TaxoExpan (Shen et al., 2020), STEAM (Yu et al., 2020), HEF (Wang et al., 2022), Musubu (Takeoka et al., 2021), TEMP (Liu et al., 2021b), BoxTaxo (Jiang et al., 2023), TaxoPrompt (Xu et al., 2022), and TaxoInstruct (Shen et al., 2024), and prompting LLMs through natural language. See details in App. A.2.
|
| 161 |
+
|
| 162 |
+
Evaluation Metrics: We use two Accuracy (ACC) and Wu & Palmer similarity (Wu&P) to evaluate the performance of CODETAXO and baselines. See details in App. A.3
|
| 163 |
+
|
| 164 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Def.</td><td colspan="2">SemEval-Sci</td><td colspan="2">SemEval-Env</td><td colspan="2">SemEval-Food</td><td colspan="2">WordNet</td><td colspan="2">Graphine</td></tr><tr><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td></tr><tr><td colspan="12">1-shot Setting</td></tr><tr><td rowspan="2">NL (GPT-4o)</td><td>✓</td><td>54.8</td><td>88.3</td><td>52.5</td><td>81.3</td><td>55.5</td><td>85.6</td><td>72.2</td><td>90.7</td><td>69.8</td><td>89.1</td></tr><tr><td>×</td><td>59.7</td><td>89.0</td><td>57.5</td><td>82.8</td><td>56.4</td><td>87.0</td><td>68.1</td><td>89.1</td><td>68.8</td><td>90.1</td></tr><tr><td rowspan="2">CODETAXO (GPT-4o)</td><td>✓</td><td>67.7</td><td>89.2</td><td>62.5</td><td>86.1</td><td>58.1</td><td>85.3</td><td>74.5</td><td>91.3</td><td>72.9</td><td>91.0</td></tr><tr><td>×</td><td>56.5</td><td>84.5</td><td>55.0</td><td>85.1</td><td>56.8</td><td>86.1</td><td>66.4</td><td>88.4</td><td>69.8</td><td>88.8</td></tr><tr><td colspan="12">5-shot Setting</td></tr><tr><td rowspan="2">NL (GPT-4o)</td><td>✓</td><td>56.5</td><td>84.3</td><td>60.0</td><td>85.5</td><td>52.5</td><td>86.9</td><td>72.2</td><td>90.1</td><td>69.3</td><td>90.0</td></tr><tr><td>×</td><td>59.7</td><td>89.6</td><td>50.0</td><td>79.3</td><td>55.5</td><td>87.6</td><td>70.5</td><td>89.9</td><td>68.8</td><td>88.9</td></tr><tr><td rowspan="2">CODETAXO (GPT-4o)</td><td>✓</td><td>66.1</td><td>88.0</td><td>67.5</td><td>87.0</td><td>60.2</td><td>85.7</td><td>76.5</td><td>91.9</td><td>77.6</td><td>93.4</td></tr><tr><td>×</td><td>51.6</td><td>80.6</td><td>65.0</td><td>86.7</td><td>57.6</td><td>86.1</td><td>67.8</td><td>88.8</td><td>68.8</td><td>89.7</td></tr></table>
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 5: Performance comparison of NL and CODE-TAXO (CT) across Llama trained on Code and Natural Language domains. Due to limited contextual window sizes, evaluations were conducted on small-scale subtaxonomies from WordNet (WN) and Graphine (G).
|
| 168 |
+
|
| 169 |
+
# 4.2 Experimental Results
|
| 170 |
+
|
| 171 |
+
# 4.2.1 Can CODETAXO expand taxonomy better than other baselines?
|
| 172 |
+
|
| 173 |
+
We evaluate CodeTaxo against baseline methods for taxonomy expansion in Table 1, including self-supervised and in-context learning approaches. On WordNet and Graphine, both NL and CODETAXO significantly outperform self-supervised baselines. In one-shot settings, CODETAXO improves accuracy by $72.06\%$ and $103.06\%$ over the best self-supervised methods, demonstrating that minimal annotated data effectively unlocks LLMs' internal knowledge, while self-supervised methods struggle with limited-scale taxonomies. On large-scale SemEval-2016 taxonomies, CODETAXO surpasses the best self-supervised baseline, TaxoPrompt, by $10.26\%$ , $8.89\%$ , and $9.21\%$ on SemEval-Sci, SemEval-Env, and SemEval-Food, respectively. While the NL prompt underperforms TaxoPrompt on SemEval-Sci and SemEval-Env, it exceeds TaxoPrompt on SemEval-Food but still trails CodeTaxo by $4.68\%$ , highlighting CODETAXO's superior ability to capture taxonomic structures. Performance depends on LLM capability and demonstration count, with GPT-4o outperforming GPT-4o-mini and more demonstrations improving accuracy
|
| 174 |
+
|
| 175 |
+
Table 2: Impact of Definition Sentences (Def.) on CODETAXO and NL Performance in 1-Shot and 5-Shot Settings.
|
| 176 |
+
|
| 177 |
+
<table><tr><td rowspan="2">Setting</td><td colspan="2">Config.</td><td colspan="2">SemEval-Sci</td><td colspan="2">SemEval-Env</td><td colspan="2">SemEval-Food</td></tr><tr><td>Demo.</td><td>Filter</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td><td>Acc</td><td>Wu&P</td></tr><tr><td rowspan="4">1-shot</td><td>×</td><td>×</td><td>50.0</td><td>84.0</td><td>47.5</td><td>81.1</td><td>56.4</td><td>85.3</td></tr><tr><td>×</td><td>✓</td><td>61.3</td><td>84.4</td><td>55.0</td><td>83.2</td><td>54.2</td><td>84.6</td></tr><tr><td>✓</td><td>×</td><td>61.3</td><td>85.9</td><td>47.5</td><td>79.0</td><td>57.2</td><td>86.7</td></tr><tr><td>✓</td><td>✓</td><td>67.7</td><td>89.2</td><td>62.5</td><td>86.1</td><td>58.1</td><td>85.3</td></tr><tr><td rowspan="4">5-shot</td><td>×</td><td>×</td><td>58.1</td><td>86.0</td><td>55.0</td><td>82.8</td><td>56.4</td><td>86.5</td></tr><tr><td>×</td><td>✓</td><td>59.7</td><td>84.7</td><td>57.5</td><td>83.7</td><td>58.5</td><td>85.8</td></tr><tr><td>✓</td><td>×</td><td>61.3</td><td>88.5</td><td>55.0</td><td>85.3</td><td>57.6</td><td>86.5</td></tr><tr><td>✓</td><td>✓</td><td>66.1</td><td>88.0</td><td>67.5</td><td>87.02</td><td>60.2</td><td>85.7</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 3: Ablation Study of two major modules in the CODETAXO: All metrics are presented in percentages $(\%)$ . Configurations indicate whether Demonstration Selection (Demo.) and Semantic Similarity Filter (Filter) were employed.
|
| 180 |
+
|
| 181 |
+
across benchmarks, underscoring the value of high-quality demonstrations for taxonomy expansion.
|
| 182 |
+
|
| 183 |
+
# 4.2.2 How does CODETAXO perform across different large language models?
|
| 184 |
+
|
| 185 |
+
We evaluate CODETAXO, a prompting method specifically designed for programming languages, by comparing its effectiveness against natural language prompting on both general-purpose LLMs and Code-LLMs. We used Llama-family models, including LLaMa-3-70B-instruct, CodeLLaMA-70B-instruct, and the smaller CodeLLaMA-34B-instruct, to evaluate how model size affects performance. Given the limited contextual capacity of these models, we focused our evaluation on WordNet and Graphine, as shown in Figure 5. The results highlight CODETAXO's superior accuracy and Wu&P scores across all tested models, outperforming natural language prompts in representing taxonomic structures for black-box LLMs like GPT-4 and open-source LLMs. The analysis further reveals that CODETAXO benefits more significantly from Code-LLMs, with a $13.33\%$ accuracy improvement on WordNet compared to $6.51\%$ for natural language prompts when transitioning to
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
Figure 6: Effect of Top-K relevant entities selected through SimCSE-based Semantic Similarity Filter.
|
| 189 |
+
|
| 190 |
+
code language prompting. Notably, CodeLLaMA-34B-instruct, despite being smaller, showed better performance on WordNet and Graphine, emphasizing CODETAXO's efficiency and robustness.
|
| 191 |
+
|
| 192 |
+
# 4.3 Hyperparameter Analysis of CODETAXO
|
| 193 |
+
|
| 194 |
+
This section explores the impact of selecting Top-K entities using the Semantic Similarity Filter on model performance, with experiments conducted using GPT-4o-mini across three SemEval taxonomies. As shown in Figure 6, increasing the number of Top-K entities generally enhances performance by retaining more entities, thereby reducing the likelihood of filtering out the ground truth and boosting prediction accuracy. However, this improvement involves a trade-off: a smaller search space sharpens the model's focus but increases the risk of excluding the ground truth. For instance, in the SemEval-Sci taxonomy, the model achieved optimal performance with a Hit@25 score of $78\%$ by retaining the top 25 entities, demonstrating the filter's ability to balance search space and coverage. To further refine this balance, we retained the top $50\%$ of entities in our experiments, ensuring that Hit@n exceeded $90\%$ across all benchmarks.
|
| 195 |
+
|
| 196 |
+
# 4.4 Ablation Study
|
| 197 |
+
|
| 198 |
+
# 4.4.1 Insight of Definition Sentences
|
| 199 |
+
|
| 200 |
+
We performed an ablation study on definition sentences, a vital data source for taxonomy expansion tasks, using two prompting methods: NL and CODETAXO. Our results in Table 2 show that without definition sentences, CODETAXO suffers a substantial drop in accuracy and Wu&P across all benchmarks in both 1-shot and 5-shot settings, highlighting its reliance on semantic information from definitions to establish taxonomic relationships. Interestingly, NL performed better without definition sentences in specific benchmarks (SemEval-Sci, SemEval-Env, SemEval-Food) in the 1-shot setting, and in SemEval-Sci and SemEval-Food in the 5-shot setting. This suggests that NL struggles to process definition information
|
| 201 |
+
|
| 202 |
+
effectively, potentially leading to incorrect predictions when overloaded with definitional content.
|
| 203 |
+
|
| 204 |
+
# 4.4.2 Effectiveness of Demo. Selection and Semantic Similarity Filter
|
| 205 |
+
|
| 206 |
+
We performed an ablation study on the three SemEval2016 benchmarks mentioned above to assess the effectiveness of the two primary modules in CODETAXO: Demonstration Selection (Demo.) and the Semantic Similarity Filter (Filter). Due to the relatively small size of the taxonomies in WordNet and Graphine, filtering redundant entities from the existing taxonomies was unnecessary. The results, presented in Table 3, indicate that selecting demonstrations related to the query entity and filtering out unrelated entities in the existing taxonomy significantly improves taxonomy expansion. This finding suggests that incorporating more relevant contextual information and reducing redundant information to narrow the search space is beneficial for both accuracy and the Wu&P score across all SemEval2016 benchmarks.
|
| 207 |
+
|
| 208 |
+
# 4.5 Case Study
|
| 209 |
+
|
| 210 |
+
This section presents a case study demonstrating the effectiveness of our CODETAXO framework by comparing its outputs to those of the natural language (NL) prompt, alongside model predictions and corresponding definitions in Table 4. Notably, CODETAXO aligns closely with the ground truth and generates explanations using the prompt from Section 3.2.4 to facilitate insightful discussions. For instance, in the query functional genomics, CODETAXO accurately classifies it under genomics, emphasizing its focus on the "functions and interactions of genes within the genome", whereas the NL model incorrectly selects the broader term genetics. Similarly, CODETAXO identifies geopolitics as the parent entity of geostrategy, highlighting its emphasis on geographic factors, while the NL model selects the more general category of politics. These cases showcase CODETAXO's ability to leverage definition information for a comprehensive understanding of taxonomy structures, resulting in more precise predictions.
|
| 211 |
+
|
| 212 |
+
# 5 Related Works
|
| 213 |
+
|
| 214 |
+
# 5.1 Taxonomy Expansion
|
| 215 |
+
|
| 216 |
+
In taxonomy expansion, various approaches have been developed to integrate emerging entities into
|
| 217 |
+
|
| 218 |
+
<table><tr><td>Query</td><td>NL Output</td><td>CodeTaxo Output</td><td>CodeTaxo Exp.</td></tr><tr><td>functional genomics</td><td>genetics</td><td>genomics</td><td>genomics</td></tr><tr><td>Def. functional genomics is a field of molecular biology that attempts to describe gene functions and interactions</td><td>Def. genetics is a branch of biology concerned with the study of genes, genetic variation, and heredity in organisms.</td><td>Def. genomics is an interdisciplinary field of biology focusing on the structure, function, evolution, mapping, and editing of genomes</td><td>Exp. Functional genomics is a subfield of genomics that focuses on understanding the functions and actions of genes within the genome.</td></tr><tr><td>geostrategy</td><td>politics</td><td>geopolitics</td><td>geopolitics</td></tr><tr><td>Def. geostrategy, a sub-field of geopolitics, is a type of foreign policy guided principally by geographical factors as they inform, constrain, or affect political and military planning</td><td>Def. politics is the set of activities that are associated with making decisions in groups, or other forms of power relations between individuals, such as the distribution of resources or status</td><td>Def. geopolitics on politics and international relations</td><td>Exp. : Geostrategy is a subfield of geopolitics, which focuses on geographic factors influencing political and military planning.</td></tr></table>
|
| 219 |
+
|
| 220 |
+
Table 4: Case study comparing the outputs of the CODETAXO and NL prompt using the SemEval-Sci benchmarks. The table presents the definitions (Def.) of each model's prediction, additionally with the CODETAXO explanations (Exp.) provided in the last column (CodeTaxo Exp.). Yellow highlights emphasize the specific focus of the query within its definition, as correctly captured by CODETAXO, while green highlights indicate broader, less precise concepts used by the NL model.
|
| 221 |
+
|
| 222 |
+
existing taxonomies. Aly et al. (Aly et al., 2019) and Ma et al. utilized hyperbolic embeddings to capture taxonomic relations, while Jiang et al. (Jiang et al., 2023) and Xu et al. (Xu et al., 2024) employed box embedding and fuse embedding instead of single vector embedding to encode taxonomic relations respectively. Manzoor et al. (Manzoor et al., 2020) introduced implicit edge semantics to enhance entity representations. Self-supervised methods, such as Egonet (Shen et al., 2020), mini-path (Yu et al., 2020), and EgoTree (Wang et al., 2021), have also been explored to model structural information within taxonomies. To leverage more semantic information from the textural description of entities, Liu et al. (Liu et al., 2021b), Takeoka et al. (Takeoka et al., 2021) and Xu et al. (Xu et al., 2022) fine-tuned BERT-based models to leverage textual descriptions of entities. Zhu et al. (Zhu et al., 2023) integrates textual and visual semantics to capture the hierarchical relation between entities. Shen et al. (Shen et al., 2024) and Moskvoretskii et al. (Moskvoretskii et al., 2024) unified framework combining various taxonomy construction tasks for instruction tuning. To our knowledge, CODETAXO is the first work to perform taxonomy expansion via prompting LLMs.
|
| 223 |
+
|
| 224 |
+
# 5.2 Code-LLMs for Structured Tasks
|
| 225 |
+
|
| 226 |
+
Recent studies have demonstrated the strong performance of Code-LLMs in complex reasoning tasks (Yang et al.; MA et al.), including symbolic
|
| 227 |
+
|
| 228 |
+
reasoning (Madaan et al., 2022; Cheng et al.), graph reasoning (Cai et al., 2024), event structure prediction (Wang et al., 2023; Chen et al., 2023), mathematical reasoning (Gao et al., 2023), and knowledge graph construction (Li et al., 2023; Bi et al., 2024). These works highlight Code-LLMs' ability to transform unstructured text into structured representations, enabling advanced reasoning tasks. In this paper, we focus on enhancing Code-LLMs' ability to comprehend and expand existing taxonomies through emerging query entities.
|
| 229 |
+
|
| 230 |
+
# 6 Conclusion
|
| 231 |
+
|
| 232 |
+
In this paper, we introduce CODETAXO, a novel approach to taxonomy expansion that leverages code-based prompts to effectively utilize the inherent knowledge within LLMs. Our method addresses key challenges in taxonomy expansion by reformulating the task as a code completion problem and employing a Semantic Similarity Filtering mechanism to optimize the use of LLMs' contextual capacity. Extensive experiments on small-scale and large-scale taxonomies demonstrate that CODETAXO achieves state-of-the-art performance in both one-shot settings and five-shot settings. We envision CODETAXO as a powerful framework for integrating emerging entities into existing taxonomies by accurately identifying appropriate parent entities and also providing new insights for leveraging LLMs in structured knowledge tasks.
|
| 233 |
+
|
| 234 |
+
# Limitations
|
| 235 |
+
|
| 236 |
+
This study represents an initial effort to utilize LLMs for taxonomy expansion. Our primary objective is to identify an effective in-context learning strategy to leverage the potential of LLMs. We acknowledge that the performance and scalability of CODETAXO are constrained by the inherent knowledge of LLMs and the limitations of their context window size. While this paper does not address the challenges of expanding LLM knowledge or increasing context window size, we hope that our work will inspire further research in these areas.
|
| 237 |
+
|
| 238 |
+
# Ethics Statement
|
| 239 |
+
|
| 240 |
+
Our research addresses taxonomy expansion within general knowledge domains, leveraging our proposed method, CODETAXO, which uses large language models (LLMs) to generate structured knowledge and overcome the limitations of traditional manual taxonomy construction. We exclusively utilize publicly available datasets and benchmarks, avoiding user-generated, private, or sensitive data to ensure compliance with privacy and ethical standards. While our datasets do not engage directly with ethically sensitive content, LLMs inherently carry biases from their pre-training data, which may influence the structure and content of the expanded taxonomies. To address this, we integrate mechanisms for generating explanatory outputs, enabling detailed scrutiny of the model's reasoning and identifying potential biases. Additionally, we recognize the risks of applying similar methodologies to subjective or sensitive domains, which could lead to misrepresentation or bias. To mitigate such risks, we emphasize collaboration with domain experts and advocate for responsible application of our methodologies across diverse fields, aiming to promote fairness, accuracy, and ethical research practices.
|
| 241 |
+
|
| 242 |
+
# Acknowledgements
|
| 243 |
+
|
| 244 |
+
This work was supported by NSF IIS-2119531, IIS-2137396, IIS-2142827, IIS-2234058, CCF-1901059, and ONR N00014-22-1-2507. The authors also thank the OpenAI Researcher Access Program (ID: 0000003889) for its support.
|
| 245 |
+
|
| 246 |
+
# References
|
| 247 |
+
|
| 248 |
+
Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774.
|
| 249 |
+
Rami Aly, Shantanu Acharya, Alexander Ossa, Arne Kohn, Chris Biemann, and Alexander Panchenko. 2019. Every child should have parents: A taxonomy refinement algorithm based on hyperbolic term embeddings. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4811-4817.
|
| 250 |
+
Mohit Bansal, David Burkett, Gerard De Melo, and Dan Klein. 2014. Structured learning for taxonomy induction with belief propagation. In ACL, pages 1041-1051.
|
| 251 |
+
Zhen Bi, Jing Chen, Yinuo Jiang, Feiyu Xiong, Wei Guo, Huajun Chen, and Ningyu Zhang. 2024. Codekgc: Code language model for generative knowledge graph construction. ACM Transactions on Asian and Low-Resource Language Information Processing, 23(3):1-16.
|
| 252 |
+
Georgeta Bordea, Els Lefever, and Paul Buitelaar. 2016. Semeval-2016 task 13: Taxonomy extraction evaluation (texeval-2). In Proceedings of the 10th international workshop on semantic evaluation (semeval-2016), pages 1081-1091.
|
| 253 |
+
Qiaolong Cai, Zhaowei Wang, Shizhe Diao, James Kwok, and Yangqiu Song. 2024. Codegraph: Enhancing graph reasoning of llms with code. arXiv preprint arXiv:2408.13863.
|
| 254 |
+
Yangyi Chen, Xingyao Wang, Manling Li, Derek Hoiem, and Heng Ji. 2023. Vstruct: Visual structural knowledge extraction via curriculum guided code-vision representation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 13342-13357.
|
| 255 |
+
Zhoujun Cheng, Tianbao Xie, Peng Shi, Chengzui Li, Rahul Nadkarni, Yushi Hu, Caiming Xiong, Dragomir Radev, Mari Ostendorf, Luke Zettlemoyer, et al. Binding language models in symbolic languages. In The Eleventh International Conference on Learning Representations.
|
| 256 |
+
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
|
| 257 |
+
Luyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023. Pal: Program-aided language models. In International Conference on Machine Learning, pages 10764–10799. PMLR.
|
| 258 |
+
|
| 259 |
+
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.
|
| 260 |
+
Jin Huang, Zhaochun Ren, Wayne Xin Zhao, Gaole He, Ji-Rong Wen, and Daxiang Dong. 2019. Taxonomy-aware multi-hop reasoning networks for sequential recommendation. In Proceedings of the twelfth ACM international conference on web search and data mining, pages 573-581.
|
| 261 |
+
Song Jiang, Qiyue Yao, Qifan Wang, and Yizhou Sun. 2023. A single vector is not enough: Taxonomy expansion via box embeddings. In Proceedings of the ACM Web Conference 2023, pages 2467-2476.
|
| 262 |
+
David Jurgens and Mohammad Taher Pilehvar. 2016. Semeval-2016 task 14: Semantic taxonomy enrichment. In Proceedings of the 10th international workshop on semantic evaluation (SemEval-2016), pages 1092-1102.
|
| 263 |
+
SeongKu Kang, Shivam Agarwal, Bowen Jin, Dongha Lee, Hwanjo Yu, and Jiawei Han. 2024. Improving retrieval in theme-specific applications using a corpus topical taxonomy. In Proceedings of the ACM on Web Conference 2024, pages 1497-1508.
|
| 264 |
+
Peng Li, Tianxiang Sun, Qiong Tang, Hang Yan, Yuanbin Wu, Xuan-Jing Huang, and Xipeng Qiu. 2023. Codeie: Large code generation models are better few-shot information extractors. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15339-15353.
|
| 265 |
+
Zixuan Li, Yutao Zeng, Yuxin Zuo, Weicheng Ren, Wenxuan Liu, Miao Su, Yucan Guo, Yantao Liu, Xiang Li, Zhilei Hu, et al. 2024. Knowcoder: Coding structured knowledge into llms for universal information extraction. arXiv preprint arXiv:2403.07969.
|
| 266 |
+
Bang Liu, Weidong Guo, Di Niu, Jinwen Luo, Chaoyue Wang, Zhen Wen, and Yu Xu. 2020. Giant: scalable creation of a web-scale ontology. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, pages 393-409.
|
| 267 |
+
Zequn Liu, Shukai Wang, Yiyang Gu, Ruiyi Zhang, Ming Zhang, and Sheng Wang. 2021a. Graphine: A dataset for graph-aware terminology definition generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3453-3463.
|
| 268 |
+
Zichen Liu, Hongyuan Xu, Yanlong Wen, Ning Jiang, Haiying Wu, and Xiaojie Yuan. 2021b. Temp: Taxonomy expansion with dynamic margin loss through taxonomy-paths. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 3854-3863.
|
| 269 |
+
|
| 270 |
+
YINGWEI MA, Yue Liu, Yue Yu, Yuanliang Zhang, Yu Jiang, Changjian Wang, and Shanshan Li. At which training stage does code data help llms reasoning? In The Twelfth International Conference on Learning Representations.
|
| 271 |
+
Aman Madaan, Shuyan Zhou, Uri Alon, Yiming Yang, and Graham Neubig. 2022. Language models of code are few-shot commonsense learners. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 1384-1403.
|
| 272 |
+
Emaad Manzoor, Rui Li, Dhananjay Shrouty, and Jure Leskovec. 2020. Expanding taxonomies with implicit edge semantics. In Proceedings of The Web Conference 2020, pages 2044-2054.
|
| 273 |
+
Viktor Moskvoretskii, Ekaterina Neminova, Alina Lobanova, Alexander Panchenko, and Irina Nikishina. 2024. Taxollama: Wordnet-based model for solving multiple lexical semantic tasks. arXiv preprint arXiv:2403.09207.
|
| 274 |
+
Jiaming Shen, Zhihong Shen, Chenyan Xiong, Chi Wang, Kuansan Wang, and Jiawei Han. 2020. Taxoexpan: Self-supervised taxonomy expansion with position-enhanced graph neural network. In Proceedings of The Web Conference 2020, pages 486-497.
|
| 275 |
+
Yanzhen Shen, Yu Zhang, Yunyi Zhang, and Jiawei Han. 2024. A unified taxonomy-guided instruction tuning framework for entity set expansion and taxonomy expansion. arXiv preprint arXiv:2402.13405.
|
| 276 |
+
Kai Sun, Yifan Xu, Hanwen Zha, Yue Liu, and Xin Luna Dong. 2024a. Head-to-tail: How knowledgeable are large language models (llms)? aka will llms replace knowledge graphs? In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 311-325.
|
| 277 |
+
Yushi Sun, Hao Xin, Kai Sun, Yifan Ethan Xu, Xiao Yang, Xin Luna Dong, Nan Tang, and Lei Chen. 2024b. Are large language models a good replacement of taxonomies? arXiv preprint arXiv:2406.11131.
|
| 278 |
+
Kunihiro Takeoka, Kosuke Akimoto, and Masafumi Oyamada. 2021. Low-resource taxonomy enrichment with pretrained language models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 2747-2758.
|
| 279 |
+
Yanchao Tan, Carl Yang, Xiangyu Wei, Chaochao Chen, Longfei Li, and Xiaolin Zheng. 2022. Enhancing recommendation with automated tag taxonomy construction in hyperbolic space. In 2022 IEEE 38th International Conference on Data Engineering (ICDE), pages 1180-1192. IEEE.
|
| 280 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti
|
| 281 |
+
|
| 282 |
+
Bhosale, et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
|
| 283 |
+
|
| 284 |
+
Suyuchen Wang, Ruihui Zhao, Xi Chen, Yefeng Zheng, and Bang Liu. 2021. Enquire one's parent and child before decision: Fully exploit hierarchical structure for self-supervised taxonomy expansion. In Proceedings of the Web Conference 2021, pages 3291-3304.
|
| 285 |
+
|
| 286 |
+
Suyuchen Wang, Ruihui Zhao, Yefeng Zheng, and Bang Liu. 2022. Qen: Applicable taxonomy completion via evaluating full taxonomic relations. In Proceedings of the ACM Web Conference 2022, pages 1008-1017.
|
| 287 |
+
|
| 288 |
+
Xingyao Wang, Sha Li, and Heng Ji. 2023. Code4struct: Code generation for few-shot event structure prediction. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3640-3663.
|
| 289 |
+
|
| 290 |
+
Fred Xu, Song Jiang, Zijie Huang, Xiao Luo, Shichang Zhang, Yuzhou Chen, and Yizhou Sun. 2024. Fuse: Measure-theoretic compact fuzzy set representation for taxonomy expansion. In *Findings of the Association for Computational Linguistics ACL* 2024, pages 2707-2720.
|
| 291 |
+
|
| 292 |
+
Hongyuan Xu, Yunong Chen, Zichen Liu, Yanlong Wen, and Xiaojie Yuan. 2022. Taxoprompt: A prompt-based generation method with taxonomic context for self-supervised taxonomy expansion. In *IJCAI*, pages 4432-4438.
|
| 293 |
+
|
| 294 |
+
Ke Yang, Jiateng Liu, John Wu, Chaoqi Yang, Yi Fung, Sha Li, Zixuan Huang, Xu Cao, Xingyao Wang, Heng Ji, et al. If lvm is the wizard, then code is the wand: A survey on how code empowers large language models to serve as intelligent agents. In ICLR 2024 Workshop on Large Language Model (LLM) Agents.
|
| 295 |
+
|
| 296 |
+
Shuo Yang, Lei Zou, Zhongyuan Wang, Jun Yan, and Ji-Rong Wen. 2017. Efficiently answering technical questions—a knowledge graph approach. In *Thirty-First AAAI Conference on Artificial Intelligence*.
|
| 297 |
+
|
| 298 |
+
Hongbin Ye, Ningyu Zhang, Hui Chen, and Huajun Chen. 2022. Generative knowledge graph construction: A review. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 1-17.
|
| 299 |
+
|
| 300 |
+
Xiaoxin Yin and Sarthak Shah. 2010. Building taxonomy of web search intents for name entity queries. In Proceedings of the 19th international conference on World wide web, pages 1001-1010.
|
| 301 |
+
|
| 302 |
+
Yue Yu, Yinghao Li, Jiaming Shen, Hao Feng, Jimeng Sun, and Chao Zhang. 2020. Steam: Self-supervised taxonomy expansion with mini-paths. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1026-1035.
|
| 303 |
+
|
| 304 |
+
Yuchen Zhang, Amr Ahmed, Vanja Josifovski, and Alexander Smola. 2014. Taxonomy discovery for personalized recommendation. In Proceedings of the 7th ACM international conference on Web search and data mining, pages 243-252.
|
| 305 |
+
|
| 306 |
+
Tinghui Zhu, Jingping Liu, Jiaqing Liang, Haiyun Jiang, Yanghua Xiao, Zongyu Wang, Rui Xie, and Yunsen Xian. 2023. Towards visual taxonomy expansion. In Proceedings of the 31st ACM International Conference on Multimedia, pages 6481-6490.
|
| 307 |
+
|
| 308 |
+
# A Appendix
|
| 309 |
+
|
| 310 |
+
# A.1 Datasets
|
| 311 |
+
|
| 312 |
+
We evaluate the performance of taxonomy expansion methods on small-scale taxonomies using WordNet Sub-taxonomies from (Bansal et al., 2014), and Graphine taxonomies from (Liu et al., 2021a). Specifically, we use 35 Graphine taxonomies with fewer than 100 entities, selected from a total of 227 taxonomies. For the Graphine dataset, we selected 35 taxonomies with fewer than 100 entities out of 227 total taxonomies. In our experiment with WordNet, we utilized 114 sub-taxonomies from the test sets. Additionally, we evaluate three large-scale taxonomies from SemEval-2016 (Bordea et al., 2016) across science, environment, and food domains. Table 5 presents the statistics of these taxonomies, all of which contain entities and definitions curated by human experts. For all benchmarks, $20\%$ of leaf entities are reserved for testing, with the remaining entities used for training.
|
| 313 |
+
|
| 314 |
+
<table><tr><td></td><td>#Concepts</td><td>#Edges</td><td>Depth</td><td>License</td></tr><tr><td>WordNet</td><td>20.5</td><td>19.5</td><td>3.0</td><td>WordNet</td></tr><tr><td>Graphine</td><td>48.2</td><td>48.2</td><td>4.6</td><td>None</td></tr><tr><td>SemEval-Sci</td><td>429.0</td><td>451.0</td><td>8.0</td><td>None</td></tr><tr><td>SemEval-Env</td><td>261.0</td><td>261.0</td><td>6.0</td><td>None</td></tr><tr><td>SemEval-Food</td><td>1,486.0</td><td>1,576.0</td><td>8.0</td><td>None</td></tr></table>
|
| 315 |
+
|
| 316 |
+
Table 5: Statistics of five taxonomy benchmarks. For WordNet and Graphine, we report the average for taxonomies included in these two benchmarks.
|
| 317 |
+
|
| 318 |
+
# A.2 Baselines
|
| 319 |
+
|
| 320 |
+
We compare our method with the following baselines for taxonomy expansion, all experiments are implemented in a server with three NVIDIA A6000 GPUs:
|
| 321 |
+
|
| 322 |
+
- TaxoExpan (Shen et al., 2020): adopts GNNs to encode local ego-graphs in taxonomy to enhance entity representation.
|
| 323 |
+
|
| 324 |
+
- STEAM (Yu et al., 2020): utilizes the mini-path information to capture the global structure of the taxonomy.
|
| 325 |
+
HEF (Wang et al., 2022): represents taxonomies as ego-trees to capture hierarchy, fully leveraging the hierarchical structure to improve taxonomy coherence.
|
| 326 |
+
- Musubu (Takeoka et al., 2021): leverages pre-trained models and fine-tunes them as sentence classifiers using queries generated from Hearst patterns.
|
| 327 |
+
- TEMP (Liu et al., 2021b): utilizes a pretrained model to encode text descriptions of each concept in the taxonomy. It incorporates taxonomic structure information through taxonomy paths.
|
| 328 |
+
- BoxTaxo (Jiang et al., 2023): represent the entities via box embeddings instead of single vector embeddings to capture the hierarchical relation between entities.
|
| 329 |
+
TaxoPrompt (Xu et al., 2022): adopt prompt tuning on the BERT-based encoder model to capture the taxonomic structure.
|
| 330 |
+
- TaxoInstruct (Shen et al., 2024): a unified framework for taxonomy-related tasks using instruction tuning, focused solely on taxonomy expansion for fair comparison.
|
| 331 |
+
|
| 332 |
+
To the best of our knowledge, CODETAXO represents the first work to address taxonomy expansion using an in-context learning approach. To validate the effectiveness of the code language based prompt design, we additionally propose a prompting method based on natural language prompts. The results obtained using the natural language prompt (NL) are presented in Table 1. To ensure that the natural language prompt communicates the same information as code language prompt in CODETAXO, we represent each entity using natural language to describe its surface name, definition, parent, and children list. The details of the NL prompt are provided in Table 7. For a more direct comparison, we also demonstrate CODETAXO's predictions on the same example in Table 8.
|
| 333 |
+
|
| 334 |
+
# A.3 Evaluation Metrics.
|
| 335 |
+
|
| 336 |
+
The performance of CODETAXO and the baseline models for taxonomy expansion tasks is evaluated using commonly adopted metrics, including accuracy (Acc) and Wu & Palmer similarity (Wu&P), as established in prior work (Yu et al., 2020; Liu et al., 2021b; Wang et al., 2021). Since CODETAXO is
|
| 337 |
+
|
| 338 |
+
<table><tr><td rowspan="2">Dataset</td><td colspan="2">1-shot</td><td colspan="2">5-shot</td></tr><tr><td>NL</td><td>CodeTaxo</td><td>NL</td><td>CodeTaxo</td></tr><tr><td>SemEval-Sci</td><td>15737.2</td><td>9701.4</td><td>16095.1</td><td>10342.6</td></tr><tr><td>SemEval-Env</td><td>8965.7</td><td>5693.6</td><td>9325.0</td><td>6321.1</td></tr><tr><td>SemEval-Food</td><td>48908.1</td><td>30536.5</td><td>49266.4</td><td>31176.3</td></tr><tr><td>WordNet</td><td>948.9</td><td>1369.2</td><td>1306.4</td><td>1962.3</td></tr><tr><td>Graphine</td><td>2486.0</td><td>3223.9</td><td>2855.2</td><td>3893.3</td></tr></table>
|
| 339 |
+
|
| 340 |
+
Table 6: Comparison of average tokens used by NL and CODETAXO across 5 benchmarks in 1-shot and 5-shot settings.
|
| 341 |
+
|
| 342 |
+
a generation-based method rather than a ranking-based one, the mean reciprocal rank (MRR) used in the baselines is not applicable to CODETAXO.
|
| 343 |
+
|
| 344 |
+
# A.4 Efficiency Analysis of CODETAXO
|
| 345 |
+
|
| 346 |
+
Token Consumption Table 6 compares average token usage across benchmarks and prompt types (CODETAXO vs. NL) in 1-shot and 5-shot settings. The findings highlight CODETAXO's efficiency in reducing token usage while maintaining effectiveness. Notably, in SemEval2016, CODETAXO cuts token usage by approximately $37.6\%$ in the SemEval-Food task compared to natural language prompts. However, in the WordNet and Graphine datasets, CODETAXO uses slightly more tokens due to the need to define Entity classes and methods. Overall, the significant reduction in token usage in SemEval2016 underscores CODETAXO's efficiency, especially in contexts with limited token windows.
|
| 347 |
+
|
| 348 |
+
# Natural Language Prompt
|
| 349 |
+
|
| 350 |
+
User: Given the current taxonomy, find the parent of the query node. Please note that the query node may be a new node not in the current taxonomy. The parent of given query node always exists, so do not generate 'none' or 'not found'. You only need to answer the entity name and do not generate any additional content or comments.
|
| 351 |
+
|
| 352 |
+
lunacy: obsolete terms for legal insanity; parent: insanity; children: [].
|
| 353 |
+
|
| 354 |
+
irrationality: the state of being irrational; lacking powers of understanding; parent: insanity; children: []
|
| 355 |
+
|
| 356 |
+
dementia: mental deterioration of organic or functional origin; parent: insanity; children: ['presenile dementia', 'alcoholic dementia', 'senile dementia'].
|
| 357 |
+
|
| 358 |
+
alcoholic dementia: dementia observed during the last stages of severe chronic alcoholism; involves loss of memory for recent events although long term memory is intact; parent: dementia; children: ]. Pick's disease: a progressive form of presenile dementia found most often in middle-aged and elderly women and characterized by degeneration of the frontal and temporal lobes with loss of intellectual ability and transitory aphasia; parent: presenile dementia; children: ].
|
| 359 |
+
|
| 360 |
+
derangement: a state of mental disturbance and disorientation; parent: insanity; children: [].
|
| 361 |
+
|
| 362 |
+
craziness: informal terms for insanity; parent: insanity; children: [].
|
| 363 |
+
|
| 364 |
+
presenile dementia: dementia with onset before the age of 65; parent: dementia; children: ["Pick's disease"].
|
| 365 |
+
|
| 366 |
+
senile dementia: dementia of the aged; results from degeneration of the brain in the absence of cerebrovascular disease; parent: dementia; children: [].
|
| 367 |
+
|
| 368 |
+
insanity: relatively permanent disorder of the mind; parent: None; children: ['irrationality', 'dementia', 'craziness', 'derangement', 'lunacy'].
|
| 369 |
+
|
| 370 |
+
Query node: Alzheimer's disease
|
| 371 |
+
|
| 372 |
+
The parent of query node:
|
| 373 |
+
|
| 374 |
+
Assistant: dementia
|
| 375 |
+
|
| 376 |
+
Ground Truth: presenile dementia
|
| 377 |
+
|
| 378 |
+
Table 7: Example of Natural Language (NL) Prompt.
|
| 379 |
+
|
| 380 |
+
# Code Prompt
|
| 381 |
+
|
| 382 |
+
User: Complete the next line of code according to the comments and the given code snippet. You need to find the parent of the query node in the given current taxonomy and use the add_parent function. The parent of given query node always exists in the given current taxonomy, so do NOT generate node that is NOT in the given current taxonomy. Note that you only need to complete the next ONE line of code, do not generate any additional content or comments.
|
| 383 |
+
|
| 384 |
+
from typing import List
|
| 385 |
+
|
| 386 |
+
```python
|
| 387 |
+
class Entity: def __init__(self, name: str, description: str, parent: str, child: List['Entity']):
|
| 388 |
+
self.name = name
|
| 389 |
+
self.description = description
|
| 390 |
+
self.parent = parent
|
| 391 |
+
self(child = child
|
| 392 |
+
def add_parent(self, parent: 'Entity':
|
| 393 |
+
self.parent = parent.name
|
| 394 |
+
parent.add_child(self)
|
| 395 |
+
def add_child(self, child: 'Entity':
|
| 396 |
+
self(child.append(child)
|
| 397 |
+
```
|
| 398 |
+
|
| 399 |
+
Creating entities and establishing parent-child relationship
|
| 400 |
+
|
| 401 |
+
lunacy = Entity(name='lunacy', description='obsolete terms for legal insanity', parent=insanity, child=[[])
|
| 402 |
+
|
| 403 |
+
irrationality = Entity(name='irrationality', description='the state of being irrational; lacking powers of understanding', parent=insanity, child=[[])
|
| 404 |
+
|
| 405 |
+
dementia = Entity(name='dementia', description='mental deterioration of organic or functional origin', parent=insanity, child=['presenile dementia', 'alcoholic dementia', 'senile dementia'])
|
| 406 |
+
alcoholic_dementia = Entity(name='alcoholic dementia', description='dementia observed during the last stages of severe chronic alcoholism; involves loss of memory for recent events although long term memory is intact', parent=dementia, child=[[])
|
| 407 |
+
|
| 408 |
+
Pick's_disease = Entity(name='Pick's disease', description='a progressive form of presenile dementia found most often in middle-aged and elderly women and characterized by degeneration of the frontal and temporal lobes with loss of intellectual ability and transitory aphasia', parent=presenile dementia, child=[[])
|
| 409 |
+
|
| 410 |
+
derangement = Entity(name='derangement', description='a state of mental disturbance and disorientation', parent=insanity, child=[[])
|
| 411 |
+
|
| 412 |
+
craziness = Entity(name='craziness', description='informal terms for insanity', parent=insanity, child=[[])
|
| 413 |
+
|
| 414 |
+
presenile_dementia = Entity(name='presenile dementia', description='dementia with onset before the age of 65', parent=dementia, child=['Pick's disease'])
|
| 415 |
+
|
| 416 |
+
senile_dementia = Entity(name='senile dementia', description='dementia of the aged; results from degeneration of the brain in the absence of cerebrovascular disease', parent=dementia, child=[[]) insanity = Entity(name='insanity', description='relatively permanent disorder of the mind', parent=None, child=['irrationality', 'dementia', 'craziness', 'derangement', 'lunacy'])
|
| 417 |
+
|
| 418 |
+
# creating query node
|
| 419 |
+
|
| 420 |
+
Alzheimer's_disease = Entity(name='Alzheimer's disease', description='a progressive form of presenile dementia that is similar to senile dementia except that it usually starts in the 40s or 50s; first symptoms are impaired memory which is followed by impaired thought and speech and finally complete helplessness', parent=None, child=[[])
|
| 421 |
+
|
| 422 |
+
Finding the parent of query node
|
| 423 |
+
|
| 424 |
+
Assistant: Alzheimer's_disease.add_parent(presenile_dementia)
|
| 425 |
+
|
| 426 |
+
Ground Truth: presenile dementia
|
| 427 |
+
|
| 428 |
+
Table 8: Example of Code-based Prompt.
|
2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56d5d596775d878f1085b3d0fcd14c20dcb990d0f2a1b3061e441b0adcec769e
|
| 3 |
+
size 706747
|
2025/CodeTaxo_ Enhancing Taxonomy Expansion with Limited Examples via Code Language Prompts/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CodeV_ Issue Resolving with Visual Data/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 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
278,
|
| 8 |
+
90,
|
| 9 |
+
719,
|
| 10 |
+
111
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Linhao Zhang $^{1}$ Daoguang Zan $^{2*}$ Quanshun Yang $^{1}$ Zhirong Huang $^{2}$ Dong Chen $^{3}$ Bo Shen $^{3}$ Tianyu Liu $^{4}$ Yongshun Gong $^{1}$ Pengjie Huang $^{5}$ Xudong Lu $^{1*}$ Guangtai Liang $^{3}$ Lizhen Cui $^{1}$ Qianxiang Wang $^{3}$ Shandong University Chinese Academy of Sciences Huawei Co., Ltd Peking University Lingzhi-zhiguang Co., Ltd linhaoz@mail.sdu.edu.cn daoguang@iscas.ac.cn dongxul@sdu.edu.cn",
|
| 17 |
+
"bbox": [
|
| 18 |
+
163,
|
| 19 |
+
127,
|
| 20 |
+
833,
|
| 21 |
+
229
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
260,
|
| 31 |
+
260,
|
| 32 |
+
339,
|
| 33 |
+
275
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "Large Language Models (LLMs) have advanced rapidly in recent years, with their applications in software engineering expanding to more complex repository-level tasks. GitHub issue resolving is a key challenge among these tasks. While recent approaches have made progress on this task, they focus on textual data within issues, neglecting visual data. However, this visual data is crucial for resolving issues as it conveys additional knowledge that text alone cannot. We propose CODEV, the first approach to leveraging visual data to enhance the issue-resolving capabilities of LLMs. CODEV resolves each issue by following a two-phase process: data processing and patch generation. To evaluate CODEV, we construct a benchmark for visual issue resolving, namely Visual SWEBench. Through extensive experiments, we demonstrate the effectiveness of CODEV, as well as provide valuable insights into leveraging visual data to resolve GitHub issues<sup>1</sup>.",
|
| 40 |
+
"bbox": [
|
| 41 |
+
141,
|
| 42 |
+
282,
|
| 43 |
+
460,
|
| 44 |
+
583
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 Introduction",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
114,
|
| 54 |
+
590,
|
| 55 |
+
260,
|
| 56 |
+
605
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Large Language Models (LLMs) have advanced rapidly in recent years, with their applications in the field of software engineering becoming increasingly widespread (Zan et al., 2023; Zheng et al., 2023; Zhang et al., 2023b; Chen et al., 2024b). Currently, LLMs' applications in software engineering have gradually expanded tasks at the code line and function level to more challenging repository-level tasks (Zhang et al., 2023a; Liu et al., 2024). Within repository-level tasks, GitHub issue resolving is a key challenge, where LLMs are tasked to resolve the issue based on the issue description and the defective codebase. (Jimenez et al., 2024; Xia et al., 2024). This task can accelerate program repair and is crucial for improving development efficiency.",
|
| 63 |
+
"bbox": [
|
| 64 |
+
112,
|
| 65 |
+
614,
|
| 66 |
+
489,
|
| 67 |
+
854
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Although recent approaches have made progress on this task, they focus exclusively on textual data",
|
| 74 |
+
"bbox": [
|
| 75 |
+
112,
|
| 76 |
+
856,
|
| 77 |
+
487,
|
| 78 |
+
888
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/6408e40569f586ee3e29d6cf6e494241a860bdd8fe1941c861530b6e1f5b23de.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: An example of a visual GitHub issue from Plotly issue #1944. The visual data illustrates that the label parameters (\"time\" and \"day\") do not take effect."
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
512,
|
| 91 |
+
258,
|
| 92 |
+
882,
|
| 93 |
+
413
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 0
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "in GitHub issues, neglecting visual data such as screenshots, diagrams, and videos (Chen et al., 2024a; Yang et al., 2024a; Zhang et al., 2024; Xia et al., 2024). However, this visual data is crucial for resolving issues, as it conveys additional knowledge that text alone cannot, including actual results, expected results, and error messages. Figure 1 shows a specific example where visual data illustrates the running result. Moreover, we statistically analyze SWE-bench (Jimenez et al., 2024), the most popular benchmark for issue resolving. The result shows that over $5\\%$ of GitHub issues contain visual data, with even higher percentages in visualization libraries like seaborn² and matplotlib³, where they reach $45.5\\%$ and $27.2\\%$ respectively. This analysis further highlights the importance of resolving visual GitHub issues. However, existing approaches struggle to resolve them effectively, as they overlook visual data, which calls for new solutions that leverage visual data.",
|
| 100 |
+
"bbox": [
|
| 101 |
+
507,
|
| 102 |
+
493,
|
| 103 |
+
884,
|
| 104 |
+
815
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 0
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "An intuitive approach is to extract visual data from the issue and include it as part of the prompt. While this approach seems to leverage visual data, it requires models with advanced multimodal and",
|
| 111 |
+
"bbox": [
|
| 112 |
+
507,
|
| 113 |
+
816,
|
| 114 |
+
882,
|
| 115 |
+
881
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 0
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "page_footnote",
|
| 121 |
+
"text": "*Corresponding authors",
|
| 122 |
+
"bbox": [
|
| 123 |
+
134,
|
| 124 |
+
892,
|
| 125 |
+
285,
|
| 126 |
+
907
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 0
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "page_footnote",
|
| 132 |
+
"text": "'https://github.com/luolin101/CodeV",
|
| 133 |
+
"bbox": [
|
| 134 |
+
136,
|
| 135 |
+
906,
|
| 136 |
+
401,
|
| 137 |
+
920
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 0
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "page_footnote",
|
| 143 |
+
"text": "2https://github.com/mwaskom/seaborn",
|
| 144 |
+
"bbox": [
|
| 145 |
+
529,
|
| 146 |
+
892,
|
| 147 |
+
800,
|
| 148 |
+
906
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 0
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "page_footnote",
|
| 154 |
+
"text": "<sup>3</sup>https://github.com/matplotlib/matplotlib",
|
| 155 |
+
"bbox": [
|
| 156 |
+
529,
|
| 157 |
+
906,
|
| 158 |
+
843,
|
| 159 |
+
920
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 0
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "page_number",
|
| 165 |
+
"text": "7350",
|
| 166 |
+
"bbox": [
|
| 167 |
+
480,
|
| 168 |
+
927,
|
| 169 |
+
519,
|
| 170 |
+
940
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 0
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "footer",
|
| 176 |
+
"text": "Findings of the Association for Computational Linguistics: ACL 2025, pages 7350-7361",
|
| 177 |
+
"bbox": [
|
| 178 |
+
228,
|
| 179 |
+
945,
|
| 180 |
+
766,
|
| 181 |
+
958
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 0
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "footer",
|
| 187 |
+
"text": "July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
|
| 188 |
+
"bbox": [
|
| 189 |
+
268,
|
| 190 |
+
959,
|
| 191 |
+
727,
|
| 192 |
+
972
|
| 193 |
+
],
|
| 194 |
+
"page_idx": 0
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "text",
|
| 198 |
+
"text": "coding capabilities. Currently, only the latest commercial models, GPT-4o (OpenAI, 2024) and Claude 3.5 Sonnet (Anthropic, 2024), barely meet these requirements, but their capabilities remain highly limited. Moreover, these models are less suitable for issue resolving due to high computational costs. Based on our analysis, using these models within the popular SWE-agent approach (Yang et al., 2024a) to run through all issues in SWE-bench once is estimated to cost an average of over $4,700 (Xia et al., 2024), which imposes a significant financial burden on researchers. To address this, we propose CODEV, the first approach that leverages visual data to enhance the issue-resolving capabilities of LLMs at low cost. To resolve each issue, CODEV follows a two-phase process: data processing and patch generation. In the data processing phase, CODEV processes the visual data within the issue from both local and holistic perspectives. This phase produces fine-grained descriptions of the visual data and a structured summary of the entire issue. In the patch generation phase, CODEV leverages the processed information to assist LLMs in generating a patch to resolve the issue.",
|
| 199 |
+
"bbox": [
|
| 200 |
+
115,
|
| 201 |
+
84,
|
| 202 |
+
490,
|
| 203 |
+
469
|
| 204 |
+
],
|
| 205 |
+
"page_idx": 1
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "text",
|
| 209 |
+
"text": "To evaluate our approach, we construct a benchmark specifically designed for evaluating visual GitHub issue resolving, called Visual SWE-bench. The benchmark comprises 133 task instances spanning 11 open-source GitHub repositories, each of which has undergone rigorous selection. Finally, we conduct a series of experiments to validate the effectiveness of our approach. Experimental results demonstrate that CODEV achieves a round $63.13\\%$ relative improvement in the percentage of resolved instances on Visual SWE-bench compared to Agentless. Additionally, through case studies, we analyze the role of each component of CODEV, providing insights into leveraging visual data to resolve issues. Overall, the contributions of this paper are as follows:",
|
| 210 |
+
"bbox": [
|
| 211 |
+
115,
|
| 212 |
+
470,
|
| 213 |
+
489,
|
| 214 |
+
727
|
| 215 |
+
],
|
| 216 |
+
"page_idx": 1
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"type": "list",
|
| 220 |
+
"sub_type": "text",
|
| 221 |
+
"list_items": [
|
| 222 |
+
"- We propose CODEV, a simple yet novel approach that leverages visual data to enhance the issue-resolving capabilities of LLMs.",
|
| 223 |
+
"- We construct a benchmark designed to evaluate the performance of LLMs in resolving visual GitHub issues, namely Visual SWEBench. The benchmark comprises 133 realistic software engineering tasks sourced from 11 open-source GitHub repositories.",
|
| 224 |
+
"- We validate the effectiveness of our approach"
|
| 225 |
+
],
|
| 226 |
+
"bbox": [
|
| 227 |
+
136,
|
| 228 |
+
739,
|
| 229 |
+
487,
|
| 230 |
+
921
|
| 231 |
+
],
|
| 232 |
+
"page_idx": 1
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "text",
|
| 236 |
+
"text": "through a series of experiments and conduct in-depth analysis and summarization of the experimental results.",
|
| 237 |
+
"bbox": [
|
| 238 |
+
544,
|
| 239 |
+
84,
|
| 240 |
+
880,
|
| 241 |
+
131
|
| 242 |
+
],
|
| 243 |
+
"page_idx": 1
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "text",
|
| 247 |
+
"text": "2 Approach",
|
| 248 |
+
"text_level": 1,
|
| 249 |
+
"bbox": [
|
| 250 |
+
509,
|
| 251 |
+
143,
|
| 252 |
+
630,
|
| 253 |
+
161
|
| 254 |
+
],
|
| 255 |
+
"page_idx": 1
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "Figure 2 illustrates an overview of CODEV, which consists of two phases: data processing and patch generation. The first phase processes visual data and the second phase uses the processed information to assist LLMs in generating a patch. Below is a detailed description of each phase.",
|
| 260 |
+
"bbox": [
|
| 261 |
+
507,
|
| 262 |
+
168,
|
| 263 |
+
882,
|
| 264 |
+
267
|
| 265 |
+
],
|
| 266 |
+
"page_idx": 1
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"type": "text",
|
| 270 |
+
"text": "2.1 Data Processing",
|
| 271 |
+
"text_level": 1,
|
| 272 |
+
"bbox": [
|
| 273 |
+
507,
|
| 274 |
+
277,
|
| 275 |
+
680,
|
| 276 |
+
293
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 1
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "To process the issue's visual data, we adopt two components: fine-grained description and structured summarization. For fine-grained description, the Vision-Language Model (VLM) first generates an independent description for each piece of visual data based on its content. It then provides a contextual description that relates this data to the issue, resulting in a fine-grained description. In structured summarization, the VLM produces a summary that breaks down the complex issue into several clear sections. Below, we detail the implementation of each component.",
|
| 283 |
+
"bbox": [
|
| 284 |
+
507,
|
| 285 |
+
298,
|
| 286 |
+
884,
|
| 287 |
+
491
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 1
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "2.1.1 Fine-Grained Description",
|
| 294 |
+
"text_level": 1,
|
| 295 |
+
"bbox": [
|
| 296 |
+
507,
|
| 297 |
+
500,
|
| 298 |
+
769,
|
| 299 |
+
514
|
| 300 |
+
],
|
| 301 |
+
"page_idx": 1
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"type": "text",
|
| 305 |
+
"text": "We design the fine-grained description component to generate textual representations of the visual data. This component draws inspiration from how humans process visual data. When encountering visual data in an issue, humans first identify its raw features and then analyze its function in the context of the problem. Inspired by this, we design a two-step process to generate fine-grained descriptions.",
|
| 306 |
+
"bbox": [
|
| 307 |
+
507,
|
| 308 |
+
519,
|
| 309 |
+
882,
|
| 310 |
+
646
|
| 311 |
+
],
|
| 312 |
+
"page_idx": 1
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"type": "text",
|
| 316 |
+
"text": "Step 1: Independent Description. In the first step, we instruct the VLM to describe each piece of visual data based solely on its content. For visual data consisting purely of text, such as a screenshot of error logs, the VLM extracts the text and outputs it in Markdown format. For other types of visual data, like images or videos with non-textual content, the VLM generates a detailed description capturing all details.",
|
| 317 |
+
"bbox": [
|
| 318 |
+
507,
|
| 319 |
+
648,
|
| 320 |
+
884,
|
| 321 |
+
791
|
| 322 |
+
],
|
| 323 |
+
"page_idx": 1
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"type": "text",
|
| 327 |
+
"text": "Step 2: Contextual Description. In the second step, the VLM is prompted with the complete problem statement to establish the context. Subsequently, it is tasked with providing a comprehensive description and analysis of the visual data based on this contextual understanding. During this step, the VLM tightly connects the visual data with the problem's context to analyze its function.",
|
| 328 |
+
"bbox": [
|
| 329 |
+
507,
|
| 330 |
+
793,
|
| 331 |
+
882,
|
| 332 |
+
921
|
| 333 |
+
],
|
| 334 |
+
"page_idx": 1
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "page_number",
|
| 338 |
+
"text": "7351",
|
| 339 |
+
"bbox": [
|
| 340 |
+
480,
|
| 341 |
+
928,
|
| 342 |
+
517,
|
| 343 |
+
940
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 1
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "image",
|
| 349 |
+
"img_path": "images/1537e765b6fd1f32fc39edc6b3c9413e16ef08574b1521e24aa4d211988d6f48.jpg",
|
| 350 |
+
"image_caption": [
|
| 351 |
+
"Figure 2: Overview of CODEV."
|
| 352 |
+
],
|
| 353 |
+
"image_footnote": [],
|
| 354 |
+
"bbox": [
|
| 355 |
+
115,
|
| 356 |
+
84,
|
| 357 |
+
884,
|
| 358 |
+
321
|
| 359 |
+
],
|
| 360 |
+
"page_idx": 2
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "text",
|
| 364 |
+
"text": "Through these two steps, we obtain fine-grained descriptions of all visual data in the issue. These descriptions capture not only the intrinsic features of the visual data but also its critical function in the problem's context.",
|
| 365 |
+
"bbox": [
|
| 366 |
+
112,
|
| 367 |
+
374,
|
| 368 |
+
487,
|
| 369 |
+
454
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 2
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "text",
|
| 375 |
+
"text": "2.1.2 Structured Summarization",
|
| 376 |
+
"text_level": 1,
|
| 377 |
+
"bbox": [
|
| 378 |
+
112,
|
| 379 |
+
464,
|
| 380 |
+
386,
|
| 381 |
+
479
|
| 382 |
+
],
|
| 383 |
+
"page_idx": 2
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"type": "text",
|
| 387 |
+
"text": "Some GitHub issues are described in a structured format, including reproduction steps, expected results, actual results, and so on. This format enhances clarity and makes the key aspects of issues easier to understand. Inspired by this, we propose generating a structured summary to enrich issues and reduce the difficulty of understanding them.",
|
| 388 |
+
"bbox": [
|
| 389 |
+
112,
|
| 390 |
+
485,
|
| 391 |
+
487,
|
| 392 |
+
596
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 2
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "In the structured summarization component, the VLM is prompted with the complete problem statement, including the visual data. It is then tasked with understanding and analyzing the issue to generate a structured summary. To guide this process, we supply the VLM with a template that consists of the following fields: a brief problem summary, background information, reproduction steps, expected results, actual results, descriptions of visual data, and additional notes. However, not all issues may fit perfectly with this template. Therefore, we allow the VLM to skip irrelevant or unclear fields. Additionally, the summary can also include new fields if needed, as long as it remains clear and useful for resolving the issue.",
|
| 399 |
+
"bbox": [
|
| 400 |
+
112,
|
| 401 |
+
599,
|
| 402 |
+
489,
|
| 403 |
+
840
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 2
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "text",
|
| 409 |
+
"text": "Unlike fine-grained description, which focuses on generating representations of visual data, structured summarization aims to provide an overview of the entire issue. It not only covers visual data but also gives a deeper understanding of the problem.",
|
| 410 |
+
"bbox": [
|
| 411 |
+
112,
|
| 412 |
+
841,
|
| 413 |
+
489,
|
| 414 |
+
921
|
| 415 |
+
],
|
| 416 |
+
"page_idx": 2
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "text",
|
| 420 |
+
"text": "These two components complement each other: fine-grained description captures the detailed features of local visual data, while structured summarization synthesizes global information. Through these components, we ensure that visual data is processed effectively to support LLMs in understanding and resolving the issue. Prompts related to these components are listed in Appendix A.",
|
| 421 |
+
"bbox": [
|
| 422 |
+
507,
|
| 423 |
+
374,
|
| 424 |
+
884,
|
| 425 |
+
502
|
| 426 |
+
],
|
| 427 |
+
"page_idx": 2
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"type": "text",
|
| 431 |
+
"text": "2.2 Patch Generation",
|
| 432 |
+
"text_level": 1,
|
| 433 |
+
"bbox": [
|
| 434 |
+
507,
|
| 435 |
+
514,
|
| 436 |
+
694,
|
| 437 |
+
527
|
| 438 |
+
],
|
| 439 |
+
"page_idx": 2
|
| 440 |
+
},
|
| 441 |
+
{
|
| 442 |
+
"type": "text",
|
| 443 |
+
"text": "After generating fine-grained descriptions and a structured summary in the data processing phase, the patch generation phase leverages this information to generate a patch. To support LLMs in efficiently utilizing this information, we splice them into the original issue. Specifically, the visual data is converted into fine-grained descriptions, and the issue is enriched with a structured summary, with an example provided in Appendix B.",
|
| 444 |
+
"bbox": [
|
| 445 |
+
507,
|
| 446 |
+
535,
|
| 447 |
+
882,
|
| 448 |
+
678
|
| 449 |
+
],
|
| 450 |
+
"page_idx": 2
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "text",
|
| 454 |
+
"text": "To enhance the ability of LLMs to resolve textual issues, various approaches have been proposed. These approaches take different forms: some are agent-based, equipping LLMs with a set of tools that allow the agent to autonomously perform actions (Chen et al., 2024a; Yang et al., 2024a; Zhang et al., 2024); others are agentless (Xia et al., 2024). Regardless of their form, they typically input the issue and codebase, with the output being a generated patch. CODEV combines these approaches through a unified interface, automating patch generation. At this point, the newly generated issue and its corresponding codebase are fed into the textual issue-resolving approach, where LLMs follow predefined instructions to generate a patch.",
|
| 455 |
+
"bbox": [
|
| 456 |
+
507,
|
| 457 |
+
680,
|
| 458 |
+
884,
|
| 459 |
+
921
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 2
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "page_number",
|
| 465 |
+
"text": "7352",
|
| 466 |
+
"bbox": [
|
| 467 |
+
480,
|
| 468 |
+
927,
|
| 469 |
+
521,
|
| 470 |
+
940
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 2
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "text",
|
| 476 |
+
"text": "3 Visual SWE-bench Benchmark",
|
| 477 |
+
"text_level": 1,
|
| 478 |
+
"bbox": [
|
| 479 |
+
114,
|
| 480 |
+
84,
|
| 481 |
+
416,
|
| 482 |
+
98
|
| 483 |
+
],
|
| 484 |
+
"page_idx": 3
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "text",
|
| 488 |
+
"text": "In current benchmarks for the issue-resolving task, only the recently released SWE-bench Multimodal (Yang et al., 2024b) focuses on visual issues. However, as of writing, SWE-bench Multimodal<sup>4</sup> lacks evaluation fields, and its evaluation script has not been made public, making it unsuitable for evaluation. To evaluate CodeV, we construct a benchmark for resolving visual GitHub issues, namely Visual SWE-bench. Below, we detail our benchmark construction process and its key features.",
|
| 489 |
+
"bbox": [
|
| 490 |
+
112,
|
| 491 |
+
111,
|
| 492 |
+
489,
|
| 493 |
+
271
|
| 494 |
+
],
|
| 495 |
+
"page_idx": 3
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "text",
|
| 499 |
+
"text": "3.1 Construction",
|
| 500 |
+
"text_level": 1,
|
| 501 |
+
"bbox": [
|
| 502 |
+
112,
|
| 503 |
+
285,
|
| 504 |
+
265,
|
| 505 |
+
299
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 3
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "From the 2,294 instances in SWE-bench, we identify 128 task instances whose problem statement contains visual data. These visual data are presented through hyperlinks, with images embedded using HTML or Markdown syntax and videos provided as plain text hyperlinks. Building on these identified task instances, we adopt a four-stage construction process to further expand the tasks and conduct rigorous verification on all instances.",
|
| 512 |
+
"bbox": [
|
| 513 |
+
112,
|
| 514 |
+
307,
|
| 515 |
+
489,
|
| 516 |
+
451
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 3
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "text",
|
| 522 |
+
"text": "1. Repositories selection and pull requests",
|
| 523 |
+
"text_level": 1,
|
| 524 |
+
"bbox": [
|
| 525 |
+
129,
|
| 526 |
+
467,
|
| 527 |
+
487,
|
| 528 |
+
482
|
| 529 |
+
],
|
| 530 |
+
"page_idx": 3
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"type": "text",
|
| 534 |
+
"text": "Collection. We analyze the 128 task instances from SWE-bench, and the results show that most of them originate from visualization libraries. To expand our benchmark, we select three additional popular open-source visualization libraries (plotly.py, networkx, and al-tair) and crawl all their pull requests (PRs) from GitHub. Since SWE-bench only includes PRs created before August 2023, we select repositories with at least 10 visual task instances from SWE-bench (matplotlib, sympy, sphinx, and seaborn) and collect recent PRs from these repositories. These two rounds of collection yield approximately 10,000 PRs.",
|
| 535 |
+
"bbox": [
|
| 536 |
+
149,
|
| 537 |
+
483,
|
| 538 |
+
489,
|
| 539 |
+
708
|
| 540 |
+
],
|
| 541 |
+
"page_idx": 3
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"type": "text",
|
| 545 |
+
"text": "2. Candidate instance construction. Candidate instances are constructed from the collected PRs through the following steps:",
|
| 546 |
+
"text_level": 1,
|
| 547 |
+
"bbox": [
|
| 548 |
+
127,
|
| 549 |
+
722,
|
| 550 |
+
487,
|
| 551 |
+
770
|
| 552 |
+
],
|
| 553 |
+
"page_idx": 3
|
| 554 |
+
},
|
| 555 |
+
{
|
| 556 |
+
"type": "list",
|
| 557 |
+
"sub_type": "text",
|
| 558 |
+
"list_items": [
|
| 559 |
+
"(1) We select only merged PRs that resolve at least one issue and include modifications to test files.",
|
| 560 |
+
"(2) For each PR, we extract the text of all resolved issues, retaining only those PRs where the issue text contained hyperlinks to images or videos."
|
| 561 |
+
],
|
| 562 |
+
"bbox": [
|
| 563 |
+
157,
|
| 564 |
+
780,
|
| 565 |
+
487,
|
| 566 |
+
894
|
| 567 |
+
],
|
| 568 |
+
"page_idx": 3
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"type": "text",
|
| 572 |
+
"text": "(3) For qualifying PRs, we gather detailed information, including \"instance ID\", \"patch\", \"test patch\", and so on.",
|
| 573 |
+
"bbox": [
|
| 574 |
+
552,
|
| 575 |
+
84,
|
| 576 |
+
882,
|
| 577 |
+
131
|
| 578 |
+
],
|
| 579 |
+
"page_idx": 3
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "text",
|
| 583 |
+
"text": "This process results in 38 candidate instances from approximately 10,000 PRs.",
|
| 584 |
+
"bbox": [
|
| 585 |
+
544,
|
| 586 |
+
137,
|
| 587 |
+
880,
|
| 588 |
+
170
|
| 589 |
+
],
|
| 590 |
+
"page_idx": 3
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"type": "list",
|
| 594 |
+
"sub_type": "text",
|
| 595 |
+
"list_items": [
|
| 596 |
+
"3. Execution verification. For each candidate instance, we meticulously set up the runtime environment and testing commands, removing any instances that failed due to installation or runtime errors. Next, we apply the test patch to each instance and record the test results both before and after applying the gold patch. Instances without any tests where the status changes from fail to pass are excluded. This process leaves 31 viable candidate instances.",
|
| 597 |
+
"4. Human verification. We conduct human verification on 159 instances, comprising 128 task instances from SWE-bench and 31 candidate instances filtered through the previous stages. Each instance is evaluated based on the following criteria:"
|
| 598 |
+
],
|
| 599 |
+
"bbox": [
|
| 600 |
+
522,
|
| 601 |
+
179,
|
| 602 |
+
884,
|
| 603 |
+
445
|
| 604 |
+
],
|
| 605 |
+
"page_idx": 3
|
| 606 |
+
},
|
| 607 |
+
{
|
| 608 |
+
"type": "list",
|
| 609 |
+
"sub_type": "text",
|
| 610 |
+
"list_items": [
|
| 611 |
+
"(1) Whether the visual data can be fully converted to text.",
|
| 612 |
+
"(2) Whether the visual data is essential for resolving the instance.",
|
| 613 |
+
"(3) Whether the problem description contains sufficient information for effective resolution."
|
| 614 |
+
],
|
| 615 |
+
"bbox": [
|
| 616 |
+
552,
|
| 617 |
+
451,
|
| 618 |
+
882,
|
| 619 |
+
565
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 3
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "text",
|
| 625 |
+
"text": "Using these criteria, we exclude 4 instances where visual data can be fully converted to text via Optical Character Recognition (OCR) and 4 instances where visual data is not essential for resolution. Additionally, based on the content of their test cases, we exclude 18 instances that cannot be resolved due to insufficient problem descriptions. This process results in a curated, high-quality benchmark of 133 task instances. Additional human verification details are provided in Appendix C.",
|
| 626 |
+
"bbox": [
|
| 627 |
+
544,
|
| 628 |
+
573,
|
| 629 |
+
882,
|
| 630 |
+
749
|
| 631 |
+
],
|
| 632 |
+
"page_idx": 3
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "text",
|
| 636 |
+
"text": "3.2 Features",
|
| 637 |
+
"text_level": 1,
|
| 638 |
+
"bbox": [
|
| 639 |
+
509,
|
| 640 |
+
756,
|
| 641 |
+
623,
|
| 642 |
+
769
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 3
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "As shown in Figure 3, Visual SWE-bench comprises 133 visual task instances sourced from 11 open-source GitHub repositories. These instances cover a wide range of functionalities, including but not limited to data visualization, machine learning, and document generation. This diverse set of tasks provides a comprehensive benchmark for evaluating the performance of LLMs in resolving visual issues automatically.",
|
| 649 |
+
"bbox": [
|
| 650 |
+
507,
|
| 651 |
+
776,
|
| 652 |
+
882,
|
| 653 |
+
920
|
| 654 |
+
],
|
| 655 |
+
"page_idx": 3
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"type": "page_footnote",
|
| 659 |
+
"text": "4https://www.swebench.com/multimodal.html",
|
| 660 |
+
"bbox": [
|
| 661 |
+
134,
|
| 662 |
+
906,
|
| 663 |
+
445,
|
| 664 |
+
919
|
| 665 |
+
],
|
| 666 |
+
"page_idx": 3
|
| 667 |
+
},
|
| 668 |
+
{
|
| 669 |
+
"type": "page_number",
|
| 670 |
+
"text": "7353",
|
| 671 |
+
"bbox": [
|
| 672 |
+
480,
|
| 673 |
+
928,
|
| 674 |
+
519,
|
| 675 |
+
940
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 3
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "table",
|
| 681 |
+
"img_path": "images/5cfdbeb57b0ed70e39dff1e1dff38ee1b6fe43c3e7342b3b0e01a0bdf4f989e7.jpg",
|
| 682 |
+
"table_caption": [],
|
| 683 |
+
"table_footnote": [],
|
| 684 |
+
"table_body": "<table><tr><td rowspan=\"2\">Repository</td><td colspan=\"2\">CodeBase</td><td>Issue Text</td><td colspan=\"3\">Gold Patch</td><td>Tests</td><td colspan=\"2\">Images</td></tr><tr><td># Files</td><td># Lines</td><td># Length</td><td># Lines</td><td># Files</td><td># Func.</td><td># Lines</td><td># File Size</td><td># Resolution</td></tr><tr><td>altair</td><td>499</td><td>90K</td><td>98.5</td><td>27</td><td>2.5</td><td>3</td><td>15</td><td>24.12</td><td>99K</td></tr><tr><td>astropy</td><td>1578</td><td>445K</td><td>1352.5</td><td>10</td><td>1</td><td>2</td><td>69</td><td>19.76</td><td>170K</td></tr><tr><td>matplotlib</td><td>2388</td><td>592K</td><td>175</td><td>9</td><td>1</td><td>2</td><td>89.5</td><td>23.58</td><td>307K</td></tr><tr><td>networkx</td><td>849</td><td>108K</td><td>155</td><td>23</td><td>1</td><td>1</td><td>26</td><td>21.38</td><td>307K</td></tr><tr><td>plotly.py</td><td>14302</td><td>587K</td><td>44</td><td>15</td><td>2</td><td>1</td><td>11.5</td><td>23.58</td><td>307K</td></tr><tr><td>pylint</td><td>2712</td><td>92K</td><td>100</td><td>126</td><td>4</td><td>9</td><td>10</td><td>23.46</td><td>307K</td></tr><tr><td>scikit-learn</td><td>1343</td><td>277K</td><td>641</td><td>22</td><td>1</td><td>2</td><td>12</td><td>23.58</td><td>307K</td></tr><tr><td>seaborn</td><td>295</td><td>70K</td><td>143.5</td><td>13.5</td><td>2</td><td>3</td><td>109.5</td><td>23.1</td><td>307K</td></tr><tr><td>sphinx</td><td>1436</td><td>308K</td><td>157</td><td>8</td><td>1</td><td>2</td><td>35</td><td>27.08</td><td>286K</td></tr><tr><td>sympy</td><td>1907</td><td>477K</td><td>125</td><td>21</td><td>1</td><td>2</td><td>36</td><td>24.26</td><td>275K</td></tr><tr><td>xarray</td><td>320</td><td>123K</td><td>220.5</td><td>5</td><td>1</td><td>2</td><td>229.5</td><td>25.08</td><td>275K</td></tr><tr><td>mean</td><td>2512</td><td>288K</td><td>292</td><td>25.40</td><td>1.59</td><td>2.63</td><td>58.45</td><td>23.54</td><td>268K</td></tr><tr><td>max</td><td>14302</td><td>592K</td><td>1352.5</td><td>126</td><td>4</td><td>9</td><td>229.5</td><td>27.08</td><td>307K</td></tr></table>",
|
| 685 |
+
"bbox": [
|
| 686 |
+
119,
|
| 687 |
+
80,
|
| 688 |
+
878,
|
| 689 |
+
300
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 4
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "text",
|
| 695 |
+
"text": "Table 1: Summary statistics for Visual SWE-bench. The term \"CodeBase # Files and # Lines\" denotes the total count of files and lines within the codebase. \"Issue Text # Length\" indicates the median word count in the problem statement. \"Gold Patch # Lines, # Files, and # Func.\" reflects the median number of lines, files, and functions modified per patch stored in the repository. \"Tests # Lines\" signifies the median line count of code present in test cases. \"Images # File Size and # Resolution\" represents both the median image file size (KB) and resolution (pixels).",
|
| 696 |
+
"bbox": [
|
| 697 |
+
112,
|
| 698 |
+
310,
|
| 699 |
+
884,
|
| 700 |
+
384
|
| 701 |
+
],
|
| 702 |
+
"page_idx": 4
|
| 703 |
+
},
|
| 704 |
+
{
|
| 705 |
+
"type": "image",
|
| 706 |
+
"img_path": "images/def6366e97f58795e592bb2d0bf1d4abd6d99e9f8afc3d63f95fd408de00d3ca.jpg",
|
| 707 |
+
"image_caption": [
|
| 708 |
+
"Figure 3: Distribution of Visual SWE-bench task instances across 11 open-source GitHub repositories."
|
| 709 |
+
],
|
| 710 |
+
"image_footnote": [],
|
| 711 |
+
"bbox": [
|
| 712 |
+
115,
|
| 713 |
+
406,
|
| 714 |
+
487,
|
| 715 |
+
586
|
| 716 |
+
],
|
| 717 |
+
"page_idx": 4
|
| 718 |
+
},
|
| 719 |
+
{
|
| 720 |
+
"type": "text",
|
| 721 |
+
"text": "Data statistics. Table 1 summarizes key statistics for the repositories in Visual SWE-bench, emphasizing their diversity and representativeness. Repository sizes range from 295 to 14,302 files and 70K to 592K lines of code, illustrating structural variation. Problem statements vary widely in length, with median word counts from 44 to 1,353, reflecting differences in task comprehension demands. Gold patches show diverse modification scopes, with median changes spanning 5 to 126 lines, indicating varying solution complexities. This broad spectrum of task characteristics provides a robust benchmark for evaluating LLMs' performance in resolving visual issues.",
|
| 722 |
+
"bbox": [
|
| 723 |
+
112,
|
| 724 |
+
653,
|
| 725 |
+
489,
|
| 726 |
+
878
|
| 727 |
+
],
|
| 728 |
+
"page_idx": 4
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"type": "text",
|
| 732 |
+
"text": "Visual data distribution. Across all Visual SWE-bench tasks, we identify 217 images and",
|
| 733 |
+
"bbox": [
|
| 734 |
+
112,
|
| 735 |
+
889,
|
| 736 |
+
487,
|
| 737 |
+
921
|
| 738 |
+
],
|
| 739 |
+
"page_idx": 4
|
| 740 |
+
},
|
| 741 |
+
{
|
| 742 |
+
"type": "text",
|
| 743 |
+
"text": "2 videos, spanning a diverse range of visual processing challenges grouped into seven categories. These include code screenshots (21), error messages (8), and system information (2), which are linked to specific code library entities to facilitate error identification. Other categories include data visualizations (140), documentation results (33), function formulas (13), and keyboard shortcuts (2), illustrating challenges such as generating complex statistics and utilizing code functions within specific libraries. Additionally, two instances feature GIFs (matplotlib matplotlib-19763) and videos (matplotlib matplotlib-25631), providing more dynamic and detailed depictions of these challenges.",
|
| 744 |
+
"bbox": [
|
| 745 |
+
507,
|
| 746 |
+
407,
|
| 747 |
+
885,
|
| 748 |
+
633
|
| 749 |
+
],
|
| 750 |
+
"page_idx": 4
|
| 751 |
+
},
|
| 752 |
+
{
|
| 753 |
+
"type": "text",
|
| 754 |
+
"text": "4 Experiments",
|
| 755 |
+
"text_level": 1,
|
| 756 |
+
"bbox": [
|
| 757 |
+
507,
|
| 758 |
+
653,
|
| 759 |
+
655,
|
| 760 |
+
671
|
| 761 |
+
],
|
| 762 |
+
"page_idx": 4
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"type": "text",
|
| 766 |
+
"text": "4.1 Experimental Setup",
|
| 767 |
+
"text_level": 1,
|
| 768 |
+
"bbox": [
|
| 769 |
+
507,
|
| 770 |
+
686,
|
| 771 |
+
714,
|
| 772 |
+
702
|
| 773 |
+
],
|
| 774 |
+
"page_idx": 4
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"type": "text",
|
| 778 |
+
"text": "Models. To execute CODEV for resolving visual issues, two model types are required: a VLM for processing visual data and an LLM for generating patches. To demonstrate the effectiveness of CODEV, we specifically avoid commercial models and use open-source models in our experiments. For the VLM, we select Qwen2-VL (Wang et al., 2024), a model renowned for its robust visual understanding capabilities, using three versions: 2B, 7B, and 72B. For the LLM, we choose two models: DeepSeek-V2.5 (DeepSeek-AI, 2024) and Qwen2.5-Coder-32B (Hui et al., 2024), both recognized for their powerful coding capabilities.",
|
| 779 |
+
"bbox": [
|
| 780 |
+
507,
|
| 781 |
+
711,
|
| 782 |
+
885,
|
| 783 |
+
921
|
| 784 |
+
],
|
| 785 |
+
"page_idx": 4
|
| 786 |
+
},
|
| 787 |
+
{
|
| 788 |
+
"type": "page_number",
|
| 789 |
+
"text": "7354",
|
| 790 |
+
"bbox": [
|
| 791 |
+
480,
|
| 792 |
+
928,
|
| 793 |
+
521,
|
| 794 |
+
940
|
| 795 |
+
],
|
| 796 |
+
"page_idx": 4
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"type": "table",
|
| 800 |
+
"img_path": "images/63960ca06bc551ba64097435424a52d12041e79c5566dfd71bdc1f260a7db5ee.jpg",
|
| 801 |
+
"table_caption": [],
|
| 802 |
+
"table_footnote": [],
|
| 803 |
+
"table_body": "<table><tr><td>Approach</td><td>Model</td><td>Resolved (%)</td></tr><tr><td colspan=\"3\">Evaluation results on 111 instances from Visual SWE-bench</td></tr><tr><td>Honeycomb (Honeycomb, 2024)</td><td>NA</td><td>10.81 (12)</td></tr><tr><td>Amazon Q Developer Agent (AWS, 2024)</td><td>NA</td><td>9.01 (10)</td></tr><tr><td>Factory Code Droid (Factory, 2024)</td><td>NA</td><td>9.01 (10)</td></tr><tr><td>AutoCodeRover (Zhang et al., 2024)</td><td>GPT 4o (2024-05-13)</td><td>10.81 (12)</td></tr><tr><td>AppMap Navie (AppMap, 2024)</td><td>GPT 4o (2024-05-13)</td><td>9.01 (10)</td></tr><tr><td rowspan=\"3\">SWE-agent (Yang et al., 2024a)</td><td>Claude 3.5 Sonnet</td><td>6.31 (7)</td></tr><tr><td>GPT 4 (1106)</td><td>8.11 (9)</td></tr><tr><td>GPT 4o (2024-05-13)</td><td>1.80 (2)</td></tr><tr><td rowspan=\"2\">RAG (Jimenez et al., 2024)</td><td>Claude 3 Opus</td><td>2.70 (3)</td></tr><tr><td>Claude 2</td><td>0.90 (1)</td></tr><tr><td rowspan=\"4\">CODEV + Agentless (Ours)</td><td>Qwen2-VL-72B + DeepSeek-V2.5</td><td>11.71 (13)</td></tr><tr><td>Qwen2-VL-2B + Qwen2.5-Coder-32B</td><td>13.51 (15)</td></tr><tr><td>Qwen2-VL-7B + Qwen2.5-Coder-32B</td><td>13.51 (15)</td></tr><tr><td>Qwen2-VL-72B + Qwen2.5-Coder-32B</td><td>11.71 (13)</td></tr><tr><td colspan=\"3\">Evaluation results on all instances from Visual SWE-bench</td></tr><tr><td rowspan=\"2\">Agentless (Xia et al., 2024)</td><td>DeepSeek-V2.5</td><td>6.02 (8)</td></tr><tr><td>Qwen2.5-Coder-32B</td><td>7.52 (10)</td></tr><tr><td>Agentless Plus</td><td>Qwen2-VL-72B</td><td>0.75 (1)</td></tr><tr><td rowspan=\"4\">CODEV + Agentless (Ours)</td><td>Qwen2-VL-72B + DeepSeek-V2.5</td><td>9.77 (13)</td></tr><tr><td>Qwen2-VL-2B + Qwen2.5-Coder-32B</td><td>12.78 (17)</td></tr><tr><td>Qwen2-VL-7B + Qwen2.5-Coder-32B</td><td>12.78 (17)</td></tr><tr><td>Qwen2-VL-72B + Qwen2.5-Coder-32B</td><td>11.28 (15)</td></tr></table>",
|
| 804 |
+
"bbox": [
|
| 805 |
+
114,
|
| 806 |
+
80,
|
| 807 |
+
884,
|
| 808 |
+
478
|
| 809 |
+
],
|
| 810 |
+
"page_idx": 5
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "text",
|
| 814 |
+
"text": "Table 2: Results on Visual SWE-bench. The 111 instances are the overlapping instances between Visual SWE-bench and SWE-bench. $\\blacksquare$ indicates closed-source approaches.",
|
| 815 |
+
"bbox": [
|
| 816 |
+
112,
|
| 817 |
+
485,
|
| 818 |
+
882,
|
| 819 |
+
516
|
| 820 |
+
],
|
| 821 |
+
"page_idx": 5
|
| 822 |
+
},
|
| 823 |
+
{
|
| 824 |
+
"type": "text",
|
| 825 |
+
"text": "Baselines. In the patch generation phase, CODEV combines textual issue-resolving approaches. We specifically adopt the open-source Agentless approach (Xia et al., 2024), which resolves issues through a simple localization and repair process. We also compare CODEV with several textual issue-resolving approaches, including open-source and closed-source commercial products. These approaches have demonstrated strong performance on SWE-bench. To further contrast with VLM-based approaches, we design Agentless Plus, a modified version of Agentless that supports VLMs in processing visual data in issues to resolve them.",
|
| 826 |
+
"bbox": [
|
| 827 |
+
112,
|
| 828 |
+
539,
|
| 829 |
+
489,
|
| 830 |
+
749
|
| 831 |
+
],
|
| 832 |
+
"page_idx": 5
|
| 833 |
+
},
|
| 834 |
+
{
|
| 835 |
+
"type": "text",
|
| 836 |
+
"text": "Metrics. We use Resolved $(\\%)$ as our evaluation metric. The metric represents the percentage of Visual SWE-bench instances that have been successfully resolved. More details about the experiments can be found in Appendix D.",
|
| 837 |
+
"bbox": [
|
| 838 |
+
112,
|
| 839 |
+
758,
|
| 840 |
+
489,
|
| 841 |
+
839
|
| 842 |
+
],
|
| 843 |
+
"page_idx": 5
|
| 844 |
+
},
|
| 845 |
+
{
|
| 846 |
+
"type": "text",
|
| 847 |
+
"text": "4.2 Evaluation",
|
| 848 |
+
"text_level": 1,
|
| 849 |
+
"bbox": [
|
| 850 |
+
112,
|
| 851 |
+
848,
|
| 852 |
+
247,
|
| 853 |
+
862
|
| 854 |
+
],
|
| 855 |
+
"page_idx": 5
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"type": "text",
|
| 859 |
+
"text": "4.2.1 Main Results",
|
| 860 |
+
"text_level": 1,
|
| 861 |
+
"bbox": [
|
| 862 |
+
112,
|
| 863 |
+
870,
|
| 864 |
+
278,
|
| 865 |
+
883
|
| 866 |
+
],
|
| 867 |
+
"page_idx": 5
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"type": "text",
|
| 871 |
+
"text": "Table 2 presents the results of all approaches. The results show that CODEV significantly enhances",
|
| 872 |
+
"bbox": [
|
| 873 |
+
112,
|
| 874 |
+
889,
|
| 875 |
+
487,
|
| 876 |
+
921
|
| 877 |
+
],
|
| 878 |
+
"page_idx": 5
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"type": "text",
|
| 882 |
+
"text": "the issue-resolving capabilities of the LLM by leveraging visual data. Compared to all benchmarks, CODEV achieves the best performance. When combined with Agentless, CODEV achieves over a $50\\%$ relative improvement, whether using DeepSeek-V2.5 or Qwen2.5-Coder-32B to resolve issues. The performance of CodeV highlights the value of leveraging visual data to help LLMs understand and resolve issues.",
|
| 883 |
+
"bbox": [
|
| 884 |
+
507,
|
| 885 |
+
539,
|
| 886 |
+
884,
|
| 887 |
+
684
|
| 888 |
+
],
|
| 889 |
+
"page_idx": 5
|
| 890 |
+
},
|
| 891 |
+
{
|
| 892 |
+
"type": "text",
|
| 893 |
+
"text": "Figure 4(a) depicts the distribution of issues resolved by CODEV compared to both closed-source and open-source baseline approaches. Notably, CODEV can resolve certain issues that either opensource or closed-source approaches cannot resolve. Furthermore, CODEV successfully resolves some complex issues that neither category of approaches could solve. This highlights not only the advantages of CODEV but also the importance of leveraging visual data to resolve issues.",
|
| 894 |
+
"bbox": [
|
| 895 |
+
507,
|
| 896 |
+
690,
|
| 897 |
+
885,
|
| 898 |
+
851
|
| 899 |
+
],
|
| 900 |
+
"page_idx": 5
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"type": "text",
|
| 904 |
+
"text": "From Table 2, it is evident that the performance of the VLM does not significantly impact CODEV. Among the three versions of Qwen2-VL, the 72B model is the most powerful, while the 7B and",
|
| 905 |
+
"bbox": [
|
| 906 |
+
507,
|
| 907 |
+
857,
|
| 908 |
+
882,
|
| 909 |
+
921
|
| 910 |
+
],
|
| 911 |
+
"page_idx": 5
|
| 912 |
+
},
|
| 913 |
+
{
|
| 914 |
+
"type": "page_number",
|
| 915 |
+
"text": "7355",
|
| 916 |
+
"bbox": [
|
| 917 |
+
480,
|
| 918 |
+
927,
|
| 919 |
+
519,
|
| 920 |
+
940
|
| 921 |
+
],
|
| 922 |
+
"page_idx": 5
|
| 923 |
+
},
|
| 924 |
+
{
|
| 925 |
+
"type": "image",
|
| 926 |
+
"img_path": "images/7d6e50ede60d9a1ab881f5b48a1c33d43fcaeac6672809ea61f41cf2a139771a.jpg",
|
| 927 |
+
"image_caption": [
|
| 928 |
+
"(a) All approaches on 111 instances."
|
| 929 |
+
],
|
| 930 |
+
"image_footnote": [],
|
| 931 |
+
"bbox": [
|
| 932 |
+
119,
|
| 933 |
+
85,
|
| 934 |
+
297,
|
| 935 |
+
205
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 6
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "image",
|
| 941 |
+
"img_path": "images/94a778e95dd873564ed4fef847834f3994be54d14ece1648f5d2d94acfd8db9a.jpg",
|
| 942 |
+
"image_caption": [
|
| 943 |
+
"(b) CODEV with VLMs of different model sizes on all instances."
|
| 944 |
+
],
|
| 945 |
+
"image_footnote": [],
|
| 946 |
+
"bbox": [
|
| 947 |
+
307,
|
| 948 |
+
86,
|
| 949 |
+
487,
|
| 950 |
+
205
|
| 951 |
+
],
|
| 952 |
+
"page_idx": 6
|
| 953 |
+
},
|
| 954 |
+
{
|
| 955 |
+
"type": "table",
|
| 956 |
+
"img_path": "images/64831ce164e3e29175513aef4dd4a2015236f4ed58c1fed9f869162bfb4892ae.jpg",
|
| 957 |
+
"table_caption": [],
|
| 958 |
+
"table_footnote": [],
|
| 959 |
+
"table_body": "<table><tr><td>Approach</td><td>Resolved (%)</td></tr><tr><td>CODEV + Agentless</td><td>11.28 (15)</td></tr><tr><td>w/o Fine-Grained Description</td><td>9.77 (13)</td></tr><tr><td>w/o Independent Description</td><td>9.02 (12)</td></tr><tr><td>w/o Contextual Description</td><td>9.02 (12)</td></tr><tr><td>w/o Structured Summarization</td><td>7.52 (10)</td></tr></table>",
|
| 960 |
+
"bbox": [
|
| 961 |
+
119,
|
| 962 |
+
303,
|
| 963 |
+
485,
|
| 964 |
+
405
|
| 965 |
+
],
|
| 966 |
+
"page_idx": 6
|
| 967 |
+
},
|
| 968 |
+
{
|
| 969 |
+
"type": "text",
|
| 970 |
+
"text": "Table 3: Ablation studies on Visual SWE-bench (133 instances). The VLM is Qwen2-VL-72B and the LLM is Qwen2.5-Coder-32B.",
|
| 971 |
+
"bbox": [
|
| 972 |
+
112,
|
| 973 |
+
414,
|
| 974 |
+
487,
|
| 975 |
+
458
|
| 976 |
+
],
|
| 977 |
+
"page_idx": 6
|
| 978 |
+
},
|
| 979 |
+
{
|
| 980 |
+
"type": "text",
|
| 981 |
+
"text": "2B models exhibit progressively weaker capabilities. However, even with the lower-performing 7B and 2B models, CODEV maintained robust issue-resolving capabilities, even outperforming the 72B model. Additionally, Figure 4(b) further illustrates the distribution of resolved issues across different VLMs. The issues resolved do not overlap entirely, indicating that each VLM has its strengths in processing different types of issues. This indicates that despite differences in VLM performance, CODEV can still exert the capabilities of VLM, resolve issues stably, and demonstrate strong robustness.",
|
| 982 |
+
"bbox": [
|
| 983 |
+
112,
|
| 984 |
+
485,
|
| 985 |
+
489,
|
| 986 |
+
678
|
| 987 |
+
],
|
| 988 |
+
"page_idx": 6
|
| 989 |
+
},
|
| 990 |
+
{
|
| 991 |
+
"type": "text",
|
| 992 |
+
"text": "Additionally, we observe that using the VLM alone, while it leverages visual data, does not yield satisfactory results. For example, Agentless Plus combined with Qwen2-VL-72B resolves only one issue. This is primarily due to its weak coding capabilities. In comparison, CODEV effectively combines the VLM's visual understanding ability with the LLM's coding capabilities. This integration allows LLMs to leverage visual data to resolve issues at a low cost, making it a promising solution.",
|
| 993 |
+
"bbox": [
|
| 994 |
+
112,
|
| 995 |
+
678,
|
| 996 |
+
489,
|
| 997 |
+
841
|
| 998 |
+
],
|
| 999 |
+
"page_idx": 6
|
| 1000 |
+
},
|
| 1001 |
+
{
|
| 1002 |
+
"type": "text",
|
| 1003 |
+
"text": "4.2.2 Analysis of Ablation Studies",
|
| 1004 |
+
"text_level": 1,
|
| 1005 |
+
"bbox": [
|
| 1006 |
+
112,
|
| 1007 |
+
868,
|
| 1008 |
+
396,
|
| 1009 |
+
883
|
| 1010 |
+
],
|
| 1011 |
+
"page_idx": 6
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"type": "text",
|
| 1015 |
+
"text": "We conduct a series of ablation studies on Visual SWE-bench, and the results in Table 3 show that",
|
| 1016 |
+
"bbox": [
|
| 1017 |
+
112,
|
| 1018 |
+
889,
|
| 1019 |
+
487,
|
| 1020 |
+
920
|
| 1021 |
+
],
|
| 1022 |
+
"page_idx": 6
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"type": "image",
|
| 1026 |
+
"img_path": "images/7faaf4595fb5bfb7c1737ad2735b34c6feb622528d5a2e7229e8f01bd31b6a25.jpg",
|
| 1027 |
+
"image_caption": [
|
| 1028 |
+
"Figure 4: Venn diagrams of issues resolved from Visual SWE-bench."
|
| 1029 |
+
],
|
| 1030 |
+
"image_footnote": [],
|
| 1031 |
+
"bbox": [
|
| 1032 |
+
512,
|
| 1033 |
+
83,
|
| 1034 |
+
878,
|
| 1035 |
+
288
|
| 1036 |
+
],
|
| 1037 |
+
"page_idx": 6
|
| 1038 |
+
},
|
| 1039 |
+
{
|
| 1040 |
+
"type": "image",
|
| 1041 |
+
"img_path": "images/a96d1c83a2b590fba45cc432982618950b11d5af11bdf02ef4022570ce969c26.jpg",
|
| 1042 |
+
"image_caption": [
|
| 1043 |
+
"Figure 5: Fine-grained description example for the instance mwaskom_seaborn-3276, offering detailed insights into the visual data.",
|
| 1044 |
+
"Figure 6: Structured summarization example for the instance pydata_xarray-4182, demonstrating a concise representation of its key information."
|
| 1045 |
+
],
|
| 1046 |
+
"image_footnote": [],
|
| 1047 |
+
"bbox": [
|
| 1048 |
+
512,
|
| 1049 |
+
357,
|
| 1050 |
+
878,
|
| 1051 |
+
552
|
| 1052 |
+
],
|
| 1053 |
+
"page_idx": 6
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"type": "text",
|
| 1057 |
+
"text": "removing any component of CODEV leads to a decline in performance. This led us to further investigate the functions of the components in the data processing phase.",
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
507,
|
| 1060 |
+
634,
|
| 1061 |
+
882,
|
| 1062 |
+
700
|
| 1063 |
+
],
|
| 1064 |
+
"page_idx": 6
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"type": "text",
|
| 1068 |
+
"text": "Analysis of Fine-Grained Description. The fine-grained description process consists of two steps: independent description and contextual description. In the independent description, the VLM captures the raw features of visual data, providing a direct and detailed representation. However, why is contextual description also necessary? Figure 5 shows an issue that is difficult to resolve without the contextual description. The figure shows two images, and the contextual description analyzes their respective function, explaining the information conveyed by each. In contrast, the independent description provides only a general overview,",
|
| 1069 |
+
"bbox": [
|
| 1070 |
+
507,
|
| 1071 |
+
711,
|
| 1072 |
+
884,
|
| 1073 |
+
921
|
| 1074 |
+
],
|
| 1075 |
+
"page_idx": 6
|
| 1076 |
+
},
|
| 1077 |
+
{
|
| 1078 |
+
"type": "page_number",
|
| 1079 |
+
"text": "7356",
|
| 1080 |
+
"bbox": [
|
| 1081 |
+
480,
|
| 1082 |
+
928,
|
| 1083 |
+
521,
|
| 1084 |
+
940
|
| 1085 |
+
],
|
| 1086 |
+
"page_idx": 6
|
| 1087 |
+
},
|
| 1088 |
+
{
|
| 1089 |
+
"type": "text",
|
| 1090 |
+
"text": "missing critical details needed for a complete understanding of the issue. These details are essential for LLMs to grasp the issue accurately. Thus, while the independent description captures the raw features of the visual data, the contextual description extracts deeper, more nuanced information. Together, these two steps work in tandem to provide a comprehensive understanding of the visual data.",
|
| 1091 |
+
"bbox": [
|
| 1092 |
+
112,
|
| 1093 |
+
84,
|
| 1094 |
+
492,
|
| 1095 |
+
212
|
| 1096 |
+
],
|
| 1097 |
+
"page_idx": 7
|
| 1098 |
+
},
|
| 1099 |
+
{
|
| 1100 |
+
"type": "text",
|
| 1101 |
+
"text": "Analysis of Structured Summarization. As shown in Table 3, removing structured summarization significantly undermines the performance of CODEV. To explain this phenomenon, Figure 6 presents an issue that is more easily resolved with a summary. The summary generated by CODEV breaks down the complex issue into clear, digestible sections, providing LLMs with a full understanding of the issue's background, expected outcomes, and actual results. This structured format also helps LLMs grasp the core content more effectively. While the fine-grained description component attempts to convey the meaning of the visual data, relying solely on this still presents challenges in fully understanding the issue. By combining visual and textual data, the structured summary offers LLMs a more holistic understanding of the issue.",
|
| 1102 |
+
"bbox": [
|
| 1103 |
+
115,
|
| 1104 |
+
223,
|
| 1105 |
+
490,
|
| 1106 |
+
497
|
| 1107 |
+
],
|
| 1108 |
+
"page_idx": 7
|
| 1109 |
+
},
|
| 1110 |
+
{
|
| 1111 |
+
"type": "text",
|
| 1112 |
+
"text": "5 Related Works",
|
| 1113 |
+
"text_level": 1,
|
| 1114 |
+
"bbox": [
|
| 1115 |
+
112,
|
| 1116 |
+
508,
|
| 1117 |
+
278,
|
| 1118 |
+
524
|
| 1119 |
+
],
|
| 1120 |
+
"page_idx": 7
|
| 1121 |
+
},
|
| 1122 |
+
{
|
| 1123 |
+
"type": "text",
|
| 1124 |
+
"text": "Issue Resolving Approaches. To assist LLMs in resolving GitHub issues, many approaches have already been proposed. Retrieval Augmented Generation (RAG) (Jimenez et al., 2024) is a direct approach that resolves the issue by first extracting relevant code snippets from the repository and then using them to prompt LLMs to generate a patch. SWE-agent (Yang et al., 2024a) meticulously designs an agent-computer interface (ACI) that enables LLM agents to interact with repository environments to solve software engineering tasks. AutoCodeRover (Zhang et al., 2024) combines LLMs with code search, utilizes program structure, and conducts iterative searches for program improvement. CodeR (Chen et al., 2024a) is a multi-agent approach for issue-resolving tasks, adopting a multi-agent framework and pre-defined task graphs. Agentless (Xia et al., 2024) points out the limitations of using agents and proposes a simple two-phase process of localization and repair to solve software development problems. However, these existing approaches overlook visual data within issues. CODEV bridges this gap by processing visual data from both local and holistic",
|
| 1125 |
+
"bbox": [
|
| 1126 |
+
112,
|
| 1127 |
+
535,
|
| 1128 |
+
489,
|
| 1129 |
+
921
|
| 1130 |
+
],
|
| 1131 |
+
"page_idx": 7
|
| 1132 |
+
},
|
| 1133 |
+
{
|
| 1134 |
+
"type": "text",
|
| 1135 |
+
"text": "perspectives, enhancing the capabilities of LLMs to resolve complex visual issues.",
|
| 1136 |
+
"bbox": [
|
| 1137 |
+
507,
|
| 1138 |
+
84,
|
| 1139 |
+
882,
|
| 1140 |
+
116
|
| 1141 |
+
],
|
| 1142 |
+
"page_idx": 7
|
| 1143 |
+
},
|
| 1144 |
+
{
|
| 1145 |
+
"type": "text",
|
| 1146 |
+
"text": "Code Generation Benchmarks. Code generation has long been a measure of LLMs performance (Austin et al., 2021). The emergence of HumanEval (Chen et al., 2021) provides a standardized framework for evaluating code generation models. In subsequent years, various benchmarks have been developed to enhance HumanEval by adding extensions to different languages (Cassano et al., 2022; Athiwaratkun et al., 2023; Orlanski et al., 2023), introducing variations in edit scope (Yu et al., 2024; Du et al., 2023), presenting similar yet novel code completion tasks (Muennighoff et al., 2024), and conducting more extensive testing (Liu et al., 2023). With the development of LLMs, existing benchmarks struggle to explore the boundaries of state-of-the-art LLMs' capabilities. To address this, SWE-bench (Jimenez et al., 2024) offers a direction by researching real-world GitHub issues, serving as a challenging benchmark for evaluating next-generation LLMs. Building on this, SWE-bench-Java (Zan et al., 2024) extends the benchmark to the Java ecosystem, creating a multilingual benchmark. Similarly, the latest work, SWE-bench Multimodal (Yang et al., 2024b) offers a multimodal upgrade to the benchmark, focusing on visual JavaScript problems. Given Python's increasing role in fields like data science, machine learning, and visualization, where visual data is crucial, we construct Visual SWE-bench focusing on visual issues in Python. By incorporating real-world visual issues, Visual SWE-bench encourages researchers to leverage visual data in solving complex software challenges.",
|
| 1147 |
+
"bbox": [
|
| 1148 |
+
507,
|
| 1149 |
+
131,
|
| 1150 |
+
884,
|
| 1151 |
+
664
|
| 1152 |
+
],
|
| 1153 |
+
"page_idx": 7
|
| 1154 |
+
},
|
| 1155 |
+
{
|
| 1156 |
+
"type": "text",
|
| 1157 |
+
"text": "6 Conclusion",
|
| 1158 |
+
"text_level": 1,
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
509,
|
| 1161 |
+
682,
|
| 1162 |
+
640,
|
| 1163 |
+
697
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 7
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "We propose CODEV, an approach that leverages visual data to resolve issues automatically. It processes visual data and provides LLMs with valuable information that enhances their ability to resolve issues. To evaluate CODEV, we construct a benchmark for visual issue resolving, namely Visual SWE-bench. Through extensive experiments, we demonstrate the effectiveness of CODEV and find that it maintains robust performance across VLMs with varying model sizes. Additionally, through case studies, we analyze the function of each component of CODEV, offering insights on leveraging visual data to resolve issues.",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
507,
|
| 1172 |
+
712,
|
| 1173 |
+
884,
|
| 1174 |
+
921
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 7
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "page_number",
|
| 1180 |
+
"text": "7357",
|
| 1181 |
+
"bbox": [
|
| 1182 |
+
480,
|
| 1183 |
+
928,
|
| 1184 |
+
519,
|
| 1185 |
+
940
|
| 1186 |
+
],
|
| 1187 |
+
"page_idx": 7
|
| 1188 |
+
},
|
| 1189 |
+
{
|
| 1190 |
+
"type": "text",
|
| 1191 |
+
"text": "Limitations",
|
| 1192 |
+
"text_level": 1,
|
| 1193 |
+
"bbox": [
|
| 1194 |
+
114,
|
| 1195 |
+
84,
|
| 1196 |
+
220,
|
| 1197 |
+
99
|
| 1198 |
+
],
|
| 1199 |
+
"page_idx": 8
|
| 1200 |
+
},
|
| 1201 |
+
{
|
| 1202 |
+
"type": "text",
|
| 1203 |
+
"text": "Although this study offers valuable insights into leveraging visual data to resolve GitHub issues, several limitations should be acknowledged:",
|
| 1204 |
+
"bbox": [
|
| 1205 |
+
112,
|
| 1206 |
+
110,
|
| 1207 |
+
489,
|
| 1208 |
+
159
|
| 1209 |
+
],
|
| 1210 |
+
"page_idx": 8
|
| 1211 |
+
},
|
| 1212 |
+
{
|
| 1213 |
+
"type": "list",
|
| 1214 |
+
"sub_type": "text",
|
| 1215 |
+
"list_items": [
|
| 1216 |
+
"- Due to the randomness in the responses generated by LLMs, there is a potential threat to the experimental results. Despite repeating each experiment twice to mitigate this, minor fluctuations in results may still occur.",
|
| 1217 |
+
"- Due to the lack of suitable benchmarks, our experiments are conducted solely on the self-constructed benchmark. However, we conduct comprehensive experiments and analyses to validate our approach, and we hope future research will develop more publicly available benchmarks to further explore this direction.",
|
| 1218 |
+
"- Due to the high costs of GPT-4o and Claude 3.5 Sonnet, we don't include them in our comparative experiments. Based on our estimates, using these models within the SWE-agent approach under similar experimental conditions would cost thousands of dollars. Nevertheless, we evaluate CODEV using two LLMs and three VLMs, conducting extensive experiments that confirm its effectiveness."
|
| 1219 |
+
],
|
| 1220 |
+
"bbox": [
|
| 1221 |
+
136,
|
| 1222 |
+
171,
|
| 1223 |
+
490,
|
| 1224 |
+
533
|
| 1225 |
+
],
|
| 1226 |
+
"page_idx": 8
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"type": "text",
|
| 1230 |
+
"text": "References",
|
| 1231 |
+
"text_level": 1,
|
| 1232 |
+
"bbox": [
|
| 1233 |
+
114,
|
| 1234 |
+
571,
|
| 1235 |
+
213,
|
| 1236 |
+
588
|
| 1237 |
+
],
|
| 1238 |
+
"page_idx": 8
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
"type": "list",
|
| 1242 |
+
"sub_type": "ref_text",
|
| 1243 |
+
"list_items": [
|
| 1244 |
+
"Anthropic. 2024. Introducing claude 3.5 sonnet. https://www.anthropic.com/news/claude-3-5-sonnet.",
|
| 1245 |
+
"AppMap. 2024. Appmap speedruns to the top of the swe bench leaderboard. https://appmap.io/blog/2024/06/20/appmap-navie-swe-bench-leader.",
|
| 1246 |
+
"Ben Athiwaratkun, Sanjay Krishna Gouda, Zijian Wang, Xiaopeng Li, Yuchen Tian, Ming Tan, Wasi Uddin Ahmad, Shiqi Wang, Qing Sun, Mingyue Shang, Sujan Kumar Gonugondla, Hantian Ding, Varun Kumar, Nathan Fulton, Arash Farahani, Siddhartha Jain, Robert Giaquinto, Haifeng Qian, Murali Krishna Ramanathan, and Ramesh Nallapati. 2023. Multilingual evaluation of code generation models. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net.",
|
| 1247 |
+
"Jacob Austin, Augustus Odena, Maxwell I. Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie J. Cai, Michael Terry, Quoc V. Le, and Charles Sutton. 2021. Program synthesis with large language models. CoRR, abs/2108.07732."
|
| 1248 |
+
],
|
| 1249 |
+
"bbox": [
|
| 1250 |
+
115,
|
| 1251 |
+
596,
|
| 1252 |
+
489,
|
| 1253 |
+
921
|
| 1254 |
+
],
|
| 1255 |
+
"page_idx": 8
|
| 1256 |
+
},
|
| 1257 |
+
{
|
| 1258 |
+
"type": "list",
|
| 1259 |
+
"sub_type": "ref_text",
|
| 1260 |
+
"list_items": [
|
| 1261 |
+
"AWS. 2024. Amazon q developer the most capable generative ai-powered assistant for software development. https://aws.amazon.com/q/developer.",
|
| 1262 |
+
"Federico Cassano, John Gouwar, Daniel Nguyen, Sydney Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q Feldman, et al. 2022. Multi-: A scalable and extensible approach to benchmarking neural code generation. arXiv preprint arXiv:2208.08227.",
|
| 1263 |
+
"Dong Chen, Shaoxin Lin, Muhan Zeng, Daoguang Zan, Jian-Gang Wang, Anton Cheshkov, Jun Sun, Hao Yu, Guoliang Dong, Artem Aliev, Jie Wang, Xiao Cheng, Guangtai Liang, Yuchi Ma, Pan Bian, Tao Xie, and Qianxiang Wang. 2024a. Coder: Issue resolving with multi-agent and task graphs. CoRR, abs/2406.01304.",
|
| 1264 |
+
"Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Pondé de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidi Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. 2021. Evaluating large language models trained on code. CoRR, abs/2107.03374.",
|
| 1265 |
+
"Xiangping Chen, Xing Hu, Yuan Huang, He Jiang, Weixing Ji, Yanjie Jiang, Yanyan Jiang, Bo Liu, Hui Liu, Xiaochen Li, et al. 2024b. Deep learning-based software engineering: Progress, challenges, and opportunities. arXiv preprint arXiv:2410.13110.",
|
| 1266 |
+
"DeepSeek-AI. 2024. Deepseek-v2: A strong, economical, and efficient mixture-of-experts language model. Preprint, arXiv:2405.04434.",
|
| 1267 |
+
"Xueying Du, Mingwei Liu, Kaixin Wang, Hanlin Wang, Junwei Liu, Yixuan Chen, Jiayi Feng, Chaofeng Sha, Xin Peng, and Yiling Lou. 2023. Classical: A manually-crafted benchmark for evaluating llms on class-level code generation. CoRR, abs/2308.01861.",
|
| 1268 |
+
"Factory. 2024. Factory bringing autonomy to software engineering. https://www.factory.ai.",
|
| 1269 |
+
"Honeycomb. 2024. Honeycomb. https://honeycomb.sh.",
|
| 1270 |
+
"Binyuan Hui, Jian Yang, Zeyu Cui, Jiaxi Yang, Dayiheng Liu, Lei Zhang, Tianyu Liu, Jiajun Zhang, Bowen Yu, Kai Dang, et al. 2024. Qwen2.5-coder technical report. arXiv preprint arXiv:2409.12186."
|
| 1271 |
+
],
|
| 1272 |
+
"bbox": [
|
| 1273 |
+
510,
|
| 1274 |
+
85,
|
| 1275 |
+
884,
|
| 1276 |
+
921
|
| 1277 |
+
],
|
| 1278 |
+
"page_idx": 8
|
| 1279 |
+
},
|
| 1280 |
+
{
|
| 1281 |
+
"type": "page_number",
|
| 1282 |
+
"text": "7358",
|
| 1283 |
+
"bbox": [
|
| 1284 |
+
480,
|
| 1285 |
+
928,
|
| 1286 |
+
519,
|
| 1287 |
+
940
|
| 1288 |
+
],
|
| 1289 |
+
"page_idx": 8
|
| 1290 |
+
},
|
| 1291 |
+
{
|
| 1292 |
+
"type": "list",
|
| 1293 |
+
"sub_type": "ref_text",
|
| 1294 |
+
"list_items": [
|
| 1295 |
+
"Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R. Narasimhan. 2024. Swe-bench: Can language models resolve real-world github issues? In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net.",
|
| 1296 |
+
"Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. 2023. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023.",
|
| 1297 |
+
"Wei Liu, Ailun Yu, Daoguang Zan, Bo Shen, Wei Zhang, Haiyan Zhao, Zhi Jin, and Qianxiang Wang. 2024. Graphcoder: Enhancing repository-level code completion via code context graph-based retrieval and language model. CoRR, abs/2406.07003.",
|
| 1298 |
+
"Niklas Muennighoff, Qian Liu, Armel Randy Zebaze, Qinkai Zheng, Binyuan Hui, Terry Yue Zhuo, Swayam Singh, Xiangru Tang, Leandro von Werra, and Shayne Longpre. 2024. Octopack: Instruction tuning code large language models. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net.",
|
| 1299 |
+
"OpenAI. 2024. Hello gpt-4o. https://openai.com/index/hello-gpt-4o.",
|
| 1300 |
+
"Gabriel Orlanski, Kefan Xiao, Xavier Garcia, Jeffrey Hui, Joshua Howland, Jonathan Malmaud, Jacob Austin, Rishabh Singh, and Michele Catasta. 2023. Measuring the impact of programming language distribution. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 26619-26645. PMLR.",
|
| 1301 |
+
"Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. 2024. Qwen2vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191.",
|
| 1302 |
+
"Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, and Lingming Zhang. 2024. Agentless: Demystifying llm-based software engineering agents. CoRR, abs/2407.01489.",
|
| 1303 |
+
"John Yang, Carlos E. Jimenez, Alexander Wettig, Killian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. 2024a. Swe-agent: Agent-computer interfaces enable automated software engineering. CoRR, abs/2405.15793.",
|
| 1304 |
+
"John Yang, Carlos E. Jimenez, Alex L. Zhang, Kiliarian Lieret, Joyce Yang, Xindi Wu, Ori Press,"
|
| 1305 |
+
],
|
| 1306 |
+
"bbox": [
|
| 1307 |
+
115,
|
| 1308 |
+
85,
|
| 1309 |
+
489,
|
| 1310 |
+
920
|
| 1311 |
+
],
|
| 1312 |
+
"page_idx": 9
|
| 1313 |
+
},
|
| 1314 |
+
{
|
| 1315 |
+
"type": "list",
|
| 1316 |
+
"sub_type": "ref_text",
|
| 1317 |
+
"list_items": [
|
| 1318 |
+
"Niklas Muennighoff, Gabriel Synnaeve, Karthik R. Narasimhan, Diyi Yang, Sida I. Wang, and Ofir Press. 2024b. Swe-bench multimodal: Do AI systems generalize to visual software domains? CoRR, abs/2410.03859.",
|
| 1319 |
+
"Hao Yu, Bo Shen, Dezhi Ran, Jiaxin Zhang, Qi Zhang, Yuchi Ma, Guangtai Liang, Ying Li, Qianxiang Wang, and Tao Xie. 2024. Codereval: A benchmark of pragmatic code generation with generative pre-trained models. In Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, ICSE 2024, Lisbon, Portugal, April 14-20, 2024, pages 37:1-37:12. ACM.",
|
| 1320 |
+
"Daoguang Zan, Bei Chen, Fengji Zhang, Dianjie Lu, Bingchao Wu, Bei Guan, Yongji Wang, and JianGuang Lou. 2023. Large language models meet nl2code: A survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 7443-7464. Association for Computational Linguistics.",
|
| 1321 |
+
"Daoguang Zan, Zhirong Huang, Ailun Yu, Shaoxin Lin, Yifan Shi, Wei Liu, Dong Chen, Zongshuai Qi, Hao Yu, Lei Yu, Dezhi Ran, Muhan Zeng, Bo Shen, Pan Bian, Guangtai Liang, Bei Guan, Pengjie Huang, Tao Xie, Yongji Wang, and Qianxiang Wang. 2024. Swebench-java: A github issue resolving benchmark for java. CoRR, abs/2408.14354.",
|
| 1322 |
+
"Fengji Zhang, Bei Chen, Yue Zhang, Jacky Keung, Jin Liu, Daoguang Zan, Yi Mao, Jian-Guang Lou, and Weizhu Chen. 2023a. Repocoder: Repository-level code completion through iterative retrieval and generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 2471-2484. Association for Computational Linguistics.",
|
| 1323 |
+
"Yuntong Zhang, Haifeng Ruan, Zhiyu Fan, and Abhik Roychoudhury. 2024. Autocoderover: Autonomous program improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2024, Vienna, Austria, September 16-20, 2024, pages 1592-1604. ACM.",
|
| 1324 |
+
"Ziyin Zhang, Chaoyu Chen, Bingchang Liu, Cong Liao, Zi Gong, Hang Yu, Jianguo Li, and Rui Wang. 2023b. A survey on language models for code. CoRR, abs/2311.07989.",
|
| 1325 |
+
"Zibin Zheng, Kaiwen Ning, Yanlin Wang, Jingwen Zhang, Dewu Zheng, Mingxi Ye, and Jiachi Chen. 2023. A survey of large language models for code: Evolution, benchmarking, and future trends. CoRR, abs/2311.10372."
|
| 1326 |
+
],
|
| 1327 |
+
"bbox": [
|
| 1328 |
+
510,
|
| 1329 |
+
85,
|
| 1330 |
+
884,
|
| 1331 |
+
850
|
| 1332 |
+
],
|
| 1333 |
+
"page_idx": 9
|
| 1334 |
+
},
|
| 1335 |
+
{
|
| 1336 |
+
"type": "page_number",
|
| 1337 |
+
"text": "7359",
|
| 1338 |
+
"bbox": [
|
| 1339 |
+
480,
|
| 1340 |
+
928,
|
| 1341 |
+
519,
|
| 1342 |
+
940
|
| 1343 |
+
],
|
| 1344 |
+
"page_idx": 9
|
| 1345 |
+
},
|
| 1346 |
+
{
|
| 1347 |
+
"type": "text",
|
| 1348 |
+
"text": "A Prompts",
|
| 1349 |
+
"text_level": 1,
|
| 1350 |
+
"bbox": [
|
| 1351 |
+
114,
|
| 1352 |
+
84,
|
| 1353 |
+
228,
|
| 1354 |
+
99
|
| 1355 |
+
],
|
| 1356 |
+
"page_idx": 10
|
| 1357 |
+
},
|
| 1358 |
+
{
|
| 1359 |
+
"type": "text",
|
| 1360 |
+
"text": "Figures 7-10 show the prompts we use for images. The prompts for videos are almost identical, with \"image\" replaced by \"video\" in the text.",
|
| 1361 |
+
"bbox": [
|
| 1362 |
+
112,
|
| 1363 |
+
112,
|
| 1364 |
+
487,
|
| 1365 |
+
161
|
| 1366 |
+
],
|
| 1367 |
+
"page_idx": 10
|
| 1368 |
+
},
|
| 1369 |
+
{
|
| 1370 |
+
"type": "text",
|
| 1371 |
+
"text": "A.1 Independent Description",
|
| 1372 |
+
"text_level": 1,
|
| 1373 |
+
"bbox": [
|
| 1374 |
+
114,
|
| 1375 |
+
177,
|
| 1376 |
+
359,
|
| 1377 |
+
193
|
| 1378 |
+
],
|
| 1379 |
+
"page_idx": 10
|
| 1380 |
+
},
|
| 1381 |
+
{
|
| 1382 |
+
"type": "text",
|
| 1383 |
+
"text": "Figure 7 illustrates the prompt we use to generate independent descriptions, instructing the VLM to provide descriptions based on the image content.",
|
| 1384 |
+
"bbox": [
|
| 1385 |
+
112,
|
| 1386 |
+
200,
|
| 1387 |
+
485,
|
| 1388 |
+
249
|
| 1389 |
+
],
|
| 1390 |
+
"page_idx": 10
|
| 1391 |
+
},
|
| 1392 |
+
{
|
| 1393 |
+
"type": "text",
|
| 1394 |
+
"text": "A.2 Contextual Description",
|
| 1395 |
+
"text_level": 1,
|
| 1396 |
+
"bbox": [
|
| 1397 |
+
114,
|
| 1398 |
+
265,
|
| 1399 |
+
346,
|
| 1400 |
+
281
|
| 1401 |
+
],
|
| 1402 |
+
"page_idx": 10
|
| 1403 |
+
},
|
| 1404 |
+
{
|
| 1405 |
+
"type": "text",
|
| 1406 |
+
"text": "Figure 8 and Figure 9 present the prompts used for generating contextual descriptions. The prompt in Figure 8 instructs the VLM to describe images based on the contextual information, while the prompt in Figure 9 guides the VLM to analyze the function of images.",
|
| 1407 |
+
"bbox": [
|
| 1408 |
+
112,
|
| 1409 |
+
288,
|
| 1410 |
+
485,
|
| 1411 |
+
385
|
| 1412 |
+
],
|
| 1413 |
+
"page_idx": 10
|
| 1414 |
+
},
|
| 1415 |
+
{
|
| 1416 |
+
"type": "text",
|
| 1417 |
+
"text": "A.3 Structured Summary",
|
| 1418 |
+
"text_level": 1,
|
| 1419 |
+
"bbox": [
|
| 1420 |
+
114,
|
| 1421 |
+
401,
|
| 1422 |
+
331,
|
| 1423 |
+
417
|
| 1424 |
+
],
|
| 1425 |
+
"page_idx": 10
|
| 1426 |
+
},
|
| 1427 |
+
{
|
| 1428 |
+
"type": "text",
|
| 1429 |
+
"text": "Figure 10 illustrates the prompt designed for generating a structured summary. It instructs the VLM to produce a summary of the issue based on a referenced format.",
|
| 1430 |
+
"bbox": [
|
| 1431 |
+
112,
|
| 1432 |
+
425,
|
| 1433 |
+
487,
|
| 1434 |
+
488
|
| 1435 |
+
],
|
| 1436 |
+
"page_idx": 10
|
| 1437 |
+
},
|
| 1438 |
+
{
|
| 1439 |
+
"type": "text",
|
| 1440 |
+
"text": "B Example",
|
| 1441 |
+
"text_level": 1,
|
| 1442 |
+
"bbox": [
|
| 1443 |
+
114,
|
| 1444 |
+
506,
|
| 1445 |
+
228,
|
| 1446 |
+
523
|
| 1447 |
+
],
|
| 1448 |
+
"page_idx": 10
|
| 1449 |
+
},
|
| 1450 |
+
{
|
| 1451 |
+
"type": "text",
|
| 1452 |
+
"text": "Figure 11 presents an example where visual data is processed by the VLM, and the resulting information is appended to the original issue. Note that textual data, such as code snippets and metadata (e.g., library versions, environment details, etc.), are handled in the same way as regular text.",
|
| 1453 |
+
"bbox": [
|
| 1454 |
+
112,
|
| 1455 |
+
536,
|
| 1456 |
+
487,
|
| 1457 |
+
632
|
| 1458 |
+
],
|
| 1459 |
+
"page_idx": 10
|
| 1460 |
+
},
|
| 1461 |
+
{
|
| 1462 |
+
"type": "text",
|
| 1463 |
+
"text": "C Human Verification Process",
|
| 1464 |
+
"text_level": 1,
|
| 1465 |
+
"bbox": [
|
| 1466 |
+
114,
|
| 1467 |
+
649,
|
| 1468 |
+
393,
|
| 1469 |
+
664
|
| 1470 |
+
],
|
| 1471 |
+
"page_idx": 10
|
| 1472 |
+
},
|
| 1473 |
+
{
|
| 1474 |
+
"type": "text",
|
| 1475 |
+
"text": "Three annotators, each with at least four years of experience using Python, participate in the human verification process. Each annotator independently evaluates all 159 instances based on the three criteria outlined in Section 3.1, assigning a \"yes\" or \"no\" label to each criterion. Final labels for each instance are determined by majority vote.",
|
| 1476 |
+
"bbox": [
|
| 1477 |
+
112,
|
| 1478 |
+
678,
|
| 1479 |
+
487,
|
| 1480 |
+
790
|
| 1481 |
+
],
|
| 1482 |
+
"page_idx": 10
|
| 1483 |
+
},
|
| 1484 |
+
{
|
| 1485 |
+
"type": "text",
|
| 1486 |
+
"text": "We retain only those instances where the first criterion is labeled \"no\" (i.e., the visual data cannot be fully converted to text), and both the second and third criteria are labeled \"yes\" (i.e., the visual data is essential for resolution, and the problem description contains sufficient information). This filtering results in a final curated set of 133 high-quality task instances.",
|
| 1487 |
+
"bbox": [
|
| 1488 |
+
112,
|
| 1489 |
+
793,
|
| 1490 |
+
487,
|
| 1491 |
+
921
|
| 1492 |
+
],
|
| 1493 |
+
"page_idx": 10
|
| 1494 |
+
},
|
| 1495 |
+
{
|
| 1496 |
+
"type": "text",
|
| 1497 |
+
"text": "D Other Experimental Details",
|
| 1498 |
+
"text_level": 1,
|
| 1499 |
+
"bbox": [
|
| 1500 |
+
509,
|
| 1501 |
+
83,
|
| 1502 |
+
786,
|
| 1503 |
+
99
|
| 1504 |
+
],
|
| 1505 |
+
"page_idx": 10
|
| 1506 |
+
},
|
| 1507 |
+
{
|
| 1508 |
+
"type": "text",
|
| 1509 |
+
"text": "For models like Qwen2-VL and Qwen2.5-Coder-32B, we use vLLM for deployment on servers equipped with four NVIDIA H800 GPUs (each with 80GB of memory). For the DeepSeek-V2.5 model, we utilize the official API service provided by its developers. All experiments are conducted twice to determine the maximum number of instances that can be resolved. When using the Agentless approach, we employ version 1.0. Table 4 summarizes the hyperparameter details used in our experiments.",
|
| 1510 |
+
"bbox": [
|
| 1511 |
+
507,
|
| 1512 |
+
108,
|
| 1513 |
+
882,
|
| 1514 |
+
286
|
| 1515 |
+
],
|
| 1516 |
+
"page_idx": 10
|
| 1517 |
+
},
|
| 1518 |
+
{
|
| 1519 |
+
"type": "table",
|
| 1520 |
+
"img_path": "images/df8fcbac34b09391ae99e4666d446a896ae6e31bea6844f33a7c3af6489c0db9.jpg",
|
| 1521 |
+
"table_caption": [],
|
| 1522 |
+
"table_footnote": [],
|
| 1523 |
+
"table_body": "<table><tr><td>Phase</td><td>Component</td><td>Details</td></tr><tr><td rowspan=\"3\">Data Processing</td><td>Independent Description</td><td>temperature = 0.2</td></tr><tr><td>Contextual Description</td><td>temperature = 0.3</td></tr><tr><td>Structured Summary</td><td>temperature = 1.0</td></tr><tr><td rowspan=\"2\">Agentless 1.0</td><td>Localization Phase</td><td>temperature = 0.8. For each instance, 4 sets of locations are sampled, each with a max length of 3, and the sets are merged into 2 groups (first 2 and last 2).</td></tr><tr><td>Repair Phase</td><td>Uses a context window of ±10 lines around each edit location. For each group, 21 patches are generated (1 greedy with temperature = 0, and 20 samples with temperature = 0.8).</td></tr></table>",
|
| 1524 |
+
"bbox": [
|
| 1525 |
+
510,
|
| 1526 |
+
297,
|
| 1527 |
+
878,
|
| 1528 |
+
675
|
| 1529 |
+
],
|
| 1530 |
+
"page_idx": 10
|
| 1531 |
+
},
|
| 1532 |
+
{
|
| 1533 |
+
"type": "table",
|
| 1534 |
+
"img_path": "images/2d91d9a5549f9aafdabcf221c8b9e9bae10ad748fd58389fe703f42ac8d2caf8.jpg",
|
| 1535 |
+
"table_caption": [
|
| 1536 |
+
"Table 4: Hyperparameter settings for each phase and component of our experiments."
|
| 1537 |
+
],
|
| 1538 |
+
"table_footnote": [],
|
| 1539 |
+
"table_body": "<table><tr><td>You are a technical image descriptor. For the given image:\n1. If it contains only text, present the exact text in markdown format\n2. If it contains visual elements:\n- Describe the main technical content\n- Include specific measurements, numbers, and text\n- State the relationships between visual elements\n- Focus on technical details over visual style\nYour description should be detailed enough for an AI model to understand the technical content without seeing the image.</td></tr></table>",
|
| 1540 |
+
"bbox": [
|
| 1541 |
+
510,
|
| 1542 |
+
741,
|
| 1543 |
+
878,
|
| 1544 |
+
845
|
| 1545 |
+
],
|
| 1546 |
+
"page_idx": 10
|
| 1547 |
+
},
|
| 1548 |
+
{
|
| 1549 |
+
"type": "text",
|
| 1550 |
+
"text": "Figure 7: Prompt for generating independent descriptions of images.",
|
| 1551 |
+
"bbox": [
|
| 1552 |
+
507,
|
| 1553 |
+
854,
|
| 1554 |
+
882,
|
| 1555 |
+
884
|
| 1556 |
+
],
|
| 1557 |
+
"page_idx": 10
|
| 1558 |
+
},
|
| 1559 |
+
{
|
| 1560 |
+
"type": "page_number",
|
| 1561 |
+
"text": "7360",
|
| 1562 |
+
"bbox": [
|
| 1563 |
+
480,
|
| 1564 |
+
927,
|
| 1565 |
+
519,
|
| 1566 |
+
940
|
| 1567 |
+
],
|
| 1568 |
+
"page_idx": 10
|
| 1569 |
+
},
|
| 1570 |
+
{
|
| 1571 |
+
"type": "code",
|
| 1572 |
+
"sub_type": "code",
|
| 1573 |
+
"code_caption": [],
|
| 1574 |
+
"code_body": "You are a technical image descriptor for software issues. Your task is to create detailed descriptions of ALL images in the issue that will help other AI models understand the issue without seeing the actual images. For EACH image in the issue: 1. Read and understand the entire issue context including: - Bug description - Code samples - Error messages - Expected behavior - Actual results 2. Create a comprehensive description that: - Details exactly what is shown in the image - Connects the image content to the issue context - Includes any visible technical information that's crucial for understanding the issue - Provides enough detail that an AI model could understand the issue's visual aspects without seeing the image Please provide your descriptions in this specific JSON format: { \"images\": [ { \"image_id\": \"<sequential number>\", \"description\": \"<detailed technical description that fully captures the image content and its relationship to the issue>\" } ] } CRITICAL: Ensure you describe EVERY image present in the issue - missing any image would make the issue harder to understand for AI models that cannot see the images.",
|
| 1575 |
+
"guess_lang": "txt",
|
| 1576 |
+
"bbox": [
|
| 1577 |
+
117,
|
| 1578 |
+
104,
|
| 1579 |
+
478,
|
| 1580 |
+
394
|
| 1581 |
+
],
|
| 1582 |
+
"page_idx": 11
|
| 1583 |
+
},
|
| 1584 |
+
{
|
| 1585 |
+
"type": "text",
|
| 1586 |
+
"text": "Figure 8: Prompt for generating descriptions of images based on the contextual information.",
|
| 1587 |
+
"bbox": [
|
| 1588 |
+
114,
|
| 1589 |
+
413,
|
| 1590 |
+
485,
|
| 1591 |
+
439
|
| 1592 |
+
],
|
| 1593 |
+
"page_idx": 11
|
| 1594 |
+
},
|
| 1595 |
+
{
|
| 1596 |
+
"type": "code",
|
| 1597 |
+
"sub_type": "code",
|
| 1598 |
+
"code_caption": [],
|
| 1599 |
+
"code_body": "You are a specialized technical image analyst for software issues. Your task is to analyze \nhow each image connects to and supports the reported issue. Focus on providing a \ncomprehensive analysis that explains the image's role and value in the issue context. \nFor each image, analyze: \n1. Direct Issue Connection - How does this image specifically demonstrate or relate to the reported issue? - What aspects of the issue does this image capture or verify? - Why was including this image necessary for documenting this issue? \n2. Technical Value - What key technical details does this image reveal about the issue? - How do specific elements in the image help understand the problem? - What insights does this image provide for troubleshooting or resolution? \n3. Documentation Importance - What unique information does this image convey that text alone couldn't? - How does this image strengthen the overall issue documentation? - What critical details should developers focus on when reviewing this image? \nProvide your analysis in this JSON format: { \"images\": [ { \"image_id\": \"<sequential number>\",\"analysis\": \"<comprehensive analysis covering the image's connection to the issue, its technical value, and documentation importance. Focus on explaining why this image matters for understanding and resolving the specific issue at hand. Include relevant technical details and their significance to the issue context.\" } 1 Key Guidelines: - Create a narrative that clearly connects the image to the issue context - Focus on why this image is necessary for understanding the specific issue - Include relevant technical details and their significance - Explain how the image contributes to issue documentation and resolution - Be thorough but concise in your analysis",
|
| 1600 |
+
"guess_lang": "txt",
|
| 1601 |
+
"bbox": [
|
| 1602 |
+
117,
|
| 1603 |
+
488,
|
| 1604 |
+
480,
|
| 1605 |
+
854
|
| 1606 |
+
],
|
| 1607 |
+
"page_idx": 11
|
| 1608 |
+
},
|
| 1609 |
+
{
|
| 1610 |
+
"type": "text",
|
| 1611 |
+
"text": "Figure 9: Prompt for analyzing the function of images within the given issue.",
|
| 1612 |
+
"bbox": [
|
| 1613 |
+
112,
|
| 1614 |
+
870,
|
| 1615 |
+
485,
|
| 1616 |
+
898
|
| 1617 |
+
],
|
| 1618 |
+
"page_idx": 11
|
| 1619 |
+
},
|
| 1620 |
+
{
|
| 1621 |
+
"type": "code",
|
| 1622 |
+
"sub_type": "code",
|
| 1623 |
+
"code_caption": [],
|
| 1624 |
+
"code_body": "You are an issue organizer and analyzer. The user will provide you with an issue that includes text descriptions and images. Your task is to analyze this information thoroughly and output a structured summary of the issue in JSON format. \nThe output should include relevant elements as applicable, but you are not required to fill in every field if the information is not available or cannot be accurately summarized. Aim to include: \n```\n```\n{\n \"problemSummary\": \"<a concise summary of the problem>\";\n \"context\": \"<any relevant background information>\";\n \"stepsToReproduce\": [\n \"<step 1: describe the action taken>\";\n \"<step 2: describe the next action>\";\n \"...<more steps as necessary>\";\n ],\n \"expectedResults\": \"<what the user expected to happen>\";\n \"actualResults\": \"<what actually happened>\";\n \"supplementaryImages\": [\n \"<descriptions of the images provided>\";\n ],\n \"additionalNotes\": \"<any other relevant information or notes>\";\n} \nFeel free to omit any fields that are not applicable or where information is uncertain, while ensuring the output remains clear and informative to assist other models in understanding and resolving the issue effectively.",
|
| 1625 |
+
"guess_lang": "txt",
|
| 1626 |
+
"bbox": [
|
| 1627 |
+
512,
|
| 1628 |
+
86,
|
| 1629 |
+
875,
|
| 1630 |
+
350
|
| 1631 |
+
],
|
| 1632 |
+
"page_idx": 11
|
| 1633 |
+
},
|
| 1634 |
+
{
|
| 1635 |
+
"type": "text",
|
| 1636 |
+
"text": "Figure 10: Prompt for generating a structured summary.",
|
| 1637 |
+
"bbox": [
|
| 1638 |
+
509,
|
| 1639 |
+
369,
|
| 1640 |
+
880,
|
| 1641 |
+
385
|
| 1642 |
+
],
|
| 1643 |
+
"page_idx": 11
|
| 1644 |
+
},
|
| 1645 |
+
{
|
| 1646 |
+
"type": "code",
|
| 1647 |
+
"sub_type": "code",
|
| 1648 |
+
"code_caption": [],
|
| 1649 |
+
"code_body": "PX facet labels don't respect labels kwang Issue \n``python \npx.scatter tips, $x =$ \"total_bill\", $y =$ \"tip,\"facet_row $\\equiv$ \"time\",facet_col $\\equiv$ \"day\", labels $\\coloneqq$ (\"time\":\"THE TIME\",\"day\":\"THE DAY\")) \nReported in https://github.com/plotly/plotlyexpress/pull/164 \nPX facet labels don't respect labels kwang New Issue \n``python \npx.scatter tips, $x =$ \"total_bill\", $y =$ \"tip,\"facet_row $\\equiv$ \"time\",facet_col $\\equiv$ \"day\", labels $\\coloneqq$ (\"time\":\"THE TIME\",\"day\":\"THE DAY\")) \nThis image is part of the problem description. Here is the relevant information: \n**Image Details:** \n- - **Image ID**: 1 \n- - **Raw Description**: The image consists of four scatter plots, each representing the relationship between the total bill and the tip amount for different days and times. The plots are arranged in... \n- - **Contextual Description**: The image is a scatter plot with multiple facets, showing the relationship between 'total_bill' and 'tip' across different days and times. The x-axis is labeled 'total_bill' and ranges from 8 to 16... \n- - **Analysis**: This image demonstrates a reported issue with the Plotly Express library where facet labels do not respect the labels keyword argument. The scatter plot is intended to show the relationship between 'total_bill' and 'tip' for different days and times, with facet labels set to 'THE TIME' and 'THE DAY'.... \nReported in https://github.com/plotly/plotly express/pull/164 \n### Issue Summary (Structured) \n- - **problemSummary**: Facet labels in a scatter plot do not respect the labels keyword argument. \n- - **context**: The issue was reported in a GitHub pull request. \n- - **stepsToReproduce**: ['Create a scatter plot using Plotly Express', 'Use the 'facet_row' and 'facet_col' parameters to create facets.', 'Use the 'labels' parameter to specify custom labels for the facets.'] \n- - **expectedResults**: The facet labels should reflect the custom labels provided in the 'labels' parameter. \n- - **actualResults**: The facet labels do not change and display the default labels. \n- - **supplementaryimages**: [A scatter plot with facets showing the default labels instead of the custom labels.] \n- - **additionalNotes**: The issue was reported in a GitHub pull request, indicating it is a known bug.",
|
| 1650 |
+
"guess_lang": "txt",
|
| 1651 |
+
"bbox": [
|
| 1652 |
+
512,
|
| 1653 |
+
397,
|
| 1654 |
+
878,
|
| 1655 |
+
875
|
| 1656 |
+
],
|
| 1657 |
+
"page_idx": 11
|
| 1658 |
+
},
|
| 1659 |
+
{
|
| 1660 |
+
"type": "text",
|
| 1661 |
+
"text": "Figure 11: An example of a processed visual issue. The issue from Plotly issue #1944.",
|
| 1662 |
+
"bbox": [
|
| 1663 |
+
507,
|
| 1664 |
+
885,
|
| 1665 |
+
880,
|
| 1666 |
+
914
|
| 1667 |
+
],
|
| 1668 |
+
"page_idx": 11
|
| 1669 |
+
},
|
| 1670 |
+
{
|
| 1671 |
+
"type": "page_number",
|
| 1672 |
+
"text": "7361",
|
| 1673 |
+
"bbox": [
|
| 1674 |
+
480,
|
| 1675 |
+
928,
|
| 1676 |
+
517,
|
| 1677 |
+
940
|
| 1678 |
+
],
|
| 1679 |
+
"page_idx": 11
|
| 1680 |
+
}
|
| 1681 |
+
]
|
2025/CodeV_ Issue Resolving with Visual Data/7f6c3ec1-9cd2-4428-a242-409b35b428e7_model.json
ADDED
|
@@ -0,0 +1,2171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
[
|
| 3 |
+
{
|
| 4 |
+
"type": "title",
|
| 5 |
+
"bbox": [
|
| 6 |
+
0.28,
|
| 7 |
+
0.091,
|
| 8 |
+
0.72,
|
| 9 |
+
0.112
|
| 10 |
+
],
|
| 11 |
+
"angle": 0,
|
| 12 |
+
"content": "CODEV: Issue Resolving with Visual Data"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"bbox": [
|
| 17 |
+
0.164,
|
| 18 |
+
0.128,
|
| 19 |
+
0.834,
|
| 20 |
+
0.23
|
| 21 |
+
],
|
| 22 |
+
"angle": 0,
|
| 23 |
+
"content": "Linhao Zhang\\(^{1}\\) Daoguang Zan\\(^{2*}\\) Quanshun Yang\\(^{1}\\) Zhirong Huang\\(^{2}\\) Dong Chen\\(^{3}\\) Bo Shen\\(^{3}\\) Tianyu Liu\\(^{4}\\) Yongshun Gong\\(^{1}\\) Pengjie Huang\\(^{5}\\) Xudong Lu\\(^{1*}\\) Guangtai Liang\\(^{3}\\) Lizhen Cui\\(^{1}\\) Qianxiang Wang\\(^{3}\\) Shandong University Chinese Academy of Sciences Huawei Co., Ltd Peking University Lingzhi-zhiguang Co., Ltd linhaoz@mail.sdu.edu.cn daoguang@iscas.ac.cn dongxul@sdu.edu.cn"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "title",
|
| 27 |
+
"bbox": [
|
| 28 |
+
0.261,
|
| 29 |
+
0.261,
|
| 30 |
+
0.341,
|
| 31 |
+
0.276
|
| 32 |
+
],
|
| 33 |
+
"angle": 0,
|
| 34 |
+
"content": "Abstract"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"bbox": [
|
| 39 |
+
0.142,
|
| 40 |
+
0.284,
|
| 41 |
+
0.461,
|
| 42 |
+
0.584
|
| 43 |
+
],
|
| 44 |
+
"angle": 0,
|
| 45 |
+
"content": "Large Language Models (LLMs) have advanced rapidly in recent years, with their applications in software engineering expanding to more complex repository-level tasks. GitHub issue resolving is a key challenge among these tasks. While recent approaches have made progress on this task, they focus on textual data within issues, neglecting visual data. However, this visual data is crucial for resolving issues as it conveys additional knowledge that text alone cannot. We propose CODEV, the first approach to leveraging visual data to enhance the issue-resolving capabilities of LLMs. CODEV resolves each issue by following a two-phase process: data processing and patch generation. To evaluate CODEV, we construct a benchmark for visual issue resolving, namely Visual SWEBench. Through extensive experiments, we demonstrate the effectiveness of CODEV, as well as provide valuable insights into leveraging visual data to resolve GitHub issues<sup>1</sup>."
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "title",
|
| 49 |
+
"bbox": [
|
| 50 |
+
0.115,
|
| 51 |
+
0.591,
|
| 52 |
+
0.262,
|
| 53 |
+
0.606
|
| 54 |
+
],
|
| 55 |
+
"angle": 0,
|
| 56 |
+
"content": "1 Introduction"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"bbox": [
|
| 61 |
+
0.113,
|
| 62 |
+
0.615,
|
| 63 |
+
0.49,
|
| 64 |
+
0.856
|
| 65 |
+
],
|
| 66 |
+
"angle": 0,
|
| 67 |
+
"content": "Large Language Models (LLMs) have advanced rapidly in recent years, with their applications in the field of software engineering becoming increasingly widespread (Zan et al., 2023; Zheng et al., 2023; Zhang et al., 2023b; Chen et al., 2024b). Currently, LLMs' applications in software engineering have gradually expanded tasks at the code line and function level to more challenging repository-level tasks (Zhang et al., 2023a; Liu et al., 2024). Within repository-level tasks, GitHub issue resolving is a key challenge, where LLMs are tasked to resolve the issue based on the issue description and the defective codebase. (Jimenez et al., 2024; Xia et al., 2024). This task can accelerate program repair and is crucial for improving development efficiency."
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"bbox": [
|
| 72 |
+
0.114,
|
| 73 |
+
0.857,
|
| 74 |
+
0.489,
|
| 75 |
+
0.889
|
| 76 |
+
],
|
| 77 |
+
"angle": 0,
|
| 78 |
+
"content": "Although recent approaches have made progress on this task, they focus exclusively on textual data"
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "image",
|
| 82 |
+
"bbox": [
|
| 83 |
+
0.513,
|
| 84 |
+
0.259,
|
| 85 |
+
0.883,
|
| 86 |
+
0.414
|
| 87 |
+
],
|
| 88 |
+
"angle": 0,
|
| 89 |
+
"content": null
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"type": "image_caption",
|
| 93 |
+
"bbox": [
|
| 94 |
+
0.509,
|
| 95 |
+
0.423,
|
| 96 |
+
0.884,
|
| 97 |
+
0.467
|
| 98 |
+
],
|
| 99 |
+
"angle": 0,
|
| 100 |
+
"content": "Figure 1: An example of a visual GitHub issue from Plotly issue #1944. The visual data illustrates that the label parameters (\"time\" and \"day\") do not take effect."
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"type": "text",
|
| 104 |
+
"bbox": [
|
| 105 |
+
0.508,
|
| 106 |
+
0.494,
|
| 107 |
+
0.885,
|
| 108 |
+
0.816
|
| 109 |
+
],
|
| 110 |
+
"angle": 0,
|
| 111 |
+
"content": "in GitHub issues, neglecting visual data such as screenshots, diagrams, and videos (Chen et al., 2024a; Yang et al., 2024a; Zhang et al., 2024; Xia et al., 2024). However, this visual data is crucial for resolving issues, as it conveys additional knowledge that text alone cannot, including actual results, expected results, and error messages. Figure 1 shows a specific example where visual data illustrates the running result. Moreover, we statistically analyze SWE-bench (Jimenez et al., 2024), the most popular benchmark for issue resolving. The result shows that over \\(5\\%\\) of GitHub issues contain visual data, with even higher percentages in visualization libraries like seaborn² and matplotlib³, where they reach \\(45.5\\%\\) and \\(27.2\\%\\) respectively. This analysis further highlights the importance of resolving visual GitHub issues. However, existing approaches struggle to resolve them effectively, as they overlook visual data, which calls for new solutions that leverage visual data."
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"type": "text",
|
| 115 |
+
"bbox": [
|
| 116 |
+
0.508,
|
| 117 |
+
0.817,
|
| 118 |
+
0.884,
|
| 119 |
+
0.882
|
| 120 |
+
],
|
| 121 |
+
"angle": 0,
|
| 122 |
+
"content": "An intuitive approach is to extract visual data from the issue and include it as part of the prompt. While this approach seems to leverage visual data, it requires models with advanced multimodal and"
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"type": "page_footnote",
|
| 126 |
+
"bbox": [
|
| 127 |
+
0.136,
|
| 128 |
+
0.894,
|
| 129 |
+
0.286,
|
| 130 |
+
0.908
|
| 131 |
+
],
|
| 132 |
+
"angle": 0,
|
| 133 |
+
"content": "*Corresponding authors"
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"type": "page_footnote",
|
| 137 |
+
"bbox": [
|
| 138 |
+
0.137,
|
| 139 |
+
0.907,
|
| 140 |
+
0.403,
|
| 141 |
+
0.921
|
| 142 |
+
],
|
| 143 |
+
"angle": 0,
|
| 144 |
+
"content": "'https://github.com/luolin101/CodeV"
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"type": "list",
|
| 148 |
+
"bbox": [
|
| 149 |
+
0.136,
|
| 150 |
+
0.894,
|
| 151 |
+
0.403,
|
| 152 |
+
0.921
|
| 153 |
+
],
|
| 154 |
+
"angle": 0,
|
| 155 |
+
"content": null
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"type": "page_footnote",
|
| 159 |
+
"bbox": [
|
| 160 |
+
0.53,
|
| 161 |
+
0.894,
|
| 162 |
+
0.8,
|
| 163 |
+
0.907
|
| 164 |
+
],
|
| 165 |
+
"angle": 0,
|
| 166 |
+
"content": "2https://github.com/mwaskom/seaborn"
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"type": "page_footnote",
|
| 170 |
+
"bbox": [
|
| 171 |
+
0.53,
|
| 172 |
+
0.907,
|
| 173 |
+
0.844,
|
| 174 |
+
0.921
|
| 175 |
+
],
|
| 176 |
+
"angle": 0,
|
| 177 |
+
"content": "<sup>3</sup>https://github.com/matplotlib/matplotlib"
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"type": "list",
|
| 181 |
+
"bbox": [
|
| 182 |
+
0.53,
|
| 183 |
+
0.894,
|
| 184 |
+
0.844,
|
| 185 |
+
0.921
|
| 186 |
+
],
|
| 187 |
+
"angle": 0,
|
| 188 |
+
"content": null
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"type": "page_number",
|
| 192 |
+
"bbox": [
|
| 193 |
+
0.481,
|
| 194 |
+
0.928,
|
| 195 |
+
0.521,
|
| 196 |
+
0.941
|
| 197 |
+
],
|
| 198 |
+
"angle": 0,
|
| 199 |
+
"content": "7350"
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "footer",
|
| 203 |
+
"bbox": [
|
| 204 |
+
0.229,
|
| 205 |
+
0.946,
|
| 206 |
+
0.767,
|
| 207 |
+
0.959
|
| 208 |
+
],
|
| 209 |
+
"angle": 0,
|
| 210 |
+
"content": "Findings of the Association for Computational Linguistics: ACL 2025, pages 7350-7361"
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "footer",
|
| 214 |
+
"bbox": [
|
| 215 |
+
0.269,
|
| 216 |
+
0.96,
|
| 217 |
+
0.729,
|
| 218 |
+
0.973
|
| 219 |
+
],
|
| 220 |
+
"angle": 0,
|
| 221 |
+
"content": "July 27 - August 1, 2025 ©2025 Association for Computational Linguistics"
|
| 222 |
+
}
|
| 223 |
+
],
|
| 224 |
+
[
|
| 225 |
+
{
|
| 226 |
+
"type": "text",
|
| 227 |
+
"bbox": [
|
| 228 |
+
0.117,
|
| 229 |
+
0.085,
|
| 230 |
+
0.491,
|
| 231 |
+
0.47
|
| 232 |
+
],
|
| 233 |
+
"angle": 0,
|
| 234 |
+
"content": "coding capabilities. Currently, only the latest commercial models, GPT-4o (OpenAI, 2024) and Claude 3.5 Sonnet (Anthropic, 2024), barely meet these requirements, but their capabilities remain highly limited. Moreover, these models are less suitable for issue resolving due to high computational costs. Based on our analysis, using these models within the popular SWE-agent approach (Yang et al., 2024a) to run through all issues in SWE-bench once is estimated to cost an average of over $4,700 (Xia et al., 2024), which imposes a significant financial burden on researchers. To address this, we propose CODEV, the first approach that leverages visual data to enhance the issue-resolving capabilities of LLMs at low cost. To resolve each issue, CODEV follows a two-phase process: data processing and patch generation. In the data processing phase, CODEV processes the visual data within the issue from both local and holistic perspectives. This phase produces fine-grained descriptions of the visual data and a structured summary of the entire issue. In the patch generation phase, CODEV leverages the processed information to assist LLMs in generating a patch to resolve the issue."
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"type": "text",
|
| 238 |
+
"bbox": [
|
| 239 |
+
0.117,
|
| 240 |
+
0.472,
|
| 241 |
+
0.49,
|
| 242 |
+
0.728
|
| 243 |
+
],
|
| 244 |
+
"angle": 0,
|
| 245 |
+
"content": "To evaluate our approach, we construct a benchmark specifically designed for evaluating visual GitHub issue resolving, called Visual SWE-bench. The benchmark comprises 133 task instances spanning 11 open-source GitHub repositories, each of which has undergone rigorous selection. Finally, we conduct a series of experiments to validate the effectiveness of our approach. Experimental results demonstrate that CODEV achieves a round \\(63.13\\%\\) relative improvement in the percentage of resolved instances on Visual SWE-bench compared to Agentless. Additionally, through case studies, we analyze the role of each component of CODEV, providing insights into leveraging visual data to resolve issues. Overall, the contributions of this paper are as follows:"
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"bbox": [
|
| 250 |
+
0.137,
|
| 251 |
+
0.74,
|
| 252 |
+
0.488,
|
| 253 |
+
0.788
|
| 254 |
+
],
|
| 255 |
+
"angle": 0,
|
| 256 |
+
"content": "- We propose CODEV, a simple yet novel approach that leverages visual data to enhance the issue-resolving capabilities of LLMs."
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"bbox": [
|
| 261 |
+
0.137,
|
| 262 |
+
0.799,
|
| 263 |
+
0.488,
|
| 264 |
+
0.895
|
| 265 |
+
],
|
| 266 |
+
"angle": 0,
|
| 267 |
+
"content": "- We construct a benchmark designed to evaluate the performance of LLMs in resolving visual GitHub issues, namely Visual SWEBench. The benchmark comprises 133 realistic software engineering tasks sourced from 11 open-source GitHub repositories."
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"bbox": [
|
| 272 |
+
0.137,
|
| 273 |
+
0.906,
|
| 274 |
+
0.486,
|
| 275 |
+
0.922
|
| 276 |
+
],
|
| 277 |
+
"angle": 0,
|
| 278 |
+
"content": "- We validate the effectiveness of our approach"
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "list",
|
| 282 |
+
"bbox": [
|
| 283 |
+
0.137,
|
| 284 |
+
0.74,
|
| 285 |
+
0.488,
|
| 286 |
+
0.922
|
| 287 |
+
],
|
| 288 |
+
"angle": 0,
|
| 289 |
+
"content": null
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"bbox": [
|
| 294 |
+
0.545,
|
| 295 |
+
0.085,
|
| 296 |
+
0.882,
|
| 297 |
+
0.133
|
| 298 |
+
],
|
| 299 |
+
"angle": 0,
|
| 300 |
+
"content": "through a series of experiments and conduct in-depth analysis and summarization of the experimental results."
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"type": "title",
|
| 304 |
+
"bbox": [
|
| 305 |
+
0.51,
|
| 306 |
+
0.145,
|
| 307 |
+
0.631,
|
| 308 |
+
0.162
|
| 309 |
+
],
|
| 310 |
+
"angle": 0,
|
| 311 |
+
"content": "2 Approach"
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"type": "text",
|
| 315 |
+
"bbox": [
|
| 316 |
+
0.508,
|
| 317 |
+
0.17,
|
| 318 |
+
0.884,
|
| 319 |
+
0.268
|
| 320 |
+
],
|
| 321 |
+
"angle": 0,
|
| 322 |
+
"content": "Figure 2 illustrates an overview of CODEV, which consists of two phases: data processing and patch generation. The first phase processes visual data and the second phase uses the processed information to assist LLMs in generating a patch. Below is a detailed description of each phase."
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"type": "title",
|
| 326 |
+
"bbox": [
|
| 327 |
+
0.509,
|
| 328 |
+
0.278,
|
| 329 |
+
0.682,
|
| 330 |
+
0.294
|
| 331 |
+
],
|
| 332 |
+
"angle": 0,
|
| 333 |
+
"content": "2.1 Data Processing"
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "text",
|
| 337 |
+
"bbox": [
|
| 338 |
+
0.508,
|
| 339 |
+
0.299,
|
| 340 |
+
0.885,
|
| 341 |
+
0.492
|
| 342 |
+
],
|
| 343 |
+
"angle": 0,
|
| 344 |
+
"content": "To process the issue's visual data, we adopt two components: fine-grained description and structured summarization. For fine-grained description, the Vision-Language Model (VLM) first generates an independent description for each piece of visual data based on its content. It then provides a contextual description that relates this data to the issue, resulting in a fine-grained description. In structured summarization, the VLM produces a summary that breaks down the complex issue into several clear sections. Below, we detail the implementation of each component."
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "title",
|
| 348 |
+
"bbox": [
|
| 349 |
+
0.509,
|
| 350 |
+
0.501,
|
| 351 |
+
0.771,
|
| 352 |
+
0.516
|
| 353 |
+
],
|
| 354 |
+
"angle": 0,
|
| 355 |
+
"content": "2.1.1 Fine-Grained Description"
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "text",
|
| 359 |
+
"bbox": [
|
| 360 |
+
0.508,
|
| 361 |
+
0.52,
|
| 362 |
+
0.884,
|
| 363 |
+
0.648
|
| 364 |
+
],
|
| 365 |
+
"angle": 0,
|
| 366 |
+
"content": "We design the fine-grained description component to generate textual representations of the visual data. This component draws inspiration from how humans process visual data. When encountering visual data in an issue, humans first identify its raw features and then analyze its function in the context of the problem. Inspired by this, we design a two-step process to generate fine-grained descriptions."
|
| 367 |
+
},
|
| 368 |
+
{
|
| 369 |
+
"type": "text",
|
| 370 |
+
"bbox": [
|
| 371 |
+
0.508,
|
| 372 |
+
0.649,
|
| 373 |
+
0.885,
|
| 374 |
+
0.793
|
| 375 |
+
],
|
| 376 |
+
"angle": 0,
|
| 377 |
+
"content": "Step 1: Independent Description. In the first step, we instruct the VLM to describe each piece of visual data based solely on its content. For visual data consisting purely of text, such as a screenshot of error logs, the VLM extracts the text and outputs it in Markdown format. For other types of visual data, like images or videos with non-textual content, the VLM generates a detailed description capturing all details."
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"type": "text",
|
| 381 |
+
"bbox": [
|
| 382 |
+
0.508,
|
| 383 |
+
0.794,
|
| 384 |
+
0.884,
|
| 385 |
+
0.922
|
| 386 |
+
],
|
| 387 |
+
"angle": 0,
|
| 388 |
+
"content": "Step 2: Contextual Description. In the second step, the VLM is prompted with the complete problem statement to establish the context. Subsequently, it is tasked with providing a comprehensive description and analysis of the visual data based on this contextual understanding. During this step, the VLM tightly connects the visual data with the problem's context to analyze its function."
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"type": "page_number",
|
| 392 |
+
"bbox": [
|
| 393 |
+
0.481,
|
| 394 |
+
0.929,
|
| 395 |
+
0.519,
|
| 396 |
+
0.941
|
| 397 |
+
],
|
| 398 |
+
"angle": 0,
|
| 399 |
+
"content": "7351"
|
| 400 |
+
}
|
| 401 |
+
],
|
| 402 |
+
[
|
| 403 |
+
{
|
| 404 |
+
"type": "image",
|
| 405 |
+
"bbox": [
|
| 406 |
+
0.117,
|
| 407 |
+
0.085,
|
| 408 |
+
0.885,
|
| 409 |
+
0.322
|
| 410 |
+
],
|
| 411 |
+
"angle": 0,
|
| 412 |
+
"content": null
|
| 413 |
+
},
|
| 414 |
+
{
|
| 415 |
+
"type": "image_caption",
|
| 416 |
+
"bbox": [
|
| 417 |
+
0.389,
|
| 418 |
+
0.334,
|
| 419 |
+
0.608,
|
| 420 |
+
0.35
|
| 421 |
+
],
|
| 422 |
+
"angle": 0,
|
| 423 |
+
"content": "Figure 2: Overview of CODEV."
|
| 424 |
+
},
|
| 425 |
+
{
|
| 426 |
+
"type": "text",
|
| 427 |
+
"bbox": [
|
| 428 |
+
0.113,
|
| 429 |
+
0.375,
|
| 430 |
+
0.489,
|
| 431 |
+
0.455
|
| 432 |
+
],
|
| 433 |
+
"angle": 0,
|
| 434 |
+
"content": "Through these two steps, we obtain fine-grained descriptions of all visual data in the issue. These descriptions capture not only the intrinsic features of the visual data but also its critical function in the problem's context."
|
| 435 |
+
},
|
| 436 |
+
{
|
| 437 |
+
"type": "title",
|
| 438 |
+
"bbox": [
|
| 439 |
+
0.114,
|
| 440 |
+
0.466,
|
| 441 |
+
0.388,
|
| 442 |
+
0.48
|
| 443 |
+
],
|
| 444 |
+
"angle": 0,
|
| 445 |
+
"content": "2.1.2 Structured Summarization"
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "text",
|
| 449 |
+
"bbox": [
|
| 450 |
+
0.113,
|
| 451 |
+
0.486,
|
| 452 |
+
0.489,
|
| 453 |
+
0.598
|
| 454 |
+
],
|
| 455 |
+
"angle": 0,
|
| 456 |
+
"content": "Some GitHub issues are described in a structured format, including reproduction steps, expected results, actual results, and so on. This format enhances clarity and makes the key aspects of issues easier to understand. Inspired by this, we propose generating a structured summary to enrich issues and reduce the difficulty of understanding them."
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"bbox": [
|
| 461 |
+
0.113,
|
| 462 |
+
0.6,
|
| 463 |
+
0.49,
|
| 464 |
+
0.841
|
| 465 |
+
],
|
| 466 |
+
"angle": 0,
|
| 467 |
+
"content": "In the structured summarization component, the VLM is prompted with the complete problem statement, including the visual data. It is then tasked with understanding and analyzing the issue to generate a structured summary. To guide this process, we supply the VLM with a template that consists of the following fields: a brief problem summary, background information, reproduction steps, expected results, actual results, descriptions of visual data, and additional notes. However, not all issues may fit perfectly with this template. Therefore, we allow the VLM to skip irrelevant or unclear fields. Additionally, the summary can also include new fields if needed, as long as it remains clear and useful for resolving the issue."
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"type": "text",
|
| 471 |
+
"bbox": [
|
| 472 |
+
0.113,
|
| 473 |
+
0.842,
|
| 474 |
+
0.49,
|
| 475 |
+
0.922
|
| 476 |
+
],
|
| 477 |
+
"angle": 0,
|
| 478 |
+
"content": "Unlike fine-grained description, which focuses on generating representations of visual data, structured summarization aims to provide an overview of the entire issue. It not only covers visual data but also gives a deeper understanding of the problem."
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"type": "text",
|
| 482 |
+
"bbox": [
|
| 483 |
+
0.508,
|
| 484 |
+
0.375,
|
| 485 |
+
0.885,
|
| 486 |
+
0.504
|
| 487 |
+
],
|
| 488 |
+
"angle": 0,
|
| 489 |
+
"content": "These two components complement each other: fine-grained description captures the detailed features of local visual data, while structured summarization synthesizes global information. Through these components, we ensure that visual data is processed effectively to support LLMs in understanding and resolving the issue. Prompts related to these components are listed in Appendix A."
|
| 490 |
+
},
|
| 491 |
+
{
|
| 492 |
+
"type": "title",
|
| 493 |
+
"bbox": [
|
| 494 |
+
0.509,
|
| 495 |
+
0.515,
|
| 496 |
+
0.695,
|
| 497 |
+
0.529
|
| 498 |
+
],
|
| 499 |
+
"angle": 0,
|
| 500 |
+
"content": "2.2 Patch Generation"
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"type": "text",
|
| 504 |
+
"bbox": [
|
| 505 |
+
0.508,
|
| 506 |
+
0.536,
|
| 507 |
+
0.884,
|
| 508 |
+
0.68
|
| 509 |
+
],
|
| 510 |
+
"angle": 0,
|
| 511 |
+
"content": "After generating fine-grained descriptions and a structured summary in the data processing phase, the patch generation phase leverages this information to generate a patch. To support LLMs in efficiently utilizing this information, we splice them into the original issue. Specifically, the visual data is converted into fine-grained descriptions, and the issue is enriched with a structured summary, with an example provided in Appendix B."
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"type": "text",
|
| 515 |
+
"bbox": [
|
| 516 |
+
0.508,
|
| 517 |
+
0.681,
|
| 518 |
+
0.885,
|
| 519 |
+
0.922
|
| 520 |
+
],
|
| 521 |
+
"angle": 0,
|
| 522 |
+
"content": "To enhance the ability of LLMs to resolve textual issues, various approaches have been proposed. These approaches take different forms: some are agent-based, equipping LLMs with a set of tools that allow the agent to autonomously perform actions (Chen et al., 2024a; Yang et al., 2024a; Zhang et al., 2024); others are agentless (Xia et al., 2024). Regardless of their form, they typically input the issue and codebase, with the output being a generated patch. CODEV combines these approaches through a unified interface, automating patch generation. At this point, the newly generated issue and its corresponding codebase are fed into the textual issue-resolving approach, where LLMs follow predefined instructions to generate a patch."
|
| 523 |
+
},
|
| 524 |
+
{
|
| 525 |
+
"type": "page_number",
|
| 526 |
+
"bbox": [
|
| 527 |
+
0.481,
|
| 528 |
+
0.928,
|
| 529 |
+
0.522,
|
| 530 |
+
0.941
|
| 531 |
+
],
|
| 532 |
+
"angle": 0,
|
| 533 |
+
"content": "7352"
|
| 534 |
+
}
|
| 535 |
+
],
|
| 536 |
+
[
|
| 537 |
+
{
|
| 538 |
+
"type": "title",
|
| 539 |
+
"bbox": [
|
| 540 |
+
0.115,
|
| 541 |
+
0.085,
|
| 542 |
+
0.417,
|
| 543 |
+
0.099
|
| 544 |
+
],
|
| 545 |
+
"angle": 0,
|
| 546 |
+
"content": "3 Visual SWE-bench Benchmark"
|
| 547 |
+
},
|
| 548 |
+
{
|
| 549 |
+
"type": "text",
|
| 550 |
+
"bbox": [
|
| 551 |
+
0.113,
|
| 552 |
+
0.112,
|
| 553 |
+
0.49,
|
| 554 |
+
0.272
|
| 555 |
+
],
|
| 556 |
+
"angle": 0,
|
| 557 |
+
"content": "In current benchmarks for the issue-resolving task, only the recently released SWE-bench Multimodal (Yang et al., 2024b) focuses on visual issues. However, as of writing, SWE-bench Multimodal<sup>4</sup> lacks evaluation fields, and its evaluation script has not been made public, making it unsuitable for evaluation. To evaluate CodeV, we construct a benchmark for resolving visual GitHub issues, namely Visual SWE-bench. Below, we detail our benchmark construction process and its key features."
|
| 558 |
+
},
|
| 559 |
+
{
|
| 560 |
+
"type": "title",
|
| 561 |
+
"bbox": [
|
| 562 |
+
0.114,
|
| 563 |
+
0.286,
|
| 564 |
+
0.266,
|
| 565 |
+
0.3
|
| 566 |
+
],
|
| 567 |
+
"angle": 0,
|
| 568 |
+
"content": "3.1 Construction"
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"type": "text",
|
| 572 |
+
"bbox": [
|
| 573 |
+
0.113,
|
| 574 |
+
0.308,
|
| 575 |
+
0.49,
|
| 576 |
+
0.452
|
| 577 |
+
],
|
| 578 |
+
"angle": 0,
|
| 579 |
+
"content": "From the 2,294 instances in SWE-bench, we identify 128 task instances whose problem statement contains visual data. These visual data are presented through hyperlinks, with images embedded using HTML or Markdown syntax and videos provided as plain text hyperlinks. Building on these identified task instances, we adopt a four-stage construction process to further expand the tasks and conduct rigorous verification on all instances."
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "title",
|
| 583 |
+
"bbox": [
|
| 584 |
+
0.131,
|
| 585 |
+
0.468,
|
| 586 |
+
0.489,
|
| 587 |
+
0.483
|
| 588 |
+
],
|
| 589 |
+
"angle": 0,
|
| 590 |
+
"content": "1. Repositories selection and pull requests"
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"type": "text",
|
| 594 |
+
"bbox": [
|
| 595 |
+
0.15,
|
| 596 |
+
0.485,
|
| 597 |
+
0.49,
|
| 598 |
+
0.709
|
| 599 |
+
],
|
| 600 |
+
"angle": 0,
|
| 601 |
+
"content": "Collection. We analyze the 128 task instances from SWE-bench, and the results show that most of them originate from visualization libraries. To expand our benchmark, we select three additional popular open-source visualization libraries (plotly.py, networkx, and al-tair) and crawl all their pull requests (PRs) from GitHub. Since SWE-bench only includes PRs created before August 2023, we select repositories with at least 10 visual task instances from SWE-bench (matplotlib, sympy, sphinx, and seaborn) and collect recent PRs from these repositories. These two rounds of collection yield approximately 10,000 PRs."
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "title",
|
| 605 |
+
"bbox": [
|
| 606 |
+
0.129,
|
| 607 |
+
0.723,
|
| 608 |
+
0.488,
|
| 609 |
+
0.771
|
| 610 |
+
],
|
| 611 |
+
"angle": 0,
|
| 612 |
+
"content": "2. Candidate instance construction. Candidate instances are constructed from the collected PRs through the following steps:"
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"bbox": [
|
| 617 |
+
0.158,
|
| 618 |
+
0.781,
|
| 619 |
+
0.488,
|
| 620 |
+
0.827
|
| 621 |
+
],
|
| 622 |
+
"angle": 0,
|
| 623 |
+
"content": "(1) We select only merged PRs that resolve at least one issue and include modifications to test files."
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "text",
|
| 627 |
+
"bbox": [
|
| 628 |
+
0.158,
|
| 629 |
+
0.832,
|
| 630 |
+
0.487,
|
| 631 |
+
0.895
|
| 632 |
+
],
|
| 633 |
+
"angle": 0,
|
| 634 |
+
"content": "(2) For each PR, we extract the text of all resolved issues, retaining only those PRs where the issue text contained hyperlinks to images or videos."
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"type": "list",
|
| 638 |
+
"bbox": [
|
| 639 |
+
0.158,
|
| 640 |
+
0.781,
|
| 641 |
+
0.488,
|
| 642 |
+
0.895
|
| 643 |
+
],
|
| 644 |
+
"angle": 0,
|
| 645 |
+
"content": null
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"type": "page_footnote",
|
| 649 |
+
"bbox": [
|
| 650 |
+
0.136,
|
| 651 |
+
0.907,
|
| 652 |
+
0.447,
|
| 653 |
+
0.92
|
| 654 |
+
],
|
| 655 |
+
"angle": 0,
|
| 656 |
+
"content": "4https://www.swebench.com/multimodal.html"
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "text",
|
| 660 |
+
"bbox": [
|
| 661 |
+
0.553,
|
| 662 |
+
0.085,
|
| 663 |
+
0.883,
|
| 664 |
+
0.133
|
| 665 |
+
],
|
| 666 |
+
"angle": 0,
|
| 667 |
+
"content": "(3) For qualifying PRs, we gather detailed information, including \"instance ID\", \"patch\", \"test patch\", and so on."
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"bbox": [
|
| 672 |
+
0.545,
|
| 673 |
+
0.139,
|
| 674 |
+
0.882,
|
| 675 |
+
0.171
|
| 676 |
+
],
|
| 677 |
+
"angle": 0,
|
| 678 |
+
"content": "This process results in 38 candidate instances from approximately 10,000 PRs."
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "text",
|
| 682 |
+
"bbox": [
|
| 683 |
+
0.524,
|
| 684 |
+
0.18,
|
| 685 |
+
0.884,
|
| 686 |
+
0.34
|
| 687 |
+
],
|
| 688 |
+
"angle": 0,
|
| 689 |
+
"content": "3. Execution verification. For each candidate instance, we meticulously set up the runtime environment and testing commands, removing any instances that failed due to installation or runtime errors. Next, we apply the test patch to each instance and record the test results both before and after applying the gold patch. Instances without any tests where the status changes from fail to pass are excluded. This process leaves 31 viable candidate instances."
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"type": "text",
|
| 693 |
+
"bbox": [
|
| 694 |
+
0.524,
|
| 695 |
+
0.35,
|
| 696 |
+
0.885,
|
| 697 |
+
0.446
|
| 698 |
+
],
|
| 699 |
+
"angle": 0,
|
| 700 |
+
"content": "4. Human verification. We conduct human verification on 159 instances, comprising 128 task instances from SWE-bench and 31 candidate instances filtered through the previous stages. Each instance is evaluated based on the following criteria:"
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "list",
|
| 704 |
+
"bbox": [
|
| 705 |
+
0.524,
|
| 706 |
+
0.18,
|
| 707 |
+
0.885,
|
| 708 |
+
0.446
|
| 709 |
+
],
|
| 710 |
+
"angle": 0,
|
| 711 |
+
"content": null
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "text",
|
| 715 |
+
"bbox": [
|
| 716 |
+
0.553,
|
| 717 |
+
0.452,
|
| 718 |
+
0.884,
|
| 719 |
+
0.482
|
| 720 |
+
],
|
| 721 |
+
"angle": 0,
|
| 722 |
+
"content": "(1) Whether the visual data can be fully converted to text."
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"bbox": [
|
| 727 |
+
0.553,
|
| 728 |
+
0.485,
|
| 729 |
+
0.882,
|
| 730 |
+
0.517
|
| 731 |
+
],
|
| 732 |
+
"angle": 0,
|
| 733 |
+
"content": "(2) Whether the visual data is essential for resolving the instance."
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"type": "text",
|
| 737 |
+
"bbox": [
|
| 738 |
+
0.553,
|
| 739 |
+
0.519,
|
| 740 |
+
0.884,
|
| 741 |
+
0.566
|
| 742 |
+
],
|
| 743 |
+
"angle": 0,
|
| 744 |
+
"content": "(3) Whether the problem description contains sufficient information for effective resolution."
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"type": "list",
|
| 748 |
+
"bbox": [
|
| 749 |
+
0.553,
|
| 750 |
+
0.452,
|
| 751 |
+
0.884,
|
| 752 |
+
0.566
|
| 753 |
+
],
|
| 754 |
+
"angle": 0,
|
| 755 |
+
"content": null
|
| 756 |
+
},
|
| 757 |
+
{
|
| 758 |
+
"type": "text",
|
| 759 |
+
"bbox": [
|
| 760 |
+
0.545,
|
| 761 |
+
0.574,
|
| 762 |
+
0.884,
|
| 763 |
+
0.75
|
| 764 |
+
],
|
| 765 |
+
"angle": 0,
|
| 766 |
+
"content": "Using these criteria, we exclude 4 instances where visual data can be fully converted to text via Optical Character Recognition (OCR) and 4 instances where visual data is not essential for resolution. Additionally, based on the content of their test cases, we exclude 18 instances that cannot be resolved due to insufficient problem descriptions. This process results in a curated, high-quality benchmark of 133 task instances. Additional human verification details are provided in Appendix C."
|
| 767 |
+
},
|
| 768 |
+
{
|
| 769 |
+
"type": "title",
|
| 770 |
+
"bbox": [
|
| 771 |
+
0.51,
|
| 772 |
+
0.757,
|
| 773 |
+
0.625,
|
| 774 |
+
0.77
|
| 775 |
+
],
|
| 776 |
+
"angle": 0,
|
| 777 |
+
"content": "3.2 Features"
|
| 778 |
+
},
|
| 779 |
+
{
|
| 780 |
+
"type": "text",
|
| 781 |
+
"bbox": [
|
| 782 |
+
0.508,
|
| 783 |
+
0.777,
|
| 784 |
+
0.884,
|
| 785 |
+
0.921
|
| 786 |
+
],
|
| 787 |
+
"angle": 0,
|
| 788 |
+
"content": "As shown in Figure 3, Visual SWE-bench comprises 133 visual task instances sourced from 11 open-source GitHub repositories. These instances cover a wide range of functionalities, including but not limited to data visualization, machine learning, and document generation. This diverse set of tasks provides a comprehensive benchmark for evaluating the performance of LLMs in resolving visual issues automatically."
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "page_number",
|
| 792 |
+
"bbox": [
|
| 793 |
+
0.481,
|
| 794 |
+
0.929,
|
| 795 |
+
0.521,
|
| 796 |
+
0.941
|
| 797 |
+
],
|
| 798 |
+
"angle": 0,
|
| 799 |
+
"content": "7353"
|
| 800 |
+
}
|
| 801 |
+
],
|
| 802 |
+
[
|
| 803 |
+
{
|
| 804 |
+
"type": "table",
|
| 805 |
+
"bbox": [
|
| 806 |
+
0.12,
|
| 807 |
+
0.081,
|
| 808 |
+
0.88,
|
| 809 |
+
0.302
|
| 810 |
+
],
|
| 811 |
+
"angle": 0,
|
| 812 |
+
"content": "<table><tr><td rowspan=\"2\">Repository</td><td colspan=\"2\">CodeBase</td><td>Issue Text</td><td colspan=\"3\">Gold Patch</td><td>Tests</td><td colspan=\"2\">Images</td></tr><tr><td># Files</td><td># Lines</td><td># Length</td><td># Lines</td><td># Files</td><td># Func.</td><td># Lines</td><td># File Size</td><td># Resolution</td></tr><tr><td>altair</td><td>499</td><td>90K</td><td>98.5</td><td>27</td><td>2.5</td><td>3</td><td>15</td><td>24.12</td><td>99K</td></tr><tr><td>astropy</td><td>1578</td><td>445K</td><td>1352.5</td><td>10</td><td>1</td><td>2</td><td>69</td><td>19.76</td><td>170K</td></tr><tr><td>matplotlib</td><td>2388</td><td>592K</td><td>175</td><td>9</td><td>1</td><td>2</td><td>89.5</td><td>23.58</td><td>307K</td></tr><tr><td>networkx</td><td>849</td><td>108K</td><td>155</td><td>23</td><td>1</td><td>1</td><td>26</td><td>21.38</td><td>307K</td></tr><tr><td>plotly.py</td><td>14302</td><td>587K</td><td>44</td><td>15</td><td>2</td><td>1</td><td>11.5</td><td>23.58</td><td>307K</td></tr><tr><td>pylint</td><td>2712</td><td>92K</td><td>100</td><td>126</td><td>4</td><td>9</td><td>10</td><td>23.46</td><td>307K</td></tr><tr><td>scikit-learn</td><td>1343</td><td>277K</td><td>641</td><td>22</td><td>1</td><td>2</td><td>12</td><td>23.58</td><td>307K</td></tr><tr><td>seaborn</td><td>295</td><td>70K</td><td>143.5</td><td>13.5</td><td>2</td><td>3</td><td>109.5</td><td>23.1</td><td>307K</td></tr><tr><td>sphinx</td><td>1436</td><td>308K</td><td>157</td><td>8</td><td>1</td><td>2</td><td>35</td><td>27.08</td><td>286K</td></tr><tr><td>sympy</td><td>1907</td><td>477K</td><td>125</td><td>21</td><td>1</td><td>2</td><td>36</td><td>24.26</td><td>275K</td></tr><tr><td>xarray</td><td>320</td><td>123K</td><td>220.5</td><td>5</td><td>1</td><td>2</td><td>229.5</td><td>25.08</td><td>275K</td></tr><tr><td>mean</td><td>2512</td><td>288K</td><td>292</td><td>25.40</td><td>1.59</td><td>2.63</td><td>58.45</td><td>23.54</td><td>268K</td></tr><tr><td>max</td><td>14302</td><td>592K</td><td>1352.5</td><td>126</td><td>4</td><td>9</td><td>229.5</td><td>27.08</td><td>307K</td></tr></table>"
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"type": "table_caption",
|
| 816 |
+
"bbox": [
|
| 817 |
+
0.113,
|
| 818 |
+
0.311,
|
| 819 |
+
0.885,
|
| 820 |
+
0.385
|
| 821 |
+
],
|
| 822 |
+
"angle": 0,
|
| 823 |
+
"content": "Table 1: Summary statistics for Visual SWE-bench. The term \"CodeBase # Files and # Lines\" denotes the total count of files and lines within the codebase. \"Issue Text # Length\" indicates the median word count in the problem statement. \"Gold Patch # Lines, # Files, and # Func.\" reflects the median number of lines, files, and functions modified per patch stored in the repository. \"Tests # Lines\" signifies the median line count of code present in test cases. \"Images # File Size and # Resolution\" represents both the median image file size (KB) and resolution (pixels)."
|
| 824 |
+
},
|
| 825 |
+
{
|
| 826 |
+
"type": "image",
|
| 827 |
+
"bbox": [
|
| 828 |
+
0.116,
|
| 829 |
+
0.407,
|
| 830 |
+
0.489,
|
| 831 |
+
0.587
|
| 832 |
+
],
|
| 833 |
+
"angle": 0,
|
| 834 |
+
"content": null
|
| 835 |
+
},
|
| 836 |
+
{
|
| 837 |
+
"type": "image_caption",
|
| 838 |
+
"bbox": [
|
| 839 |
+
0.114,
|
| 840 |
+
0.598,
|
| 841 |
+
0.49,
|
| 842 |
+
0.628
|
| 843 |
+
],
|
| 844 |
+
"angle": 0,
|
| 845 |
+
"content": "Figure 3: Distribution of Visual SWE-bench task instances across 11 open-source GitHub repositories."
|
| 846 |
+
},
|
| 847 |
+
{
|
| 848 |
+
"type": "text",
|
| 849 |
+
"bbox": [
|
| 850 |
+
0.113,
|
| 851 |
+
0.654,
|
| 852 |
+
0.49,
|
| 853 |
+
0.879
|
| 854 |
+
],
|
| 855 |
+
"angle": 0,
|
| 856 |
+
"content": "Data statistics. Table 1 summarizes key statistics for the repositories in Visual SWE-bench, emphasizing their diversity and representativeness. Repository sizes range from 295 to 14,302 files and 70K to 592K lines of code, illustrating structural variation. Problem statements vary widely in length, with median word counts from 44 to 1,353, reflecting differences in task comprehension demands. Gold patches show diverse modification scopes, with median changes spanning 5 to 126 lines, indicating varying solution complexities. This broad spectrum of task characteristics provides a robust benchmark for evaluating LLMs' performance in resolving visual issues."
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"type": "text",
|
| 860 |
+
"bbox": [
|
| 861 |
+
0.114,
|
| 862 |
+
0.89,
|
| 863 |
+
0.489,
|
| 864 |
+
0.922
|
| 865 |
+
],
|
| 866 |
+
"angle": 0,
|
| 867 |
+
"content": "Visual data distribution. Across all Visual SWE-bench tasks, we identify 217 images and"
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"type": "text",
|
| 871 |
+
"bbox": [
|
| 872 |
+
0.508,
|
| 873 |
+
0.409,
|
| 874 |
+
0.886,
|
| 875 |
+
0.634
|
| 876 |
+
],
|
| 877 |
+
"angle": 0,
|
| 878 |
+
"content": "2 videos, spanning a diverse range of visual processing challenges grouped into seven categories. These include code screenshots (21), error messages (8), and system information (2), which are linked to specific code library entities to facilitate error identification. Other categories include data visualizations (140), documentation results (33), function formulas (13), and keyboard shortcuts (2), illustrating challenges such as generating complex statistics and utilizing code functions within specific libraries. Additionally, two instances feature GIFs (matplotlib matplotlib-19763) and videos (matplotlib matplotlib-25631), providing more dynamic and detailed depictions of these challenges."
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"type": "title",
|
| 882 |
+
"bbox": [
|
| 883 |
+
0.509,
|
| 884 |
+
0.654,
|
| 885 |
+
0.657,
|
| 886 |
+
0.672
|
| 887 |
+
],
|
| 888 |
+
"angle": 0,
|
| 889 |
+
"content": "4 Experiments"
|
| 890 |
+
},
|
| 891 |
+
{
|
| 892 |
+
"type": "title",
|
| 893 |
+
"bbox": [
|
| 894 |
+
0.509,
|
| 895 |
+
0.687,
|
| 896 |
+
0.715,
|
| 897 |
+
0.703
|
| 898 |
+
],
|
| 899 |
+
"angle": 0,
|
| 900 |
+
"content": "4.1 Experimental Setup"
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"type": "text",
|
| 904 |
+
"bbox": [
|
| 905 |
+
0.508,
|
| 906 |
+
0.712,
|
| 907 |
+
0.886,
|
| 908 |
+
0.922
|
| 909 |
+
],
|
| 910 |
+
"angle": 0,
|
| 911 |
+
"content": "Models. To execute CODEV for resolving visual issues, two model types are required: a VLM for processing visual data and an LLM for generating patches. To demonstrate the effectiveness of CODEV, we specifically avoid commercial models and use open-source models in our experiments. For the VLM, we select Qwen2-VL (Wang et al., 2024), a model renowned for its robust visual understanding capabilities, using three versions: 2B, 7B, and 72B. For the LLM, we choose two models: DeepSeek-V2.5 (DeepSeek-AI, 2024) and Qwen2.5-Coder-32B (Hui et al., 2024), both recognized for their powerful coding capabilities."
|
| 912 |
+
},
|
| 913 |
+
{
|
| 914 |
+
"type": "page_number",
|
| 915 |
+
"bbox": [
|
| 916 |
+
0.481,
|
| 917 |
+
0.929,
|
| 918 |
+
0.522,
|
| 919 |
+
0.941
|
| 920 |
+
],
|
| 921 |
+
"angle": 0,
|
| 922 |
+
"content": "7354"
|
| 923 |
+
}
|
| 924 |
+
],
|
| 925 |
+
[
|
| 926 |
+
{
|
| 927 |
+
"type": "table",
|
| 928 |
+
"bbox": [
|
| 929 |
+
0.115,
|
| 930 |
+
0.081,
|
| 931 |
+
0.885,
|
| 932 |
+
0.479
|
| 933 |
+
],
|
| 934 |
+
"angle": 0,
|
| 935 |
+
"content": "<table><tr><td>Approach</td><td>Model</td><td>Resolved (%)</td></tr><tr><td colspan=\"3\">Evaluation results on 111 instances from Visual SWE-bench</td></tr><tr><td>Honeycomb (Honeycomb, 2024)</td><td>NA</td><td>10.81 (12)</td></tr><tr><td>Amazon Q Developer Agent (AWS, 2024)</td><td>NA</td><td>9.01 (10)</td></tr><tr><td>Factory Code Droid (Factory, 2024)</td><td>NA</td><td>9.01 (10)</td></tr><tr><td>AutoCodeRover (Zhang et al., 2024)</td><td>GPT 4o (2024-05-13)</td><td>10.81 (12)</td></tr><tr><td>AppMap Navie (AppMap, 2024)</td><td>GPT 4o (2024-05-13)</td><td>9.01 (10)</td></tr><tr><td rowspan=\"3\">SWE-agent (Yang et al., 2024a)</td><td>Claude 3.5 Sonnet</td><td>6.31 (7)</td></tr><tr><td>GPT 4 (1106)</td><td>8.11 (9)</td></tr><tr><td>GPT 4o (2024-05-13)</td><td>1.80 (2)</td></tr><tr><td rowspan=\"2\">RAG (Jimenez et al., 2024)</td><td>Claude 3 Opus</td><td>2.70 (3)</td></tr><tr><td>Claude 2</td><td>0.90 (1)</td></tr><tr><td rowspan=\"4\">CODEV + Agentless (Ours)</td><td>Qwen2-VL-72B + DeepSeek-V2.5</td><td>11.71 (13)</td></tr><tr><td>Qwen2-VL-2B + Qwen2.5-Coder-32B</td><td>13.51 (15)</td></tr><tr><td>Qwen2-VL-7B + Qwen2.5-Coder-32B</td><td>13.51 (15)</td></tr><tr><td>Qwen2-VL-72B + Qwen2.5-Coder-32B</td><td>11.71 (13)</td></tr><tr><td colspan=\"3\">Evaluation results on all instances from Visual SWE-bench</td></tr><tr><td rowspan=\"2\">Agentless (Xia et al., 2024)</td><td>DeepSeek-V2.5</td><td>6.02 (8)</td></tr><tr><td>Qwen2.5-Coder-32B</td><td>7.52 (10)</td></tr><tr><td>Agentless Plus</td><td>Qwen2-VL-72B</td><td>0.75 (1)</td></tr><tr><td rowspan=\"4\">CODEV + Agentless (Ours)</td><td>Qwen2-VL-72B + DeepSeek-V2.5</td><td>9.77 (13)</td></tr><tr><td>Qwen2-VL-2B + Qwen2.5-Coder-32B</td><td>12.78 (17)</td></tr><tr><td>Qwen2-VL-7B + Qwen2.5-Coder-32B</td><td>12.78 (17)</td></tr><tr><td>Qwen2-VL-72B + Qwen2.5-Coder-32B</td><td>11.28 (15)</td></tr></table>"
|
| 936 |
+
},
|
| 937 |
+
{
|
| 938 |
+
"type": "table_caption",
|
| 939 |
+
"bbox": [
|
| 940 |
+
0.113,
|
| 941 |
+
0.486,
|
| 942 |
+
0.884,
|
| 943 |
+
0.517
|
| 944 |
+
],
|
| 945 |
+
"angle": 0,
|
| 946 |
+
"content": "Table 2: Results on Visual SWE-bench. The 111 instances are the overlapping instances between Visual SWE-bench and SWE-bench. \\(\\blacksquare\\) indicates closed-source approaches."
|
| 947 |
+
},
|
| 948 |
+
{
|
| 949 |
+
"type": "text",
|
| 950 |
+
"bbox": [
|
| 951 |
+
0.113,
|
| 952 |
+
0.541,
|
| 953 |
+
0.49,
|
| 954 |
+
0.75
|
| 955 |
+
],
|
| 956 |
+
"angle": 0,
|
| 957 |
+
"content": "Baselines. In the patch generation phase, CODEV combines textual issue-resolving approaches. We specifically adopt the open-source Agentless approach (Xia et al., 2024), which resolves issues through a simple localization and repair process. We also compare CODEV with several textual issue-resolving approaches, including open-source and closed-source commercial products. These approaches have demonstrated strong performance on SWE-bench. To further contrast with VLM-based approaches, we design Agentless Plus, a modified version of Agentless that supports VLMs in processing visual data in issues to resolve them."
|
| 958 |
+
},
|
| 959 |
+
{
|
| 960 |
+
"type": "text",
|
| 961 |
+
"bbox": [
|
| 962 |
+
0.113,
|
| 963 |
+
0.759,
|
| 964 |
+
0.49,
|
| 965 |
+
0.84
|
| 966 |
+
],
|
| 967 |
+
"angle": 0,
|
| 968 |
+
"content": "Metrics. We use Resolved \\((\\%)\\) as our evaluation metric. The metric represents the percentage of Visual SWE-bench instances that have been successfully resolved. More details about the experiments can be found in Appendix D."
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"type": "title",
|
| 972 |
+
"bbox": [
|
| 973 |
+
0.114,
|
| 974 |
+
0.85,
|
| 975 |
+
0.248,
|
| 976 |
+
0.863
|
| 977 |
+
],
|
| 978 |
+
"angle": 0,
|
| 979 |
+
"content": "4.2 Evaluation"
|
| 980 |
+
},
|
| 981 |
+
{
|
| 982 |
+
"type": "title",
|
| 983 |
+
"bbox": [
|
| 984 |
+
0.114,
|
| 985 |
+
0.871,
|
| 986 |
+
0.279,
|
| 987 |
+
0.884
|
| 988 |
+
],
|
| 989 |
+
"angle": 0,
|
| 990 |
+
"content": "4.2.1 Main Results"
|
| 991 |
+
},
|
| 992 |
+
{
|
| 993 |
+
"type": "text",
|
| 994 |
+
"bbox": [
|
| 995 |
+
0.113,
|
| 996 |
+
0.89,
|
| 997 |
+
0.488,
|
| 998 |
+
0.922
|
| 999 |
+
],
|
| 1000 |
+
"angle": 0,
|
| 1001 |
+
"content": "Table 2 presents the results of all approaches. The results show that CODEV significantly enhances"
|
| 1002 |
+
},
|
| 1003 |
+
{
|
| 1004 |
+
"type": "text",
|
| 1005 |
+
"bbox": [
|
| 1006 |
+
0.508,
|
| 1007 |
+
0.541,
|
| 1008 |
+
0.885,
|
| 1009 |
+
0.685
|
| 1010 |
+
],
|
| 1011 |
+
"angle": 0,
|
| 1012 |
+
"content": "the issue-resolving capabilities of the LLM by leveraging visual data. Compared to all benchmarks, CODEV achieves the best performance. When combined with Agentless, CODEV achieves over a \\(50\\%\\) relative improvement, whether using DeepSeek-V2.5 or Qwen2.5-Coder-32B to resolve issues. The performance of CodeV highlights the value of leveraging visual data to help LLMs understand and resolve issues."
|
| 1013 |
+
},
|
| 1014 |
+
{
|
| 1015 |
+
"type": "text",
|
| 1016 |
+
"bbox": [
|
| 1017 |
+
0.508,
|
| 1018 |
+
0.691,
|
| 1019 |
+
0.886,
|
| 1020 |
+
0.852
|
| 1021 |
+
],
|
| 1022 |
+
"angle": 0,
|
| 1023 |
+
"content": "Figure 4(a) depicts the distribution of issues resolved by CODEV compared to both closed-source and open-source baseline approaches. Notably, CODEV can resolve certain issues that either opensource or closed-source approaches cannot resolve. Furthermore, CODEV successfully resolves some complex issues that neither category of approaches could solve. This highlights not only the advantages of CODEV but also the importance of leveraging visual data to resolve issues."
|
| 1024 |
+
},
|
| 1025 |
+
{
|
| 1026 |
+
"type": "text",
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
0.508,
|
| 1029 |
+
0.858,
|
| 1030 |
+
0.884,
|
| 1031 |
+
0.922
|
| 1032 |
+
],
|
| 1033 |
+
"angle": 0,
|
| 1034 |
+
"content": "From Table 2, it is evident that the performance of the VLM does not significantly impact CODEV. Among the three versions of Qwen2-VL, the 72B model is the most powerful, while the 7B and"
|
| 1035 |
+
},
|
| 1036 |
+
{
|
| 1037 |
+
"type": "page_number",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
0.481,
|
| 1040 |
+
0.928,
|
| 1041 |
+
0.521,
|
| 1042 |
+
0.941
|
| 1043 |
+
],
|
| 1044 |
+
"angle": 0,
|
| 1045 |
+
"content": "7355"
|
| 1046 |
+
}
|
| 1047 |
+
],
|
| 1048 |
+
[
|
| 1049 |
+
{
|
| 1050 |
+
"type": "image",
|
| 1051 |
+
"bbox": [
|
| 1052 |
+
0.12,
|
| 1053 |
+
0.086,
|
| 1054 |
+
0.298,
|
| 1055 |
+
0.206
|
| 1056 |
+
],
|
| 1057 |
+
"angle": 0,
|
| 1058 |
+
"content": null
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"type": "image_caption",
|
| 1062 |
+
"bbox": [
|
| 1063 |
+
0.115,
|
| 1064 |
+
0.211,
|
| 1065 |
+
0.298,
|
| 1066 |
+
0.235
|
| 1067 |
+
],
|
| 1068 |
+
"angle": 0,
|
| 1069 |
+
"content": "(a) All approaches on 111 instances."
|
| 1070 |
+
},
|
| 1071 |
+
{
|
| 1072 |
+
"type": "image",
|
| 1073 |
+
"bbox": [
|
| 1074 |
+
0.309,
|
| 1075 |
+
0.087,
|
| 1076 |
+
0.488,
|
| 1077 |
+
0.206
|
| 1078 |
+
],
|
| 1079 |
+
"angle": 0,
|
| 1080 |
+
"content": null
|
| 1081 |
+
},
|
| 1082 |
+
{
|
| 1083 |
+
"type": "image_caption",
|
| 1084 |
+
"bbox": [
|
| 1085 |
+
0.305,
|
| 1086 |
+
0.211,
|
| 1087 |
+
0.49,
|
| 1088 |
+
0.247
|
| 1089 |
+
],
|
| 1090 |
+
"angle": 0,
|
| 1091 |
+
"content": "(b) CODEV with VLMs of different model sizes on all instances."
|
| 1092 |
+
},
|
| 1093 |
+
{
|
| 1094 |
+
"type": "image_caption",
|
| 1095 |
+
"bbox": [
|
| 1096 |
+
0.114,
|
| 1097 |
+
0.261,
|
| 1098 |
+
0.489,
|
| 1099 |
+
0.29
|
| 1100 |
+
],
|
| 1101 |
+
"angle": 0,
|
| 1102 |
+
"content": "Figure 4: Venn diagrams of issues resolved from Visual SWE-bench."
|
| 1103 |
+
},
|
| 1104 |
+
{
|
| 1105 |
+
"type": "table",
|
| 1106 |
+
"bbox": [
|
| 1107 |
+
0.12,
|
| 1108 |
+
0.304,
|
| 1109 |
+
0.486,
|
| 1110 |
+
0.406
|
| 1111 |
+
],
|
| 1112 |
+
"angle": 0,
|
| 1113 |
+
"content": "<table><tr><td>Approach</td><td>Resolved (%)</td></tr><tr><td>CODEV + Agentless</td><td>11.28 (15)</td></tr><tr><td>w/o Fine-Grained Description</td><td>9.77 (13)</td></tr><tr><td>w/o Independent Description</td><td>9.02 (12)</td></tr><tr><td>w/o Contextual Description</td><td>9.02 (12)</td></tr><tr><td>w/o Structured Summarization</td><td>7.52 (10)</td></tr></table>"
|
| 1114 |
+
},
|
| 1115 |
+
{
|
| 1116 |
+
"type": "table_caption",
|
| 1117 |
+
"bbox": [
|
| 1118 |
+
0.114,
|
| 1119 |
+
0.416,
|
| 1120 |
+
0.489,
|
| 1121 |
+
0.459
|
| 1122 |
+
],
|
| 1123 |
+
"angle": 0,
|
| 1124 |
+
"content": "Table 3: Ablation studies on Visual SWE-bench (133 instances). The VLM is Qwen2-VL-72B and the LLM is Qwen2.5-Coder-32B."
|
| 1125 |
+
},
|
| 1126 |
+
{
|
| 1127 |
+
"type": "text",
|
| 1128 |
+
"bbox": [
|
| 1129 |
+
0.113,
|
| 1130 |
+
0.486,
|
| 1131 |
+
0.49,
|
| 1132 |
+
0.679
|
| 1133 |
+
],
|
| 1134 |
+
"angle": 0,
|
| 1135 |
+
"content": "2B models exhibit progressively weaker capabilities. However, even with the lower-performing 7B and 2B models, CODEV maintained robust issue-resolving capabilities, even outperforming the 72B model. Additionally, Figure 4(b) further illustrates the distribution of resolved issues across different VLMs. The issues resolved do not overlap entirely, indicating that each VLM has its strengths in processing different types of issues. This indicates that despite differences in VLM performance, CODEV can still exert the capabilities of VLM, resolve issues stably, and demonstrate strong robustness."
|
| 1136 |
+
},
|
| 1137 |
+
{
|
| 1138 |
+
"type": "text",
|
| 1139 |
+
"bbox": [
|
| 1140 |
+
0.113,
|
| 1141 |
+
0.68,
|
| 1142 |
+
0.49,
|
| 1143 |
+
0.842
|
| 1144 |
+
],
|
| 1145 |
+
"angle": 0,
|
| 1146 |
+
"content": "Additionally, we observe that using the VLM alone, while it leverages visual data, does not yield satisfactory results. For example, Agentless Plus combined with Qwen2-VL-72B resolves only one issue. This is primarily due to its weak coding capabilities. In comparison, CODEV effectively combines the VLM's visual understanding ability with the LLM's coding capabilities. This integration allows LLMs to leverage visual data to resolve issues at a low cost, making it a promising solution."
|
| 1147 |
+
},
|
| 1148 |
+
{
|
| 1149 |
+
"type": "title",
|
| 1150 |
+
"bbox": [
|
| 1151 |
+
0.114,
|
| 1152 |
+
0.869,
|
| 1153 |
+
0.398,
|
| 1154 |
+
0.884
|
| 1155 |
+
],
|
| 1156 |
+
"angle": 0,
|
| 1157 |
+
"content": "4.2.2 Analysis of Ablation Studies"
|
| 1158 |
+
},
|
| 1159 |
+
{
|
| 1160 |
+
"type": "text",
|
| 1161 |
+
"bbox": [
|
| 1162 |
+
0.114,
|
| 1163 |
+
0.89,
|
| 1164 |
+
0.489,
|
| 1165 |
+
0.921
|
| 1166 |
+
],
|
| 1167 |
+
"angle": 0,
|
| 1168 |
+
"content": "We conduct a series of ablation studies on Visual SWE-bench, and the results in Table 3 show that"
|
| 1169 |
+
},
|
| 1170 |
+
{
|
| 1171 |
+
"type": "image",
|
| 1172 |
+
"bbox": [
|
| 1173 |
+
0.513,
|
| 1174 |
+
0.084,
|
| 1175 |
+
0.88,
|
| 1176 |
+
0.289
|
| 1177 |
+
],
|
| 1178 |
+
"angle": 0,
|
| 1179 |
+
"content": null
|
| 1180 |
+
},
|
| 1181 |
+
{
|
| 1182 |
+
"type": "image_caption",
|
| 1183 |
+
"bbox": [
|
| 1184 |
+
0.509,
|
| 1185 |
+
0.299,
|
| 1186 |
+
0.885,
|
| 1187 |
+
0.341
|
| 1188 |
+
],
|
| 1189 |
+
"angle": 0,
|
| 1190 |
+
"content": "Figure 5: Fine-grained description example for the instance mwaskom_seaborn-3276, offering detailed insights into the visual data."
|
| 1191 |
+
},
|
| 1192 |
+
{
|
| 1193 |
+
"type": "image",
|
| 1194 |
+
"bbox": [
|
| 1195 |
+
0.513,
|
| 1196 |
+
0.358,
|
| 1197 |
+
0.88,
|
| 1198 |
+
0.554
|
| 1199 |
+
],
|
| 1200 |
+
"angle": 0,
|
| 1201 |
+
"content": null
|
| 1202 |
+
},
|
| 1203 |
+
{
|
| 1204 |
+
"type": "image_caption",
|
| 1205 |
+
"bbox": [
|
| 1206 |
+
0.509,
|
| 1207 |
+
0.565,
|
| 1208 |
+
0.884,
|
| 1209 |
+
0.608
|
| 1210 |
+
],
|
| 1211 |
+
"angle": 0,
|
| 1212 |
+
"content": "Figure 6: Structured summarization example for the instance pydata_xarray-4182, demonstrating a concise representation of its key information."
|
| 1213 |
+
},
|
| 1214 |
+
{
|
| 1215 |
+
"type": "text",
|
| 1216 |
+
"bbox": [
|
| 1217 |
+
0.508,
|
| 1218 |
+
0.636,
|
| 1219 |
+
0.884,
|
| 1220 |
+
0.701
|
| 1221 |
+
],
|
| 1222 |
+
"angle": 0,
|
| 1223 |
+
"content": "removing any component of CODEV leads to a decline in performance. This led us to further investigate the functions of the components in the data processing phase."
|
| 1224 |
+
},
|
| 1225 |
+
{
|
| 1226 |
+
"type": "text",
|
| 1227 |
+
"bbox": [
|
| 1228 |
+
0.508,
|
| 1229 |
+
0.712,
|
| 1230 |
+
0.885,
|
| 1231 |
+
0.922
|
| 1232 |
+
],
|
| 1233 |
+
"angle": 0,
|
| 1234 |
+
"content": "Analysis of Fine-Grained Description. The fine-grained description process consists of two steps: independent description and contextual description. In the independent description, the VLM captures the raw features of visual data, providing a direct and detailed representation. However, why is contextual description also necessary? Figure 5 shows an issue that is difficult to resolve without the contextual description. The figure shows two images, and the contextual description analyzes their respective function, explaining the information conveyed by each. In contrast, the independent description provides only a general overview,"
|
| 1235 |
+
},
|
| 1236 |
+
{
|
| 1237 |
+
"type": "page_number",
|
| 1238 |
+
"bbox": [
|
| 1239 |
+
0.481,
|
| 1240 |
+
0.929,
|
| 1241 |
+
0.522,
|
| 1242 |
+
0.941
|
| 1243 |
+
],
|
| 1244 |
+
"angle": 0,
|
| 1245 |
+
"content": "7356"
|
| 1246 |
+
}
|
| 1247 |
+
],
|
| 1248 |
+
[
|
| 1249 |
+
{
|
| 1250 |
+
"type": "text",
|
| 1251 |
+
"bbox": [
|
| 1252 |
+
0.113,
|
| 1253 |
+
0.085,
|
| 1254 |
+
0.493,
|
| 1255 |
+
0.214
|
| 1256 |
+
],
|
| 1257 |
+
"angle": 0,
|
| 1258 |
+
"content": "missing critical details needed for a complete understanding of the issue. These details are essential for LLMs to grasp the issue accurately. Thus, while the independent description captures the raw features of the visual data, the contextual description extracts deeper, more nuanced information. Together, these two steps work in tandem to provide a comprehensive understanding of the visual data."
|
| 1259 |
+
},
|
| 1260 |
+
{
|
| 1261 |
+
"type": "text",
|
| 1262 |
+
"bbox": [
|
| 1263 |
+
0.117,
|
| 1264 |
+
0.224,
|
| 1265 |
+
0.492,
|
| 1266 |
+
0.498
|
| 1267 |
+
],
|
| 1268 |
+
"angle": 0,
|
| 1269 |
+
"content": "Analysis of Structured Summarization. As shown in Table 3, removing structured summarization significantly undermines the performance of CODEV. To explain this phenomenon, Figure 6 presents an issue that is more easily resolved with a summary. The summary generated by CODEV breaks down the complex issue into clear, digestible sections, providing LLMs with a full understanding of the issue's background, expected outcomes, and actual results. This structured format also helps LLMs grasp the core content more effectively. While the fine-grained description component attempts to convey the meaning of the visual data, relying solely on this still presents challenges in fully understanding the issue. By combining visual and textual data, the structured summary offers LLMs a more holistic understanding of the issue."
|
| 1270 |
+
},
|
| 1271 |
+
{
|
| 1272 |
+
"type": "title",
|
| 1273 |
+
"bbox": [
|
| 1274 |
+
0.114,
|
| 1275 |
+
0.51,
|
| 1276 |
+
0.279,
|
| 1277 |
+
0.525
|
| 1278 |
+
],
|
| 1279 |
+
"angle": 0,
|
| 1280 |
+
"content": "5 Related Works"
|
| 1281 |
+
},
|
| 1282 |
+
{
|
| 1283 |
+
"type": "text",
|
| 1284 |
+
"bbox": [
|
| 1285 |
+
0.113,
|
| 1286 |
+
0.536,
|
| 1287 |
+
0.49,
|
| 1288 |
+
0.922
|
| 1289 |
+
],
|
| 1290 |
+
"angle": 0,
|
| 1291 |
+
"content": "Issue Resolving Approaches. To assist LLMs in resolving GitHub issues, many approaches have already been proposed. Retrieval Augmented Generation (RAG) (Jimenez et al., 2024) is a direct approach that resolves the issue by first extracting relevant code snippets from the repository and then using them to prompt LLMs to generate a patch. SWE-agent (Yang et al., 2024a) meticulously designs an agent-computer interface (ACI) that enables LLM agents to interact with repository environments to solve software engineering tasks. AutoCodeRover (Zhang et al., 2024) combines LLMs with code search, utilizes program structure, and conducts iterative searches for program improvement. CodeR (Chen et al., 2024a) is a multi-agent approach for issue-resolving tasks, adopting a multi-agent framework and pre-defined task graphs. Agentless (Xia et al., 2024) points out the limitations of using agents and proposes a simple two-phase process of localization and repair to solve software development problems. However, these existing approaches overlook visual data within issues. CODEV bridges this gap by processing visual data from both local and holistic"
|
| 1292 |
+
},
|
| 1293 |
+
{
|
| 1294 |
+
"type": "text",
|
| 1295 |
+
"bbox": [
|
| 1296 |
+
0.509,
|
| 1297 |
+
0.085,
|
| 1298 |
+
0.883,
|
| 1299 |
+
0.117
|
| 1300 |
+
],
|
| 1301 |
+
"angle": 0,
|
| 1302 |
+
"content": "perspectives, enhancing the capabilities of LLMs to resolve complex visual issues."
|
| 1303 |
+
},
|
| 1304 |
+
{
|
| 1305 |
+
"type": "text",
|
| 1306 |
+
"bbox": [
|
| 1307 |
+
0.509,
|
| 1308 |
+
0.133,
|
| 1309 |
+
0.885,
|
| 1310 |
+
0.665
|
| 1311 |
+
],
|
| 1312 |
+
"angle": 0,
|
| 1313 |
+
"content": "Code Generation Benchmarks. Code generation has long been a measure of LLMs performance (Austin et al., 2021). The emergence of HumanEval (Chen et al., 2021) provides a standardized framework for evaluating code generation models. In subsequent years, various benchmarks have been developed to enhance HumanEval by adding extensions to different languages (Cassano et al., 2022; Athiwaratkun et al., 2023; Orlanski et al., 2023), introducing variations in edit scope (Yu et al., 2024; Du et al., 2023), presenting similar yet novel code completion tasks (Muennighoff et al., 2024), and conducting more extensive testing (Liu et al., 2023). With the development of LLMs, existing benchmarks struggle to explore the boundaries of state-of-the-art LLMs' capabilities. To address this, SWE-bench (Jimenez et al., 2024) offers a direction by researching real-world GitHub issues, serving as a challenging benchmark for evaluating next-generation LLMs. Building on this, SWE-bench-Java (Zan et al., 2024) extends the benchmark to the Java ecosystem, creating a multilingual benchmark. Similarly, the latest work, SWE-bench Multimodal (Yang et al., 2024b) offers a multimodal upgrade to the benchmark, focusing on visual JavaScript problems. Given Python's increasing role in fields like data science, machine learning, and visualization, where visual data is crucial, we construct Visual SWE-bench focusing on visual issues in Python. By incorporating real-world visual issues, Visual SWE-bench encourages researchers to leverage visual data in solving complex software challenges."
|
| 1314 |
+
},
|
| 1315 |
+
{
|
| 1316 |
+
"type": "title",
|
| 1317 |
+
"bbox": [
|
| 1318 |
+
0.51,
|
| 1319 |
+
0.683,
|
| 1320 |
+
0.642,
|
| 1321 |
+
0.698
|
| 1322 |
+
],
|
| 1323 |
+
"angle": 0,
|
| 1324 |
+
"content": "6 Conclusion"
|
| 1325 |
+
},
|
| 1326 |
+
{
|
| 1327 |
+
"type": "text",
|
| 1328 |
+
"bbox": [
|
| 1329 |
+
0.508,
|
| 1330 |
+
0.713,
|
| 1331 |
+
0.885,
|
| 1332 |
+
0.922
|
| 1333 |
+
],
|
| 1334 |
+
"angle": 0,
|
| 1335 |
+
"content": "We propose CODEV, an approach that leverages visual data to resolve issues automatically. It processes visual data and provides LLMs with valuable information that enhances their ability to resolve issues. To evaluate CODEV, we construct a benchmark for visual issue resolving, namely Visual SWE-bench. Through extensive experiments, we demonstrate the effectiveness of CODEV and find that it maintains robust performance across VLMs with varying model sizes. Additionally, through case studies, we analyze the function of each component of CODEV, offering insights on leveraging visual data to resolve issues."
|
| 1336 |
+
},
|
| 1337 |
+
{
|
| 1338 |
+
"type": "page_number",
|
| 1339 |
+
"bbox": [
|
| 1340 |
+
0.481,
|
| 1341 |
+
0.929,
|
| 1342 |
+
0.521,
|
| 1343 |
+
0.941
|
| 1344 |
+
],
|
| 1345 |
+
"angle": 0,
|
| 1346 |
+
"content": "7357"
|
| 1347 |
+
}
|
| 1348 |
+
],
|
| 1349 |
+
[
|
| 1350 |
+
{
|
| 1351 |
+
"type": "title",
|
| 1352 |
+
"bbox": [
|
| 1353 |
+
0.115,
|
| 1354 |
+
0.085,
|
| 1355 |
+
0.221,
|
| 1356 |
+
0.1
|
| 1357 |
+
],
|
| 1358 |
+
"angle": 0,
|
| 1359 |
+
"content": "Limitations"
|
| 1360 |
+
},
|
| 1361 |
+
{
|
| 1362 |
+
"type": "text",
|
| 1363 |
+
"bbox": [
|
| 1364 |
+
0.114,
|
| 1365 |
+
0.111,
|
| 1366 |
+
0.49,
|
| 1367 |
+
0.16
|
| 1368 |
+
],
|
| 1369 |
+
"angle": 0,
|
| 1370 |
+
"content": "Although this study offers valuable insights into leveraging visual data to resolve GitHub issues, several limitations should be acknowledged:"
|
| 1371 |
+
},
|
| 1372 |
+
{
|
| 1373 |
+
"type": "text",
|
| 1374 |
+
"bbox": [
|
| 1375 |
+
0.137,
|
| 1376 |
+
0.172,
|
| 1377 |
+
0.489,
|
| 1378 |
+
0.252
|
| 1379 |
+
],
|
| 1380 |
+
"angle": 0,
|
| 1381 |
+
"content": "- Due to the randomness in the responses generated by LLMs, there is a potential threat to the experimental results. Despite repeating each experiment twice to mitigate this, minor fluctuations in results may still occur."
|
| 1382 |
+
},
|
| 1383 |
+
{
|
| 1384 |
+
"type": "text",
|
| 1385 |
+
"bbox": [
|
| 1386 |
+
0.137,
|
| 1387 |
+
0.264,
|
| 1388 |
+
0.49,
|
| 1389 |
+
0.378
|
| 1390 |
+
],
|
| 1391 |
+
"angle": 0,
|
| 1392 |
+
"content": "- Due to the lack of suitable benchmarks, our experiments are conducted solely on the self-constructed benchmark. However, we conduct comprehensive experiments and analyses to validate our approach, and we hope future research will develop more publicly available benchmarks to further explore this direction."
|
| 1393 |
+
},
|
| 1394 |
+
{
|
| 1395 |
+
"type": "text",
|
| 1396 |
+
"bbox": [
|
| 1397 |
+
0.137,
|
| 1398 |
+
0.389,
|
| 1399 |
+
0.492,
|
| 1400 |
+
0.534
|
| 1401 |
+
],
|
| 1402 |
+
"angle": 0,
|
| 1403 |
+
"content": "- Due to the high costs of GPT-4o and Claude 3.5 Sonnet, we don't include them in our comparative experiments. Based on our estimates, using these models within the SWE-agent approach under similar experimental conditions would cost thousands of dollars. Nevertheless, we evaluate CODEV using two LLMs and three VLMs, conducting extensive experiments that confirm its effectiveness."
|
| 1404 |
+
},
|
| 1405 |
+
{
|
| 1406 |
+
"type": "list",
|
| 1407 |
+
"bbox": [
|
| 1408 |
+
0.137,
|
| 1409 |
+
0.172,
|
| 1410 |
+
0.492,
|
| 1411 |
+
0.534
|
| 1412 |
+
],
|
| 1413 |
+
"angle": 0,
|
| 1414 |
+
"content": null
|
| 1415 |
+
},
|
| 1416 |
+
{
|
| 1417 |
+
"type": "title",
|
| 1418 |
+
"bbox": [
|
| 1419 |
+
0.115,
|
| 1420 |
+
0.573,
|
| 1421 |
+
0.214,
|
| 1422 |
+
0.589
|
| 1423 |
+
],
|
| 1424 |
+
"angle": 0,
|
| 1425 |
+
"content": "References"
|
| 1426 |
+
},
|
| 1427 |
+
{
|
| 1428 |
+
"type": "ref_text",
|
| 1429 |
+
"bbox": [
|
| 1430 |
+
0.116,
|
| 1431 |
+
0.597,
|
| 1432 |
+
0.49,
|
| 1433 |
+
0.638
|
| 1434 |
+
],
|
| 1435 |
+
"angle": 0,
|
| 1436 |
+
"content": "Anthropic. 2024. Introducing claude 3.5 sonnet. https://www.anthropic.com/news/claude-3-5-sonnet."
|
| 1437 |
+
},
|
| 1438 |
+
{
|
| 1439 |
+
"type": "ref_text",
|
| 1440 |
+
"bbox": [
|
| 1441 |
+
0.117,
|
| 1442 |
+
0.648,
|
| 1443 |
+
0.489,
|
| 1444 |
+
0.689
|
| 1445 |
+
],
|
| 1446 |
+
"angle": 0,
|
| 1447 |
+
"content": "AppMap. 2024. Appmap speedruns to the top of the swe bench leaderboard. https://appmap.io/blog/2024/06/20/appmap-navie-swe-bench-leader."
|
| 1448 |
+
},
|
| 1449 |
+
{
|
| 1450 |
+
"type": "ref_text",
|
| 1451 |
+
"bbox": [
|
| 1452 |
+
0.117,
|
| 1453 |
+
0.7,
|
| 1454 |
+
0.49,
|
| 1455 |
+
0.844
|
| 1456 |
+
],
|
| 1457 |
+
"angle": 0,
|
| 1458 |
+
"content": "Ben Athiwaratkun, Sanjay Krishna Gouda, Zijian Wang, Xiaopeng Li, Yuchen Tian, Ming Tan, Wasi Uddin Ahmad, Shiqi Wang, Qing Sun, Mingyue Shang, Sujan Kumar Gonugondla, Hantian Ding, Varun Kumar, Nathan Fulton, Arash Farahani, Siddhartha Jain, Robert Giaquinto, Haifeng Qian, Murali Krishna Ramanathan, and Ramesh Nallapati. 2023. Multilingual evaluation of code generation models. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net."
|
| 1459 |
+
},
|
| 1460 |
+
{
|
| 1461 |
+
"type": "ref_text",
|
| 1462 |
+
"bbox": [
|
| 1463 |
+
0.117,
|
| 1464 |
+
0.855,
|
| 1465 |
+
0.49,
|
| 1466 |
+
0.922
|
| 1467 |
+
],
|
| 1468 |
+
"angle": 0,
|
| 1469 |
+
"content": "Jacob Austin, Augustus Odena, Maxwell I. Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie J. Cai, Michael Terry, Quoc V. Le, and Charles Sutton. 2021. Program synthesis with large language models. CoRR, abs/2108.07732."
|
| 1470 |
+
},
|
| 1471 |
+
{
|
| 1472 |
+
"type": "list",
|
| 1473 |
+
"bbox": [
|
| 1474 |
+
0.116,
|
| 1475 |
+
0.597,
|
| 1476 |
+
0.49,
|
| 1477 |
+
0.922
|
| 1478 |
+
],
|
| 1479 |
+
"angle": 0,
|
| 1480 |
+
"content": null
|
| 1481 |
+
},
|
| 1482 |
+
{
|
| 1483 |
+
"type": "ref_text",
|
| 1484 |
+
"bbox": [
|
| 1485 |
+
0.511,
|
| 1486 |
+
0.086,
|
| 1487 |
+
0.883,
|
| 1488 |
+
0.126
|
| 1489 |
+
],
|
| 1490 |
+
"angle": 0,
|
| 1491 |
+
"content": "AWS. 2024. Amazon q developer the most capable generative ai-powered assistant for software development. https://aws.amazon.com/q/developer."
|
| 1492 |
+
},
|
| 1493 |
+
{
|
| 1494 |
+
"type": "ref_text",
|
| 1495 |
+
"bbox": [
|
| 1496 |
+
0.511,
|
| 1497 |
+
0.135,
|
| 1498 |
+
0.885,
|
| 1499 |
+
0.215
|
| 1500 |
+
],
|
| 1501 |
+
"angle": 0,
|
| 1502 |
+
"content": "Federico Cassano, John Gouwar, Daniel Nguyen, Sydney Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q Feldman, et al. 2022. Multi-: A scalable and extensible approach to benchmarking neural code generation. arXiv preprint arXiv:2208.08227."
|
| 1503 |
+
},
|
| 1504 |
+
{
|
| 1505 |
+
"type": "ref_text",
|
| 1506 |
+
"bbox": [
|
| 1507 |
+
0.511,
|
| 1508 |
+
0.224,
|
| 1509 |
+
0.885,
|
| 1510 |
+
0.303
|
| 1511 |
+
],
|
| 1512 |
+
"angle": 0,
|
| 1513 |
+
"content": "Dong Chen, Shaoxin Lin, Muhan Zeng, Daoguang Zan, Jian-Gang Wang, Anton Cheshkov, Jun Sun, Hao Yu, Guoliang Dong, Artem Aliev, Jie Wang, Xiao Cheng, Guangtai Liang, Yuchi Ma, Pan Bian, Tao Xie, and Qianxiang Wang. 2024a. Coder: Issue resolving with multi-agent and task graphs. CoRR, abs/2406.01304."
|
| 1514 |
+
},
|
| 1515 |
+
{
|
| 1516 |
+
"type": "ref_text",
|
| 1517 |
+
"bbox": [
|
| 1518 |
+
0.511,
|
| 1519 |
+
0.312,
|
| 1520 |
+
0.885,
|
| 1521 |
+
0.587
|
| 1522 |
+
],
|
| 1523 |
+
"angle": 0,
|
| 1524 |
+
"content": "Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Pondé de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidi Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. 2021. Evaluating large language models trained on code. CoRR, abs/2107.03374."
|
| 1525 |
+
},
|
| 1526 |
+
{
|
| 1527 |
+
"type": "ref_text",
|
| 1528 |
+
"bbox": [
|
| 1529 |
+
0.511,
|
| 1530 |
+
0.596,
|
| 1531 |
+
0.885,
|
| 1532 |
+
0.662
|
| 1533 |
+
],
|
| 1534 |
+
"angle": 0,
|
| 1535 |
+
"content": "Xiangping Chen, Xing Hu, Yuan Huang, He Jiang, Weixing Ji, Yanjie Jiang, Yanyan Jiang, Bo Liu, Hui Liu, Xiaochen Li, et al. 2024b. Deep learning-based software engineering: Progress, challenges, and opportunities. arXiv preprint arXiv:2410.13110."
|
| 1536 |
+
},
|
| 1537 |
+
{
|
| 1538 |
+
"type": "ref_text",
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
0.511,
|
| 1541 |
+
0.671,
|
| 1542 |
+
0.885,
|
| 1543 |
+
0.711
|
| 1544 |
+
],
|
| 1545 |
+
"angle": 0,
|
| 1546 |
+
"content": "DeepSeek-AI. 2024. Deepseek-v2: A strong, economical, and efficient mixture-of-experts language model. Preprint, arXiv:2405.04434."
|
| 1547 |
+
},
|
| 1548 |
+
{
|
| 1549 |
+
"type": "ref_text",
|
| 1550 |
+
"bbox": [
|
| 1551 |
+
0.511,
|
| 1552 |
+
0.72,
|
| 1553 |
+
0.885,
|
| 1554 |
+
0.787
|
| 1555 |
+
],
|
| 1556 |
+
"angle": 0,
|
| 1557 |
+
"content": "Xueying Du, Mingwei Liu, Kaixin Wang, Hanlin Wang, Junwei Liu, Yixuan Chen, Jiayi Feng, Chaofeng Sha, Xin Peng, and Yiling Lou. 2023. Classical: A manually-crafted benchmark for evaluating llms on class-level code generation. CoRR, abs/2308.01861."
|
| 1558 |
+
},
|
| 1559 |
+
{
|
| 1560 |
+
"type": "ref_text",
|
| 1561 |
+
"bbox": [
|
| 1562 |
+
0.511,
|
| 1563 |
+
0.795,
|
| 1564 |
+
0.885,
|
| 1565 |
+
0.823
|
| 1566 |
+
],
|
| 1567 |
+
"angle": 0,
|
| 1568 |
+
"content": "Factory. 2024. Factory bringing autonomy to software engineering. https://www.factory.ai."
|
| 1569 |
+
},
|
| 1570 |
+
{
|
| 1571 |
+
"type": "ref_text",
|
| 1572 |
+
"bbox": [
|
| 1573 |
+
0.511,
|
| 1574 |
+
0.832,
|
| 1575 |
+
0.885,
|
| 1576 |
+
0.858
|
| 1577 |
+
],
|
| 1578 |
+
"angle": 0,
|
| 1579 |
+
"content": "Honeycomb. 2024. Honeycomb. https://honeycomb.sh."
|
| 1580 |
+
},
|
| 1581 |
+
{
|
| 1582 |
+
"type": "ref_text",
|
| 1583 |
+
"bbox": [
|
| 1584 |
+
0.511,
|
| 1585 |
+
0.868,
|
| 1586 |
+
0.885,
|
| 1587 |
+
0.922
|
| 1588 |
+
],
|
| 1589 |
+
"angle": 0,
|
| 1590 |
+
"content": "Binyuan Hui, Jian Yang, Zeyu Cui, Jiaxi Yang, Dayiheng Liu, Lei Zhang, Tianyu Liu, Jiajun Zhang, Bowen Yu, Kai Dang, et al. 2024. Qwen2.5-coder technical report. arXiv preprint arXiv:2409.12186."
|
| 1591 |
+
},
|
| 1592 |
+
{
|
| 1593 |
+
"type": "list",
|
| 1594 |
+
"bbox": [
|
| 1595 |
+
0.511,
|
| 1596 |
+
0.086,
|
| 1597 |
+
0.885,
|
| 1598 |
+
0.922
|
| 1599 |
+
],
|
| 1600 |
+
"angle": 0,
|
| 1601 |
+
"content": null
|
| 1602 |
+
},
|
| 1603 |
+
{
|
| 1604 |
+
"type": "page_number",
|
| 1605 |
+
"bbox": [
|
| 1606 |
+
0.481,
|
| 1607 |
+
0.929,
|
| 1608 |
+
0.521,
|
| 1609 |
+
0.941
|
| 1610 |
+
],
|
| 1611 |
+
"angle": 0,
|
| 1612 |
+
"content": "7358"
|
| 1613 |
+
}
|
| 1614 |
+
],
|
| 1615 |
+
[
|
| 1616 |
+
{
|
| 1617 |
+
"type": "ref_text",
|
| 1618 |
+
"bbox": [
|
| 1619 |
+
0.117,
|
| 1620 |
+
0.086,
|
| 1621 |
+
0.49,
|
| 1622 |
+
0.179
|
| 1623 |
+
],
|
| 1624 |
+
"angle": 0,
|
| 1625 |
+
"content": "Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R. Narasimhan. 2024. Swe-bench: Can language models resolve real-world github issues? In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net."
|
| 1626 |
+
},
|
| 1627 |
+
{
|
| 1628 |
+
"type": "ref_text",
|
| 1629 |
+
"bbox": [
|
| 1630 |
+
0.117,
|
| 1631 |
+
0.187,
|
| 1632 |
+
0.49,
|
| 1633 |
+
0.292
|
| 1634 |
+
],
|
| 1635 |
+
"angle": 0,
|
| 1636 |
+
"content": "Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. 2023. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023."
|
| 1637 |
+
},
|
| 1638 |
+
{
|
| 1639 |
+
"type": "ref_text",
|
| 1640 |
+
"bbox": [
|
| 1641 |
+
0.117,
|
| 1642 |
+
0.302,
|
| 1643 |
+
0.489,
|
| 1644 |
+
0.368
|
| 1645 |
+
],
|
| 1646 |
+
"angle": 0,
|
| 1647 |
+
"content": "Wei Liu, Ailun Yu, Daoguang Zan, Bo Shen, Wei Zhang, Haiyan Zhao, Zhi Jin, and Qianxiang Wang. 2024. Graphcoder: Enhancing repository-level code completion via code context graph-based retrieval and language model. CoRR, abs/2406.07003."
|
| 1648 |
+
},
|
| 1649 |
+
{
|
| 1650 |
+
"type": "ref_text",
|
| 1651 |
+
"bbox": [
|
| 1652 |
+
0.117,
|
| 1653 |
+
0.377,
|
| 1654 |
+
0.49,
|
| 1655 |
+
0.482
|
| 1656 |
+
],
|
| 1657 |
+
"angle": 0,
|
| 1658 |
+
"content": "Niklas Muennighoff, Qian Liu, Armel Randy Zebaze, Qinkai Zheng, Binyuan Hui, Terry Yue Zhuo, Swayam Singh, Xiangru Tang, Leandro von Werra, and Shayne Longpre. 2024. Octopack: Instruction tuning code large language models. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net."
|
| 1659 |
+
},
|
| 1660 |
+
{
|
| 1661 |
+
"type": "ref_text",
|
| 1662 |
+
"bbox": [
|
| 1663 |
+
0.117,
|
| 1664 |
+
0.492,
|
| 1665 |
+
0.489,
|
| 1666 |
+
0.518
|
| 1667 |
+
],
|
| 1668 |
+
"angle": 0,
|
| 1669 |
+
"content": "OpenAI. 2024. Hello gpt-4o. https://openai.com/index/hello-gpt-4o."
|
| 1670 |
+
},
|
| 1671 |
+
{
|
| 1672 |
+
"type": "ref_text",
|
| 1673 |
+
"bbox": [
|
| 1674 |
+
0.117,
|
| 1675 |
+
0.527,
|
| 1676 |
+
0.49,
|
| 1677 |
+
0.633
|
| 1678 |
+
],
|
| 1679 |
+
"angle": 0,
|
| 1680 |
+
"content": "Gabriel Orlanski, Kefan Xiao, Xavier Garcia, Jeffrey Hui, Joshua Howland, Jonathan Malmaud, Jacob Austin, Rishabh Singh, and Michele Catasta. 2023. Measuring the impact of programming language distribution. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 26619-26645. PMLR."
|
| 1681 |
+
},
|
| 1682 |
+
{
|
| 1683 |
+
"type": "ref_text",
|
| 1684 |
+
"bbox": [
|
| 1685 |
+
0.117,
|
| 1686 |
+
0.642,
|
| 1687 |
+
0.49,
|
| 1688 |
+
0.747
|
| 1689 |
+
],
|
| 1690 |
+
"angle": 0,
|
| 1691 |
+
"content": "Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. 2024. Qwen2vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191."
|
| 1692 |
+
},
|
| 1693 |
+
{
|
| 1694 |
+
"type": "ref_text",
|
| 1695 |
+
"bbox": [
|
| 1696 |
+
0.117,
|
| 1697 |
+
0.756,
|
| 1698 |
+
0.49,
|
| 1699 |
+
0.809
|
| 1700 |
+
],
|
| 1701 |
+
"angle": 0,
|
| 1702 |
+
"content": "Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, and Lingming Zhang. 2024. Agentless: Demystifying llm-based software engineering agents. CoRR, abs/2407.01489."
|
| 1703 |
+
},
|
| 1704 |
+
{
|
| 1705 |
+
"type": "ref_text",
|
| 1706 |
+
"bbox": [
|
| 1707 |
+
0.117,
|
| 1708 |
+
0.818,
|
| 1709 |
+
0.49,
|
| 1710 |
+
0.884
|
| 1711 |
+
],
|
| 1712 |
+
"angle": 0,
|
| 1713 |
+
"content": "John Yang, Carlos E. Jimenez, Alexander Wettig, Killian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. 2024a. Swe-agent: Agent-computer interfaces enable automated software engineering. CoRR, abs/2405.15793."
|
| 1714 |
+
},
|
| 1715 |
+
{
|
| 1716 |
+
"type": "ref_text",
|
| 1717 |
+
"bbox": [
|
| 1718 |
+
0.117,
|
| 1719 |
+
0.894,
|
| 1720 |
+
0.49,
|
| 1721 |
+
0.921
|
| 1722 |
+
],
|
| 1723 |
+
"angle": 0,
|
| 1724 |
+
"content": "John Yang, Carlos E. Jimenez, Alex L. Zhang, Kiliarian Lieret, Joyce Yang, Xindi Wu, Ori Press,"
|
| 1725 |
+
},
|
| 1726 |
+
{
|
| 1727 |
+
"type": "list",
|
| 1728 |
+
"bbox": [
|
| 1729 |
+
0.117,
|
| 1730 |
+
0.086,
|
| 1731 |
+
0.49,
|
| 1732 |
+
0.921
|
| 1733 |
+
],
|
| 1734 |
+
"angle": 0,
|
| 1735 |
+
"content": null
|
| 1736 |
+
},
|
| 1737 |
+
{
|
| 1738 |
+
"type": "ref_text",
|
| 1739 |
+
"bbox": [
|
| 1740 |
+
0.529,
|
| 1741 |
+
0.086,
|
| 1742 |
+
0.885,
|
| 1743 |
+
0.151
|
| 1744 |
+
],
|
| 1745 |
+
"angle": 0,
|
| 1746 |
+
"content": "Niklas Muennighoff, Gabriel Synnaeve, Karthik R. Narasimhan, Diyi Yang, Sida I. Wang, and Ofir Press. 2024b. Swe-bench multimodal: Do AI systems generalize to visual software domains? CoRR, abs/2410.03859."
|
| 1747 |
+
},
|
| 1748 |
+
{
|
| 1749 |
+
"type": "ref_text",
|
| 1750 |
+
"bbox": [
|
| 1751 |
+
0.512,
|
| 1752 |
+
0.162,
|
| 1753 |
+
0.885,
|
| 1754 |
+
0.266
|
| 1755 |
+
],
|
| 1756 |
+
"angle": 0,
|
| 1757 |
+
"content": "Hao Yu, Bo Shen, Dezhi Ran, Jiaxin Zhang, Qi Zhang, Yuchi Ma, Guangtai Liang, Ying Li, Qianxiang Wang, and Tao Xie. 2024. Codereval: A benchmark of pragmatic code generation with generative pre-trained models. In Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, ICSE 2024, Lisbon, Portugal, April 14-20, 2024, pages 37:1-37:12. ACM."
|
| 1758 |
+
},
|
| 1759 |
+
{
|
| 1760 |
+
"type": "ref_text",
|
| 1761 |
+
"bbox": [
|
| 1762 |
+
0.512,
|
| 1763 |
+
0.277,
|
| 1764 |
+
0.885,
|
| 1765 |
+
0.382
|
| 1766 |
+
],
|
| 1767 |
+
"angle": 0,
|
| 1768 |
+
"content": "Daoguang Zan, Bei Chen, Fengji Zhang, Dianjie Lu, Bingchao Wu, Bei Guan, Yongji Wang, and JianGuang Lou. 2023. Large language models meet nl2code: A survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 7443-7464. Association for Computational Linguistics."
|
| 1769 |
+
},
|
| 1770 |
+
{
|
| 1771 |
+
"type": "ref_text",
|
| 1772 |
+
"bbox": [
|
| 1773 |
+
0.512,
|
| 1774 |
+
0.391,
|
| 1775 |
+
0.885,
|
| 1776 |
+
0.484
|
| 1777 |
+
],
|
| 1778 |
+
"angle": 0,
|
| 1779 |
+
"content": "Daoguang Zan, Zhirong Huang, Ailun Yu, Shaoxin Lin, Yifan Shi, Wei Liu, Dong Chen, Zongshuai Qi, Hao Yu, Lei Yu, Dezhi Ran, Muhan Zeng, Bo Shen, Pan Bian, Guangtai Liang, Bei Guan, Pengjie Huang, Tao Xie, Yongji Wang, and Qianxiang Wang. 2024. Swebench-java: A github issue resolving benchmark for java. CoRR, abs/2408.14354."
|
| 1780 |
+
},
|
| 1781 |
+
{
|
| 1782 |
+
"type": "ref_text",
|
| 1783 |
+
"bbox": [
|
| 1784 |
+
0.512,
|
| 1785 |
+
0.493,
|
| 1786 |
+
0.885,
|
| 1787 |
+
0.611
|
| 1788 |
+
],
|
| 1789 |
+
"angle": 0,
|
| 1790 |
+
"content": "Fengji Zhang, Bei Chen, Yue Zhang, Jacky Keung, Jin Liu, Daoguang Zan, Yi Mao, Jian-Guang Lou, and Weizhu Chen. 2023a. Repocoder: Repository-level code completion through iterative retrieval and generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 2471-2484. Association for Computational Linguistics."
|
| 1791 |
+
},
|
| 1792 |
+
{
|
| 1793 |
+
"type": "ref_text",
|
| 1794 |
+
"bbox": [
|
| 1795 |
+
0.512,
|
| 1796 |
+
0.621,
|
| 1797 |
+
0.885,
|
| 1798 |
+
0.712
|
| 1799 |
+
],
|
| 1800 |
+
"angle": 0,
|
| 1801 |
+
"content": "Yuntong Zhang, Haifeng Ruan, Zhiyu Fan, and Abhik Roychoudhury. 2024. Autocoderover: Autonomous program improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2024, Vienna, Austria, September 16-20, 2024, pages 1592-1604. ACM."
|
| 1802 |
+
},
|
| 1803 |
+
{
|
| 1804 |
+
"type": "ref_text",
|
| 1805 |
+
"bbox": [
|
| 1806 |
+
0.512,
|
| 1807 |
+
0.722,
|
| 1808 |
+
0.885,
|
| 1809 |
+
0.775
|
| 1810 |
+
],
|
| 1811 |
+
"angle": 0,
|
| 1812 |
+
"content": "Ziyin Zhang, Chaoyu Chen, Bingchang Liu, Cong Liao, Zi Gong, Hang Yu, Jianguo Li, and Rui Wang. 2023b. A survey on language models for code. CoRR, abs/2311.07989."
|
| 1813 |
+
},
|
| 1814 |
+
{
|
| 1815 |
+
"type": "ref_text",
|
| 1816 |
+
"bbox": [
|
| 1817 |
+
0.512,
|
| 1818 |
+
0.785,
|
| 1819 |
+
0.885,
|
| 1820 |
+
0.851
|
| 1821 |
+
],
|
| 1822 |
+
"angle": 0,
|
| 1823 |
+
"content": "Zibin Zheng, Kaiwen Ning, Yanlin Wang, Jingwen Zhang, Dewu Zheng, Mingxi Ye, and Jiachi Chen. 2023. A survey of large language models for code: Evolution, benchmarking, and future trends. CoRR, abs/2311.10372."
|
| 1824 |
+
},
|
| 1825 |
+
{
|
| 1826 |
+
"type": "list",
|
| 1827 |
+
"bbox": [
|
| 1828 |
+
0.512,
|
| 1829 |
+
0.086,
|
| 1830 |
+
0.885,
|
| 1831 |
+
0.851
|
| 1832 |
+
],
|
| 1833 |
+
"angle": 0,
|
| 1834 |
+
"content": null
|
| 1835 |
+
},
|
| 1836 |
+
{
|
| 1837 |
+
"type": "page_number",
|
| 1838 |
+
"bbox": [
|
| 1839 |
+
0.481,
|
| 1840 |
+
0.929,
|
| 1841 |
+
0.521,
|
| 1842 |
+
0.941
|
| 1843 |
+
],
|
| 1844 |
+
"angle": 0,
|
| 1845 |
+
"content": "7359"
|
| 1846 |
+
}
|
| 1847 |
+
],
|
| 1848 |
+
[
|
| 1849 |
+
{
|
| 1850 |
+
"type": "title",
|
| 1851 |
+
"bbox": [
|
| 1852 |
+
0.115,
|
| 1853 |
+
0.085,
|
| 1854 |
+
0.229,
|
| 1855 |
+
0.101
|
| 1856 |
+
],
|
| 1857 |
+
"angle": 0,
|
| 1858 |
+
"content": "A Prompts"
|
| 1859 |
+
},
|
| 1860 |
+
{
|
| 1861 |
+
"type": "text",
|
| 1862 |
+
"bbox": [
|
| 1863 |
+
0.114,
|
| 1864 |
+
0.114,
|
| 1865 |
+
0.489,
|
| 1866 |
+
0.162
|
| 1867 |
+
],
|
| 1868 |
+
"angle": 0,
|
| 1869 |
+
"content": "Figures 7-10 show the prompts we use for images. The prompts for videos are almost identical, with \"image\" replaced by \"video\" in the text."
|
| 1870 |
+
},
|
| 1871 |
+
{
|
| 1872 |
+
"type": "title",
|
| 1873 |
+
"bbox": [
|
| 1874 |
+
0.115,
|
| 1875 |
+
0.178,
|
| 1876 |
+
0.36,
|
| 1877 |
+
0.194
|
| 1878 |
+
],
|
| 1879 |
+
"angle": 0,
|
| 1880 |
+
"content": "A.1 Independent Description"
|
| 1881 |
+
},
|
| 1882 |
+
{
|
| 1883 |
+
"type": "text",
|
| 1884 |
+
"bbox": [
|
| 1885 |
+
0.114,
|
| 1886 |
+
0.202,
|
| 1887 |
+
0.487,
|
| 1888 |
+
0.25
|
| 1889 |
+
],
|
| 1890 |
+
"angle": 0,
|
| 1891 |
+
"content": "Figure 7 illustrates the prompt we use to generate independent descriptions, instructing the VLM to provide descriptions based on the image content."
|
| 1892 |
+
},
|
| 1893 |
+
{
|
| 1894 |
+
"type": "title",
|
| 1895 |
+
"bbox": [
|
| 1896 |
+
0.115,
|
| 1897 |
+
0.266,
|
| 1898 |
+
0.347,
|
| 1899 |
+
0.282
|
| 1900 |
+
],
|
| 1901 |
+
"angle": 0,
|
| 1902 |
+
"content": "A.2 Contextual Description"
|
| 1903 |
+
},
|
| 1904 |
+
{
|
| 1905 |
+
"type": "text",
|
| 1906 |
+
"bbox": [
|
| 1907 |
+
0.114,
|
| 1908 |
+
0.29,
|
| 1909 |
+
0.487,
|
| 1910 |
+
0.386
|
| 1911 |
+
],
|
| 1912 |
+
"angle": 0,
|
| 1913 |
+
"content": "Figure 8 and Figure 9 present the prompts used for generating contextual descriptions. The prompt in Figure 8 instructs the VLM to describe images based on the contextual information, while the prompt in Figure 9 guides the VLM to analyze the function of images."
|
| 1914 |
+
},
|
| 1915 |
+
{
|
| 1916 |
+
"type": "title",
|
| 1917 |
+
"bbox": [
|
| 1918 |
+
0.115,
|
| 1919 |
+
0.403,
|
| 1920 |
+
0.332,
|
| 1921 |
+
0.418
|
| 1922 |
+
],
|
| 1923 |
+
"angle": 0,
|
| 1924 |
+
"content": "A.3 Structured Summary"
|
| 1925 |
+
},
|
| 1926 |
+
{
|
| 1927 |
+
"type": "text",
|
| 1928 |
+
"bbox": [
|
| 1929 |
+
0.114,
|
| 1930 |
+
0.426,
|
| 1931 |
+
0.489,
|
| 1932 |
+
0.489
|
| 1933 |
+
],
|
| 1934 |
+
"angle": 0,
|
| 1935 |
+
"content": "Figure 10 illustrates the prompt designed for generating a structured summary. It instructs the VLM to produce a summary of the issue based on a referenced format."
|
| 1936 |
+
},
|
| 1937 |
+
{
|
| 1938 |
+
"type": "title",
|
| 1939 |
+
"bbox": [
|
| 1940 |
+
0.115,
|
| 1941 |
+
0.507,
|
| 1942 |
+
0.23,
|
| 1943 |
+
0.524
|
| 1944 |
+
],
|
| 1945 |
+
"angle": 0,
|
| 1946 |
+
"content": "B Example"
|
| 1947 |
+
},
|
| 1948 |
+
{
|
| 1949 |
+
"type": "text",
|
| 1950 |
+
"bbox": [
|
| 1951 |
+
0.114,
|
| 1952 |
+
0.537,
|
| 1953 |
+
0.489,
|
| 1954 |
+
0.633
|
| 1955 |
+
],
|
| 1956 |
+
"angle": 0,
|
| 1957 |
+
"content": "Figure 11 presents an example where visual data is processed by the VLM, and the resulting information is appended to the original issue. Note that textual data, such as code snippets and metadata (e.g., library versions, environment details, etc.), are handled in the same way as regular text."
|
| 1958 |
+
},
|
| 1959 |
+
{
|
| 1960 |
+
"type": "title",
|
| 1961 |
+
"bbox": [
|
| 1962 |
+
0.115,
|
| 1963 |
+
0.65,
|
| 1964 |
+
0.394,
|
| 1965 |
+
0.665
|
| 1966 |
+
],
|
| 1967 |
+
"angle": 0,
|
| 1968 |
+
"content": "C Human Verification Process"
|
| 1969 |
+
},
|
| 1970 |
+
{
|
| 1971 |
+
"type": "text",
|
| 1972 |
+
"bbox": [
|
| 1973 |
+
0.113,
|
| 1974 |
+
0.679,
|
| 1975 |
+
0.489,
|
| 1976 |
+
0.791
|
| 1977 |
+
],
|
| 1978 |
+
"angle": 0,
|
| 1979 |
+
"content": "Three annotators, each with at least four years of experience using Python, participate in the human verification process. Each annotator independently evaluates all 159 instances based on the three criteria outlined in Section 3.1, assigning a \"yes\" or \"no\" label to each criterion. Final labels for each instance are determined by majority vote."
|
| 1980 |
+
},
|
| 1981 |
+
{
|
| 1982 |
+
"type": "text",
|
| 1983 |
+
"bbox": [
|
| 1984 |
+
0.113,
|
| 1985 |
+
0.794,
|
| 1986 |
+
0.489,
|
| 1987 |
+
0.922
|
| 1988 |
+
],
|
| 1989 |
+
"angle": 0,
|
| 1990 |
+
"content": "We retain only those instances where the first criterion is labeled \"no\" (i.e., the visual data cannot be fully converted to text), and both the second and third criteria are labeled \"yes\" (i.e., the visual data is essential for resolution, and the problem description contains sufficient information). This filtering results in a final curated set of 133 high-quality task instances."
|
| 1991 |
+
},
|
| 1992 |
+
{
|
| 1993 |
+
"type": "title",
|
| 1994 |
+
"bbox": [
|
| 1995 |
+
0.51,
|
| 1996 |
+
0.084,
|
| 1997 |
+
0.788,
|
| 1998 |
+
0.101
|
| 1999 |
+
],
|
| 2000 |
+
"angle": 0,
|
| 2001 |
+
"content": "D Other Experimental Details"
|
| 2002 |
+
},
|
| 2003 |
+
{
|
| 2004 |
+
"type": "text",
|
| 2005 |
+
"bbox": [
|
| 2006 |
+
0.508,
|
| 2007 |
+
0.109,
|
| 2008 |
+
0.884,
|
| 2009 |
+
0.287
|
| 2010 |
+
],
|
| 2011 |
+
"angle": 0,
|
| 2012 |
+
"content": "For models like Qwen2-VL and Qwen2.5-Coder-32B, we use vLLM for deployment on servers equipped with four NVIDIA H800 GPUs (each with 80GB of memory). For the DeepSeek-V2.5 model, we utilize the official API service provided by its developers. All experiments are conducted twice to determine the maximum number of instances that can be resolved. When using the Agentless approach, we employ version 1.0. Table 4 summarizes the hyperparameter details used in our experiments."
|
| 2013 |
+
},
|
| 2014 |
+
{
|
| 2015 |
+
"type": "table",
|
| 2016 |
+
"bbox": [
|
| 2017 |
+
0.512,
|
| 2018 |
+
0.298,
|
| 2019 |
+
0.88,
|
| 2020 |
+
0.676
|
| 2021 |
+
],
|
| 2022 |
+
"angle": 0,
|
| 2023 |
+
"content": "<table><tr><td>Phase</td><td>Component</td><td>Details</td></tr><tr><td rowspan=\"3\">Data Processing</td><td>Independent Description</td><td>temperature = 0.2</td></tr><tr><td>Contextual Description</td><td>temperature = 0.3</td></tr><tr><td>Structured Summary</td><td>temperature = 1.0</td></tr><tr><td rowspan=\"2\">Agentless 1.0</td><td>Localization Phase</td><td>temperature = 0.8. For each instance, 4 sets of locations are sampled, each with a max length of 3, and the sets are merged into 2 groups (first 2 and last 2).</td></tr><tr><td>Repair Phase</td><td>Uses a context window of ±10 lines around each edit location. For each group, 21 patches are generated (1 greedy with temperature = 0, and 20 samples with temperature = 0.8).</td></tr></table>"
|
| 2024 |
+
},
|
| 2025 |
+
{
|
| 2026 |
+
"type": "table_caption",
|
| 2027 |
+
"bbox": [
|
| 2028 |
+
0.509,
|
| 2029 |
+
0.687,
|
| 2030 |
+
0.881,
|
| 2031 |
+
0.715
|
| 2032 |
+
],
|
| 2033 |
+
"angle": 0,
|
| 2034 |
+
"content": "Table 4: Hyperparameter settings for each phase and component of our experiments."
|
| 2035 |
+
},
|
| 2036 |
+
{
|
| 2037 |
+
"type": "table",
|
| 2038 |
+
"bbox": [
|
| 2039 |
+
0.512,
|
| 2040 |
+
0.742,
|
| 2041 |
+
0.88,
|
| 2042 |
+
0.846
|
| 2043 |
+
],
|
| 2044 |
+
"angle": 0,
|
| 2045 |
+
"content": "<table><tr><td>You are a technical image descriptor. For the given image:\n1. If it contains only text, present the exact text in markdown format\n2. If it contains visual elements:\n- Describe the main technical content\n- Include specific measurements, numbers, and text\n- State the relationships between visual elements\n- Focus on technical details over visual style\nYour description should be detailed enough for an AI model to understand the technical content without seeing the image.</td></tr></table>"
|
| 2046 |
+
},
|
| 2047 |
+
{
|
| 2048 |
+
"type": "table_caption",
|
| 2049 |
+
"bbox": [
|
| 2050 |
+
0.509,
|
| 2051 |
+
0.856,
|
| 2052 |
+
0.884,
|
| 2053 |
+
0.885
|
| 2054 |
+
],
|
| 2055 |
+
"angle": 0,
|
| 2056 |
+
"content": "Figure 7: Prompt for generating independent descriptions of images."
|
| 2057 |
+
},
|
| 2058 |
+
{
|
| 2059 |
+
"type": "page_number",
|
| 2060 |
+
"bbox": [
|
| 2061 |
+
0.481,
|
| 2062 |
+
0.928,
|
| 2063 |
+
0.521,
|
| 2064 |
+
0.941
|
| 2065 |
+
],
|
| 2066 |
+
"angle": 0,
|
| 2067 |
+
"content": "7360"
|
| 2068 |
+
}
|
| 2069 |
+
],
|
| 2070 |
+
[
|
| 2071 |
+
{
|
| 2072 |
+
"type": "code",
|
| 2073 |
+
"bbox": [
|
| 2074 |
+
0.118,
|
| 2075 |
+
0.105,
|
| 2076 |
+
0.48,
|
| 2077 |
+
0.395
|
| 2078 |
+
],
|
| 2079 |
+
"angle": 0,
|
| 2080 |
+
"content": "You are a technical image descriptor for software issues. Your task is to create detailed descriptions of ALL images in the issue that will help other AI models understand the issue without seeing the actual images. For EACH image in the issue: 1. Read and understand the entire issue context including: - Bug description - Code samples - Error messages - Expected behavior - Actual results 2. Create a comprehensive description that: - Details exactly what is shown in the image - Connects the image content to the issue context - Includes any visible technical information that's crucial for understanding the issue - Provides enough detail that an AI model could understand the issue's visual aspects without seeing the image Please provide your descriptions in this specific JSON format: { \"images\": [ { \"image_id\": \"<sequential number>\", \"description\": \"<detailed technical description that fully captures the image content and its relationship to the issue>\" } ] } CRITICAL: Ensure you describe EVERY image present in the issue - missing any image would make the issue harder to understand for AI models that cannot see the images."
|
| 2081 |
+
},
|
| 2082 |
+
{
|
| 2083 |
+
"type": "image_caption",
|
| 2084 |
+
"bbox": [
|
| 2085 |
+
0.115,
|
| 2086 |
+
0.414,
|
| 2087 |
+
0.486,
|
| 2088 |
+
0.441
|
| 2089 |
+
],
|
| 2090 |
+
"angle": 0,
|
| 2091 |
+
"content": "Figure 8: Prompt for generating descriptions of images based on the contextual information."
|
| 2092 |
+
},
|
| 2093 |
+
{
|
| 2094 |
+
"type": "code",
|
| 2095 |
+
"bbox": [
|
| 2096 |
+
0.118,
|
| 2097 |
+
0.489,
|
| 2098 |
+
0.481,
|
| 2099 |
+
0.856
|
| 2100 |
+
],
|
| 2101 |
+
"angle": 0,
|
| 2102 |
+
"content": "You are a specialized technical image analyst for software issues. Your task is to analyze \nhow each image connects to and supports the reported issue. Focus on providing a \ncomprehensive analysis that explains the image's role and value in the issue context. \nFor each image, analyze: \n1. Direct Issue Connection - How does this image specifically demonstrate or relate to the reported issue? - What aspects of the issue does this image capture or verify? - Why was including this image necessary for documenting this issue? \n2. Technical Value - What key technical details does this image reveal about the issue? - How do specific elements in the image help understand the problem? - What insights does this image provide for troubleshooting or resolution? \n3. Documentation Importance - What unique information does this image convey that text alone couldn't? - How does this image strengthen the overall issue documentation? - What critical details should developers focus on when reviewing this image? \nProvide your analysis in this JSON format: { \"images\": [ { \"image_id\": \"<sequential number>\",\"analysis\": \"<comprehensive analysis covering the image's connection to the issue, its technical value, and documentation importance. Focus on explaining why this image matters for understanding and resolving the specific issue at hand. Include relevant technical details and their significance to the issue context.\" } 1 Key Guidelines: - Create a narrative that clearly connects the image to the issue context - Focus on why this image is necessary for understanding the specific issue - Include relevant technical details and their significance - Explain how the image contributes to issue documentation and resolution - Be thorough but concise in your analysis"
|
| 2103 |
+
},
|
| 2104 |
+
{
|
| 2105 |
+
"type": "image_caption",
|
| 2106 |
+
"bbox": [
|
| 2107 |
+
0.114,
|
| 2108 |
+
0.871,
|
| 2109 |
+
0.486,
|
| 2110 |
+
0.9
|
| 2111 |
+
],
|
| 2112 |
+
"angle": 0,
|
| 2113 |
+
"content": "Figure 9: Prompt for analyzing the function of images within the given issue."
|
| 2114 |
+
},
|
| 2115 |
+
{
|
| 2116 |
+
"type": "code",
|
| 2117 |
+
"bbox": [
|
| 2118 |
+
0.513,
|
| 2119 |
+
0.087,
|
| 2120 |
+
0.876,
|
| 2121 |
+
0.351
|
| 2122 |
+
],
|
| 2123 |
+
"angle": 0,
|
| 2124 |
+
"content": "You are an issue organizer and analyzer. The user will provide you with an issue that includes text descriptions and images. Your task is to analyze this information thoroughly and output a structured summary of the issue in JSON format. \nThe output should include relevant elements as applicable, but you are not required to fill in every field if the information is not available or cannot be accurately summarized. Aim to include: \n```\n```\n{\n \"problemSummary\": \"<a concise summary of the problem>\";\n \"context\": \"<any relevant background information>\";\n \"stepsToReproduce\": [\n \"<step 1: describe the action taken>\";\n \"<step 2: describe the next action>\";\n \"...<more steps as necessary>\";\n ],\n \"expectedResults\": \"<what the user expected to happen>\";\n \"actualResults\": \"<what actually happened>\";\n \"supplementaryImages\": [\n \"<descriptions of the images provided>\";\n ],\n \"additionalNotes\": \"<any other relevant information or notes>\";\n} \nFeel free to omit any fields that are not applicable or where information is uncertain, while ensuring the output remains clear and informative to assist other models in understanding and resolving the issue effectively."
|
| 2125 |
+
},
|
| 2126 |
+
{
|
| 2127 |
+
"type": "image_caption",
|
| 2128 |
+
"bbox": [
|
| 2129 |
+
0.51,
|
| 2130 |
+
0.37,
|
| 2131 |
+
0.882,
|
| 2132 |
+
0.386
|
| 2133 |
+
],
|
| 2134 |
+
"angle": 0,
|
| 2135 |
+
"content": "Figure 10: Prompt for generating a structured summary."
|
| 2136 |
+
},
|
| 2137 |
+
{
|
| 2138 |
+
"type": "code",
|
| 2139 |
+
"bbox": [
|
| 2140 |
+
0.513,
|
| 2141 |
+
0.398,
|
| 2142 |
+
0.879,
|
| 2143 |
+
0.876
|
| 2144 |
+
],
|
| 2145 |
+
"angle": 0,
|
| 2146 |
+
"content": "PX facet labels don't respect labels kwang Issue \n``python \npx.scatter tips, \\(x =\\) \"total_bill\", \\(y =\\) \"tip,\"facet_row \\(\\equiv\\) \"time\",facet_col \\(\\equiv\\) \"day\", labels \\(\\coloneqq\\) (\"time\":\"THE TIME\",\"day\":\"THE DAY\")) \nReported in https://github.com/plotly/plotlyexpress/pull/164 \nPX facet labels don't respect labels kwang New Issue \n``python \npx.scatter tips, \\(x =\\) \"total_bill\", \\(y =\\) \"tip,\"facet_row \\(\\equiv\\) \"time\",facet_col \\(\\equiv\\) \"day\", labels \\(\\coloneqq\\) (\"time\":\"THE TIME\",\"day\":\"THE DAY\")) \nThis image is part of the problem description. Here is the relevant information: \n**Image Details:** \n- - **Image ID**: 1 \n- - **Raw Description**: The image consists of four scatter plots, each representing the relationship between the total bill and the tip amount for different days and times. The plots are arranged in... \n- - **Contextual Description**: The image is a scatter plot with multiple facets, showing the relationship between 'total_bill' and 'tip' across different days and times. The x-axis is labeled 'total_bill' and ranges from 8 to 16... \n- - **Analysis**: This image demonstrates a reported issue with the Plotly Express library where facet labels do not respect the labels keyword argument. The scatter plot is intended to show the relationship between 'total_bill' and 'tip' for different days and times, with facet labels set to 'THE TIME' and 'THE DAY'.... \nReported in https://github.com/plotly/plotly express/pull/164 \n### Issue Summary (Structured) \n- - **problemSummary**: Facet labels in a scatter plot do not respect the labels keyword argument. \n- - **context**: The issue was reported in a GitHub pull request. \n- - **stepsToReproduce**: ['Create a scatter plot using Plotly Express', 'Use the 'facet_row' and 'facet_col' parameters to create facets.', 'Use the 'labels' parameter to specify custom labels for the facets.'] \n- - **expectedResults**: The facet labels should reflect the custom labels provided in the 'labels' parameter. \n- - **actualResults**: The facet labels do not change and display the default labels. \n- - **supplementaryimages**: [A scatter plot with facets showing the default labels instead of the custom labels.] \n- - **additionalNotes**: The issue was reported in a GitHub pull request, indicating it is a known bug."
|
| 2147 |
+
},
|
| 2148 |
+
{
|
| 2149 |
+
"type": "image_caption",
|
| 2150 |
+
"bbox": [
|
| 2151 |
+
0.509,
|
| 2152 |
+
0.887,
|
| 2153 |
+
0.882,
|
| 2154 |
+
0.915
|
| 2155 |
+
],
|
| 2156 |
+
"angle": 0,
|
| 2157 |
+
"content": "Figure 11: An example of a processed visual issue. The issue from Plotly issue #1944."
|
| 2158 |
+
},
|
| 2159 |
+
{
|
| 2160 |
+
"type": "page_number",
|
| 2161 |
+
"bbox": [
|
| 2162 |
+
0.481,
|
| 2163 |
+
0.929,
|
| 2164 |
+
0.519,
|
| 2165 |
+
0.941
|
| 2166 |
+
],
|
| 2167 |
+
"angle": 0,
|
| 2168 |
+
"content": "7361"
|
| 2169 |
+
}
|
| 2170 |
+
]
|
| 2171 |
+
]
|
2025/CodeV_ Issue Resolving with Visual Data/7f6c3ec1-9cd2-4428-a242-409b35b428e7_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9b9f598ad5c0f088b2c57adb3191c3daa26b44753d0c0d2add8f1c8e08bf8e7
|
| 3 |
+
size 4831841
|
2025/CodeV_ Issue Resolving with Visual Data/full.md
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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hang $^{1}$ Daoguang Zan $^{2*}$ Quanshun Yang $^{1}$ Zhirong Huang $^{2}$ Dong Chen $^{3}$ Bo Shen $^{3}$ Tianyu Liu $^{4}$ Yongshun Gong $^{1}$ Pengjie Huang $^{5}$ Xudong Lu $^{1*}$ Guangtai Liang $^{3}$ Lizhen Cui $^{1}$ Qianxiang Wang $^{3}$ Shandong University Chinese Academy of Sciences Huawei Co., Ltd Peking University Lingzhi-zhiguang Co., Ltd linhaoz@mail.sdu.edu.cn daoguang@iscas.ac.cn dongxul@sdu.edu.cn
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Large Language Models (LLMs) have advanced rapidly in recent years, with their applications in software engineering expanding to more complex repository-level tasks. GitHub issue resolving is a key challenge among these tasks. While recent approaches have made progress on this task, they focus on textual data within issues, neglecting visual data. However, this visual data is crucial for resolving issues as it conveys additional knowledge that text alone cannot. We propose CODEV, the first approach to leveraging visual data to enhance the issue-resolving capabilities of LLMs. CODEV resolves each issue by following a two-phase process: data processing and patch generation. To evaluate CODEV, we construct a benchmark for visual issue resolving, namely Visual SWEBench. Through extensive experiments, we demonstrate the effectiveness of CODEV, as well as provide valuable insights into leveraging visual data to resolve GitHub issues<sup>1</sup>.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Large Language Models (LLMs) have advanced rapidly in recent years, with their applications in the field of software engineering becoming increasingly widespread (Zan et al., 2023; Zheng et al., 2023; Zhang et al., 2023b; Chen et al., 2024b). Currently, LLMs' applications in software engineering have gradually expanded tasks at the code line and function level to more challenging repository-level tasks (Zhang et al., 2023a; Liu et al., 2024). Within repository-level tasks, GitHub issue resolving is a key challenge, where LLMs are tasked to resolve the issue based on the issue description and the defective codebase. (Jimenez et al., 2024; Xia et al., 2024). This task can accelerate program repair and is crucial for improving development efficiency.
|
| 12 |
+
|
| 13 |
+
Although recent approaches have made progress on this task, they focus exclusively on textual data
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: An example of a visual GitHub issue from Plotly issue #1944. The visual data illustrates that the label parameters ("time" and "day") do not take effect.
|
| 17 |
+
|
| 18 |
+
in GitHub issues, neglecting visual data such as screenshots, diagrams, and videos (Chen et al., 2024a; Yang et al., 2024a; Zhang et al., 2024; Xia et al., 2024). However, this visual data is crucial for resolving issues, as it conveys additional knowledge that text alone cannot, including actual results, expected results, and error messages. Figure 1 shows a specific example where visual data illustrates the running result. Moreover, we statistically analyze SWE-bench (Jimenez et al., 2024), the most popular benchmark for issue resolving. The result shows that over $5\%$ of GitHub issues contain visual data, with even higher percentages in visualization libraries like seaborn² and matplotlib³, where they reach $45.5\%$ and $27.2\%$ respectively. This analysis further highlights the importance of resolving visual GitHub issues. However, existing approaches struggle to resolve them effectively, as they overlook visual data, which calls for new solutions that leverage visual data.
|
| 19 |
+
|
| 20 |
+
An intuitive approach is to extract visual data from the issue and include it as part of the prompt. While this approach seems to leverage visual data, it requires models with advanced multimodal and
|
| 21 |
+
|
| 22 |
+
coding capabilities. Currently, only the latest commercial models, GPT-4o (OpenAI, 2024) and Claude 3.5 Sonnet (Anthropic, 2024), barely meet these requirements, but their capabilities remain highly limited. Moreover, these models are less suitable for issue resolving due to high computational costs. Based on our analysis, using these models within the popular SWE-agent approach (Yang et al., 2024a) to run through all issues in SWE-bench once is estimated to cost an average of over $4,700 (Xia et al., 2024), which imposes a significant financial burden on researchers. To address this, we propose CODEV, the first approach that leverages visual data to enhance the issue-resolving capabilities of LLMs at low cost. To resolve each issue, CODEV follows a two-phase process: data processing and patch generation. In the data processing phase, CODEV processes the visual data within the issue from both local and holistic perspectives. This phase produces fine-grained descriptions of the visual data and a structured summary of the entire issue. In the patch generation phase, CODEV leverages the processed information to assist LLMs in generating a patch to resolve the issue.
|
| 23 |
+
|
| 24 |
+
To evaluate our approach, we construct a benchmark specifically designed for evaluating visual GitHub issue resolving, called Visual SWE-bench. The benchmark comprises 133 task instances spanning 11 open-source GitHub repositories, each of which has undergone rigorous selection. Finally, we conduct a series of experiments to validate the effectiveness of our approach. Experimental results demonstrate that CODEV achieves a round $63.13\%$ relative improvement in the percentage of resolved instances on Visual SWE-bench compared to Agentless. Additionally, through case studies, we analyze the role of each component of CODEV, providing insights into leveraging visual data to resolve issues. Overall, the contributions of this paper are as follows:
|
| 25 |
+
|
| 26 |
+
- We propose CODEV, a simple yet novel approach that leverages visual data to enhance the issue-resolving capabilities of LLMs.
|
| 27 |
+
- We construct a benchmark designed to evaluate the performance of LLMs in resolving visual GitHub issues, namely Visual SWEBench. The benchmark comprises 133 realistic software engineering tasks sourced from 11 open-source GitHub repositories.
|
| 28 |
+
- We validate the effectiveness of our approach
|
| 29 |
+
|
| 30 |
+
through a series of experiments and conduct in-depth analysis and summarization of the experimental results.
|
| 31 |
+
|
| 32 |
+
# 2 Approach
|
| 33 |
+
|
| 34 |
+
Figure 2 illustrates an overview of CODEV, which consists of two phases: data processing and patch generation. The first phase processes visual data and the second phase uses the processed information to assist LLMs in generating a patch. Below is a detailed description of each phase.
|
| 35 |
+
|
| 36 |
+
# 2.1 Data Processing
|
| 37 |
+
|
| 38 |
+
To process the issue's visual data, we adopt two components: fine-grained description and structured summarization. For fine-grained description, the Vision-Language Model (VLM) first generates an independent description for each piece of visual data based on its content. It then provides a contextual description that relates this data to the issue, resulting in a fine-grained description. In structured summarization, the VLM produces a summary that breaks down the complex issue into several clear sections. Below, we detail the implementation of each component.
|
| 39 |
+
|
| 40 |
+
# 2.1.1 Fine-Grained Description
|
| 41 |
+
|
| 42 |
+
We design the fine-grained description component to generate textual representations of the visual data. This component draws inspiration from how humans process visual data. When encountering visual data in an issue, humans first identify its raw features and then analyze its function in the context of the problem. Inspired by this, we design a two-step process to generate fine-grained descriptions.
|
| 43 |
+
|
| 44 |
+
Step 1: Independent Description. In the first step, we instruct the VLM to describe each piece of visual data based solely on its content. For visual data consisting purely of text, such as a screenshot of error logs, the VLM extracts the text and outputs it in Markdown format. For other types of visual data, like images or videos with non-textual content, the VLM generates a detailed description capturing all details.
|
| 45 |
+
|
| 46 |
+
Step 2: Contextual Description. In the second step, the VLM is prompted with the complete problem statement to establish the context. Subsequently, it is tasked with providing a comprehensive description and analysis of the visual data based on this contextual understanding. During this step, the VLM tightly connects the visual data with the problem's context to analyze its function.
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
Figure 2: Overview of CODEV.
|
| 50 |
+
|
| 51 |
+
Through these two steps, we obtain fine-grained descriptions of all visual data in the issue. These descriptions capture not only the intrinsic features of the visual data but also its critical function in the problem's context.
|
| 52 |
+
|
| 53 |
+
# 2.1.2 Structured Summarization
|
| 54 |
+
|
| 55 |
+
Some GitHub issues are described in a structured format, including reproduction steps, expected results, actual results, and so on. This format enhances clarity and makes the key aspects of issues easier to understand. Inspired by this, we propose generating a structured summary to enrich issues and reduce the difficulty of understanding them.
|
| 56 |
+
|
| 57 |
+
In the structured summarization component, the VLM is prompted with the complete problem statement, including the visual data. It is then tasked with understanding and analyzing the issue to generate a structured summary. To guide this process, we supply the VLM with a template that consists of the following fields: a brief problem summary, background information, reproduction steps, expected results, actual results, descriptions of visual data, and additional notes. However, not all issues may fit perfectly with this template. Therefore, we allow the VLM to skip irrelevant or unclear fields. Additionally, the summary can also include new fields if needed, as long as it remains clear and useful for resolving the issue.
|
| 58 |
+
|
| 59 |
+
Unlike fine-grained description, which focuses on generating representations of visual data, structured summarization aims to provide an overview of the entire issue. It not only covers visual data but also gives a deeper understanding of the problem.
|
| 60 |
+
|
| 61 |
+
These two components complement each other: fine-grained description captures the detailed features of local visual data, while structured summarization synthesizes global information. Through these components, we ensure that visual data is processed effectively to support LLMs in understanding and resolving the issue. Prompts related to these components are listed in Appendix A.
|
| 62 |
+
|
| 63 |
+
# 2.2 Patch Generation
|
| 64 |
+
|
| 65 |
+
After generating fine-grained descriptions and a structured summary in the data processing phase, the patch generation phase leverages this information to generate a patch. To support LLMs in efficiently utilizing this information, we splice them into the original issue. Specifically, the visual data is converted into fine-grained descriptions, and the issue is enriched with a structured summary, with an example provided in Appendix B.
|
| 66 |
+
|
| 67 |
+
To enhance the ability of LLMs to resolve textual issues, various approaches have been proposed. These approaches take different forms: some are agent-based, equipping LLMs with a set of tools that allow the agent to autonomously perform actions (Chen et al., 2024a; Yang et al., 2024a; Zhang et al., 2024); others are agentless (Xia et al., 2024). Regardless of their form, they typically input the issue and codebase, with the output being a generated patch. CODEV combines these approaches through a unified interface, automating patch generation. At this point, the newly generated issue and its corresponding codebase are fed into the textual issue-resolving approach, where LLMs follow predefined instructions to generate a patch.
|
| 68 |
+
|
| 69 |
+
# 3 Visual SWE-bench Benchmark
|
| 70 |
+
|
| 71 |
+
In current benchmarks for the issue-resolving task, only the recently released SWE-bench Multimodal (Yang et al., 2024b) focuses on visual issues. However, as of writing, SWE-bench Multimodal<sup>4</sup> lacks evaluation fields, and its evaluation script has not been made public, making it unsuitable for evaluation. To evaluate CodeV, we construct a benchmark for resolving visual GitHub issues, namely Visual SWE-bench. Below, we detail our benchmark construction process and its key features.
|
| 72 |
+
|
| 73 |
+
# 3.1 Construction
|
| 74 |
+
|
| 75 |
+
From the 2,294 instances in SWE-bench, we identify 128 task instances whose problem statement contains visual data. These visual data are presented through hyperlinks, with images embedded using HTML or Markdown syntax and videos provided as plain text hyperlinks. Building on these identified task instances, we adopt a four-stage construction process to further expand the tasks and conduct rigorous verification on all instances.
|
| 76 |
+
|
| 77 |
+
# 1. Repositories selection and pull requests
|
| 78 |
+
|
| 79 |
+
Collection. We analyze the 128 task instances from SWE-bench, and the results show that most of them originate from visualization libraries. To expand our benchmark, we select three additional popular open-source visualization libraries (plotly.py, networkx, and al-tair) and crawl all their pull requests (PRs) from GitHub. Since SWE-bench only includes PRs created before August 2023, we select repositories with at least 10 visual task instances from SWE-bench (matplotlib, sympy, sphinx, and seaborn) and collect recent PRs from these repositories. These two rounds of collection yield approximately 10,000 PRs.
|
| 80 |
+
|
| 81 |
+
# 2. Candidate instance construction. Candidate instances are constructed from the collected PRs through the following steps:
|
| 82 |
+
|
| 83 |
+
(1) We select only merged PRs that resolve at least one issue and include modifications to test files.
|
| 84 |
+
(2) For each PR, we extract the text of all resolved issues, retaining only those PRs where the issue text contained hyperlinks to images or videos.
|
| 85 |
+
|
| 86 |
+
(3) For qualifying PRs, we gather detailed information, including "instance ID", "patch", "test patch", and so on.
|
| 87 |
+
|
| 88 |
+
This process results in 38 candidate instances from approximately 10,000 PRs.
|
| 89 |
+
|
| 90 |
+
3. Execution verification. For each candidate instance, we meticulously set up the runtime environment and testing commands, removing any instances that failed due to installation or runtime errors. Next, we apply the test patch to each instance and record the test results both before and after applying the gold patch. Instances without any tests where the status changes from fail to pass are excluded. This process leaves 31 viable candidate instances.
|
| 91 |
+
4. Human verification. We conduct human verification on 159 instances, comprising 128 task instances from SWE-bench and 31 candidate instances filtered through the previous stages. Each instance is evaluated based on the following criteria:
|
| 92 |
+
|
| 93 |
+
(1) Whether the visual data can be fully converted to text.
|
| 94 |
+
(2) Whether the visual data is essential for resolving the instance.
|
| 95 |
+
(3) Whether the problem description contains sufficient information for effective resolution.
|
| 96 |
+
|
| 97 |
+
Using these criteria, we exclude 4 instances where visual data can be fully converted to text via Optical Character Recognition (OCR) and 4 instances where visual data is not essential for resolution. Additionally, based on the content of their test cases, we exclude 18 instances that cannot be resolved due to insufficient problem descriptions. This process results in a curated, high-quality benchmark of 133 task instances. Additional human verification details are provided in Appendix C.
|
| 98 |
+
|
| 99 |
+
# 3.2 Features
|
| 100 |
+
|
| 101 |
+
As shown in Figure 3, Visual SWE-bench comprises 133 visual task instances sourced from 11 open-source GitHub repositories. These instances cover a wide range of functionalities, including but not limited to data visualization, machine learning, and document generation. This diverse set of tasks provides a comprehensive benchmark for evaluating the performance of LLMs in resolving visual issues automatically.
|
| 102 |
+
|
| 103 |
+
<table><tr><td rowspan="2">Repository</td><td colspan="2">CodeBase</td><td>Issue Text</td><td colspan="3">Gold Patch</td><td>Tests</td><td colspan="2">Images</td></tr><tr><td># Files</td><td># Lines</td><td># Length</td><td># Lines</td><td># Files</td><td># Func.</td><td># Lines</td><td># File Size</td><td># Resolution</td></tr><tr><td>altair</td><td>499</td><td>90K</td><td>98.5</td><td>27</td><td>2.5</td><td>3</td><td>15</td><td>24.12</td><td>99K</td></tr><tr><td>astropy</td><td>1578</td><td>445K</td><td>1352.5</td><td>10</td><td>1</td><td>2</td><td>69</td><td>19.76</td><td>170K</td></tr><tr><td>matplotlib</td><td>2388</td><td>592K</td><td>175</td><td>9</td><td>1</td><td>2</td><td>89.5</td><td>23.58</td><td>307K</td></tr><tr><td>networkx</td><td>849</td><td>108K</td><td>155</td><td>23</td><td>1</td><td>1</td><td>26</td><td>21.38</td><td>307K</td></tr><tr><td>plotly.py</td><td>14302</td><td>587K</td><td>44</td><td>15</td><td>2</td><td>1</td><td>11.5</td><td>23.58</td><td>307K</td></tr><tr><td>pylint</td><td>2712</td><td>92K</td><td>100</td><td>126</td><td>4</td><td>9</td><td>10</td><td>23.46</td><td>307K</td></tr><tr><td>scikit-learn</td><td>1343</td><td>277K</td><td>641</td><td>22</td><td>1</td><td>2</td><td>12</td><td>23.58</td><td>307K</td></tr><tr><td>seaborn</td><td>295</td><td>70K</td><td>143.5</td><td>13.5</td><td>2</td><td>3</td><td>109.5</td><td>23.1</td><td>307K</td></tr><tr><td>sphinx</td><td>1436</td><td>308K</td><td>157</td><td>8</td><td>1</td><td>2</td><td>35</td><td>27.08</td><td>286K</td></tr><tr><td>sympy</td><td>1907</td><td>477K</td><td>125</td><td>21</td><td>1</td><td>2</td><td>36</td><td>24.26</td><td>275K</td></tr><tr><td>xarray</td><td>320</td><td>123K</td><td>220.5</td><td>5</td><td>1</td><td>2</td><td>229.5</td><td>25.08</td><td>275K</td></tr><tr><td>mean</td><td>2512</td><td>288K</td><td>292</td><td>25.40</td><td>1.59</td><td>2.63</td><td>58.45</td><td>23.54</td><td>268K</td></tr><tr><td>max</td><td>14302</td><td>592K</td><td>1352.5</td><td>126</td><td>4</td><td>9</td><td>229.5</td><td>27.08</td><td>307K</td></tr></table>
|
| 104 |
+
|
| 105 |
+
Table 1: Summary statistics for Visual SWE-bench. The term "CodeBase # Files and # Lines" denotes the total count of files and lines within the codebase. "Issue Text # Length" indicates the median word count in the problem statement. "Gold Patch # Lines, # Files, and # Func." reflects the median number of lines, files, and functions modified per patch stored in the repository. "Tests # Lines" signifies the median line count of code present in test cases. "Images # File Size and # Resolution" represents both the median image file size (KB) and resolution (pixels).
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
Figure 3: Distribution of Visual SWE-bench task instances across 11 open-source GitHub repositories.
|
| 109 |
+
|
| 110 |
+
Data statistics. Table 1 summarizes key statistics for the repositories in Visual SWE-bench, emphasizing their diversity and representativeness. Repository sizes range from 295 to 14,302 files and 70K to 592K lines of code, illustrating structural variation. Problem statements vary widely in length, with median word counts from 44 to 1,353, reflecting differences in task comprehension demands. Gold patches show diverse modification scopes, with median changes spanning 5 to 126 lines, indicating varying solution complexities. This broad spectrum of task characteristics provides a robust benchmark for evaluating LLMs' performance in resolving visual issues.
|
| 111 |
+
|
| 112 |
+
Visual data distribution. Across all Visual SWE-bench tasks, we identify 217 images and
|
| 113 |
+
|
| 114 |
+
2 videos, spanning a diverse range of visual processing challenges grouped into seven categories. These include code screenshots (21), error messages (8), and system information (2), which are linked to specific code library entities to facilitate error identification. Other categories include data visualizations (140), documentation results (33), function formulas (13), and keyboard shortcuts (2), illustrating challenges such as generating complex statistics and utilizing code functions within specific libraries. Additionally, two instances feature GIFs (matplotlib matplotlib-19763) and videos (matplotlib matplotlib-25631), providing more dynamic and detailed depictions of these challenges.
|
| 115 |
+
|
| 116 |
+
# 4 Experiments
|
| 117 |
+
|
| 118 |
+
# 4.1 Experimental Setup
|
| 119 |
+
|
| 120 |
+
Models. To execute CODEV for resolving visual issues, two model types are required: a VLM for processing visual data and an LLM for generating patches. To demonstrate the effectiveness of CODEV, we specifically avoid commercial models and use open-source models in our experiments. For the VLM, we select Qwen2-VL (Wang et al., 2024), a model renowned for its robust visual understanding capabilities, using three versions: 2B, 7B, and 72B. For the LLM, we choose two models: DeepSeek-V2.5 (DeepSeek-AI, 2024) and Qwen2.5-Coder-32B (Hui et al., 2024), both recognized for their powerful coding capabilities.
|
| 121 |
+
|
| 122 |
+
<table><tr><td>Approach</td><td>Model</td><td>Resolved (%)</td></tr><tr><td colspan="3">Evaluation results on 111 instances from Visual SWE-bench</td></tr><tr><td>Honeycomb (Honeycomb, 2024)</td><td>NA</td><td>10.81 (12)</td></tr><tr><td>Amazon Q Developer Agent (AWS, 2024)</td><td>NA</td><td>9.01 (10)</td></tr><tr><td>Factory Code Droid (Factory, 2024)</td><td>NA</td><td>9.01 (10)</td></tr><tr><td>AutoCodeRover (Zhang et al., 2024)</td><td>GPT 4o (2024-05-13)</td><td>10.81 (12)</td></tr><tr><td>AppMap Navie (AppMap, 2024)</td><td>GPT 4o (2024-05-13)</td><td>9.01 (10)</td></tr><tr><td rowspan="3">SWE-agent (Yang et al., 2024a)</td><td>Claude 3.5 Sonnet</td><td>6.31 (7)</td></tr><tr><td>GPT 4 (1106)</td><td>8.11 (9)</td></tr><tr><td>GPT 4o (2024-05-13)</td><td>1.80 (2)</td></tr><tr><td rowspan="2">RAG (Jimenez et al., 2024)</td><td>Claude 3 Opus</td><td>2.70 (3)</td></tr><tr><td>Claude 2</td><td>0.90 (1)</td></tr><tr><td rowspan="4">CODEV + Agentless (Ours)</td><td>Qwen2-VL-72B + DeepSeek-V2.5</td><td>11.71 (13)</td></tr><tr><td>Qwen2-VL-2B + Qwen2.5-Coder-32B</td><td>13.51 (15)</td></tr><tr><td>Qwen2-VL-7B + Qwen2.5-Coder-32B</td><td>13.51 (15)</td></tr><tr><td>Qwen2-VL-72B + Qwen2.5-Coder-32B</td><td>11.71 (13)</td></tr><tr><td colspan="3">Evaluation results on all instances from Visual SWE-bench</td></tr><tr><td rowspan="2">Agentless (Xia et al., 2024)</td><td>DeepSeek-V2.5</td><td>6.02 (8)</td></tr><tr><td>Qwen2.5-Coder-32B</td><td>7.52 (10)</td></tr><tr><td>Agentless Plus</td><td>Qwen2-VL-72B</td><td>0.75 (1)</td></tr><tr><td rowspan="4">CODEV + Agentless (Ours)</td><td>Qwen2-VL-72B + DeepSeek-V2.5</td><td>9.77 (13)</td></tr><tr><td>Qwen2-VL-2B + Qwen2.5-Coder-32B</td><td>12.78 (17)</td></tr><tr><td>Qwen2-VL-7B + Qwen2.5-Coder-32B</td><td>12.78 (17)</td></tr><tr><td>Qwen2-VL-72B + Qwen2.5-Coder-32B</td><td>11.28 (15)</td></tr></table>
|
| 123 |
+
|
| 124 |
+
Table 2: Results on Visual SWE-bench. The 111 instances are the overlapping instances between Visual SWE-bench and SWE-bench. $\blacksquare$ indicates closed-source approaches.
|
| 125 |
+
|
| 126 |
+
Baselines. In the patch generation phase, CODEV combines textual issue-resolving approaches. We specifically adopt the open-source Agentless approach (Xia et al., 2024), which resolves issues through a simple localization and repair process. We also compare CODEV with several textual issue-resolving approaches, including open-source and closed-source commercial products. These approaches have demonstrated strong performance on SWE-bench. To further contrast with VLM-based approaches, we design Agentless Plus, a modified version of Agentless that supports VLMs in processing visual data in issues to resolve them.
|
| 127 |
+
|
| 128 |
+
Metrics. We use Resolved $(\%)$ as our evaluation metric. The metric represents the percentage of Visual SWE-bench instances that have been successfully resolved. More details about the experiments can be found in Appendix D.
|
| 129 |
+
|
| 130 |
+
# 4.2 Evaluation
|
| 131 |
+
|
| 132 |
+
# 4.2.1 Main Results
|
| 133 |
+
|
| 134 |
+
Table 2 presents the results of all approaches. The results show that CODEV significantly enhances
|
| 135 |
+
|
| 136 |
+
the issue-resolving capabilities of the LLM by leveraging visual data. Compared to all benchmarks, CODEV achieves the best performance. When combined with Agentless, CODEV achieves over a $50\%$ relative improvement, whether using DeepSeek-V2.5 or Qwen2.5-Coder-32B to resolve issues. The performance of CodeV highlights the value of leveraging visual data to help LLMs understand and resolve issues.
|
| 137 |
+
|
| 138 |
+
Figure 4(a) depicts the distribution of issues resolved by CODEV compared to both closed-source and open-source baseline approaches. Notably, CODEV can resolve certain issues that either opensource or closed-source approaches cannot resolve. Furthermore, CODEV successfully resolves some complex issues that neither category of approaches could solve. This highlights not only the advantages of CODEV but also the importance of leveraging visual data to resolve issues.
|
| 139 |
+
|
| 140 |
+
From Table 2, it is evident that the performance of the VLM does not significantly impact CODEV. Among the three versions of Qwen2-VL, the 72B model is the most powerful, while the 7B and
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
(a) All approaches on 111 instances.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
(b) CODEV with VLMs of different model sizes on all instances.
|
| 147 |
+
|
| 148 |
+
<table><tr><td>Approach</td><td>Resolved (%)</td></tr><tr><td>CODEV + Agentless</td><td>11.28 (15)</td></tr><tr><td>w/o Fine-Grained Description</td><td>9.77 (13)</td></tr><tr><td>w/o Independent Description</td><td>9.02 (12)</td></tr><tr><td>w/o Contextual Description</td><td>9.02 (12)</td></tr><tr><td>w/o Structured Summarization</td><td>7.52 (10)</td></tr></table>
|
| 149 |
+
|
| 150 |
+
Table 3: Ablation studies on Visual SWE-bench (133 instances). The VLM is Qwen2-VL-72B and the LLM is Qwen2.5-Coder-32B.
|
| 151 |
+
|
| 152 |
+
2B models exhibit progressively weaker capabilities. However, even with the lower-performing 7B and 2B models, CODEV maintained robust issue-resolving capabilities, even outperforming the 72B model. Additionally, Figure 4(b) further illustrates the distribution of resolved issues across different VLMs. The issues resolved do not overlap entirely, indicating that each VLM has its strengths in processing different types of issues. This indicates that despite differences in VLM performance, CODEV can still exert the capabilities of VLM, resolve issues stably, and demonstrate strong robustness.
|
| 153 |
+
|
| 154 |
+
Additionally, we observe that using the VLM alone, while it leverages visual data, does not yield satisfactory results. For example, Agentless Plus combined with Qwen2-VL-72B resolves only one issue. This is primarily due to its weak coding capabilities. In comparison, CODEV effectively combines the VLM's visual understanding ability with the LLM's coding capabilities. This integration allows LLMs to leverage visual data to resolve issues at a low cost, making it a promising solution.
|
| 155 |
+
|
| 156 |
+
# 4.2.2 Analysis of Ablation Studies
|
| 157 |
+
|
| 158 |
+
We conduct a series of ablation studies on Visual SWE-bench, and the results in Table 3 show that
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
Figure 4: Venn diagrams of issues resolved from Visual SWE-bench.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 5: Fine-grained description example for the instance mwaskom_seaborn-3276, offering detailed insights into the visual data.
|
| 165 |
+
Figure 6: Structured summarization example for the instance pydata_xarray-4182, demonstrating a concise representation of its key information.
|
| 166 |
+
|
| 167 |
+
removing any component of CODEV leads to a decline in performance. This led us to further investigate the functions of the components in the data processing phase.
|
| 168 |
+
|
| 169 |
+
Analysis of Fine-Grained Description. The fine-grained description process consists of two steps: independent description and contextual description. In the independent description, the VLM captures the raw features of visual data, providing a direct and detailed representation. However, why is contextual description also necessary? Figure 5 shows an issue that is difficult to resolve without the contextual description. The figure shows two images, and the contextual description analyzes their respective function, explaining the information conveyed by each. In contrast, the independent description provides only a general overview,
|
| 170 |
+
|
| 171 |
+
missing critical details needed for a complete understanding of the issue. These details are essential for LLMs to grasp the issue accurately. Thus, while the independent description captures the raw features of the visual data, the contextual description extracts deeper, more nuanced information. Together, these two steps work in tandem to provide a comprehensive understanding of the visual data.
|
| 172 |
+
|
| 173 |
+
Analysis of Structured Summarization. As shown in Table 3, removing structured summarization significantly undermines the performance of CODEV. To explain this phenomenon, Figure 6 presents an issue that is more easily resolved with a summary. The summary generated by CODEV breaks down the complex issue into clear, digestible sections, providing LLMs with a full understanding of the issue's background, expected outcomes, and actual results. This structured format also helps LLMs grasp the core content more effectively. While the fine-grained description component attempts to convey the meaning of the visual data, relying solely on this still presents challenges in fully understanding the issue. By combining visual and textual data, the structured summary offers LLMs a more holistic understanding of the issue.
|
| 174 |
+
|
| 175 |
+
# 5 Related Works
|
| 176 |
+
|
| 177 |
+
Issue Resolving Approaches. To assist LLMs in resolving GitHub issues, many approaches have already been proposed. Retrieval Augmented Generation (RAG) (Jimenez et al., 2024) is a direct approach that resolves the issue by first extracting relevant code snippets from the repository and then using them to prompt LLMs to generate a patch. SWE-agent (Yang et al., 2024a) meticulously designs an agent-computer interface (ACI) that enables LLM agents to interact with repository environments to solve software engineering tasks. AutoCodeRover (Zhang et al., 2024) combines LLMs with code search, utilizes program structure, and conducts iterative searches for program improvement. CodeR (Chen et al., 2024a) is a multi-agent approach for issue-resolving tasks, adopting a multi-agent framework and pre-defined task graphs. Agentless (Xia et al., 2024) points out the limitations of using agents and proposes a simple two-phase process of localization and repair to solve software development problems. However, these existing approaches overlook visual data within issues. CODEV bridges this gap by processing visual data from both local and holistic
|
| 178 |
+
|
| 179 |
+
perspectives, enhancing the capabilities of LLMs to resolve complex visual issues.
|
| 180 |
+
|
| 181 |
+
Code Generation Benchmarks. Code generation has long been a measure of LLMs performance (Austin et al., 2021). The emergence of HumanEval (Chen et al., 2021) provides a standardized framework for evaluating code generation models. In subsequent years, various benchmarks have been developed to enhance HumanEval by adding extensions to different languages (Cassano et al., 2022; Athiwaratkun et al., 2023; Orlanski et al., 2023), introducing variations in edit scope (Yu et al., 2024; Du et al., 2023), presenting similar yet novel code completion tasks (Muennighoff et al., 2024), and conducting more extensive testing (Liu et al., 2023). With the development of LLMs, existing benchmarks struggle to explore the boundaries of state-of-the-art LLMs' capabilities. To address this, SWE-bench (Jimenez et al., 2024) offers a direction by researching real-world GitHub issues, serving as a challenging benchmark for evaluating next-generation LLMs. Building on this, SWE-bench-Java (Zan et al., 2024) extends the benchmark to the Java ecosystem, creating a multilingual benchmark. Similarly, the latest work, SWE-bench Multimodal (Yang et al., 2024b) offers a multimodal upgrade to the benchmark, focusing on visual JavaScript problems. Given Python's increasing role in fields like data science, machine learning, and visualization, where visual data is crucial, we construct Visual SWE-bench focusing on visual issues in Python. By incorporating real-world visual issues, Visual SWE-bench encourages researchers to leverage visual data in solving complex software challenges.
|
| 182 |
+
|
| 183 |
+
# 6 Conclusion
|
| 184 |
+
|
| 185 |
+
We propose CODEV, an approach that leverages visual data to resolve issues automatically. It processes visual data and provides LLMs with valuable information that enhances their ability to resolve issues. To evaluate CODEV, we construct a benchmark for visual issue resolving, namely Visual SWE-bench. Through extensive experiments, we demonstrate the effectiveness of CODEV and find that it maintains robust performance across VLMs with varying model sizes. Additionally, through case studies, we analyze the function of each component of CODEV, offering insights on leveraging visual data to resolve issues.
|
| 186 |
+
|
| 187 |
+
# Limitations
|
| 188 |
+
|
| 189 |
+
Although this study offers valuable insights into leveraging visual data to resolve GitHub issues, several limitations should be acknowledged:
|
| 190 |
+
|
| 191 |
+
- Due to the randomness in the responses generated by LLMs, there is a potential threat to the experimental results. Despite repeating each experiment twice to mitigate this, minor fluctuations in results may still occur.
|
| 192 |
+
- Due to the lack of suitable benchmarks, our experiments are conducted solely on the self-constructed benchmark. However, we conduct comprehensive experiments and analyses to validate our approach, and we hope future research will develop more publicly available benchmarks to further explore this direction.
|
| 193 |
+
- Due to the high costs of GPT-4o and Claude 3.5 Sonnet, we don't include them in our comparative experiments. Based on our estimates, using these models within the SWE-agent approach under similar experimental conditions would cost thousands of dollars. Nevertheless, we evaluate CODEV using two LLMs and three VLMs, conducting extensive experiments that confirm its effectiveness.
|
| 194 |
+
|
| 195 |
+
# References
|
| 196 |
+
|
| 197 |
+
Anthropic. 2024. Introducing claude 3.5 sonnet. https://www.anthropic.com/news/claude-3-5-sonnet.
|
| 198 |
+
AppMap. 2024. Appmap speedruns to the top of the swe bench leaderboard. https://appmap.io/blog/2024/06/20/appmap-navie-swe-bench-leader.
|
| 199 |
+
Ben Athiwaratkun, Sanjay Krishna Gouda, Zijian Wang, Xiaopeng Li, Yuchen Tian, Ming Tan, Wasi Uddin Ahmad, Shiqi Wang, Qing Sun, Mingyue Shang, Sujan Kumar Gonugondla, Hantian Ding, Varun Kumar, Nathan Fulton, Arash Farahani, Siddhartha Jain, Robert Giaquinto, Haifeng Qian, Murali Krishna Ramanathan, and Ramesh Nallapati. 2023. Multilingual evaluation of code generation models. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net.
|
| 200 |
+
Jacob Austin, Augustus Odena, Maxwell I. Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie J. Cai, Michael Terry, Quoc V. Le, and Charles Sutton. 2021. Program synthesis with large language models. CoRR, abs/2108.07732.
|
| 201 |
+
|
| 202 |
+
AWS. 2024. Amazon q developer the most capable generative ai-powered assistant for software development. https://aws.amazon.com/q/developer.
|
| 203 |
+
Federico Cassano, John Gouwar, Daniel Nguyen, Sydney Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q Feldman, et al. 2022. Multi-: A scalable and extensible approach to benchmarking neural code generation. arXiv preprint arXiv:2208.08227.
|
| 204 |
+
Dong Chen, Shaoxin Lin, Muhan Zeng, Daoguang Zan, Jian-Gang Wang, Anton Cheshkov, Jun Sun, Hao Yu, Guoliang Dong, Artem Aliev, Jie Wang, Xiao Cheng, Guangtai Liang, Yuchi Ma, Pan Bian, Tao Xie, and Qianxiang Wang. 2024a. Coder: Issue resolving with multi-agent and task graphs. CoRR, abs/2406.01304.
|
| 205 |
+
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Pondé de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidi Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. 2021. Evaluating large language models trained on code. CoRR, abs/2107.03374.
|
| 206 |
+
Xiangping Chen, Xing Hu, Yuan Huang, He Jiang, Weixing Ji, Yanjie Jiang, Yanyan Jiang, Bo Liu, Hui Liu, Xiaochen Li, et al. 2024b. Deep learning-based software engineering: Progress, challenges, and opportunities. arXiv preprint arXiv:2410.13110.
|
| 207 |
+
DeepSeek-AI. 2024. Deepseek-v2: A strong, economical, and efficient mixture-of-experts language model. Preprint, arXiv:2405.04434.
|
| 208 |
+
Xueying Du, Mingwei Liu, Kaixin Wang, Hanlin Wang, Junwei Liu, Yixuan Chen, Jiayi Feng, Chaofeng Sha, Xin Peng, and Yiling Lou. 2023. Classical: A manually-crafted benchmark for evaluating llms on class-level code generation. CoRR, abs/2308.01861.
|
| 209 |
+
Factory. 2024. Factory bringing autonomy to software engineering. https://www.factory.ai.
|
| 210 |
+
Honeycomb. 2024. Honeycomb. https://honeycomb.sh.
|
| 211 |
+
Binyuan Hui, Jian Yang, Zeyu Cui, Jiaxi Yang, Dayiheng Liu, Lei Zhang, Tianyu Liu, Jiajun Zhang, Bowen Yu, Kai Dang, et al. 2024. Qwen2.5-coder technical report. arXiv preprint arXiv:2409.12186.
|
| 212 |
+
|
| 213 |
+
Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R. Narasimhan. 2024. Swe-bench: Can language models resolve real-world github issues? In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net.
|
| 214 |
+
Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. 2023. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023.
|
| 215 |
+
Wei Liu, Ailun Yu, Daoguang Zan, Bo Shen, Wei Zhang, Haiyan Zhao, Zhi Jin, and Qianxiang Wang. 2024. Graphcoder: Enhancing repository-level code completion via code context graph-based retrieval and language model. CoRR, abs/2406.07003.
|
| 216 |
+
Niklas Muennighoff, Qian Liu, Armel Randy Zebaze, Qinkai Zheng, Binyuan Hui, Terry Yue Zhuo, Swayam Singh, Xiangru Tang, Leandro von Werra, and Shayne Longpre. 2024. Octopack: Instruction tuning code large language models. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net.
|
| 217 |
+
OpenAI. 2024. Hello gpt-4o. https://openai.com/index/hello-gpt-4o.
|
| 218 |
+
Gabriel Orlanski, Kefan Xiao, Xavier Garcia, Jeffrey Hui, Joshua Howland, Jonathan Malmaud, Jacob Austin, Rishabh Singh, and Michele Catasta. 2023. Measuring the impact of programming language distribution. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 26619-26645. PMLR.
|
| 219 |
+
Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. 2024. Qwen2vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191.
|
| 220 |
+
Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, and Lingming Zhang. 2024. Agentless: Demystifying llm-based software engineering agents. CoRR, abs/2407.01489.
|
| 221 |
+
John Yang, Carlos E. Jimenez, Alexander Wettig, Killian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. 2024a. Swe-agent: Agent-computer interfaces enable automated software engineering. CoRR, abs/2405.15793.
|
| 222 |
+
John Yang, Carlos E. Jimenez, Alex L. Zhang, Kiliarian Lieret, Joyce Yang, Xindi Wu, Ori Press,
|
| 223 |
+
|
| 224 |
+
Niklas Muennighoff, Gabriel Synnaeve, Karthik R. Narasimhan, Diyi Yang, Sida I. Wang, and Ofir Press. 2024b. Swe-bench multimodal: Do AI systems generalize to visual software domains? CoRR, abs/2410.03859.
|
| 225 |
+
Hao Yu, Bo Shen, Dezhi Ran, Jiaxin Zhang, Qi Zhang, Yuchi Ma, Guangtai Liang, Ying Li, Qianxiang Wang, and Tao Xie. 2024. Codereval: A benchmark of pragmatic code generation with generative pre-trained models. In Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, ICSE 2024, Lisbon, Portugal, April 14-20, 2024, pages 37:1-37:12. ACM.
|
| 226 |
+
Daoguang Zan, Bei Chen, Fengji Zhang, Dianjie Lu, Bingchao Wu, Bei Guan, Yongji Wang, and JianGuang Lou. 2023. Large language models meet nl2code: A survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 7443-7464. Association for Computational Linguistics.
|
| 227 |
+
Daoguang Zan, Zhirong Huang, Ailun Yu, Shaoxin Lin, Yifan Shi, Wei Liu, Dong Chen, Zongshuai Qi, Hao Yu, Lei Yu, Dezhi Ran, Muhan Zeng, Bo Shen, Pan Bian, Guangtai Liang, Bei Guan, Pengjie Huang, Tao Xie, Yongji Wang, and Qianxiang Wang. 2024. Swebench-java: A github issue resolving benchmark for java. CoRR, abs/2408.14354.
|
| 228 |
+
Fengji Zhang, Bei Chen, Yue Zhang, Jacky Keung, Jin Liu, Daoguang Zan, Yi Mao, Jian-Guang Lou, and Weizhu Chen. 2023a. Repocoder: Repository-level code completion through iterative retrieval and generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 2471-2484. Association for Computational Linguistics.
|
| 229 |
+
Yuntong Zhang, Haifeng Ruan, Zhiyu Fan, and Abhik Roychoudhury. 2024. Autocoderover: Autonomous program improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2024, Vienna, Austria, September 16-20, 2024, pages 1592-1604. ACM.
|
| 230 |
+
Ziyin Zhang, Chaoyu Chen, Bingchang Liu, Cong Liao, Zi Gong, Hang Yu, Jianguo Li, and Rui Wang. 2023b. A survey on language models for code. CoRR, abs/2311.07989.
|
| 231 |
+
Zibin Zheng, Kaiwen Ning, Yanlin Wang, Jingwen Zhang, Dewu Zheng, Mingxi Ye, and Jiachi Chen. 2023. A survey of large language models for code: Evolution, benchmarking, and future trends. CoRR, abs/2311.10372.
|
| 232 |
+
|
| 233 |
+
# A Prompts
|
| 234 |
+
|
| 235 |
+
Figures 7-10 show the prompts we use for images. The prompts for videos are almost identical, with "image" replaced by "video" in the text.
|
| 236 |
+
|
| 237 |
+
# A.1 Independent Description
|
| 238 |
+
|
| 239 |
+
Figure 7 illustrates the prompt we use to generate independent descriptions, instructing the VLM to provide descriptions based on the image content.
|
| 240 |
+
|
| 241 |
+
# A.2 Contextual Description
|
| 242 |
+
|
| 243 |
+
Figure 8 and Figure 9 present the prompts used for generating contextual descriptions. The prompt in Figure 8 instructs the VLM to describe images based on the contextual information, while the prompt in Figure 9 guides the VLM to analyze the function of images.
|
| 244 |
+
|
| 245 |
+
# A.3 Structured Summary
|
| 246 |
+
|
| 247 |
+
Figure 10 illustrates the prompt designed for generating a structured summary. It instructs the VLM to produce a summary of the issue based on a referenced format.
|
| 248 |
+
|
| 249 |
+
# B Example
|
| 250 |
+
|
| 251 |
+
Figure 11 presents an example where visual data is processed by the VLM, and the resulting information is appended to the original issue. Note that textual data, such as code snippets and metadata (e.g., library versions, environment details, etc.), are handled in the same way as regular text.
|
| 252 |
+
|
| 253 |
+
# C Human Verification Process
|
| 254 |
+
|
| 255 |
+
Three annotators, each with at least four years of experience using Python, participate in the human verification process. Each annotator independently evaluates all 159 instances based on the three criteria outlined in Section 3.1, assigning a "yes" or "no" label to each criterion. Final labels for each instance are determined by majority vote.
|
| 256 |
+
|
| 257 |
+
We retain only those instances where the first criterion is labeled "no" (i.e., the visual data cannot be fully converted to text), and both the second and third criteria are labeled "yes" (i.e., the visual data is essential for resolution, and the problem description contains sufficient information). This filtering results in a final curated set of 133 high-quality task instances.
|
| 258 |
+
|
| 259 |
+
# D Other Experimental Details
|
| 260 |
+
|
| 261 |
+
For models like Qwen2-VL and Qwen2.5-Coder-32B, we use vLLM for deployment on servers equipped with four NVIDIA H800 GPUs (each with 80GB of memory). For the DeepSeek-V2.5 model, we utilize the official API service provided by its developers. All experiments are conducted twice to determine the maximum number of instances that can be resolved. When using the Agentless approach, we employ version 1.0. Table 4 summarizes the hyperparameter details used in our experiments.
|
| 262 |
+
|
| 263 |
+
<table><tr><td>Phase</td><td>Component</td><td>Details</td></tr><tr><td rowspan="3">Data Processing</td><td>Independent Description</td><td>temperature = 0.2</td></tr><tr><td>Contextual Description</td><td>temperature = 0.3</td></tr><tr><td>Structured Summary</td><td>temperature = 1.0</td></tr><tr><td rowspan="2">Agentless 1.0</td><td>Localization Phase</td><td>temperature = 0.8. For each instance, 4 sets of locations are sampled, each with a max length of 3, and the sets are merged into 2 groups (first 2 and last 2).</td></tr><tr><td>Repair Phase</td><td>Uses a context window of ±10 lines around each edit location. For each group, 21 patches are generated (1 greedy with temperature = 0, and 20 samples with temperature = 0.8).</td></tr></table>
|
| 264 |
+
|
| 265 |
+
Table 4: Hyperparameter settings for each phase and component of our experiments.
|
| 266 |
+
|
| 267 |
+
<table><tr><td>You are a technical image descriptor. For the given image:
|
| 268 |
+
1. If it contains only text, present the exact text in markdown format
|
| 269 |
+
2. If it contains visual elements:
|
| 270 |
+
- Describe the main technical content
|
| 271 |
+
- Include specific measurements, numbers, and text
|
| 272 |
+
- State the relationships between visual elements
|
| 273 |
+
- Focus on technical details over visual style
|
| 274 |
+
Your description should be detailed enough for an AI model to understand the technical content without seeing the image.</td></tr></table>
|
| 275 |
+
|
| 276 |
+
Figure 7: Prompt for generating independent descriptions of images.
|
| 277 |
+
|
| 278 |
+
```txt
|
| 279 |
+
You are a technical image descriptor for software issues. Your task is to create detailed descriptions of ALL images in the issue that will help other AI models understand the issue without seeing the actual images. For EACH image in the issue: 1. Read and understand the entire issue context including: - Bug description - Code samples - Error messages - Expected behavior - Actual results 2. Create a comprehensive description that: - Details exactly what is shown in the image - Connects the image content to the issue context - Includes any visible technical information that's crucial for understanding the issue - Provides enough detail that an AI model could understand the issue's visual aspects without seeing the image Please provide your descriptions in this specific JSON format: { "images": [ { "image_id": "<sequential number>", "description": "<detailed technical description that fully captures the image content and its relationship to the issue>" } ] } CRITICAL: Ensure you describe EVERY image present in the issue - missing any image would make the issue harder to understand for AI models that cannot see the images.
|
| 280 |
+
```
|
| 281 |
+
|
| 282 |
+
Figure 8: Prompt for generating descriptions of images based on the contextual information.
|
| 283 |
+
|
| 284 |
+
```txt
|
| 285 |
+
You are a specialized technical image analyst for software issues. Your task is to analyze
|
| 286 |
+
how each image connects to and supports the reported issue. Focus on providing a
|
| 287 |
+
comprehensive analysis that explains the image's role and value in the issue context.
|
| 288 |
+
For each image, analyze:
|
| 289 |
+
1. Direct Issue Connection - How does this image specifically demonstrate or relate to the reported issue? - What aspects of the issue does this image capture or verify? - Why was including this image necessary for documenting this issue?
|
| 290 |
+
2. Technical Value - What key technical details does this image reveal about the issue? - How do specific elements in the image help understand the problem? - What insights does this image provide for troubleshooting or resolution?
|
| 291 |
+
3. Documentation Importance - What unique information does this image convey that text alone couldn't? - How does this image strengthen the overall issue documentation? - What critical details should developers focus on when reviewing this image?
|
| 292 |
+
Provide your analysis in this JSON format: { "images": [ { "image_id": "<sequential number>","analysis": "<comprehensive analysis covering the image's connection to the issue, its technical value, and documentation importance. Focus on explaining why this image matters for understanding and resolving the specific issue at hand. Include relevant technical details and their significance to the issue context." } 1 Key Guidelines: - Create a narrative that clearly connects the image to the issue context - Focus on why this image is necessary for understanding the specific issue - Include relevant technical details and their significance - Explain how the image contributes to issue documentation and resolution - Be thorough but concise in your analysis
|
| 293 |
+
```
|
| 294 |
+
|
| 295 |
+
Figure 9: Prompt for analyzing the function of images within the given issue.
|
| 296 |
+
|
| 297 |
+
```txt
|
| 298 |
+
You are an issue organizer and analyzer. The user will provide you with an issue that includes text descriptions and images. Your task is to analyze this information thoroughly and output a structured summary of the issue in JSON format.
|
| 299 |
+
The output should include relevant elements as applicable, but you are not required to fill in every field if the information is not available or cannot be accurately summarized. Aim to include:
|
| 300 |
+
```
|
| 301 |
+
```
|
| 302 |
+
{
|
| 303 |
+
"problemSummary": "<a concise summary of the problem>";
|
| 304 |
+
"context": "<any relevant background information>";
|
| 305 |
+
"stepsToReproduce": [
|
| 306 |
+
"<step 1: describe the action taken>";
|
| 307 |
+
"<step 2: describe the next action>";
|
| 308 |
+
"...<more steps as necessary>";
|
| 309 |
+
],
|
| 310 |
+
"expectedResults": "<what the user expected to happen>";
|
| 311 |
+
"actualResults": "<what actually happened>";
|
| 312 |
+
"supplementaryImages": [
|
| 313 |
+
"<descriptions of the images provided>";
|
| 314 |
+
],
|
| 315 |
+
"additionalNotes": "<any other relevant information or notes>";
|
| 316 |
+
}
|
| 317 |
+
Feel free to omit any fields that are not applicable or where information is uncertain, while ensuring the output remains clear and informative to assist other models in understanding and resolving the issue effectively.
|
| 318 |
+
```
|
| 319 |
+
|
| 320 |
+
Figure 10: Prompt for generating a structured summary.
|
| 321 |
+
|
| 322 |
+
```txt
|
| 323 |
+
PX facet labels don't respect labels kwang Issue
|
| 324 |
+
``python
|
| 325 |
+
px.scatter tips, $x =$ "total_bill", $y =$ "tip,"facet_row $\equiv$ "time",facet_col $\equiv$ "day", labels $\coloneqq$ ("time":"THE TIME","day":"THE DAY"))
|
| 326 |
+
Reported in https://github.com/plotly/plotlyexpress/pull/164
|
| 327 |
+
PX facet labels don't respect labels kwang New Issue
|
| 328 |
+
``python
|
| 329 |
+
px.scatter tips, $x =$ "total_bill", $y =$ "tip,"facet_row $\equiv$ "time",facet_col $\equiv$ "day", labels $\coloneqq$ ("time":"THE TIME","day":"THE DAY"))
|
| 330 |
+
This image is part of the problem description. Here is the relevant information:
|
| 331 |
+
**Image Details:**
|
| 332 |
+
- - **Image ID**: 1
|
| 333 |
+
- - **Raw Description**: The image consists of four scatter plots, each representing the relationship between the total bill and the tip amount for different days and times. The plots are arranged in...
|
| 334 |
+
- - **Contextual Description**: The image is a scatter plot with multiple facets, showing the relationship between 'total_bill' and 'tip' across different days and times. The x-axis is labeled 'total_bill' and ranges from 8 to 16...
|
| 335 |
+
- - **Analysis**: This image demonstrates a reported issue with the Plotly Express library where facet labels do not respect the labels keyword argument. The scatter plot is intended to show the relationship between 'total_bill' and 'tip' for different days and times, with facet labels set to 'THE TIME' and 'THE DAY'....
|
| 336 |
+
Reported in https://github.com/plotly/plotly express/pull/164
|
| 337 |
+
### Issue Summary (Structured)
|
| 338 |
+
- - **problemSummary**: Facet labels in a scatter plot do not respect the labels keyword argument.
|
| 339 |
+
- - **context**: The issue was reported in a GitHub pull request.
|
| 340 |
+
- - **stepsToReproduce**: ['Create a scatter plot using Plotly Express', 'Use the 'facet_row' and 'facet_col' parameters to create facets.', 'Use the 'labels' parameter to specify custom labels for the facets.']
|
| 341 |
+
- - **expectedResults**: The facet labels should reflect the custom labels provided in the 'labels' parameter.
|
| 342 |
+
- - **actualResults**: The facet labels do not change and display the default labels.
|
| 343 |
+
- - **supplementaryimages**: [A scatter plot with facets showing the default labels instead of the custom labels.]
|
| 344 |
+
- - **additionalNotes**: The issue was reported in a GitHub pull request, indicating it is a known bug.
|
| 345 |
+
```
|
| 346 |
+
|
| 347 |
+
Figure 11: An example of a processed visual issue. The issue from Plotly issue #1944.
|
2025/CodeV_ Issue Resolving with Visual Data/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a114b0612e1af89c21af6328e24a2e8f7eeca6512e452e0c82a97f5947d8b108
|
| 3 |
+
size 672685
|
2025/CodeV_ Issue Resolving with Visual Data/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/3970090c-6b96-4eb4-915a-cb60da22cae3_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/3970090c-6b96-4eb4-915a-cb60da22cae3_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/3970090c-6b96-4eb4-915a-cb60da22cae3_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b39a57df83694e54004fd845d1c2d321a7a2df4154c89098550d233ec116b3f
|
| 3 |
+
size 8493367
|
2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/full.md
ADDED
|
@@ -0,0 +1,418 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CogSteer: Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models
|
| 2 |
+
|
| 3 |
+
$\spadesuit$ Xintong Wang, $\spadesuit$ Jingheng Pan, $\diamond$ Liang Ding $\#$ Longyue Wang*, $\spadesuit$ Longqin Jiang, $\diamond$ Xingshan Li and $\clubsuit$ Chris Biemann*
|
| 4 |
+
|
| 5 |
+
$\spadesuit$ Department of Informatics, Universitat Hamburg, $\diamond$ The University of Sydney
|
| 6 |
+
$\sharp$ Alibaba International Digital Commerce, $\diamond$ Institute of Psychology, Chinese Academy of Sciences
|
| 7 |
+
|
| 8 |
+
$\spadesuit$ {xintong.wang, jingheng.pan, longqin.jiang, chris.biemann}@uni-hamburg.de $\diamond$ liangding.liam@gmail.com, wanglongyue.wly@alibaba-inc.com, lixs@psych.ac.cn
|
| 9 |
+
|
| 10 |
+
# Abstract
|
| 11 |
+
|
| 12 |
+
Large Language Models (LLMs) achieve remarkable performance through pretraining on extensive data. This enables efficient adaptation to diverse downstream tasks. However, the lack of interpretability in their underlying mechanisms limits the ability to effectively steer LLMs for specific applications. In this work, we investigate the intrinsic mechanisms of LLMs from a cognitive perspective using eye movement measures. Specifically, we analyze the layer-wise correlation between human cognitive indicators and LLM representations. Building on these insights, we propose a heuristic approach for selecting the optimal steering layer to modulate LLM semantics. To this end, we introduce an efficient selective layer intervention based on prominent parameter-efficient fine-tuning methods, which conventionally adjust either all layers or only the final layer. Additionally, we present an implicit layer contrastive intervention during inference to steer LLMs away from toxic outputs. Extensive experiments on natural language understanding, reasoning, and generation tasks, conducted on GPT-2, Llama2-7B, and Mistral-7B, demonstrate the effectiveness and efficiency of our approach. As a model-agnostic framework, it enhances the interpretability of LLMs while improving efficiency for safe deployment.
|
| 13 |
+
|
| 14 |
+
# 1 Introduction
|
| 15 |
+
|
| 16 |
+
Large Language Models (LLMs) (Dubey et al., 2024; Yang et al., 2024; Guo et al., 2025) have demonstrated strong capabilities in natural language understanding and reasoning (Zhao et al., 2024, 2023; Wei et al., 2022; Yin et al., 2025; Zeng et al., 2025) through pretraining on large datasets, followed by instruction tuning and alignment with human values (Wei et al., 2021; Ouyang et al., 2022). Consequently, LLMs achieve excellent performance on downstream tasks with fine-tuning.
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
Figure 1: Demonstration of CogSteer Intervention. For an $N$ -layer LLM, we first heuristically find the optimal layer $M$ for semantic intervention. The upper block represents an adapter that is fine-tuned and inserted into the frozen layer $M$ . The bottom block illustrates the operation of the attention module in $M$ to steer the semantic direction towards safer outputs during inference.
|
| 20 |
+
|
| 21 |
+
However, their lack of interpretability and transparency limits the development of efficient finetuning and inference methods.
|
| 22 |
+
|
| 23 |
+
To understand intrinsic mechanisms of LLMs, previous work has introduced various interpretability methods, including training linear classifiers as probes on top of hidden representations (Belinkov, 2022), projecting representations into vocabularies (Geva et al., 2022), and intervening in the computation path, such as knowledge neurons (Dai et al., 2022) and circuits (Conmy et al., 2023; Ghandeharioun et al., 2024). However, these methods, which focus on a limited set of predefined classes, concepts, or prompts, have practical limitations in terms of scalability and generalization.
|
| 24 |
+
|
| 25 |
+
In this work, we introduce a novel interpretability analysis method that leverages eye movement data (Luke and Christianson, 2018; Hollenstein et al., 2020; Colman et al., 2022) collected by cognition researchers to study human reading behaviors. Through correlation experiments, we find that LLM hidden states exhibit a strong correlation with human gaze, peaking in the middle layers. Using eye movement measures such as fixation and regression (Rayner, 1998) as human-interpretable
|
| 26 |
+
|
| 27 |
+
indicators, we observe a hierarchical progression in LLMs, from initial syntactic and semantic processing to deeper integration and final prediction. Additionally, a comparison of correlation results between natural reading and task-specific reading suggests that the upper layers of LLMs are more capable of reasoning. Furthermore, advanced LLMs such as Llama, which incorporate instruction tuning and reinforcement learning from human feedback (RLHF), demonstrate enhanced reasoning capabilities, even in the middle layers.
|
| 28 |
+
|
| 29 |
+
LLM intervention (Poth et al., 2023; Dong et al., 2024) refers to fine-tuning or applying inference methods to steer their semantics to align with specific tasks and data distributions. In addition to enhancing the understanding of LLM behavior, our interpretability analysis reveals that different layers serve distinct functions, with middle layers playing a crucial role in deeper syntactic and semantic processing. This enables us to first identify the most suitable layer for intervention, thereby improving task-specific performance. Based on these insights, we propose a heuristic approach for selecting the optimal steering layer for semantic intervention.
|
| 30 |
+
|
| 31 |
+
To achieve this, we refine prominent Parameter-Efficient Fine-Tuning (PEFT) methods, which traditionally adjust either all layers or only the last layer. As shown in Figure 1, our proposed CogSteer framework first identifies the most suitable layer $M$ for semantic intervention based on the task. Instead of fine-tuning all layers or only the last layer, our method fine-tunes only the selected layer, enabling LLMs to better adapt to specific tasks and datasets. The number of learnable parameters in CogSteer is significantly reduced, requiring only $1 / N$ of the parameters in LLMs, thereby improving parameter efficiency. Furthermore, we propose an implicit layer contrastive intervention method during inference, which efficiently identifies and steers semantics toward safer generation directions to evaluate the effectiveness of our proposed selective layer intervention.
|
| 32 |
+
|
| 33 |
+
Through extensive evaluations across diverse tasks and datasets, we demonstrate that the proposed selective layer intervention method achieves comparable or even superior performance with fewer parameters compared to the full-layer intervention baseline. Specifically, we observed an average absolute improvement of $+1.7$ on the GLUE benchmark for Llama2-7B, and an average absolute improvement of $+5.8$ on the GLUE benchmark for Mistral-7B, with only $3.1\%$ of the parameters
|
| 34 |
+
|
| 35 |
+
involved in full-layer fine-tuning. Moreover, in experiments on generation tasks, language toxicification (Dementieva et al., 2025), and detoxification (Leong et al., 2023), our method achieves a $+1.85\%$ improvement in toxicification compared to full-layer intervention and a $+13.45\%$ improvement in detoxification as compared to last-layer intervention.
|
| 36 |
+
|
| 37 |
+
# Our main contributions are as follows:
|
| 38 |
+
|
| 39 |
+
(1) We are the first to propose leveraging eye movement measures to analyze the layer-wise behavior of LLMs. We publicly release the probing code ${}^{1}$ to facilitate further research on interpretability from a cognitive perspective. (2) Through correlation analysis, we demonstrate a hierarchical progression in LLMs and introduce a heuristic steering layer selection method for efficient layer intervention. (3) Extensive experiments validate the effectiveness of our proposed method across various language understanding, reasoning, and generation tasks, contributing to the development of efficient and explainable foundation models.
|
| 40 |
+
|
| 41 |
+
# 2 Related Work
|
| 42 |
+
|
| 43 |
+
Interpretability research is essential for uncovering the mechanisms of LLMs and ensuring their safe and trustworthy deployment as foundation models. Various studies have analyzed how knowledge is stored in LLMs (Goldowsky-Dill et al., 2023; Stolfo et al., 2023; Rai et al., 2024; Bills et al., 2023; Geva et al., 2022), focusing on concepts such as knowledge neurons (Dai et al., 2022) and circuits (Conmy et al., 2023; Yao et al., 2024). Moreover, Wang et al. (2024a) reveal that GPT-2 predicts tokens more similarly to humans than shallow language models but lacks engagement with LLMs. Oh and Schuler (2023) analyzes how model scale and training data influence surprisal-based predictions of reading time. Gao et al. (2023) investigates the alignment between model and human attention. Unlike previous works, our method investigates the interpretability of LLMs through human-interpretable indicators based on eye movement theory, enabling a more precise understanding and control of model behavior (see § 3 and 4.1).
|
| 44 |
+
|
| 45 |
+
Parameter-Efficient Semantic Steering PEFT (Han et al., 2024; Wang et al., 2023), including Adapter (Houlsby et al., 2019; Poth et al., 2023) and LoRA (Hu et al., 2022), has gained popularity due to its ability to maintain a large number of
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 2: Correlation Results Comparison: Natural Reading (NR) vs. Task-Specific Reading (TSR). Correlation results are shown for GPT-2 Large NR (36 layers, top-left), GPT-2 Large TSR (36 layers, bottom-left), Llama2-7B NR (32 layers, top-right), and Llama2-7B TSR (36 layers, bottom-right). Green, blue, and orange boxes indicate the premature, middle, and mature buckets, respectively.
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
|
| 56 |
+
frozen parameters in LLMs for generality while introducing only a small number of trainable parameters per task. Our method for semantic steering via fine-tuning enhances PEFT methods by incorporating a selective layer intervention strategy, reducing computational costs while achieving superior performance (see § 4.2). Furthermore, steering semantics during inference offers an even more efficient approach. Contrastive decoding (Li et al., 2023; Sennrich et al., 2024; Wang et al., 2024b) guides the generation process by comparing two output distributions. In contrast, our proposed implicit layer contrastive intervention efficiently identifies and steers the semantics of LLMs toward safe directions during inference (see § 4.3).
|
| 57 |
+
|
| 58 |
+
# 3 From Human Gaze to LLM Behavior
|
| 59 |
+
|
| 60 |
+
Recent studies (Geva et al., 2021; Schuster et al., 2022) suggest that feed-forward networks (FFNs) function similarly to neural memory networks, capturing syntactic and semantic features as well as factual knowledge (Chuang et al., 2023; Zhang et al., 2024). Meanwhile, research in cognitive science (Rayner, 1998) has shown that eye movement measures provide insights into the time required for human readers to process syntax, semantics, and integrate information. Motivated by these findings, we leverage eye movement measures to analyze their correlation with the hidden states of FFNs across different layers of LLMs.
|
| 61 |
+
|
| 62 |
+
Models. Correlation studies are conducted on the GPT-2 model (Radford et al., 2019) at different sizes (12-layer small, 24-layer medium, 36-layer large) and the 32-layer Llama2-7B (Touvron et al., 2023). Both GPT-2 and Llama2-7B use a decoder-only transformer architecture. Comparing earlier LLMs, such as GPT-2, with more advanced models like Llama2 provides valuable insights into their similarities and differences while also enhancing the robustness and generalizability of our findings.
|
| 63 |
+
|
| 64 |
+
Eye-movement Experiments and Datasets. We conduct a correlation analysis under two experimental conditions: natural reading and task-specific reading. For natural reading, we use the Provo (Luke and Christianson, 2018), GECO (Colman et al., 2022), and ZuCo 2.0 (Hollenstein et al., 2020) datasets. The ZuCo 2.0 dataset also includes task-specific reading experiments. In task-specific reading, participants are required to determine whether a specific relation type is present in a sentence. Relation detection is a high-level semantic and reasoning task that involves complex cognitive processing.
|
| 65 |
+
|
| 66 |
+
Correlation Analysis. Let $S_{j}$ denote the $j$ -th sentence, consisting of $n_j$ words $w_1, w_2, \ldots, w_{n_j}$ . For each word $w_i$ in sentence $S_{j}$ , we consider five eye movement measures: $e_i^{(k)}, k \in \{sfd, fdd, gd, trt, gpt\}$ , where each measure represents a scalar value. The hidden state at layer $l$ of the LLM for word $w_i$ is denoted as $\mathbf{h}_{l,i} \in \mathbb{R}^d$ ,
|
| 67 |
+
|
| 68 |
+
where $d$ is the dimensionality of the hidden states.
|
| 69 |
+
|
| 70 |
+
To analyze the relationship between eye movement measures and LLM hidden states, we compute the Pearson correlation between each eye movement measure and the corresponding hidden states at each layer. Specifically, we concatenate hidden states and eye movement measures across all words in the dataset and apply principal component analysis to obtain a scalar representation of hidden states, ensuring alignment with eye movement measures (see Appendix D for details). The correlation is then defined as:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\rho_ {l, k} = \frac {\sum_ {i = 1} ^ {n _ {\text {t o t a l}}} \left(h _ {l , i} - \bar {h} _ {l}\right) \left(e _ {i} ^ {(k)} - \bar {e} ^ {(k)}\right)}{\sqrt {\sum_ {i = 1} ^ {n _ {\text {t o t a l}}} \left(h _ {l , i} - \bar {h} _ {l}\right) ^ {2}} \sqrt {\sum_ {i = 1} ^ {n _ {\text {t o t a l}}} \left(e _ {i} ^ {(k)} - \bar {e} ^ {(k)}\right) ^ {2}}}, \tag {1}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $h_{l,i}$ represents the processed hidden states aligned with the eye movement measures, and $\bar{h}_l$ and $\bar{e}^{(k)}$ are their respective means.
|
| 77 |
+
|
| 78 |
+
Results and Finding 1. Based on the correlation calculation in Eq. 1, we first analyze the correlation results for the natural reading task. To facilitate interpretation, we divide the layers of both models into three equal groups: premature, middle, and mature. The tripartite division of layers into premature, middle, and mature buckets is motivated by recent interpretability studies (Geva et al., 2021; Schuster et al., 2022; Chuang et al., 2023; Zhang et al., 2024), which consistently observe a coarse-grained functional structure in LLMs: lower layers predominantly capture syntactic patterns, middle layers encode semantic and contextual information, and upper layers are often involved in reasoning and factual retrieval. Figures 2 (upper) and 7 present the correlation results between various eye movement measures and the hidden states of the LLMs, illustrating how these values evolve across layers.
|
| 79 |
+
|
| 80 |
+
The results indicate that the hidden states of different LLM layers exhibit a clear and strong correlation with human gaze, peaking in the middle bucket and reaching a secondary peak in the mature bucket. This trend is consistent across different eye movement measures and LLMs with varying layer sizes. Considering the nature of these eye movement measures, the increase in correlation in the premature bucket suggests that LLMs begin processing tokens by integrating syntactic and semantic features, reflecting an initial focus on token processing. In the middle bucket, the further
|
| 81 |
+
|
| 82 |
+
increase in correlation signifies deeper syntactic and semantic processing, with the peak indicating the integration of linguistic features. In the mature bucket, the secondary peak likely reflects the final integration of information for word prediction.
|
| 83 |
+
|
| 84 |
+
The overall trend across the three buckets is similar for GPT-2 and Llama2-7B. For a detailed analysis of eye movement measures and additional findings, please refer to Appendix D.
|
| 85 |
+
|
| 86 |
+
# Finding 1. (Layer-wise functionality)
|
| 87 |
+
|
| 88 |
+
LLM hidden states exhibit a strong correlation with human gaze, characterized by three distinct rises across layers. This pattern suggests a hierarchical progression from initial syntactic and semantic processing to deeper integration and final prediction.
|
| 89 |
+
|
| 90 |
+
Results and Finding 2. Empirically, LLMs are trained with the next-token prediction objective. Modern LLMs demonstrate strong language understanding and reasoning abilities, raising the question: Are LLMs merely next-token predictors, or are they task reasoners? Figure 2 presents a comparison between natural reading and task-specific reading. The correlation patterns suggest that LLMs function as both next-token predictors and reasoners, as the trends in task-specific reading closely resemble those observed in natural reading.
|
| 91 |
+
|
| 92 |
+
Notably, for both GPT-2 and Llama2-7B models, the correlation values in the middle bucket during task-specific reading are higher than those observed during natural reading. In particular, for the Llama2-7B model, these values remain consistently higher in task-specific reading. We hypothesize that this indicates Llama2-7B is better suited for reasoning tasks and that the layers in the middle bucket and mature bucket are activated when processing complex tasks, as it is trained on a larger text corpus and incorporates more advanced post-training techniques.
|
| 93 |
+
|
| 94 |
+
# Finding 2. (LLM functions as both next-token predictor and task reasoner)
|
| 95 |
+
|
| 96 |
+
LLMs function as both next-token predictors and reasoners, with overall correlation trends aligning with human cognition indicators. Advanced training methods enhance their ability to reason and handle complex tasks.
|
| 97 |
+
|
| 98 |
+
# 4 Method
|
| 99 |
+
|
| 100 |
+
# 4.1 Heuristic Steering Layer Selection
|
| 101 |
+
|
| 102 |
+
A better understanding of LLM mechanisms will help in precisely and efficiently controlling their behaviors, particularly for semantic steering. We argue that the predominant parameter-efficient finetuning (PEFT) methods (Han et al., 2024), which by default intervene in the last layer or across all layers, are not optimal<sup>2</sup>. Instead, we propose an efficient heuristic steering layer selection strategy for intervention, based on our cognition-inspired interpretability analysis detailed in Section 3.
|
| 103 |
+
|
| 104 |
+
For semantic steering in LLMs, the layers in the middle bucket are the most suitable candidates for intervention. These layers handle further token processing, information integration, and preliminary reasoning. Additionally, the residual connections (He et al., 2016) in transformer layers allow the semantic intervention to flow and evolve gradually, avoiding abrupt changes in the final prediction (Chuang et al., 2023).
|
| 105 |
+
|
| 106 |
+
From a task-oriented perspective, we apply PEFT methods and inference-only methods to the candidate layers in the middle bucket, using a small portion of data, like the validation set, to search for and select the best-performing layer that suits the task scenario. Formally, given $M$ as the best layer for intervention, $J$ represents a set of candidate layers in the middle bucket $\left( \frac{N}{3} \leq M \leq \frac{2N}{3} \right)$ . $D$ denotes the validation set. We search for the layer $M'$ that yields the best task score or loss performance, as follows:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
M ^ {\prime} = \arg \max _ {l \in M} S c o r e (D; P (\cdot | x _ {t}, l)). \tag {2}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
Later, we will demonstrate the effectiveness of the heuristic steering layer selection approach in language understanding, reasoning, and generation tasks, as discussed in Section 5.
|
| 113 |
+
|
| 114 |
+
# 4.2 Layer Intervention via Fine-tuning
|
| 115 |
+
|
| 116 |
+
PEFT approaches, such as additive fine-tuning (i.e., adapters) and reparameterized fine-tuning (i.e., LoRA), are among the most popular due to their efficiency, as they require only a small set of new parameters for task-specific fine-tuning. Let the parameters of an LLM consist of a set of pre-trained, frozen parameters $\phi(\cdot)$ and a set of newly introduced parameters in the inserted block $\psi(\cdot)$ . Our
|
| 117 |
+
|
| 118 |
+
layer intervention via fine-tuning to steer semantics in LLM and predicts the next token as follows:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
y \left(x _ {t}\right) = \operatorname {s o f t m a x} \left(\log \mathrm {i t} _ {\phi , \psi} \left(F F N _ {\phi} ^ {N} \left(x _ {t}\right) \mid F _ {\phi , \psi} ^ {M} \left(x _ {t}\right), y _ {< t}\right)\right). \tag {3}
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
Here, $FFN_{\phi}^{N}(x_{t})$ represents the hidden state of the FFN in the final layer with frozen parameters $\phi (\cdot)$ , used for token prediction over a vocabulary. $M$ denotes the best layer for semantic intervention, determined by Equation 2. $F_{\phi ,\psi}^{M}(x_{t})$ indicates that the fusion layer in the LLM integrates new parameters $\psi (\cdot)$ from the newly added block, aligned with the frozen parameters $\phi (\cdot)$ .
|
| 125 |
+
|
| 126 |
+
Our cognitive-inspired selective layer intervention method is an adaptive fine-tuning strategy that identifies the best layer for both effective semantic steering and task performance. Moreover, as our method only operates on a single layer rather than all layers, it significantly reduces computational resources and time, while also avoiding catastrophic forgetting (Luo et al., 2023; Li et al., 2024).
|
| 127 |
+
|
| 128 |
+
# 4.3 Layer Intervention during Inference
|
| 129 |
+
|
| 130 |
+
Efficient semantic steering can be achieved via fine-tuning. However, an even more efficient approach is to steer the semantics of LLMs during inference without introducing additional parameters. Motivated by Li et al. (2023); Leong et al. (2023), which contrast outputs from either a less capable model or outputs induced by a negative prompt, we propose an implicit layer contrastive intervention method during inference. First, we fine-tune a contrast model that generates either the desired output or the output we aim to mitigate. In our case, to mitigate toxic token generation, we fine-tune a toxic LLM as the contrast model. Unlike Li et al. (2023); Leong et al. (2023), which contrast the outputs explicitly in the last layer, our method operates on the contextualized value vectors derived from the weight matrices $K$ , $Q$ , $V$ of the attention modules within LLMs. We perform this operation on the best layer for intervention as described in Equation 2. Formally, our layer intervention during inference finds the semantic steering direction by contrasting the value vectors as follows:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\Delta v ^ {M} = v _ {c} ^ {M} - v _ {o} ^ {M}, \tag {4}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $v_{c}^{M}$ and $v_{o}^{M}$ are the contextualized value vectors of the contrast LLM and the original LLM at the best layer $M$ for semantic intervention. The contextualized value vectors (Elhage et al., 2021) are derived as follows:
|
| 137 |
+
|
| 138 |
+
<table><tr><td rowspan="2">Model</td><td colspan="8">VAL-SET</td><td rowspan="2">Avg.</td></tr><tr><td>MNLI-M</td><td>MNLI-MM</td><td>MRPC</td><td>QNLI</td><td>QQP</td><td>RTE</td><td>SST-2</td><td>WNLI</td></tr><tr><td rowspan="2">GPT2-L</td><td>78.0 l-19</td><td>79.5 l-19</td><td>85.5 l-20</td><td>83.3 l-19</td><td>80.6 l-19</td><td>71.1 l-19</td><td>92.9 l-19</td><td>53.5 l-19</td><td>78.1</td></tr><tr><td>82.1</td><td>83.5</td><td>83.1</td><td>85.2</td><td>82.6</td><td>70.4</td><td>93.6</td><td>53.5</td><td>79.2</td></tr><tr><td rowspan="2">Llama2-7B</td><td>86.4 l-14</td><td>87.1 l-14</td><td>86.5 l-14</td><td>89.3 l-14</td><td>83.3 l-14</td><td>75.5 l-14</td><td>95.8 l-14</td><td>56.4 l-19</td><td>82.5</td></tr><tr><td>89.0</td><td>89.3</td><td>86.3</td><td>91.9</td><td>85.6</td><td>65.3</td><td>96.7</td><td>56.3</td><td>82.5</td></tr><tr><td rowspan="2">Mistral-7B</td><td>87.3 l-12</td><td>88.1 l-12</td><td>86.9 l-12</td><td>91.4 l-14</td><td>84.6 l-12</td><td>80.1 l-12</td><td>95.8 l-14</td><td>56.3 l-12</td><td>83.8</td></tr><tr><td>89.5</td><td>89.7</td><td>82.2</td><td>81.7</td><td>78.1</td><td>58.9</td><td>96.7</td><td>56.3</td><td>79.1</td></tr></table>
|
| 139 |
+
|
| 140 |
+
<table><tr><td rowspan="2">Model</td><td colspan="8">TEST-SET</td><td rowspan="2">Avg.</td></tr><tr><td>MNLI-M</td><td>MNLI-MM</td><td>MRPC</td><td>QNLI</td><td>QQP</td><td>RTE</td><td>SST-2</td><td>WNLI</td></tr><tr><td rowspan="2">GPT2-L</td><td>79.3 l-19</td><td>79.3 l-19</td><td>83.0 l-20</td><td>84.1 l-19</td><td>65.6 l-19</td><td>64.6 l-19</td><td>92.4 l-19</td><td>58.9 l-19</td><td>75.8</td></tr><tr><td>82.6</td><td>83.0</td><td>82.7</td><td>85.6</td><td>65.6</td><td>62.6</td><td>93.5</td><td>61.6</td><td>77.1</td></tr><tr><td rowspan="2">Llama2-7B</td><td>82.9 l-14</td><td>86.3 l-14</td><td>83.4 l-14</td><td>88.5 l-14</td><td>68.8 l-14</td><td>74.7 l-14</td><td>95.2 l-14</td><td>64.4 l-19</td><td>80.5</td></tr><tr><td>89.5</td><td>88.8</td><td>80.5</td><td>92.1</td><td>71.6</td><td>58.2</td><td>93.5</td><td>55.5</td><td>78.7</td></tr><tr><td rowspan="2">Mistral-7B</td><td>87.1 l-12</td><td>87.5 l-12</td><td>86.6 l-12</td><td>91.7 l-14</td><td>70.5 l-12</td><td>81.0 l-12</td><td>95.9 l-14</td><td>65.8 l-12</td><td>83.2</td></tr><tr><td>89.7</td><td>89.4</td><td>80.4</td><td>81.3</td><td>62.7</td><td>52.3</td><td>97.3</td><td>65.1</td><td>77.3</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 1: Evaluation on GLUE Benchmark. MRPC and QQP are reported using F1, while the other tasks are reported using Accuracy. A green box indicates that the single-layer intervention outperforms the full-layer intervention, an orange box denotes comparable performance, and a blue box indicates slightly lower performance.
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
A ^ {\ell , h} = \varphi \left(\frac {\left(\mathbf {x} ^ {\ell - 1} W _ {Q} ^ {\ell , h}\right) , \left(\mathbf {x} ^ {\ell - 1} W _ {K} ^ {\ell , h}\right) ^ {T}}{\sqrt {d / H}} + M ^ {\ell , h}\right), \tag {5}
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\mathbf {a} ^ {\ell} = \sum_ {h = 1} ^ {H} A ^ {\ell , h} \left(\mathbf {x} ^ {\ell - 1} W _ {V} ^ {\ell , h}\right) W _ {O} ^ {\ell , h} = \sum_ {h = 1} ^ {H} \mathbf {v} ^ {\ell , h} W _ {O} ^ {\ell , h}. \tag {6}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
Specifically, $\left(\mathbf{x}^{\ell -1}W_V^{\ell ,h}\right)$ represents the attention-weighted, context-sensitive value vector for head $h$ $\mathbf{v}_i^{\ell ,h}\in \mathbb{R}^d$ is the contextualized value vector at position $i$ . We then update the value vector in the layer $M$ of the original LLM:
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
v ^ {\prime M} = v _ {o} ^ {M} - \lambda_ {\text {n o r m}} ^ {\alpha} \cdot \Delta v ^ {M}. \tag {7}
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
Here, $\lambda_{\mathrm{norm}} = 1 + \left\| \Delta v^{M}\right\|_{2}$ is a normalization term that adaptively regulates the steering effect, and $\alpha$ is a hyperparameter that further controls the steering strength. Finally, we preserve the updated steering direction and renormalize the adapted value vector to ensure its representation is close to the original vector:
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
v ^ {\prime M} = v ^ {\prime M} \cdot \frac {\left\| v _ {o} ^ {M} \right\| _ {2}}{\| v ^ {\prime M} \| _ {2}}. \tag {8}
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
# 5 Experiments
|
| 165 |
+
|
| 166 |
+
# 5.1 Datasets and Evaluation
|
| 167 |
+
|
| 168 |
+
Datasets We evaluate our proposed efficient semantic steering methods using the General Lan
|
| 169 |
+
|
| 170 |
+
guage Understanding Evaluation (GLUE) benchmark (Wang et al., 2019), applying selective layer intervention. Specifically, we focus on eight GLUE tasks covering sentiment analysis (SST-2), paraphrase identification (MRPC, QQP), and natural language inference (MNLI-M, MNLI-MM, QNLI, RTE, WNLI). Additionally, to assess our methods in the context of language generation, we examine their effectiveness in natural language toxicification and detoxification. To train toxic adapters and contrast models, as described in Sections 4.2 and 4.3, we utilize the Toxic Comment Classification Challenge Dataset (Jigsaw, 2018). (See Appendix A)
|
| 171 |
+
|
| 172 |
+
Evaluation For the evaluation on the GLUE benchmark, we report both validation-set and test-set $F1$ scores for QQP and MRPC, while accuracy is used for all other tasks. Additionally, we use the RealToxicityPrompts (RTP) dataset (Gehman et al., 2020). Following prior work (Li et al., 2023; Leong et al., 2023), we sample 2,122 toxic prompts. For each toxic prompt in the RTP dataset, we generate 25 continuations and evaluate their toxicity using the Perspective API<sup>3</sup>, which assigns a toxicity score to each continuation, with higher scores indicating a greater likelihood of toxicity. Finally, we use the average maximum toxicity as our evaluation metric. Specifically, we compare the toxicity scores and detoxification margins obtained by applying our methods to different layers of the models.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 3: Toxification/Detoxification Evaluation. The upper chart (green bars) shows toxicity scores for interventions at each layer via fine-tuning. The bottom chart (blue bars) displays detoxification margin scores per layer during inference, comparing toxicity scores in toxification and detoxification processes. Purple, blue, and orange boxes indicate the premature, middle, and mature buckets.
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
|
| 181 |
+
# 5.2 Models and Baselines
|
| 182 |
+
|
| 183 |
+
We evaluate our efficient semantic steering methods using three sizes of GPT-2 models, as discussed in § 3, along with Llama2-7B. We select GPT-2 and Llama2-7B because the former represents earlier classical LLMs, while the latter exemplifies modern LLMs. To ensure generalizability, we also evaluate the Mistral-7B (Jiang et al., 2023) model to assess performance across tasks. Since applying semantic intervention to either the last layer or all layers of LLMs is a conventional approach, we use these two methods as baselines for comparison. The implementation details are in Appendix A.
|
| 184 |
+
|
| 185 |
+
# 5.3 Evaluation on GLUE Benchmark
|
| 186 |
+
|
| 187 |
+
We first present the performance of our proposed selected layer intervention method on the GLUE Benchmark in Table 1. It can be observed that by selecting the optimal layer to steer semantics in LLMs for a specific task, all three LLMs achieve comparable or even superior results compared to conventional all-layer intervention while introducing only $1 / N$ of the parameters ( $N$ is the number of layers in the LLMs). Specifically, Llama2-7B achieves an absolute increase of $+1.8$ on average in the test set, while Mistral-7B achieves an absolute increase of $+4.7$ on average in the validation set and $+5.9$ in the test set. Moreover, GPT2 achieves comparable or better results on 5 out of 8 tasks in GLUE, Llama2 on 4 tasks, and Mistral on 7 tasks.
|
| 188 |
+
|
| 189 |
+
Additionally, we find that the optimal layer for our proposed method consistently falls within the middle bucket across all LLMs. For GPT2-L, the best-performing layer is $L19$ for most tasks, while for Llama2-7B and Mistral-7B, it is $L14$ and $L12$ , respectively. This aligns with our interpretability analysis and findings based on eye movement
|
| 190 |
+
|
| 191 |
+
measures (see § 3). Furthermore, the best layer remains consistent across both the validation and test sets, demonstrating the effectiveness of the heuristic steering layer selection approach (§ 4.1).
|
| 192 |
+
|
| 193 |
+
Lastly, from a task perspective, we find that paraphrase identification (MRPC, QQP) and natural language inference (MNLI, QNLI, RTE, WNLI) achieve the highest average improvement of $+2.0$ across all LLMs compared to full-layer fine-tuning (e.g., $+28.7$ for Mistral-7B and $+16.5$ for Llama2-7B on the RTE test set). This suggests that, given the complex structure of LLMs, fine-tuning all layers for semantic steering does not always yield the best downstream task performance and can result in parameter redundancy, where certain layers become less active in making accurate predictions. Additionally, the conventional approach of fine-tuning only the last layer of an LLM, based on its proximity to the prediction output, is not optimal. Instead, in practice, the intervention layer should first be identified to better steer semantics and improve prediction accuracy for a specific task.
|
| 194 |
+
|
| 195 |
+
# 5.4 Analysis on Language Toxification
|
| 196 |
+
|
| 197 |
+
We evaluate our selective layer intervention via fine-tuning using the language toxicification task. Figure 3 (green bars in the upper chart) shows the toxicity score for inserting a toxic adapter into each layer of the LLMs, with the last layer and full layers (red line) used as baselines. The best layer $M$ in the middle bucket for semantic intervention is $L23$ for GPT-2 and $L13$ for Llama2-7B, competing with the results from both the last layer ( $+4.5\%$ for GPT-2 & $+23\%$ for Llama2) and full layers ( $+0.9\%$ for GPT-2 & $+2.8\%$ for Llama2). This indicates that the conventional intervention is not optimal, demonstrating the effectiveness of
|
| 198 |
+
|
| 199 |
+
<table><tr><td>Model</td><td>Time/min</td><td>Time%</td><td>Params/M</td><td>Params%</td><td>Toxify Score↑</td><td>Detoxify Score↓</td><td>Avg. GLUE↑</td></tr><tr><td>GPT2-L→full</td><td>33</td><td>100</td><td>14.8</td><td>100</td><td>0.86</td><td>0.60</td><td>77.1</td></tr><tr><td>→single</td><td>13</td><td>39.4</td><td>0.4</td><td>2.7</td><td>0.87</td><td>0.63</td><td>75.8</td></tr><tr><td>Llama2-7B→full</td><td>205</td><td>100</td><td>1.3</td><td>100</td><td>0.86</td><td>0.62</td><td>78.7</td></tr><tr><td>→single</td><td>85</td><td>41.5</td><td>0.04</td><td>3.1</td><td>0.87</td><td>0.59</td><td>80.4</td></tr><tr><td>Mistral-7B→full</td><td>36</td><td>100</td><td>134.5</td><td>100</td><td>0.85</td><td>0.68</td><td>77.3</td></tr><tr><td>→single</td><td>25</td><td>69.4</td><td>4.2</td><td>3.1</td><td>0.84</td><td>0.68</td><td>83.1</td></tr></table>
|
| 200 |
+
|
| 201 |
+
Table 2: Efficiency Comparison between CogSteer (selective single-layer intervention) and full-layer intervention. A green box indicates that the single-layer intervention outperforms the full-layer intervention, while an orange box denotes comparable performance.
|
| 202 |
+
|
| 203 |
+
our proposed selective layer intervention approach, which saves considerable computational resources and time for fine-tuning.
|
| 204 |
+
|
| 205 |
+
Furthermore, layer intervention in the mature bucket, including the last layer (used as a baseline), is not remarkable when compared to full-layer intervention for both GPT-2 and Llama2-7B models. According to our behavioral analysis in Section 3, the layers in the mature bucket focus more on reasoning and factual knowledge, involving less token processing, which makes them less suitable for semantic steering. Interestingly, for the GPT-2 model, we observe that layers $L1-L4$ and $L6-L8$ in the premature bucket also outperform the full-layer intervention baseline, whereas this phenomenon is not observed in Llama2-7B. We hypothesize that this difference may be due to the distinct adapter training schemes. For GPT-2, we use the vanilla Adapter as a plug-in, which directly affects token distributions and allows successive minor changes as tokens pass through layers, following the early exit theory (Elbayad et al., 2020; Schuster et al., 2022). However, for Llama2, we use the LLaMa-Adapter (Zhang et al., 2023), which directly modifies attention. Edits to the attention modules gradually affect token distributions (Geva et al., 2021; Elhage et al., 2021).
|
| 206 |
+
|
| 207 |
+
We believe that our selective layer intervention approach is LLM-agnostic and not limited to the LLMs used in the interpretability analysis. Figure 3 (right) presents the toxicity scores based on Mistral7B, which align with the observations discussed earlier. Specifically, the best-performing layer in the middle bucket is $L13$ , achieving better results than the last layer $(+11.4\%)$ and nearly identical performance to full-layer intervention (-0.01).
|
| 208 |
+
|
| 209 |
+
# 5.5 Analysis on Language Detoxification
|
| 210 |
+
|
| 211 |
+
As a dual task, we evaluate our selective layer intervention during inference using the language detox
|
| 212 |
+
|
| 213 |
+
ification task. This task serves as an adversarial task to mitigate the toxic tokens that are amplified by layer intervention methods during fine-tuning. Thus, we observe the detoxification margin in each intervention layer and compare the performance with intervention in the last layer. Figure 3 (blue bars in the bottom chart) shows the results of the detoxification margin scores. The best layer $M$ for semantic intervention in the middle bucket is $L23$ for GPT-2 and $L16$ for Llama2-7B, both outperforming the last layer results by a large margin ( $+2.9\%$ for GPT and $+24\%$ for Llama). Notably, the best layer $M$ for Llama2-7B in the detoxification task is $L13$ , whereas the best layer for detoxification is $L16$ , demonstrating that our heuristic layer selection method is adaptive and suitable for tasks.
|
| 214 |
+
|
| 215 |
+
Moreover, the detoxification margin scores for layer intervention in the middle bucket for both GPT-2 and Llama2 models are significantly better than those for intervention in the mature bucket. This aligns with our findings that the middle bucket layers are involved in further token processing and information integration, whereas the mature bucket layers focus on reasoning. Finally, for the GPT-2 model, the detoxification margin scores are also significant in the premature bucket layers. This could be attributed to the distinct adapter training scheme, as the earlier layers are more deeply affected by the toxification, which broadens the scope of detoxification. The remaining results for GPT-2 small and medium models are listed in Appendix B.
|
| 216 |
+
|
| 217 |
+
For Mistral-7B, the optimal layer for semantic intervention in the middle bucket is $L15$ for the detoxification task. Although the detoxification margin scores for $L23$ and $L32$ in the mature bucket are slightly higher than that of $L15$ (+0.14 on average), the scores in the middle bucket are more stable. We hypothesize that the differences among GPT-2, Llama2, and Mistral-7B in the mature bucket, where Mistral-7B achieves better detoxification per
|
| 218 |
+
|
| 219 |
+
formance, stem from variations in post-training. As an advanced LLM incorporating additional human value alignment for safety, Mistral-7B benefits more from interventions in the mature bucket, leading to improved detoxification performance.
|
| 220 |
+
|
| 221 |
+
# 5.6 Efficiency Analysis
|
| 222 |
+
|
| 223 |
+
The efficiency analysis of our proposed cognition-inspired selective layer intervention is presented in Table 2. By selecting the optimal layer for semantic steering in LLMs, the training time and the number of parameters required for fine-tuning are significantly reduced compared to full-layer intervention. Specifically, our method requires, on average, only half the time and $3.0\%$ of the parameters needed for full-layer settings. Importantly, this reduction in computational cost does not compromise performance; in fact, selective layer intervention performs comparably to, and in some cases even outperforms full-layer intervention.
|
| 224 |
+
|
| 225 |
+
# 6 Conclusion
|
| 226 |
+
|
| 227 |
+
In this paper, we introduce an efficient semantic steering method for LLMs using selective layer intervention. Our approach is motivated by correlation analysis with eye movement measures, making it both interpretable and understandable. Extensive experiments demonstrate that selective layer intervention achieves comparable or even superior performance while significantly reducing training time and the number of parameters required. Overall, our proposed method represents an important step toward improving the interpretability of LLMs and contributes to their safe and efficient deployment.
|
| 228 |
+
|
| 229 |
+
# Limitations
|
| 230 |
+
|
| 231 |
+
In this paper, we conduct a thorough analysis of the correlation between hidden states in the feedforward network (FFN) and eye movement measures. We focus on FFN blocks because their hidden states play a greater role in token prediction. For future work, we plan to explore the mechanisms of the attention block in greater depth. Additionally, our analysis suggests that layers in the mature bucket are involved in reasoning based on the task-specific reading dataset. However, factual knowledge also appears to be integrated within this bucket. To refine our analysis, we will seek further eye movement studies that examine factual information processing.
|
| 232 |
+
|
| 233 |
+
# Ethics Statement
|
| 234 |
+
|
| 235 |
+
We propose an efficient semantic steering method for LLMs through cognition-inspired selective layer intervention to better understand their behavior and address safety concerns, thereby enhancing their safety and reliability within the community. Additionally, the eye-tracking data used in this study, derived from the ZuCo 2.0, GeCo, and Provo datasets, are publicly available and adhere to established ethical protocols, promoting transparency and reproducibility in our research. Furthermore, we have made our code publicly accessible, ensuring that researchers and practitioners can easily access and implement our methods.
|
| 236 |
+
|
| 237 |
+
# Acknowledgments
|
| 238 |
+
|
| 239 |
+
We thank the anonymous reviewers and the area chair for their valuable feedback and constructive suggestions. This research was funded by the Excellence funds of the University of Hamburg.
|
| 240 |
+
|
| 241 |
+
# References
|
| 242 |
+
|
| 243 |
+
Yonatan Belinkov. 2022. Probing classifiers: Promises, shortcomings, and advances. Computational Linguistics, 48:207-219.
|
| 244 |
+
Steven Bills, Nick Cammarata, Dan Mossing, Henk Tillman, Leo Gao, Gabriel Goh, Ilya Sutskever, Jan Leike, Jeff Wu, and William Saunders. 2023. Language models can explain neurons in language models. OpenAI Blog.
|
| 245 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems (NeurIPS), pages 1877-1901.
|
| 246 |
+
Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James R Glass, and Pengcheng He. 2023. DoLa: Decoding by contrasting layers improves factuality in large language models. In *The Twelfth International Conference on Learning Representations (ICLR)*, pages 1-26.
|
| 247 |
+
Toon Colman, Margot Fonteyne, Joke Daems, Nicolas Dirix, and Lieve Macken. 2022. GECO-MT: The ghent eye-tracking corpus of machine translation. In Proceedings of the Thirteenth Language Resources and Evaluation Conference (LREC), pages 29-38.
|
| 248 |
+
|
| 249 |
+
Arthur Conmy, Augustine Mavor-Parker, Aengus Lynch, Stefan Heimersheim, and Adrià Garriga-Alonso. 2023. Towards automated circuit discovery for mechanistic interpretability. Advances in Neural Information Processing Systems (NeurIPS), pages 16318-16352.
|
| 250 |
+
Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. 2022. Knowledge neurons in pretrained transformers. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (ACL), pages 8493-8502.
|
| 251 |
+
Daryna Dementieva, Nikolay Babakov, Amit Rosen, Abinew Ali Ayele, Naquee Rizwan, Florian Schneider, Xintong Wang, Seid Muhie Yimam, Daniil Alekhseevich Moskovskiy, Elisei Stakovskii, et al. 2025. Multilingual and explainable text detoxification with parallel corpora. In Proceedings of the 31st International Conference on Computational Linguistics (COLING), pages 7998-8025.
|
| 252 |
+
Xiangjue Dong, Maria Teleki, and James Caverlee. 2024. A survey on LLM inference-time self-improvement. arXiv preprint: 2412.14352.
|
| 253 |
+
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint: 2407.21783.
|
| 254 |
+
Maha Elbayad, Jiatao Gu, Edouard Grave, and Michael Auli. 2020. Depth-adaptive transformer. In *The Eighth International Conference on Learning Representations (ICLR)*, pages 1-14.
|
| 255 |
+
Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, et al. 2021. A mathematical framework for transformer circuits. transformer circuits thread. In Transformer Circuits Thread.
|
| 256 |
+
Changjiang Gao, Shujian Huang, Jixing Li, and Jiajun Chen. 2023. Roles of scaling and instruction tuning in language perception: Model vs. human attention. In *Findings of the Association for Computational Linguistics: EMNLP* 2023, pages 13042-13055, Singapore. Association for Computational Linguistics.
|
| 257 |
+
Samuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi, and Noah A Smith. 2020. RealToxicityPrompts: Evaluating neural toxic degeneration in language models. In Findings of the Association for Computational Linguistics (EMNLP), pages 3356-3369.
|
| 258 |
+
Mor Geva, Avi Caciularu, Kevin Wang, and Yoav Goldberg. 2022. Transformer feed-forward layers build predictions by promoting concepts in the vocabulary space. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 30-45.
|
| 259 |
+
|
| 260 |
+
Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy. 2021. Transformer feed-forward layers are key-value memories. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5484-5495.
|
| 261 |
+
Asma Ghandeharioun, Avi Caciularu, Adam Pearce, Lucas Dixon, and Mor Geva. 2024. Patchscopes: A unifying framework for inspecting hidden representations of language models. In *Forty-first International Conference on Machine Learning (ICML)* pages 15466 - 15490.
|
| 262 |
+
Nicholas Goldowsky-Dill, Chris MacLeod, Lucas Sato, and Aryaman Arora. 2023. Localizing model behavior with path patching. arXiv preprint: 2304.05969.
|
| 263 |
+
Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al. 2025. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint: 2501.12948.
|
| 264 |
+
Zeyu Han, Chao Gao, Jinyang Liu, Sai Qian Zhang, et al. 2024. Parameter-efficient fine-tuning for large models: A comprehensive survey. arXiv preprint: 2403.14608.
|
| 265 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), pages 770-778.
|
| 266 |
+
Nora Hollenstein, Marius Troendle, Ce Zhang, and Nicolas Langer. 2020. Zuco 2.0: A dataset of physiological recordings during natural reading and annotation. In Proceedings of the Twelfth Language Resources and Evaluation Conference (LREC), pages 138-146.
|
| 267 |
+
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for NLP. In International conference on machine learning (ICML), pages 2790-2799.
|
| 268 |
+
Edward J Hu, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al. 2022. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations (ICLR), pages 1-13.
|
| 269 |
+
Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, and et al. 2023. Mistral 7b. Preprint, arXiv:2310.06825.
|
| 270 |
+
Jigsaw. 2018. Toxic comment classification challenge. In Kaggle.
|
| 271 |
+
Chak Tou Leong, Yi Cheng, Jiashuo Wang, Jian Wang, and Wenjie Li. 2023. Self-detoxifying language models via toxicification reversal. In Proceedings of the
|
| 272 |
+
|
| 273 |
+
2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4433-4449.
|
| 274 |
+
Hongyu Li, Liang Ding, Meng Fang, and Dacheng Tao. 2024. Revisiting catastrophic forgetting in large language model tuning. In Findings of the Association for Computational Linguistics (EMNLP), pages 4297-4308.
|
| 275 |
+
Xiang Lisa Li, Ari Holtzman, Daniel Fried, Percy Liang, Jason Eisner, Tatsunori Hashimoto, Luke Zettle-moyer, and Mike Lewis. 2023. Contrastive decoding: Open-ended text generation as optimization. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (ACL), page 12286-12312.
|
| 276 |
+
Alisa Liu, Maarten Sap, Ximing Lu, Swabha Swayamdipta, Chandra Bhagavatula, Noah A Smith, and Yejin Choi. 2021. Dexperts: Decoding-time controlled text generation with experts and anti-experts. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics (ACL), pages 6691-6706.
|
| 277 |
+
Steven G Luke and Kiel Christianson. 2018. The Provo Corpus: A large eye-tracking corpus with predictability norms. Behavior research methods, 50:826-833.
|
| 278 |
+
Yun Luo, Zhen Yang, Fandong Meng, Yafu Li, Jie Zhou, and Yue Zhang. 2023. An empirical study of catastrophic forgetting in large language models during continual fine-tuning. arXiv preprint: 2308.08747.
|
| 279 |
+
Byung-Doh Oh and William Schuler. 2023. Transformer-based language model surprisal predicts human reading times best with about two billion training tokens. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 1915-1921, Singapore. Association for Computational Linguistics.
|
| 280 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022. Training language models to follow instructions with human feedback. Advances in neural information processing systems (NeurIPS), pages 1-15.
|
| 281 |
+
Clifton Poth, Hannah Sterz, Indraneil Paul, Sukannya Purkayastha, Leon Englander, Timo Imhof, Ivan Vulic, Sebastian Ruder, Iryna Gurevych, and Jonas Pfeiffer. 2023. Adapters: A unified library for parameter-efficient and modular transfer learning. arXiv preprint: 2311.11077.
|
| 282 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog.
|
| 283 |
+
Daking Rai, Yilun Zhou, Shi Feng, Abulhair Saparov, and Ziyu Yao. 2024. A practical review of mechanistic interpretability for transformer-based language models. arXiv preprint: 2407.02646.
|
| 284 |
+
|
| 285 |
+
Keith Rayner. 1998. Eye movements in reading and information processing: 20 years of research. *Psychological bulletin*, 124:372-422.
|
| 286 |
+
Tal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani, Dara Bahri, Vinh Tran, Yi Tay, and Donald Metzler. 2022. Confident adaptive language modeling. Advances in Neural Information Processing Systems (NeurIPS), pages 17456-17472.
|
| 287 |
+
Rico Sennrich, Jannis Vamvas, and Alireza Mohammadshahi. 2024. Mitigating hallucinations and off-target machine translation with source-contrastive and language-contrastive decoding. In Proceedings of the 18th European Chapter of the Association for Computational Linguistics (EACL), pages 21-33.
|
| 288 |
+
Alessandro Stolfo, Yonatan Belinkov, and Mrinmaya Sachan. 2023. A mechanistic interpretation of arithmetic reasoning in language models using causal mediation analysis. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7035-7052.
|
| 289 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023. LLAMA 2: Open foundation and fine-tuned chat models. arXiv preprint: 2307.09288.
|
| 290 |
+
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 *The Seventh International Conference on Learning Representations (ICLR)*, pages 1-20.
|
| 291 |
+
Xintong Wang, Xiaoyu Li, Liang Ding, Sanyuan Zhao, and Chris Biemann. 2023. Using self-supervised dual constraint contrastive learning for cross-modal retrieval. In Proceedings of the 26th European Conference on Artificial Intelligence (ECAI), pages 2552-2559.
|
| 292 |
+
Xintong Wang, Xiaoyu Li, Xingshan Li, and Chris Biemann. 2024a. Probing large language models from a human behavioral perspective. In Proceedings of Bridging Neurons and Symbols for Natural Language Processing and Knowledge Graphs Reasoning (NeusymBridge@LREC-COLING), pages 1-7.
|
| 293 |
+
Xintong Wang, Jingheng Pan, Liang Ding, and Chris Biemann. 2024b. Mitigating hallucinations in large vision-language models with instruction contrastive decoding. In *Findings of the Association for Computational Linguistics (ACL)*, pages 15840-15853.
|
| 294 |
+
Jason Wei, Maarten Bosma, Vincent Y Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. 2021. Finetuned language models are zero-shot learners. arXiv preprint: 2109.01652.
|
| 295 |
+
Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama,
|
| 296 |
+
|
| 297 |
+
Maarten Bosma, Denny Zhou, Donald Metzler, et al. 2022. Emergent abilities of large language models. Transactions on Machine Learning Research.
|
| 298 |
+
An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, et al. 2024. Qwen2.5 technical report. arXiv preprint: 2412.15115.
|
| 299 |
+
Yunzhi Yao, Ningyu Zhang, Zekun Xi, Mengru Wang, Ziwen Xu, Shumin Deng, and Huajun Chen. 2024. Knowledge circuits in pretrained transformers. arXiv preprint: 2405.17969.
|
| 300 |
+
Huifeng Yin, Yu Zhao, Minghao Wu, Xuanfan Ni, Bo Zeng, Hao Wang, Tianqi Shi, Liangying Shao, Chenyang Lyu, Longyue Wang, et al. 2025. Towards widening the distillation bottleneck for reasoning models. arXiv preprint arXiv:2503.01461.
|
| 301 |
+
Tengfei Yu, Liang Ding, Xuebo Liu, Kehai Chen, Meishan Zhang, Dacheng Tao, and Min Zhang. 2023. Promptst: Abstract prompt learning for end-to-end speech translation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 10140-10154.
|
| 302 |
+
Bo Zeng, Chenyang Lyu, Sinuo Liu, Mingyan Zeng, Minghao Wu, Xuanfan Ni, Tianqi Shi, Yu Zhao, Yefeng Liu, Chenyu Zhu, Ruizhe Li, Jiahui Geng, Qing Li, Yu Tong, Longyue Wang, Weihua Luo, and Kaifu Zhang. 2025. Marco-Bench-MIF: On multilingual instruction-following capability of large language models. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (ACL).
|
| 303 |
+
Ningyu Zhang, Yunzhi Yao, Bozhong Tian, Peng Wang, Shumin Deng, Mengru Wang, Zekun Xi, Shengyu Mao, Jintian Zhang, Yuansheng Ni, et al. 2024. A comprehensive study of knowledge editing for large language models. arXiv preprint: 2401.01286.
|
| 304 |
+
Renrui Zhang, Jiaming Han, Chris Liu, Peng Gao, Ao-jun Zhou, Xiangfei Hu, Shilin Yan, Pan Lu, Hongsheng Li, and Yu Qiao. 2023. Llama-adapter: Efficient fine-tuning of language models with zero-init attention. arXiv preprint: 2303.16199.
|
| 305 |
+
Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. 2023. A survey of large language models. arXiv preprint: 2303.18223.
|
| 306 |
+
Yu Zhao, Huifeng Yin, Bo Zeng, Hao Wang, Tianqi Shi, Chenyang Lyu, Longyue Wang, Weihua Luo, and Kaifu Zhang. 2024. Marco-o1: Towards open reasoning models for open-ended solutions. Preprint, arXiv:2411.14405.
|
| 307 |
+
Daniel M Ziegler, Nisan Stiannon, Jeffrey Wu, Tom B Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. 2020. Fine-tuning language models from human preferences. arXiv preprint: 1909.08593.
|
| 308 |
+
|
| 309 |
+
# A Experiment Details
|
| 310 |
+
|
| 311 |
+
Datasets. We evaluate our proposed efficient semantic steering methods using the General Language Understanding Evaluation (GLUE) benchmark, applying selective layer intervention via finetuning. Specifically, we focus on eight GLUE tasks spanning sentiment analysis (SST-2), paraphrase identification (MRPC, QQP), and natural language inference (MNLI-M, MNLI-MM, QNLI, RTE, WNLI). The following are details of each sub-dataset in the GLUE Benchmark.
|
| 312 |
+
|
| 313 |
+
- SST-2 (The Stanford Sentiment Treebank): A binary sentiment classification task (positive vs. negative). The validation set contains 872 examples, while the test set comprises approximately 1.8k examples.
|
| 314 |
+
- MRPC (Microsoft Research Paraphrase Corpus): A paraphrase identification task that requires determining whether two sentences are semantically equivalent. The validation set consists of 400 examples, and the test set contains approximately 1.7k examples.
|
| 315 |
+
- QQP (Quora Question Pairs): Another paraphrase identification task in which the goal is to determine whether two questions are semantically equivalent. The validation set contains 40k examples, while the test set includes around 391k examples.
|
| 316 |
+
- MNLI (Multi-Genre Natural Language Inference): Given a premise and a hypothesis, the model must predict whether the premise entails, contradicts, or is neutral with respect to the hypothesis. There are two validation sets (MNLI-M and MNLI-MM), each containing approximately 10k examples, along with two corresponding test sets of the same size.
|
| 317 |
+
- QNLI (Question Natural Language Inference): A task reformulated from SQuAD, where the objective is to determine whether a context sentence contains the answer to a given question. Both the validation and test sets contain approximately 5.5k examples.
|
| 318 |
+
- RTE (Recognizing Textual Entailment): A binary entailment task in which the model must determine whether a premise logically entails a hypothesis. The validation set consists of 277 examples, while the test set contains around 3k examples.
|
| 319 |
+
|
| 320 |
+
- WNLI (Winograd NLI): Based on the Winograd Schema Challenge, this task involves resolving ambiguous pronouns. Models must determine whether substituting the pronoun in a sentence preserves its meaning. The validation set includes 71 examples, and the test set contains 146 examples.
|
| 321 |
+
|
| 322 |
+
To train toxic adapters and contrast models, as described in Sections 4.2 and 4.3, we use the Toxic Comment Classification Challenge Dataset (Jigsaw, 2018), which contains 15,294 annotated toxic comments. We randomly split this dataset into 13,764 comments for fine-tuning and contrast model training, and 1,530 comments for validation, which is used to determine the optimal layer for intervention, as described in Section 4.1.
|
| 323 |
+
|
| 324 |
+
Implementation. For training the GPT-2 adapters, we set the learning rate to $5 \times 10^{-4}$ and train for 5 epochs. For the Llama2-7B adapters, we adopted the default settings provided by LLaMaAdapter (Zhang et al., 2023), using a base learning rate of $9 \times 10^{-3}$ , a weight decay of 0.02, and training for 5 epochs. For Mistral-7B, we similarly employed the Bottleneck Adapters used for GPT-2, training for 5 epochs with a learning rate of $5 \times 10^{-5}$ and a weight decay of 0.01. In the detoxification task, we applied the implicit layer contrastive intervention approach with $\alpha = 0.4$ across all models. Following previous works (Liu et al., 2021; Leong et al., 2023), the model generates 25 continuations per prompt using nucleus sampling with $p = 0.9$ , with each continuation limited to a maximum of 20 tokens.
|
| 325 |
+
|
| 326 |
+
# B Analysis on Language Toxification and Detoxification on Small Models
|
| 327 |
+
|
| 328 |
+
For the GPT-2 models, three versions differ in the number of layers. As shown in Figures 4 and 5, the overall trend in the toxification and detoxification tasks aligns with the observations in Section 5. Interestingly, we find that as the number of layers in LLMs increases, the correlation trend and findings become more pronounced.
|
| 329 |
+
|
| 330 |
+
# C Qualitative Analysis
|
| 331 |
+
|
| 332 |
+
# Warning: Some examples have harmful or offensive language.
|
| 333 |
+
|
| 334 |
+
In this section, we conduct a qualitative analysis of the continuations generated under different settings of the GPT2-L model. For language toxicification, we compare four continuations produced
|
| 335 |
+
|
| 336 |
+

|
| 337 |
+
Figure 4: Toxification/Detoxification Evaluation on GPT-2 Small (12 Layers). The bottom chart shows toxicity scores for interventions at each layer: green bars represent selective intervention via fine-tuning, and purple bars represent selective intervention during inference. The top chart displays detoxify margin scores per layer, comparing toxicity scores in toxification and detoxification processes. Purple, blue, and orange boxes indicate the premature, middle, and mature buckets.
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 5: Toxification/Detoxification Evaluation on GPT-2 Medium (24 Layers). The bottom chart shows toxicity scores for interventions at each layer: green bars represent selective intervention via fine-tuning, and purple bars represent selective intervention during inference. The top chart displays detoxify margin scores per layer, comparing toxicity scores in toxification and detoxification processes. Purple, blue, and orange boxes indicate the premature, middle, and mature buckets.
|
| 341 |
+
|
| 342 |
+
from a toxic prompt in the Toxic Comment Classification Challenge Dataset. The continuation generated by fine-tuning only the last layer is similar to that of the vanilla GPT2-L model. By contrast, fine-tuning on the full model and the selective layer results in more toxic outputs in terms of both toxic words and the overall semantics of the sentence.
|
| 343 |
+
|
| 344 |
+
For detoxification, we find that the continuation generated using layer contrastive intervention at the last layer still contains offensive words, such as stupid, whereas the output from layer contrastive intervention based on our proposed heuristic steering layer selection is neutral.
|
| 345 |
+
|
| 346 |
+

|
| 347 |
+
Figure 6: Case Study. The continuations are produced from a toxic prompt in the Toxic Comment Classification Challenge Dataset and generated under different settings of the GPT2-L model.
|
| 348 |
+
|
| 349 |
+
# D Detailed Interpretability Analysis
|
| 350 |
+
|
| 351 |
+
Reading is a crucial ability for humans to process and integrate information, and eye movement studies enable the examination of the cognitive processes involved in reading (Rayner, 1998). Eye movements are monitored using various techniques, including eye-tracking systems that rely on infrared pupil monitoring. In eye-tracking studies, changes in the reader's gaze are recorded in relation to eye movements. Similarly, tokens are processed, and
|
| 352 |
+
|
| 353 |
+
information is integrated through layers in large language models (Chuang et al., 2023). This similarity offers us the opportunity to leverage the extensive data previously collected and analyzed from eye movement studies, not only to infer human reading and information-processing behavior, but now to also understand the behavioral patterns of large language models.
|
| 354 |
+
|
| 355 |
+
Recent studies reveal that feed-forward networks (FFNs) function similarly to neural memory networks (Geva et al., 2021), embedding syntactic features, semantic features, and even factual knowledge (Chuang et al., 2023; Zhang et al., 2024). The early exit concept (Elbayad et al., 2020; Schuster et al., 2022) further demonstrates that the hidden states of FFNs can be directly applied to predict words over a vocabulary. At the same time, eye movement measures provide insights into the time required for human reading to process syntax, semantics, and integrate information.
|
| 356 |
+
|
| 357 |
+
Motivated by this, we utilize eye movement measures from various datasets (Luke and Christianson, 2018; Hollenstein et al., 2020; Colman et al., 2022) to establish correlations with the hidden states in FFNs across layers of LLMs. Unlike traditional eye movement studies, which focus on differences in eye movement measures under experimental conditions such as natural reading or task-specific reading, we observe changes in correlation values between eye movement measures and hidden states across layers. Our approach, inspired by cognitive theory, aims to better understand the behavioral patterns of LLMs.
|
| 358 |
+
|
| 359 |
+
Formally, let $S_{j}$ denote the $j$ -th sentence, which consists of $n_j$ words $w_1, w_2, \ldots, w_{n_j}$ . For each word $w_i$ in sentence $S_{j}$ , we have five eye movement measures for each word $w_i$ in sentence $S_{j}$ , denoted as $E_{i}^{(sfd)}, E_{i}^{(ffd)}, E_{i}^{(gd)}, E_{i}^{(trt)}, E_{i}^{(gpt)}$ . Each of these represents a single scalar value per word. We also denote the hidden state at layer $l$ of the LLM for word $w_i$ as $\mathbf{H}_{l,i} \in \mathbb{R}^d$ , where $d$ is the dimensionality of the hidden state vectors.
|
| 360 |
+
|
| 361 |
+
Since the eye movement measures are scalar values and each hidden state is a high-dimensional vector, we apply Principal Component Analysis (PCA) to reduce the dimensionality of the hidden states $\mathbf{H}_{l,i}$ to a scalar that can be aligned with the eye movement measure for each word $w_{i}$ , yielding a one-dimensional representation: $H_{l,i}^{PCA} = PCA(\mathbf{H}_{l,i})$ . We concatenate the eye movement measures and the reduced hidden states across all
|
| 362 |
+
|
| 363 |
+
words in all sentences. Specifically, for the eye movement measure $k \in \{sfd, ffd, gd, trt, gpt\}$ , we concatenate the measures for all words in all sentences to form a vector $\mathbf{E}^{(k)}$ :
|
| 364 |
+
|
| 365 |
+
$$
|
| 366 |
+
\mathbf {E} ^ {(k)} = \left[ E _ {1} ^ {(k)}, E _ {2} ^ {(k)}, \dots , E _ {n _ {\text {t o t a l}}} ^ {(k)} \right] \in \mathbb {R} ^ {n _ {\text {t o t a l}}}, \tag {9}
|
| 367 |
+
$$
|
| 368 |
+
|
| 369 |
+
where $n_{\mathrm{total}} = \sum_{j=1}^{m} n_{j}$ is the total number of words across all sentences. Similarly, for the PCA-reduced hidden states at layer $l$ , we concatenate the reduced hidden states:
|
| 370 |
+
|
| 371 |
+
$$
|
| 372 |
+
\mathbf {H} _ {l} ^ {\mathrm {P C A}} = \left[ H _ {l, 1} ^ {\mathrm {P C A}}, H _ {l, 2} ^ {\mathrm {P C A}}, \dots , H _ {l, n _ {\text {t o t a l}}} ^ {\mathrm {P C A}} \right] \in \mathbb {R} ^ {n _ {\text {t o t a l}}}. \tag {10}
|
| 373 |
+
$$
|
| 374 |
+
|
| 375 |
+
Finally, we compute the Pearson correlation $\rho_{l,k}$ between the hidden states at layer $l$ and the eye movement measure $k$ :
|
| 376 |
+
|
| 377 |
+
$$
|
| 378 |
+
\rho_ {l, k} = \frac {\sum_ {i = 1} ^ {n _ {\text {t o t a l}}} \left(H _ {l , i} ^ {\mathrm {P C A}} - \bar {H} _ {l} ^ {\mathrm {P C A}}\right) \left(E _ {i} ^ {(k)} - \bar {E} ^ {(k)}\right)}{\sqrt {\sum_ {i = 1} ^ {n _ {\text {t o t a l}}} \left(H _ {l , i} ^ {\mathrm {P C A}} - \bar {H} _ {l} ^ {\mathrm {P C A}}\right) ^ {2}} \sqrt {\sum_ {i = 1} ^ {n _ {\text {t o t a l}}} \left(E _ {i} ^ {(k)} - \bar {E} ^ {(k)}\right) ^ {2}}}, \tag {11}
|
| 379 |
+
$$
|
| 380 |
+
|
| 381 |
+
where $\bar{H}_l^{\mathrm{PCA}}$ and $\bar{E}^{(k)}$ are the mean values of the reduced hidden states and the eye movement measure $k$ , respectively.
|
| 382 |
+
|
| 383 |
+
We conduct a correlation analysis using the GPT-2 model at different sizes (12-layer small, 24-layer medium, 36-layer large) and the 32-layer Llama2-7B, following the analysis approach described earlier. To better interpret our observations, we divide the layers into three equal groups: premature, middle, and mature. Figure 7 presents the correlation results between different eye movement measures and the hidden states from the LLMs, as well as how these values change across layers.
|
| 384 |
+
|
| 385 |
+
We observe Pattern #1, where LLMs exhibit a trend similar to human gaze patterns across layers, with a peak correlation in the middle bucket. In the premature bucket, the correlation first increases, then decreases, before gradually increasing again in the later layers. In the middle bucket, the correlation reaches a peak before declining. In the mature bucket, the correlation continues to decrease, followed by a second peak. This similarity in trends is consistent across both different eye movement measures and LLMs with varying layer sizes.
|
| 386 |
+
|
| 387 |
+
Furthermore, we apply eye movement theory to interpret the phenomenon observed in Pattern #1, offering insights into the interpretability of LLMs. First fixation duration refers to the time spent on the first fixation on a word, whether it is the only
|
| 388 |
+
|
| 389 |
+
fixation or the first of multiple fixations on that word. Gaze duration measures the time spent on a word during the first fixation before making a saccade to the next word. Additionally, single fixation duration refers to the time of the first and only fixation on a word.
|
| 390 |
+
|
| 391 |
+
Based on these fixation measures, the increase in correlation in the premature bucket indicates that the LLMs are beginning to process tokens by integrating syntactic and semantic features, suggesting that this bucket focuses on preliminary token processing. Geva et al. (2022) found that syntactic and semantic concepts stabilize in the first few layers using top scoring token analysis. Thus, we hypothesize that the subsequent decline in correlation may indicate that these layers are redundant but still become activated when processing more complex sentences, a point that will be explained further.
|
| 392 |
+
|
| 393 |
+
In the middle bucket, the increase in correlation signifies further processing of syntactic and semantic tokens, and the peak indicates the integration of linguistic features and information. In the mature bucket, the decline in correlation differs from that in the premature bucket. We hypothesize that the layers in the mature bucket are responsible for reasoning and factual knowledge, which will be discussed later. The second peak in the mature bucket likely represents the final integration of information for word prediction.
|
| 394 |
+
|
| 395 |
+
Moreover, total reading time represents the sum of all fixations, starting with the first fixation in a region and ending with the first forward saccade, including regressions. Go-past time refers to the total time spent on a word before moving to the right of it, including regressions, but it excludes re-fixations. Regressions are meaningful indicators, as they indicate that the reader had difficulty processing the word, failed to understand the current text, or needed to make corrections (Rayner, 1998).
|
| 396 |
+
|
| 397 |
+
When we zoom in on the correlation between measures like trt, gpt, and the hidden states in LLMs, the trend is consistent with the fixation-based measures. Interestingly, we observe that the correlation with trt also increases in the premature bucket. Unlike previous studies, which suggest that the first few layers of LLMs only process surface linguistic features (Zhang et al., 2024), our correlation analysis shows that these layers also engage in contextual information processing.
|
| 398 |
+
|
| 399 |
+
Lastly, we compare the correlation results between GPT-2 and Llama2-7B to investigate the effect of modern training schemes on LLMs. The
|
| 400 |
+
|
| 401 |
+

|
| 402 |
+
|
| 403 |
+

|
| 404 |
+
Figure 7: Correlation Results Under the Natural Reading Scheme. Correlation results are shown for GPT-2 Small (12 layers, top-left), GPT-2 Medium (32 layers, top-right), GPT-2 Large (36 layers, bottom-left), and Llama2-7B (bottom-right). Green, blue, and orange boxes indicate the premature, middle, and mature buckets, respectively.
|
| 405 |
+
|
| 406 |
+

|
| 407 |
+
|
| 408 |
+

|
| 409 |
+
|
| 410 |
+
overall trend across the three buckets is similar. However, we observe three major differences. The first notable difference is that the first layer of Llama2-7B already shows a significant correlation with eye movement measures, likely due to the large amount of pre-training data. The second difference is the presence of a peak correlation in the middle bucket, with no evident decline afterward until reaching a second peak in the mature bucket. As discussed earlier, the premature bucket in GPT-2 is primarily responsible for token processing, while in Llama2-7B, it also contributes to reasoning. The last two differences will be elaborated on later. We believe that Llama2-7B employs modern pre-training techniques, such as instruction tuning (IT) (Brown et al., 2020) and RLHF (Ziegler et al., 2020), which distribute reasoning and factual knowledge abilities not only to the middle and mature layers but across all layers.
|
| 411 |
+
|
| 412 |
+
Empirically, LLMs are trained with the next-token prediction objective. Modern LLMs exhibit strong language understanding and reasoning abilities. This raises the question: are LLMs merely next-token predictors, or are they task reasoners? In the ZuCo 2.0 dataset (Hollenstein et al., 2020), there are two different settings for eye movement studies: natural reading and task-specific reading. In the task-specific reading, participants are required to determine whether a specific relation type is present in a sentence, including categories like
|
| 413 |
+
|
| 414 |
+
political affiliations, education, founder, spouse, job title, nationality, and employer. Relation detection is a high-level semantic and reasoning task that demands complex cognitive processing.
|
| 415 |
+
|
| 416 |
+
Figure 2 shows the comparison between natural reading and task-specific reading in terms of correlations between eye movement measures and hidden states in LLMs across layers. We observe Pattern #2, where LLMs function as both next-token predictors and reasoners. For the GPT-2 model, the correlation values in the premature bucket during task-specific reading are lower than those in natural reading, indicating that the layers in GPT-2's premature bucket primarily handle token processing, not reasoning. However, in the middle bucket, the correlation peak in task-specific reading is higher than in natural reading. Furthermore, the decline in correlation across the middle and mature buckets is less pronounced, suggesting that layers in the mature bucket are particularly involved in reasoning.
|
| 417 |
+
|
| 418 |
+
For Llama2-7B, the correlation in the premature bucket increases in task-specific reading compared to natural reading, indicating that these layers handle both token processing and reasoning. Additionally, the correlation in both the middle and mature buckets significantly increases, suggesting that the middle bucket is responsible for token processing, information integration, and reasoning, while the mature bucket plays a key role in information integration and reasoning.
|
2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1ed20e57b477d21ab924fbe590472aba185d9567449829a5b3d8e995c75e44b
|
| 3 |
+
size 620152
|
2025/CogSteer_ Cognition-Inspired Selective Layer Intervention for Efficiently Steering Large Language Models/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/760a004c-dbd3-4753-a421-fea5977279f9_content_list.json
ADDED
|
@@ -0,0 +1,1779 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "CoinMath: Harnessing the Power of Coding Instruction for Math LLMs",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
126,
|
| 8 |
+
89,
|
| 9 |
+
870,
|
| 10 |
+
110
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Chengwei Wei, Bin Wang, Jung-jae Kim, Guimei Liu, Nancy F. Chen",
|
| 17 |
+
"bbox": [
|
| 18 |
+
164,
|
| 19 |
+
134,
|
| 20 |
+
840,
|
| 21 |
+
152
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "$\\diamond$ Institute for Infocomm Research $(\\mathrm{I}^{2}\\mathrm{R})$ , A*STAR, Singapore",
|
| 28 |
+
"bbox": [
|
| 29 |
+
250,
|
| 30 |
+
153,
|
| 31 |
+
749,
|
| 32 |
+
170
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "†Centre for Frontier AI Research (CFAR), A*STAR, Singapore",
|
| 39 |
+
"bbox": [
|
| 40 |
+
245,
|
| 41 |
+
170,
|
| 42 |
+
757,
|
| 43 |
+
186
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "wei_chengwei@i2r.a-star.edu.sg",
|
| 50 |
+
"bbox": [
|
| 51 |
+
347,
|
| 52 |
+
187,
|
| 53 |
+
653,
|
| 54 |
+
203
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "Abstract",
|
| 61 |
+
"text_level": 1,
|
| 62 |
+
"bbox": [
|
| 63 |
+
260,
|
| 64 |
+
252,
|
| 65 |
+
339,
|
| 66 |
+
266
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "Large Language Models (LLMs) have shown strong performance in solving mathematical problems, with code-based solutions proving particularly effective. However, the best practice to leverage coding instruction data to enhance mathematical reasoning remains under-explored. This study investigates three key questions: (1) How do different coding styles of mathematical code-based rationales impact LLMs' learning performance? (2) Can general-domain coding instructions improve performance? (3) How does integrating textual rationales with code-based ones during training enhance mathematical reasoning abilities? Our findings reveal that code-based rationales with concise comments, descriptive naming, and hardcoded solutions are beneficial, while improvements from general-domain coding instructions and textual rationales are relatively minor. Based on these insights, we propose CoinMath, a learning strategy designed to enhance mathematical reasoning by diversifying the coding styles of code-based rationales. CoinMath generates a variety of code-based rationales incorporating concise comments, descriptive naming conventions, and hardcoded solutions. Experimental results demonstrate that CoinMath significantly outperforms its baseline model, MAmmoTH, one of the SOTA math LLMs. $^{1}$",
|
| 73 |
+
"bbox": [
|
| 74 |
+
144,
|
| 75 |
+
278,
|
| 76 |
+
460,
|
| 77 |
+
703
|
| 78 |
+
],
|
| 79 |
+
"page_idx": 0
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"type": "text",
|
| 83 |
+
"text": "1 Introduction",
|
| 84 |
+
"text_level": 1,
|
| 85 |
+
"bbox": [
|
| 86 |
+
114,
|
| 87 |
+
715,
|
| 88 |
+
258,
|
| 89 |
+
730
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "Large Language Models (LLMs) have been extensively applied to solving mathematical problems (Lewkowycz et al., 2022; Azerbayev et al., 2023; Luo et al., 2023; Ahn et al., 2024; Shao et al., 2024). Recently, the approach of using code-based solutions has achieved significant success, as the calculations are handled by a program interpreter, while the reasoning steps are effectively represented in code format. Prior studies on prompt",
|
| 96 |
+
"bbox": [
|
| 97 |
+
112,
|
| 98 |
+
740,
|
| 99 |
+
489,
|
| 100 |
+
885
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "ing, such as Program-of-Thoughts (PoT) (Chen et al., 2022) and Program-Aided Language models (PAL) (Gao et al., 2023a), have demonstrated that generating solutions in a code format significantly enhances LLM performance on mathematical tasks compared to Chain-of-Thoughts (CoT) which uses a text format (Wei et al., 2022). Furthermore, LLMs trained on mathematical instruction data with code-based rationales, reasoning steps presented in executable code, have shown strong performance (Wang et al., 2023a; Yue et al., 2023; Zhang et al., 2024a; Toshniwal et al., 2024).",
|
| 107 |
+
"bbox": [
|
| 108 |
+
507,
|
| 109 |
+
252,
|
| 110 |
+
884,
|
| 111 |
+
445
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Given the demonstrated effectiveness of mathematical instruction data with code-based rationales, there is growing interest in synthesizing additional mathematical problems to expand mathematical coding instruction datasets (Zhang et al., 2024a; Toshniwal et al., 2024), aiming to enhance the performance further. Despite this progress, the question of how such coding instruction data can be best leveraged to maximize its impact remains underexplored. Recently, Zhang et al. (2024b) showed that model instruction-tuned on text or a mix of text and code outperforms models trained solely on code in mathematical reasoning. However, the conclusions are drawn from evaluating the models by generating solutions in a text format instead of a code format. Bi et al. (2024) found that code-based rationales of medium complexity yield the best reasoning performance.",
|
| 118 |
+
"bbox": [
|
| 119 |
+
507,
|
| 120 |
+
449,
|
| 121 |
+
884,
|
| 122 |
+
738
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "Taking this further, our study delves deeper into the effective utilization of existing coding instruction data to enhance mathematical reasoning. Specifically, we first conduct a comprehensive study on coding instruction to address three critical questions: 1) How do different coding styles (e.g., having a detailed comment or not) of mathematical code-based rationales impact LLMs' learning performance in mathematical reasoning? 2) Can coding instructions from general domains, beyond math, provide meaningful benefits under PoT rea",
|
| 129 |
+
"bbox": [
|
| 130 |
+
507,
|
| 131 |
+
741,
|
| 132 |
+
885,
|
| 133 |
+
917
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 0
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "page_footnote",
|
| 139 |
+
"text": "1Our model, code, and datasets are open-sourced at https: //github.com/amao0o0/coinMath",
|
| 140 |
+
"bbox": [
|
| 141 |
+
112,
|
| 142 |
+
892,
|
| 143 |
+
487,
|
| 144 |
+
917
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 0
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "page_number",
|
| 150 |
+
"text": "786",
|
| 151 |
+
"bbox": [
|
| 152 |
+
485,
|
| 153 |
+
927,
|
| 154 |
+
515,
|
| 155 |
+
939
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 0
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "footer",
|
| 161 |
+
"text": "Findings of the Association for Computational Linguistics: ACL 2025, pages 786-797",
|
| 162 |
+
"bbox": [
|
| 163 |
+
236,
|
| 164 |
+
945,
|
| 165 |
+
759,
|
| 166 |
+
957
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 0
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "footer",
|
| 172 |
+
"text": "July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
|
| 173 |
+
"bbox": [
|
| 174 |
+
268,
|
| 175 |
+
959,
|
| 176 |
+
726,
|
| 177 |
+
971
|
| 178 |
+
],
|
| 179 |
+
"page_idx": 0
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"type": "text",
|
| 183 |
+
"text": "soning? and 3) How does integrating textual rationales with code-based ones during instruction tuning enhance mathematical reasoning abilities?",
|
| 184 |
+
"bbox": [
|
| 185 |
+
112,
|
| 186 |
+
84,
|
| 187 |
+
487,
|
| 188 |
+
131
|
| 189 |
+
],
|
| 190 |
+
"page_idx": 1
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"type": "text",
|
| 194 |
+
"text": "Our findings can be summarized as follows:",
|
| 195 |
+
"bbox": [
|
| 196 |
+
132,
|
| 197 |
+
135,
|
| 198 |
+
460,
|
| 199 |
+
149
|
| 200 |
+
],
|
| 201 |
+
"page_idx": 1
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"type": "list",
|
| 205 |
+
"sub_type": "text",
|
| 206 |
+
"list_items": [
|
| 207 |
+
"- Mathematical code-based rationales that include concise comments and descriptive naming conventions are the most effective. Hard-coded rationales offer straightforward solutions that facilitate the model's learning.",
|
| 208 |
+
"- General domain coding instructions provide limited performance improvement compared to those from the mathematical domain.",
|
| 209 |
+
"- Adding textual rationales of math questions slightly enhances the performance of general-purpose models. In contrast, textual rationales do not benefit code-specialized models."
|
| 210 |
+
],
|
| 211 |
+
"bbox": [
|
| 212 |
+
134,
|
| 213 |
+
155,
|
| 214 |
+
487,
|
| 215 |
+
370
|
| 216 |
+
],
|
| 217 |
+
"page_idx": 1
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"type": "text",
|
| 221 |
+
"text": "As the impact of coding instructions from general domains and textual rationales is minimal, while models exhibit varying behaviors toward code-based rationales with different coding styles, we propose CoinMath, short for Coding Instruction for Math, a learning strategy to effectively enhance LLMs' mathematical reasoning capabilities. CoinMath diversifies the coding styles of code-based rationales by incorporating advantageous coding attributes, including concise comments, descriptive naming, and hardcoded solutions. Experimental results demonstrate that CoinMath significantly outperforms the previous SOTA Math LLMs.",
|
| 222 |
+
"bbox": [
|
| 223 |
+
112,
|
| 224 |
+
375,
|
| 225 |
+
489,
|
| 226 |
+
598
|
| 227 |
+
],
|
| 228 |
+
"page_idx": 1
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"type": "text",
|
| 232 |
+
"text": "Our major contributions are as follows:",
|
| 233 |
+
"bbox": [
|
| 234 |
+
132,
|
| 235 |
+
602,
|
| 236 |
+
423,
|
| 237 |
+
618
|
| 238 |
+
],
|
| 239 |
+
"page_idx": 1
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"type": "list",
|
| 243 |
+
"sub_type": "text",
|
| 244 |
+
"list_items": [
|
| 245 |
+
"- We present a systematic study that investigates what makes diverse coding instructions effective, how they enhance the mathematical reasoning of LLMs, and why they work, uncovering the key factors behind their impact.",
|
| 246 |
+
"- Based on the above findings, we propose CoinMath, a learning strategy that improves LLMs' mathematical reasoning by incorporating code-based rationales with concise comments, descriptive naming conventions, and hardcoded solutions. Experimental results show that it outperforms the SOTA model by an average improvement of $5.9\\%$ in accuracy.",
|
| 247 |
+
"- We release the CoinMath model, curated datasets, and training and evaluation pipelines, enabling reproducibility and advancing research in mathematical reasoning for LLMs."
|
| 248 |
+
],
|
| 249 |
+
"bbox": [
|
| 250 |
+
134,
|
| 251 |
+
621,
|
| 252 |
+
487,
|
| 253 |
+
917
|
| 254 |
+
],
|
| 255 |
+
"page_idx": 1
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "2 Related Work",
|
| 260 |
+
"text_level": 1,
|
| 261 |
+
"bbox": [
|
| 262 |
+
509,
|
| 263 |
+
83,
|
| 264 |
+
665,
|
| 265 |
+
98
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 1
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "Solving Math with Code. Chain-of-Thought (CoT) prompting (Nye et al., 2021; Wei et al., 2022), which guides LLMs to generate intermediate steps in textual rationales, has proven effective on reasoning tasks. Expanding on this foundation, Program-of-Thoughts (PoT) and Program-Aided Language models (PAL) (Chen et al., 2022; Gao et al., 2023a) have used code for reasoning. These methods prompt LLMs to generate reasoning steps as code and assign computations to external program interpreters, which has achieved significant success, particularly in mathematical reasoning tasks that involve complex calculations and logical operations. Subsequently, recent works (Toshniwal et al., 2024; Wang et al., 2023a; Yue et al., 2023; Gou et al., 2024) have constructed mathematical instruction datasets with code-based rationales and fine-tuned LLMs on them, further improving model performance on solving math problems.",
|
| 272 |
+
"bbox": [
|
| 273 |
+
507,
|
| 274 |
+
109,
|
| 275 |
+
882,
|
| 276 |
+
414
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 1
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "Effect of Coding Instruction on Mathematical Reasoning. Several studies have explored coding instruction's impact on LLMs' mathematical reasoning abilities. Wang et al. (2023b) and Ma et al. (2024) indicated that coding instruction only enhances task-specific reasoning capabilities, which suggests non-math-specific data have minimal or even negative effects on mathematical reasoning. Zhang et al. (2024b) found that models trained on pure textual instructions or a combination of textual and coding instructions perform better in mathematical reasoning than those trained solely on coding instructions. However, the evaluations of these studies focused on CoT reasoning and generating textual solutions rather than code-based ones, which may limit the potential benefits of coding instructions. By contrast, Bi et al. (2024) evaluated models in PoT reasoning and revealed that mathematical code-based rationales with medium complexity lead to the most significant improvements. However, they did not comprehensively examine the effects of different coding styles, code domains, or the interplay between textual and code-based rationales in enhancing mathematical reasoning.",
|
| 283 |
+
"bbox": [
|
| 284 |
+
507,
|
| 285 |
+
414,
|
| 286 |
+
882,
|
| 287 |
+
801
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 1
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "3 Study on Coding Instruction",
|
| 294 |
+
"text_level": 1,
|
| 295 |
+
"bbox": [
|
| 296 |
+
507,
|
| 297 |
+
813,
|
| 298 |
+
789,
|
| 299 |
+
829
|
| 300 |
+
],
|
| 301 |
+
"page_idx": 1
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"type": "text",
|
| 305 |
+
"text": "This study investigates the effective utilization of coding instructions to enhance the mathematical reasoning abilities of LLMs. It focuses on three key questions. 1) Coding Style: Identifying the effect of different coding styles of mathematical code",
|
| 306 |
+
"bbox": [
|
| 307 |
+
507,
|
| 308 |
+
839,
|
| 309 |
+
882,
|
| 310 |
+
917
|
| 311 |
+
],
|
| 312 |
+
"page_idx": 1
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"type": "page_number",
|
| 316 |
+
"text": "787",
|
| 317 |
+
"bbox": [
|
| 318 |
+
485,
|
| 319 |
+
928,
|
| 320 |
+
515,
|
| 321 |
+
940
|
| 322 |
+
],
|
| 323 |
+
"page_idx": 1
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"type": "text",
|
| 327 |
+
"text": "based rationales on LLMs' mathematical reasoning learning. 2) Code Domain: Exploring whether coding instructions from general (non-mathematical) domains can enhance performance in solving mathematical problems under PoT reasoning. 3) Integration with Textual Rationales: Evaluating the impact of combining mathematical textual rationales with code-based ones during training to enhance mathematical performance.",
|
| 328 |
+
"bbox": [
|
| 329 |
+
110,
|
| 330 |
+
84,
|
| 331 |
+
489,
|
| 332 |
+
228
|
| 333 |
+
],
|
| 334 |
+
"page_idx": 2
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "To explore the above questions, we collect instruction tuning datasets for three types: Math-Text, Math-Code and General Code. The Math-Text dataset, derived from MathInstruct (Yue et al., 2023), contains 26k math questions annotated with textual rationales. Similarly, Math-Code is another subset of MathInstruct, consisting of the same 26k math questions as Math-Text but annotated with code-based rationales. Finally, General Code comprises 21k Python coding instructions for non-math-specific tasks, curated from Code Alpaca (Chaudhary, 2023) and code generation tasks<sup>2</sup>. Detailed statistics for these datasets can be found in Appendix Table 7.",
|
| 339 |
+
"bbox": [
|
| 340 |
+
115,
|
| 341 |
+
231,
|
| 342 |
+
489,
|
| 343 |
+
455
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 2
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "text",
|
| 349 |
+
"text": "For evaluation datasets, we use four math Q&A datasets representing distinct mathematical perspectives: (1) Arithmetic: A dataset of arithmetic questions from MathBench (Liu et al., 2024). (2) SVAMP (Patel et al., 2021): A primary-school-level algebraic word problem dataset. (3) GSM (Cobbe et al., 2021): A middle-school-level algebraic word problem dataset. (4) MATH (Hendrycks et al., 2021): A challenging dataset that extends beyond the high school level and covers diverse topics, including algebra, precalculus, and number theory. Examples from each dataset are provided in Appendix Figure 5. While Arithmetic focuses solely on basic arithmetic, the difficulty of mathematical problems increases progressively from SVAMP to GSM, and finally to MATH. By default, we use PoT reasoning during evaluation unless otherwise specified as CoT reasoning.",
|
| 350 |
+
"bbox": [
|
| 351 |
+
115,
|
| 352 |
+
458,
|
| 353 |
+
489,
|
| 354 |
+
747
|
| 355 |
+
],
|
| 356 |
+
"page_idx": 2
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"type": "text",
|
| 360 |
+
"text": "Both general-purpose and code-specialized models are evaluated. The general-purpose models include Llama-3.1-8B (Dubey et al., 2024) and Gemma-2B (Gemma-Team, 2024), while the code-specialized models include CodeLlama-Python-7B (Roziere et al., 2023) and CodeGemma (CodeGemma-Team, 2024). The instruction tuning details are provided in Appendix D.",
|
| 361 |
+
"bbox": [
|
| 362 |
+
110,
|
| 363 |
+
749,
|
| 364 |
+
489,
|
| 365 |
+
878
|
| 366 |
+
],
|
| 367 |
+
"page_idx": 2
|
| 368 |
+
},
|
| 369 |
+
{
|
| 370 |
+
"type": "text",
|
| 371 |
+
"text": "3.1 Coding Style",
|
| 372 |
+
"text_level": 1,
|
| 373 |
+
"bbox": [
|
| 374 |
+
507,
|
| 375 |
+
84,
|
| 376 |
+
658,
|
| 377 |
+
99
|
| 378 |
+
],
|
| 379 |
+
"page_idx": 2
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "text",
|
| 383 |
+
"text": "What coding styles in code-based rationales are most effective for model learning? To address this question, we examine three key attributes of coding styles that may influence a model's mathematical reasoning capabilities: Comment Usage, Naming Convention, and Solution Generality. Previous studies have discussed the role of variable naming and comment usage in prompting design (Chen et al., 2022; Gao et al., 2023a). In contrast, we focus on the influence of the instruction tuning phase with three attributes including a newly introduced one called, Solution Generality. Figure 1 illustrates examples of different coding styles across these attributes. To generate rationales with diverse coding styles, we employ GPT-4o (OpenAI, 2024) to transform the original code-based rationales in the Math-Code dataset into variations reflecting diverse coding styles. Detailed instructions for generating these rationales are provided in Appendix C.",
|
| 384 |
+
"bbox": [
|
| 385 |
+
505,
|
| 386 |
+
108,
|
| 387 |
+
884,
|
| 388 |
+
414
|
| 389 |
+
],
|
| 390 |
+
"page_idx": 2
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "We focus on evaluating models in a zero-shot setting, as instruction-tuned models trained with datasets featuring different coding styles typically require few-shot examples that align with those styles, but a few-shot setting with different examples for different models may lead to biased evaluation results. Zero-shot evaluation allows us to isolate the effects of the instruction tuning data as the sole variable.",
|
| 395 |
+
"bbox": [
|
| 396 |
+
507,
|
| 397 |
+
414,
|
| 398 |
+
885,
|
| 399 |
+
558
|
| 400 |
+
],
|
| 401 |
+
"page_idx": 2
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "Comment Usage. We analyze the role of comment density in code-based rationales. Comments explain the overall logic of the rationales and the reasoning behind each step. We create three types of code-based rationales with varying comment usages: No Comment, Concise Comment, and Detailed Comment. In No Comment, the code stands alone, requiring the model to learn the code's func",
|
| 406 |
+
"bbox": [
|
| 407 |
+
507,
|
| 408 |
+
561,
|
| 409 |
+
885,
|
| 410 |
+
690
|
| 411 |
+
],
|
| 412 |
+
"page_idx": 2
|
| 413 |
+
},
|
| 414 |
+
{
|
| 415 |
+
"type": "table",
|
| 416 |
+
"img_path": "images/f268012ac10ed8a575622f15d15b9de12819d1911909fced7a4fff81a60840c2.jpg",
|
| 417 |
+
"table_caption": [],
|
| 418 |
+
"table_footnote": [],
|
| 419 |
+
"table_body": "<table><tr><td>Model</td><td>Comment</td><td>A.</td><td>S.</td><td>G.</td><td>M.</td><td>Avg.</td></tr><tr><td rowspan=\"3\">Llama-3.1-8B</td><td>No</td><td>61.7</td><td>30.4</td><td>32.4</td><td>11.5</td><td>34.0</td></tr><tr><td>Concise</td><td>83.3</td><td>80.3</td><td>73.5</td><td>36.4</td><td>68.4</td></tr><tr><td>Detailed</td><td>80.7</td><td>83.4</td><td>73.6</td><td>35.5</td><td>68.3</td></tr><tr><td rowspan=\"3\">CodeLlama-Python-7B</td><td>No</td><td>82.7</td><td>64.4</td><td>52.2</td><td>27.3</td><td>56.7</td></tr><tr><td>Concise</td><td>83.0</td><td>68.7</td><td>59.7</td><td>28.1</td><td>59.9</td></tr><tr><td>Detailed</td><td>83.3</td><td>69.6</td><td>55.4</td><td>27.2</td><td>58.9</td></tr><tr><td rowspan=\"3\">Gemma-2-2B</td><td>No</td><td>73.0</td><td>65.3</td><td>53.6</td><td>25.8</td><td>54.4</td></tr><tr><td>Concise</td><td>77.3</td><td>67.6</td><td>54.7</td><td>26.6</td><td>56.6</td></tr><tr><td>Detailed</td><td>79.0</td><td>67.2</td><td>54.0</td><td>24.4</td><td>56.2</td></tr><tr><td rowspan=\"3\">CodeGemma-2B</td><td>No</td><td>79.0</td><td>53.1</td><td>40.9</td><td>21.4</td><td>48.6</td></tr><tr><td>Concise</td><td>80.0</td><td>52.0</td><td>41.0</td><td>21.7</td><td>48.7</td></tr><tr><td>Detailed</td><td>81.0</td><td>55.2</td><td>39.7</td><td>21.4</td><td>49.3</td></tr></table>",
|
| 420 |
+
"bbox": [
|
| 421 |
+
524,
|
| 422 |
+
696,
|
| 423 |
+
867,
|
| 424 |
+
847
|
| 425 |
+
],
|
| 426 |
+
"page_idx": 2
|
| 427 |
+
},
|
| 428 |
+
{
|
| 429 |
+
"type": "text",
|
| 430 |
+
"text": "Table 1: Results with different Comment Usages. The best average performance for each model is highlighted in bold. A., S., G., and M. refer to the Arithmetic, SVAMP, GSM, and MATH datasets, respectively.",
|
| 431 |
+
"bbox": [
|
| 432 |
+
507,
|
| 433 |
+
857,
|
| 434 |
+
884,
|
| 435 |
+
915
|
| 436 |
+
],
|
| 437 |
+
"page_idx": 2
|
| 438 |
+
},
|
| 439 |
+
{
|
| 440 |
+
"type": "page_footnote",
|
| 441 |
+
"text": "$^{2}$ https://huggingface.co/datasets/iamtarun/ python_code_instructions_18k_alpaca",
|
| 442 |
+
"bbox": [
|
| 443 |
+
112,
|
| 444 |
+
891,
|
| 445 |
+
457,
|
| 446 |
+
919
|
| 447 |
+
],
|
| 448 |
+
"page_idx": 2
|
| 449 |
+
},
|
| 450 |
+
{
|
| 451 |
+
"type": "page_number",
|
| 452 |
+
"text": "788",
|
| 453 |
+
"bbox": [
|
| 454 |
+
485,
|
| 455 |
+
927,
|
| 456 |
+
515,
|
| 457 |
+
940
|
| 458 |
+
],
|
| 459 |
+
"page_idx": 2
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"type": "text",
|
| 463 |
+
"text": "Question: Calculate the sum $1 + 3 + 5 + \\backslash cdots + 15 + 17$ . Please write a program to solve it.",
|
| 464 |
+
"bbox": [
|
| 465 |
+
193,
|
| 466 |
+
87,
|
| 467 |
+
800,
|
| 468 |
+
101
|
| 469 |
+
],
|
| 470 |
+
"page_idx": 3
|
| 471 |
+
},
|
| 472 |
+
{
|
| 473 |
+
"type": "image",
|
| 474 |
+
"img_path": "images/ad40d9e82ce8b6601407f23b8f8c2b7d4de58a6b95d466e90b216bfbb9fa24d9.jpg",
|
| 475 |
+
"image_caption": [
|
| 476 |
+
"Figure 1: Exemplary code-based rationales in various coding styles (excluding No Comment in Code Notation). Certain lines are folded or omitted for improved visualization."
|
| 477 |
+
],
|
| 478 |
+
"image_footnote": [],
|
| 479 |
+
"bbox": [
|
| 480 |
+
144,
|
| 481 |
+
103,
|
| 482 |
+
853,
|
| 483 |
+
401
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 3
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "tionality and mathematical logic solely from the code. Concise Comment includes essential annotations that clarify key steps in math problem-solving. Detailed Comment rationales offer comprehensive annotations, providing line-by-line explanations of the code's functionality and the underlying mathematical logic. By examining these three types of comment usage, we can assess how the presence and density of comments in instruction data influence the model's mathematical reasoning capabilities.",
|
| 490 |
+
"bbox": [
|
| 491 |
+
112,
|
| 492 |
+
466,
|
| 493 |
+
487,
|
| 494 |
+
642
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 3
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "text",
|
| 500 |
+
"text": "The experimental results are summarized in Table 1. Compared with No Comment, both Concise Comment and Detailed Comment styles exhibit good overall performance, with Concise Comment slightly outperforming Detailed Comment. Additionally, the performance improvement of Concise Comment and Detailed Comment over No Comment is larger for general-purpose models than for the code-specialized models. This suggests that while both general-purpose and code-specific models benefit from comments, code-specialized models inherently have a strong ability to understand code, making comments less critical for them. In contrast, comments are relatively crucial for general-purpose models to better grasp the mathematical reasoning underlying the code.",
|
| 501 |
+
"bbox": [
|
| 502 |
+
112,
|
| 503 |
+
645,
|
| 504 |
+
489,
|
| 505 |
+
901
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 3
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "Naming Convention. We identify naming con",
|
| 512 |
+
"bbox": [
|
| 513 |
+
112,
|
| 514 |
+
903,
|
| 515 |
+
489,
|
| 516 |
+
917
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 3
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "table",
|
| 522 |
+
"img_path": "images/09ad7893ff017d7106cdd3424ae60a6917f48f19ca78d94f43d9822220ce3bff.jpg",
|
| 523 |
+
"table_caption": [],
|
| 524 |
+
"table_footnote": [],
|
| 525 |
+
"table_body": "<table><tr><td>Model</td><td>Naming</td><td>A.</td><td>S.</td><td>G.</td><td>M.</td><td>Avg.</td></tr><tr><td rowspan=\"2\">Llama-3.1-8B</td><td>Descriptive</td><td>82.3</td><td>81.8</td><td>72.9</td><td>35.6</td><td>68.2</td></tr><tr><td>Obscure</td><td>78.0</td><td>80.1</td><td>72.3</td><td>35.7</td><td>66.5</td></tr><tr><td rowspan=\"2\">CodeLlama-Python-7B</td><td>Descriptive</td><td>80.3</td><td>69.8</td><td>58.3</td><td>28.0</td><td>59.1</td></tr><tr><td>Obscure</td><td>79.0</td><td>66.1</td><td>55.5</td><td>28.0</td><td>57.2</td></tr><tr><td rowspan=\"2\">Gemma-2-B</td><td>Descriptive</td><td>74.7</td><td>65.3</td><td>57.8</td><td>26.5</td><td>56.1</td></tr><tr><td>Obscure</td><td>73.7</td><td>62.3</td><td>55.0</td><td>25.9</td><td>54.2</td></tr><tr><td rowspan=\"2\">CodeGemma-2B</td><td>Descriptive</td><td>74.0</td><td>57.3</td><td>40.9</td><td>21.6</td><td>48.4</td></tr><tr><td>Obscure</td><td>72.0</td><td>54.8</td><td>39.7</td><td>21.4</td><td>47.0</td></tr></table>",
|
| 526 |
+
"bbox": [
|
| 527 |
+
522,
|
| 528 |
+
463,
|
| 529 |
+
870,
|
| 530 |
+
570
|
| 531 |
+
],
|
| 532 |
+
"page_idx": 3
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"type": "text",
|
| 536 |
+
"text": "Table 2: Results with different Naming Conventions.",
|
| 537 |
+
"bbox": [
|
| 538 |
+
514,
|
| 539 |
+
579,
|
| 540 |
+
873,
|
| 541 |
+
594
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 3
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "ventions that best support models' mathematical reasoning learning. We design two types of naming conventions, namely, Descriptive Naming and Obscure Naming, while keeping other aspects of the code, such as comments and logic, unchanged. Descriptive Naming uses clear and meaningful names for all variables, whereas obscure naming employs short, non-descriptive names (e.g., single letters or random abbreviations).",
|
| 548 |
+
"bbox": [
|
| 549 |
+
507,
|
| 550 |
+
605,
|
| 551 |
+
882,
|
| 552 |
+
749
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 3
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "As shown in Table 2, the results indicate that Descriptive Naming generally outperforms Obscure Naming. These findings are consistent with previous studies on naming conventions in prompting (Chen et al., 2022; Gao et al., 2023a). This further supports the idea that Descriptive Naming provides semantic context, helping models associate variable and function names with their intended purposes, which in turn enhances their understanding of mathematical problems.",
|
| 559 |
+
"bbox": [
|
| 560 |
+
507,
|
| 561 |
+
758,
|
| 562 |
+
884,
|
| 563 |
+
917
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 3
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "page_number",
|
| 569 |
+
"text": "789",
|
| 570 |
+
"bbox": [
|
| 571 |
+
485,
|
| 572 |
+
927,
|
| 573 |
+
515,
|
| 574 |
+
940
|
| 575 |
+
],
|
| 576 |
+
"page_idx": 3
|
| 577 |
+
},
|
| 578 |
+
{
|
| 579 |
+
"type": "table",
|
| 580 |
+
"img_path": "images/fdf1fc1290c1360113ca32cb70e78f0b842b4bc596374a0486bcfc3b4e3a02b5.jpg",
|
| 581 |
+
"table_caption": [],
|
| 582 |
+
"table_footnote": [],
|
| 583 |
+
"table_body": "<table><tr><td>Model</td><td>Generality</td><td>A.</td><td>S.</td><td>G.</td><td>M.</td><td>Avg.</td></tr><tr><td rowspan=\"2\">Llama-3.1-8B</td><td>Hardcoded</td><td>83.3</td><td>78.9</td><td>73.5</td><td>34.8</td><td>67.6</td></tr><tr><td>Generalized</td><td>78.0</td><td>75.1</td><td>72.7</td><td>29.0</td><td>63.7</td></tr><tr><td rowspan=\"2\">CodeLlama-Python-7B</td><td>Hardcoded</td><td>82.0</td><td>67.9</td><td>58.5</td><td>29.3</td><td>59.4</td></tr><tr><td>Generalized</td><td>71.3</td><td>67.4</td><td>54.8</td><td>21.7</td><td>53.9</td></tr><tr><td rowspan=\"2\">Gemma-2-2B</td><td>Hardcoded</td><td>78.3</td><td>62.5</td><td>55.6</td><td>26.4</td><td>55.7</td></tr><tr><td>Generalized</td><td>68.7</td><td>60.3</td><td>51.4</td><td>18.9</td><td>49.8</td></tr><tr><td rowspan=\"2\">CodeGemma-2B</td><td>Hardcoded</td><td>76.0</td><td>52.8</td><td>40.3</td><td>21.4</td><td>47.6</td></tr><tr><td>Generalized</td><td>68.7</td><td>49.0</td><td>39.2</td><td>16.9</td><td>43.5</td></tr></table>",
|
| 584 |
+
"bbox": [
|
| 585 |
+
127,
|
| 586 |
+
80,
|
| 587 |
+
475,
|
| 588 |
+
186
|
| 589 |
+
],
|
| 590 |
+
"page_idx": 4
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"type": "text",
|
| 594 |
+
"text": "Solution Generality. We explore the benefits of generalized versus hardcoded solutions. In a generalized solution, a reusable function is written to capture the logic underlying the math problem, allowing the code to handle similar mathematical problems by accepting different inputs. Such reusable functions help models acquire generalizable knowledge of mathematical problems, thereby improving their ability to generalize. In contrast, hardcoded solutions are tailored to specific problem instances, making them straightforward and easier for the model to learn.",
|
| 595 |
+
"bbox": [
|
| 596 |
+
112,
|
| 597 |
+
221,
|
| 598 |
+
489,
|
| 599 |
+
413
|
| 600 |
+
],
|
| 601 |
+
"page_idx": 4
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "text",
|
| 605 |
+
"text": "As shown in Table 3, hardcoded solutions consistently outperform generalized solutions, suggesting that models benefit more from the explicit specificity of hardcoded logic, which simplifies learning. However, these results do not imply that hardcoded solutions are always better for mathematical instruction tuning. For example, a retrieval-augmented generation (RAG) model (Gao et al., 2023b) may perform better with generalized solutions if it retrieves relevant functions effectively. We do not explore this area, as our experiments focus on a zero-shot setting for coding styles.",
|
| 606 |
+
"bbox": [
|
| 607 |
+
112,
|
| 608 |
+
414,
|
| 609 |
+
489,
|
| 610 |
+
608
|
| 611 |
+
],
|
| 612 |
+
"page_idx": 4
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"text": "Summary. Based on our analysis of coding styles, we draw the following conclusions: 1) Comments on code-based rationales consistently improve performance as they help LLMs understand the logic behind mathematical problems. 2) Descriptive naming conventions should be adopted to enhance the model's understanding of mathematical problems. 3) The hardcoded style of code-based rationales provides a simpler and more effective approach for model learning.",
|
| 617 |
+
"bbox": [
|
| 618 |
+
112,
|
| 619 |
+
609,
|
| 620 |
+
489,
|
| 621 |
+
771
|
| 622 |
+
],
|
| 623 |
+
"page_idx": 4
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "text",
|
| 627 |
+
"text": "3.2 General Coding Instruction is Limited for Math Reasoning",
|
| 628 |
+
"text_level": 1,
|
| 629 |
+
"bbox": [
|
| 630 |
+
112,
|
| 631 |
+
784,
|
| 632 |
+
487,
|
| 633 |
+
816
|
| 634 |
+
],
|
| 635 |
+
"page_idx": 4
|
| 636 |
+
},
|
| 637 |
+
{
|
| 638 |
+
"type": "text",
|
| 639 |
+
"text": "The second question is whether coding instructions from general domains, i.e. non-mathematical domains, can improve mathematical ability under PoT reasoning. To investigate this, we train models on three instruction tuning datasets: General Code, Math-Code, and a combination of General Code",
|
| 640 |
+
"bbox": [
|
| 641 |
+
112,
|
| 642 |
+
822,
|
| 643 |
+
489,
|
| 644 |
+
917
|
| 645 |
+
],
|
| 646 |
+
"page_idx": 4
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"type": "table",
|
| 650 |
+
"img_path": "images/e2b85b544129e6edb7081d8f186a121f62e6bd7e7c46e456ed999d67aeefc447.jpg",
|
| 651 |
+
"table_caption": [
|
| 652 |
+
"Table 3: Results with different Solution Generalities."
|
| 653 |
+
],
|
| 654 |
+
"table_footnote": [],
|
| 655 |
+
"table_body": "<table><tr><td>IT Data</td><td>Arith</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Avg.</td></tr><tr><td colspan=\"6\">Zero-Shot</td></tr><tr><td>Vanilla Llama</td><td>13.0</td><td>1.4</td><td>1.0</td><td>1.0</td><td>4.1</td></tr><tr><td>+ G.C.</td><td>35.0</td><td>36.6</td><td>25.3</td><td>11.8</td><td>27.2</td></tr><tr><td>+ M.C.</td><td>80.3</td><td>80.9</td><td>73.8</td><td>32.1</td><td>66.8</td></tr><tr><td>+ Mix</td><td>65.3</td><td>75.9</td><td>71.1</td><td>20.3</td><td>58.2</td></tr><tr><td>Vanilla CodeLlama</td><td>19.3</td><td>7.2</td><td>1.2</td><td>2.4</td><td>7.5</td></tr><tr><td>+ G.C.</td><td>70.3</td><td>50.9</td><td>23.4</td><td>14.4</td><td>39.8</td></tr><tr><td>+ M.C.</td><td>83.7</td><td>69.0</td><td>58.7</td><td>29.2</td><td>60.2</td></tr><tr><td>+ Mix</td><td>81.7</td><td>70.6</td><td>58.1</td><td>23.9</td><td>58.6</td></tr></table>",
|
| 656 |
+
"bbox": [
|
| 657 |
+
526,
|
| 658 |
+
80,
|
| 659 |
+
867,
|
| 660 |
+
195
|
| 661 |
+
],
|
| 662 |
+
"page_idx": 4
|
| 663 |
+
},
|
| 664 |
+
{
|
| 665 |
+
"type": "table",
|
| 666 |
+
"img_path": "images/58c4b7eb14db9829d59509586f81d55c1c264422568e58804586fa4abe73163a.jpg",
|
| 667 |
+
"table_caption": [],
|
| 668 |
+
"table_footnote": [],
|
| 669 |
+
"table_body": "<table><tr><td colspan=\"6\">Few-Shot</td></tr><tr><td>Vanilla Llama</td><td>78.0</td><td>73.1</td><td>50.0</td><td>18.0</td><td>54.8</td></tr><tr><td>+ G.C.</td><td>74.7</td><td>76.2</td><td>51.3</td><td>23.0</td><td>56.3</td></tr><tr><td>+ M.C.</td><td>83.7</td><td>80.4</td><td>71.6</td><td>33.8</td><td>67.4</td></tr><tr><td>+ Mix</td><td>78.7</td><td>78.0</td><td>71.6</td><td>34.4</td><td>65.7</td></tr><tr><td>Vanilla CodeLlama</td><td>79.7</td><td>52.9</td><td>21.1</td><td>14.1</td><td>42.0</td></tr><tr><td>+ G.C.</td><td>75.3</td><td>54.0</td><td>27.3</td><td>16.6</td><td>43.3</td></tr><tr><td>+ M.C.</td><td>80.0</td><td>65.8</td><td>54.4</td><td>25.9</td><td>56.5</td></tr><tr><td>+ Mix</td><td>80.7</td><td>65.4</td><td>51.8</td><td>24.7</td><td>55.6</td></tr></table>",
|
| 670 |
+
"bbox": [
|
| 671 |
+
527,
|
| 672 |
+
196,
|
| 673 |
+
867,
|
| 674 |
+
294
|
| 675 |
+
],
|
| 676 |
+
"page_idx": 4
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"type": "text",
|
| 680 |
+
"text": "Table 4: Performance of coding instruction from different domains. G.C., and M.C. represent General Code, and Math-Code, respectively. Vanilla Llama and Vanilla CodeLlama represent Llama-3.1-8B and CodeLlama-Python-7B, respectively. Cells are green if the instruction tuning boosts the vanilla models' performance, and red if the instruction tuning hurts the performance.",
|
| 681 |
+
"bbox": [
|
| 682 |
+
507,
|
| 683 |
+
305,
|
| 684 |
+
884,
|
| 685 |
+
405
|
| 686 |
+
],
|
| 687 |
+
"page_idx": 4
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"type": "text",
|
| 691 |
+
"text": "and Math-Code.",
|
| 692 |
+
"bbox": [
|
| 693 |
+
507,
|
| 694 |
+
416,
|
| 695 |
+
633,
|
| 696 |
+
430
|
| 697 |
+
],
|
| 698 |
+
"page_idx": 4
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"type": "text",
|
| 702 |
+
"text": "Prior studies (Wang et al., 2023b; Zhang et al., 2024b) indicate that, under CoT reasoning, instruction tuning on general code, i.e., non-math-specific data can have trivial or even negative effects on mathematical reasoning abilities. Under PoT reasoning, our experiments reveal a different trend, which is presented in Table 4.",
|
| 703 |
+
"bbox": [
|
| 704 |
+
507,
|
| 705 |
+
432,
|
| 706 |
+
884,
|
| 707 |
+
546
|
| 708 |
+
],
|
| 709 |
+
"page_idx": 4
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "text",
|
| 713 |
+
"text": "In both zero-shot and few-shot settings, training solely on General Code mostly enhances the models' performance in solving math problems. This improvement is primarily attributed to the models' enhanced ability to generate valid code and follow instructions, making the models better suited for PoT reasoning compared to the base model. We define the valid code rate as the percentage of executable code generated by a model. Figure 2 presents the accuracy and valid code rate under zero-shot settings. The results demonstrate that training on General Code significantly improves the models' ability to generate valid code and adhere to instructions, leading to higher accuracy in solving mathematical questions.",
|
| 714 |
+
"bbox": [
|
| 715 |
+
507,
|
| 716 |
+
546,
|
| 717 |
+
885,
|
| 718 |
+
788
|
| 719 |
+
],
|
| 720 |
+
"page_idx": 4
|
| 721 |
+
},
|
| 722 |
+
{
|
| 723 |
+
"type": "text",
|
| 724 |
+
"text": "However, models solely trained on Math-Code achieve the best performance, and incorporating General Code alongside Math-Code reduces its effectiveness. This implies that non-task-relevant coding instructions, i.e., General Code, distract the models and hinder their mathematical reasoning capabilities. These findings suggest that coding instructions from general domains offer limited",
|
| 725 |
+
"bbox": [
|
| 726 |
+
507,
|
| 727 |
+
790,
|
| 728 |
+
882,
|
| 729 |
+
917
|
| 730 |
+
],
|
| 731 |
+
"page_idx": 4
|
| 732 |
+
},
|
| 733 |
+
{
|
| 734 |
+
"type": "page_number",
|
| 735 |
+
"text": "790",
|
| 736 |
+
"bbox": [
|
| 737 |
+
485,
|
| 738 |
+
928,
|
| 739 |
+
515,
|
| 740 |
+
940
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 4
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "image",
|
| 746 |
+
"img_path": "images/810592a4a9956f2c074fec53f8c5fb36a55e9ba767a08f6f81c98d6602717345.jpg",
|
| 747 |
+
"image_caption": [
|
| 748 |
+
"(a) LLama-3.1-8B"
|
| 749 |
+
],
|
| 750 |
+
"image_footnote": [],
|
| 751 |
+
"bbox": [
|
| 752 |
+
134,
|
| 753 |
+
86,
|
| 754 |
+
467,
|
| 755 |
+
206
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 5
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "image",
|
| 761 |
+
"img_path": "images/0d31c2bf6184b0743e82dfe519994e2ebe0c6c88e768318a4a72ea59aff6c3cf.jpg",
|
| 762 |
+
"image_caption": [
|
| 763 |
+
"(b) CodeLlama-Python-7B",
|
| 764 |
+
"Figure 2: Average accuracy and average valid code rate across the evaluation datasets under zero-shot."
|
| 765 |
+
],
|
| 766 |
+
"image_footnote": [],
|
| 767 |
+
"bbox": [
|
| 768 |
+
122,
|
| 769 |
+
235,
|
| 770 |
+
478,
|
| 771 |
+
363
|
| 772 |
+
],
|
| 773 |
+
"page_idx": 5
|
| 774 |
+
},
|
| 775 |
+
{
|
| 776 |
+
"type": "text",
|
| 777 |
+
"text": "benefits for enhancing mathematical reasoning.",
|
| 778 |
+
"bbox": [
|
| 779 |
+
112,
|
| 780 |
+
439,
|
| 781 |
+
465,
|
| 782 |
+
455
|
| 783 |
+
],
|
| 784 |
+
"page_idx": 5
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"type": "text",
|
| 788 |
+
"text": "3.3 Math-Text is Not Always a Supplement for Math-Code",
|
| 789 |
+
"text_level": 1,
|
| 790 |
+
"bbox": [
|
| 791 |
+
112,
|
| 792 |
+
472,
|
| 793 |
+
467,
|
| 794 |
+
502
|
| 795 |
+
],
|
| 796 |
+
"page_idx": 5
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"type": "text",
|
| 800 |
+
"text": "Recent works (Yue et al., 2023; Wang et al., 2023a) commonly employ hybrid training on both textual and code-based rationales to enhance mathematical reasoning. According to Yue et al. (2023), textual rationales contribute to general language-based reasoning, particularly for scenarios where PoT reasoning struggles, such as abstract reasoning in multiple-choice questions.",
|
| 801 |
+
"bbox": [
|
| 802 |
+
112,
|
| 803 |
+
512,
|
| 804 |
+
487,
|
| 805 |
+
640
|
| 806 |
+
],
|
| 807 |
+
"page_idx": 5
|
| 808 |
+
},
|
| 809 |
+
{
|
| 810 |
+
"type": "text",
|
| 811 |
+
"text": "In this study, we delve deeper by focusing on math questions that require concrete calculations, excluding abstract reasoning, and investigate whether Math-Text consistently serves as a supplement to Math-Code. To ensure a fair comparison, we trained models on three instruction tuning datasets: Math-Text, Math-Code, which contain identical mathematical questions, differing only in the rationales provided, and a combination of both.",
|
| 812 |
+
"bbox": [
|
| 813 |
+
112,
|
| 814 |
+
643,
|
| 815 |
+
487,
|
| 816 |
+
788
|
| 817 |
+
],
|
| 818 |
+
"page_idx": 5
|
| 819 |
+
},
|
| 820 |
+
{
|
| 821 |
+
"type": "text",
|
| 822 |
+
"text": "The results presented in Table 5 show different trends between general-purpose and code-specialized models. For the general-purpose model, Llama-3.1-8B, incorporating Math-Text alongside Math-Code slightly improves performance by enhancing the model's ability to comprehend mathematical problems in a language-based manner. However, for code-specialized models, this addi",
|
| 823 |
+
"bbox": [
|
| 824 |
+
112,
|
| 825 |
+
790,
|
| 826 |
+
489,
|
| 827 |
+
917
|
| 828 |
+
],
|
| 829 |
+
"page_idx": 5
|
| 830 |
+
},
|
| 831 |
+
{
|
| 832 |
+
"type": "table",
|
| 833 |
+
"img_path": "images/dcc2a74743af00b76b3af336dba956bc831fc0722ac24b6c78f06d30cfd6aa61.jpg",
|
| 834 |
+
"table_caption": [],
|
| 835 |
+
"table_footnote": [],
|
| 836 |
+
"table_body": "<table><tr><td>Model</td><td>IT Data</td><td>Arith</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Avg</td></tr><tr><td colspan=\"7\">Zero-Shot</td></tr><tr><td rowspan=\"3\">Llama-3.1-8B</td><td>M.T.</td><td>38.7</td><td>62.2</td><td>54.6</td><td>20.6</td><td>44.0</td></tr><tr><td>M.C.</td><td>80.3</td><td>80.9</td><td>73.8</td><td>32.1</td><td>66.8</td></tr><tr><td>Mix</td><td>80.3</td><td>81.1</td><td>76.0</td><td>34.4</td><td>67.9</td></tr><tr><td rowspan=\"3\">CodeLlama-7B</td><td>M.T.</td><td>22.7</td><td>44.8</td><td>32.4</td><td>7.9</td><td>26.9</td></tr><tr><td>M.C.</td><td>83.7</td><td>69.0</td><td>58.7</td><td>29.2</td><td>60.2</td></tr><tr><td>Mix</td><td>79.3</td><td>67.8</td><td>59.1</td><td>28.1</td><td>58.6</td></tr><tr><td colspan=\"7\">Few-Shot</td></tr><tr><td rowspan=\"3\">Llama-3.1-8B</td><td>M.T.</td><td>48.3</td><td>67.5</td><td>62.7</td><td>21.8</td><td>50.1</td></tr><tr><td>M.C.</td><td>83.7</td><td>80.4</td><td>71.6</td><td>33.8</td><td>67.4</td></tr><tr><td>Mix</td><td>83.0</td><td>79.8</td><td>73.0</td><td>35.4</td><td>67.8</td></tr><tr><td rowspan=\"3\">CodeLlama-7B</td><td>M.T.</td><td>31.0</td><td>48.4</td><td>26.7</td><td>7.9</td><td>28.5</td></tr><tr><td>M.C.</td><td>80.0</td><td>65.8</td><td>54.4</td><td>25.9</td><td>56.5</td></tr><tr><td>Mix</td><td>78.3</td><td>65.1</td><td>53.4</td><td>24.5</td><td>55.3</td></tr></table>",
|
| 837 |
+
"bbox": [
|
| 838 |
+
522,
|
| 839 |
+
82,
|
| 840 |
+
870,
|
| 841 |
+
252
|
| 842 |
+
],
|
| 843 |
+
"page_idx": 5
|
| 844 |
+
},
|
| 845 |
+
{
|
| 846 |
+
"type": "text",
|
| 847 |
+
"text": "Table 5: Performance of coding instruction from textual and code-based rationales. M.T, and M.C. represent Math-Code, and Math-Code, respectively. M.T. uses CoT prompting inference while others use PoT prompting inference.",
|
| 848 |
+
"bbox": [
|
| 849 |
+
507,
|
| 850 |
+
262,
|
| 851 |
+
882,
|
| 852 |
+
332
|
| 853 |
+
],
|
| 854 |
+
"page_idx": 5
|
| 855 |
+
},
|
| 856 |
+
{
|
| 857 |
+
"type": "text",
|
| 858 |
+
"text": "tion negatively impacts performance, as these models are inherently optimized for code generation. The inclusion of textual rationales may interfere with their specialized capabilities. This finding suggests that when mathematical questions include code-based rationales, augmenting them with textual explanations is beneficial only for models that are proficient in textual reasoning.",
|
| 859 |
+
"bbox": [
|
| 860 |
+
507,
|
| 861 |
+
344,
|
| 862 |
+
882,
|
| 863 |
+
473
|
| 864 |
+
],
|
| 865 |
+
"page_idx": 5
|
| 866 |
+
},
|
| 867 |
+
{
|
| 868 |
+
"type": "text",
|
| 869 |
+
"text": "4 CoinMath",
|
| 870 |
+
"text_level": 1,
|
| 871 |
+
"bbox": [
|
| 872 |
+
507,
|
| 873 |
+
488,
|
| 874 |
+
633,
|
| 875 |
+
502
|
| 876 |
+
],
|
| 877 |
+
"page_idx": 5
|
| 878 |
+
},
|
| 879 |
+
{
|
| 880 |
+
"type": "text",
|
| 881 |
+
"text": "Building on the insights from our systematic study on coding instruction, we introduce CoinMath, a strategy that enhances coding instructions by incorporating beneficial coding styles to improve the mathematical reasoning capabilities of LLMs.",
|
| 882 |
+
"bbox": [
|
| 883 |
+
507,
|
| 884 |
+
514,
|
| 885 |
+
882,
|
| 886 |
+
594
|
| 887 |
+
],
|
| 888 |
+
"page_idx": 5
|
| 889 |
+
},
|
| 890 |
+
{
|
| 891 |
+
"type": "text",
|
| 892 |
+
"text": "4.1 Method",
|
| 893 |
+
"text_level": 1,
|
| 894 |
+
"bbox": [
|
| 895 |
+
507,
|
| 896 |
+
607,
|
| 897 |
+
616,
|
| 898 |
+
621
|
| 899 |
+
],
|
| 900 |
+
"page_idx": 5
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"type": "text",
|
| 904 |
+
"text": "The CoinMath framework is depicted in Figure 3. As discussed in the previous section, LLMs demonstrate varying performance depending on the coding styles of mathematical rationales. Among the evaluated coding styles, Concise Comment performs best in the Comment Usage category, Descriptive Naming outperforms in Naming Conventions, and Hardcoded Solution outperforms in Solution Generalities. However, while these styles outperform their counterparts within their respective attributes, no single coding style proves universally optimal for all mathematical questions. For instance, as shown in Section 3.1, Hardcoded Solution, while better than Generalized Solution in the Solution Generality attribute, performs poorly on the SVAMP dataset for Llama-3.1-8B. This suggests that a fixed coding style may not be ideal for all mathematical problems.",
|
| 905 |
+
"bbox": [
|
| 906 |
+
505,
|
| 907 |
+
629,
|
| 908 |
+
884,
|
| 909 |
+
917
|
| 910 |
+
],
|
| 911 |
+
"page_idx": 5
|
| 912 |
+
},
|
| 913 |
+
{
|
| 914 |
+
"type": "page_number",
|
| 915 |
+
"text": "791",
|
| 916 |
+
"bbox": [
|
| 917 |
+
485,
|
| 918 |
+
928,
|
| 919 |
+
512,
|
| 920 |
+
940
|
| 921 |
+
],
|
| 922 |
+
"page_idx": 5
|
| 923 |
+
},
|
| 924 |
+
{
|
| 925 |
+
"type": "image",
|
| 926 |
+
"img_path": "images/f8fa1fe097f4b8ebc0159e9a079d01c889581641d3457885b4d83295e3073df3.jpg",
|
| 927 |
+
"image_caption": [
|
| 928 |
+
"Figure 3: Overview of CoinMath framework. CoinMath generates three distinct variations of code-based rationales with advantageous coding attributes—Concise Comment, Descriptive Naming, and Hardcoded Solution—and ensembles them for LLM instruction tuning."
|
| 929 |
+
],
|
| 930 |
+
"image_footnote": [],
|
| 931 |
+
"bbox": [
|
| 932 |
+
127,
|
| 933 |
+
85,
|
| 934 |
+
875,
|
| 935 |
+
288
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 6
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "Instead of creating only one code-based rationale for a math question with fixed coding attributes, CoinMath generates three variations of rationales with diverse beneficial coding styles, using the same strategy outlined in Section 3.1. Each variation emphasizes one specific coding style attribute: concise comments, descriptive naming conventions, or hardcoded solutions. CoinMath then ensembles these three variations of rationales with beneficial coding attributes to maximize the enhancement of models' mathematical reasoning.",
|
| 942 |
+
"bbox": [
|
| 943 |
+
110,
|
| 944 |
+
373,
|
| 945 |
+
487,
|
| 946 |
+
549
|
| 947 |
+
],
|
| 948 |
+
"page_idx": 6
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"type": "text",
|
| 952 |
+
"text": "Additionally, CoinMath excludes coding instructions from general domains and mathematical textual rationales, as their contributions to improving mathematical reasoning are minimal or even negative.",
|
| 953 |
+
"bbox": [
|
| 954 |
+
112,
|
| 955 |
+
550,
|
| 956 |
+
489,
|
| 957 |
+
629
|
| 958 |
+
],
|
| 959 |
+
"page_idx": 6
|
| 960 |
+
},
|
| 961 |
+
{
|
| 962 |
+
"type": "text",
|
| 963 |
+
"text": "4.2 Experimental Setup",
|
| 964 |
+
"text_level": 1,
|
| 965 |
+
"bbox": [
|
| 966 |
+
112,
|
| 967 |
+
640,
|
| 968 |
+
317,
|
| 969 |
+
657
|
| 970 |
+
],
|
| 971 |
+
"page_idx": 6
|
| 972 |
+
},
|
| 973 |
+
{
|
| 974 |
+
"type": "text",
|
| 975 |
+
"text": "We scale up the base instruction tuning dataset using the complete set of code-based rationales from MathInstruct (Yue et al., 2023), which contains 73k math questions with code-based rationales. Subsequently, we leverage this scaled dataset to generate code-based rationales with diverse coding styles using GPT-4o. We use the same evaluation datasets as in Section 3.",
|
| 976 |
+
"bbox": [
|
| 977 |
+
112,
|
| 978 |
+
661,
|
| 979 |
+
487,
|
| 980 |
+
788
|
| 981 |
+
],
|
| 982 |
+
"page_idx": 6
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"type": "text",
|
| 986 |
+
"text": "For comparison, we select representative models from the following three categories: Base models: We consider Llama-3.1 (Dubey et al., 2024) and CodeLlama-Python-7B (Roziere et al., 2023) as our base models. Instruct models: We include CodeLlama-3.1-8B-Instruct (Dubey et al., 2024) as a representative instruct-tuned model. Math-specific models: These models are fine",
|
| 987 |
+
"bbox": [
|
| 988 |
+
112,
|
| 989 |
+
790,
|
| 990 |
+
489,
|
| 991 |
+
917
|
| 992 |
+
],
|
| 993 |
+
"page_idx": 6
|
| 994 |
+
},
|
| 995 |
+
{
|
| 996 |
+
"type": "text",
|
| 997 |
+
"text": "tuned specifically for solving math problems, including WizardMath (Luo et al., 2023), MathCoder (Wang et al., 2023a), and MAmmoTH (Yue et al., 2023). Since our instruction-tuning dataset with diverse coding styles is derived from MathInstruct which MAmmoTH utilizes, we further fine-tuned Llama-3.1-8B and CodeLlama-Python7B on MathInstruct to ensure consistency in base models used for comparison. This approach establishes a strong baseline for assessing the improvements introduced by CoinMath. Additionally, we include Qwen2-Math-7B and Qwen2-Math-7B-Instruct (Yang et al., 2024), which are heavily optimized for mathematics and demonstrate superior performance, rivaling even closed-source models (e.g., GPT-4).",
|
| 998 |
+
"bbox": [
|
| 999 |
+
505,
|
| 1000 |
+
373,
|
| 1001 |
+
884,
|
| 1002 |
+
630
|
| 1003 |
+
],
|
| 1004 |
+
"page_idx": 6
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"type": "text",
|
| 1008 |
+
"text": "We evaluate the models' zero-shot performance and select the best result from two prompting approaches: CoT prompting and hybrid prompting. The hybrid prompting approach first uses PoT prompting and resorts to CoT prompting only if PoT fails to generate a result.",
|
| 1009 |
+
"bbox": [
|
| 1010 |
+
507,
|
| 1011 |
+
631,
|
| 1012 |
+
882,
|
| 1013 |
+
727
|
| 1014 |
+
],
|
| 1015 |
+
"page_idx": 6
|
| 1016 |
+
},
|
| 1017 |
+
{
|
| 1018 |
+
"type": "text",
|
| 1019 |
+
"text": "4.3 Results and Analysis",
|
| 1020 |
+
"text_level": 1,
|
| 1021 |
+
"bbox": [
|
| 1022 |
+
507,
|
| 1023 |
+
737,
|
| 1024 |
+
719,
|
| 1025 |
+
753
|
| 1026 |
+
],
|
| 1027 |
+
"page_idx": 6
|
| 1028 |
+
},
|
| 1029 |
+
{
|
| 1030 |
+
"type": "text",
|
| 1031 |
+
"text": "The experimental results are presented in Table 6. CoinMath significantly outperforms MAmmoTH after learning from code-based rationales that incorporate concise comments, descriptive naming conventions, and hardcoded solutions. Additionally, both CoinMath and Llama-3.1-Instruct are built on the Llama-3.1 base model and are instruct-tuned for mathematical reasoning, with Llama-3.1-Instruct further fine-tuned on other instruction-tuning topics. CoinMath surpasses Llama-3.1-Instruct except",
|
| 1032 |
+
"bbox": [
|
| 1033 |
+
507,
|
| 1034 |
+
758,
|
| 1035 |
+
884,
|
| 1036 |
+
917
|
| 1037 |
+
],
|
| 1038 |
+
"page_idx": 6
|
| 1039 |
+
},
|
| 1040 |
+
{
|
| 1041 |
+
"type": "page_number",
|
| 1042 |
+
"text": "792",
|
| 1043 |
+
"bbox": [
|
| 1044 |
+
485,
|
| 1045 |
+
927,
|
| 1046 |
+
515,
|
| 1047 |
+
940
|
| 1048 |
+
],
|
| 1049 |
+
"page_idx": 6
|
| 1050 |
+
},
|
| 1051 |
+
{
|
| 1052 |
+
"type": "table",
|
| 1053 |
+
"img_path": "images/a4de93f62a74c0895a23f0a3b2e3f53e9b5e249ad279c3443c0efa357a31d13c.jpg",
|
| 1054 |
+
"table_caption": [],
|
| 1055 |
+
"table_footnote": [],
|
| 1056 |
+
"table_body": "<table><tr><td>Model</td><td>Base</td><td>Prompt</td><td>Arithmetic</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Avg</td></tr><tr><td colspan=\"8\">Non-Math-Specific Model (<8B)</td></tr><tr><td>Llama-3.1</td><td>-</td><td>CoT</td><td>36.7</td><td>45.7</td><td>17.9</td><td>8.6</td><td>27.3</td></tr><tr><td>Llama-3.1-Instruct</td><td>-</td><td>CoT</td><td>51.7</td><td>81.1</td><td>75.1</td><td>45.7</td><td>63.4</td></tr><tr><td>CodeLlama-Python</td><td>-</td><td>Hybrid</td><td>24.3</td><td>21.9</td><td>3.7</td><td>4.9</td><td>13.7</td></tr><tr><td colspan=\"8\">Math-specific Model (<8B)</td></tr><tr><td>Qwen2-Math</td><td>Qwen2</td><td>CoT</td><td>76.3</td><td>91.4</td><td>78.8</td><td>71.6</td><td>79.5</td></tr><tr><td>Qwen2-Math-Instruct</td><td>Qwen2</td><td>CoT</td><td>65.0</td><td>87.0</td><td>79.2</td><td>70.2</td><td>75.4</td></tr><tr><td>WizardMath-V1.1</td><td>Llama-2</td><td>CoT</td><td>38.3</td><td>72.5</td><td>67.4</td><td>33.5</td><td>52.9</td></tr><tr><td>MathCoder-L†</td><td>Llama-2</td><td>-</td><td>-</td><td>71.5</td><td>64.2</td><td>23.3</td><td>-</td></tr><tr><td>MathCoder-CL†</td><td>CodeLlama</td><td>-</td><td>-</td><td>70.7</td><td>67.8</td><td>30.2</td><td>-</td></tr><tr><td>MAmmoTH</td><td>Llama-2</td><td>Hybrid</td><td>13.0</td><td>65.3</td><td>51.9</td><td>31.5</td><td>40.4</td></tr><tr><td>MAmmoTH-Coder</td><td>CodeLlama</td><td>Hybrid</td><td>31.0</td><td>54.2</td><td>31.8</td><td>20.5</td><td>34.4</td></tr><tr><td>MAmmoTH</td><td>Llama-3.1</td><td>Hybrid</td><td>71.4</td><td>81.3</td><td>73.0</td><td>39.1</td><td>66.2</td></tr><tr><td>MAmmoTH-Coder</td><td>CodeLlama-Python</td><td>Hybrid</td><td>72.7</td><td>67.0</td><td>52.9</td><td>21.8</td><td>53.6</td></tr><tr><td>CoinMath</td><td>Llama-3.1</td><td>Hybrid</td><td>77.0 (+5.6)</td><td>83.1 (+1.8)</td><td>76.4 (+3.4)</td><td>40.3 (+1.2)</td><td>69.2 (+3.0)</td></tr><tr><td>CoinMath</td><td>CodeLlama-Python</td><td>Hybrid</td><td>80.7 (+8.0)</td><td>75.1 (+8.1)</td><td>62.0 (+9.1)</td><td>31.8 (+10.0)</td><td>62.4 (+8.8)</td></tr></table>",
|
| 1057 |
+
"bbox": [
|
| 1058 |
+
126,
|
| 1059 |
+
80,
|
| 1060 |
+
870,
|
| 1061 |
+
326
|
| 1062 |
+
],
|
| 1063 |
+
"page_idx": 7
|
| 1064 |
+
},
|
| 1065 |
+
{
|
| 1066 |
+
"type": "text",
|
| 1067 |
+
"text": "Table 6: Zero-shot performance on mathematical evaluation datasets. Red numbers highlight the improvement compared with the same base models trained on MathInstruct, i.e., MAmmoTH models. $\\dagger$ means the results are from the corresponding papers.",
|
| 1068 |
+
"bbox": [
|
| 1069 |
+
112,
|
| 1070 |
+
336,
|
| 1071 |
+
882,
|
| 1072 |
+
380
|
| 1073 |
+
],
|
| 1074 |
+
"page_idx": 7
|
| 1075 |
+
},
|
| 1076 |
+
{
|
| 1077 |
+
"type": "text",
|
| 1078 |
+
"text": "for the MATH dataset, demonstrating the effectiveness of our approach.",
|
| 1079 |
+
"bbox": [
|
| 1080 |
+
112,
|
| 1081 |
+
405,
|
| 1082 |
+
487,
|
| 1083 |
+
437
|
| 1084 |
+
],
|
| 1085 |
+
"page_idx": 7
|
| 1086 |
+
},
|
| 1087 |
+
{
|
| 1088 |
+
"type": "text",
|
| 1089 |
+
"text": "It is worth noting that the performance on the Arithmetic dataset, an out-of-domain evaluation dataset, decreases compared to the results in Section 3 as the training set is scaled up. In addition, it is reasonable that our models fall behind the Qwen2-Math models, as those models undergo extensive training for mathematics across pre-training, instruction tuning, and reinforcement learning stages while CoinMath focuses solely on the instruction tuning stage.",
|
| 1090 |
+
"bbox": [
|
| 1091 |
+
112,
|
| 1092 |
+
445,
|
| 1093 |
+
487,
|
| 1094 |
+
606
|
| 1095 |
+
],
|
| 1096 |
+
"page_idx": 7
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"type": "text",
|
| 1100 |
+
"text": "Ablation Study. We investigate the impact of combining different coding styles on model performance. Figure 4 presents the average accuracy across our evaluation datasets for various combinations of coding styles. Detailed performance metrics for each individual evaluation dataset are provided in Appendix E. Our results show that incorporating concise comments, descriptive naming conventions, and hardcoded solutions consistently enhances the model's performance in solving math problems. In contrast, their counterparts—no comment, obscure naming conventions, and generalized solutions—yield relatively inferior performance, achieving results similar to training solely with concise comments. Finally, combining all coding styles does not achieve performance as high as the combination of concise comments, descriptive naming conventions, and hardcoded solutions, further proving that these three attributes are partic-",
|
| 1101 |
+
"bbox": [
|
| 1102 |
+
112,
|
| 1103 |
+
613,
|
| 1104 |
+
489,
|
| 1105 |
+
919
|
| 1106 |
+
],
|
| 1107 |
+
"page_idx": 7
|
| 1108 |
+
},
|
| 1109 |
+
{
|
| 1110 |
+
"type": "image",
|
| 1111 |
+
"img_path": "images/94c12ee123cad91e5cca4731bad2f4785b63a6bc0c21457320e22968fa39f6d0.jpg",
|
| 1112 |
+
"image_caption": [
|
| 1113 |
+
"Figure 4: Average accuracy of the models using code-based rationales with different combinations of styles. The average accuracy is calculated across the Arithmetic, SVAMP, GSM, and MATH datasets."
|
| 1114 |
+
],
|
| 1115 |
+
"image_footnote": [],
|
| 1116 |
+
"bbox": [
|
| 1117 |
+
521,
|
| 1118 |
+
407,
|
| 1119 |
+
852,
|
| 1120 |
+
575
|
| 1121 |
+
],
|
| 1122 |
+
"page_idx": 7
|
| 1123 |
+
},
|
| 1124 |
+
{
|
| 1125 |
+
"type": "text",
|
| 1126 |
+
"text": "ularly effective for code-based rationales in improving the model's mathematical reasoning ability.",
|
| 1127 |
+
"bbox": [
|
| 1128 |
+
507,
|
| 1129 |
+
653,
|
| 1130 |
+
882,
|
| 1131 |
+
686
|
| 1132 |
+
],
|
| 1133 |
+
"page_idx": 7
|
| 1134 |
+
},
|
| 1135 |
+
{
|
| 1136 |
+
"type": "text",
|
| 1137 |
+
"text": "5 Conclusion",
|
| 1138 |
+
"text_level": 1,
|
| 1139 |
+
"bbox": [
|
| 1140 |
+
507,
|
| 1141 |
+
699,
|
| 1142 |
+
640,
|
| 1143 |
+
714
|
| 1144 |
+
],
|
| 1145 |
+
"page_idx": 7
|
| 1146 |
+
},
|
| 1147 |
+
{
|
| 1148 |
+
"type": "text",
|
| 1149 |
+
"text": "We conduct a systematic study to investigate how coding instructions can effectively enhance the mathematical reasoning abilities of LLMs. Based on these findings, we propose CoinMath, which focuses specifically on mathematical code-based rationales and combines mathematical coding instructions with concise comments, descriptive naming, and hardcoded solutions to boost the mathematical reasoning capabilities of LLMs. Experimental results demonstrate that CoinMath outperforms the baseline model, MAmmoTH, one of the SOTA models, by an average improvement of $5.9\\%$ in",
|
| 1150 |
+
"bbox": [
|
| 1151 |
+
505,
|
| 1152 |
+
726,
|
| 1153 |
+
884,
|
| 1154 |
+
917
|
| 1155 |
+
],
|
| 1156 |
+
"page_idx": 7
|
| 1157 |
+
},
|
| 1158 |
+
{
|
| 1159 |
+
"type": "page_number",
|
| 1160 |
+
"text": "793",
|
| 1161 |
+
"bbox": [
|
| 1162 |
+
485,
|
| 1163 |
+
927,
|
| 1164 |
+
515,
|
| 1165 |
+
940
|
| 1166 |
+
],
|
| 1167 |
+
"page_idx": 7
|
| 1168 |
+
},
|
| 1169 |
+
{
|
| 1170 |
+
"type": "text",
|
| 1171 |
+
"text": "accuracy.",
|
| 1172 |
+
"bbox": [
|
| 1173 |
+
114,
|
| 1174 |
+
86,
|
| 1175 |
+
188,
|
| 1176 |
+
99
|
| 1177 |
+
],
|
| 1178 |
+
"page_idx": 8
|
| 1179 |
+
},
|
| 1180 |
+
{
|
| 1181 |
+
"type": "text",
|
| 1182 |
+
"text": "Limitations",
|
| 1183 |
+
"text_level": 1,
|
| 1184 |
+
"bbox": [
|
| 1185 |
+
114,
|
| 1186 |
+
112,
|
| 1187 |
+
218,
|
| 1188 |
+
126
|
| 1189 |
+
],
|
| 1190 |
+
"page_idx": 8
|
| 1191 |
+
},
|
| 1192 |
+
{
|
| 1193 |
+
"type": "text",
|
| 1194 |
+
"text": "We focus on evaluating LLMs' mathematical reasoning abilities on datasets requiring concrete calculations, including Arithmetic, SVAMP, GSM, and MATH. However, for other types of math questions involving abstract reasoning or mathematical knowledge, such as abstract algebra, and theorem comprehension, code-based solutions may be less effective. This underscores the importance of extending our work to these tasks to gain insights across a broader range of mathematical question types.",
|
| 1195 |
+
"bbox": [
|
| 1196 |
+
112,
|
| 1197 |
+
137,
|
| 1198 |
+
490,
|
| 1199 |
+
316
|
| 1200 |
+
],
|
| 1201 |
+
"page_idx": 8
|
| 1202 |
+
},
|
| 1203 |
+
{
|
| 1204 |
+
"type": "text",
|
| 1205 |
+
"text": "Acknowledgments",
|
| 1206 |
+
"text_level": 1,
|
| 1207 |
+
"bbox": [
|
| 1208 |
+
114,
|
| 1209 |
+
326,
|
| 1210 |
+
278,
|
| 1211 |
+
343
|
| 1212 |
+
],
|
| 1213 |
+
"page_idx": 8
|
| 1214 |
+
},
|
| 1215 |
+
{
|
| 1216 |
+
"type": "text",
|
| 1217 |
+
"text": "This research is supported by the Ministry of Education, Singapore, under its Science of Learning Grant (Award ID MOE-MOESOL2021-0006). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of the Ministry of Education, Singapore.",
|
| 1218 |
+
"bbox": [
|
| 1219 |
+
112,
|
| 1220 |
+
351,
|
| 1221 |
+
489,
|
| 1222 |
+
463
|
| 1223 |
+
],
|
| 1224 |
+
"page_idx": 8
|
| 1225 |
+
},
|
| 1226 |
+
{
|
| 1227 |
+
"type": "text",
|
| 1228 |
+
"text": "The authors acknowledge the use of AI Assistants for grammar and language refinement during the preparation of the manuscript.",
|
| 1229 |
+
"bbox": [
|
| 1230 |
+
112,
|
| 1231 |
+
464,
|
| 1232 |
+
489,
|
| 1233 |
+
513
|
| 1234 |
+
],
|
| 1235 |
+
"page_idx": 8
|
| 1236 |
+
},
|
| 1237 |
+
{
|
| 1238 |
+
"type": "text",
|
| 1239 |
+
"text": "References",
|
| 1240 |
+
"text_level": 1,
|
| 1241 |
+
"bbox": [
|
| 1242 |
+
114,
|
| 1243 |
+
539,
|
| 1244 |
+
213,
|
| 1245 |
+
554
|
| 1246 |
+
],
|
| 1247 |
+
"page_idx": 8
|
| 1248 |
+
},
|
| 1249 |
+
{
|
| 1250 |
+
"type": "list",
|
| 1251 |
+
"sub_type": "ref_text",
|
| 1252 |
+
"list_items": [
|
| 1253 |
+
"Janice Ahn, Rishu Verma, Renze Lou, Di Liu, Rui Zhang, and Wenpeng Yin. 2024. Large language models for mathematical reasoning: Progresses and challenges. In The 18th Conference of the European Chapter of the Association for Computational Linguistics, page 225.",
|
| 1254 |
+
"Zhangir Azerbayev, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos, Stephen McAleer, Albert Q Jiang, Jia Deng, Stella Biderman, and Sean Welleck. 2023. Llemma: An open language model for mathematics. arXiv preprint arXiv:2310.10631.",
|
| 1255 |
+
"Zhen Bi, Ningyu Zhang, Yinuo Jiang, Shumin Deng, Guozhou Zheng, and Huajun Chen. 2024. When do program-of-thought works for reasoning? In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 17691-17699.",
|
| 1256 |
+
"Sahil Chaudhary. 2023. Code alpaca: An instruction-following llama model for code generation. https://github.com/sahil280114/codealpaca.",
|
| 1257 |
+
"Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W Cohen. 2022. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. arXiv preprint arXiv:2211.12588."
|
| 1258 |
+
],
|
| 1259 |
+
"bbox": [
|
| 1260 |
+
115,
|
| 1261 |
+
561,
|
| 1262 |
+
489,
|
| 1263 |
+
917
|
| 1264 |
+
],
|
| 1265 |
+
"page_idx": 8
|
| 1266 |
+
},
|
| 1267 |
+
{
|
| 1268 |
+
"type": "list",
|
| 1269 |
+
"sub_type": "ref_text",
|
| 1270 |
+
"list_items": [
|
| 1271 |
+
"Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.",
|
| 1272 |
+
"CodeGemma-Team. 2024. Codegemma: Open code models based on gemma. arXiv preprint arXiv:2406.11409.",
|
| 1273 |
+
"Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.",
|
| 1274 |
+
"Luyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023a. Pal: Program-aided language models. In International Conference on Machine Learning, pages 10764-10799. PMLR.",
|
| 1275 |
+
"Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, and Haofen Wang. 2023b. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997.",
|
| 1276 |
+
"Gemma-Team. 2024. Gemma 2: Improving open language models at a practical size. arXiv preprint arXiv:2408.00118.",
|
| 1277 |
+
"Zhibin Gou, Zhihong Shao, Yeyun Gong, yelong shen, Yujiu Yang, Minlie Huang, Nan Duan, and Weizhu Chen. 2024. ToRA: A tool-integrated reasoning agent for mathematical problem solving. In The Twelfth International Conference on Learning Representations.",
|
| 1278 |
+
"Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring mathematical problem solving with the math dataset. NeurIPS.",
|
| 1279 |
+
"Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685.",
|
| 1280 |
+
"Hamish Ivison, Yizhong Wang, Valentina Pyatkin, Nathan Lambert, Matthew Peters, Pradeep Dasigi, Joel Jang, David Wadden, Noah A Smith, Iz Beltagy, et al. 2023. Camels in a changing climate: Enhancing lm adaptation with tulu 2. arXiv preprint arXiv:2311.10702.",
|
| 1281 |
+
"Aitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, et al. 2022. Solving quantitative reasoning problems with language models. Advances in Neural Information Processing Systems, 35:3843-3857."
|
| 1282 |
+
],
|
| 1283 |
+
"bbox": [
|
| 1284 |
+
510,
|
| 1285 |
+
85,
|
| 1286 |
+
882,
|
| 1287 |
+
917
|
| 1288 |
+
],
|
| 1289 |
+
"page_idx": 8
|
| 1290 |
+
},
|
| 1291 |
+
{
|
| 1292 |
+
"type": "page_number",
|
| 1293 |
+
"text": "794",
|
| 1294 |
+
"bbox": [
|
| 1295 |
+
485,
|
| 1296 |
+
928,
|
| 1297 |
+
515,
|
| 1298 |
+
940
|
| 1299 |
+
],
|
| 1300 |
+
"page_idx": 8
|
| 1301 |
+
},
|
| 1302 |
+
{
|
| 1303 |
+
"type": "list",
|
| 1304 |
+
"sub_type": "ref_text",
|
| 1305 |
+
"list_items": [
|
| 1306 |
+
"Hongwei Liu, Zilong Zheng, Yuxuan Qiao, Haodong Duan, Zhiwei Fei, Fengzhe Zhou, Wenwei Zhang, Songyang Zhang, Dahua Lin, and Kai Chen. 2024. Mathbench: Evaluating the theory and application proficiency of llms with a hierarchical mathematics benchmark.",
|
| 1307 |
+
"Haipeng Luo, Qingfeng Sun, Can Xu, Pu Zhao, Jianguang Lou, Chongyang Tao, Xiubo Geng, Qingwei Lin, Shifeng Chen, and Dongmei Zhang. 2023. Wizardmath: Empowering mathematical reasoning for large language models via reinforced evol-instruct. arXiv preprint arXiv:2308.09583.",
|
| 1308 |
+
"YINGWEI Ma, Yue Liu, Yue Yu, Yuanliang Zhang, Yu Jiang, Changjian Wang, and Shanshan Li. 2024. At which training stage does code data help LLMs reasoning? In The Twelfth International Conference on Learning Representations.",
|
| 1309 |
+
"Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. 2021. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114.",
|
| 1310 |
+
"OpenAI. 2024. Hello gpt-4o. Accessed: 2024-05-26.",
|
| 1311 |
+
"Arkil Patel, Satwik Bhattachamishra, and Navin Goyal. 2021. Are nlp models really able to solve simple math word problems? In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2080-2094.",
|
| 1312 |
+
"Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950.",
|
| 1313 |
+
"Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Y Wu, et al. 2024. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300.",
|
| 1314 |
+
"Shubham Toshniwal, Ivan Moshkov, Sean Narethiran, Daria Gitman, Fei Jia, and Igor Gitman. 2024. Openmathinstruct-1: A 1.8 million math instruction tuning dataset. arXiv preprint arXiv:2402.10176.",
|
| 1315 |
+
"Ke Wang, Houxing Ren, Aojun Zhou, Zimu Lu, Sichun Luo, Weikang Shi, Renrui Zhang, Linqi Song, Mingjie Zhan, and Hongsheng Li. 2023a. Math-coder: Seamless code integration in llms for enhanced mathematical reasoning. arXiv preprint arXiv:2310.03731.",
|
| 1316 |
+
"Yizhong Wang, Hamish Ivison, Pradeep Dasigi, Jack Hessel, Tushar Khot, Khyathi Chandu, David Wadden, Kelsey MacMillan, Noah A Smith, Iz Beltagy, et al. 2023b. How far can camels go? exploring the state of instruction tuning on open resources. Advances in Neural Information Processing Systems, 36:74764-74786."
|
| 1317 |
+
],
|
| 1318 |
+
"bbox": [
|
| 1319 |
+
115,
|
| 1320 |
+
85,
|
| 1321 |
+
487,
|
| 1322 |
+
917
|
| 1323 |
+
],
|
| 1324 |
+
"page_idx": 9
|
| 1325 |
+
},
|
| 1326 |
+
{
|
| 1327 |
+
"type": "list",
|
| 1328 |
+
"sub_type": "ref_text",
|
| 1329 |
+
"list_items": [
|
| 1330 |
+
"Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837.",
|
| 1331 |
+
"An Yang, Beichen Zhang, Binyuan Hui, Bofei Gao, Bowen Yu, Chengpeng Li, Dayiheng Liu, Jianhong Tu, Jingren Zhou, Junyang Lin, et al. 2024. Qwen2. 5-math technical report: Toward mathematical expert model via self-improvement. arXiv preprint arXiv:2409.12122.",
|
| 1332 |
+
"Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. 2023. Mammoth: Building math generalist models through hybrid instruction tuning. arXiv preprint arXiv:2309.05653.",
|
| 1333 |
+
"Bo-Wen Zhang, Yan Yan, Lin Li, and Guang Liu. 2024a. Infinitymath: A scalable instruction tuning dataset in programmatic mathematical reasoning. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management, pages 5405-5409.",
|
| 1334 |
+
"Xinlu Zhang, Zhiyu Zoey Chen, Xi Ye, Xianjun Yang, Lichang Chen, William Yang Wang, and Linda Ruth Petzold. 2024b. Unveiling the impact of coding data instruction fine-tuning on large language models reasoning. arXiv preprint arXiv:2405.20535."
|
| 1335 |
+
],
|
| 1336 |
+
"bbox": [
|
| 1337 |
+
510,
|
| 1338 |
+
85,
|
| 1339 |
+
880,
|
| 1340 |
+
493
|
| 1341 |
+
],
|
| 1342 |
+
"page_idx": 9
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"type": "text",
|
| 1346 |
+
"text": "A Statistics of Instruction Tuning Datasets",
|
| 1347 |
+
"text_level": 1,
|
| 1348 |
+
"bbox": [
|
| 1349 |
+
510,
|
| 1350 |
+
510,
|
| 1351 |
+
815,
|
| 1352 |
+
541
|
| 1353 |
+
],
|
| 1354 |
+
"page_idx": 9
|
| 1355 |
+
},
|
| 1356 |
+
{
|
| 1357 |
+
"type": "text",
|
| 1358 |
+
"text": "Table 7 presents the statistics of the three base instruction-tuning datasets used in our study on coding instruction. Math-Code and Math-Text share the same set of mathematical questions but differ in their rationales, with Math-Code providing code-based rationales and Math-Text offering textual ones.",
|
| 1359 |
+
"bbox": [
|
| 1360 |
+
507,
|
| 1361 |
+
554,
|
| 1362 |
+
880,
|
| 1363 |
+
664
|
| 1364 |
+
],
|
| 1365 |
+
"page_idx": 9
|
| 1366 |
+
},
|
| 1367 |
+
{
|
| 1368 |
+
"type": "table",
|
| 1369 |
+
"img_path": "images/4b0a9cdadad9741f4e9acd9a36c0936b7f99c43f1c6c9d166e376c18fb8f460c.jpg",
|
| 1370 |
+
"table_caption": [],
|
| 1371 |
+
"table_footnote": [],
|
| 1372 |
+
"table_body": "<table><tr><td>IT Dataset</td><td># Sample</td><td>Characteristics</td><td>Annotation</td></tr><tr><td>Math-Code</td><td>26k</td><td>Math questions with code-based rationales</td><td>GPT4</td></tr><tr><td>Math-Text</td><td>26k</td><td>Math questions with textual rationales</td><td>Human & Llama</td></tr><tr><td>General Code</td><td>21k</td><td>Coding instruction for general tasks</td><td>Llama</td></tr></table>",
|
| 1373 |
+
"bbox": [
|
| 1374 |
+
505,
|
| 1375 |
+
677,
|
| 1376 |
+
887,
|
| 1377 |
+
769
|
| 1378 |
+
],
|
| 1379 |
+
"page_idx": 9
|
| 1380 |
+
},
|
| 1381 |
+
{
|
| 1382 |
+
"type": "text",
|
| 1383 |
+
"text": "Table 7: Statistics of Math-Text, Math-Code and General Code",
|
| 1384 |
+
"bbox": [
|
| 1385 |
+
507,
|
| 1386 |
+
778,
|
| 1387 |
+
882,
|
| 1388 |
+
807
|
| 1389 |
+
],
|
| 1390 |
+
"page_idx": 9
|
| 1391 |
+
},
|
| 1392 |
+
{
|
| 1393 |
+
"type": "text",
|
| 1394 |
+
"text": "B Sample Questions from Evaluation Datasets",
|
| 1395 |
+
"text_level": 1,
|
| 1396 |
+
"bbox": [
|
| 1397 |
+
509,
|
| 1398 |
+
843,
|
| 1399 |
+
845,
|
| 1400 |
+
873
|
| 1401 |
+
],
|
| 1402 |
+
"page_idx": 9
|
| 1403 |
+
},
|
| 1404 |
+
{
|
| 1405 |
+
"type": "text",
|
| 1406 |
+
"text": "Figure 5 shows the samples from Arithmetic, SVAMP, GSM and MATH.",
|
| 1407 |
+
"bbox": [
|
| 1408 |
+
507,
|
| 1409 |
+
887,
|
| 1410 |
+
880,
|
| 1411 |
+
917
|
| 1412 |
+
],
|
| 1413 |
+
"page_idx": 9
|
| 1414 |
+
},
|
| 1415 |
+
{
|
| 1416 |
+
"type": "page_number",
|
| 1417 |
+
"text": "795",
|
| 1418 |
+
"bbox": [
|
| 1419 |
+
485,
|
| 1420 |
+
927,
|
| 1421 |
+
515,
|
| 1422 |
+
940
|
| 1423 |
+
],
|
| 1424 |
+
"page_idx": 9
|
| 1425 |
+
},
|
| 1426 |
+
{
|
| 1427 |
+
"type": "text",
|
| 1428 |
+
"text": "Question: What is $(-1) / (-1)^{\\star}((4563 / (-15)) / 13 - - 23)^{\\star} - 125?$ Answer: 50",
|
| 1429 |
+
"bbox": [
|
| 1430 |
+
122,
|
| 1431 |
+
86,
|
| 1432 |
+
480,
|
| 1433 |
+
110
|
| 1434 |
+
],
|
| 1435 |
+
"page_idx": 10
|
| 1436 |
+
},
|
| 1437 |
+
{
|
| 1438 |
+
"type": "text",
|
| 1439 |
+
"text": "Question: Calculate 1000804 divided by -500402. Answer: -2",
|
| 1440 |
+
"bbox": [
|
| 1441 |
+
122,
|
| 1442 |
+
122,
|
| 1443 |
+
431,
|
| 1444 |
+
145
|
| 1445 |
+
],
|
| 1446 |
+
"page_idx": 10
|
| 1447 |
+
},
|
| 1448 |
+
{
|
| 1449 |
+
"type": "text",
|
| 1450 |
+
"text": "(a) Arithmetic",
|
| 1451 |
+
"text_level": 1,
|
| 1452 |
+
"bbox": [
|
| 1453 |
+
255,
|
| 1454 |
+
156,
|
| 1455 |
+
344,
|
| 1456 |
+
168
|
| 1457 |
+
],
|
| 1458 |
+
"page_idx": 10
|
| 1459 |
+
},
|
| 1460 |
+
{
|
| 1461 |
+
"type": "text",
|
| 1462 |
+
"text": "Question: Paco had 26 salty cookies and 17 sweet cookies. He ate 14 sweet cookies and 9 salty cookies. How many salty cookies did Paco have left? Answer: 17.0",
|
| 1463 |
+
"bbox": [
|
| 1464 |
+
122,
|
| 1465 |
+
175,
|
| 1466 |
+
480,
|
| 1467 |
+
221
|
| 1468 |
+
],
|
| 1469 |
+
"page_idx": 10
|
| 1470 |
+
},
|
| 1471 |
+
{
|
| 1472 |
+
"type": "text",
|
| 1473 |
+
"text": "(b) SVAMP",
|
| 1474 |
+
"text_level": 1,
|
| 1475 |
+
"bbox": [
|
| 1476 |
+
263,
|
| 1477 |
+
231,
|
| 1478 |
+
337,
|
| 1479 |
+
244
|
| 1480 |
+
],
|
| 1481 |
+
"page_idx": 10
|
| 1482 |
+
},
|
| 1483 |
+
{
|
| 1484 |
+
"type": "text",
|
| 1485 |
+
"text": "Question: Raymond and Samantha are cousins. Raymond was born 6 years before Samantha. Raymond had a son at the age of 23. If Samantha is now 31, how many years ago was Raymond's son born? Solution: When Raymond's son was born Samantha was 23 - 6 = <<23-6=17>>17 years old. Thus it has been 31 - 17 = <<31-17=14>>14 years since Raymond's son was born.",
|
| 1486 |
+
"bbox": [
|
| 1487 |
+
122,
|
| 1488 |
+
253,
|
| 1489 |
+
480,
|
| 1490 |
+
354
|
| 1491 |
+
],
|
| 1492 |
+
"page_idx": 10
|
| 1493 |
+
},
|
| 1494 |
+
{
|
| 1495 |
+
"type": "text",
|
| 1496 |
+
"text": "(c) GSM",
|
| 1497 |
+
"text_level": 1,
|
| 1498 |
+
"bbox": [
|
| 1499 |
+
272,
|
| 1500 |
+
367,
|
| 1501 |
+
329,
|
| 1502 |
+
379
|
| 1503 |
+
],
|
| 1504 |
+
"page_idx": 10
|
| 1505 |
+
},
|
| 1506 |
+
{
|
| 1507 |
+
"type": "text",
|
| 1508 |
+
"text": "Question: What is the distance between the two intersections of $y=x^2$ and $\\$x+y=1$ ? Solution: To find the $\\$x$ -coordinates of the intersections, substitute $\\$x^2$ for $\\$y$ in $\\$x+y=1$ and solve for $\\$x$ , resulting in ... Answer: [\"\\sqrt{10} \", 3.1622776601683795\"]",
|
| 1509 |
+
"bbox": [
|
| 1510 |
+
122,
|
| 1511 |
+
390,
|
| 1512 |
+
473,
|
| 1513 |
+
458
|
| 1514 |
+
],
|
| 1515 |
+
"page_idx": 10
|
| 1516 |
+
},
|
| 1517 |
+
{
|
| 1518 |
+
"type": "text",
|
| 1519 |
+
"text": "(d) MATH",
|
| 1520 |
+
"text_level": 1,
|
| 1521 |
+
"bbox": [
|
| 1522 |
+
267,
|
| 1523 |
+
470,
|
| 1524 |
+
332,
|
| 1525 |
+
483
|
| 1526 |
+
],
|
| 1527 |
+
"page_idx": 10
|
| 1528 |
+
},
|
| 1529 |
+
{
|
| 1530 |
+
"type": "text",
|
| 1531 |
+
"text": "Figure 5: Sample questions from the evaluation datasets",
|
| 1532 |
+
"bbox": [
|
| 1533 |
+
114,
|
| 1534 |
+
495,
|
| 1535 |
+
485,
|
| 1536 |
+
510
|
| 1537 |
+
],
|
| 1538 |
+
"page_idx": 10
|
| 1539 |
+
},
|
| 1540 |
+
{
|
| 1541 |
+
"type": "text",
|
| 1542 |
+
"text": "C Prompts for Generating Diverse Coding Style Rationales",
|
| 1543 |
+
"text_level": 1,
|
| 1544 |
+
"bbox": [
|
| 1545 |
+
114,
|
| 1546 |
+
521,
|
| 1547 |
+
428,
|
| 1548 |
+
554
|
| 1549 |
+
],
|
| 1550 |
+
"page_idx": 10
|
| 1551 |
+
},
|
| 1552 |
+
{
|
| 1553 |
+
"type": "text",
|
| 1554 |
+
"text": "Figure 6 shows the instruction we used for generating code-based rationales with different coding styles.",
|
| 1555 |
+
"bbox": [
|
| 1556 |
+
112,
|
| 1557 |
+
564,
|
| 1558 |
+
487,
|
| 1559 |
+
609
|
| 1560 |
+
],
|
| 1561 |
+
"page_idx": 10
|
| 1562 |
+
},
|
| 1563 |
+
{
|
| 1564 |
+
"type": "text",
|
| 1565 |
+
"text": "D Instruction Tuning Details",
|
| 1566 |
+
"text_level": 1,
|
| 1567 |
+
"bbox": [
|
| 1568 |
+
114,
|
| 1569 |
+
623,
|
| 1570 |
+
379,
|
| 1571 |
+
639
|
| 1572 |
+
],
|
| 1573 |
+
"page_idx": 10
|
| 1574 |
+
},
|
| 1575 |
+
{
|
| 1576 |
+
"type": "text",
|
| 1577 |
+
"text": "We perform instruction tuning of the LLMs following the implementation of TULU (Wang et al., 2023b; Ivison et al., 2023). The models are finetuned using LoRA (Hu et al., 2021) with a rank of 64 and a total batch size of 128.",
|
| 1578 |
+
"bbox": [
|
| 1579 |
+
112,
|
| 1580 |
+
649,
|
| 1581 |
+
487,
|
| 1582 |
+
727
|
| 1583 |
+
],
|
| 1584 |
+
"page_idx": 10
|
| 1585 |
+
},
|
| 1586 |
+
{
|
| 1587 |
+
"type": "text",
|
| 1588 |
+
"text": "E Results of Mixing Coding Styles",
|
| 1589 |
+
"text_level": 1,
|
| 1590 |
+
"bbox": [
|
| 1591 |
+
114,
|
| 1592 |
+
740,
|
| 1593 |
+
426,
|
| 1594 |
+
757
|
| 1595 |
+
],
|
| 1596 |
+
"page_idx": 10
|
| 1597 |
+
},
|
| 1598 |
+
{
|
| 1599 |
+
"type": "text",
|
| 1600 |
+
"text": "Table 8 demonstrates the performance of different combinations of coding styles for each evaluation dataset.",
|
| 1601 |
+
"bbox": [
|
| 1602 |
+
112,
|
| 1603 |
+
766,
|
| 1604 |
+
485,
|
| 1605 |
+
812
|
| 1606 |
+
],
|
| 1607 |
+
"page_idx": 10
|
| 1608 |
+
},
|
| 1609 |
+
{
|
| 1610 |
+
"type": "text",
|
| 1611 |
+
"text": "instruction = \"\"",
|
| 1612 |
+
"text_level": 1,
|
| 1613 |
+
"bbox": [
|
| 1614 |
+
515,
|
| 1615 |
+
112,
|
| 1616 |
+
647,
|
| 1617 |
+
122
|
| 1618 |
+
],
|
| 1619 |
+
"page_idx": 10
|
| 1620 |
+
},
|
| 1621 |
+
{
|
| 1622 |
+
"type": "list",
|
| 1623 |
+
"sub_type": "text",
|
| 1624 |
+
"list_items": [
|
| 1625 |
+
"1) Please add a comment at the beginning of the code, explaining the purpose of the code.",
|
| 1626 |
+
"2) Add comments to each line of the code in the solution, explaining its functionality where comments are missing.",
|
| 1627 |
+
"3) Do not modify the code itself; only add comments.",
|
| 1628 |
+
"4) Output only the code and comments. Exclude any additional text from the response."
|
| 1629 |
+
],
|
| 1630 |
+
"bbox": [
|
| 1631 |
+
515,
|
| 1632 |
+
124,
|
| 1633 |
+
873,
|
| 1634 |
+
250
|
| 1635 |
+
],
|
| 1636 |
+
"page_idx": 10
|
| 1637 |
+
},
|
| 1638 |
+
{
|
| 1639 |
+
"type": "text",
|
| 1640 |
+
"text": "(a) Instruction for generating detailed comments",
|
| 1641 |
+
"text_level": 1,
|
| 1642 |
+
"bbox": [
|
| 1643 |
+
547,
|
| 1644 |
+
268,
|
| 1645 |
+
842,
|
| 1646 |
+
280
|
| 1647 |
+
],
|
| 1648 |
+
"page_idx": 10
|
| 1649 |
+
},
|
| 1650 |
+
{
|
| 1651 |
+
"type": "text",
|
| 1652 |
+
"text": "instruction = \"\"",
|
| 1653 |
+
"text_level": 1,
|
| 1654 |
+
"bbox": [
|
| 1655 |
+
519,
|
| 1656 |
+
284,
|
| 1657 |
+
648,
|
| 1658 |
+
294
|
| 1659 |
+
],
|
| 1660 |
+
"page_idx": 10
|
| 1661 |
+
},
|
| 1662 |
+
{
|
| 1663 |
+
"type": "list",
|
| 1664 |
+
"sub_type": "text",
|
| 1665 |
+
"list_items": [
|
| 1666 |
+
"1) Given a math question and its Program-of-Thought (PoT) solution, generate two versions of the solution code:",
|
| 1667 |
+
"a) **Descriptive Variable Names**: Use clear and descriptive names for all variables and functions.",
|
| 1668 |
+
"b) **Obscure Variable Names**: Use short and non-descriptive names (e.g., single letters or random abbreviations).",
|
| 1669 |
+
"2) Keep the code's structure, comments, and logic unchanged; only replace the variable names.",
|
| 1670 |
+
"3) Avoid using reserved or unsafe names such as {'sum', 'len', 'float', 'int', 'str', 'list', 'dict'} as variable names.",
|
| 1671 |
+
"4) Output only the code and comments in the specified format. Exclude any additional text."
|
| 1672 |
+
],
|
| 1673 |
+
"bbox": [
|
| 1674 |
+
517,
|
| 1675 |
+
297,
|
| 1676 |
+
873,
|
| 1677 |
+
556
|
| 1678 |
+
],
|
| 1679 |
+
"page_idx": 10
|
| 1680 |
+
},
|
| 1681 |
+
{
|
| 1682 |
+
"type": "text",
|
| 1683 |
+
"text": "(b) Instruction for applying different naming conventions. instruction $=$",
|
| 1684 |
+
"text_level": 1,
|
| 1685 |
+
"bbox": [
|
| 1686 |
+
519,
|
| 1687 |
+
571,
|
| 1688 |
+
868,
|
| 1689 |
+
599
|
| 1690 |
+
],
|
| 1691 |
+
"page_idx": 10
|
| 1692 |
+
},
|
| 1693 |
+
{
|
| 1694 |
+
"type": "list",
|
| 1695 |
+
"sub_type": "text",
|
| 1696 |
+
"list_items": [
|
| 1697 |
+
"1) Given a math question and its Program-of-Thought (PoT) solution, generate two versions of the solution code:",
|
| 1698 |
+
"a) **Generalized Programming**: - Create a reusable function that abstracts the logic and can handle similar math problems with different inputs or parameters.",
|
| 1699 |
+
"b)\\*\\*Hardcoded Programming\\*\\*: -Write a specific solution tailored to the given math question,with fixed values and logic.",
|
| 1700 |
+
"2) Output only the code and comments in the specified format. Exclude any additional text outside the provided template."
|
| 1701 |
+
],
|
| 1702 |
+
"bbox": [
|
| 1703 |
+
515,
|
| 1704 |
+
602,
|
| 1705 |
+
870,
|
| 1706 |
+
806
|
| 1707 |
+
],
|
| 1708 |
+
"page_idx": 10
|
| 1709 |
+
},
|
| 1710 |
+
{
|
| 1711 |
+
"type": "text",
|
| 1712 |
+
"text": "(c) Instruction for generating generalized and hardcoded solutions",
|
| 1713 |
+
"bbox": [
|
| 1714 |
+
509,
|
| 1715 |
+
822,
|
| 1716 |
+
882,
|
| 1717 |
+
846
|
| 1718 |
+
],
|
| 1719 |
+
"page_idx": 10
|
| 1720 |
+
},
|
| 1721 |
+
{
|
| 1722 |
+
"type": "text",
|
| 1723 |
+
"text": "Figure 6: Instruction for generation diverse coding style rationales",
|
| 1724 |
+
"bbox": [
|
| 1725 |
+
507,
|
| 1726 |
+
860,
|
| 1727 |
+
880,
|
| 1728 |
+
885
|
| 1729 |
+
],
|
| 1730 |
+
"page_idx": 10
|
| 1731 |
+
},
|
| 1732 |
+
{
|
| 1733 |
+
"type": "page_number",
|
| 1734 |
+
"text": "796",
|
| 1735 |
+
"bbox": [
|
| 1736 |
+
485,
|
| 1737 |
+
928,
|
| 1738 |
+
515,
|
| 1739 |
+
940
|
| 1740 |
+
],
|
| 1741 |
+
"page_idx": 10
|
| 1742 |
+
},
|
| 1743 |
+
{
|
| 1744 |
+
"type": "table",
|
| 1745 |
+
"img_path": "images/d569590d564923bed08585e221d8cf42430f30d87db43f6986d7ef94437abfbc.jpg",
|
| 1746 |
+
"table_caption": [],
|
| 1747 |
+
"table_footnote": [],
|
| 1748 |
+
"table_body": "<table><tr><td>Model</td><td>IT Data</td><td>Arithmetic</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Average</td></tr><tr><td rowspan=\"5\">Llama-3.1-8B</td><td>Concise Comment</td><td>58.0</td><td>75.5</td><td>72.8</td><td>38.6</td><td>61.2</td></tr><tr><td>Concise Comment + Descriptive Naming</td><td>81.7</td><td>80.5</td><td>71.3</td><td>37.6</td><td>67.8</td></tr><tr><td>Concise Comment + Descriptive Naming + Hardcoded Solution</td><td>77.0</td><td>83.1</td><td>76.4</td><td>40.3</td><td>69.2</td></tr><tr><td>No Comment + Obscure Naming + General Solution</td><td>48.3</td><td>81.4</td><td>75.2</td><td>39.4</td><td>61.1</td></tr><tr><td>All</td><td>72.3</td><td>83.0</td><td>75.0</td><td>35.8</td><td>66.5</td></tr><tr><td rowspan=\"5\">CodeLlama-7B</td><td>Concise Comment</td><td>44.3</td><td>68.6</td><td>56.6</td><td>21.4</td><td>47.7</td></tr><tr><td>Concise Comment + Descriptive Naming</td><td>80.3</td><td>69.6</td><td>56.6</td><td>29.5</td><td>59.0</td></tr><tr><td>Concise Comment + Descriptive Naming + Hardcoded Solution</td><td>80.7</td><td>75.1</td><td>62.0</td><td>31.8</td><td>62.4</td></tr><tr><td>No Comment + Obscure Naming + General Solution</td><td>66.0</td><td>69.9</td><td>60.2</td><td>27.4</td><td>55.9</td></tr><tr><td>All</td><td>79.3</td><td>73.7</td><td>60.7</td><td>31.7</td><td>61.4</td></tr></table>",
|
| 1749 |
+
"bbox": [
|
| 1750 |
+
124,
|
| 1751 |
+
414,
|
| 1752 |
+
875,
|
| 1753 |
+
556
|
| 1754 |
+
],
|
| 1755 |
+
"page_idx": 11
|
| 1756 |
+
},
|
| 1757 |
+
{
|
| 1758 |
+
"type": "text",
|
| 1759 |
+
"text": "Table 8: Ablation Study of Coding Styles. Evaluation is under zero-shot setting",
|
| 1760 |
+
"bbox": [
|
| 1761 |
+
228,
|
| 1762 |
+
567,
|
| 1763 |
+
766,
|
| 1764 |
+
581
|
| 1765 |
+
],
|
| 1766 |
+
"page_idx": 11
|
| 1767 |
+
},
|
| 1768 |
+
{
|
| 1769 |
+
"type": "page_number",
|
| 1770 |
+
"text": "797",
|
| 1771 |
+
"bbox": [
|
| 1772 |
+
485,
|
| 1773 |
+
928,
|
| 1774 |
+
514,
|
| 1775 |
+
939
|
| 1776 |
+
],
|
| 1777 |
+
"page_idx": 11
|
| 1778 |
+
}
|
| 1779 |
+
]
|
2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/760a004c-dbd3-4753-a421-fea5977279f9_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/760a004c-dbd3-4753-a421-fea5977279f9_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7dae344d46beeb27c4c6ef6aac65b60c6bf59d8ab2ec688667d75e5c36dcf820
|
| 3 |
+
size 2240103
|
2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/full.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CoinMath: Harnessing the Power of Coding Instruction for Math LLMs
|
| 2 |
+
|
| 3 |
+
Chengwei Wei, Bin Wang, Jung-jae Kim, Guimei Liu, Nancy F. Chen
|
| 4 |
+
|
| 5 |
+
$\diamond$ Institute for Infocomm Research $(\mathrm{I}^{2}\mathrm{R})$ , A*STAR, Singapore
|
| 6 |
+
|
| 7 |
+
†Centre for Frontier AI Research (CFAR), A*STAR, Singapore
|
| 8 |
+
|
| 9 |
+
wei_chengwei@i2r.a-star.edu.sg
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Large Language Models (LLMs) have shown strong performance in solving mathematical problems, with code-based solutions proving particularly effective. However, the best practice to leverage coding instruction data to enhance mathematical reasoning remains under-explored. This study investigates three key questions: (1) How do different coding styles of mathematical code-based rationales impact LLMs' learning performance? (2) Can general-domain coding instructions improve performance? (3) How does integrating textual rationales with code-based ones during training enhance mathematical reasoning abilities? Our findings reveal that code-based rationales with concise comments, descriptive naming, and hardcoded solutions are beneficial, while improvements from general-domain coding instructions and textual rationales are relatively minor. Based on these insights, we propose CoinMath, a learning strategy designed to enhance mathematical reasoning by diversifying the coding styles of code-based rationales. CoinMath generates a variety of code-based rationales incorporating concise comments, descriptive naming conventions, and hardcoded solutions. Experimental results demonstrate that CoinMath significantly outperforms its baseline model, MAmmoTH, one of the SOTA math LLMs. $^{1}$
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Large Language Models (LLMs) have been extensively applied to solving mathematical problems (Lewkowycz et al., 2022; Azerbayev et al., 2023; Luo et al., 2023; Ahn et al., 2024; Shao et al., 2024). Recently, the approach of using code-based solutions has achieved significant success, as the calculations are handled by a program interpreter, while the reasoning steps are effectively represented in code format. Prior studies on prompt
|
| 18 |
+
|
| 19 |
+
ing, such as Program-of-Thoughts (PoT) (Chen et al., 2022) and Program-Aided Language models (PAL) (Gao et al., 2023a), have demonstrated that generating solutions in a code format significantly enhances LLM performance on mathematical tasks compared to Chain-of-Thoughts (CoT) which uses a text format (Wei et al., 2022). Furthermore, LLMs trained on mathematical instruction data with code-based rationales, reasoning steps presented in executable code, have shown strong performance (Wang et al., 2023a; Yue et al., 2023; Zhang et al., 2024a; Toshniwal et al., 2024).
|
| 20 |
+
|
| 21 |
+
Given the demonstrated effectiveness of mathematical instruction data with code-based rationales, there is growing interest in synthesizing additional mathematical problems to expand mathematical coding instruction datasets (Zhang et al., 2024a; Toshniwal et al., 2024), aiming to enhance the performance further. Despite this progress, the question of how such coding instruction data can be best leveraged to maximize its impact remains underexplored. Recently, Zhang et al. (2024b) showed that model instruction-tuned on text or a mix of text and code outperforms models trained solely on code in mathematical reasoning. However, the conclusions are drawn from evaluating the models by generating solutions in a text format instead of a code format. Bi et al. (2024) found that code-based rationales of medium complexity yield the best reasoning performance.
|
| 22 |
+
|
| 23 |
+
Taking this further, our study delves deeper into the effective utilization of existing coding instruction data to enhance mathematical reasoning. Specifically, we first conduct a comprehensive study on coding instruction to address three critical questions: 1) How do different coding styles (e.g., having a detailed comment or not) of mathematical code-based rationales impact LLMs' learning performance in mathematical reasoning? 2) Can coding instructions from general domains, beyond math, provide meaningful benefits under PoT rea
|
| 24 |
+
|
| 25 |
+
soning? and 3) How does integrating textual rationales with code-based ones during instruction tuning enhance mathematical reasoning abilities?
|
| 26 |
+
|
| 27 |
+
Our findings can be summarized as follows:
|
| 28 |
+
|
| 29 |
+
- Mathematical code-based rationales that include concise comments and descriptive naming conventions are the most effective. Hard-coded rationales offer straightforward solutions that facilitate the model's learning.
|
| 30 |
+
- General domain coding instructions provide limited performance improvement compared to those from the mathematical domain.
|
| 31 |
+
- Adding textual rationales of math questions slightly enhances the performance of general-purpose models. In contrast, textual rationales do not benefit code-specialized models.
|
| 32 |
+
|
| 33 |
+
As the impact of coding instructions from general domains and textual rationales is minimal, while models exhibit varying behaviors toward code-based rationales with different coding styles, we propose CoinMath, short for Coding Instruction for Math, a learning strategy to effectively enhance LLMs' mathematical reasoning capabilities. CoinMath diversifies the coding styles of code-based rationales by incorporating advantageous coding attributes, including concise comments, descriptive naming, and hardcoded solutions. Experimental results demonstrate that CoinMath significantly outperforms the previous SOTA Math LLMs.
|
| 34 |
+
|
| 35 |
+
Our major contributions are as follows:
|
| 36 |
+
|
| 37 |
+
- We present a systematic study that investigates what makes diverse coding instructions effective, how they enhance the mathematical reasoning of LLMs, and why they work, uncovering the key factors behind their impact.
|
| 38 |
+
- Based on the above findings, we propose CoinMath, a learning strategy that improves LLMs' mathematical reasoning by incorporating code-based rationales with concise comments, descriptive naming conventions, and hardcoded solutions. Experimental results show that it outperforms the SOTA model by an average improvement of $5.9\%$ in accuracy.
|
| 39 |
+
- We release the CoinMath model, curated datasets, and training and evaluation pipelines, enabling reproducibility and advancing research in mathematical reasoning for LLMs.
|
| 40 |
+
|
| 41 |
+
# 2 Related Work
|
| 42 |
+
|
| 43 |
+
Solving Math with Code. Chain-of-Thought (CoT) prompting (Nye et al., 2021; Wei et al., 2022), which guides LLMs to generate intermediate steps in textual rationales, has proven effective on reasoning tasks. Expanding on this foundation, Program-of-Thoughts (PoT) and Program-Aided Language models (PAL) (Chen et al., 2022; Gao et al., 2023a) have used code for reasoning. These methods prompt LLMs to generate reasoning steps as code and assign computations to external program interpreters, which has achieved significant success, particularly in mathematical reasoning tasks that involve complex calculations and logical operations. Subsequently, recent works (Toshniwal et al., 2024; Wang et al., 2023a; Yue et al., 2023; Gou et al., 2024) have constructed mathematical instruction datasets with code-based rationales and fine-tuned LLMs on them, further improving model performance on solving math problems.
|
| 44 |
+
|
| 45 |
+
Effect of Coding Instruction on Mathematical Reasoning. Several studies have explored coding instruction's impact on LLMs' mathematical reasoning abilities. Wang et al. (2023b) and Ma et al. (2024) indicated that coding instruction only enhances task-specific reasoning capabilities, which suggests non-math-specific data have minimal or even negative effects on mathematical reasoning. Zhang et al. (2024b) found that models trained on pure textual instructions or a combination of textual and coding instructions perform better in mathematical reasoning than those trained solely on coding instructions. However, the evaluations of these studies focused on CoT reasoning and generating textual solutions rather than code-based ones, which may limit the potential benefits of coding instructions. By contrast, Bi et al. (2024) evaluated models in PoT reasoning and revealed that mathematical code-based rationales with medium complexity lead to the most significant improvements. However, they did not comprehensively examine the effects of different coding styles, code domains, or the interplay between textual and code-based rationales in enhancing mathematical reasoning.
|
| 46 |
+
|
| 47 |
+
# 3 Study on Coding Instruction
|
| 48 |
+
|
| 49 |
+
This study investigates the effective utilization of coding instructions to enhance the mathematical reasoning abilities of LLMs. It focuses on three key questions. 1) Coding Style: Identifying the effect of different coding styles of mathematical code
|
| 50 |
+
|
| 51 |
+
based rationales on LLMs' mathematical reasoning learning. 2) Code Domain: Exploring whether coding instructions from general (non-mathematical) domains can enhance performance in solving mathematical problems under PoT reasoning. 3) Integration with Textual Rationales: Evaluating the impact of combining mathematical textual rationales with code-based ones during training to enhance mathematical performance.
|
| 52 |
+
|
| 53 |
+
To explore the above questions, we collect instruction tuning datasets for three types: Math-Text, Math-Code and General Code. The Math-Text dataset, derived from MathInstruct (Yue et al., 2023), contains 26k math questions annotated with textual rationales. Similarly, Math-Code is another subset of MathInstruct, consisting of the same 26k math questions as Math-Text but annotated with code-based rationales. Finally, General Code comprises 21k Python coding instructions for non-math-specific tasks, curated from Code Alpaca (Chaudhary, 2023) and code generation tasks<sup>2</sup>. Detailed statistics for these datasets can be found in Appendix Table 7.
|
| 54 |
+
|
| 55 |
+
For evaluation datasets, we use four math Q&A datasets representing distinct mathematical perspectives: (1) Arithmetic: A dataset of arithmetic questions from MathBench (Liu et al., 2024). (2) SVAMP (Patel et al., 2021): A primary-school-level algebraic word problem dataset. (3) GSM (Cobbe et al., 2021): A middle-school-level algebraic word problem dataset. (4) MATH (Hendrycks et al., 2021): A challenging dataset that extends beyond the high school level and covers diverse topics, including algebra, precalculus, and number theory. Examples from each dataset are provided in Appendix Figure 5. While Arithmetic focuses solely on basic arithmetic, the difficulty of mathematical problems increases progressively from SVAMP to GSM, and finally to MATH. By default, we use PoT reasoning during evaluation unless otherwise specified as CoT reasoning.
|
| 56 |
+
|
| 57 |
+
Both general-purpose and code-specialized models are evaluated. The general-purpose models include Llama-3.1-8B (Dubey et al., 2024) and Gemma-2B (Gemma-Team, 2024), while the code-specialized models include CodeLlama-Python-7B (Roziere et al., 2023) and CodeGemma (CodeGemma-Team, 2024). The instruction tuning details are provided in Appendix D.
|
| 58 |
+
|
| 59 |
+
# 3.1 Coding Style
|
| 60 |
+
|
| 61 |
+
What coding styles in code-based rationales are most effective for model learning? To address this question, we examine three key attributes of coding styles that may influence a model's mathematical reasoning capabilities: Comment Usage, Naming Convention, and Solution Generality. Previous studies have discussed the role of variable naming and comment usage in prompting design (Chen et al., 2022; Gao et al., 2023a). In contrast, we focus on the influence of the instruction tuning phase with three attributes including a newly introduced one called, Solution Generality. Figure 1 illustrates examples of different coding styles across these attributes. To generate rationales with diverse coding styles, we employ GPT-4o (OpenAI, 2024) to transform the original code-based rationales in the Math-Code dataset into variations reflecting diverse coding styles. Detailed instructions for generating these rationales are provided in Appendix C.
|
| 62 |
+
|
| 63 |
+
We focus on evaluating models in a zero-shot setting, as instruction-tuned models trained with datasets featuring different coding styles typically require few-shot examples that align with those styles, but a few-shot setting with different examples for different models may lead to biased evaluation results. Zero-shot evaluation allows us to isolate the effects of the instruction tuning data as the sole variable.
|
| 64 |
+
|
| 65 |
+
Comment Usage. We analyze the role of comment density in code-based rationales. Comments explain the overall logic of the rationales and the reasoning behind each step. We create three types of code-based rationales with varying comment usages: No Comment, Concise Comment, and Detailed Comment. In No Comment, the code stands alone, requiring the model to learn the code's func
|
| 66 |
+
|
| 67 |
+
<table><tr><td>Model</td><td>Comment</td><td>A.</td><td>S.</td><td>G.</td><td>M.</td><td>Avg.</td></tr><tr><td rowspan="3">Llama-3.1-8B</td><td>No</td><td>61.7</td><td>30.4</td><td>32.4</td><td>11.5</td><td>34.0</td></tr><tr><td>Concise</td><td>83.3</td><td>80.3</td><td>73.5</td><td>36.4</td><td>68.4</td></tr><tr><td>Detailed</td><td>80.7</td><td>83.4</td><td>73.6</td><td>35.5</td><td>68.3</td></tr><tr><td rowspan="3">CodeLlama-Python-7B</td><td>No</td><td>82.7</td><td>64.4</td><td>52.2</td><td>27.3</td><td>56.7</td></tr><tr><td>Concise</td><td>83.0</td><td>68.7</td><td>59.7</td><td>28.1</td><td>59.9</td></tr><tr><td>Detailed</td><td>83.3</td><td>69.6</td><td>55.4</td><td>27.2</td><td>58.9</td></tr><tr><td rowspan="3">Gemma-2-2B</td><td>No</td><td>73.0</td><td>65.3</td><td>53.6</td><td>25.8</td><td>54.4</td></tr><tr><td>Concise</td><td>77.3</td><td>67.6</td><td>54.7</td><td>26.6</td><td>56.6</td></tr><tr><td>Detailed</td><td>79.0</td><td>67.2</td><td>54.0</td><td>24.4</td><td>56.2</td></tr><tr><td rowspan="3">CodeGemma-2B</td><td>No</td><td>79.0</td><td>53.1</td><td>40.9</td><td>21.4</td><td>48.6</td></tr><tr><td>Concise</td><td>80.0</td><td>52.0</td><td>41.0</td><td>21.7</td><td>48.7</td></tr><tr><td>Detailed</td><td>81.0</td><td>55.2</td><td>39.7</td><td>21.4</td><td>49.3</td></tr></table>
|
| 68 |
+
|
| 69 |
+
Table 1: Results with different Comment Usages. The best average performance for each model is highlighted in bold. A., S., G., and M. refer to the Arithmetic, SVAMP, GSM, and MATH datasets, respectively.
|
| 70 |
+
|
| 71 |
+
Question: Calculate the sum $1 + 3 + 5 + \backslash cdots + 15 + 17$ . Please write a program to solve it.
|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
Figure 1: Exemplary code-based rationales in various coding styles (excluding No Comment in Code Notation). Certain lines are folded or omitted for improved visualization.
|
| 75 |
+
|
| 76 |
+
tionality and mathematical logic solely from the code. Concise Comment includes essential annotations that clarify key steps in math problem-solving. Detailed Comment rationales offer comprehensive annotations, providing line-by-line explanations of the code's functionality and the underlying mathematical logic. By examining these three types of comment usage, we can assess how the presence and density of comments in instruction data influence the model's mathematical reasoning capabilities.
|
| 77 |
+
|
| 78 |
+
The experimental results are summarized in Table 1. Compared with No Comment, both Concise Comment and Detailed Comment styles exhibit good overall performance, with Concise Comment slightly outperforming Detailed Comment. Additionally, the performance improvement of Concise Comment and Detailed Comment over No Comment is larger for general-purpose models than for the code-specialized models. This suggests that while both general-purpose and code-specific models benefit from comments, code-specialized models inherently have a strong ability to understand code, making comments less critical for them. In contrast, comments are relatively crucial for general-purpose models to better grasp the mathematical reasoning underlying the code.
|
| 79 |
+
|
| 80 |
+
Naming Convention. We identify naming con
|
| 81 |
+
|
| 82 |
+
<table><tr><td>Model</td><td>Naming</td><td>A.</td><td>S.</td><td>G.</td><td>M.</td><td>Avg.</td></tr><tr><td rowspan="2">Llama-3.1-8B</td><td>Descriptive</td><td>82.3</td><td>81.8</td><td>72.9</td><td>35.6</td><td>68.2</td></tr><tr><td>Obscure</td><td>78.0</td><td>80.1</td><td>72.3</td><td>35.7</td><td>66.5</td></tr><tr><td rowspan="2">CodeLlama-Python-7B</td><td>Descriptive</td><td>80.3</td><td>69.8</td><td>58.3</td><td>28.0</td><td>59.1</td></tr><tr><td>Obscure</td><td>79.0</td><td>66.1</td><td>55.5</td><td>28.0</td><td>57.2</td></tr><tr><td rowspan="2">Gemma-2-B</td><td>Descriptive</td><td>74.7</td><td>65.3</td><td>57.8</td><td>26.5</td><td>56.1</td></tr><tr><td>Obscure</td><td>73.7</td><td>62.3</td><td>55.0</td><td>25.9</td><td>54.2</td></tr><tr><td rowspan="2">CodeGemma-2B</td><td>Descriptive</td><td>74.0</td><td>57.3</td><td>40.9</td><td>21.6</td><td>48.4</td></tr><tr><td>Obscure</td><td>72.0</td><td>54.8</td><td>39.7</td><td>21.4</td><td>47.0</td></tr></table>
|
| 83 |
+
|
| 84 |
+
Table 2: Results with different Naming Conventions.
|
| 85 |
+
|
| 86 |
+
ventions that best support models' mathematical reasoning learning. We design two types of naming conventions, namely, Descriptive Naming and Obscure Naming, while keeping other aspects of the code, such as comments and logic, unchanged. Descriptive Naming uses clear and meaningful names for all variables, whereas obscure naming employs short, non-descriptive names (e.g., single letters or random abbreviations).
|
| 87 |
+
|
| 88 |
+
As shown in Table 2, the results indicate that Descriptive Naming generally outperforms Obscure Naming. These findings are consistent with previous studies on naming conventions in prompting (Chen et al., 2022; Gao et al., 2023a). This further supports the idea that Descriptive Naming provides semantic context, helping models associate variable and function names with their intended purposes, which in turn enhances their understanding of mathematical problems.
|
| 89 |
+
|
| 90 |
+
<table><tr><td>Model</td><td>Generality</td><td>A.</td><td>S.</td><td>G.</td><td>M.</td><td>Avg.</td></tr><tr><td rowspan="2">Llama-3.1-8B</td><td>Hardcoded</td><td>83.3</td><td>78.9</td><td>73.5</td><td>34.8</td><td>67.6</td></tr><tr><td>Generalized</td><td>78.0</td><td>75.1</td><td>72.7</td><td>29.0</td><td>63.7</td></tr><tr><td rowspan="2">CodeLlama-Python-7B</td><td>Hardcoded</td><td>82.0</td><td>67.9</td><td>58.5</td><td>29.3</td><td>59.4</td></tr><tr><td>Generalized</td><td>71.3</td><td>67.4</td><td>54.8</td><td>21.7</td><td>53.9</td></tr><tr><td rowspan="2">Gemma-2-2B</td><td>Hardcoded</td><td>78.3</td><td>62.5</td><td>55.6</td><td>26.4</td><td>55.7</td></tr><tr><td>Generalized</td><td>68.7</td><td>60.3</td><td>51.4</td><td>18.9</td><td>49.8</td></tr><tr><td rowspan="2">CodeGemma-2B</td><td>Hardcoded</td><td>76.0</td><td>52.8</td><td>40.3</td><td>21.4</td><td>47.6</td></tr><tr><td>Generalized</td><td>68.7</td><td>49.0</td><td>39.2</td><td>16.9</td><td>43.5</td></tr></table>
|
| 91 |
+
|
| 92 |
+
Solution Generality. We explore the benefits of generalized versus hardcoded solutions. In a generalized solution, a reusable function is written to capture the logic underlying the math problem, allowing the code to handle similar mathematical problems by accepting different inputs. Such reusable functions help models acquire generalizable knowledge of mathematical problems, thereby improving their ability to generalize. In contrast, hardcoded solutions are tailored to specific problem instances, making them straightforward and easier for the model to learn.
|
| 93 |
+
|
| 94 |
+
As shown in Table 3, hardcoded solutions consistently outperform generalized solutions, suggesting that models benefit more from the explicit specificity of hardcoded logic, which simplifies learning. However, these results do not imply that hardcoded solutions are always better for mathematical instruction tuning. For example, a retrieval-augmented generation (RAG) model (Gao et al., 2023b) may perform better with generalized solutions if it retrieves relevant functions effectively. We do not explore this area, as our experiments focus on a zero-shot setting for coding styles.
|
| 95 |
+
|
| 96 |
+
Summary. Based on our analysis of coding styles, we draw the following conclusions: 1) Comments on code-based rationales consistently improve performance as they help LLMs understand the logic behind mathematical problems. 2) Descriptive naming conventions should be adopted to enhance the model's understanding of mathematical problems. 3) The hardcoded style of code-based rationales provides a simpler and more effective approach for model learning.
|
| 97 |
+
|
| 98 |
+
# 3.2 General Coding Instruction is Limited for Math Reasoning
|
| 99 |
+
|
| 100 |
+
The second question is whether coding instructions from general domains, i.e. non-mathematical domains, can improve mathematical ability under PoT reasoning. To investigate this, we train models on three instruction tuning datasets: General Code, Math-Code, and a combination of General Code
|
| 101 |
+
|
| 102 |
+
Table 3: Results with different Solution Generalities.
|
| 103 |
+
|
| 104 |
+
<table><tr><td>IT Data</td><td>Arith</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Avg.</td></tr><tr><td colspan="6">Zero-Shot</td></tr><tr><td>Vanilla Llama</td><td>13.0</td><td>1.4</td><td>1.0</td><td>1.0</td><td>4.1</td></tr><tr><td>+ G.C.</td><td>35.0</td><td>36.6</td><td>25.3</td><td>11.8</td><td>27.2</td></tr><tr><td>+ M.C.</td><td>80.3</td><td>80.9</td><td>73.8</td><td>32.1</td><td>66.8</td></tr><tr><td>+ Mix</td><td>65.3</td><td>75.9</td><td>71.1</td><td>20.3</td><td>58.2</td></tr><tr><td>Vanilla CodeLlama</td><td>19.3</td><td>7.2</td><td>1.2</td><td>2.4</td><td>7.5</td></tr><tr><td>+ G.C.</td><td>70.3</td><td>50.9</td><td>23.4</td><td>14.4</td><td>39.8</td></tr><tr><td>+ M.C.</td><td>83.7</td><td>69.0</td><td>58.7</td><td>29.2</td><td>60.2</td></tr><tr><td>+ Mix</td><td>81.7</td><td>70.6</td><td>58.1</td><td>23.9</td><td>58.6</td></tr></table>
|
| 105 |
+
|
| 106 |
+
<table><tr><td colspan="6">Few-Shot</td></tr><tr><td>Vanilla Llama</td><td>78.0</td><td>73.1</td><td>50.0</td><td>18.0</td><td>54.8</td></tr><tr><td>+ G.C.</td><td>74.7</td><td>76.2</td><td>51.3</td><td>23.0</td><td>56.3</td></tr><tr><td>+ M.C.</td><td>83.7</td><td>80.4</td><td>71.6</td><td>33.8</td><td>67.4</td></tr><tr><td>+ Mix</td><td>78.7</td><td>78.0</td><td>71.6</td><td>34.4</td><td>65.7</td></tr><tr><td>Vanilla CodeLlama</td><td>79.7</td><td>52.9</td><td>21.1</td><td>14.1</td><td>42.0</td></tr><tr><td>+ G.C.</td><td>75.3</td><td>54.0</td><td>27.3</td><td>16.6</td><td>43.3</td></tr><tr><td>+ M.C.</td><td>80.0</td><td>65.8</td><td>54.4</td><td>25.9</td><td>56.5</td></tr><tr><td>+ Mix</td><td>80.7</td><td>65.4</td><td>51.8</td><td>24.7</td><td>55.6</td></tr></table>
|
| 107 |
+
|
| 108 |
+
Table 4: Performance of coding instruction from different domains. G.C., and M.C. represent General Code, and Math-Code, respectively. Vanilla Llama and Vanilla CodeLlama represent Llama-3.1-8B and CodeLlama-Python-7B, respectively. Cells are green if the instruction tuning boosts the vanilla models' performance, and red if the instruction tuning hurts the performance.
|
| 109 |
+
|
| 110 |
+
and Math-Code.
|
| 111 |
+
|
| 112 |
+
Prior studies (Wang et al., 2023b; Zhang et al., 2024b) indicate that, under CoT reasoning, instruction tuning on general code, i.e., non-math-specific data can have trivial or even negative effects on mathematical reasoning abilities. Under PoT reasoning, our experiments reveal a different trend, which is presented in Table 4.
|
| 113 |
+
|
| 114 |
+
In both zero-shot and few-shot settings, training solely on General Code mostly enhances the models' performance in solving math problems. This improvement is primarily attributed to the models' enhanced ability to generate valid code and follow instructions, making the models better suited for PoT reasoning compared to the base model. We define the valid code rate as the percentage of executable code generated by a model. Figure 2 presents the accuracy and valid code rate under zero-shot settings. The results demonstrate that training on General Code significantly improves the models' ability to generate valid code and adhere to instructions, leading to higher accuracy in solving mathematical questions.
|
| 115 |
+
|
| 116 |
+
However, models solely trained on Math-Code achieve the best performance, and incorporating General Code alongside Math-Code reduces its effectiveness. This implies that non-task-relevant coding instructions, i.e., General Code, distract the models and hinder their mathematical reasoning capabilities. These findings suggest that coding instructions from general domains offer limited
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
(a) LLama-3.1-8B
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
(b) CodeLlama-Python-7B
|
| 123 |
+
Figure 2: Average accuracy and average valid code rate across the evaluation datasets under zero-shot.
|
| 124 |
+
|
| 125 |
+
benefits for enhancing mathematical reasoning.
|
| 126 |
+
|
| 127 |
+
# 3.3 Math-Text is Not Always a Supplement for Math-Code
|
| 128 |
+
|
| 129 |
+
Recent works (Yue et al., 2023; Wang et al., 2023a) commonly employ hybrid training on both textual and code-based rationales to enhance mathematical reasoning. According to Yue et al. (2023), textual rationales contribute to general language-based reasoning, particularly for scenarios where PoT reasoning struggles, such as abstract reasoning in multiple-choice questions.
|
| 130 |
+
|
| 131 |
+
In this study, we delve deeper by focusing on math questions that require concrete calculations, excluding abstract reasoning, and investigate whether Math-Text consistently serves as a supplement to Math-Code. To ensure a fair comparison, we trained models on three instruction tuning datasets: Math-Text, Math-Code, which contain identical mathematical questions, differing only in the rationales provided, and a combination of both.
|
| 132 |
+
|
| 133 |
+
The results presented in Table 5 show different trends between general-purpose and code-specialized models. For the general-purpose model, Llama-3.1-8B, incorporating Math-Text alongside Math-Code slightly improves performance by enhancing the model's ability to comprehend mathematical problems in a language-based manner. However, for code-specialized models, this addi
|
| 134 |
+
|
| 135 |
+
<table><tr><td>Model</td><td>IT Data</td><td>Arith</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Avg</td></tr><tr><td colspan="7">Zero-Shot</td></tr><tr><td rowspan="3">Llama-3.1-8B</td><td>M.T.</td><td>38.7</td><td>62.2</td><td>54.6</td><td>20.6</td><td>44.0</td></tr><tr><td>M.C.</td><td>80.3</td><td>80.9</td><td>73.8</td><td>32.1</td><td>66.8</td></tr><tr><td>Mix</td><td>80.3</td><td>81.1</td><td>76.0</td><td>34.4</td><td>67.9</td></tr><tr><td rowspan="3">CodeLlama-7B</td><td>M.T.</td><td>22.7</td><td>44.8</td><td>32.4</td><td>7.9</td><td>26.9</td></tr><tr><td>M.C.</td><td>83.7</td><td>69.0</td><td>58.7</td><td>29.2</td><td>60.2</td></tr><tr><td>Mix</td><td>79.3</td><td>67.8</td><td>59.1</td><td>28.1</td><td>58.6</td></tr><tr><td colspan="7">Few-Shot</td></tr><tr><td rowspan="3">Llama-3.1-8B</td><td>M.T.</td><td>48.3</td><td>67.5</td><td>62.7</td><td>21.8</td><td>50.1</td></tr><tr><td>M.C.</td><td>83.7</td><td>80.4</td><td>71.6</td><td>33.8</td><td>67.4</td></tr><tr><td>Mix</td><td>83.0</td><td>79.8</td><td>73.0</td><td>35.4</td><td>67.8</td></tr><tr><td rowspan="3">CodeLlama-7B</td><td>M.T.</td><td>31.0</td><td>48.4</td><td>26.7</td><td>7.9</td><td>28.5</td></tr><tr><td>M.C.</td><td>80.0</td><td>65.8</td><td>54.4</td><td>25.9</td><td>56.5</td></tr><tr><td>Mix</td><td>78.3</td><td>65.1</td><td>53.4</td><td>24.5</td><td>55.3</td></tr></table>
|
| 136 |
+
|
| 137 |
+
Table 5: Performance of coding instruction from textual and code-based rationales. M.T, and M.C. represent Math-Code, and Math-Code, respectively. M.T. uses CoT prompting inference while others use PoT prompting inference.
|
| 138 |
+
|
| 139 |
+
tion negatively impacts performance, as these models are inherently optimized for code generation. The inclusion of textual rationales may interfere with their specialized capabilities. This finding suggests that when mathematical questions include code-based rationales, augmenting them with textual explanations is beneficial only for models that are proficient in textual reasoning.
|
| 140 |
+
|
| 141 |
+
# 4 CoinMath
|
| 142 |
+
|
| 143 |
+
Building on the insights from our systematic study on coding instruction, we introduce CoinMath, a strategy that enhances coding instructions by incorporating beneficial coding styles to improve the mathematical reasoning capabilities of LLMs.
|
| 144 |
+
|
| 145 |
+
# 4.1 Method
|
| 146 |
+
|
| 147 |
+
The CoinMath framework is depicted in Figure 3. As discussed in the previous section, LLMs demonstrate varying performance depending on the coding styles of mathematical rationales. Among the evaluated coding styles, Concise Comment performs best in the Comment Usage category, Descriptive Naming outperforms in Naming Conventions, and Hardcoded Solution outperforms in Solution Generalities. However, while these styles outperform their counterparts within their respective attributes, no single coding style proves universally optimal for all mathematical questions. For instance, as shown in Section 3.1, Hardcoded Solution, while better than Generalized Solution in the Solution Generality attribute, performs poorly on the SVAMP dataset for Llama-3.1-8B. This suggests that a fixed coding style may not be ideal for all mathematical problems.
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 3: Overview of CoinMath framework. CoinMath generates three distinct variations of code-based rationales with advantageous coding attributes—Concise Comment, Descriptive Naming, and Hardcoded Solution—and ensembles them for LLM instruction tuning.
|
| 151 |
+
|
| 152 |
+
Instead of creating only one code-based rationale for a math question with fixed coding attributes, CoinMath generates three variations of rationales with diverse beneficial coding styles, using the same strategy outlined in Section 3.1. Each variation emphasizes one specific coding style attribute: concise comments, descriptive naming conventions, or hardcoded solutions. CoinMath then ensembles these three variations of rationales with beneficial coding attributes to maximize the enhancement of models' mathematical reasoning.
|
| 153 |
+
|
| 154 |
+
Additionally, CoinMath excludes coding instructions from general domains and mathematical textual rationales, as their contributions to improving mathematical reasoning are minimal or even negative.
|
| 155 |
+
|
| 156 |
+
# 4.2 Experimental Setup
|
| 157 |
+
|
| 158 |
+
We scale up the base instruction tuning dataset using the complete set of code-based rationales from MathInstruct (Yue et al., 2023), which contains 73k math questions with code-based rationales. Subsequently, we leverage this scaled dataset to generate code-based rationales with diverse coding styles using GPT-4o. We use the same evaluation datasets as in Section 3.
|
| 159 |
+
|
| 160 |
+
For comparison, we select representative models from the following three categories: Base models: We consider Llama-3.1 (Dubey et al., 2024) and CodeLlama-Python-7B (Roziere et al., 2023) as our base models. Instruct models: We include CodeLlama-3.1-8B-Instruct (Dubey et al., 2024) as a representative instruct-tuned model. Math-specific models: These models are fine
|
| 161 |
+
|
| 162 |
+
tuned specifically for solving math problems, including WizardMath (Luo et al., 2023), MathCoder (Wang et al., 2023a), and MAmmoTH (Yue et al., 2023). Since our instruction-tuning dataset with diverse coding styles is derived from MathInstruct which MAmmoTH utilizes, we further fine-tuned Llama-3.1-8B and CodeLlama-Python7B on MathInstruct to ensure consistency in base models used for comparison. This approach establishes a strong baseline for assessing the improvements introduced by CoinMath. Additionally, we include Qwen2-Math-7B and Qwen2-Math-7B-Instruct (Yang et al., 2024), which are heavily optimized for mathematics and demonstrate superior performance, rivaling even closed-source models (e.g., GPT-4).
|
| 163 |
+
|
| 164 |
+
We evaluate the models' zero-shot performance and select the best result from two prompting approaches: CoT prompting and hybrid prompting. The hybrid prompting approach first uses PoT prompting and resorts to CoT prompting only if PoT fails to generate a result.
|
| 165 |
+
|
| 166 |
+
# 4.3 Results and Analysis
|
| 167 |
+
|
| 168 |
+
The experimental results are presented in Table 6. CoinMath significantly outperforms MAmmoTH after learning from code-based rationales that incorporate concise comments, descriptive naming conventions, and hardcoded solutions. Additionally, both CoinMath and Llama-3.1-Instruct are built on the Llama-3.1 base model and are instruct-tuned for mathematical reasoning, with Llama-3.1-Instruct further fine-tuned on other instruction-tuning topics. CoinMath surpasses Llama-3.1-Instruct except
|
| 169 |
+
|
| 170 |
+
<table><tr><td>Model</td><td>Base</td><td>Prompt</td><td>Arithmetic</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Avg</td></tr><tr><td colspan="8">Non-Math-Specific Model (<8B)</td></tr><tr><td>Llama-3.1</td><td>-</td><td>CoT</td><td>36.7</td><td>45.7</td><td>17.9</td><td>8.6</td><td>27.3</td></tr><tr><td>Llama-3.1-Instruct</td><td>-</td><td>CoT</td><td>51.7</td><td>81.1</td><td>75.1</td><td>45.7</td><td>63.4</td></tr><tr><td>CodeLlama-Python</td><td>-</td><td>Hybrid</td><td>24.3</td><td>21.9</td><td>3.7</td><td>4.9</td><td>13.7</td></tr><tr><td colspan="8">Math-specific Model (<8B)</td></tr><tr><td>Qwen2-Math</td><td>Qwen2</td><td>CoT</td><td>76.3</td><td>91.4</td><td>78.8</td><td>71.6</td><td>79.5</td></tr><tr><td>Qwen2-Math-Instruct</td><td>Qwen2</td><td>CoT</td><td>65.0</td><td>87.0</td><td>79.2</td><td>70.2</td><td>75.4</td></tr><tr><td>WizardMath-V1.1</td><td>Llama-2</td><td>CoT</td><td>38.3</td><td>72.5</td><td>67.4</td><td>33.5</td><td>52.9</td></tr><tr><td>MathCoder-L†</td><td>Llama-2</td><td>-</td><td>-</td><td>71.5</td><td>64.2</td><td>23.3</td><td>-</td></tr><tr><td>MathCoder-CL†</td><td>CodeLlama</td><td>-</td><td>-</td><td>70.7</td><td>67.8</td><td>30.2</td><td>-</td></tr><tr><td>MAmmoTH</td><td>Llama-2</td><td>Hybrid</td><td>13.0</td><td>65.3</td><td>51.9</td><td>31.5</td><td>40.4</td></tr><tr><td>MAmmoTH-Coder</td><td>CodeLlama</td><td>Hybrid</td><td>31.0</td><td>54.2</td><td>31.8</td><td>20.5</td><td>34.4</td></tr><tr><td>MAmmoTH</td><td>Llama-3.1</td><td>Hybrid</td><td>71.4</td><td>81.3</td><td>73.0</td><td>39.1</td><td>66.2</td></tr><tr><td>MAmmoTH-Coder</td><td>CodeLlama-Python</td><td>Hybrid</td><td>72.7</td><td>67.0</td><td>52.9</td><td>21.8</td><td>53.6</td></tr><tr><td>CoinMath</td><td>Llama-3.1</td><td>Hybrid</td><td>77.0 (+5.6)</td><td>83.1 (+1.8)</td><td>76.4 (+3.4)</td><td>40.3 (+1.2)</td><td>69.2 (+3.0)</td></tr><tr><td>CoinMath</td><td>CodeLlama-Python</td><td>Hybrid</td><td>80.7 (+8.0)</td><td>75.1 (+8.1)</td><td>62.0 (+9.1)</td><td>31.8 (+10.0)</td><td>62.4 (+8.8)</td></tr></table>
|
| 171 |
+
|
| 172 |
+
Table 6: Zero-shot performance on mathematical evaluation datasets. Red numbers highlight the improvement compared with the same base models trained on MathInstruct, i.e., MAmmoTH models. $\dagger$ means the results are from the corresponding papers.
|
| 173 |
+
|
| 174 |
+
for the MATH dataset, demonstrating the effectiveness of our approach.
|
| 175 |
+
|
| 176 |
+
It is worth noting that the performance on the Arithmetic dataset, an out-of-domain evaluation dataset, decreases compared to the results in Section 3 as the training set is scaled up. In addition, it is reasonable that our models fall behind the Qwen2-Math models, as those models undergo extensive training for mathematics across pre-training, instruction tuning, and reinforcement learning stages while CoinMath focuses solely on the instruction tuning stage.
|
| 177 |
+
|
| 178 |
+
Ablation Study. We investigate the impact of combining different coding styles on model performance. Figure 4 presents the average accuracy across our evaluation datasets for various combinations of coding styles. Detailed performance metrics for each individual evaluation dataset are provided in Appendix E. Our results show that incorporating concise comments, descriptive naming conventions, and hardcoded solutions consistently enhances the model's performance in solving math problems. In contrast, their counterparts—no comment, obscure naming conventions, and generalized solutions—yield relatively inferior performance, achieving results similar to training solely with concise comments. Finally, combining all coding styles does not achieve performance as high as the combination of concise comments, descriptive naming conventions, and hardcoded solutions, further proving that these three attributes are partic-
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 4: Average accuracy of the models using code-based rationales with different combinations of styles. The average accuracy is calculated across the Arithmetic, SVAMP, GSM, and MATH datasets.
|
| 182 |
+
|
| 183 |
+
ularly effective for code-based rationales in improving the model's mathematical reasoning ability.
|
| 184 |
+
|
| 185 |
+
# 5 Conclusion
|
| 186 |
+
|
| 187 |
+
We conduct a systematic study to investigate how coding instructions can effectively enhance the mathematical reasoning abilities of LLMs. Based on these findings, we propose CoinMath, which focuses specifically on mathematical code-based rationales and combines mathematical coding instructions with concise comments, descriptive naming, and hardcoded solutions to boost the mathematical reasoning capabilities of LLMs. Experimental results demonstrate that CoinMath outperforms the baseline model, MAmmoTH, one of the SOTA models, by an average improvement of $5.9\%$ in
|
| 188 |
+
|
| 189 |
+
accuracy.
|
| 190 |
+
|
| 191 |
+
# Limitations
|
| 192 |
+
|
| 193 |
+
We focus on evaluating LLMs' mathematical reasoning abilities on datasets requiring concrete calculations, including Arithmetic, SVAMP, GSM, and MATH. However, for other types of math questions involving abstract reasoning or mathematical knowledge, such as abstract algebra, and theorem comprehension, code-based solutions may be less effective. This underscores the importance of extending our work to these tasks to gain insights across a broader range of mathematical question types.
|
| 194 |
+
|
| 195 |
+
# Acknowledgments
|
| 196 |
+
|
| 197 |
+
This research is supported by the Ministry of Education, Singapore, under its Science of Learning Grant (Award ID MOE-MOESOL2021-0006). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of the Ministry of Education, Singapore.
|
| 198 |
+
|
| 199 |
+
The authors acknowledge the use of AI Assistants for grammar and language refinement during the preparation of the manuscript.
|
| 200 |
+
|
| 201 |
+
# References
|
| 202 |
+
|
| 203 |
+
Janice Ahn, Rishu Verma, Renze Lou, Di Liu, Rui Zhang, and Wenpeng Yin. 2024. Large language models for mathematical reasoning: Progresses and challenges. In The 18th Conference of the European Chapter of the Association for Computational Linguistics, page 225.
|
| 204 |
+
Zhangir Azerbayev, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos, Stephen McAleer, Albert Q Jiang, Jia Deng, Stella Biderman, and Sean Welleck. 2023. Llemma: An open language model for mathematics. arXiv preprint arXiv:2310.10631.
|
| 205 |
+
Zhen Bi, Ningyu Zhang, Yinuo Jiang, Shumin Deng, Guozhou Zheng, and Huajun Chen. 2024. When do program-of-thought works for reasoning? In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 17691-17699.
|
| 206 |
+
Sahil Chaudhary. 2023. Code alpaca: An instruction-following llama model for code generation. https://github.com/sahil280114/codealpaca.
|
| 207 |
+
Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W Cohen. 2022. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. arXiv preprint arXiv:2211.12588.
|
| 208 |
+
|
| 209 |
+
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
|
| 210 |
+
CodeGemma-Team. 2024. Codegemma: Open code models based on gemma. arXiv preprint arXiv:2406.11409.
|
| 211 |
+
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
|
| 212 |
+
Luyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023a. Pal: Program-aided language models. In International Conference on Machine Learning, pages 10764-10799. PMLR.
|
| 213 |
+
Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, and Haofen Wang. 2023b. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997.
|
| 214 |
+
Gemma-Team. 2024. Gemma 2: Improving open language models at a practical size. arXiv preprint arXiv:2408.00118.
|
| 215 |
+
Zhibin Gou, Zhihong Shao, Yeyun Gong, yelong shen, Yujiu Yang, Minlie Huang, Nan Duan, and Weizhu Chen. 2024. ToRA: A tool-integrated reasoning agent for mathematical problem solving. In The Twelfth International Conference on Learning Representations.
|
| 216 |
+
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring mathematical problem solving with the math dataset. NeurIPS.
|
| 217 |
+
Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685.
|
| 218 |
+
Hamish Ivison, Yizhong Wang, Valentina Pyatkin, Nathan Lambert, Matthew Peters, Pradeep Dasigi, Joel Jang, David Wadden, Noah A Smith, Iz Beltagy, et al. 2023. Camels in a changing climate: Enhancing lm adaptation with tulu 2. arXiv preprint arXiv:2311.10702.
|
| 219 |
+
Aitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, et al. 2022. Solving quantitative reasoning problems with language models. Advances in Neural Information Processing Systems, 35:3843-3857.
|
| 220 |
+
|
| 221 |
+
Hongwei Liu, Zilong Zheng, Yuxuan Qiao, Haodong Duan, Zhiwei Fei, Fengzhe Zhou, Wenwei Zhang, Songyang Zhang, Dahua Lin, and Kai Chen. 2024. Mathbench: Evaluating the theory and application proficiency of llms with a hierarchical mathematics benchmark.
|
| 222 |
+
Haipeng Luo, Qingfeng Sun, Can Xu, Pu Zhao, Jianguang Lou, Chongyang Tao, Xiubo Geng, Qingwei Lin, Shifeng Chen, and Dongmei Zhang. 2023. Wizardmath: Empowering mathematical reasoning for large language models via reinforced evol-instruct. arXiv preprint arXiv:2308.09583.
|
| 223 |
+
YINGWEI Ma, Yue Liu, Yue Yu, Yuanliang Zhang, Yu Jiang, Changjian Wang, and Shanshan Li. 2024. At which training stage does code data help LLMs reasoning? In The Twelfth International Conference on Learning Representations.
|
| 224 |
+
Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. 2021. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114.
|
| 225 |
+
OpenAI. 2024. Hello gpt-4o. Accessed: 2024-05-26.
|
| 226 |
+
Arkil Patel, Satwik Bhattachamishra, and Navin Goyal. 2021. Are nlp models really able to solve simple math word problems? In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2080-2094.
|
| 227 |
+
Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950.
|
| 228 |
+
Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Y Wu, et al. 2024. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300.
|
| 229 |
+
Shubham Toshniwal, Ivan Moshkov, Sean Narethiran, Daria Gitman, Fei Jia, and Igor Gitman. 2024. Openmathinstruct-1: A 1.8 million math instruction tuning dataset. arXiv preprint arXiv:2402.10176.
|
| 230 |
+
Ke Wang, Houxing Ren, Aojun Zhou, Zimu Lu, Sichun Luo, Weikang Shi, Renrui Zhang, Linqi Song, Mingjie Zhan, and Hongsheng Li. 2023a. Math-coder: Seamless code integration in llms for enhanced mathematical reasoning. arXiv preprint arXiv:2310.03731.
|
| 231 |
+
Yizhong Wang, Hamish Ivison, Pradeep Dasigi, Jack Hessel, Tushar Khot, Khyathi Chandu, David Wadden, Kelsey MacMillan, Noah A Smith, Iz Beltagy, et al. 2023b. How far can camels go? exploring the state of instruction tuning on open resources. Advances in Neural Information Processing Systems, 36:74764-74786.
|
| 232 |
+
|
| 233 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837.
|
| 234 |
+
An Yang, Beichen Zhang, Binyuan Hui, Bofei Gao, Bowen Yu, Chengpeng Li, Dayiheng Liu, Jianhong Tu, Jingren Zhou, Junyang Lin, et al. 2024. Qwen2. 5-math technical report: Toward mathematical expert model via self-improvement. arXiv preprint arXiv:2409.12122.
|
| 235 |
+
Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. 2023. Mammoth: Building math generalist models through hybrid instruction tuning. arXiv preprint arXiv:2309.05653.
|
| 236 |
+
Bo-Wen Zhang, Yan Yan, Lin Li, and Guang Liu. 2024a. Infinitymath: A scalable instruction tuning dataset in programmatic mathematical reasoning. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management, pages 5405-5409.
|
| 237 |
+
Xinlu Zhang, Zhiyu Zoey Chen, Xi Ye, Xianjun Yang, Lichang Chen, William Yang Wang, and Linda Ruth Petzold. 2024b. Unveiling the impact of coding data instruction fine-tuning on large language models reasoning. arXiv preprint arXiv:2405.20535.
|
| 238 |
+
|
| 239 |
+
# A Statistics of Instruction Tuning Datasets
|
| 240 |
+
|
| 241 |
+
Table 7 presents the statistics of the three base instruction-tuning datasets used in our study on coding instruction. Math-Code and Math-Text share the same set of mathematical questions but differ in their rationales, with Math-Code providing code-based rationales and Math-Text offering textual ones.
|
| 242 |
+
|
| 243 |
+
<table><tr><td>IT Dataset</td><td># Sample</td><td>Characteristics</td><td>Annotation</td></tr><tr><td>Math-Code</td><td>26k</td><td>Math questions with code-based rationales</td><td>GPT4</td></tr><tr><td>Math-Text</td><td>26k</td><td>Math questions with textual rationales</td><td>Human & Llama</td></tr><tr><td>General Code</td><td>21k</td><td>Coding instruction for general tasks</td><td>Llama</td></tr></table>
|
| 244 |
+
|
| 245 |
+
Table 7: Statistics of Math-Text, Math-Code and General Code
|
| 246 |
+
|
| 247 |
+
# B Sample Questions from Evaluation Datasets
|
| 248 |
+
|
| 249 |
+
Figure 5 shows the samples from Arithmetic, SVAMP, GSM and MATH.
|
| 250 |
+
|
| 251 |
+
Question: What is $(-1) / (-1)^{\star}((4563 / (-15)) / 13 - - 23)^{\star} - 125?$ Answer: 50
|
| 252 |
+
|
| 253 |
+
Question: Calculate 1000804 divided by -500402. Answer: -2
|
| 254 |
+
|
| 255 |
+
# (a) Arithmetic
|
| 256 |
+
|
| 257 |
+
Question: Paco had 26 salty cookies and 17 sweet cookies. He ate 14 sweet cookies and 9 salty cookies. How many salty cookies did Paco have left? Answer: 17.0
|
| 258 |
+
|
| 259 |
+
# (b) SVAMP
|
| 260 |
+
|
| 261 |
+
Question: Raymond and Samantha are cousins. Raymond was born 6 years before Samantha. Raymond had a son at the age of 23. If Samantha is now 31, how many years ago was Raymond's son born? Solution: When Raymond's son was born Samantha was 23 - 6 = <<23-6=17>>17 years old. Thus it has been 31 - 17 = <<31-17=14>>14 years since Raymond's son was born.
|
| 262 |
+
|
| 263 |
+
# (c) GSM
|
| 264 |
+
|
| 265 |
+
Question: What is the distance between the two intersections of $y=x^2$ and $\$x+y=1$ ? Solution: To find the $\$x$ -coordinates of the intersections, substitute $\$x^2$ for $\$y$ in $\$x+y=1$ and solve for $\$x$ , resulting in ... Answer: ["\sqrt{10} ", 3.1622776601683795"]
|
| 266 |
+
|
| 267 |
+
# (d) MATH
|
| 268 |
+
|
| 269 |
+
Figure 5: Sample questions from the evaluation datasets
|
| 270 |
+
|
| 271 |
+
# C Prompts for Generating Diverse Coding Style Rationales
|
| 272 |
+
|
| 273 |
+
Figure 6 shows the instruction we used for generating code-based rationales with different coding styles.
|
| 274 |
+
|
| 275 |
+
# D Instruction Tuning Details
|
| 276 |
+
|
| 277 |
+
We perform instruction tuning of the LLMs following the implementation of TULU (Wang et al., 2023b; Ivison et al., 2023). The models are finetuned using LoRA (Hu et al., 2021) with a rank of 64 and a total batch size of 128.
|
| 278 |
+
|
| 279 |
+
# E Results of Mixing Coding Styles
|
| 280 |
+
|
| 281 |
+
Table 8 demonstrates the performance of different combinations of coding styles for each evaluation dataset.
|
| 282 |
+
|
| 283 |
+
# instruction = ""
|
| 284 |
+
|
| 285 |
+
1) Please add a comment at the beginning of the code, explaining the purpose of the code.
|
| 286 |
+
2) Add comments to each line of the code in the solution, explaining its functionality where comments are missing.
|
| 287 |
+
3) Do not modify the code itself; only add comments.
|
| 288 |
+
4) Output only the code and comments. Exclude any additional text from the response.
|
| 289 |
+
|
| 290 |
+
# (a) Instruction for generating detailed comments
|
| 291 |
+
|
| 292 |
+
# instruction = ""
|
| 293 |
+
|
| 294 |
+
1) Given a math question and its Program-of-Thought (PoT) solution, generate two versions of the solution code:
|
| 295 |
+
a) **Descriptive Variable Names**: Use clear and descriptive names for all variables and functions.
|
| 296 |
+
b) **Obscure Variable Names**: Use short and non-descriptive names (e.g., single letters or random abbreviations).
|
| 297 |
+
2) Keep the code's structure, comments, and logic unchanged; only replace the variable names.
|
| 298 |
+
3) Avoid using reserved or unsafe names such as {'sum', 'len', 'float', 'int', 'str', 'list', 'dict'} as variable names.
|
| 299 |
+
4) Output only the code and comments in the specified format. Exclude any additional text.
|
| 300 |
+
|
| 301 |
+
# (b) Instruction for applying different naming conventions. instruction $=$
|
| 302 |
+
|
| 303 |
+
1) Given a math question and its Program-of-Thought (PoT) solution, generate two versions of the solution code:
|
| 304 |
+
a) **Generalized Programming**: - Create a reusable function that abstracts the logic and can handle similar math problems with different inputs or parameters.
|
| 305 |
+
b)\*\*Hardcoded Programming\*\*: -Write a specific solution tailored to the given math question,with fixed values and logic.
|
| 306 |
+
2) Output only the code and comments in the specified format. Exclude any additional text outside the provided template.
|
| 307 |
+
|
| 308 |
+
(c) Instruction for generating generalized and hardcoded solutions
|
| 309 |
+
|
| 310 |
+
Figure 6: Instruction for generation diverse coding style rationales
|
| 311 |
+
|
| 312 |
+
<table><tr><td>Model</td><td>IT Data</td><td>Arithmetic</td><td>SVAMP</td><td>GSM</td><td>MATH</td><td>Average</td></tr><tr><td rowspan="5">Llama-3.1-8B</td><td>Concise Comment</td><td>58.0</td><td>75.5</td><td>72.8</td><td>38.6</td><td>61.2</td></tr><tr><td>Concise Comment + Descriptive Naming</td><td>81.7</td><td>80.5</td><td>71.3</td><td>37.6</td><td>67.8</td></tr><tr><td>Concise Comment + Descriptive Naming + Hardcoded Solution</td><td>77.0</td><td>83.1</td><td>76.4</td><td>40.3</td><td>69.2</td></tr><tr><td>No Comment + Obscure Naming + General Solution</td><td>48.3</td><td>81.4</td><td>75.2</td><td>39.4</td><td>61.1</td></tr><tr><td>All</td><td>72.3</td><td>83.0</td><td>75.0</td><td>35.8</td><td>66.5</td></tr><tr><td rowspan="5">CodeLlama-7B</td><td>Concise Comment</td><td>44.3</td><td>68.6</td><td>56.6</td><td>21.4</td><td>47.7</td></tr><tr><td>Concise Comment + Descriptive Naming</td><td>80.3</td><td>69.6</td><td>56.6</td><td>29.5</td><td>59.0</td></tr><tr><td>Concise Comment + Descriptive Naming + Hardcoded Solution</td><td>80.7</td><td>75.1</td><td>62.0</td><td>31.8</td><td>62.4</td></tr><tr><td>No Comment + Obscure Naming + General Solution</td><td>66.0</td><td>69.9</td><td>60.2</td><td>27.4</td><td>55.9</td></tr><tr><td>All</td><td>79.3</td><td>73.7</td><td>60.7</td><td>31.7</td><td>61.4</td></tr></table>
|
| 313 |
+
|
| 314 |
+
Table 8: Ablation Study of Coding Styles. Evaluation is under zero-shot setting
|
2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69e4cc80ee27bd26cf3ebc7b3752adbb62a8e2581429070bd214389065569993
|
| 3 |
+
size 615226
|
2025/CoinMath_ Harnessing the Power of Coding Instruction for Math LLM/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/614ae70a-82a1-4a03-8912-d0ba0d79c1e5_content_list.json
ADDED
|
@@ -0,0 +1,1679 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Combining the Best of Both Worlds: A Method for Hybrid NMT and LLM Translation",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
115,
|
| 8 |
+
89,
|
| 9 |
+
882,
|
| 10 |
+
129
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Zhanglin Wu*, Daimeng Wei*, Xiaoyu Chen, Hengchao Shang, Jiaxin Guo, Zongyao Li, Yuanchang Luo, Jinlong Yang, Zhiqiang Rao, Hao Yang Huawei Translation Service Center, Beijing, China",
|
| 17 |
+
"bbox": [
|
| 18 |
+
176,
|
| 19 |
+
146,
|
| 20 |
+
826,
|
| 21 |
+
195
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "{wuzhanglin2,weidaimeng,chenxiaoyu35,shanghengchao,guojiaxin1, lizongyao,luoyuanchang1,yangjinlong7,raozhiqiang, yanghao30}@huawei.com",
|
| 28 |
+
"bbox": [
|
| 29 |
+
142,
|
| 30 |
+
197,
|
| 31 |
+
855,
|
| 32 |
+
231
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Abstract",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
260,
|
| 42 |
+
260,
|
| 43 |
+
339,
|
| 44 |
+
275
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "Large language model (LLM) shows promising performances in a variety of downstream tasks, such as machine translation (MT). However, using LLMs for translation suffers from high computational costs and significant latency. Based on our evaluation, in most cases, translations using LLMs are comparable to that generated by neural machine translation (NMT) systems. Only in particular scenarios, LLM and NMT models show respective advantages. As a result, integrating NMT and LLM for translation and using LLM only when necessary seems to be a sound solution. A scheduling policy that optimizes translation results while ensuring fast speed and as little LLM usage as possible is thereby required. We compare several scheduling policies and propose a novel and straightforward decider that leverages source sentence features. We conduct extensive experiments on multilingual test sets and the result shows that we can achieve optimal translation performance with minimal LLM usage, demonstrating effectiveness of our decider.",
|
| 51 |
+
"bbox": [
|
| 52 |
+
141,
|
| 53 |
+
290,
|
| 54 |
+
460,
|
| 55 |
+
617
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 Introduction",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
114,
|
| 65 |
+
632,
|
| 66 |
+
258,
|
| 67 |
+
646
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Neural models (Sutskever et al., 2014; Bahdanau et al., 2016; Vaswani et al., 2017) greatly boost machine translation (MT) performance while various inference speed-up strategies (Wang et al., 2019, 2021b,a) ensure fast translation. As model scales, large language model (LLM) (Ouyang et al., 2022; Touvron et al., 2023) now is able to deliver fairly good translation results(Son and Kim, 2023; Zhang et al., 2023; Moslem et al., 2023), which are even comparable to translations done by commercial translation systems. Hendy et al. (2023) find that LLM performs particularly well when translating content in particular domains. As shown in Figure 1, we find that neural machine translation (NMT) model and LLM have own merits and drawbacks.",
|
| 74 |
+
"bbox": [
|
| 75 |
+
112,
|
| 76 |
+
659,
|
| 77 |
+
489,
|
| 78 |
+
900
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "今天的天气真好",
|
| 85 |
+
"bbox": [
|
| 86 |
+
574,
|
| 87 |
+
266,
|
| 88 |
+
653,
|
| 89 |
+
277
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "NMT: It's a beautiful day today",
|
| 96 |
+
"bbox": [
|
| 97 |
+
574,
|
| 98 |
+
280,
|
| 99 |
+
722,
|
| 100 |
+
290
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "LLM: Today's weather is really nice",
|
| 107 |
+
"bbox": [
|
| 108 |
+
576,
|
| 109 |
+
294,
|
| 110 |
+
744,
|
| 111 |
+
307
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "image",
|
| 117 |
+
"img_path": "images/f98b66d504a2ba3722ba2fd1ecae3be55b714ca5e3a4e1654851e4c657b198dc.jpg",
|
| 118 |
+
"image_caption": [],
|
| 119 |
+
"image_footnote": [],
|
| 120 |
+
"bbox": [
|
| 121 |
+
744,
|
| 122 |
+
274,
|
| 123 |
+
771,
|
| 124 |
+
292
|
| 125 |
+
],
|
| 126 |
+
"page_idx": 0
|
| 127 |
+
},
|
| 128 |
+
{
|
| 129 |
+
"type": "image",
|
| 130 |
+
"img_path": "images/33dfb7cbdb1255300b34d6d3f5e93c4173385588e53f52daed346524519e0d58.jpg",
|
| 131 |
+
"image_caption": [],
|
| 132 |
+
"image_footnote": [],
|
| 133 |
+
"bbox": [
|
| 134 |
+
744,
|
| 135 |
+
293,
|
| 136 |
+
769,
|
| 137 |
+
310
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 0
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "我觉得他说话前言不搭后语",
|
| 144 |
+
"bbox": [
|
| 145 |
+
576,
|
| 146 |
+
323,
|
| 147 |
+
709,
|
| 148 |
+
334
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 0
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "NMT: I feel like his words don't match his words",
|
| 155 |
+
"bbox": [
|
| 156 |
+
576,
|
| 157 |
+
338,
|
| 158 |
+
803,
|
| 159 |
+
348
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 0
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "LLM: I think what he says doesn't follow logically.",
|
| 166 |
+
"bbox": [
|
| 167 |
+
576,
|
| 168 |
+
355,
|
| 169 |
+
808,
|
| 170 |
+
366
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 0
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "image",
|
| 176 |
+
"img_path": "images/d9cd3a07be8f172b896433e0419318e29ef80c566a63cb267b4f5ccf11d240c2.jpg",
|
| 177 |
+
"image_caption": [],
|
| 178 |
+
"image_footnote": [],
|
| 179 |
+
"bbox": [
|
| 180 |
+
813,
|
| 181 |
+
334,
|
| 182 |
+
840,
|
| 183 |
+
351
|
| 184 |
+
],
|
| 185 |
+
"page_idx": 0
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"type": "image",
|
| 189 |
+
"img_path": "images/1e518916965370444aa57555ddace21b5992155ab8fadd1b9e4e5771b7104aef.jpg",
|
| 190 |
+
"image_caption": [],
|
| 191 |
+
"image_footnote": [],
|
| 192 |
+
"bbox": [
|
| 193 |
+
813,
|
| 194 |
+
353,
|
| 195 |
+
840,
|
| 196 |
+
370
|
| 197 |
+
],
|
| 198 |
+
"page_idx": 0
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"type": "text",
|
| 202 |
+
"text": "2010年7月19日因不良反应停用聚甲酚磺醛",
|
| 203 |
+
"bbox": [
|
| 204 |
+
578,
|
| 205 |
+
382,
|
| 206 |
+
781,
|
| 207 |
+
393
|
| 208 |
+
],
|
| 209 |
+
"page_idx": 0
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"type": "text",
|
| 213 |
+
"text": "NMT: Policresulen was discontinued on 19 July 2010 due to adverse reactions.",
|
| 214 |
+
"bbox": [
|
| 215 |
+
576,
|
| 216 |
+
395,
|
| 217 |
+
828,
|
| 218 |
+
414
|
| 219 |
+
],
|
| 220 |
+
"page_idx": 0
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"type": "image",
|
| 224 |
+
"img_path": "images/15b4010ba248a3765c751b3d32fcdd4e607b70fbadc8ba6c12a93d870db14a17.jpg",
|
| 225 |
+
"image_caption": [],
|
| 226 |
+
"image_footnote": [],
|
| 227 |
+
"bbox": [
|
| 228 |
+
830,
|
| 229 |
+
392,
|
| 230 |
+
855,
|
| 231 |
+
410
|
| 232 |
+
],
|
| 233 |
+
"page_idx": 0
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"type": "text",
|
| 237 |
+
"text": "LLM: On July 19, 2010, polyphenol sulfone aldehyde was discontinued due to adverse reactions.",
|
| 238 |
+
"bbox": [
|
| 239 |
+
576,
|
| 240 |
+
419,
|
| 241 |
+
825,
|
| 242 |
+
437
|
| 243 |
+
],
|
| 244 |
+
"page_idx": 0
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"type": "image",
|
| 248 |
+
"img_path": "images/97cb6eaec62c3c3753681899e1f97b1e8a5f12c2548db8cfa218537871f745de.jpg",
|
| 249 |
+
"image_caption": [
|
| 250 |
+
"Figure 1: A comparison of translations done by an NMT model and LLM. They translate simple content equally well but their performances vary when translating complex sentences."
|
| 251 |
+
],
|
| 252 |
+
"image_footnote": [],
|
| 253 |
+
"bbox": [
|
| 254 |
+
828,
|
| 255 |
+
418,
|
| 256 |
+
855,
|
| 257 |
+
437
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 0
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "text",
|
| 263 |
+
"text": "Methods to harness complementary strengths of NMT and LLM models, with the aim of achieving better translation results through their integration, are worthy of research. To integrate large and small models, Zeng et al. (2024) propose Cooperative Decoding while Farinhas et al. (2023) put forward an approach based on Minimum Bayes Risk (MBR). While these methods are effective in improving translation quality, their reliance on LLMs for every piece of translation incurs substantial computational expenses.",
|
| 264 |
+
"bbox": [
|
| 265 |
+
507,
|
| 266 |
+
546,
|
| 267 |
+
884,
|
| 268 |
+
724
|
| 269 |
+
],
|
| 270 |
+
"page_idx": 0
|
| 271 |
+
},
|
| 272 |
+
{
|
| 273 |
+
"type": "text",
|
| 274 |
+
"text": "As shown in Table 1, we annotate source sentences into two categories: simple and hard (to translate). The majority of sentences are marked as simple, and only a small portion of sentences is believed to be challenging for translation systems. LLM performs better when translating complex sentences. Hendy et al. (2023) perform translation using an NMT model and evaluate the translation quality using a quality estimation (QE) model (Rei et al., 2020; Fomicheva et al., 2020; Rei et al., 2022c). If the QE model give a low score to a translation result, they then use an LLM to translate",
|
| 275 |
+
"bbox": [
|
| 276 |
+
507,
|
| 277 |
+
728,
|
| 278 |
+
884,
|
| 279 |
+
920
|
| 280 |
+
],
|
| 281 |
+
"page_idx": 0
|
| 282 |
+
},
|
| 283 |
+
{
|
| 284 |
+
"type": "page_footnote",
|
| 285 |
+
"text": "*These authors contributed equally to this work.",
|
| 286 |
+
"bbox": [
|
| 287 |
+
136,
|
| 288 |
+
906,
|
| 289 |
+
428,
|
| 290 |
+
920
|
| 291 |
+
],
|
| 292 |
+
"page_idx": 0
|
| 293 |
+
},
|
| 294 |
+
{
|
| 295 |
+
"type": "page_number",
|
| 296 |
+
"text": "5140",
|
| 297 |
+
"bbox": [
|
| 298 |
+
480,
|
| 299 |
+
927,
|
| 300 |
+
521,
|
| 301 |
+
940
|
| 302 |
+
],
|
| 303 |
+
"page_idx": 0
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"type": "footer",
|
| 307 |
+
"text": "Findings of the Association for Computational Linguistics: ACL 2025, pages 5140-5148 July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
|
| 308 |
+
"bbox": [
|
| 309 |
+
228,
|
| 310 |
+
945,
|
| 311 |
+
768,
|
| 312 |
+
973
|
| 313 |
+
],
|
| 314 |
+
"page_idx": 0
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"type": "image",
|
| 318 |
+
"img_path": "images/4718661df5621c7a120e380afd262a4d3b40f289d3ae1cf8b99e1dcd32e13889.jpg",
|
| 319 |
+
"image_caption": [
|
| 320 |
+
"Figure 2: Two approaches to integrate NMT model and LLM. The left approach is QET proposed by Hendy et al. (2023) and the right part is our proposed PPLT and JDM, which quickly determines when to use LLM based on source sentence."
|
| 321 |
+
],
|
| 322 |
+
"image_footnote": [],
|
| 323 |
+
"bbox": [
|
| 324 |
+
122,
|
| 325 |
+
82,
|
| 326 |
+
480,
|
| 327 |
+
233
|
| 328 |
+
],
|
| 329 |
+
"page_idx": 1
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"type": "text",
|
| 333 |
+
"text": "the sentence again. Their approach leverages LLM advantages while reduce unnecessary LLM usage. However, their approach heavily relies on the performance of the QE model, and ignores scenarios when LLM deliver even worse results. As a result, their approach may not guarantee best translation.",
|
| 334 |
+
"bbox": [
|
| 335 |
+
112,
|
| 336 |
+
343,
|
| 337 |
+
487,
|
| 338 |
+
439
|
| 339 |
+
],
|
| 340 |
+
"page_idx": 1
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"type": "text",
|
| 344 |
+
"text": "Without using any QE model, our approach decides when to use LLM only based on source sentence features. This idea is challenging and we try a multiple of indicators. In the end we find that using only two indicators—sentence complexity and translation domain (whether LLM is good at or not), we can make a sound decision. In this way, we can directly decide whether to use NMT model or LLM as long as the source sentence is input, and use LLM as less as possible. We test our approach on multilingual test sets (Zh2En, En2Zh, De2En, and Ja2En) and obtain best in results for MT.",
|
| 345 |
+
"bbox": [
|
| 346 |
+
112,
|
| 347 |
+
441,
|
| 348 |
+
489,
|
| 349 |
+
633
|
| 350 |
+
],
|
| 351 |
+
"page_idx": 1
|
| 352 |
+
},
|
| 353 |
+
{
|
| 354 |
+
"type": "text",
|
| 355 |
+
"text": "2 Method",
|
| 356 |
+
"text_level": 1,
|
| 357 |
+
"bbox": [
|
| 358 |
+
112,
|
| 359 |
+
648,
|
| 360 |
+
218,
|
| 361 |
+
662
|
| 362 |
+
],
|
| 363 |
+
"page_idx": 1
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "text",
|
| 367 |
+
"text": "As shown in Figure 2, compared to the QE Threshold (QET) method proposed by Hendy et al. (2023), our approach is more straightforward, relies on fewer model parameters, and has shorter inference time (see Appendix F). The former requires using the wmt22-cometkiwi-da $^{1}$ (Rei et al., 2022b) model to assess the quality of NMT translation results to decide whether to continue calling the LLM for translation. In contrast, our method directly decides whether to call the LLM or NMT based on the input source text, which is clearly a challenging task. Moreover, our method needs to meet two requirements: 1) minimize the use of LLMs as much",
|
| 368 |
+
"bbox": [
|
| 369 |
+
112,
|
| 370 |
+
674,
|
| 371 |
+
489,
|
| 372 |
+
883
|
| 373 |
+
],
|
| 374 |
+
"page_idx": 1
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "table",
|
| 378 |
+
"img_path": "images/c8e706b1d2c214ef0488de1e4a0d5b6c2b8bfc3a7e2dca7a3c3dc11dc7499282.jpg",
|
| 379 |
+
"table_caption": [],
|
| 380 |
+
"table_footnote": [],
|
| 381 |
+
"table_body": "<table><tr><td></td><td>DA Simple(95%)</td><td>DA Hard(5%)</td></tr><tr><td>NMT</td><td>80.21</td><td>73.22</td></tr><tr><td>LLM</td><td>81.62</td><td>77.02</td></tr><tr><td>Diff</td><td>1.41</td><td>3.80</td></tr></table>",
|
| 382 |
+
"bbox": [
|
| 383 |
+
529,
|
| 384 |
+
80,
|
| 385 |
+
863,
|
| 386 |
+
151
|
| 387 |
+
],
|
| 388 |
+
"page_idx": 1
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"type": "text",
|
| 392 |
+
"text": "Table 1: Comparison of NMT and LLM performances on simple and complex sentences in the WMT22 Zh2En news test set. \"Diff\" refers to the difference in DA scores between LLM and NMT. $95\\%$ of the sentences are considered easy to translate. We detail our classification criteria in Appendix B. We conduct experiment using an NMT model trained from scratch and Llama-3.1-8B-Instruct (Touvron et al., 2023). wmt22-comet-da (Rei et al., 2022a) is used for reporting DA score.",
|
| 393 |
+
"bbox": [
|
| 394 |
+
507,
|
| 395 |
+
160,
|
| 396 |
+
882,
|
| 397 |
+
288
|
| 398 |
+
],
|
| 399 |
+
"page_idx": 1
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"type": "text",
|
| 403 |
+
"text": "as possible, and 2) if LLM results are used, they should outperform the NMT results. It is evident that using QET makes it difficult to fully satisfy the second condition, which impacts the fusion effect.",
|
| 404 |
+
"bbox": [
|
| 405 |
+
507,
|
| 406 |
+
300,
|
| 407 |
+
882,
|
| 408 |
+
363
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 1
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "As shown in Table 1, LLM delivers better translation when source sentence is hard to translate. For relatively simple sentences, LLM does not have a particular advantage, so we try not to use LLM in this scenario. In addition, we need to verify whether it is possible to determine using which model to translate only based on source sentence. As a result, we design two approaches to meet the two requirements:",
|
| 415 |
+
"bbox": [
|
| 416 |
+
507,
|
| 417 |
+
365,
|
| 418 |
+
882,
|
| 419 |
+
508
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 1
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "PPL Threshold (PPLT): We use monolingual data (previously used for training NMT models) to train a small language model (LM). We directly use LLM for translation when the source sentence perplexity (PPL) is greater than a threshold we set. We employ the simple method to test whether LLM can translate complex sentences well.",
|
| 426 |
+
"bbox": [
|
| 427 |
+
507,
|
| 428 |
+
508,
|
| 429 |
+
882,
|
| 430 |
+
621
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 1
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "text",
|
| 436 |
+
"text": "Joint Decision-making (JDM): Given a source sentence (src), we use NMT model and LLM to obtain two translation results $(tgt_{NMT}$ and $tgt_{LLM})$ . By comparing the two translations against reference (tgt), we obtain quality measurements of the two results $(Q_{NMT}$ and $Q_{LLM})$ . We hope to use LLM for translation only when (1) the translation delivered by NMT model is bad and (2) the translation done by LLM is better. So we use LLM for translation when:",
|
| 437 |
+
"bbox": [
|
| 438 |
+
507,
|
| 439 |
+
621,
|
| 440 |
+
884,
|
| 441 |
+
782
|
| 442 |
+
],
|
| 443 |
+
"page_idx": 1
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"type": "equation",
|
| 447 |
+
"text": "\n$$\nQ _ {N M T} < T _ {1} \\text {a n d} Q _ {L L M} - Q _ {N M T} > T _ {2} \\tag {1}\n$$\n",
|
| 448 |
+
"text_format": "latex",
|
| 449 |
+
"bbox": [
|
| 450 |
+
529,
|
| 451 |
+
795,
|
| 452 |
+
882,
|
| 453 |
+
813
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 1
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "text",
|
| 459 |
+
"text": "Due to the inability to obtain references in practical applications, we cannot directly use the above conditions to control the LLM's invocation. Therefore, based on these conditions, we select positive and negative samples from bilingual data and train a binary classification model to serve as a decider,",
|
| 460 |
+
"bbox": [
|
| 461 |
+
507,
|
| 462 |
+
825,
|
| 463 |
+
882,
|
| 464 |
+
921
|
| 465 |
+
],
|
| 466 |
+
"page_idx": 1
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "page_footnote",
|
| 470 |
+
"text": "1https://huggingface.co/Unbabel/wmt22-cometkiwi-da",
|
| 471 |
+
"bbox": [
|
| 472 |
+
112,
|
| 473 |
+
894,
|
| 474 |
+
379,
|
| 475 |
+
919
|
| 476 |
+
],
|
| 477 |
+
"page_idx": 1
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"type": "page_number",
|
| 481 |
+
"text": "5141",
|
| 482 |
+
"bbox": [
|
| 483 |
+
480,
|
| 484 |
+
928,
|
| 485 |
+
517,
|
| 486 |
+
940
|
| 487 |
+
],
|
| 488 |
+
"page_idx": 1
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"type": "text",
|
| 492 |
+
"text": "determining when to use the LLM for translation during the inference process.",
|
| 493 |
+
"bbox": [
|
| 494 |
+
112,
|
| 495 |
+
84,
|
| 496 |
+
487,
|
| 497 |
+
116
|
| 498 |
+
],
|
| 499 |
+
"page_idx": 2
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"type": "text",
|
| 503 |
+
"text": "3 Experiments",
|
| 504 |
+
"text_level": 1,
|
| 505 |
+
"bbox": [
|
| 506 |
+
114,
|
| 507 |
+
129,
|
| 508 |
+
260,
|
| 509 |
+
147
|
| 510 |
+
],
|
| 511 |
+
"page_idx": 2
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"type": "text",
|
| 515 |
+
"text": "3.1 NMT & LLM",
|
| 516 |
+
"text_level": 1,
|
| 517 |
+
"bbox": [
|
| 518 |
+
114,
|
| 519 |
+
156,
|
| 520 |
+
268,
|
| 521 |
+
171
|
| 522 |
+
],
|
| 523 |
+
"page_idx": 2
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "We directly use Llama-3.1-8B-Instruct as our LLM model, and its translation prompt is provided in Appendix D. Due to its strong translation performance, we do not perform any further supervised fine-tuning on it. We focus on training an NMT model from scratch for each language pair that can achieve comparable translation performance. Our NMT model adopts the Deep Transformer-Big architecture commonly used by Wei et al. (2022), and the training data comes from internal technology (Tech) bilingual data and various open-source bilingual datasets archived in OPUS, such as CCMatrix, Paracrawl, NLLB, UNPC and OpenSubtitles. For each translation language pair, we randomly sample 100 million bilingual data, which are then deduplicated with the test set before being used for training. The training setup of NMT models is provided in Appendix E.",
|
| 528 |
+
"bbox": [
|
| 529 |
+
112,
|
| 530 |
+
178,
|
| 531 |
+
489,
|
| 532 |
+
467
|
| 533 |
+
],
|
| 534 |
+
"page_idx": 2
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"type": "text",
|
| 538 |
+
"text": "3.2 Threshold",
|
| 539 |
+
"text_level": 1,
|
| 540 |
+
"bbox": [
|
| 541 |
+
114,
|
| 542 |
+
480,
|
| 543 |
+
240,
|
| 544 |
+
494
|
| 545 |
+
],
|
| 546 |
+
"page_idx": 2
|
| 547 |
+
},
|
| 548 |
+
{
|
| 549 |
+
"type": "text",
|
| 550 |
+
"text": "Among the methods mentioned above, all require setting thresholds in advance to limit the proportion of LLM calls. For each language pair, we use statistical methods to determine the threshold for each method by controlling the proportion of LLM calls to approximately $25\\%$ , and then compare the performance differences between different methods. The specific threshold values for each method are provided in Appendix F.",
|
| 551 |
+
"bbox": [
|
| 552 |
+
112,
|
| 553 |
+
502,
|
| 554 |
+
487,
|
| 555 |
+
645
|
| 556 |
+
],
|
| 557 |
+
"page_idx": 2
|
| 558 |
+
},
|
| 559 |
+
{
|
| 560 |
+
"type": "text",
|
| 561 |
+
"text": "For the QET method, it requires setting a QE score threshold to control the invocation of the LLM. The LLM is only called when the QE score of the NMT translation is below this threshold. We select one million bilingual data, obtain the NMT translation corresponding to the source text, and calculate their QE scores using wmt22-cometkiwida (Rei et al., 2022b). The QE scores are then sorted in ascending order, and the 250,000th QE score in the sorted list is used as the threshold.",
|
| 562 |
+
"bbox": [
|
| 563 |
+
112,
|
| 564 |
+
646,
|
| 565 |
+
487,
|
| 566 |
+
806
|
| 567 |
+
],
|
| 568 |
+
"page_idx": 2
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"type": "text",
|
| 572 |
+
"text": "For the PPLT method, it is necessary to set a PPL score threshold, and the LLM is invoked only when the source text's PPL score exceeds this threshold. We calculate the PPL scores of 1 million source-language monolingual data using a self-trained LM model, then sort the PPL scores in descending order and use the 250,000th score in the sorted list as",
|
| 573 |
+
"bbox": [
|
| 574 |
+
112,
|
| 575 |
+
808,
|
| 576 |
+
489,
|
| 577 |
+
920
|
| 578 |
+
],
|
| 579 |
+
"page_idx": 2
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "text",
|
| 583 |
+
"text": "the threshold. The LM is trained on 30 million monolingual data, with training settings provided in Appendix E. Additionally, all monolingual data is randomly sampled from bilingual data.",
|
| 584 |
+
"bbox": [
|
| 585 |
+
507,
|
| 586 |
+
84,
|
| 587 |
+
882,
|
| 588 |
+
148
|
| 589 |
+
],
|
| 590 |
+
"page_idx": 2
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"type": "text",
|
| 594 |
+
"text": "For the JDM method, when to call the LLM depends on the decision maker, which is a binary classification model fine-tuned based on xlmroberta-base (Conneau, 2019). The training setup is described in Appendix E. When selecting positive and negative samples for training according to Equation 1, two thresholds need to be set. Specifically, we use one million bilingual data, obtain the NMT translation and LLM translation corresponding to the source text, and calculate the $Q_{NMT}$ and $Q_{LLM}$ scores using wmt22-comet-da $^{2}$ (Rei et al., 2022a). The $Q_{NMT}$ scores are then sorted from lowest to highest, and the 100,000th score in the sorted list is chosen as the $T_{1}$ threshold. Then, the data with $Q_{NMT}$ scores lower than $T_{1}$ are sorted by the difference between $Q_{LLM}$ and $Q_{NMT}$ scores, from highest to lowest, and the 10,000th score is selected as the $T_{2}$ threshold. Ultimately, we can obtain 10,000 positive samples, and then randomly select 30,000 negative samples from the remaining data. With this training data ratio, the decider can maintain about 25% LLM calls.",
|
| 595 |
+
"bbox": [
|
| 596 |
+
507,
|
| 597 |
+
149,
|
| 598 |
+
884,
|
| 599 |
+
502
|
| 600 |
+
],
|
| 601 |
+
"page_idx": 2
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "text",
|
| 605 |
+
"text": "3.3 Test Set",
|
| 606 |
+
"text_level": 1,
|
| 607 |
+
"bbox": [
|
| 608 |
+
509,
|
| 609 |
+
516,
|
| 610 |
+
618,
|
| 611 |
+
531
|
| 612 |
+
],
|
| 613 |
+
"page_idx": 2
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"type": "text",
|
| 617 |
+
"text": "We use WMT22 News and Flores (Costa-jussa et al., 2022) test sets for all language pairs we selected. To better test our method on Zh2En and En2Zh, we construct a Literary test set and a Tech test set. Each test set contains 500 sentences. We find that LLM's performance is much better on the Literary test sets while NMT models outperform on the Tech test sets. These test sets can better evaluate the effectiveness of different fusion strategies. We will open-source these self-constructed test sets to promote the development of NMT and LLM fusion technologies.",
|
| 618 |
+
"bbox": [
|
| 619 |
+
507,
|
| 620 |
+
538,
|
| 621 |
+
882,
|
| 622 |
+
731
|
| 623 |
+
],
|
| 624 |
+
"page_idx": 2
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"type": "text",
|
| 628 |
+
"text": "4 Results",
|
| 629 |
+
"text_level": 1,
|
| 630 |
+
"bbox": [
|
| 631 |
+
507,
|
| 632 |
+
746,
|
| 633 |
+
608,
|
| 634 |
+
762
|
| 635 |
+
],
|
| 636 |
+
"page_idx": 2
|
| 637 |
+
},
|
| 638 |
+
{
|
| 639 |
+
"type": "text",
|
| 640 |
+
"text": "We validate the aforementioned methods on four $\\mathrm{Zh}\\leftrightarrow \\mathrm{En}$ test sets, as shown in Table 2 and Table 3. wmt22-comet-da (Rei et al., 2022a) is used for reporting DA score (\\%). BLEURT20 $^3$ (Sellam et al., 2020) is used for reporting BLEURT score (\\%). $LLM_{p}$ refers to the percentage of LLM usage. We",
|
| 641 |
+
"bbox": [
|
| 642 |
+
507,
|
| 643 |
+
772,
|
| 644 |
+
884,
|
| 645 |
+
870
|
| 646 |
+
],
|
| 647 |
+
"page_idx": 2
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"type": "page_footnote",
|
| 651 |
+
"text": "2https://huggingface.co/Unbabel/wmt22-comet-da",
|
| 652 |
+
"bbox": [
|
| 653 |
+
507,
|
| 654 |
+
881,
|
| 655 |
+
774,
|
| 656 |
+
906
|
| 657 |
+
],
|
| 658 |
+
"page_idx": 2
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"type": "page_footnote",
|
| 662 |
+
"text": "<sup>3</sup>https://github.com/google-research/bleurt",
|
| 663 |
+
"bbox": [
|
| 664 |
+
532,
|
| 665 |
+
906,
|
| 666 |
+
850,
|
| 667 |
+
919
|
| 668 |
+
],
|
| 669 |
+
"page_idx": 2
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"type": "page_number",
|
| 673 |
+
"text": "5142",
|
| 674 |
+
"bbox": [
|
| 675 |
+
480,
|
| 676 |
+
927,
|
| 677 |
+
519,
|
| 678 |
+
940
|
| 679 |
+
],
|
| 680 |
+
"page_idx": 2
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"type": "table",
|
| 684 |
+
"img_path": "images/35a65cbdc5fce2a67b63ad21ab28aa3095dd0b2325077ad415fd6f132f349f12.jpg",
|
| 685 |
+
"table_caption": [],
|
| 686 |
+
"table_footnote": [],
|
| 687 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Literary</td><td colspan=\"3\">Tech</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td></tr><tr><td>NMT</td><td>78.99</td><td>66.12</td><td>0.00%</td><td>87.08</td><td>76.10</td><td>0.00%</td><td>59.71</td><td>46.29</td><td>0.00%</td><td>83.38</td><td>71.97</td><td>0.00%</td><td>77.29</td><td>65.12</td><td>0.00%</td></tr><tr><td>LLM</td><td>80.13</td><td>67.26</td><td>100.00%</td><td>86.68</td><td>75.55</td><td>100.00%</td><td>66.69</td><td>53.86</td><td>100.00%</td><td>77.68</td><td>61.27</td><td>100.00%</td><td>77.80</td><td>64.49</td><td>100.00%</td></tr><tr><td>QET</td><td>79.13</td><td>66.25</td><td>20.32%</td><td>87.08</td><td>76.11</td><td>0.30%</td><td>63.88</td><td>50.62</td><td>62.00%</td><td>80.21</td><td>66.14</td><td>39.60%</td><td>77.58</td><td>64.78</td><td>30.55%</td></tr><tr><td>PPLT</td><td>79.24</td><td>66.14</td><td>38.19%</td><td>87.06</td><td>76.08</td><td>5.43%</td><td>63.49</td><td>50.73</td><td>51.40%</td><td>82.02</td><td>69.37</td><td>34.20%</td><td>77.95</td><td>65.58</td><td>32.31%</td></tr><tr><td>JDM</td><td>79.69</td><td>66.91</td><td>29.39%</td><td>87.12</td><td>76.12</td><td>1.28%</td><td>65.70</td><td>52.70</td><td>80.40%</td><td>82.71</td><td>70.88</td><td>7.00%</td><td>78.81</td><td>66.65</td><td>29.52%</td></tr><tr><td>oracle</td><td>82.25</td><td>69.86</td><td>56.91%</td><td>88.17</td><td>77.59</td><td>48.32%</td><td>68.41</td><td>54.54</td><td>72.80%</td><td>84.80</td><td>73.14</td><td>28.20%</td><td>80.91</td><td>68.78</td><td>51.56%</td></tr></table>",
|
| 688 |
+
"bbox": [
|
| 689 |
+
119,
|
| 690 |
+
80,
|
| 691 |
+
878,
|
| 692 |
+
165
|
| 693 |
+
],
|
| 694 |
+
"page_idx": 3
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"type": "table",
|
| 698 |
+
"img_path": "images/85f036d70dc2ed98a99f208e80a14462f911663a226522a9fd86f0227cc99ffb.jpg",
|
| 699 |
+
"table_caption": [
|
| 700 |
+
"Table 2: Integration performances of QET, PPLT, and JDM methods on four Chinese→English test sets."
|
| 701 |
+
],
|
| 702 |
+
"table_footnote": [],
|
| 703 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Literary</td><td colspan=\"3\">Tech</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td></tr><tr><td>NMT</td><td>86.17</td><td>71.89</td><td>0.00%</td><td>87.88</td><td>73.29</td><td>0.00%</td><td>71.68</td><td>51.83</td><td>0.00%</td><td>86.30</td><td>73.57</td><td>0.00%</td><td>83.01</td><td>67.65</td><td>0.00%</td></tr><tr><td>LLM</td><td>85.17</td><td>68.20</td><td>100.00%</td><td>86.63</td><td>68.91</td><td>100.00%</td><td>76.30</td><td>56.12</td><td>100.00%</td><td>78.40</td><td>59.74</td><td>100.00%</td><td>81.63</td><td>63.24</td><td>100.00%</td></tr><tr><td>QET</td><td>86.08</td><td>71.52</td><td>8.15%</td><td>87.83</td><td>73.14</td><td>2.77%</td><td>72.73</td><td>52.76</td><td>24.31%</td><td>80.57</td><td>64.02</td><td>53.40%</td><td>81.80</td><td>65.36</td><td>22.16%</td></tr><tr><td>PPLT</td><td>85.80</td><td>70.76</td><td>28.47%</td><td>87.73</td><td>72.61</td><td>21.15%</td><td>72.85</td><td>53.25</td><td>25.37%</td><td>85.02</td><td>71.05</td><td>27.00%</td><td>82.85</td><td>66.92</td><td>25.50%</td></tr><tr><td>JDM</td><td>86.18</td><td>71.59</td><td>20.77%</td><td>87.76</td><td>72.92</td><td>9.19%</td><td>75.15</td><td>54.97</td><td>53.91%</td><td>85.39</td><td>71.97</td><td>9.60%</td><td>83.62</td><td>67.86</td><td>23.37%</td></tr><tr><td>oracle</td><td>88.00</td><td>73.16</td><td>38.05%</td><td>89.03</td><td>73.73</td><td>36.26%</td><td>78.16</td><td>58.42</td><td>63.85%</td><td>87.11</td><td>73.74</td><td>20.80%</td><td>85.58</td><td>69.76</td><td>39.74%</td></tr></table>",
|
| 704 |
+
"bbox": [
|
| 705 |
+
119,
|
| 706 |
+
203,
|
| 707 |
+
878,
|
| 708 |
+
286
|
| 709 |
+
],
|
| 710 |
+
"page_idx": 3
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"type": "text",
|
| 714 |
+
"text": "Table 3: Integration performances of QET, PPLT, and JDM methods on four English→Chinese test sets.",
|
| 715 |
+
"bbox": [
|
| 716 |
+
144,
|
| 717 |
+
296,
|
| 718 |
+
847,
|
| 719 |
+
311
|
| 720 |
+
],
|
| 721 |
+
"page_idx": 3
|
| 722 |
+
},
|
| 723 |
+
{
|
| 724 |
+
"type": "text",
|
| 725 |
+
"text": "also report the performance of oracle system that selects the best translation results based on wmt22-comet-da, representing the upper bound that the fusion method can achieve. In terms of the two base models, NMT and LLM, their performance gap is small on the open-source news and Flores test sets, but there are significant differences on the Literary and Tech test sets.",
|
| 726 |
+
"bbox": [
|
| 727 |
+
112,
|
| 728 |
+
332,
|
| 729 |
+
487,
|
| 730 |
+
461
|
| 731 |
+
],
|
| 732 |
+
"page_idx": 3
|
| 733 |
+
},
|
| 734 |
+
{
|
| 735 |
+
"type": "text",
|
| 736 |
+
"text": "QET reduces LLM usage to $30.55\\%$ on Zh2En test sets and $22.16\\%$ on En2Zh test sets. Regarding translation quality, its performance remains almost the same as the optimal single system result on the Zh2En test sets. But we observe one point down of DA score and BLEURT on the En2Zh test sets when comparing with the optimal single system result (NMT), because QET performs not so well on the Tech test set. Our NMT model significantly outperforms LLM on the Tech test set but QET integrate some worse LLM translations to the final results. QET uses LLM when NMT translation quality is poor, but it does not evaluate whether LLM's translation is better or even worse.",
|
| 737 |
+
"bbox": [
|
| 738 |
+
112,
|
| 739 |
+
464,
|
| 740 |
+
487,
|
| 741 |
+
689
|
| 742 |
+
],
|
| 743 |
+
"page_idx": 3
|
| 744 |
+
},
|
| 745 |
+
{
|
| 746 |
+
"type": "text",
|
| 747 |
+
"text": "Interestingly, our PPLT method achieved better results than the QET method, while the number of LLM calls was only slightly higher. The result demonstrates that using merely source text features, i.e. text complexity, can get a desirable integration of NMT model and LLM. In addition, as LM is trained on NMT-similar data, PPLT significantly outperforms QET on the Tech test sets.",
|
| 748 |
+
"bbox": [
|
| 749 |
+
112,
|
| 750 |
+
693,
|
| 751 |
+
487,
|
| 752 |
+
821
|
| 753 |
+
],
|
| 754 |
+
"page_idx": 3
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"type": "text",
|
| 758 |
+
"text": "Our JDM method achieves best performance on average. It seems that JDM method is able to dynamically control LLM usage as it varies greatly on different test sets. For instance, LLM outperforms NMT model on News and Literary test sets, LLM usage is thus high (even over $50\\%$ on the Literary",
|
| 759 |
+
"bbox": [
|
| 760 |
+
112,
|
| 761 |
+
825,
|
| 762 |
+
487,
|
| 763 |
+
921
|
| 764 |
+
],
|
| 765 |
+
"page_idx": 3
|
| 766 |
+
},
|
| 767 |
+
{
|
| 768 |
+
"type": "text",
|
| 769 |
+
"text": "test sets). On contrary, NMT model outperforms LLM on the Tech test sets, so LLM usage is greatly decreased (less than $10\\%$ ). Regarding domains where LLM and NMT model's performances are equal, JDM uses LLM as less as possible. On the Tech and Flores test sets where NMT model outperforms, we witness more LLM usage on the Tech test sets than on Flores, because the Tech test sets are more difficult to translate (6-8 points gap regarding DA score), and the decider tends to pass complex sentences to the LLM.",
|
| 770 |
+
"bbox": [
|
| 771 |
+
505,
|
| 772 |
+
332,
|
| 773 |
+
884,
|
| 774 |
+
508
|
| 775 |
+
],
|
| 776 |
+
"page_idx": 3
|
| 777 |
+
},
|
| 778 |
+
{
|
| 779 |
+
"type": "text",
|
| 780 |
+
"text": "Similar results prevail on De2En and Ja2En test sets (see Appendix H). When LLM and NMT each have their respective advantages, JDM can also achieve better integration results. In addition, we also discuss the generalization ability of the JDM method on different model combinations and unknown domains (see Appendix I).",
|
| 781 |
+
"bbox": [
|
| 782 |
+
507,
|
| 783 |
+
510,
|
| 784 |
+
884,
|
| 785 |
+
623
|
| 786 |
+
],
|
| 787 |
+
"page_idx": 3
|
| 788 |
+
},
|
| 789 |
+
{
|
| 790 |
+
"type": "text",
|
| 791 |
+
"text": "5 Conclusion",
|
| 792 |
+
"text_level": 1,
|
| 793 |
+
"bbox": [
|
| 794 |
+
507,
|
| 795 |
+
637,
|
| 796 |
+
640,
|
| 797 |
+
652
|
| 798 |
+
],
|
| 799 |
+
"page_idx": 3
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"type": "text",
|
| 803 |
+
"text": "This paper proposes a fast approach to integrate LLM and NMT model in order to improve translation quality while ensuring fast speed and low cost. Compared with previous methods that use QE models, our decide determines when to use LLM based on source sentence features. We train an end-to-end decoder to get the desired performance, that is, use LLM as less as possible and use LLM for translation only when it outperforms NMT model. We test our approach on multiple test sets, including Zh2En, En2Zh, De2En, and Ja2En. The result shows that this straightforward approach achieves almost the best performance. In addition, our experiments show that LLM has a particular advantage over NMT when translating internet memes and informal expressions.",
|
| 804 |
+
"bbox": [
|
| 805 |
+
505,
|
| 806 |
+
664,
|
| 807 |
+
884,
|
| 808 |
+
921
|
| 809 |
+
],
|
| 810 |
+
"page_idx": 3
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "page_number",
|
| 814 |
+
"text": "5143",
|
| 815 |
+
"bbox": [
|
| 816 |
+
480,
|
| 817 |
+
928,
|
| 818 |
+
519,
|
| 819 |
+
940
|
| 820 |
+
],
|
| 821 |
+
"page_idx": 3
|
| 822 |
+
},
|
| 823 |
+
{
|
| 824 |
+
"type": "text",
|
| 825 |
+
"text": "Limitations",
|
| 826 |
+
"text_level": 1,
|
| 827 |
+
"bbox": [
|
| 828 |
+
114,
|
| 829 |
+
84,
|
| 830 |
+
220,
|
| 831 |
+
99
|
| 832 |
+
],
|
| 833 |
+
"page_idx": 4
|
| 834 |
+
},
|
| 835 |
+
{
|
| 836 |
+
"type": "text",
|
| 837 |
+
"text": "We propose a simple and fast method to integrate NMT and LLM, and experiments verify the effectiveness of our method. However, we find that the final integration performance depends on the complementarity between NMT and LLM. That is to say, only when the NMT model and LLM has respective advantages can the integration lead to better translations. If the NMT performs equally as LLM, we see no improvement after integration.",
|
| 838 |
+
"bbox": [
|
| 839 |
+
112,
|
| 840 |
+
109,
|
| 841 |
+
489,
|
| 842 |
+
253
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 4
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "References",
|
| 849 |
+
"text_level": 1,
|
| 850 |
+
"bbox": [
|
| 851 |
+
114,
|
| 852 |
+
280,
|
| 853 |
+
213,
|
| 854 |
+
294
|
| 855 |
+
],
|
| 856 |
+
"page_idx": 4
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"type": "list",
|
| 860 |
+
"sub_type": "ref_text",
|
| 861 |
+
"list_items": [
|
| 862 |
+
"Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2016. Neural machine translation by jointly learning to align and translate. *ICLR*.",
|
| 863 |
+
"A Conneau. 2019. Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116.",
|
| 864 |
+
"Marta R Costa-jussà, 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.",
|
| 865 |
+
"António Farinhas, José de Souza, and Andre Martins. 2023. An empirical study of translation hypothesis ensembling with large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 11956-11970, Singapore. Association for Computational Linguistics.",
|
| 866 |
+
"Marina Fomicheva, Shuo Sun, Lisa Yankovskaya, Frédéric Blain, Francisco Guzmán, Mark Fishel, Nikolaos Aletras, Vishrav Chaudhary, and Lucia Specia. 2020. Unsupervised quality estimation for neural machine translation. TACL.",
|
| 867 |
+
"Amr Hendy, Mohamed Abdelrehim, Amr Sharaf, Vikas Raunak, Mohamed Gabr, Hitokazu Matsushita, Young Jin Kim, Mohamed Afify, and Hany Hassan Awadalla. 2023. How good are gpt models at machine translation? a comprehensive evaluation. arXiv preprint arXiv:2302.09210.",
|
| 868 |
+
"Yasmin Moslem, Rejwanul Haque, John D. Kelleher, and Andy Way. 2023. Adaptive machine translation with large language models. EAMT.",
|
| 869 |
+
"Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairseq: A fast, extensible toolkit for sequence modeling*. In *Proceedings of NAACL-HLT* 2019: Demonstrations.",
|
| 870 |
+
"Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John"
|
| 871 |
+
],
|
| 872 |
+
"bbox": [
|
| 873 |
+
115,
|
| 874 |
+
303,
|
| 875 |
+
489,
|
| 876 |
+
920
|
| 877 |
+
],
|
| 878 |
+
"page_idx": 4
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"type": "list",
|
| 882 |
+
"sub_type": "ref_text",
|
| 883 |
+
"list_items": [
|
| 884 |
+
"Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022. Training language models to follow instructions with human feedback. NIPS.",
|
| 885 |
+
"Ricardo Rei, José GC De Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André FT Martins. 2022a. Comet-22: Unbabel-ist 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585.",
|
| 886 |
+
"Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020. COMET: A neural framework for MT evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685-2702, Online. Association for Computational Linguistics.",
|
| 887 |
+
"Ricardo Rei, Marcos Treviso, Nuno M Guerreiro, Chrysoula Zerva, Ana C Farinha, Christine Maroti, José GC De Souza, Taisiya Glushkova, Duarte M Alves, Alon Lavie, et al. 2022b. Cometkiwi: Istunbabel 2022 submission for the quality estimation shared task. arXiv preprint arXiv:2209.06243.",
|
| 888 |
+
"Ricardo Rei, Marcos Treviso, Nuno M. Guerreiro, Chrysoula Zerva, Ana C. Farinha, Christine Maroti, José G. C. de Souza, Taisiya Glushkova, Duarte M. Alves, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022c. Cometkiwi: Ist-unbabel 2022 submission for the quality estimation shared task. Preprint, arXiv:2209.06243.",
|
| 889 |
+
"Thibault Sellam, Dipanjan Das, and Ankur P Parikh. 2020. Bleurt: Learning robust metrics for text generation. In Proceedings of ACL.",
|
| 890 |
+
"Jungha Son and Boyoung Kim. 2023. Translation performance from the user's perspective of large language models and neural machine translation systems. Information, 14(10).",
|
| 891 |
+
"Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. NIPS.",
|
| 892 |
+
"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. Preprint, arXiv:2302.13971.",
|
| 893 |
+
"Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. NIPS.",
|
| 894 |
+
"Qiang Wang, Bei Li, Tong Xiao, Jingbo Zhu, Changliang Li, Derek F. Wong, and Lidia S. Chao. 2019. Learning deep transformer models for machine translation. ACL."
|
| 895 |
+
],
|
| 896 |
+
"bbox": [
|
| 897 |
+
510,
|
| 898 |
+
85,
|
| 899 |
+
884,
|
| 900 |
+
919
|
| 901 |
+
],
|
| 902 |
+
"page_idx": 4
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"type": "page_number",
|
| 906 |
+
"text": "5144",
|
| 907 |
+
"bbox": [
|
| 908 |
+
480,
|
| 909 |
+
928,
|
| 910 |
+
519,
|
| 911 |
+
940
|
| 912 |
+
],
|
| 913 |
+
"page_idx": 4
|
| 914 |
+
},
|
| 915 |
+
{
|
| 916 |
+
"type": "text",
|
| 917 |
+
"text": "Xiaohui Wang, Ying Xiong, Xian Qian, Yang Wei, Lei Li, and Mingxuan Wang. 2021a. Lightseq2: Accelerated training for transformer-based models on gpus. arXiv preprint arXiv:2110.05722.",
|
| 918 |
+
"bbox": [
|
| 919 |
+
115,
|
| 920 |
+
85,
|
| 921 |
+
489,
|
| 922 |
+
139
|
| 923 |
+
],
|
| 924 |
+
"page_idx": 5
|
| 925 |
+
},
|
| 926 |
+
{
|
| 927 |
+
"type": "text",
|
| 928 |
+
"text": "Xiaohui Wang, Ying Xiong, Yang Wei, Mingxuan Wang, and Lei Li. 2021b. LightSeq: A high performance inference library for transformers. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Industry Papers (NAACL-HLT), pages 113-120. Association for Computational Linguistics.",
|
| 929 |
+
"bbox": [
|
| 930 |
+
115,
|
| 931 |
+
148,
|
| 932 |
+
489,
|
| 933 |
+
255
|
| 934 |
+
],
|
| 935 |
+
"page_idx": 5
|
| 936 |
+
},
|
| 937 |
+
{
|
| 938 |
+
"type": "text",
|
| 939 |
+
"text": "Daimeng Wei, Zhiqiang Rao, Zhanglin Wu, Shaojun Li, Yuanchang Luo, Yuhao Xie, Xiaoyu Chen, Hengchao Shang, Zongyao Li, Zhengzhe Yu, et al. 2022. Hw-tsc's submissions to the wmt 2022 general machine translation shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 403-410.",
|
| 940 |
+
"bbox": [
|
| 941 |
+
115,
|
| 942 |
+
263,
|
| 943 |
+
489,
|
| 944 |
+
356
|
| 945 |
+
],
|
| 946 |
+
"page_idx": 5
|
| 947 |
+
},
|
| 948 |
+
{
|
| 949 |
+
"type": "text",
|
| 950 |
+
"text": "Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online. Association for Computational Linguistics.",
|
| 951 |
+
"bbox": [
|
| 952 |
+
115,
|
| 953 |
+
367,
|
| 954 |
+
489,
|
| 955 |
+
526
|
| 956 |
+
],
|
| 957 |
+
"page_idx": 5
|
| 958 |
+
},
|
| 959 |
+
{
|
| 960 |
+
"type": "text",
|
| 961 |
+
"text": "Jiali Zeng, Fandong Meng, Yongjing Yin, and Jie Zhou. 2024. Improving machine translation with large language models: A preliminary study with cooperative decoding. Findings in ACL.",
|
| 962 |
+
"bbox": [
|
| 963 |
+
114,
|
| 964 |
+
535,
|
| 965 |
+
489,
|
| 966 |
+
589
|
| 967 |
+
],
|
| 968 |
+
"page_idx": 5
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"type": "text",
|
| 972 |
+
"text": "Biao Zhang, Barry Haddow, and Alexandra Birch. 2023. Prompting large language model for machine translation: A case study. Preprint, arXiv:2301.07069.",
|
| 973 |
+
"bbox": [
|
| 974 |
+
114,
|
| 975 |
+
599,
|
| 976 |
+
489,
|
| 977 |
+
640
|
| 978 |
+
],
|
| 979 |
+
"page_idx": 5
|
| 980 |
+
},
|
| 981 |
+
{
|
| 982 |
+
"type": "text",
|
| 983 |
+
"text": "A Advantages of LLM in Translation",
|
| 984 |
+
"text_level": 1,
|
| 985 |
+
"bbox": [
|
| 986 |
+
114,
|
| 987 |
+
653,
|
| 988 |
+
452,
|
| 989 |
+
670
|
| 990 |
+
],
|
| 991 |
+
"page_idx": 5
|
| 992 |
+
},
|
| 993 |
+
{
|
| 994 |
+
"type": "text",
|
| 995 |
+
"text": "Our experiments demonstrate that when source sentences are simple, NMT model and LLM have similar performances. When source sentences are hard to translate, LLM outperforms NMT model, and the gap becomes larger on extremely complex sentences. Our proposed decoder uses LLM for translation only when LLM performs better, thus ensuring minimum LLM usage. We manually collect complex sentences based on three criteria described in Appendix B. We send these complex sentences to our decoder to see how the decoder allocates these sentences, so we can see whether LLM is indeed better on complex content.",
|
| 996 |
+
"bbox": [
|
| 997 |
+
112,
|
| 998 |
+
680,
|
| 999 |
+
489,
|
| 1000 |
+
888
|
| 1001 |
+
],
|
| 1002 |
+
"page_idx": 5
|
| 1003 |
+
},
|
| 1004 |
+
{
|
| 1005 |
+
"type": "text",
|
| 1006 |
+
"text": "We select 50 test cases under each criterion and send them to the decider. As shown in Table 4,",
|
| 1007 |
+
"bbox": [
|
| 1008 |
+
112,
|
| 1009 |
+
889,
|
| 1010 |
+
489,
|
| 1011 |
+
920
|
| 1012 |
+
],
|
| 1013 |
+
"page_idx": 5
|
| 1014 |
+
},
|
| 1015 |
+
{
|
| 1016 |
+
"type": "table",
|
| 1017 |
+
"img_path": "images/7c8b24cf9cead2695cccbc364e25f21506b87c79697fbdaae1d3874801379c5f.jpg",
|
| 1018 |
+
"table_caption": [],
|
| 1019 |
+
"table_footnote": [],
|
| 1020 |
+
"table_body": "<table><tr><td>Type</td><td>\\( LLM_p \\)</td><td>Samples</td></tr><tr><td>category 1</td><td>68%</td><td>50</td></tr><tr><td>category 2</td><td>42%</td><td>50</td></tr><tr><td>category 3</td><td>5%</td><td>50</td></tr></table>",
|
| 1021 |
+
"bbox": [
|
| 1022 |
+
524,
|
| 1023 |
+
80,
|
| 1024 |
+
870,
|
| 1025 |
+
151
|
| 1026 |
+
],
|
| 1027 |
+
"page_idx": 5
|
| 1028 |
+
},
|
| 1029 |
+
{
|
| 1030 |
+
"type": "text",
|
| 1031 |
+
"text": "Table 4: The proportion of LLM being used under three different types of hard-to-translate categories.",
|
| 1032 |
+
"bbox": [
|
| 1033 |
+
507,
|
| 1034 |
+
160,
|
| 1035 |
+
880,
|
| 1036 |
+
189
|
| 1037 |
+
],
|
| 1038 |
+
"page_idx": 5
|
| 1039 |
+
},
|
| 1040 |
+
{
|
| 1041 |
+
"type": "text",
|
| 1042 |
+
"text": "LLM's performance varies under the three categories. For category 1 (informal expression or Internet memes), $68\\%$ test cases can be well translated by LLM. For category 2 (specialized terms or expressions), only $42\\%$ can be well translated. However, LLM also fails on category 3 (context is required for translation), as only $5\\%$ cases can be well handled.",
|
| 1043 |
+
"bbox": [
|
| 1044 |
+
507,
|
| 1045 |
+
202,
|
| 1046 |
+
884,
|
| 1047 |
+
330
|
| 1048 |
+
],
|
| 1049 |
+
"page_idx": 5
|
| 1050 |
+
},
|
| 1051 |
+
{
|
| 1052 |
+
"type": "text",
|
| 1053 |
+
"text": "B Difficult Text Types",
|
| 1054 |
+
"text_level": 1,
|
| 1055 |
+
"bbox": [
|
| 1056 |
+
507,
|
| 1057 |
+
344,
|
| 1058 |
+
717,
|
| 1059 |
+
362
|
| 1060 |
+
],
|
| 1061 |
+
"page_idx": 5
|
| 1062 |
+
},
|
| 1063 |
+
{
|
| 1064 |
+
"type": "text",
|
| 1065 |
+
"text": "For category 1, NMT models can hardly translate those informal expressions and memes correctly. However, a majority of those informal expressions and memes are new combinations of high-frequency words, which may not be rare in LLM training data. Moreover, as model scales, LLM can better grasp the true meaning of source sentences. So LLM can deliver relatively good translations. However, for category 2, specialized terms are low-frequency words in both NMT and LLM training data, so LLM also struggles to translate those terms correctly. For category 3, without context, LLM also fails if we use it as a sentence-level translation system.",
|
| 1066 |
+
"bbox": [
|
| 1067 |
+
507,
|
| 1068 |
+
370,
|
| 1069 |
+
884,
|
| 1070 |
+
595
|
| 1071 |
+
],
|
| 1072 |
+
"page_idx": 5
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"type": "text",
|
| 1076 |
+
"text": "We define hard-to-translate Chinese sentences from three dimensions: (1) Sentences containing informal expressions or Internet memes, of which the literal meaning is wrong or misleading. For example",
|
| 1077 |
+
"bbox": [
|
| 1078 |
+
507,
|
| 1079 |
+
596,
|
| 1080 |
+
882,
|
| 1081 |
+
676
|
| 1082 |
+
],
|
| 1083 |
+
"page_idx": 5
|
| 1084 |
+
},
|
| 1085 |
+
{
|
| 1086 |
+
"type": "text",
|
| 1087 |
+
"text": "Example1: 浙大学术年会上学生唱主角研究成果让人脑洞大开",
|
| 1088 |
+
"bbox": [
|
| 1089 |
+
507,
|
| 1090 |
+
676,
|
| 1091 |
+
880,
|
| 1092 |
+
708
|
| 1093 |
+
],
|
| 1094 |
+
"page_idx": 5
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"type": "text",
|
| 1098 |
+
"text": "Reference: Students played the leading role at the Annual Academic Conference of Zhejiang University with creative research achievements",
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
507,
|
| 1101 |
+
709,
|
| 1102 |
+
882,
|
| 1103 |
+
757
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 5
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "Explanation: \"脑洞大开\" literally means \"a big hole in the brain\" but its actual meaning is \"creative; inspiring\".",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
507,
|
| 1112 |
+
758,
|
| 1113 |
+
880,
|
| 1114 |
+
806
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 5
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "Example 2: 或者说这电影根本没有主旨,就是一个面目可憎的缝合怪。",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
507,
|
| 1123 |
+
807,
|
| 1124 |
+
880,
|
| 1125 |
+
838
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 5
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "Reference: Or we can say there is no purport in the film at all, and it is just a montage of incoherent elements.",
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
507,
|
| 1134 |
+
841,
|
| 1135 |
+
880,
|
| 1136 |
+
885
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 5
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "text",
|
| 1142 |
+
"text": "Explanation: \"缝合怪\" literally means \"a monster of stitches\" but its actual meaning is \"an awk-",
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
507,
|
| 1145 |
+
888,
|
| 1146 |
+
882,
|
| 1147 |
+
920
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 5
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "page_number",
|
| 1153 |
+
"text": "5145",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
480,
|
| 1156 |
+
928,
|
| 1157 |
+
519,
|
| 1158 |
+
940
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 5
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"text": "ward combination of incoherent elements, scenes, or cultures\".",
|
| 1165 |
+
"bbox": [
|
| 1166 |
+
112,
|
| 1167 |
+
84,
|
| 1168 |
+
487,
|
| 1169 |
+
115
|
| 1170 |
+
],
|
| 1171 |
+
"page_idx": 6
|
| 1172 |
+
},
|
| 1173 |
+
{
|
| 1174 |
+
"type": "text",
|
| 1175 |
+
"text": "(2) Sentences containing specialized terms or expressions, requiring domain knowledge to understand the true meaning.",
|
| 1176 |
+
"bbox": [
|
| 1177 |
+
112,
|
| 1178 |
+
118,
|
| 1179 |
+
487,
|
| 1180 |
+
165
|
| 1181 |
+
],
|
| 1182 |
+
"page_idx": 6
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"type": "text",
|
| 1186 |
+
"text": "Example1: 桃胶的作用:味苦,性平,归大肠,膀胱经。",
|
| 1187 |
+
"bbox": [
|
| 1188 |
+
112,
|
| 1189 |
+
166,
|
| 1190 |
+
487,
|
| 1191 |
+
198
|
| 1192 |
+
],
|
| 1193 |
+
"page_idx": 6
|
| 1194 |
+
},
|
| 1195 |
+
{
|
| 1196 |
+
"type": "text",
|
| 1197 |
+
"text": "Reference: Functions of peach glue: bitter in taste, mild in nature, belong to the large intestine and bladder channels.",
|
| 1198 |
+
"bbox": [
|
| 1199 |
+
112,
|
| 1200 |
+
200,
|
| 1201 |
+
487,
|
| 1202 |
+
247
|
| 1203 |
+
],
|
| 1204 |
+
"page_idx": 6
|
| 1205 |
+
},
|
| 1206 |
+
{
|
| 1207 |
+
"type": "text",
|
| 1208 |
+
"text": "Explanation: \"性平\" is a term in traditional Chinese medicine. \"性\" means the intrinsic properties of herb, including cold, hot, warm, cool, or mild (平).",
|
| 1209 |
+
"bbox": [
|
| 1210 |
+
112,
|
| 1211 |
+
250,
|
| 1212 |
+
487,
|
| 1213 |
+
313
|
| 1214 |
+
],
|
| 1215 |
+
"page_idx": 6
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"type": "text",
|
| 1219 |
+
"text": "Example 2: 她和团队所提出的“四抗二平衡”方案及带去的人工肝、微生态和干细胞三大技术,显著提高了重症救治率。",
|
| 1220 |
+
"bbox": [
|
| 1221 |
+
112,
|
| 1222 |
+
315,
|
| 1223 |
+
487,
|
| 1224 |
+
363
|
| 1225 |
+
],
|
| 1226 |
+
"page_idx": 6
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"type": "text",
|
| 1230 |
+
"text": "Reference: The \"four-against and two-balance\" scheme proposed by her and her team and the three technologies including artificial liver, microecology and stem cells have significantly improved the treatment and cure rate of severe cases.",
|
| 1231 |
+
"bbox": [
|
| 1232 |
+
112,
|
| 1233 |
+
366,
|
| 1234 |
+
489,
|
| 1235 |
+
445
|
| 1236 |
+
],
|
| 1237 |
+
"page_idx": 6
|
| 1238 |
+
},
|
| 1239 |
+
{
|
| 1240 |
+
"type": "text",
|
| 1241 |
+
"text": "Explanation: \"四抗二平衡\" refers to \"fight against viruses, shock, hypoxemia and multi-organ failure, and secondary infections; maintain fluid and micro-ecology balance\". Without domain knowledge, this term can be easily misunderstood.",
|
| 1242 |
+
"bbox": [
|
| 1243 |
+
112,
|
| 1244 |
+
447,
|
| 1245 |
+
487,
|
| 1246 |
+
527
|
| 1247 |
+
],
|
| 1248 |
+
"page_idx": 6
|
| 1249 |
+
},
|
| 1250 |
+
{
|
| 1251 |
+
"type": "text",
|
| 1252 |
+
"text": "(3) Sentences that cannot be understood without context:",
|
| 1253 |
+
"bbox": [
|
| 1254 |
+
112,
|
| 1255 |
+
530,
|
| 1256 |
+
487,
|
| 1257 |
+
560
|
| 1258 |
+
],
|
| 1259 |
+
"page_idx": 6
|
| 1260 |
+
},
|
| 1261 |
+
{
|
| 1262 |
+
"type": "text",
|
| 1263 |
+
"text": "Example1: 女孩街头“箭靶”募捐被告诫",
|
| 1264 |
+
"bbox": [
|
| 1265 |
+
131,
|
| 1266 |
+
562,
|
| 1267 |
+
440,
|
| 1268 |
+
577
|
| 1269 |
+
],
|
| 1270 |
+
"page_idx": 6
|
| 1271 |
+
},
|
| 1272 |
+
{
|
| 1273 |
+
"type": "text",
|
| 1274 |
+
"text": "Reference: The girl who raised donations by acting as a target on the street was warned.",
|
| 1275 |
+
"bbox": [
|
| 1276 |
+
112,
|
| 1277 |
+
581,
|
| 1278 |
+
487,
|
| 1279 |
+
612
|
| 1280 |
+
],
|
| 1281 |
+
"page_idx": 6
|
| 1282 |
+
},
|
| 1283 |
+
{
|
| 1284 |
+
"type": "text",
|
| 1285 |
+
"text": "Explanation: \"箭靶\" literally means \"archery target. If it is translated literally, the sentence would be \"The girl made an archery target donation on the street and was warned.\", But according to context, it actually means \"the girl acted as a target\".",
|
| 1286 |
+
"bbox": [
|
| 1287 |
+
112,
|
| 1288 |
+
614,
|
| 1289 |
+
487,
|
| 1290 |
+
695
|
| 1291 |
+
],
|
| 1292 |
+
"page_idx": 6
|
| 1293 |
+
},
|
| 1294 |
+
{
|
| 1295 |
+
"type": "text",
|
| 1296 |
+
"text": "C Literary Test Set",
|
| 1297 |
+
"text_level": 1,
|
| 1298 |
+
"bbox": [
|
| 1299 |
+
114,
|
| 1300 |
+
711,
|
| 1301 |
+
299,
|
| 1302 |
+
727
|
| 1303 |
+
],
|
| 1304 |
+
"page_idx": 6
|
| 1305 |
+
},
|
| 1306 |
+
{
|
| 1307 |
+
"type": "text",
|
| 1308 |
+
"text": "The composition of the literary test set:",
|
| 1309 |
+
"bbox": [
|
| 1310 |
+
112,
|
| 1311 |
+
740,
|
| 1312 |
+
406,
|
| 1313 |
+
755
|
| 1314 |
+
],
|
| 1315 |
+
"page_idx": 6
|
| 1316 |
+
},
|
| 1317 |
+
{
|
| 1318 |
+
"type": "list",
|
| 1319 |
+
"sub_type": "text",
|
| 1320 |
+
"list_items": [
|
| 1321 |
+
"(1) Sentences require transcreation: needs to recreate content in a new language and maintain its original meaning, such as slogan, and advertisements.",
|
| 1322 |
+
"(2) Sentences contain memes and buzzwords: needs to understand local popular culture before translation.",
|
| 1323 |
+
"(3) Sentences contain idioms: needs to understand local literature and social culture before translation."
|
| 1324 |
+
],
|
| 1325 |
+
"bbox": [
|
| 1326 |
+
112,
|
| 1327 |
+
758,
|
| 1328 |
+
487,
|
| 1329 |
+
919
|
| 1330 |
+
],
|
| 1331 |
+
"page_idx": 6
|
| 1332 |
+
},
|
| 1333 |
+
{
|
| 1334 |
+
"type": "text",
|
| 1335 |
+
"text": "Test cases are crawled from English learning websites. References are double-checked by in-house translators.",
|
| 1336 |
+
"bbox": [
|
| 1337 |
+
507,
|
| 1338 |
+
84,
|
| 1339 |
+
884,
|
| 1340 |
+
131
|
| 1341 |
+
],
|
| 1342 |
+
"page_idx": 6
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"type": "text",
|
| 1346 |
+
"text": "D LLM Translation Prompt",
|
| 1347 |
+
"text_level": 1,
|
| 1348 |
+
"bbox": [
|
| 1349 |
+
509,
|
| 1350 |
+
146,
|
| 1351 |
+
769,
|
| 1352 |
+
164
|
| 1353 |
+
],
|
| 1354 |
+
"page_idx": 6
|
| 1355 |
+
},
|
| 1356 |
+
{
|
| 1357 |
+
"type": "text",
|
| 1358 |
+
"text": "Figure 3 illustrates the translation prompt used for LLM. {source_language} and {target_language} denote the full names of the languages involved, for example, \"Translate this from Chinese to English.\" {sourcesentence} represents the content that actually needs to be translated.",
|
| 1359 |
+
"bbox": [
|
| 1360 |
+
507,
|
| 1361 |
+
174,
|
| 1362 |
+
882,
|
| 1363 |
+
269
|
| 1364 |
+
],
|
| 1365 |
+
"page_idx": 6
|
| 1366 |
+
},
|
| 1367 |
+
{
|
| 1368 |
+
"type": "text",
|
| 1369 |
+
"text": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\nTranslate this from {source-lang} to {target-lang}:<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\\n\\n{source-lang}:\\{sourceSentence\\}<eot_id|\n<|start_header_id|>assistant<|end_header_id|>\\n\\n{target-lang}:",
|
| 1370 |
+
"bbox": [
|
| 1371 |
+
514,
|
| 1372 |
+
286,
|
| 1373 |
+
872,
|
| 1374 |
+
349
|
| 1375 |
+
],
|
| 1376 |
+
"page_idx": 6
|
| 1377 |
+
},
|
| 1378 |
+
{
|
| 1379 |
+
"type": "text",
|
| 1380 |
+
"text": "Figure 3: LLM Translation Prompt",
|
| 1381 |
+
"bbox": [
|
| 1382 |
+
574,
|
| 1383 |
+
363,
|
| 1384 |
+
815,
|
| 1385 |
+
378
|
| 1386 |
+
],
|
| 1387 |
+
"page_idx": 6
|
| 1388 |
+
},
|
| 1389 |
+
{
|
| 1390 |
+
"type": "text",
|
| 1391 |
+
"text": "E Training Setup",
|
| 1392 |
+
"text_level": 1,
|
| 1393 |
+
"bbox": [
|
| 1394 |
+
509,
|
| 1395 |
+
409,
|
| 1396 |
+
675,
|
| 1397 |
+
426
|
| 1398 |
+
],
|
| 1399 |
+
"page_idx": 6
|
| 1400 |
+
},
|
| 1401 |
+
{
|
| 1402 |
+
"type": "text",
|
| 1403 |
+
"text": "NMT: We use the open-source fairseq (Ott et al., 2019) to train NMT models. The key parameters are as follows: each model is trained on 8 GPUs, with a batch size of 6144 and a parameter update frequency of 2. The learning rate is set to 5e-4. The warm-up steps are set to 4000, and the model is checked every 1000 steps. Additionally, we apply a dropout rate of 0.1 and use R-Drop with default hyperparameters. Training is stopped when the evaluation metrics on the development set do not improve for 10 consecutive checkpoints. The last 10 saved models are averaged and then used for translation.",
|
| 1404 |
+
"bbox": [
|
| 1405 |
+
507,
|
| 1406 |
+
437,
|
| 1407 |
+
882,
|
| 1408 |
+
643
|
| 1409 |
+
],
|
| 1410 |
+
"page_idx": 6
|
| 1411 |
+
},
|
| 1412 |
+
{
|
| 1413 |
+
"type": "text",
|
| 1414 |
+
"text": "LM: We also use the open-source fairseq (Ott et al., 2019) to train LM models. The model architecture follows transformer_lm_base, and the other main training parameters are consistent with those used for the NMT model. Training is stopped when the loss on the development set does not decrease after 10 consecutive checkpoints, and the last saved model is used to compute PPL.",
|
| 1415 |
+
"bbox": [
|
| 1416 |
+
507,
|
| 1417 |
+
646,
|
| 1418 |
+
882,
|
| 1419 |
+
775
|
| 1420 |
+
],
|
| 1421 |
+
"page_idx": 6
|
| 1422 |
+
},
|
| 1423 |
+
{
|
| 1424 |
+
"type": "text",
|
| 1425 |
+
"text": "JDM: We use the open-source transformers (Wolf et al., 2020) to train deciders for each language pair. The model architecture consists of a linear layer connected to a pretrained LM. The key training parameters are as follows: the learning rate for the pretrained LM is set to 1e-5, the learning rate for the linear layer is set to 1e-3, the batch size is 32, the gradient accumulation steps are 8, and the dropout rate is set to 0.3. We only train for",
|
| 1426 |
+
"bbox": [
|
| 1427 |
+
507,
|
| 1428 |
+
776,
|
| 1429 |
+
884,
|
| 1430 |
+
920
|
| 1431 |
+
],
|
| 1432 |
+
"page_idx": 6
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"type": "page_number",
|
| 1436 |
+
"text": "5146",
|
| 1437 |
+
"bbox": [
|
| 1438 |
+
480,
|
| 1439 |
+
928,
|
| 1440 |
+
521,
|
| 1441 |
+
940
|
| 1442 |
+
],
|
| 1443 |
+
"page_idx": 6
|
| 1444 |
+
},
|
| 1445 |
+
{
|
| 1446 |
+
"type": "text",
|
| 1447 |
+
"text": "one epoch, and the last saved model is used for decision-making during the inference phase.",
|
| 1448 |
+
"bbox": [
|
| 1449 |
+
112,
|
| 1450 |
+
84,
|
| 1451 |
+
487,
|
| 1452 |
+
116
|
| 1453 |
+
],
|
| 1454 |
+
"page_idx": 7
|
| 1455 |
+
},
|
| 1456 |
+
{
|
| 1457 |
+
"type": "text",
|
| 1458 |
+
"text": "F Threshold Values",
|
| 1459 |
+
"text_level": 1,
|
| 1460 |
+
"bbox": [
|
| 1461 |
+
114,
|
| 1462 |
+
131,
|
| 1463 |
+
302,
|
| 1464 |
+
147
|
| 1465 |
+
],
|
| 1466 |
+
"page_idx": 7
|
| 1467 |
+
},
|
| 1468 |
+
{
|
| 1469 |
+
"type": "text",
|
| 1470 |
+
"text": "The threshold values of the various methods we used are shown in Table 5. In terms of threshold sensitivity, the sensitivity of the threshold parameters for QET, PPLT, and JDM to language pairs or domains is determined by the LM or COMET scoring models. The greater the differences in these scoring models across language pairs or domains, the more sensitive the threshold parameters become. Additionally, the selection of thresholds is flexible, with the primary purpose of setting thresholds being to control the invocation ratio of the LLM. For example, the thresholds for QET and PPLT can directly control the invocation volume of the LLM, while the thresholds for JDM $(T_{1}\\& \\mathrm{JDM}T_{2})$ are used to select training samples for the decision maker, indirectly controlling the invocation volume of the LLM. If dynamic adjustment of thresholds is desired, we can adjust the threshold using the statistical method mentioned in the Section 3.2, based on the maximum invocation ratio of the LLM that the current computational resources can support.",
|
| 1471 |
+
"bbox": [
|
| 1472 |
+
115,
|
| 1473 |
+
160,
|
| 1474 |
+
489,
|
| 1475 |
+
498
|
| 1476 |
+
],
|
| 1477 |
+
"page_idx": 7
|
| 1478 |
+
},
|
| 1479 |
+
{
|
| 1480 |
+
"type": "table",
|
| 1481 |
+
"img_path": "images/f82e95cae0a0ae7947d84968a8f02826d4069e14201bd238eea79ced5b464b9e.jpg",
|
| 1482 |
+
"table_caption": [],
|
| 1483 |
+
"table_footnote": [],
|
| 1484 |
+
"table_body": "<table><tr><td></td><td>QET</td><td>PPLT</td><td>JDM T1</td><td>JDM T2</td></tr><tr><td>Zh2En</td><td>70</td><td>5.6</td><td>73</td><td>3.5</td></tr><tr><td>En2Zh</td><td>72</td><td>5.5</td><td>76</td><td>3.5</td></tr><tr><td>De2En</td><td>67</td><td>5.7</td><td>79</td><td>2.5</td></tr><tr><td>Ja2En</td><td>73</td><td>5.8</td><td>64</td><td>3.5</td></tr></table>",
|
| 1485 |
+
"bbox": [
|
| 1486 |
+
144,
|
| 1487 |
+
510,
|
| 1488 |
+
455,
|
| 1489 |
+
576
|
| 1490 |
+
],
|
| 1491 |
+
"page_idx": 7
|
| 1492 |
+
},
|
| 1493 |
+
{
|
| 1494 |
+
"type": "text",
|
| 1495 |
+
"text": "G Efficiency",
|
| 1496 |
+
"text_level": 1,
|
| 1497 |
+
"bbox": [
|
| 1498 |
+
114,
|
| 1499 |
+
619,
|
| 1500 |
+
240,
|
| 1501 |
+
636
|
| 1502 |
+
],
|
| 1503 |
+
"page_idx": 7
|
| 1504 |
+
},
|
| 1505 |
+
{
|
| 1506 |
+
"type": "text",
|
| 1507 |
+
"text": "During the inference phase, the model parameters and inference times for different methods are shown in Table 6. In terms of model parameters, the NMT model and LLM models relied upon by different methods $(\\mathrm{P}(\\mathrm{NMT}) + (\\mathrm{P}(\\mathrm{LLM}))$ are the same, with the main difference lying in the selection model. The selection models used in our proposed PPLT and JDM methods (56M/125M) are smaller than those used in the traditional QET method (355M). In terms of overall inference time, our proposed PPLT and JDM methods not only have shorter inference times for the selection model $(\\mathrm{T}(\\mathrm{PPLT}) < \\mathrm{T}(\\mathrm{JDM}) < \\mathrm{T}(\\mathrm{QET}))$ but also selectively invoke the NMT or LLM model for translation as needed. In contrast, the traditional QET method may require invoking the NMT model first and then the LLM model for translation.",
|
| 1508 |
+
"bbox": [
|
| 1509 |
+
115,
|
| 1510 |
+
646,
|
| 1511 |
+
489,
|
| 1512 |
+
919
|
| 1513 |
+
],
|
| 1514 |
+
"page_idx": 7
|
| 1515 |
+
},
|
| 1516 |
+
{
|
| 1517 |
+
"type": "table",
|
| 1518 |
+
"img_path": "images/f270f72c022234e9524b4e8a4091254d6fe8e75d4591e785575e08b24ceb33e6.jpg",
|
| 1519 |
+
"table_caption": [
|
| 1520 |
+
"Table 5: The threshold values of the various methods."
|
| 1521 |
+
],
|
| 1522 |
+
"table_footnote": [],
|
| 1523 |
+
"table_body": "<table><tr><td></td><td>Parameter</td><td>Inference time</td></tr><tr><td>PPLT</td><td>56M + P(NMT) + P(LLM)</td><td>T(PPLT) + (T(NMT) or T(LLM))</td></tr><tr><td>JDM</td><td>125M + P(NMT) + P(LLM)</td><td>T(JDM) + (T(NMT) or T(LLM))</td></tr><tr><td>QET</td><td>355M + P(NMT) + P(LLM)</td><td>T(QET) + (T(NMT) and T(LLM))</td></tr></table>",
|
| 1524 |
+
"bbox": [
|
| 1525 |
+
524,
|
| 1526 |
+
80,
|
| 1527 |
+
867,
|
| 1528 |
+
124
|
| 1529 |
+
],
|
| 1530 |
+
"page_idx": 7
|
| 1531 |
+
},
|
| 1532 |
+
{
|
| 1533 |
+
"type": "text",
|
| 1534 |
+
"text": "Table 6: The model parameters and inference time of the various methods.",
|
| 1535 |
+
"bbox": [
|
| 1536 |
+
507,
|
| 1537 |
+
134,
|
| 1538 |
+
880,
|
| 1539 |
+
162
|
| 1540 |
+
],
|
| 1541 |
+
"page_idx": 7
|
| 1542 |
+
},
|
| 1543 |
+
{
|
| 1544 |
+
"type": "text",
|
| 1545 |
+
"text": "H De2En and Ja2En Results",
|
| 1546 |
+
"text_level": 1,
|
| 1547 |
+
"bbox": [
|
| 1548 |
+
509,
|
| 1549 |
+
187,
|
| 1550 |
+
774,
|
| 1551 |
+
204
|
| 1552 |
+
],
|
| 1553 |
+
"page_idx": 7
|
| 1554 |
+
},
|
| 1555 |
+
{
|
| 1556 |
+
"type": "text",
|
| 1557 |
+
"text": "As shown in Tables 7 and 8, we also observe that the JDM method achieves better fusion results than the QET method on Ja2En and De2En. To better highlight the characteristics of these two methods, we include the Subtitle and Travel test sets. These two test sets are chosen because there is a noticeable gap in the translation results between NMT and LLM models, which helps to better evaluate the effects of system fusion. The Subtitle and Travel test sets are collected from open-source data such as OpenSubtitles, JESC, TED, QED, and czechtourism, and then constructed by language experts, with each test set containing 500 sentences.",
|
| 1558 |
+
"bbox": [
|
| 1559 |
+
507,
|
| 1560 |
+
212,
|
| 1561 |
+
884,
|
| 1562 |
+
422
|
| 1563 |
+
],
|
| 1564 |
+
"page_idx": 7
|
| 1565 |
+
},
|
| 1566 |
+
{
|
| 1567 |
+
"type": "text",
|
| 1568 |
+
"text": "I Generalization",
|
| 1569 |
+
"text_level": 1,
|
| 1570 |
+
"bbox": [
|
| 1571 |
+
509,
|
| 1572 |
+
434,
|
| 1573 |
+
670,
|
| 1574 |
+
450
|
| 1575 |
+
],
|
| 1576 |
+
"page_idx": 7
|
| 1577 |
+
},
|
| 1578 |
+
{
|
| 1579 |
+
"type": "text",
|
| 1580 |
+
"text": "Different NMT and LLM combinations: When there are significant changes in the NMT and LLM models, the selection model of the JDM method may require retraining. However, if only fine-tuning is applied to both while maintaining their complementary characteristics, is retraining still necessary? To address this, we investigate whether the selection model of the JDM method can be directly applied to fine-tuned NMT and LLM models. We utilize the wmt22-cometkiwi-da model to select 40M high-quality Zh2En data for fine-tuning the NMT and LLM models. We then compare the fusion performance of the JDM method and the QET method on Zh2En. As shown in Table 9, even without retraining the selection model, the JDM method still achieves good fusion results on the updated NMT and LLM models, outperforming the QET method. This indicates that the JDM method possesses some generalization capability across different NMT and LLM combinations.",
|
| 1581 |
+
"bbox": [
|
| 1582 |
+
507,
|
| 1583 |
+
458,
|
| 1584 |
+
882,
|
| 1585 |
+
778
|
| 1586 |
+
],
|
| 1587 |
+
"page_idx": 7
|
| 1588 |
+
},
|
| 1589 |
+
{
|
| 1590 |
+
"type": "text",
|
| 1591 |
+
"text": "Unknown domains: Since the training data for the selection models of the PPLT and JDM methods come from general domains, while the test data includes multiple specialized domains, the PPLT and JDM methods can achieve enhanced fusion effects in these domains. This indicates that the PPLT and JDM methods have a certain level of generalization capability for unknown domains.",
|
| 1592 |
+
"bbox": [
|
| 1593 |
+
507,
|
| 1594 |
+
781,
|
| 1595 |
+
882,
|
| 1596 |
+
910
|
| 1597 |
+
],
|
| 1598 |
+
"page_idx": 7
|
| 1599 |
+
},
|
| 1600 |
+
{
|
| 1601 |
+
"type": "page_number",
|
| 1602 |
+
"text": "5147",
|
| 1603 |
+
"bbox": [
|
| 1604 |
+
480,
|
| 1605 |
+
927,
|
| 1606 |
+
519,
|
| 1607 |
+
940
|
| 1608 |
+
],
|
| 1609 |
+
"page_idx": 7
|
| 1610 |
+
},
|
| 1611 |
+
{
|
| 1612 |
+
"type": "table",
|
| 1613 |
+
"img_path": "images/37f0a2dd155b322d259808b02181425af5dc1235f38bcde3853c7948be5af558.jpg",
|
| 1614 |
+
"table_caption": [],
|
| 1615 |
+
"table_footnote": [],
|
| 1616 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Subtitle</td><td colspan=\"3\">Travel</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td></tr><tr><td>NMT</td><td>79.15</td><td>64.29</td><td>0.00%</td><td>87.76</td><td>75.51</td><td>0.00%</td><td>84.92</td><td>74.31</td><td>0.00%</td><td>79.00</td><td>65.16</td><td>0.00%</td><td>82.71</td><td>69.82</td><td>0.00%</td></tr><tr><td>LLM</td><td>80.76</td><td>66.52</td><td>100.00%</td><td>87.43</td><td>74.59</td><td>100.00%</td><td>82.41</td><td>70.25</td><td>100.00%</td><td>83.80</td><td>69.37</td><td>100.00%</td><td>83.60</td><td>70.18</td><td>100.00%</td></tr><tr><td>QET</td><td>79.17</td><td>64.39</td><td>15.49%</td><td>87.77</td><td>75.52</td><td>0.30%</td><td>83.21</td><td>72.13</td><td>46%</td><td>80.74</td><td>66.47</td><td>26%</td><td>82.72</td><td>69.63</td><td>21.95%</td></tr><tr><td>JDM</td><td>80.28</td><td>65.80</td><td>39.39%</td><td>87.81</td><td>75.53</td><td>2.27%</td><td>84.02</td><td>73.64</td><td>33%</td><td>83.13</td><td>68.62</td><td>15%</td><td>83.81</td><td>70.90</td><td>22.42%</td></tr></table>",
|
| 1617 |
+
"bbox": [
|
| 1618 |
+
121,
|
| 1619 |
+
175,
|
| 1620 |
+
873,
|
| 1621 |
+
239
|
| 1622 |
+
],
|
| 1623 |
+
"page_idx": 8
|
| 1624 |
+
},
|
| 1625 |
+
{
|
| 1626 |
+
"type": "table",
|
| 1627 |
+
"img_path": "images/015ac55c506a7016791eab4fb2d8dd5e8a780a08b5f85af31ff5cfd170d3f12e.jpg",
|
| 1628 |
+
"table_caption": [
|
| 1629 |
+
"Table 7: Integration performances of QET and JDM methods on four Japanese→English test sets."
|
| 1630 |
+
],
|
| 1631 |
+
"table_footnote": [],
|
| 1632 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Subtitle</td><td colspan=\"3\">Travel</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td></tr><tr><td>NMT</td><td>83.53</td><td>71.84</td><td>0.00%</td><td>89.20</td><td>79.83</td><td>0.00%</td><td>87.12</td><td>77.87</td><td>0.00%</td><td>87.72</td><td>77.09</td><td>0.00%</td><td>86.89</td><td>76.66</td><td>0.00%</td></tr><tr><td>LLM</td><td>84.72</td><td>73.27</td><td>100.00%</td><td>89.19</td><td>79.59</td><td>100.00%</td><td>86.28</td><td>76.05</td><td>100.00%</td><td>90.87</td><td>82.10</td><td>100.00%</td><td>87.77</td><td>77.75</td><td>100.00%</td></tr><tr><td>QET</td><td>83.64</td><td>71.97</td><td>8.67%</td><td>89.20</td><td>79.83</td><td>1.58%</td><td>86.55</td><td>76.82</td><td>43.00%</td><td>88.61</td><td>78.63</td><td>35.00%</td><td>87.00</td><td>76.81</td><td>22.06%</td></tr><tr><td>JDM</td><td>84.31</td><td>72.74</td><td>36.39%</td><td>89.29</td><td>79.93</td><td>10.87%</td><td>86.90</td><td>77.24</td><td>29.00%</td><td>90.24</td><td>80.93</td><td>17.00%</td><td>87.69</td><td>77.71</td><td>23.32%</td></tr></table>",
|
| 1633 |
+
"bbox": [
|
| 1634 |
+
121,
|
| 1635 |
+
461,
|
| 1636 |
+
873,
|
| 1637 |
+
525
|
| 1638 |
+
],
|
| 1639 |
+
"page_idx": 8
|
| 1640 |
+
},
|
| 1641 |
+
{
|
| 1642 |
+
"type": "table",
|
| 1643 |
+
"img_path": "images/22a6079ea10636fd785bdfabb4d12f5ae44c60d214bbd993f405bc53fda94a85.jpg",
|
| 1644 |
+
"table_caption": [
|
| 1645 |
+
"Table 8: Integration performances of QET and JDM methods on four German→English test sets."
|
| 1646 |
+
],
|
| 1647 |
+
"table_footnote": [],
|
| 1648 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Literary</td><td colspan=\"3\">Tech</td><td colspan=\"2\">Avg</td><td></td></tr><tr><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td></tr><tr><td>NMT-FT</td><td>79.76</td><td>66.98</td><td>0.00%</td><td>88.24</td><td>77.64</td><td>0.00%</td><td>60.52</td><td>47.13</td><td>0.00%</td><td>83.82</td><td>72.36</td><td>0.00%</td><td>78.09</td><td>66.03</td><td>0.00%</td></tr><tr><td>LLM-SFT</td><td>81.45</td><td>68.41</td><td>100.00%</td><td>86.96</td><td>75.97</td><td>100.00%</td><td>66.73</td><td>53.89</td><td>100.00%</td><td>78.20</td><td></td><td>100.00%</td><td>78.34</td><td>64.99</td><td>100.00%</td></tr><tr><td>QET</td><td>80.01</td><td>67.13</td><td>17.65%</td><td>88.24</td><td>77.63</td><td>0.30%</td><td>63.89</td><td>50.63</td><td>55.40%</td><td>80.75</td><td>66.63</td><td>45.00%</td><td>78.22</td><td>65.51</td><td>29.59%</td></tr><tr><td>JDM</td><td>80.73</td><td>67.85</td><td>29.65%</td><td>88.24</td><td>77.65</td><td>0.79%</td><td>66.25</td><td>53.46</td><td>80.20%</td><td>82.64</td><td>70.05</td><td>10.40%</td><td>79.47</td><td>67.25</td><td>30.26%</td></tr></table>",
|
| 1649 |
+
"bbox": [
|
| 1650 |
+
132,
|
| 1651 |
+
747,
|
| 1652 |
+
867,
|
| 1653 |
+
797
|
| 1654 |
+
],
|
| 1655 |
+
"page_idx": 8
|
| 1656 |
+
},
|
| 1657 |
+
{
|
| 1658 |
+
"type": "text",
|
| 1659 |
+
"text": "Table 9: New integration performances of QET and JDM methods on four Chinese→English test sets.",
|
| 1660 |
+
"bbox": [
|
| 1661 |
+
152,
|
| 1662 |
+
808,
|
| 1663 |
+
840,
|
| 1664 |
+
822
|
| 1665 |
+
],
|
| 1666 |
+
"page_idx": 8
|
| 1667 |
+
},
|
| 1668 |
+
{
|
| 1669 |
+
"type": "page_number",
|
| 1670 |
+
"text": "5148",
|
| 1671 |
+
"bbox": [
|
| 1672 |
+
480,
|
| 1673 |
+
928,
|
| 1674 |
+
519,
|
| 1675 |
+
940
|
| 1676 |
+
],
|
| 1677 |
+
"page_idx": 8
|
| 1678 |
+
}
|
| 1679 |
+
]
|
2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/614ae70a-82a1-4a03-8912-d0ba0d79c1e5_model.json
ADDED
|
@@ -0,0 +1,1923 @@
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
[
|
| 3 |
+
{
|
| 4 |
+
"type": "title",
|
| 5 |
+
"bbox": [
|
| 6 |
+
0.116,
|
| 7 |
+
0.09,
|
| 8 |
+
0.884,
|
| 9 |
+
0.13
|
| 10 |
+
],
|
| 11 |
+
"angle": 0,
|
| 12 |
+
"content": "Combining the Best of Both Worlds: A Method for Hybrid NMT and LLM Translation"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"bbox": [
|
| 17 |
+
0.177,
|
| 18 |
+
0.147,
|
| 19 |
+
0.827,
|
| 20 |
+
0.196
|
| 21 |
+
],
|
| 22 |
+
"angle": 0,
|
| 23 |
+
"content": "Zhanglin Wu*, Daimeng Wei*, Xiaoyu Chen, Hengchao Shang, Jiaxin Guo, Zongyao Li, Yuanchang Luo, Jinlong Yang, Zhiqiang Rao, Hao Yang Huawei Translation Service Center, Beijing, China"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"bbox": [
|
| 28 |
+
0.144,
|
| 29 |
+
0.198,
|
| 30 |
+
0.856,
|
| 31 |
+
0.232
|
| 32 |
+
],
|
| 33 |
+
"angle": 0,
|
| 34 |
+
"content": "{wuzhanglin2,weidaimeng,chenxiaoyu35,shanghengchao,guojiaxin1, lizongyao,luoyuanchang1,yangjinlong7,raozhiqiang, yanghao30}@huawei.com"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "title",
|
| 38 |
+
"bbox": [
|
| 39 |
+
0.261,
|
| 40 |
+
0.261,
|
| 41 |
+
0.341,
|
| 42 |
+
0.276
|
| 43 |
+
],
|
| 44 |
+
"angle": 0,
|
| 45 |
+
"content": "Abstract"
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"bbox": [
|
| 50 |
+
0.142,
|
| 51 |
+
0.291,
|
| 52 |
+
0.461,
|
| 53 |
+
0.618
|
| 54 |
+
],
|
| 55 |
+
"angle": 0,
|
| 56 |
+
"content": "Large language model (LLM) shows promising performances in a variety of downstream tasks, such as machine translation (MT). However, using LLMs for translation suffers from high computational costs and significant latency. Based on our evaluation, in most cases, translations using LLMs are comparable to that generated by neural machine translation (NMT) systems. Only in particular scenarios, LLM and NMT models show respective advantages. As a result, integrating NMT and LLM for translation and using LLM only when necessary seems to be a sound solution. A scheduling policy that optimizes translation results while ensuring fast speed and as little LLM usage as possible is thereby required. We compare several scheduling policies and propose a novel and straightforward decider that leverages source sentence features. We conduct extensive experiments on multilingual test sets and the result shows that we can achieve optimal translation performance with minimal LLM usage, demonstrating effectiveness of our decider."
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "title",
|
| 60 |
+
"bbox": [
|
| 61 |
+
0.115,
|
| 62 |
+
0.633,
|
| 63 |
+
0.26,
|
| 64 |
+
0.647
|
| 65 |
+
],
|
| 66 |
+
"angle": 0,
|
| 67 |
+
"content": "1 Introduction"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"bbox": [
|
| 72 |
+
0.113,
|
| 73 |
+
0.66,
|
| 74 |
+
0.49,
|
| 75 |
+
0.901
|
| 76 |
+
],
|
| 77 |
+
"angle": 0,
|
| 78 |
+
"content": "Neural models (Sutskever et al., 2014; Bahdanau et al., 2016; Vaswani et al., 2017) greatly boost machine translation (MT) performance while various inference speed-up strategies (Wang et al., 2019, 2021b,a) ensure fast translation. As model scales, large language model (LLM) (Ouyang et al., 2022; Touvron et al., 2023) now is able to deliver fairly good translation results(Son and Kim, 2023; Zhang et al., 2023; Moslem et al., 2023), which are even comparable to translations done by commercial translation systems. Hendy et al. (2023) find that LLM performs particularly well when translating content in particular domains. As shown in Figure 1, we find that neural machine translation (NMT) model and LLM have own merits and drawbacks."
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"bbox": [
|
| 83 |
+
0.576,
|
| 84 |
+
0.267,
|
| 85 |
+
0.654,
|
| 86 |
+
0.278
|
| 87 |
+
],
|
| 88 |
+
"angle": 0,
|
| 89 |
+
"content": "今天的天气真好"
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"type": "text",
|
| 93 |
+
"bbox": [
|
| 94 |
+
0.576,
|
| 95 |
+
0.281,
|
| 96 |
+
0.723,
|
| 97 |
+
0.291
|
| 98 |
+
],
|
| 99 |
+
"angle": 0,
|
| 100 |
+
"content": "NMT: It's a beautiful day today"
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"type": "text",
|
| 104 |
+
"bbox": [
|
| 105 |
+
0.577,
|
| 106 |
+
0.296,
|
| 107 |
+
0.745,
|
| 108 |
+
0.308
|
| 109 |
+
],
|
| 110 |
+
"angle": 0,
|
| 111 |
+
"content": "LLM: Today's weather is really nice"
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"type": "image",
|
| 115 |
+
"bbox": [
|
| 116 |
+
0.745,
|
| 117 |
+
0.275,
|
| 118 |
+
0.772,
|
| 119 |
+
0.293
|
| 120 |
+
],
|
| 121 |
+
"angle": 0,
|
| 122 |
+
"content": null
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"type": "image",
|
| 126 |
+
"bbox": [
|
| 127 |
+
0.746,
|
| 128 |
+
0.294,
|
| 129 |
+
0.771,
|
| 130 |
+
0.311
|
| 131 |
+
],
|
| 132 |
+
"angle": 0,
|
| 133 |
+
"content": null
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"type": "text",
|
| 137 |
+
"bbox": [
|
| 138 |
+
0.577,
|
| 139 |
+
0.324,
|
| 140 |
+
0.71,
|
| 141 |
+
0.335
|
| 142 |
+
],
|
| 143 |
+
"angle": 0,
|
| 144 |
+
"content": "我觉得他说话前言不搭后语"
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"type": "text",
|
| 148 |
+
"bbox": [
|
| 149 |
+
0.577,
|
| 150 |
+
0.339,
|
| 151 |
+
0.804,
|
| 152 |
+
0.349
|
| 153 |
+
],
|
| 154 |
+
"angle": 0,
|
| 155 |
+
"content": "NMT: I feel like his words don't match his words"
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"type": "text",
|
| 159 |
+
"bbox": [
|
| 160 |
+
0.577,
|
| 161 |
+
0.356,
|
| 162 |
+
0.809,
|
| 163 |
+
0.367
|
| 164 |
+
],
|
| 165 |
+
"angle": 0,
|
| 166 |
+
"content": "LLM: I think what he says doesn't follow logically."
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"type": "image",
|
| 170 |
+
"bbox": [
|
| 171 |
+
0.815,
|
| 172 |
+
0.335,
|
| 173 |
+
0.842,
|
| 174 |
+
0.353
|
| 175 |
+
],
|
| 176 |
+
"angle": 0,
|
| 177 |
+
"content": null
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"type": "image",
|
| 181 |
+
"bbox": [
|
| 182 |
+
0.815,
|
| 183 |
+
0.354,
|
| 184 |
+
0.842,
|
| 185 |
+
0.372
|
| 186 |
+
],
|
| 187 |
+
"angle": 0,
|
| 188 |
+
"content": null
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"type": "text",
|
| 192 |
+
"bbox": [
|
| 193 |
+
0.579,
|
| 194 |
+
0.383,
|
| 195 |
+
0.783,
|
| 196 |
+
0.394
|
| 197 |
+
],
|
| 198 |
+
"angle": 0,
|
| 199 |
+
"content": "2010年7月19日因不良反应停用聚甲酚磺醛"
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"bbox": [
|
| 204 |
+
0.577,
|
| 205 |
+
0.397,
|
| 206 |
+
0.829,
|
| 207 |
+
0.415
|
| 208 |
+
],
|
| 209 |
+
"angle": 0,
|
| 210 |
+
"content": "NMT: Policresulen was discontinued on 19 July 2010 due to adverse reactions."
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "image",
|
| 214 |
+
"bbox": [
|
| 215 |
+
0.831,
|
| 216 |
+
0.393,
|
| 217 |
+
0.856,
|
| 218 |
+
0.411
|
| 219 |
+
],
|
| 220 |
+
"angle": 0,
|
| 221 |
+
"content": null
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "text",
|
| 225 |
+
"bbox": [
|
| 226 |
+
0.577,
|
| 227 |
+
0.42,
|
| 228 |
+
0.826,
|
| 229 |
+
0.438
|
| 230 |
+
],
|
| 231 |
+
"angle": 0,
|
| 232 |
+
"content": "LLM: On July 19, 2010, polyphenol sulfone aldehyde was discontinued due to adverse reactions."
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "image",
|
| 236 |
+
"bbox": [
|
| 237 |
+
0.83,
|
| 238 |
+
0.419,
|
| 239 |
+
0.857,
|
| 240 |
+
0.438
|
| 241 |
+
],
|
| 242 |
+
"angle": 0,
|
| 243 |
+
"content": null
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "image_caption",
|
| 247 |
+
"bbox": [
|
| 248 |
+
0.509,
|
| 249 |
+
0.457,
|
| 250 |
+
0.885,
|
| 251 |
+
0.514
|
| 252 |
+
],
|
| 253 |
+
"angle": 0,
|
| 254 |
+
"content": "Figure 1: A comparison of translations done by an NMT model and LLM. They translate simple content equally well but their performances vary when translating complex sentences."
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"type": "text",
|
| 258 |
+
"bbox": [
|
| 259 |
+
0.508,
|
| 260 |
+
0.548,
|
| 261 |
+
0.885,
|
| 262 |
+
0.725
|
| 263 |
+
],
|
| 264 |
+
"angle": 0,
|
| 265 |
+
"content": "Methods to harness complementary strengths of NMT and LLM models, with the aim of achieving better translation results through their integration, are worthy of research. To integrate large and small models, Zeng et al. (2024) propose Cooperative Decoding while Farinhas et al. (2023) put forward an approach based on Minimum Bayes Risk (MBR). While these methods are effective in improving translation quality, their reliance on LLMs for every piece of translation incurs substantial computational expenses."
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"type": "text",
|
| 269 |
+
"bbox": [
|
| 270 |
+
0.508,
|
| 271 |
+
0.729,
|
| 272 |
+
0.885,
|
| 273 |
+
0.921
|
| 274 |
+
],
|
| 275 |
+
"angle": 0,
|
| 276 |
+
"content": "As shown in Table 1, we annotate source sentences into two categories: simple and hard (to translate). The majority of sentences are marked as simple, and only a small portion of sentences is believed to be challenging for translation systems. LLM performs better when translating complex sentences. Hendy et al. (2023) perform translation using an NMT model and evaluate the translation quality using a quality estimation (QE) model (Rei et al., 2020; Fomicheva et al., 2020; Rei et al., 2022c). If the QE model give a low score to a translation result, they then use an LLM to translate"
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"type": "page_footnote",
|
| 280 |
+
"bbox": [
|
| 281 |
+
0.137,
|
| 282 |
+
0.907,
|
| 283 |
+
0.43,
|
| 284 |
+
0.921
|
| 285 |
+
],
|
| 286 |
+
"angle": 0,
|
| 287 |
+
"content": "*These authors contributed equally to this work."
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"type": "page_number",
|
| 291 |
+
"bbox": [
|
| 292 |
+
0.481,
|
| 293 |
+
0.928,
|
| 294 |
+
0.522,
|
| 295 |
+
0.941
|
| 296 |
+
],
|
| 297 |
+
"angle": 0,
|
| 298 |
+
"content": "5140"
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "footer",
|
| 302 |
+
"bbox": [
|
| 303 |
+
0.229,
|
| 304 |
+
0.946,
|
| 305 |
+
0.769,
|
| 306 |
+
0.974
|
| 307 |
+
],
|
| 308 |
+
"angle": 0,
|
| 309 |
+
"content": "Findings of the Association for Computational Linguistics: ACL 2025, pages 5140-5148 July 27 - August 1, 2025 ©2025 Association for Computational Linguistics"
|
| 310 |
+
}
|
| 311 |
+
],
|
| 312 |
+
[
|
| 313 |
+
{
|
| 314 |
+
"type": "image",
|
| 315 |
+
"bbox": [
|
| 316 |
+
0.123,
|
| 317 |
+
0.083,
|
| 318 |
+
0.482,
|
| 319 |
+
0.234
|
| 320 |
+
],
|
| 321 |
+
"angle": 0,
|
| 322 |
+
"content": null
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"type": "image_caption",
|
| 326 |
+
"bbox": [
|
| 327 |
+
0.113,
|
| 328 |
+
0.246,
|
| 329 |
+
0.49,
|
| 330 |
+
0.318
|
| 331 |
+
],
|
| 332 |
+
"angle": 0,
|
| 333 |
+
"content": "Figure 2: Two approaches to integrate NMT model and LLM. The left approach is QET proposed by Hendy et al. (2023) and the right part is our proposed PPLT and JDM, which quickly determines when to use LLM based on source sentence."
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "text",
|
| 337 |
+
"bbox": [
|
| 338 |
+
0.113,
|
| 339 |
+
0.344,
|
| 340 |
+
0.489,
|
| 341 |
+
0.44
|
| 342 |
+
],
|
| 343 |
+
"angle": 0,
|
| 344 |
+
"content": "the sentence again. Their approach leverages LLM advantages while reduce unnecessary LLM usage. However, their approach heavily relies on the performance of the QE model, and ignores scenarios when LLM deliver even worse results. As a result, their approach may not guarantee best translation."
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "text",
|
| 348 |
+
"bbox": [
|
| 349 |
+
0.113,
|
| 350 |
+
0.442,
|
| 351 |
+
0.49,
|
| 352 |
+
0.634
|
| 353 |
+
],
|
| 354 |
+
"angle": 0,
|
| 355 |
+
"content": "Without using any QE model, our approach decides when to use LLM only based on source sentence features. This idea is challenging and we try a multiple of indicators. In the end we find that using only two indicators—sentence complexity and translation domain (whether LLM is good at or not), we can make a sound decision. In this way, we can directly decide whether to use NMT model or LLM as long as the source sentence is input, and use LLM as less as possible. We test our approach on multilingual test sets (Zh2En, En2Zh, De2En, and Ja2En) and obtain best in results for MT."
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "title",
|
| 359 |
+
"bbox": [
|
| 360 |
+
0.114,
|
| 361 |
+
0.649,
|
| 362 |
+
0.219,
|
| 363 |
+
0.663
|
| 364 |
+
],
|
| 365 |
+
"angle": 0,
|
| 366 |
+
"content": "2 Method"
|
| 367 |
+
},
|
| 368 |
+
{
|
| 369 |
+
"type": "text",
|
| 370 |
+
"bbox": [
|
| 371 |
+
0.113,
|
| 372 |
+
0.675,
|
| 373 |
+
0.49,
|
| 374 |
+
0.884
|
| 375 |
+
],
|
| 376 |
+
"angle": 0,
|
| 377 |
+
"content": "As shown in Figure 2, compared to the QE Threshold (QET) method proposed by Hendy et al. (2023), our approach is more straightforward, relies on fewer model parameters, and has shorter inference time (see Appendix F). The former requires using the wmt22-cometkiwi-da\\(^{1}\\) (Rei et al., 2022b) model to assess the quality of NMT translation results to decide whether to continue calling the LLM for translation. In contrast, our method directly decides whether to call the LLM or NMT based on the input source text, which is clearly a challenging task. Moreover, our method needs to meet two requirements: 1) minimize the use of LLMs as much"
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"type": "table",
|
| 381 |
+
"bbox": [
|
| 382 |
+
0.531,
|
| 383 |
+
0.082,
|
| 384 |
+
0.864,
|
| 385 |
+
0.152
|
| 386 |
+
],
|
| 387 |
+
"angle": 0,
|
| 388 |
+
"content": "<table><tr><td></td><td>DA Simple(95%)</td><td>DA Hard(5%)</td></tr><tr><td>NMT</td><td>80.21</td><td>73.22</td></tr><tr><td>LLM</td><td>81.62</td><td>77.02</td></tr><tr><td>Diff</td><td>1.41</td><td>3.80</td></tr></table>"
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"type": "table_caption",
|
| 392 |
+
"bbox": [
|
| 393 |
+
0.508,
|
| 394 |
+
0.161,
|
| 395 |
+
0.883,
|
| 396 |
+
0.29
|
| 397 |
+
],
|
| 398 |
+
"angle": 0,
|
| 399 |
+
"content": "Table 1: Comparison of NMT and LLM performances on simple and complex sentences in the WMT22 Zh2En news test set. \"Diff\" refers to the difference in DA scores between LLM and NMT. \\(95\\%\\) of the sentences are considered easy to translate. We detail our classification criteria in Appendix B. We conduct experiment using an NMT model trained from scratch and Llama-3.1-8B-Instruct (Touvron et al., 2023). wmt22-comet-da (Rei et al., 2022a) is used for reporting DA score."
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"type": "text",
|
| 403 |
+
"bbox": [
|
| 404 |
+
0.508,
|
| 405 |
+
0.301,
|
| 406 |
+
0.883,
|
| 407 |
+
0.365
|
| 408 |
+
],
|
| 409 |
+
"angle": 0,
|
| 410 |
+
"content": "as possible, and 2) if LLM results are used, they should outperform the NMT results. It is evident that using QET makes it difficult to fully satisfy the second condition, which impacts the fusion effect."
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"bbox": [
|
| 415 |
+
0.508,
|
| 416 |
+
0.366,
|
| 417 |
+
0.884,
|
| 418 |
+
0.509
|
| 419 |
+
],
|
| 420 |
+
"angle": 0,
|
| 421 |
+
"content": "As shown in Table 1, LLM delivers better translation when source sentence is hard to translate. For relatively simple sentences, LLM does not have a particular advantage, so we try not to use LLM in this scenario. In addition, we need to verify whether it is possible to determine using which model to translate only based on source sentence. As a result, we design two approaches to meet the two requirements:"
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"bbox": [
|
| 426 |
+
0.508,
|
| 427 |
+
0.51,
|
| 428 |
+
0.884,
|
| 429 |
+
0.622
|
| 430 |
+
],
|
| 431 |
+
"angle": 0,
|
| 432 |
+
"content": "PPL Threshold (PPLT): We use monolingual data (previously used for training NMT models) to train a small language model (LM). We directly use LLM for translation when the source sentence perplexity (PPL) is greater than a threshold we set. We employ the simple method to test whether LLM can translate complex sentences well."
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "text",
|
| 436 |
+
"bbox": [
|
| 437 |
+
0.508,
|
| 438 |
+
0.623,
|
| 439 |
+
0.885,
|
| 440 |
+
0.783
|
| 441 |
+
],
|
| 442 |
+
"angle": 0,
|
| 443 |
+
"content": "Joint Decision-making (JDM): Given a source sentence (src), we use NMT model and LLM to obtain two translation results \\((tgt_{NMT}\\) and \\(tgt_{LLM})\\). By comparing the two translations against reference (tgt), we obtain quality measurements of the two results \\((Q_{NMT}\\) and \\(Q_{LLM})\\). We hope to use LLM for translation only when (1) the translation delivered by NMT model is bad and (2) the translation done by LLM is better. So we use LLM for translation when:"
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"type": "equation",
|
| 447 |
+
"bbox": [
|
| 448 |
+
0.53,
|
| 449 |
+
0.796,
|
| 450 |
+
0.884,
|
| 451 |
+
0.814
|
| 452 |
+
],
|
| 453 |
+
"angle": 0,
|
| 454 |
+
"content": "\\[\nQ _ {N M T} < T _ {1} \\text {a n d} Q _ {L L M} - Q _ {N M T} > T _ {2} \\tag {1}\n\\]"
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"type": "text",
|
| 458 |
+
"bbox": [
|
| 459 |
+
0.508,
|
| 460 |
+
0.826,
|
| 461 |
+
0.884,
|
| 462 |
+
0.922
|
| 463 |
+
],
|
| 464 |
+
"angle": 0,
|
| 465 |
+
"content": "Due to the inability to obtain references in practical applications, we cannot directly use the above conditions to control the LLM's invocation. Therefore, based on these conditions, we select positive and negative samples from bilingual data and train a binary classification model to serve as a decider,"
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"type": "page_footnote",
|
| 469 |
+
"bbox": [
|
| 470 |
+
0.114,
|
| 471 |
+
0.895,
|
| 472 |
+
0.381,
|
| 473 |
+
0.92
|
| 474 |
+
],
|
| 475 |
+
"angle": 0,
|
| 476 |
+
"content": "1https://huggingface.co/Unbabel/wmt22-cometkiwi-da"
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "page_number",
|
| 480 |
+
"bbox": [
|
| 481 |
+
0.481,
|
| 482 |
+
0.929,
|
| 483 |
+
0.519,
|
| 484 |
+
0.941
|
| 485 |
+
],
|
| 486 |
+
"angle": 0,
|
| 487 |
+
"content": "5141"
|
| 488 |
+
}
|
| 489 |
+
],
|
| 490 |
+
[
|
| 491 |
+
{
|
| 492 |
+
"type": "text",
|
| 493 |
+
"bbox": [
|
| 494 |
+
0.114,
|
| 495 |
+
0.085,
|
| 496 |
+
0.488,
|
| 497 |
+
0.117
|
| 498 |
+
],
|
| 499 |
+
"angle": 0,
|
| 500 |
+
"content": "determining when to use the LLM for translation during the inference process."
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"type": "title",
|
| 504 |
+
"bbox": [
|
| 505 |
+
0.115,
|
| 506 |
+
0.13,
|
| 507 |
+
0.262,
|
| 508 |
+
0.148
|
| 509 |
+
],
|
| 510 |
+
"angle": 0,
|
| 511 |
+
"content": "3 Experiments"
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"type": "title",
|
| 515 |
+
"bbox": [
|
| 516 |
+
0.115,
|
| 517 |
+
0.157,
|
| 518 |
+
0.27,
|
| 519 |
+
0.172
|
| 520 |
+
],
|
| 521 |
+
"angle": 0,
|
| 522 |
+
"content": "3.1 NMT & LLM"
|
| 523 |
+
},
|
| 524 |
+
{
|
| 525 |
+
"type": "text",
|
| 526 |
+
"bbox": [
|
| 527 |
+
0.113,
|
| 528 |
+
0.179,
|
| 529 |
+
0.49,
|
| 530 |
+
0.468
|
| 531 |
+
],
|
| 532 |
+
"angle": 0,
|
| 533 |
+
"content": "We directly use Llama-3.1-8B-Instruct as our LLM model, and its translation prompt is provided in Appendix D. Due to its strong translation performance, we do not perform any further supervised fine-tuning on it. We focus on training an NMT model from scratch for each language pair that can achieve comparable translation performance. Our NMT model adopts the Deep Transformer-Big architecture commonly used by Wei et al. (2022), and the training data comes from internal technology (Tech) bilingual data and various open-source bilingual datasets archived in OPUS, such as CCMatrix, Paracrawl, NLLB, UNPC and OpenSubtitles. For each translation language pair, we randomly sample 100 million bilingual data, which are then deduplicated with the test set before being used for training. The training setup of NMT models is provided in Appendix E."
|
| 534 |
+
},
|
| 535 |
+
{
|
| 536 |
+
"type": "title",
|
| 537 |
+
"bbox": [
|
| 538 |
+
0.115,
|
| 539 |
+
0.481,
|
| 540 |
+
0.242,
|
| 541 |
+
0.495
|
| 542 |
+
],
|
| 543 |
+
"angle": 0,
|
| 544 |
+
"content": "3.2 Threshold"
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"type": "text",
|
| 548 |
+
"bbox": [
|
| 549 |
+
0.113,
|
| 550 |
+
0.503,
|
| 551 |
+
0.489,
|
| 552 |
+
0.646
|
| 553 |
+
],
|
| 554 |
+
"angle": 0,
|
| 555 |
+
"content": "Among the methods mentioned above, all require setting thresholds in advance to limit the proportion of LLM calls. For each language pair, we use statistical methods to determine the threshold for each method by controlling the proportion of LLM calls to approximately \\(25\\%\\), and then compare the performance differences between different methods. The specific threshold values for each method are provided in Appendix F."
|
| 556 |
+
},
|
| 557 |
+
{
|
| 558 |
+
"type": "text",
|
| 559 |
+
"bbox": [
|
| 560 |
+
0.113,
|
| 561 |
+
0.648,
|
| 562 |
+
0.489,
|
| 563 |
+
0.807
|
| 564 |
+
],
|
| 565 |
+
"angle": 0,
|
| 566 |
+
"content": "For the QET method, it requires setting a QE score threshold to control the invocation of the LLM. The LLM is only called when the QE score of the NMT translation is below this threshold. We select one million bilingual data, obtain the NMT translation corresponding to the source text, and calculate their QE scores using wmt22-cometkiwida (Rei et al., 2022b). The QE scores are then sorted in ascending order, and the 250,000th QE score in the sorted list is used as the threshold."
|
| 567 |
+
},
|
| 568 |
+
{
|
| 569 |
+
"type": "text",
|
| 570 |
+
"bbox": [
|
| 571 |
+
0.113,
|
| 572 |
+
0.809,
|
| 573 |
+
0.49,
|
| 574 |
+
0.921
|
| 575 |
+
],
|
| 576 |
+
"angle": 0,
|
| 577 |
+
"content": "For the PPLT method, it is necessary to set a PPL score threshold, and the LLM is invoked only when the source text's PPL score exceeds this threshold. We calculate the PPL scores of 1 million source-language monolingual data using a self-trained LM model, then sort the PPL scores in descending order and use the 250,000th score in the sorted list as"
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"bbox": [
|
| 582 |
+
0.508,
|
| 583 |
+
0.085,
|
| 584 |
+
0.883,
|
| 585 |
+
0.149
|
| 586 |
+
],
|
| 587 |
+
"angle": 0,
|
| 588 |
+
"content": "the threshold. The LM is trained on 30 million monolingual data, with training settings provided in Appendix E. Additionally, all monolingual data is randomly sampled from bilingual data."
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "text",
|
| 592 |
+
"bbox": [
|
| 593 |
+
0.508,
|
| 594 |
+
0.15,
|
| 595 |
+
0.885,
|
| 596 |
+
0.504
|
| 597 |
+
],
|
| 598 |
+
"angle": 0,
|
| 599 |
+
"content": "For the JDM method, when to call the LLM depends on the decision maker, which is a binary classification model fine-tuned based on xlmroberta-base (Conneau, 2019). The training setup is described in Appendix E. When selecting positive and negative samples for training according to Equation 1, two thresholds need to be set. Specifically, we use one million bilingual data, obtain the NMT translation and LLM translation corresponding to the source text, and calculate the \\( Q_{NMT} \\) and \\( Q_{LLM} \\) scores using wmt22-comet-da\\(^{2}\\) (Rei et al., 2022a). The \\( Q_{NMT} \\) scores are then sorted from lowest to highest, and the 100,000th score in the sorted list is chosen as the \\( T_{1} \\) threshold. Then, the data with \\( Q_{NMT} \\) scores lower than \\( T_{1} \\) are sorted by the difference between \\( Q_{LLM} \\) and \\( Q_{NMT} \\) scores, from highest to lowest, and the 10,000th score is selected as the \\( T_{2} \\) threshold. Ultimately, we can obtain 10,000 positive samples, and then randomly select 30,000 negative samples from the remaining data. With this training data ratio, the decider can maintain about 25% LLM calls."
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "title",
|
| 603 |
+
"bbox": [
|
| 604 |
+
0.51,
|
| 605 |
+
0.517,
|
| 606 |
+
0.619,
|
| 607 |
+
0.532
|
| 608 |
+
],
|
| 609 |
+
"angle": 0,
|
| 610 |
+
"content": "3.3 Test Set"
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "text",
|
| 614 |
+
"bbox": [
|
| 615 |
+
0.508,
|
| 616 |
+
0.539,
|
| 617 |
+
0.884,
|
| 618 |
+
0.732
|
| 619 |
+
],
|
| 620 |
+
"angle": 0,
|
| 621 |
+
"content": "We use WMT22 News and Flores (Costa-jussa et al., 2022) test sets for all language pairs we selected. To better test our method on Zh2En and En2Zh, we construct a Literary test set and a Tech test set. Each test set contains 500 sentences. We find that LLM's performance is much better on the Literary test sets while NMT models outperform on the Tech test sets. These test sets can better evaluate the effectiveness of different fusion strategies. We will open-source these self-constructed test sets to promote the development of NMT and LLM fusion technologies."
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "title",
|
| 625 |
+
"bbox": [
|
| 626 |
+
0.509,
|
| 627 |
+
0.747,
|
| 628 |
+
0.61,
|
| 629 |
+
0.763
|
| 630 |
+
],
|
| 631 |
+
"angle": 0,
|
| 632 |
+
"content": "4 Results"
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "text",
|
| 636 |
+
"bbox": [
|
| 637 |
+
0.508,
|
| 638 |
+
0.774,
|
| 639 |
+
0.885,
|
| 640 |
+
0.871
|
| 641 |
+
],
|
| 642 |
+
"angle": 0,
|
| 643 |
+
"content": "We validate the aforementioned methods on four \\(\\mathrm{Zh}\\leftrightarrow \\mathrm{En}\\) test sets, as shown in Table 2 and Table 3. wmt22-comet-da (Rei et al., 2022a) is used for reporting DA score (\\%). BLEURT20\\(^3\\) (Sellam et al., 2020) is used for reporting BLEURT score (\\%). \\(LLM_{p}\\) refers to the percentage of LLM usage. We"
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"type": "page_footnote",
|
| 647 |
+
"bbox": [
|
| 648 |
+
0.508,
|
| 649 |
+
0.882,
|
| 650 |
+
0.775,
|
| 651 |
+
0.907
|
| 652 |
+
],
|
| 653 |
+
"angle": 0,
|
| 654 |
+
"content": "2https://huggingface.co/Unbabel/wmt22-comet-da"
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"type": "page_footnote",
|
| 658 |
+
"bbox": [
|
| 659 |
+
0.534,
|
| 660 |
+
0.907,
|
| 661 |
+
0.851,
|
| 662 |
+
0.92
|
| 663 |
+
],
|
| 664 |
+
"angle": 0,
|
| 665 |
+
"content": "<sup>3</sup>https://github.com/google-research/bleurt"
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"type": "list",
|
| 669 |
+
"bbox": [
|
| 670 |
+
0.508,
|
| 671 |
+
0.882,
|
| 672 |
+
0.851,
|
| 673 |
+
0.92
|
| 674 |
+
],
|
| 675 |
+
"angle": 0,
|
| 676 |
+
"content": null
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"type": "page_number",
|
| 680 |
+
"bbox": [
|
| 681 |
+
0.481,
|
| 682 |
+
0.928,
|
| 683 |
+
0.521,
|
| 684 |
+
0.941
|
| 685 |
+
],
|
| 686 |
+
"angle": 0,
|
| 687 |
+
"content": "5142"
|
| 688 |
+
}
|
| 689 |
+
],
|
| 690 |
+
[
|
| 691 |
+
{
|
| 692 |
+
"type": "table",
|
| 693 |
+
"bbox": [
|
| 694 |
+
0.12,
|
| 695 |
+
0.082,
|
| 696 |
+
0.879,
|
| 697 |
+
0.166
|
| 698 |
+
],
|
| 699 |
+
"angle": 0,
|
| 700 |
+
"content": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Literary</td><td colspan=\"3\">Tech</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td></tr><tr><td>NMT</td><td>78.99</td><td>66.12</td><td>0.00%</td><td>87.08</td><td>76.10</td><td>0.00%</td><td>59.71</td><td>46.29</td><td>0.00%</td><td>83.38</td><td>71.97</td><td>0.00%</td><td>77.29</td><td>65.12</td><td>0.00%</td></tr><tr><td>LLM</td><td>80.13</td><td>67.26</td><td>100.00%</td><td>86.68</td><td>75.55</td><td>100.00%</td><td>66.69</td><td>53.86</td><td>100.00%</td><td>77.68</td><td>61.27</td><td>100.00%</td><td>77.80</td><td>64.49</td><td>100.00%</td></tr><tr><td>QET</td><td>79.13</td><td>66.25</td><td>20.32%</td><td>87.08</td><td>76.11</td><td>0.30%</td><td>63.88</td><td>50.62</td><td>62.00%</td><td>80.21</td><td>66.14</td><td>39.60%</td><td>77.58</td><td>64.78</td><td>30.55%</td></tr><tr><td>PPLT</td><td>79.24</td><td>66.14</td><td>38.19%</td><td>87.06</td><td>76.08</td><td>5.43%</td><td>63.49</td><td>50.73</td><td>51.40%</td><td>82.02</td><td>69.37</td><td>34.20%</td><td>77.95</td><td>65.58</td><td>32.31%</td></tr><tr><td>JDM</td><td>79.69</td><td>66.91</td><td>29.39%</td><td>87.12</td><td>76.12</td><td>1.28%</td><td>65.70</td><td>52.70</td><td>80.40%</td><td>82.71</td><td>70.88</td><td>7.00%</td><td>78.81</td><td>66.65</td><td>29.52%</td></tr><tr><td>oracle</td><td>82.25</td><td>69.86</td><td>56.91%</td><td>88.17</td><td>77.59</td><td>48.32%</td><td>68.41</td><td>54.54</td><td>72.80%</td><td>84.80</td><td>73.14</td><td>28.20%</td><td>80.91</td><td>68.78</td><td>51.56%</td></tr></table>"
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "table_caption",
|
| 704 |
+
"bbox": [
|
| 705 |
+
0.147,
|
| 706 |
+
0.175,
|
| 707 |
+
0.848,
|
| 708 |
+
0.191
|
| 709 |
+
],
|
| 710 |
+
"angle": 0,
|
| 711 |
+
"content": "Table 2: Integration performances of QET, PPLT, and JDM methods on four Chinese→English test sets."
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "table",
|
| 715 |
+
"bbox": [
|
| 716 |
+
0.12,
|
| 717 |
+
0.204,
|
| 718 |
+
0.879,
|
| 719 |
+
0.287
|
| 720 |
+
],
|
| 721 |
+
"angle": 0,
|
| 722 |
+
"content": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Literary</td><td colspan=\"3\">Tech</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td><td>DA</td><td>BLEURT</td><td>\\( LLM_p \\)</td></tr><tr><td>NMT</td><td>86.17</td><td>71.89</td><td>0.00%</td><td>87.88</td><td>73.29</td><td>0.00%</td><td>71.68</td><td>51.83</td><td>0.00%</td><td>86.30</td><td>73.57</td><td>0.00%</td><td>83.01</td><td>67.65</td><td>0.00%</td></tr><tr><td>LLM</td><td>85.17</td><td>68.20</td><td>100.00%</td><td>86.63</td><td>68.91</td><td>100.00%</td><td>76.30</td><td>56.12</td><td>100.00%</td><td>78.40</td><td>59.74</td><td>100.00%</td><td>81.63</td><td>63.24</td><td>100.00%</td></tr><tr><td>QET</td><td>86.08</td><td>71.52</td><td>8.15%</td><td>87.83</td><td>73.14</td><td>2.77%</td><td>72.73</td><td>52.76</td><td>24.31%</td><td>80.57</td><td>64.02</td><td>53.40%</td><td>81.80</td><td>65.36</td><td>22.16%</td></tr><tr><td>PPLT</td><td>85.80</td><td>70.76</td><td>28.47%</td><td>87.73</td><td>72.61</td><td>21.15%</td><td>72.85</td><td>53.25</td><td>25.37%</td><td>85.02</td><td>71.05</td><td>27.00%</td><td>82.85</td><td>66.92</td><td>25.50%</td></tr><tr><td>JDM</td><td>86.18</td><td>71.59</td><td>20.77%</td><td>87.76</td><td>72.92</td><td>9.19%</td><td>75.15</td><td>54.97</td><td>53.91%</td><td>85.39</td><td>71.97</td><td>9.60%</td><td>83.62</td><td>67.86</td><td>23.37%</td></tr><tr><td>oracle</td><td>88.00</td><td>73.16</td><td>38.05%</td><td>89.03</td><td>73.73</td><td>36.26%</td><td>78.16</td><td>58.42</td><td>63.85%</td><td>87.11</td><td>73.74</td><td>20.80%</td><td>85.58</td><td>69.76</td><td>39.74%</td></tr></table>"
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "table_caption",
|
| 726 |
+
"bbox": [
|
| 727 |
+
0.146,
|
| 728 |
+
0.297,
|
| 729 |
+
0.848,
|
| 730 |
+
0.312
|
| 731 |
+
],
|
| 732 |
+
"angle": 0,
|
| 733 |
+
"content": "Table 3: Integration performances of QET, PPLT, and JDM methods on four English→Chinese test sets."
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"type": "text",
|
| 737 |
+
"bbox": [
|
| 738 |
+
0.113,
|
| 739 |
+
0.334,
|
| 740 |
+
0.489,
|
| 741 |
+
0.462
|
| 742 |
+
],
|
| 743 |
+
"angle": 0,
|
| 744 |
+
"content": "also report the performance of oracle system that selects the best translation results based on wmt22-comet-da, representing the upper bound that the fusion method can achieve. In terms of the two base models, NMT and LLM, their performance gap is small on the open-source news and Flores test sets, but there are significant differences on the Literary and Tech test sets."
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"type": "text",
|
| 748 |
+
"bbox": [
|
| 749 |
+
0.113,
|
| 750 |
+
0.466,
|
| 751 |
+
0.489,
|
| 752 |
+
0.69
|
| 753 |
+
],
|
| 754 |
+
"angle": 0,
|
| 755 |
+
"content": "QET reduces LLM usage to \\(30.55\\%\\) on Zh2En test sets and \\(22.16\\%\\) on En2Zh test sets. Regarding translation quality, its performance remains almost the same as the optimal single system result on the Zh2En test sets. But we observe one point down of DA score and BLEURT on the En2Zh test sets when comparing with the optimal single system result (NMT), because QET performs not so well on the Tech test set. Our NMT model significantly outperforms LLM on the Tech test set but QET integrate some worse LLM translations to the final results. QET uses LLM when NMT translation quality is poor, but it does not evaluate whether LLM's translation is better or even worse."
|
| 756 |
+
},
|
| 757 |
+
{
|
| 758 |
+
"type": "text",
|
| 759 |
+
"bbox": [
|
| 760 |
+
0.113,
|
| 761 |
+
0.694,
|
| 762 |
+
0.489,
|
| 763 |
+
0.822
|
| 764 |
+
],
|
| 765 |
+
"angle": 0,
|
| 766 |
+
"content": "Interestingly, our PPLT method achieved better results than the QET method, while the number of LLM calls was only slightly higher. The result demonstrates that using merely source text features, i.e. text complexity, can get a desirable integration of NMT model and LLM. In addition, as LM is trained on NMT-similar data, PPLT significantly outperforms QET on the Tech test sets."
|
| 767 |
+
},
|
| 768 |
+
{
|
| 769 |
+
"type": "text",
|
| 770 |
+
"bbox": [
|
| 771 |
+
0.113,
|
| 772 |
+
0.826,
|
| 773 |
+
0.489,
|
| 774 |
+
0.922
|
| 775 |
+
],
|
| 776 |
+
"angle": 0,
|
| 777 |
+
"content": "Our JDM method achieves best performance on average. It seems that JDM method is able to dynamically control LLM usage as it varies greatly on different test sets. For instance, LLM outperforms NMT model on News and Literary test sets, LLM usage is thus high (even over \\(50\\%\\) on the Literary"
|
| 778 |
+
},
|
| 779 |
+
{
|
| 780 |
+
"type": "text",
|
| 781 |
+
"bbox": [
|
| 782 |
+
0.507,
|
| 783 |
+
0.334,
|
| 784 |
+
0.885,
|
| 785 |
+
0.509
|
| 786 |
+
],
|
| 787 |
+
"angle": 0,
|
| 788 |
+
"content": "test sets). On contrary, NMT model outperforms LLM on the Tech test sets, so LLM usage is greatly decreased (less than \\(10\\%\\)). Regarding domains where LLM and NMT model's performances are equal, JDM uses LLM as less as possible. On the Tech and Flores test sets where NMT model outperforms, we witness more LLM usage on the Tech test sets than on Flores, because the Tech test sets are more difficult to translate (6-8 points gap regarding DA score), and the decider tends to pass complex sentences to the LLM."
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "text",
|
| 792 |
+
"bbox": [
|
| 793 |
+
0.508,
|
| 794 |
+
0.511,
|
| 795 |
+
0.885,
|
| 796 |
+
0.624
|
| 797 |
+
],
|
| 798 |
+
"angle": 0,
|
| 799 |
+
"content": "Similar results prevail on De2En and Ja2En test sets (see Appendix H). When LLM and NMT each have their respective advantages, JDM can also achieve better integration results. In addition, we also discuss the generalization ability of the JDM method on different model combinations and unknown domains (see Appendix I)."
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"type": "title",
|
| 803 |
+
"bbox": [
|
| 804 |
+
0.509,
|
| 805 |
+
0.638,
|
| 806 |
+
0.642,
|
| 807 |
+
0.653
|
| 808 |
+
],
|
| 809 |
+
"angle": 0,
|
| 810 |
+
"content": "5 Conclusion"
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "text",
|
| 814 |
+
"bbox": [
|
| 815 |
+
0.507,
|
| 816 |
+
0.665,
|
| 817 |
+
0.885,
|
| 818 |
+
0.922
|
| 819 |
+
],
|
| 820 |
+
"angle": 0,
|
| 821 |
+
"content": "This paper proposes a fast approach to integrate LLM and NMT model in order to improve translation quality while ensuring fast speed and low cost. Compared with previous methods that use QE models, our decide determines when to use LLM based on source sentence features. We train an end-to-end decoder to get the desired performance, that is, use LLM as less as possible and use LLM for translation only when it outperforms NMT model. We test our approach on multiple test sets, including Zh2En, En2Zh, De2En, and Ja2En. The result shows that this straightforward approach achieves almost the best performance. In addition, our experiments show that LLM has a particular advantage over NMT when translating internet memes and informal expressions."
|
| 822 |
+
},
|
| 823 |
+
{
|
| 824 |
+
"type": "page_number",
|
| 825 |
+
"bbox": [
|
| 826 |
+
0.481,
|
| 827 |
+
0.929,
|
| 828 |
+
0.521,
|
| 829 |
+
0.941
|
| 830 |
+
],
|
| 831 |
+
"angle": 0,
|
| 832 |
+
"content": "5143"
|
| 833 |
+
}
|
| 834 |
+
],
|
| 835 |
+
[
|
| 836 |
+
{
|
| 837 |
+
"type": "title",
|
| 838 |
+
"bbox": [
|
| 839 |
+
0.115,
|
| 840 |
+
0.085,
|
| 841 |
+
0.221,
|
| 842 |
+
0.1
|
| 843 |
+
],
|
| 844 |
+
"angle": 0,
|
| 845 |
+
"content": "Limitations"
|
| 846 |
+
},
|
| 847 |
+
{
|
| 848 |
+
"type": "text",
|
| 849 |
+
"bbox": [
|
| 850 |
+
0.113,
|
| 851 |
+
0.11,
|
| 852 |
+
0.49,
|
| 853 |
+
0.254
|
| 854 |
+
],
|
| 855 |
+
"angle": 0,
|
| 856 |
+
"content": "We propose a simple and fast method to integrate NMT and LLM, and experiments verify the effectiveness of our method. However, we find that the final integration performance depends on the complementarity between NMT and LLM. That is to say, only when the NMT model and LLM has respective advantages can the integration lead to better translations. If the NMT performs equally as LLM, we see no improvement after integration."
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"type": "title",
|
| 860 |
+
"bbox": [
|
| 861 |
+
0.115,
|
| 862 |
+
0.281,
|
| 863 |
+
0.214,
|
| 864 |
+
0.295
|
| 865 |
+
],
|
| 866 |
+
"angle": 0,
|
| 867 |
+
"content": "References"
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"type": "ref_text",
|
| 871 |
+
"bbox": [
|
| 872 |
+
0.117,
|
| 873 |
+
0.304,
|
| 874 |
+
0.49,
|
| 875 |
+
0.344
|
| 876 |
+
],
|
| 877 |
+
"angle": 0,
|
| 878 |
+
"content": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2016. Neural machine translation by jointly learning to align and translate. *ICLR*."
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"type": "ref_text",
|
| 882 |
+
"bbox": [
|
| 883 |
+
0.117,
|
| 884 |
+
0.353,
|
| 885 |
+
0.489,
|
| 886 |
+
0.392
|
| 887 |
+
],
|
| 888 |
+
"angle": 0,
|
| 889 |
+
"content": "A Conneau. 2019. Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116."
|
| 890 |
+
},
|
| 891 |
+
{
|
| 892 |
+
"type": "ref_text",
|
| 893 |
+
"bbox": [
|
| 894 |
+
0.117,
|
| 895 |
+
0.402,
|
| 896 |
+
0.489,
|
| 897 |
+
0.481
|
| 898 |
+
],
|
| 899 |
+
"angle": 0,
|
| 900 |
+
"content": "Marta R Costa-jussà, 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."
|
| 901 |
+
},
|
| 902 |
+
{
|
| 903 |
+
"type": "ref_text",
|
| 904 |
+
"bbox": [
|
| 905 |
+
0.117,
|
| 906 |
+
0.491,
|
| 907 |
+
0.49,
|
| 908 |
+
0.582
|
| 909 |
+
],
|
| 910 |
+
"angle": 0,
|
| 911 |
+
"content": "António Farinhas, José de Souza, and Andre Martins. 2023. An empirical study of translation hypothesis ensembling with large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 11956-11970, Singapore. Association for Computational Linguistics."
|
| 912 |
+
},
|
| 913 |
+
{
|
| 914 |
+
"type": "ref_text",
|
| 915 |
+
"bbox": [
|
| 916 |
+
0.117,
|
| 917 |
+
0.592,
|
| 918 |
+
0.49,
|
| 919 |
+
0.658
|
| 920 |
+
],
|
| 921 |
+
"angle": 0,
|
| 922 |
+
"content": "Marina Fomicheva, Shuo Sun, Lisa Yankovskaya, Frédéric Blain, Francisco Guzmán, Mark Fishel, Nikolaos Aletras, Vishrav Chaudhary, and Lucia Specia. 2020. Unsupervised quality estimation for neural machine translation. TACL."
|
| 923 |
+
},
|
| 924 |
+
{
|
| 925 |
+
"type": "ref_text",
|
| 926 |
+
"bbox": [
|
| 927 |
+
0.117,
|
| 928 |
+
0.668,
|
| 929 |
+
0.49,
|
| 930 |
+
0.747
|
| 931 |
+
],
|
| 932 |
+
"angle": 0,
|
| 933 |
+
"content": "Amr Hendy, Mohamed Abdelrehim, Amr Sharaf, Vikas Raunak, Mohamed Gabr, Hitokazu Matsushita, Young Jin Kim, Mohamed Afify, and Hany Hassan Awadalla. 2023. How good are gpt models at machine translation? a comprehensive evaluation. arXiv preprint arXiv:2302.09210."
|
| 934 |
+
},
|
| 935 |
+
{
|
| 936 |
+
"type": "ref_text",
|
| 937 |
+
"bbox": [
|
| 938 |
+
0.117,
|
| 939 |
+
0.756,
|
| 940 |
+
0.489,
|
| 941 |
+
0.796
|
| 942 |
+
],
|
| 943 |
+
"angle": 0,
|
| 944 |
+
"content": "Yasmin Moslem, Rejwanul Haque, John D. Kelleher, and Andy Way. 2023. Adaptive machine translation with large language models. EAMT."
|
| 945 |
+
},
|
| 946 |
+
{
|
| 947 |
+
"type": "ref_text",
|
| 948 |
+
"bbox": [
|
| 949 |
+
0.117,
|
| 950 |
+
0.805,
|
| 951 |
+
0.489,
|
| 952 |
+
0.871
|
| 953 |
+
],
|
| 954 |
+
"angle": 0,
|
| 955 |
+
"content": "Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairseq: A fast, extensible toolkit for sequence modeling*. In *Proceedings of NAACL-HLT* 2019: Demonstrations."
|
| 956 |
+
},
|
| 957 |
+
{
|
| 958 |
+
"type": "ref_text",
|
| 959 |
+
"bbox": [
|
| 960 |
+
0.117,
|
| 961 |
+
0.881,
|
| 962 |
+
0.489,
|
| 963 |
+
0.921
|
| 964 |
+
],
|
| 965 |
+
"angle": 0,
|
| 966 |
+
"content": "Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John"
|
| 967 |
+
},
|
| 968 |
+
{
|
| 969 |
+
"type": "list",
|
| 970 |
+
"bbox": [
|
| 971 |
+
0.117,
|
| 972 |
+
0.304,
|
| 973 |
+
0.49,
|
| 974 |
+
0.921
|
| 975 |
+
],
|
| 976 |
+
"angle": 0,
|
| 977 |
+
"content": null
|
| 978 |
+
},
|
| 979 |
+
{
|
| 980 |
+
"type": "ref_text",
|
| 981 |
+
"bbox": [
|
| 982 |
+
0.529,
|
| 983 |
+
0.086,
|
| 984 |
+
0.885,
|
| 985 |
+
0.151
|
| 986 |
+
],
|
| 987 |
+
"angle": 0,
|
| 988 |
+
"content": "Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022. Training language models to follow instructions with human feedback. NIPS."
|
| 989 |
+
},
|
| 990 |
+
{
|
| 991 |
+
"type": "ref_text",
|
| 992 |
+
"bbox": [
|
| 993 |
+
0.512,
|
| 994 |
+
0.162,
|
| 995 |
+
0.885,
|
| 996 |
+
0.254
|
| 997 |
+
],
|
| 998 |
+
"angle": 0,
|
| 999 |
+
"content": "Ricardo Rei, José GC De Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André FT Martins. 2022a. Comet-22: Unbabel-ist 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585."
|
| 1000 |
+
},
|
| 1001 |
+
{
|
| 1002 |
+
"type": "ref_text",
|
| 1003 |
+
"bbox": [
|
| 1004 |
+
0.512,
|
| 1005 |
+
0.263,
|
| 1006 |
+
0.885,
|
| 1007 |
+
0.342
|
| 1008 |
+
],
|
| 1009 |
+
"angle": 0,
|
| 1010 |
+
"content": "Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020. COMET: A neural framework for MT evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685-2702, Online. Association for Computational Linguistics."
|
| 1011 |
+
},
|
| 1012 |
+
{
|
| 1013 |
+
"type": "ref_text",
|
| 1014 |
+
"bbox": [
|
| 1015 |
+
0.512,
|
| 1016 |
+
0.352,
|
| 1017 |
+
0.885,
|
| 1018 |
+
0.431
|
| 1019 |
+
],
|
| 1020 |
+
"angle": 0,
|
| 1021 |
+
"content": "Ricardo Rei, Marcos Treviso, Nuno M Guerreiro, Chrysoula Zerva, Ana C Farinha, Christine Maroti, José GC De Souza, Taisiya Glushkova, Duarte M Alves, Alon Lavie, et al. 2022b. Cometkiwi: Istunbabel 2022 submission for the quality estimation shared task. arXiv preprint arXiv:2209.06243."
|
| 1022 |
+
},
|
| 1023 |
+
{
|
| 1024 |
+
"type": "ref_text",
|
| 1025 |
+
"bbox": [
|
| 1026 |
+
0.512,
|
| 1027 |
+
0.44,
|
| 1028 |
+
0.885,
|
| 1029 |
+
0.533
|
| 1030 |
+
],
|
| 1031 |
+
"angle": 0,
|
| 1032 |
+
"content": "Ricardo Rei, Marcos Treviso, Nuno M. Guerreiro, Chrysoula Zerva, Ana C. Farinha, Christine Maroti, José G. C. de Souza, Taisiya Glushkova, Duarte M. Alves, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022c. Cometkiwi: Ist-unbabel 2022 submission for the quality estimation shared task. Preprint, arXiv:2209.06243."
|
| 1033 |
+
},
|
| 1034 |
+
{
|
| 1035 |
+
"type": "ref_text",
|
| 1036 |
+
"bbox": [
|
| 1037 |
+
0.512,
|
| 1038 |
+
0.542,
|
| 1039 |
+
0.885,
|
| 1040 |
+
0.582
|
| 1041 |
+
],
|
| 1042 |
+
"angle": 0,
|
| 1043 |
+
"content": "Thibault Sellam, Dipanjan Das, and Ankur P Parikh. 2020. Bleurt: Learning robust metrics for text generation. In Proceedings of ACL."
|
| 1044 |
+
},
|
| 1045 |
+
{
|
| 1046 |
+
"type": "ref_text",
|
| 1047 |
+
"bbox": [
|
| 1048 |
+
0.512,
|
| 1049 |
+
0.592,
|
| 1050 |
+
0.885,
|
| 1051 |
+
0.645
|
| 1052 |
+
],
|
| 1053 |
+
"angle": 0,
|
| 1054 |
+
"content": "Jungha Son and Boyoung Kim. 2023. Translation performance from the user's perspective of large language models and neural machine translation systems. Information, 14(10)."
|
| 1055 |
+
},
|
| 1056 |
+
{
|
| 1057 |
+
"type": "ref_text",
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
0.512,
|
| 1060 |
+
0.654,
|
| 1061 |
+
0.885,
|
| 1062 |
+
0.693
|
| 1063 |
+
],
|
| 1064 |
+
"angle": 0,
|
| 1065 |
+
"content": "Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. NIPS."
|
| 1066 |
+
},
|
| 1067 |
+
{
|
| 1068 |
+
"type": "ref_text",
|
| 1069 |
+
"bbox": [
|
| 1070 |
+
0.512,
|
| 1071 |
+
0.703,
|
| 1072 |
+
0.885,
|
| 1073 |
+
0.795
|
| 1074 |
+
],
|
| 1075 |
+
"angle": 0,
|
| 1076 |
+
"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. Preprint, arXiv:2302.13971."
|
| 1077 |
+
},
|
| 1078 |
+
{
|
| 1079 |
+
"type": "ref_text",
|
| 1080 |
+
"bbox": [
|
| 1081 |
+
0.512,
|
| 1082 |
+
0.805,
|
| 1083 |
+
0.885,
|
| 1084 |
+
0.858
|
| 1085 |
+
],
|
| 1086 |
+
"angle": 0,
|
| 1087 |
+
"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. NIPS."
|
| 1088 |
+
},
|
| 1089 |
+
{
|
| 1090 |
+
"type": "ref_text",
|
| 1091 |
+
"bbox": [
|
| 1092 |
+
0.512,
|
| 1093 |
+
0.868,
|
| 1094 |
+
0.885,
|
| 1095 |
+
0.92
|
| 1096 |
+
],
|
| 1097 |
+
"angle": 0,
|
| 1098 |
+
"content": "Qiang Wang, Bei Li, Tong Xiao, Jingbo Zhu, Changliang Li, Derek F. Wong, and Lidia S. Chao. 2019. Learning deep transformer models for machine translation. ACL."
|
| 1099 |
+
},
|
| 1100 |
+
{
|
| 1101 |
+
"type": "list",
|
| 1102 |
+
"bbox": [
|
| 1103 |
+
0.512,
|
| 1104 |
+
0.086,
|
| 1105 |
+
0.885,
|
| 1106 |
+
0.92
|
| 1107 |
+
],
|
| 1108 |
+
"angle": 0,
|
| 1109 |
+
"content": null
|
| 1110 |
+
},
|
| 1111 |
+
{
|
| 1112 |
+
"type": "page_number",
|
| 1113 |
+
"bbox": [
|
| 1114 |
+
0.481,
|
| 1115 |
+
0.929,
|
| 1116 |
+
0.521,
|
| 1117 |
+
0.941
|
| 1118 |
+
],
|
| 1119 |
+
"angle": 0,
|
| 1120 |
+
"content": "5144"
|
| 1121 |
+
}
|
| 1122 |
+
],
|
| 1123 |
+
[
|
| 1124 |
+
{
|
| 1125 |
+
"type": "text",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
0.116,
|
| 1128 |
+
0.086,
|
| 1129 |
+
0.49,
|
| 1130 |
+
0.14
|
| 1131 |
+
],
|
| 1132 |
+
"angle": 0,
|
| 1133 |
+
"content": "Xiaohui Wang, Ying Xiong, Xian Qian, Yang Wei, Lei Li, and Mingxuan Wang. 2021a. Lightseq2: Accelerated training for transformer-based models on gpus. arXiv preprint arXiv:2110.05722."
|
| 1134 |
+
},
|
| 1135 |
+
{
|
| 1136 |
+
"type": "text",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
0.116,
|
| 1139 |
+
0.149,
|
| 1140 |
+
0.49,
|
| 1141 |
+
0.256
|
| 1142 |
+
],
|
| 1143 |
+
"angle": 0,
|
| 1144 |
+
"content": "Xiaohui Wang, Ying Xiong, Yang Wei, Mingxuan Wang, and Lei Li. 2021b. LightSeq: A high performance inference library for transformers. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Industry Papers (NAACL-HLT), pages 113-120. Association for Computational Linguistics."
|
| 1145 |
+
},
|
| 1146 |
+
{
|
| 1147 |
+
"type": "text",
|
| 1148 |
+
"bbox": [
|
| 1149 |
+
0.116,
|
| 1150 |
+
0.265,
|
| 1151 |
+
0.49,
|
| 1152 |
+
0.357
|
| 1153 |
+
],
|
| 1154 |
+
"angle": 0,
|
| 1155 |
+
"content": "Daimeng Wei, Zhiqiang Rao, Zhanglin Wu, Shaojun Li, Yuanchang Luo, Yuhao Xie, Xiaoyu Chen, Hengchao Shang, Zongyao Li, Zhengzhe Yu, et al. 2022. Hw-tsc's submissions to the wmt 2022 general machine translation shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 403-410."
|
| 1156 |
+
},
|
| 1157 |
+
{
|
| 1158 |
+
"type": "text",
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
0.116,
|
| 1161 |
+
0.368,
|
| 1162 |
+
0.49,
|
| 1163 |
+
0.527
|
| 1164 |
+
],
|
| 1165 |
+
"angle": 0,
|
| 1166 |
+
"content": "Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online. Association for Computational Linguistics."
|
| 1167 |
+
},
|
| 1168 |
+
{
|
| 1169 |
+
"type": "text",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
0.115,
|
| 1172 |
+
0.536,
|
| 1173 |
+
0.49,
|
| 1174 |
+
0.59
|
| 1175 |
+
],
|
| 1176 |
+
"angle": 0,
|
| 1177 |
+
"content": "Jiali Zeng, Fandong Meng, Yongjing Yin, and Jie Zhou. 2024. Improving machine translation with large language models: A preliminary study with cooperative decoding. Findings in ACL."
|
| 1178 |
+
},
|
| 1179 |
+
{
|
| 1180 |
+
"type": "text",
|
| 1181 |
+
"bbox": [
|
| 1182 |
+
0.115,
|
| 1183 |
+
0.6,
|
| 1184 |
+
0.49,
|
| 1185 |
+
0.641
|
| 1186 |
+
],
|
| 1187 |
+
"angle": 0,
|
| 1188 |
+
"content": "Biao Zhang, Barry Haddow, and Alexandra Birch. 2023. Prompting large language model for machine translation: A case study. Preprint, arXiv:2301.07069."
|
| 1189 |
+
},
|
| 1190 |
+
{
|
| 1191 |
+
"type": "title",
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
0.115,
|
| 1194 |
+
0.654,
|
| 1195 |
+
0.453,
|
| 1196 |
+
0.671
|
| 1197 |
+
],
|
| 1198 |
+
"angle": 0,
|
| 1199 |
+
"content": "A Advantages of LLM in Translation"
|
| 1200 |
+
},
|
| 1201 |
+
{
|
| 1202 |
+
"type": "text",
|
| 1203 |
+
"bbox": [
|
| 1204 |
+
0.113,
|
| 1205 |
+
0.681,
|
| 1206 |
+
0.49,
|
| 1207 |
+
0.889
|
| 1208 |
+
],
|
| 1209 |
+
"angle": 0,
|
| 1210 |
+
"content": "Our experiments demonstrate that when source sentences are simple, NMT model and LLM have similar performances. When source sentences are hard to translate, LLM outperforms NMT model, and the gap becomes larger on extremely complex sentences. Our proposed decoder uses LLM for translation only when LLM performs better, thus ensuring minimum LLM usage. We manually collect complex sentences based on three criteria described in Appendix B. We send these complex sentences to our decoder to see how the decoder allocates these sentences, so we can see whether LLM is indeed better on complex content."
|
| 1211 |
+
},
|
| 1212 |
+
{
|
| 1213 |
+
"type": "text",
|
| 1214 |
+
"bbox": [
|
| 1215 |
+
0.114,
|
| 1216 |
+
0.89,
|
| 1217 |
+
0.49,
|
| 1218 |
+
0.921
|
| 1219 |
+
],
|
| 1220 |
+
"angle": 0,
|
| 1221 |
+
"content": "We select 50 test cases under each criterion and send them to the decider. As shown in Table 4,"
|
| 1222 |
+
},
|
| 1223 |
+
{
|
| 1224 |
+
"type": "table",
|
| 1225 |
+
"bbox": [
|
| 1226 |
+
0.525,
|
| 1227 |
+
0.082,
|
| 1228 |
+
0.871,
|
| 1229 |
+
0.152
|
| 1230 |
+
],
|
| 1231 |
+
"angle": 0,
|
| 1232 |
+
"content": "<table><tr><td>Type</td><td>\\( LLM_p \\)</td><td>Samples</td></tr><tr><td>category 1</td><td>68%</td><td>50</td></tr><tr><td>category 2</td><td>42%</td><td>50</td></tr><tr><td>category 3</td><td>5%</td><td>50</td></tr></table>"
|
| 1233 |
+
},
|
| 1234 |
+
{
|
| 1235 |
+
"type": "table_caption",
|
| 1236 |
+
"bbox": [
|
| 1237 |
+
0.509,
|
| 1238 |
+
0.161,
|
| 1239 |
+
0.882,
|
| 1240 |
+
0.19
|
| 1241 |
+
],
|
| 1242 |
+
"angle": 0,
|
| 1243 |
+
"content": "Table 4: The proportion of LLM being used under three different types of hard-to-translate categories."
|
| 1244 |
+
},
|
| 1245 |
+
{
|
| 1246 |
+
"type": "text",
|
| 1247 |
+
"bbox": [
|
| 1248 |
+
0.508,
|
| 1249 |
+
0.203,
|
| 1250 |
+
0.885,
|
| 1251 |
+
0.331
|
| 1252 |
+
],
|
| 1253 |
+
"angle": 0,
|
| 1254 |
+
"content": "LLM's performance varies under the three categories. For category 1 (informal expression or Internet memes), \\(68\\%\\) test cases can be well translated by LLM. For category 2 (specialized terms or expressions), only \\(42\\%\\) can be well translated. However, LLM also fails on category 3 (context is required for translation), as only \\(5\\%\\) cases can be well handled."
|
| 1255 |
+
},
|
| 1256 |
+
{
|
| 1257 |
+
"type": "title",
|
| 1258 |
+
"bbox": [
|
| 1259 |
+
0.509,
|
| 1260 |
+
0.345,
|
| 1261 |
+
0.719,
|
| 1262 |
+
0.363
|
| 1263 |
+
],
|
| 1264 |
+
"angle": 0,
|
| 1265 |
+
"content": "B Difficult Text Types"
|
| 1266 |
+
},
|
| 1267 |
+
{
|
| 1268 |
+
"type": "text",
|
| 1269 |
+
"bbox": [
|
| 1270 |
+
0.508,
|
| 1271 |
+
0.371,
|
| 1272 |
+
0.885,
|
| 1273 |
+
0.596
|
| 1274 |
+
],
|
| 1275 |
+
"angle": 0,
|
| 1276 |
+
"content": "For category 1, NMT models can hardly translate those informal expressions and memes correctly. However, a majority of those informal expressions and memes are new combinations of high-frequency words, which may not be rare in LLM training data. Moreover, as model scales, LLM can better grasp the true meaning of source sentences. So LLM can deliver relatively good translations. However, for category 2, specialized terms are low-frequency words in both NMT and LLM training data, so LLM also struggles to translate those terms correctly. For category 3, without context, LLM also fails if we use it as a sentence-level translation system."
|
| 1277 |
+
},
|
| 1278 |
+
{
|
| 1279 |
+
"type": "text",
|
| 1280 |
+
"bbox": [
|
| 1281 |
+
0.508,
|
| 1282 |
+
0.598,
|
| 1283 |
+
0.884,
|
| 1284 |
+
0.677
|
| 1285 |
+
],
|
| 1286 |
+
"angle": 0,
|
| 1287 |
+
"content": "We define hard-to-translate Chinese sentences from three dimensions: (1) Sentences containing informal expressions or Internet memes, of which the literal meaning is wrong or misleading. For example"
|
| 1288 |
+
},
|
| 1289 |
+
{
|
| 1290 |
+
"type": "text",
|
| 1291 |
+
"bbox": [
|
| 1292 |
+
0.509,
|
| 1293 |
+
0.677,
|
| 1294 |
+
0.882,
|
| 1295 |
+
0.709
|
| 1296 |
+
],
|
| 1297 |
+
"angle": 0,
|
| 1298 |
+
"content": "Example1: 浙大学术年会上学生唱主角研究成果让人脑洞大开"
|
| 1299 |
+
},
|
| 1300 |
+
{
|
| 1301 |
+
"type": "text",
|
| 1302 |
+
"bbox": [
|
| 1303 |
+
0.508,
|
| 1304 |
+
0.711,
|
| 1305 |
+
0.884,
|
| 1306 |
+
0.758
|
| 1307 |
+
],
|
| 1308 |
+
"angle": 0,
|
| 1309 |
+
"content": "Reference: Students played the leading role at the Annual Academic Conference of Zhejiang University with creative research achievements"
|
| 1310 |
+
},
|
| 1311 |
+
{
|
| 1312 |
+
"type": "text",
|
| 1313 |
+
"bbox": [
|
| 1314 |
+
0.508,
|
| 1315 |
+
0.759,
|
| 1316 |
+
0.882,
|
| 1317 |
+
0.807
|
| 1318 |
+
],
|
| 1319 |
+
"angle": 0,
|
| 1320 |
+
"content": "Explanation: \"脑洞大开\" literally means \"a big hole in the brain\" but its actual meaning is \"creative; inspiring\"."
|
| 1321 |
+
},
|
| 1322 |
+
{
|
| 1323 |
+
"type": "text",
|
| 1324 |
+
"bbox": [
|
| 1325 |
+
0.509,
|
| 1326 |
+
0.808,
|
| 1327 |
+
0.882,
|
| 1328 |
+
0.839
|
| 1329 |
+
],
|
| 1330 |
+
"angle": 0,
|
| 1331 |
+
"content": "Example 2: 或者说这电影根本没有主旨,就是一个面目可憎的缝合怪。"
|
| 1332 |
+
},
|
| 1333 |
+
{
|
| 1334 |
+
"type": "text",
|
| 1335 |
+
"bbox": [
|
| 1336 |
+
0.508,
|
| 1337 |
+
0.842,
|
| 1338 |
+
0.882,
|
| 1339 |
+
0.887
|
| 1340 |
+
],
|
| 1341 |
+
"angle": 0,
|
| 1342 |
+
"content": "Reference: Or we can say there is no purport in the film at all, and it is just a montage of incoherent elements."
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"type": "text",
|
| 1346 |
+
"bbox": [
|
| 1347 |
+
0.509,
|
| 1348 |
+
0.889,
|
| 1349 |
+
0.884,
|
| 1350 |
+
0.921
|
| 1351 |
+
],
|
| 1352 |
+
"angle": 0,
|
| 1353 |
+
"content": "Explanation: \"缝合怪\" literally means \"a monster of stitches\" but its actual meaning is \"an awk-"
|
| 1354 |
+
},
|
| 1355 |
+
{
|
| 1356 |
+
"type": "page_number",
|
| 1357 |
+
"bbox": [
|
| 1358 |
+
0.481,
|
| 1359 |
+
0.929,
|
| 1360 |
+
0.521,
|
| 1361 |
+
0.941
|
| 1362 |
+
],
|
| 1363 |
+
"angle": 0,
|
| 1364 |
+
"content": "5145"
|
| 1365 |
+
}
|
| 1366 |
+
],
|
| 1367 |
+
[
|
| 1368 |
+
{
|
| 1369 |
+
"type": "text",
|
| 1370 |
+
"bbox": [
|
| 1371 |
+
0.113,
|
| 1372 |
+
0.085,
|
| 1373 |
+
0.489,
|
| 1374 |
+
0.116
|
| 1375 |
+
],
|
| 1376 |
+
"angle": 0,
|
| 1377 |
+
"content": "ward combination of incoherent elements, scenes, or cultures\"."
|
| 1378 |
+
},
|
| 1379 |
+
{
|
| 1380 |
+
"type": "text",
|
| 1381 |
+
"bbox": [
|
| 1382 |
+
0.114,
|
| 1383 |
+
0.119,
|
| 1384 |
+
0.489,
|
| 1385 |
+
0.166
|
| 1386 |
+
],
|
| 1387 |
+
"angle": 0,
|
| 1388 |
+
"content": "(2) Sentences containing specialized terms or expressions, requiring domain knowledge to understand the true meaning."
|
| 1389 |
+
},
|
| 1390 |
+
{
|
| 1391 |
+
"type": "text",
|
| 1392 |
+
"bbox": [
|
| 1393 |
+
0.114,
|
| 1394 |
+
0.167,
|
| 1395 |
+
0.489,
|
| 1396 |
+
0.199
|
| 1397 |
+
],
|
| 1398 |
+
"angle": 0,
|
| 1399 |
+
"content": "Example1: 桃胶的作用:味苦,性平,归大肠,膀胱经。"
|
| 1400 |
+
},
|
| 1401 |
+
{
|
| 1402 |
+
"type": "text",
|
| 1403 |
+
"bbox": [
|
| 1404 |
+
0.114,
|
| 1405 |
+
0.202,
|
| 1406 |
+
0.489,
|
| 1407 |
+
0.248
|
| 1408 |
+
],
|
| 1409 |
+
"angle": 0,
|
| 1410 |
+
"content": "Reference: Functions of peach glue: bitter in taste, mild in nature, belong to the large intestine and bladder channels."
|
| 1411 |
+
},
|
| 1412 |
+
{
|
| 1413 |
+
"type": "text",
|
| 1414 |
+
"bbox": [
|
| 1415 |
+
0.113,
|
| 1416 |
+
0.251,
|
| 1417 |
+
0.489,
|
| 1418 |
+
0.315
|
| 1419 |
+
],
|
| 1420 |
+
"angle": 0,
|
| 1421 |
+
"content": "Explanation: \"性平\" is a term in traditional Chinese medicine. \"性\" means the intrinsic properties of herb, including cold, hot, warm, cool, or mild (平)."
|
| 1422 |
+
},
|
| 1423 |
+
{
|
| 1424 |
+
"type": "text",
|
| 1425 |
+
"bbox": [
|
| 1426 |
+
0.114,
|
| 1427 |
+
0.316,
|
| 1428 |
+
0.489,
|
| 1429 |
+
0.364
|
| 1430 |
+
],
|
| 1431 |
+
"angle": 0,
|
| 1432 |
+
"content": "Example 2: 她和团队所提出的“四抗二平衡”方案及带去的人工肝、微生态和干细胞三大技术,显著提高了重症救治率。"
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"type": "text",
|
| 1436 |
+
"bbox": [
|
| 1437 |
+
0.113,
|
| 1438 |
+
0.367,
|
| 1439 |
+
0.49,
|
| 1440 |
+
0.446
|
| 1441 |
+
],
|
| 1442 |
+
"angle": 0,
|
| 1443 |
+
"content": "Reference: The \"four-against and two-balance\" scheme proposed by her and her team and the three technologies including artificial liver, microecology and stem cells have significantly improved the treatment and cure rate of severe cases."
|
| 1444 |
+
},
|
| 1445 |
+
{
|
| 1446 |
+
"type": "text",
|
| 1447 |
+
"bbox": [
|
| 1448 |
+
0.113,
|
| 1449 |
+
0.448,
|
| 1450 |
+
0.489,
|
| 1451 |
+
0.529
|
| 1452 |
+
],
|
| 1453 |
+
"angle": 0,
|
| 1454 |
+
"content": "Explanation: \"四抗二平衡\" refers to \"fight against viruses, shock, hypoxemia and multi-organ failure, and secondary infections; maintain fluid and micro-ecology balance\". Without domain knowledge, this term can be easily misunderstood."
|
| 1455 |
+
},
|
| 1456 |
+
{
|
| 1457 |
+
"type": "text",
|
| 1458 |
+
"bbox": [
|
| 1459 |
+
0.114,
|
| 1460 |
+
0.531,
|
| 1461 |
+
0.488,
|
| 1462 |
+
0.561
|
| 1463 |
+
],
|
| 1464 |
+
"angle": 0,
|
| 1465 |
+
"content": "(3) Sentences that cannot be understood without context:"
|
| 1466 |
+
},
|
| 1467 |
+
{
|
| 1468 |
+
"type": "text",
|
| 1469 |
+
"bbox": [
|
| 1470 |
+
0.132,
|
| 1471 |
+
0.563,
|
| 1472 |
+
0.442,
|
| 1473 |
+
0.579
|
| 1474 |
+
],
|
| 1475 |
+
"angle": 0,
|
| 1476 |
+
"content": "Example1: 女孩街头“箭靶”募捐被告诫"
|
| 1477 |
+
},
|
| 1478 |
+
{
|
| 1479 |
+
"type": "text",
|
| 1480 |
+
"bbox": [
|
| 1481 |
+
0.114,
|
| 1482 |
+
0.582,
|
| 1483 |
+
0.488,
|
| 1484 |
+
0.613
|
| 1485 |
+
],
|
| 1486 |
+
"angle": 0,
|
| 1487 |
+
"content": "Reference: The girl who raised donations by acting as a target on the street was warned."
|
| 1488 |
+
},
|
| 1489 |
+
{
|
| 1490 |
+
"type": "text",
|
| 1491 |
+
"bbox": [
|
| 1492 |
+
0.113,
|
| 1493 |
+
0.615,
|
| 1494 |
+
0.489,
|
| 1495 |
+
0.696
|
| 1496 |
+
],
|
| 1497 |
+
"angle": 0,
|
| 1498 |
+
"content": "Explanation: \"箭靶\" literally means \"archery target. If it is translated literally, the sentence would be \"The girl made an archery target donation on the street and was warned.\", But according to context, it actually means \"the girl acted as a target\"."
|
| 1499 |
+
},
|
| 1500 |
+
{
|
| 1501 |
+
"type": "title",
|
| 1502 |
+
"bbox": [
|
| 1503 |
+
0.115,
|
| 1504 |
+
0.712,
|
| 1505 |
+
0.3,
|
| 1506 |
+
0.728
|
| 1507 |
+
],
|
| 1508 |
+
"angle": 0,
|
| 1509 |
+
"content": "C Literary Test Set"
|
| 1510 |
+
},
|
| 1511 |
+
{
|
| 1512 |
+
"type": "text",
|
| 1513 |
+
"bbox": [
|
| 1514 |
+
0.114,
|
| 1515 |
+
0.741,
|
| 1516 |
+
0.408,
|
| 1517 |
+
0.756
|
| 1518 |
+
],
|
| 1519 |
+
"angle": 0,
|
| 1520 |
+
"content": "The composition of the literary test set:"
|
| 1521 |
+
},
|
| 1522 |
+
{
|
| 1523 |
+
"type": "text",
|
| 1524 |
+
"bbox": [
|
| 1525 |
+
0.114,
|
| 1526 |
+
0.759,
|
| 1527 |
+
0.488,
|
| 1528 |
+
0.821
|
| 1529 |
+
],
|
| 1530 |
+
"angle": 0,
|
| 1531 |
+
"content": "(1) Sentences require transcreation: needs to recreate content in a new language and maintain its original meaning, such as slogan, and advertisements."
|
| 1532 |
+
},
|
| 1533 |
+
{
|
| 1534 |
+
"type": "text",
|
| 1535 |
+
"bbox": [
|
| 1536 |
+
0.114,
|
| 1537 |
+
0.824,
|
| 1538 |
+
0.488,
|
| 1539 |
+
0.87
|
| 1540 |
+
],
|
| 1541 |
+
"angle": 0,
|
| 1542 |
+
"content": "(2) Sentences contain memes and buzzwords: needs to understand local popular culture before translation."
|
| 1543 |
+
},
|
| 1544 |
+
{
|
| 1545 |
+
"type": "text",
|
| 1546 |
+
"bbox": [
|
| 1547 |
+
0.114,
|
| 1548 |
+
0.874,
|
| 1549 |
+
0.489,
|
| 1550 |
+
0.92
|
| 1551 |
+
],
|
| 1552 |
+
"angle": 0,
|
| 1553 |
+
"content": "(3) Sentences contain idioms: needs to understand local literature and social culture before translation."
|
| 1554 |
+
},
|
| 1555 |
+
{
|
| 1556 |
+
"type": "list",
|
| 1557 |
+
"bbox": [
|
| 1558 |
+
0.114,
|
| 1559 |
+
0.759,
|
| 1560 |
+
0.489,
|
| 1561 |
+
0.92
|
| 1562 |
+
],
|
| 1563 |
+
"angle": 0,
|
| 1564 |
+
"content": null
|
| 1565 |
+
},
|
| 1566 |
+
{
|
| 1567 |
+
"type": "text",
|
| 1568 |
+
"bbox": [
|
| 1569 |
+
0.509,
|
| 1570 |
+
0.085,
|
| 1571 |
+
0.885,
|
| 1572 |
+
0.132
|
| 1573 |
+
],
|
| 1574 |
+
"angle": 0,
|
| 1575 |
+
"content": "Test cases are crawled from English learning websites. References are double-checked by in-house translators."
|
| 1576 |
+
},
|
| 1577 |
+
{
|
| 1578 |
+
"type": "title",
|
| 1579 |
+
"bbox": [
|
| 1580 |
+
0.51,
|
| 1581 |
+
0.147,
|
| 1582 |
+
0.771,
|
| 1583 |
+
0.165
|
| 1584 |
+
],
|
| 1585 |
+
"angle": 0,
|
| 1586 |
+
"content": "D LLM Translation Prompt"
|
| 1587 |
+
},
|
| 1588 |
+
{
|
| 1589 |
+
"type": "text",
|
| 1590 |
+
"bbox": [
|
| 1591 |
+
0.508,
|
| 1592 |
+
0.175,
|
| 1593 |
+
0.884,
|
| 1594 |
+
0.271
|
| 1595 |
+
],
|
| 1596 |
+
"angle": 0,
|
| 1597 |
+
"content": "Figure 3 illustrates the translation prompt used for LLM. {source_language} and {target_language} denote the full names of the languages involved, for example, \"Translate this from Chinese to English.\" {sourcesentence} represents the content that actually needs to be translated."
|
| 1598 |
+
},
|
| 1599 |
+
{
|
| 1600 |
+
"type": "text",
|
| 1601 |
+
"bbox": [
|
| 1602 |
+
0.515,
|
| 1603 |
+
0.287,
|
| 1604 |
+
0.873,
|
| 1605 |
+
0.35
|
| 1606 |
+
],
|
| 1607 |
+
"angle": 0,
|
| 1608 |
+
"content": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\nTranslate this from {source-lang} to {target-lang}:<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\\n\\n{source-lang}:\\{sourceSentence\\}<eot_id|\n<|start_header_id|>assistant<|end_header_id|>\\n\\n{target-lang}:"
|
| 1609 |
+
},
|
| 1610 |
+
{
|
| 1611 |
+
"type": "image_caption",
|
| 1612 |
+
"bbox": [
|
| 1613 |
+
0.576,
|
| 1614 |
+
0.364,
|
| 1615 |
+
0.816,
|
| 1616 |
+
0.379
|
| 1617 |
+
],
|
| 1618 |
+
"angle": 0,
|
| 1619 |
+
"content": "Figure 3: LLM Translation Prompt"
|
| 1620 |
+
},
|
| 1621 |
+
{
|
| 1622 |
+
"type": "title",
|
| 1623 |
+
"bbox": [
|
| 1624 |
+
0.51,
|
| 1625 |
+
0.41,
|
| 1626 |
+
0.677,
|
| 1627 |
+
0.427
|
| 1628 |
+
],
|
| 1629 |
+
"angle": 0,
|
| 1630 |
+
"content": "E Training Setup"
|
| 1631 |
+
},
|
| 1632 |
+
{
|
| 1633 |
+
"type": "text",
|
| 1634 |
+
"bbox": [
|
| 1635 |
+
0.508,
|
| 1636 |
+
0.438,
|
| 1637 |
+
0.884,
|
| 1638 |
+
0.644
|
| 1639 |
+
],
|
| 1640 |
+
"angle": 0,
|
| 1641 |
+
"content": "NMT: We use the open-source fairseq (Ott et al., 2019) to train NMT models. The key parameters are as follows: each model is trained on 8 GPUs, with a batch size of 6144 and a parameter update frequency of 2. The learning rate is set to 5e-4. The warm-up steps are set to 4000, and the model is checked every 1000 steps. Additionally, we apply a dropout rate of 0.1 and use R-Drop with default hyperparameters. Training is stopped when the evaluation metrics on the development set do not improve for 10 consecutive checkpoints. The last 10 saved models are averaged and then used for translation."
|
| 1642 |
+
},
|
| 1643 |
+
{
|
| 1644 |
+
"type": "text",
|
| 1645 |
+
"bbox": [
|
| 1646 |
+
0.508,
|
| 1647 |
+
0.648,
|
| 1648 |
+
0.884,
|
| 1649 |
+
0.776
|
| 1650 |
+
],
|
| 1651 |
+
"angle": 0,
|
| 1652 |
+
"content": "LM: We also use the open-source fairseq (Ott et al., 2019) to train LM models. The model architecture follows transformer_lm_base, and the other main training parameters are consistent with those used for the NMT model. Training is stopped when the loss on the development set does not decrease after 10 consecutive checkpoints, and the last saved model is used to compute PPL."
|
| 1653 |
+
},
|
| 1654 |
+
{
|
| 1655 |
+
"type": "text",
|
| 1656 |
+
"bbox": [
|
| 1657 |
+
0.508,
|
| 1658 |
+
0.777,
|
| 1659 |
+
0.885,
|
| 1660 |
+
0.921
|
| 1661 |
+
],
|
| 1662 |
+
"angle": 0,
|
| 1663 |
+
"content": "JDM: We use the open-source transformers (Wolf et al., 2020) to train deciders for each language pair. The model architecture consists of a linear layer connected to a pretrained LM. The key training parameters are as follows: the learning rate for the pretrained LM is set to 1e-5, the learning rate for the linear layer is set to 1e-3, the batch size is 32, the gradient accumulation steps are 8, and the dropout rate is set to 0.3. We only train for"
|
| 1664 |
+
},
|
| 1665 |
+
{
|
| 1666 |
+
"type": "page_number",
|
| 1667 |
+
"bbox": [
|
| 1668 |
+
0.481,
|
| 1669 |
+
0.929,
|
| 1670 |
+
0.522,
|
| 1671 |
+
0.941
|
| 1672 |
+
],
|
| 1673 |
+
"angle": 0,
|
| 1674 |
+
"content": "5146"
|
| 1675 |
+
}
|
| 1676 |
+
],
|
| 1677 |
+
[
|
| 1678 |
+
{
|
| 1679 |
+
"type": "text",
|
| 1680 |
+
"bbox": [
|
| 1681 |
+
0.114,
|
| 1682 |
+
0.085,
|
| 1683 |
+
0.488,
|
| 1684 |
+
0.117
|
| 1685 |
+
],
|
| 1686 |
+
"angle": 0,
|
| 1687 |
+
"content": "one epoch, and the last saved model is used for decision-making during the inference phase."
|
| 1688 |
+
},
|
| 1689 |
+
{
|
| 1690 |
+
"type": "title",
|
| 1691 |
+
"bbox": [
|
| 1692 |
+
0.115,
|
| 1693 |
+
0.132,
|
| 1694 |
+
0.303,
|
| 1695 |
+
0.148
|
| 1696 |
+
],
|
| 1697 |
+
"angle": 0,
|
| 1698 |
+
"content": "F Threshold Values"
|
| 1699 |
+
},
|
| 1700 |
+
{
|
| 1701 |
+
"type": "text",
|
| 1702 |
+
"bbox": [
|
| 1703 |
+
0.117,
|
| 1704 |
+
0.161,
|
| 1705 |
+
0.49,
|
| 1706 |
+
0.499
|
| 1707 |
+
],
|
| 1708 |
+
"angle": 0,
|
| 1709 |
+
"content": "The threshold values of the various methods we used are shown in Table 5. In terms of threshold sensitivity, the sensitivity of the threshold parameters for QET, PPLT, and JDM to language pairs or domains is determined by the LM or COMET scoring models. The greater the differences in these scoring models across language pairs or domains, the more sensitive the threshold parameters become. Additionally, the selection of thresholds is flexible, with the primary purpose of setting thresholds being to control the invocation ratio of the LLM. For example, the thresholds for QET and PPLT can directly control the invocation volume of the LLM, while the thresholds for JDM \\((T_{1}\\& \\mathrm{JDM}T_{2})\\) are used to select training samples for the decision maker, indirectly controlling the invocation volume of the LLM. If dynamic adjustment of thresholds is desired, we can adjust the threshold using the statistical method mentioned in the Section 3.2, based on the maximum invocation ratio of the LLM that the current computational resources can support."
|
| 1710 |
+
},
|
| 1711 |
+
{
|
| 1712 |
+
"type": "table",
|
| 1713 |
+
"bbox": [
|
| 1714 |
+
0.146,
|
| 1715 |
+
0.511,
|
| 1716 |
+
0.457,
|
| 1717 |
+
0.577
|
| 1718 |
+
],
|
| 1719 |
+
"angle": 0,
|
| 1720 |
+
"content": "<table><tr><td></td><td>QET</td><td>PPLT</td><td>JDM T1</td><td>JDM T2</td></tr><tr><td>Zh2En</td><td>70</td><td>5.6</td><td>73</td><td>3.5</td></tr><tr><td>En2Zh</td><td>72</td><td>5.5</td><td>76</td><td>3.5</td></tr><tr><td>De2En</td><td>67</td><td>5.7</td><td>79</td><td>2.5</td></tr><tr><td>Ja2En</td><td>73</td><td>5.8</td><td>64</td><td>3.5</td></tr></table>"
|
| 1721 |
+
},
|
| 1722 |
+
{
|
| 1723 |
+
"type": "table_caption",
|
| 1724 |
+
"bbox": [
|
| 1725 |
+
0.118,
|
| 1726 |
+
0.587,
|
| 1727 |
+
0.482,
|
| 1728 |
+
0.601
|
| 1729 |
+
],
|
| 1730 |
+
"angle": 0,
|
| 1731 |
+
"content": "Table 5: The threshold values of the various methods."
|
| 1732 |
+
},
|
| 1733 |
+
{
|
| 1734 |
+
"type": "title",
|
| 1735 |
+
"bbox": [
|
| 1736 |
+
0.115,
|
| 1737 |
+
0.62,
|
| 1738 |
+
0.241,
|
| 1739 |
+
0.637
|
| 1740 |
+
],
|
| 1741 |
+
"angle": 0,
|
| 1742 |
+
"content": "G Efficiency"
|
| 1743 |
+
},
|
| 1744 |
+
{
|
| 1745 |
+
"type": "text",
|
| 1746 |
+
"bbox": [
|
| 1747 |
+
0.117,
|
| 1748 |
+
0.648,
|
| 1749 |
+
0.49,
|
| 1750 |
+
0.92
|
| 1751 |
+
],
|
| 1752 |
+
"angle": 0,
|
| 1753 |
+
"content": "During the inference phase, the model parameters and inference times for different methods are shown in Table 6. In terms of model parameters, the NMT model and LLM models relied upon by different methods \\((\\mathrm{P}(\\mathrm{NMT}) + (\\mathrm{P}(\\mathrm{LLM}))\\) are the same, with the main difference lying in the selection model. The selection models used in our proposed PPLT and JDM methods (56M/125M) are smaller than those used in the traditional QET method (355M). In terms of overall inference time, our proposed PPLT and JDM methods not only have shorter inference times for the selection model \\((\\mathrm{T}(\\mathrm{PPLT}) < \\mathrm{T}(\\mathrm{JDM}) < \\mathrm{T}(\\mathrm{QET}))\\) but also selectively invoke the NMT or LLM model for translation as needed. In contrast, the traditional QET method may require invoking the NMT model first and then the LLM model for translation."
|
| 1754 |
+
},
|
| 1755 |
+
{
|
| 1756 |
+
"type": "table",
|
| 1757 |
+
"bbox": [
|
| 1758 |
+
0.525,
|
| 1759 |
+
0.082,
|
| 1760 |
+
0.868,
|
| 1761 |
+
0.125
|
| 1762 |
+
],
|
| 1763 |
+
"angle": 0,
|
| 1764 |
+
"content": "<table><tr><td></td><td>Parameter</td><td>Inference time</td></tr><tr><td>PPLT</td><td>56M + P(NMT) + P(LLM)</td><td>T(PPLT) + (T(NMT) or T(LLM))</td></tr><tr><td>JDM</td><td>125M + P(NMT) + P(LLM)</td><td>T(JDM) + (T(NMT) or T(LLM))</td></tr><tr><td>QET</td><td>355M + P(NMT) + P(LLM)</td><td>T(QET) + (T(NMT) and T(LLM))</td></tr></table>"
|
| 1765 |
+
},
|
| 1766 |
+
{
|
| 1767 |
+
"type": "table_caption",
|
| 1768 |
+
"bbox": [
|
| 1769 |
+
0.509,
|
| 1770 |
+
0.135,
|
| 1771 |
+
0.882,
|
| 1772 |
+
0.163
|
| 1773 |
+
],
|
| 1774 |
+
"angle": 0,
|
| 1775 |
+
"content": "Table 6: The model parameters and inference time of the various methods."
|
| 1776 |
+
},
|
| 1777 |
+
{
|
| 1778 |
+
"type": "title",
|
| 1779 |
+
"bbox": [
|
| 1780 |
+
0.51,
|
| 1781 |
+
0.188,
|
| 1782 |
+
0.776,
|
| 1783 |
+
0.205
|
| 1784 |
+
],
|
| 1785 |
+
"angle": 0,
|
| 1786 |
+
"content": "H De2En and Ja2En Results"
|
| 1787 |
+
},
|
| 1788 |
+
{
|
| 1789 |
+
"type": "text",
|
| 1790 |
+
"bbox": [
|
| 1791 |
+
0.508,
|
| 1792 |
+
0.214,
|
| 1793 |
+
0.885,
|
| 1794 |
+
0.423
|
| 1795 |
+
],
|
| 1796 |
+
"angle": 0,
|
| 1797 |
+
"content": "As shown in Tables 7 and 8, we also observe that the JDM method achieves better fusion results than the QET method on Ja2En and De2En. To better highlight the characteristics of these two methods, we include the Subtitle and Travel test sets. These two test sets are chosen because there is a noticeable gap in the translation results between NMT and LLM models, which helps to better evaluate the effects of system fusion. The Subtitle and Travel test sets are collected from open-source data such as OpenSubtitles, JESC, TED, QED, and czechtourism, and then constructed by language experts, with each test set containing 500 sentences."
|
| 1798 |
+
},
|
| 1799 |
+
{
|
| 1800 |
+
"type": "title",
|
| 1801 |
+
"bbox": [
|
| 1802 |
+
0.51,
|
| 1803 |
+
0.435,
|
| 1804 |
+
0.671,
|
| 1805 |
+
0.451
|
| 1806 |
+
],
|
| 1807 |
+
"angle": 0,
|
| 1808 |
+
"content": "I Generalization"
|
| 1809 |
+
},
|
| 1810 |
+
{
|
| 1811 |
+
"type": "text",
|
| 1812 |
+
"bbox": [
|
| 1813 |
+
0.508,
|
| 1814 |
+
0.46,
|
| 1815 |
+
0.884,
|
| 1816 |
+
0.78
|
| 1817 |
+
],
|
| 1818 |
+
"angle": 0,
|
| 1819 |
+
"content": "Different NMT and LLM combinations: When there are significant changes in the NMT and LLM models, the selection model of the JDM method may require retraining. However, if only fine-tuning is applied to both while maintaining their complementary characteristics, is retraining still necessary? To address this, we investigate whether the selection model of the JDM method can be directly applied to fine-tuned NMT and LLM models. We utilize the wmt22-cometkiwi-da model to select 40M high-quality Zh2En data for fine-tuning the NMT and LLM models. We then compare the fusion performance of the JDM method and the QET method on Zh2En. As shown in Table 9, even without retraining the selection model, the JDM method still achieves good fusion results on the updated NMT and LLM models, outperforming the QET method. This indicates that the JDM method possesses some generalization capability across different NMT and LLM combinations."
|
| 1820 |
+
},
|
| 1821 |
+
{
|
| 1822 |
+
"type": "text",
|
| 1823 |
+
"bbox": [
|
| 1824 |
+
0.508,
|
| 1825 |
+
0.782,
|
| 1826 |
+
0.884,
|
| 1827 |
+
0.911
|
| 1828 |
+
],
|
| 1829 |
+
"angle": 0,
|
| 1830 |
+
"content": "Unknown domains: Since the training data for the selection models of the PPLT and JDM methods come from general domains, while the test data includes multiple specialized domains, the PPLT and JDM methods can achieve enhanced fusion effects in these domains. This indicates that the PPLT and JDM methods have a certain level of generalization capability for unknown domains."
|
| 1831 |
+
},
|
| 1832 |
+
{
|
| 1833 |
+
"type": "page_number",
|
| 1834 |
+
"bbox": [
|
| 1835 |
+
0.481,
|
| 1836 |
+
0.928,
|
| 1837 |
+
0.521,
|
| 1838 |
+
0.941
|
| 1839 |
+
],
|
| 1840 |
+
"angle": 0,
|
| 1841 |
+
"content": "5147"
|
| 1842 |
+
}
|
| 1843 |
+
],
|
| 1844 |
+
[
|
| 1845 |
+
{
|
| 1846 |
+
"type": "table",
|
| 1847 |
+
"bbox": [
|
| 1848 |
+
0.122,
|
| 1849 |
+
0.177,
|
| 1850 |
+
0.875,
|
| 1851 |
+
0.24
|
| 1852 |
+
],
|
| 1853 |
+
"angle": 0,
|
| 1854 |
+
"content": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Subtitle</td><td colspan=\"3\">Travel</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td></tr><tr><td>NMT</td><td>79.15</td><td>64.29</td><td>0.00%</td><td>87.76</td><td>75.51</td><td>0.00%</td><td>84.92</td><td>74.31</td><td>0.00%</td><td>79.00</td><td>65.16</td><td>0.00%</td><td>82.71</td><td>69.82</td><td>0.00%</td></tr><tr><td>LLM</td><td>80.76</td><td>66.52</td><td>100.00%</td><td>87.43</td><td>74.59</td><td>100.00%</td><td>82.41</td><td>70.25</td><td>100.00%</td><td>83.80</td><td>69.37</td><td>100.00%</td><td>83.60</td><td>70.18</td><td>100.00%</td></tr><tr><td>QET</td><td>79.17</td><td>64.39</td><td>15.49%</td><td>87.77</td><td>75.52</td><td>0.30%</td><td>83.21</td><td>72.13</td><td>46%</td><td>80.74</td><td>66.47</td><td>26%</td><td>82.72</td><td>69.63</td><td>21.95%</td></tr><tr><td>JDM</td><td>80.28</td><td>65.80</td><td>39.39%</td><td>87.81</td><td>75.53</td><td>2.27%</td><td>84.02</td><td>73.64</td><td>33%</td><td>83.13</td><td>68.62</td><td>15%</td><td>83.81</td><td>70.90</td><td>22.42%</td></tr></table>"
|
| 1855 |
+
},
|
| 1856 |
+
{
|
| 1857 |
+
"type": "table_caption",
|
| 1858 |
+
"bbox": [
|
| 1859 |
+
0.168,
|
| 1860 |
+
0.25,
|
| 1861 |
+
0.828,
|
| 1862 |
+
0.265
|
| 1863 |
+
],
|
| 1864 |
+
"angle": 0,
|
| 1865 |
+
"content": "Table 7: Integration performances of QET and JDM methods on four Japanese→English test sets."
|
| 1866 |
+
},
|
| 1867 |
+
{
|
| 1868 |
+
"type": "table",
|
| 1869 |
+
"bbox": [
|
| 1870 |
+
0.122,
|
| 1871 |
+
0.462,
|
| 1872 |
+
0.875,
|
| 1873 |
+
0.526
|
| 1874 |
+
],
|
| 1875 |
+
"angle": 0,
|
| 1876 |
+
"content": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Subtitle</td><td colspan=\"3\">Travel</td><td colspan=\"3\">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td></tr><tr><td>NMT</td><td>83.53</td><td>71.84</td><td>0.00%</td><td>89.20</td><td>79.83</td><td>0.00%</td><td>87.12</td><td>77.87</td><td>0.00%</td><td>87.72</td><td>77.09</td><td>0.00%</td><td>86.89</td><td>76.66</td><td>0.00%</td></tr><tr><td>LLM</td><td>84.72</td><td>73.27</td><td>100.00%</td><td>89.19</td><td>79.59</td><td>100.00%</td><td>86.28</td><td>76.05</td><td>100.00%</td><td>90.87</td><td>82.10</td><td>100.00%</td><td>87.77</td><td>77.75</td><td>100.00%</td></tr><tr><td>QET</td><td>83.64</td><td>71.97</td><td>8.67%</td><td>89.20</td><td>79.83</td><td>1.58%</td><td>86.55</td><td>76.82</td><td>43.00%</td><td>88.61</td><td>78.63</td><td>35.00%</td><td>87.00</td><td>76.81</td><td>22.06%</td></tr><tr><td>JDM</td><td>84.31</td><td>72.74</td><td>36.39%</td><td>89.29</td><td>79.93</td><td>10.87%</td><td>86.90</td><td>77.24</td><td>29.00%</td><td>90.24</td><td>80.93</td><td>17.00%</td><td>87.69</td><td>77.71</td><td>23.32%</td></tr></table>"
|
| 1877 |
+
},
|
| 1878 |
+
{
|
| 1879 |
+
"type": "table_caption",
|
| 1880 |
+
"bbox": [
|
| 1881 |
+
0.17,
|
| 1882 |
+
0.536,
|
| 1883 |
+
0.825,
|
| 1884 |
+
0.551
|
| 1885 |
+
],
|
| 1886 |
+
"angle": 0,
|
| 1887 |
+
"content": "Table 8: Integration performances of QET and JDM methods on four German→English test sets."
|
| 1888 |
+
},
|
| 1889 |
+
{
|
| 1890 |
+
"type": "table",
|
| 1891 |
+
"bbox": [
|
| 1892 |
+
0.133,
|
| 1893 |
+
0.748,
|
| 1894 |
+
0.868,
|
| 1895 |
+
0.798
|
| 1896 |
+
],
|
| 1897 |
+
"angle": 0,
|
| 1898 |
+
"content": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">News</td><td colspan=\"3\">Flores</td><td colspan=\"3\">Literary</td><td colspan=\"3\">Tech</td><td colspan=\"2\">Avg</td><td></td></tr><tr><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td><td>DA</td><td>BLEURT</td><td>\\(LLM_p\\)</td></tr><tr><td>NMT-FT</td><td>79.76</td><td>66.98</td><td>0.00%</td><td>88.24</td><td>77.64</td><td>0.00%</td><td>60.52</td><td>47.13</td><td>0.00%</td><td>83.82</td><td>72.36</td><td>0.00%</td><td>78.09</td><td>66.03</td><td>0.00%</td></tr><tr><td>LLM-SFT</td><td>81.45</td><td>68.41</td><td>100.00%</td><td>86.96</td><td>75.97</td><td>100.00%</td><td>66.73</td><td>53.89</td><td>100.00%</td><td>78.20</td><td></td><td>100.00%</td><td>78.34</td><td>64.99</td><td>100.00%</td></tr><tr><td>QET</td><td>80.01</td><td>67.13</td><td>17.65%</td><td>88.24</td><td>77.63</td><td>0.30%</td><td>63.89</td><td>50.63</td><td>55.40%</td><td>80.75</td><td>66.63</td><td>45.00%</td><td>78.22</td><td>65.51</td><td>29.59%</td></tr><tr><td>JDM</td><td>80.73</td><td>67.85</td><td>29.65%</td><td>88.24</td><td>77.65</td><td>0.79%</td><td>66.25</td><td>53.46</td><td>80.20%</td><td>82.64</td><td>70.05</td><td>10.40%</td><td>79.47</td><td>67.25</td><td>30.26%</td></tr></table>"
|
| 1899 |
+
},
|
| 1900 |
+
{
|
| 1901 |
+
"type": "table_caption",
|
| 1902 |
+
"bbox": [
|
| 1903 |
+
0.153,
|
| 1904 |
+
0.809,
|
| 1905 |
+
0.841,
|
| 1906 |
+
0.823
|
| 1907 |
+
],
|
| 1908 |
+
"angle": 0,
|
| 1909 |
+
"content": "Table 9: New integration performances of QET and JDM methods on four Chinese→English test sets."
|
| 1910 |
+
},
|
| 1911 |
+
{
|
| 1912 |
+
"type": "page_number",
|
| 1913 |
+
"bbox": [
|
| 1914 |
+
0.481,
|
| 1915 |
+
0.929,
|
| 1916 |
+
0.521,
|
| 1917 |
+
0.941
|
| 1918 |
+
],
|
| 1919 |
+
"angle": 0,
|
| 1920 |
+
"content": "5148"
|
| 1921 |
+
}
|
| 1922 |
+
]
|
| 1923 |
+
]
|
2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/614ae70a-82a1-4a03-8912-d0ba0d79c1e5_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41357a098a30ba0000b3913239aedf7dffc5652f1d9e86ca391eaddb074dca1b
|
| 3 |
+
size 637450
|
2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/full.md
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Combining the Best of Both Worlds: A Method for Hybrid NMT and LLM Translation
|
| 2 |
+
|
| 3 |
+
Zhanglin Wu*, Daimeng Wei*, Xiaoyu Chen, Hengchao Shang, Jiaxin Guo, Zongyao Li, Yuanchang Luo, Jinlong Yang, Zhiqiang Rao, Hao Yang Huawei Translation Service Center, Beijing, China
|
| 4 |
+
|
| 5 |
+
{wuzhanglin2,weidaimeng,chenxiaoyu35,shanghengchao,guojiaxin1, lizongyao,luoyuanchang1,yangjinlong7,raozhiqiang, yanghao30}@huawei.com
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Large language model (LLM) shows promising performances in a variety of downstream tasks, such as machine translation (MT). However, using LLMs for translation suffers from high computational costs and significant latency. Based on our evaluation, in most cases, translations using LLMs are comparable to that generated by neural machine translation (NMT) systems. Only in particular scenarios, LLM and NMT models show respective advantages. As a result, integrating NMT and LLM for translation and using LLM only when necessary seems to be a sound solution. A scheduling policy that optimizes translation results while ensuring fast speed and as little LLM usage as possible is thereby required. We compare several scheduling policies and propose a novel and straightforward decider that leverages source sentence features. We conduct extensive experiments on multilingual test sets and the result shows that we can achieve optimal translation performance with minimal LLM usage, demonstrating effectiveness of our decider.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Neural models (Sutskever et al., 2014; Bahdanau et al., 2016; Vaswani et al., 2017) greatly boost machine translation (MT) performance while various inference speed-up strategies (Wang et al., 2019, 2021b,a) ensure fast translation. As model scales, large language model (LLM) (Ouyang et al., 2022; Touvron et al., 2023) now is able to deliver fairly good translation results(Son and Kim, 2023; Zhang et al., 2023; Moslem et al., 2023), which are even comparable to translations done by commercial translation systems. Hendy et al. (2023) find that LLM performs particularly well when translating content in particular domains. As shown in Figure 1, we find that neural machine translation (NMT) model and LLM have own merits and drawbacks.
|
| 14 |
+
|
| 15 |
+
今天的天气真好
|
| 16 |
+
|
| 17 |
+
NMT: It's a beautiful day today
|
| 18 |
+
|
| 19 |
+
LLM: Today's weather is really nice
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+
我觉得他说话前言不搭后语
|
| 26 |
+
|
| 27 |
+
NMT: I feel like his words don't match his words
|
| 28 |
+
|
| 29 |
+
LLM: I think what he says doesn't follow logically.
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
|
| 35 |
+
2010年7月19日因不良反应停用聚甲酚磺醛
|
| 36 |
+
|
| 37 |
+
NMT: Policresulen was discontinued on 19 July 2010 due to adverse reactions.
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
|
| 41 |
+
LLM: On July 19, 2010, polyphenol sulfone aldehyde was discontinued due to adverse reactions.
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 1: A comparison of translations done by an NMT model and LLM. They translate simple content equally well but their performances vary when translating complex sentences.
|
| 45 |
+
|
| 46 |
+
Methods to harness complementary strengths of NMT and LLM models, with the aim of achieving better translation results through their integration, are worthy of research. To integrate large and small models, Zeng et al. (2024) propose Cooperative Decoding while Farinhas et al. (2023) put forward an approach based on Minimum Bayes Risk (MBR). While these methods are effective in improving translation quality, their reliance on LLMs for every piece of translation incurs substantial computational expenses.
|
| 47 |
+
|
| 48 |
+
As shown in Table 1, we annotate source sentences into two categories: simple and hard (to translate). The majority of sentences are marked as simple, and only a small portion of sentences is believed to be challenging for translation systems. LLM performs better when translating complex sentences. Hendy et al. (2023) perform translation using an NMT model and evaluate the translation quality using a quality estimation (QE) model (Rei et al., 2020; Fomicheva et al., 2020; Rei et al., 2022c). If the QE model give a low score to a translation result, they then use an LLM to translate
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2: Two approaches to integrate NMT model and LLM. The left approach is QET proposed by Hendy et al. (2023) and the right part is our proposed PPLT and JDM, which quickly determines when to use LLM based on source sentence.
|
| 52 |
+
|
| 53 |
+
the sentence again. Their approach leverages LLM advantages while reduce unnecessary LLM usage. However, their approach heavily relies on the performance of the QE model, and ignores scenarios when LLM deliver even worse results. As a result, their approach may not guarantee best translation.
|
| 54 |
+
|
| 55 |
+
Without using any QE model, our approach decides when to use LLM only based on source sentence features. This idea is challenging and we try a multiple of indicators. In the end we find that using only two indicators—sentence complexity and translation domain (whether LLM is good at or not), we can make a sound decision. In this way, we can directly decide whether to use NMT model or LLM as long as the source sentence is input, and use LLM as less as possible. We test our approach on multilingual test sets (Zh2En, En2Zh, De2En, and Ja2En) and obtain best in results for MT.
|
| 56 |
+
|
| 57 |
+
# 2 Method
|
| 58 |
+
|
| 59 |
+
As shown in Figure 2, compared to the QE Threshold (QET) method proposed by Hendy et al. (2023), our approach is more straightforward, relies on fewer model parameters, and has shorter inference time (see Appendix F). The former requires using the wmt22-cometkiwi-da $^{1}$ (Rei et al., 2022b) model to assess the quality of NMT translation results to decide whether to continue calling the LLM for translation. In contrast, our method directly decides whether to call the LLM or NMT based on the input source text, which is clearly a challenging task. Moreover, our method needs to meet two requirements: 1) minimize the use of LLMs as much
|
| 60 |
+
|
| 61 |
+
<table><tr><td></td><td>DA Simple(95%)</td><td>DA Hard(5%)</td></tr><tr><td>NMT</td><td>80.21</td><td>73.22</td></tr><tr><td>LLM</td><td>81.62</td><td>77.02</td></tr><tr><td>Diff</td><td>1.41</td><td>3.80</td></tr></table>
|
| 62 |
+
|
| 63 |
+
Table 1: Comparison of NMT and LLM performances on simple and complex sentences in the WMT22 Zh2En news test set. "Diff" refers to the difference in DA scores between LLM and NMT. $95\%$ of the sentences are considered easy to translate. We detail our classification criteria in Appendix B. We conduct experiment using an NMT model trained from scratch and Llama-3.1-8B-Instruct (Touvron et al., 2023). wmt22-comet-da (Rei et al., 2022a) is used for reporting DA score.
|
| 64 |
+
|
| 65 |
+
as possible, and 2) if LLM results are used, they should outperform the NMT results. It is evident that using QET makes it difficult to fully satisfy the second condition, which impacts the fusion effect.
|
| 66 |
+
|
| 67 |
+
As shown in Table 1, LLM delivers better translation when source sentence is hard to translate. For relatively simple sentences, LLM does not have a particular advantage, so we try not to use LLM in this scenario. In addition, we need to verify whether it is possible to determine using which model to translate only based on source sentence. As a result, we design two approaches to meet the two requirements:
|
| 68 |
+
|
| 69 |
+
PPL Threshold (PPLT): We use monolingual data (previously used for training NMT models) to train a small language model (LM). We directly use LLM for translation when the source sentence perplexity (PPL) is greater than a threshold we set. We employ the simple method to test whether LLM can translate complex sentences well.
|
| 70 |
+
|
| 71 |
+
Joint Decision-making (JDM): Given a source sentence (src), we use NMT model and LLM to obtain two translation results $(tgt_{NMT}$ and $tgt_{LLM})$ . By comparing the two translations against reference (tgt), we obtain quality measurements of the two results $(Q_{NMT}$ and $Q_{LLM})$ . We hope to use LLM for translation only when (1) the translation delivered by NMT model is bad and (2) the translation done by LLM is better. So we use LLM for translation when:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
Q _ {N M T} < T _ {1} \text {a n d} Q _ {L L M} - Q _ {N M T} > T _ {2} \tag {1}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Due to the inability to obtain references in practical applications, we cannot directly use the above conditions to control the LLM's invocation. Therefore, based on these conditions, we select positive and negative samples from bilingual data and train a binary classification model to serve as a decider,
|
| 78 |
+
|
| 79 |
+
determining when to use the LLM for translation during the inference process.
|
| 80 |
+
|
| 81 |
+
# 3 Experiments
|
| 82 |
+
|
| 83 |
+
# 3.1 NMT & LLM
|
| 84 |
+
|
| 85 |
+
We directly use Llama-3.1-8B-Instruct as our LLM model, and its translation prompt is provided in Appendix D. Due to its strong translation performance, we do not perform any further supervised fine-tuning on it. We focus on training an NMT model from scratch for each language pair that can achieve comparable translation performance. Our NMT model adopts the Deep Transformer-Big architecture commonly used by Wei et al. (2022), and the training data comes from internal technology (Tech) bilingual data and various open-source bilingual datasets archived in OPUS, such as CCMatrix, Paracrawl, NLLB, UNPC and OpenSubtitles. For each translation language pair, we randomly sample 100 million bilingual data, which are then deduplicated with the test set before being used for training. The training setup of NMT models is provided in Appendix E.
|
| 86 |
+
|
| 87 |
+
# 3.2 Threshold
|
| 88 |
+
|
| 89 |
+
Among the methods mentioned above, all require setting thresholds in advance to limit the proportion of LLM calls. For each language pair, we use statistical methods to determine the threshold for each method by controlling the proportion of LLM calls to approximately $25\%$ , and then compare the performance differences between different methods. The specific threshold values for each method are provided in Appendix F.
|
| 90 |
+
|
| 91 |
+
For the QET method, it requires setting a QE score threshold to control the invocation of the LLM. The LLM is only called when the QE score of the NMT translation is below this threshold. We select one million bilingual data, obtain the NMT translation corresponding to the source text, and calculate their QE scores using wmt22-cometkiwida (Rei et al., 2022b). The QE scores are then sorted in ascending order, and the 250,000th QE score in the sorted list is used as the threshold.
|
| 92 |
+
|
| 93 |
+
For the PPLT method, it is necessary to set a PPL score threshold, and the LLM is invoked only when the source text's PPL score exceeds this threshold. We calculate the PPL scores of 1 million source-language monolingual data using a self-trained LM model, then sort the PPL scores in descending order and use the 250,000th score in the sorted list as
|
| 94 |
+
|
| 95 |
+
the threshold. The LM is trained on 30 million monolingual data, with training settings provided in Appendix E. Additionally, all monolingual data is randomly sampled from bilingual data.
|
| 96 |
+
|
| 97 |
+
For the JDM method, when to call the LLM depends on the decision maker, which is a binary classification model fine-tuned based on xlmroberta-base (Conneau, 2019). The training setup is described in Appendix E. When selecting positive and negative samples for training according to Equation 1, two thresholds need to be set. Specifically, we use one million bilingual data, obtain the NMT translation and LLM translation corresponding to the source text, and calculate the $Q_{NMT}$ and $Q_{LLM}$ scores using wmt22-comet-da $^{2}$ (Rei et al., 2022a). The $Q_{NMT}$ scores are then sorted from lowest to highest, and the 100,000th score in the sorted list is chosen as the $T_{1}$ threshold. Then, the data with $Q_{NMT}$ scores lower than $T_{1}$ are sorted by the difference between $Q_{LLM}$ and $Q_{NMT}$ scores, from highest to lowest, and the 10,000th score is selected as the $T_{2}$ threshold. Ultimately, we can obtain 10,000 positive samples, and then randomly select 30,000 negative samples from the remaining data. With this training data ratio, the decider can maintain about 25% LLM calls.
|
| 98 |
+
|
| 99 |
+
# 3.3 Test Set
|
| 100 |
+
|
| 101 |
+
We use WMT22 News and Flores (Costa-jussa et al., 2022) test sets for all language pairs we selected. To better test our method on Zh2En and En2Zh, we construct a Literary test set and a Tech test set. Each test set contains 500 sentences. We find that LLM's performance is much better on the Literary test sets while NMT models outperform on the Tech test sets. These test sets can better evaluate the effectiveness of different fusion strategies. We will open-source these self-constructed test sets to promote the development of NMT and LLM fusion technologies.
|
| 102 |
+
|
| 103 |
+
# 4 Results
|
| 104 |
+
|
| 105 |
+
We validate the aforementioned methods on four $\mathrm{Zh}\leftrightarrow \mathrm{En}$ test sets, as shown in Table 2 and Table 3. wmt22-comet-da (Rei et al., 2022a) is used for reporting DA score (\%). BLEURT20 $^3$ (Sellam et al., 2020) is used for reporting BLEURT score (\%). $LLM_{p}$ refers to the percentage of LLM usage. We
|
| 106 |
+
|
| 107 |
+
<table><tr><td rowspan="2"></td><td colspan="3">News</td><td colspan="3">Flores</td><td colspan="3">Literary</td><td colspan="3">Tech</td><td colspan="3">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td></tr><tr><td>NMT</td><td>78.99</td><td>66.12</td><td>0.00%</td><td>87.08</td><td>76.10</td><td>0.00%</td><td>59.71</td><td>46.29</td><td>0.00%</td><td>83.38</td><td>71.97</td><td>0.00%</td><td>77.29</td><td>65.12</td><td>0.00%</td></tr><tr><td>LLM</td><td>80.13</td><td>67.26</td><td>100.00%</td><td>86.68</td><td>75.55</td><td>100.00%</td><td>66.69</td><td>53.86</td><td>100.00%</td><td>77.68</td><td>61.27</td><td>100.00%</td><td>77.80</td><td>64.49</td><td>100.00%</td></tr><tr><td>QET</td><td>79.13</td><td>66.25</td><td>20.32%</td><td>87.08</td><td>76.11</td><td>0.30%</td><td>63.88</td><td>50.62</td><td>62.00%</td><td>80.21</td><td>66.14</td><td>39.60%</td><td>77.58</td><td>64.78</td><td>30.55%</td></tr><tr><td>PPLT</td><td>79.24</td><td>66.14</td><td>38.19%</td><td>87.06</td><td>76.08</td><td>5.43%</td><td>63.49</td><td>50.73</td><td>51.40%</td><td>82.02</td><td>69.37</td><td>34.20%</td><td>77.95</td><td>65.58</td><td>32.31%</td></tr><tr><td>JDM</td><td>79.69</td><td>66.91</td><td>29.39%</td><td>87.12</td><td>76.12</td><td>1.28%</td><td>65.70</td><td>52.70</td><td>80.40%</td><td>82.71</td><td>70.88</td><td>7.00%</td><td>78.81</td><td>66.65</td><td>29.52%</td></tr><tr><td>oracle</td><td>82.25</td><td>69.86</td><td>56.91%</td><td>88.17</td><td>77.59</td><td>48.32%</td><td>68.41</td><td>54.54</td><td>72.80%</td><td>84.80</td><td>73.14</td><td>28.20%</td><td>80.91</td><td>68.78</td><td>51.56%</td></tr></table>
|
| 108 |
+
|
| 109 |
+
Table 2: Integration performances of QET, PPLT, and JDM methods on four Chinese→English test sets.
|
| 110 |
+
|
| 111 |
+
<table><tr><td rowspan="2"></td><td colspan="3">News</td><td colspan="3">Flores</td><td colspan="3">Literary</td><td colspan="3">Tech</td><td colspan="3">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td><td>DA</td><td>BLEURT</td><td>\( LLM_p \)</td></tr><tr><td>NMT</td><td>86.17</td><td>71.89</td><td>0.00%</td><td>87.88</td><td>73.29</td><td>0.00%</td><td>71.68</td><td>51.83</td><td>0.00%</td><td>86.30</td><td>73.57</td><td>0.00%</td><td>83.01</td><td>67.65</td><td>0.00%</td></tr><tr><td>LLM</td><td>85.17</td><td>68.20</td><td>100.00%</td><td>86.63</td><td>68.91</td><td>100.00%</td><td>76.30</td><td>56.12</td><td>100.00%</td><td>78.40</td><td>59.74</td><td>100.00%</td><td>81.63</td><td>63.24</td><td>100.00%</td></tr><tr><td>QET</td><td>86.08</td><td>71.52</td><td>8.15%</td><td>87.83</td><td>73.14</td><td>2.77%</td><td>72.73</td><td>52.76</td><td>24.31%</td><td>80.57</td><td>64.02</td><td>53.40%</td><td>81.80</td><td>65.36</td><td>22.16%</td></tr><tr><td>PPLT</td><td>85.80</td><td>70.76</td><td>28.47%</td><td>87.73</td><td>72.61</td><td>21.15%</td><td>72.85</td><td>53.25</td><td>25.37%</td><td>85.02</td><td>71.05</td><td>27.00%</td><td>82.85</td><td>66.92</td><td>25.50%</td></tr><tr><td>JDM</td><td>86.18</td><td>71.59</td><td>20.77%</td><td>87.76</td><td>72.92</td><td>9.19%</td><td>75.15</td><td>54.97</td><td>53.91%</td><td>85.39</td><td>71.97</td><td>9.60%</td><td>83.62</td><td>67.86</td><td>23.37%</td></tr><tr><td>oracle</td><td>88.00</td><td>73.16</td><td>38.05%</td><td>89.03</td><td>73.73</td><td>36.26%</td><td>78.16</td><td>58.42</td><td>63.85%</td><td>87.11</td><td>73.74</td><td>20.80%</td><td>85.58</td><td>69.76</td><td>39.74%</td></tr></table>
|
| 112 |
+
|
| 113 |
+
Table 3: Integration performances of QET, PPLT, and JDM methods on four English→Chinese test sets.
|
| 114 |
+
|
| 115 |
+
also report the performance of oracle system that selects the best translation results based on wmt22-comet-da, representing the upper bound that the fusion method can achieve. In terms of the two base models, NMT and LLM, their performance gap is small on the open-source news and Flores test sets, but there are significant differences on the Literary and Tech test sets.
|
| 116 |
+
|
| 117 |
+
QET reduces LLM usage to $30.55\%$ on Zh2En test sets and $22.16\%$ on En2Zh test sets. Regarding translation quality, its performance remains almost the same as the optimal single system result on the Zh2En test sets. But we observe one point down of DA score and BLEURT on the En2Zh test sets when comparing with the optimal single system result (NMT), because QET performs not so well on the Tech test set. Our NMT model significantly outperforms LLM on the Tech test set but QET integrate some worse LLM translations to the final results. QET uses LLM when NMT translation quality is poor, but it does not evaluate whether LLM's translation is better or even worse.
|
| 118 |
+
|
| 119 |
+
Interestingly, our PPLT method achieved better results than the QET method, while the number of LLM calls was only slightly higher. The result demonstrates that using merely source text features, i.e. text complexity, can get a desirable integration of NMT model and LLM. In addition, as LM is trained on NMT-similar data, PPLT significantly outperforms QET on the Tech test sets.
|
| 120 |
+
|
| 121 |
+
Our JDM method achieves best performance on average. It seems that JDM method is able to dynamically control LLM usage as it varies greatly on different test sets. For instance, LLM outperforms NMT model on News and Literary test sets, LLM usage is thus high (even over $50\%$ on the Literary
|
| 122 |
+
|
| 123 |
+
test sets). On contrary, NMT model outperforms LLM on the Tech test sets, so LLM usage is greatly decreased (less than $10\%$ ). Regarding domains where LLM and NMT model's performances are equal, JDM uses LLM as less as possible. On the Tech and Flores test sets where NMT model outperforms, we witness more LLM usage on the Tech test sets than on Flores, because the Tech test sets are more difficult to translate (6-8 points gap regarding DA score), and the decider tends to pass complex sentences to the LLM.
|
| 124 |
+
|
| 125 |
+
Similar results prevail on De2En and Ja2En test sets (see Appendix H). When LLM and NMT each have their respective advantages, JDM can also achieve better integration results. In addition, we also discuss the generalization ability of the JDM method on different model combinations and unknown domains (see Appendix I).
|
| 126 |
+
|
| 127 |
+
# 5 Conclusion
|
| 128 |
+
|
| 129 |
+
This paper proposes a fast approach to integrate LLM and NMT model in order to improve translation quality while ensuring fast speed and low cost. Compared with previous methods that use QE models, our decide determines when to use LLM based on source sentence features. We train an end-to-end decoder to get the desired performance, that is, use LLM as less as possible and use LLM for translation only when it outperforms NMT model. We test our approach on multiple test sets, including Zh2En, En2Zh, De2En, and Ja2En. The result shows that this straightforward approach achieves almost the best performance. In addition, our experiments show that LLM has a particular advantage over NMT when translating internet memes and informal expressions.
|
| 130 |
+
|
| 131 |
+
# Limitations
|
| 132 |
+
|
| 133 |
+
We propose a simple and fast method to integrate NMT and LLM, and experiments verify the effectiveness of our method. However, we find that the final integration performance depends on the complementarity between NMT and LLM. That is to say, only when the NMT model and LLM has respective advantages can the integration lead to better translations. If the NMT performs equally as LLM, we see no improvement after integration.
|
| 134 |
+
|
| 135 |
+
# References
|
| 136 |
+
|
| 137 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2016. Neural machine translation by jointly learning to align and translate. *ICLR*.
|
| 138 |
+
A Conneau. 2019. Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116.
|
| 139 |
+
Marta R Costa-jussà, 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.
|
| 140 |
+
António Farinhas, José de Souza, and Andre Martins. 2023. An empirical study of translation hypothesis ensembling with large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 11956-11970, Singapore. Association for Computational Linguistics.
|
| 141 |
+
Marina Fomicheva, Shuo Sun, Lisa Yankovskaya, Frédéric Blain, Francisco Guzmán, Mark Fishel, Nikolaos Aletras, Vishrav Chaudhary, and Lucia Specia. 2020. Unsupervised quality estimation for neural machine translation. TACL.
|
| 142 |
+
Amr Hendy, Mohamed Abdelrehim, Amr Sharaf, Vikas Raunak, Mohamed Gabr, Hitokazu Matsushita, Young Jin Kim, Mohamed Afify, and Hany Hassan Awadalla. 2023. How good are gpt models at machine translation? a comprehensive evaluation. arXiv preprint arXiv:2302.09210.
|
| 143 |
+
Yasmin Moslem, Rejwanul Haque, John D. Kelleher, and Andy Way. 2023. Adaptive machine translation with large language models. EAMT.
|
| 144 |
+
Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairseq: A fast, extensible toolkit for sequence modeling*. In *Proceedings of NAACL-HLT* 2019: Demonstrations.
|
| 145 |
+
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John
|
| 146 |
+
|
| 147 |
+
Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. 2022. Training language models to follow instructions with human feedback. NIPS.
|
| 148 |
+
Ricardo Rei, José GC De Souza, Duarte Alves, Chrysoula Zerva, Ana C Farinha, Taisiya Glushkova, Alon Lavie, Luisa Coheur, and André FT Martins. 2022a. Comet-22: Unbabel-ist 2022 submission for the metrics shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 578-585.
|
| 149 |
+
Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020. COMET: A neural framework for MT evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685-2702, Online. Association for Computational Linguistics.
|
| 150 |
+
Ricardo Rei, Marcos Treviso, Nuno M Guerreiro, Chrysoula Zerva, Ana C Farinha, Christine Maroti, José GC De Souza, Taisiya Glushkova, Duarte M Alves, Alon Lavie, et al. 2022b. Cometkiwi: Istunbabel 2022 submission for the quality estimation shared task. arXiv preprint arXiv:2209.06243.
|
| 151 |
+
Ricardo Rei, Marcos Treviso, Nuno M. Guerreiro, Chrysoula Zerva, Ana C. Farinha, Christine Maroti, José G. C. de Souza, Taisiya Glushkova, Duarte M. Alves, Alon Lavie, Luisa Coheur, and André F. T. Martins. 2022c. Cometkiwi: Ist-unbabel 2022 submission for the quality estimation shared task. Preprint, arXiv:2209.06243.
|
| 152 |
+
Thibault Sellam, Dipanjan Das, and Ankur P Parikh. 2020. Bleurt: Learning robust metrics for text generation. In Proceedings of ACL.
|
| 153 |
+
Jungha Son and Boyoung Kim. 2023. Translation performance from the user's perspective of large language models and neural machine translation systems. Information, 14(10).
|
| 154 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. NIPS.
|
| 155 |
+
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. Preprint, arXiv:2302.13971.
|
| 156 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. NIPS.
|
| 157 |
+
Qiang Wang, Bei Li, Tong Xiao, Jingbo Zhu, Changliang Li, Derek F. Wong, and Lidia S. Chao. 2019. Learning deep transformer models for machine translation. ACL.
|
| 158 |
+
|
| 159 |
+
Xiaohui Wang, Ying Xiong, Xian Qian, Yang Wei, Lei Li, and Mingxuan Wang. 2021a. Lightseq2: Accelerated training for transformer-based models on gpus. arXiv preprint arXiv:2110.05722.
|
| 160 |
+
|
| 161 |
+
Xiaohui Wang, Ying Xiong, Yang Wei, Mingxuan Wang, and Lei Li. 2021b. LightSeq: A high performance inference library for transformers. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Industry Papers (NAACL-HLT), pages 113-120. Association for Computational Linguistics.
|
| 162 |
+
|
| 163 |
+
Daimeng Wei, Zhiqiang Rao, Zhanglin Wu, Shaojun Li, Yuanchang Luo, Yuhao Xie, Xiaoyu Chen, Hengchao Shang, Zongyao Li, Zhengzhe Yu, et al. 2022. Hw-tsc's submissions to the wmt 2022 general machine translation shared task. In Proceedings of the Seventh Conference on Machine Translation (WMT), pages 403-410.
|
| 164 |
+
|
| 165 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online. Association for Computational Linguistics.
|
| 166 |
+
|
| 167 |
+
Jiali Zeng, Fandong Meng, Yongjing Yin, and Jie Zhou. 2024. Improving machine translation with large language models: A preliminary study with cooperative decoding. Findings in ACL.
|
| 168 |
+
|
| 169 |
+
Biao Zhang, Barry Haddow, and Alexandra Birch. 2023. Prompting large language model for machine translation: A case study. Preprint, arXiv:2301.07069.
|
| 170 |
+
|
| 171 |
+
# A Advantages of LLM in Translation
|
| 172 |
+
|
| 173 |
+
Our experiments demonstrate that when source sentences are simple, NMT model and LLM have similar performances. When source sentences are hard to translate, LLM outperforms NMT model, and the gap becomes larger on extremely complex sentences. Our proposed decoder uses LLM for translation only when LLM performs better, thus ensuring minimum LLM usage. We manually collect complex sentences based on three criteria described in Appendix B. We send these complex sentences to our decoder to see how the decoder allocates these sentences, so we can see whether LLM is indeed better on complex content.
|
| 174 |
+
|
| 175 |
+
We select 50 test cases under each criterion and send them to the decider. As shown in Table 4,
|
| 176 |
+
|
| 177 |
+
<table><tr><td>Type</td><td>\( LLM_p \)</td><td>Samples</td></tr><tr><td>category 1</td><td>68%</td><td>50</td></tr><tr><td>category 2</td><td>42%</td><td>50</td></tr><tr><td>category 3</td><td>5%</td><td>50</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 4: The proportion of LLM being used under three different types of hard-to-translate categories.
|
| 180 |
+
|
| 181 |
+
LLM's performance varies under the three categories. For category 1 (informal expression or Internet memes), $68\%$ test cases can be well translated by LLM. For category 2 (specialized terms or expressions), only $42\%$ can be well translated. However, LLM also fails on category 3 (context is required for translation), as only $5\%$ cases can be well handled.
|
| 182 |
+
|
| 183 |
+
# B Difficult Text Types
|
| 184 |
+
|
| 185 |
+
For category 1, NMT models can hardly translate those informal expressions and memes correctly. However, a majority of those informal expressions and memes are new combinations of high-frequency words, which may not be rare in LLM training data. Moreover, as model scales, LLM can better grasp the true meaning of source sentences. So LLM can deliver relatively good translations. However, for category 2, specialized terms are low-frequency words in both NMT and LLM training data, so LLM also struggles to translate those terms correctly. For category 3, without context, LLM also fails if we use it as a sentence-level translation system.
|
| 186 |
+
|
| 187 |
+
We define hard-to-translate Chinese sentences from three dimensions: (1) Sentences containing informal expressions or Internet memes, of which the literal meaning is wrong or misleading. For example
|
| 188 |
+
|
| 189 |
+
Example1: 浙大学术年会上学生唱主角研究成果让人脑洞大开
|
| 190 |
+
|
| 191 |
+
Reference: Students played the leading role at the Annual Academic Conference of Zhejiang University with creative research achievements
|
| 192 |
+
|
| 193 |
+
Explanation: "脑洞大开" literally means "a big hole in the brain" but its actual meaning is "creative; inspiring".
|
| 194 |
+
|
| 195 |
+
Example 2: 或者说这电影根本没有主旨,就是一个面目可憎的缝合怪。
|
| 196 |
+
|
| 197 |
+
Reference: Or we can say there is no purport in the film at all, and it is just a montage of incoherent elements.
|
| 198 |
+
|
| 199 |
+
Explanation: "缝合怪" literally means "a monster of stitches" but its actual meaning is "an awk-
|
| 200 |
+
|
| 201 |
+
ward combination of incoherent elements, scenes, or cultures".
|
| 202 |
+
|
| 203 |
+
(2) Sentences containing specialized terms or expressions, requiring domain knowledge to understand the true meaning.
|
| 204 |
+
|
| 205 |
+
Example1: 桃胶的作用:味苦,性平,归大肠,膀胱经。
|
| 206 |
+
|
| 207 |
+
Reference: Functions of peach glue: bitter in taste, mild in nature, belong to the large intestine and bladder channels.
|
| 208 |
+
|
| 209 |
+
Explanation: "性平" is a term in traditional Chinese medicine. "性" means the intrinsic properties of herb, including cold, hot, warm, cool, or mild (平).
|
| 210 |
+
|
| 211 |
+
Example 2: 她和团队所提出的“四抗二平衡”方案及带去的人工肝、微生态和干细胞三大技术,显著提高了重症救治率。
|
| 212 |
+
|
| 213 |
+
Reference: The "four-against and two-balance" scheme proposed by her and her team and the three technologies including artificial liver, microecology and stem cells have significantly improved the treatment and cure rate of severe cases.
|
| 214 |
+
|
| 215 |
+
Explanation: "四抗二平衡" refers to "fight against viruses, shock, hypoxemia and multi-organ failure, and secondary infections; maintain fluid and micro-ecology balance". Without domain knowledge, this term can be easily misunderstood.
|
| 216 |
+
|
| 217 |
+
(3) Sentences that cannot be understood without context:
|
| 218 |
+
|
| 219 |
+
Example1: 女孩街头“箭靶”募捐被告诫
|
| 220 |
+
|
| 221 |
+
Reference: The girl who raised donations by acting as a target on the street was warned.
|
| 222 |
+
|
| 223 |
+
Explanation: "箭靶" literally means "archery target. If it is translated literally, the sentence would be "The girl made an archery target donation on the street and was warned.", But according to context, it actually means "the girl acted as a target".
|
| 224 |
+
|
| 225 |
+
# C Literary Test Set
|
| 226 |
+
|
| 227 |
+
The composition of the literary test set:
|
| 228 |
+
|
| 229 |
+
(1) Sentences require transcreation: needs to recreate content in a new language and maintain its original meaning, such as slogan, and advertisements.
|
| 230 |
+
(2) Sentences contain memes and buzzwords: needs to understand local popular culture before translation.
|
| 231 |
+
(3) Sentences contain idioms: needs to understand local literature and social culture before translation.
|
| 232 |
+
|
| 233 |
+
Test cases are crawled from English learning websites. References are double-checked by in-house translators.
|
| 234 |
+
|
| 235 |
+
# D LLM Translation Prompt
|
| 236 |
+
|
| 237 |
+
Figure 3 illustrates the translation prompt used for LLM. {source_language} and {target_language} denote the full names of the languages involved, for example, "Translate this from Chinese to English." {sourcesentence} represents the content that actually needs to be translated.
|
| 238 |
+
|
| 239 |
+
<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nTranslate this from {source-lang} to {target-lang}:<|eot_id|>
|
| 240 |
+
<|start_header_id|>user<|end_header_id|>\n\n{source-lang}:\{sourceSentence\}<eot_id|
|
| 241 |
+
<|start_header_id|>assistant<|end_header_id|>\n\n{target-lang}:
|
| 242 |
+
|
| 243 |
+
Figure 3: LLM Translation Prompt
|
| 244 |
+
|
| 245 |
+
# E Training Setup
|
| 246 |
+
|
| 247 |
+
NMT: We use the open-source fairseq (Ott et al., 2019) to train NMT models. The key parameters are as follows: each model is trained on 8 GPUs, with a batch size of 6144 and a parameter update frequency of 2. The learning rate is set to 5e-4. The warm-up steps are set to 4000, and the model is checked every 1000 steps. Additionally, we apply a dropout rate of 0.1 and use R-Drop with default hyperparameters. Training is stopped when the evaluation metrics on the development set do not improve for 10 consecutive checkpoints. The last 10 saved models are averaged and then used for translation.
|
| 248 |
+
|
| 249 |
+
LM: We also use the open-source fairseq (Ott et al., 2019) to train LM models. The model architecture follows transformer_lm_base, and the other main training parameters are consistent with those used for the NMT model. Training is stopped when the loss on the development set does not decrease after 10 consecutive checkpoints, and the last saved model is used to compute PPL.
|
| 250 |
+
|
| 251 |
+
JDM: We use the open-source transformers (Wolf et al., 2020) to train deciders for each language pair. The model architecture consists of a linear layer connected to a pretrained LM. The key training parameters are as follows: the learning rate for the pretrained LM is set to 1e-5, the learning rate for the linear layer is set to 1e-3, the batch size is 32, the gradient accumulation steps are 8, and the dropout rate is set to 0.3. We only train for
|
| 252 |
+
|
| 253 |
+
one epoch, and the last saved model is used for decision-making during the inference phase.
|
| 254 |
+
|
| 255 |
+
# F Threshold Values
|
| 256 |
+
|
| 257 |
+
The threshold values of the various methods we used are shown in Table 5. In terms of threshold sensitivity, the sensitivity of the threshold parameters for QET, PPLT, and JDM to language pairs or domains is determined by the LM or COMET scoring models. The greater the differences in these scoring models across language pairs or domains, the more sensitive the threshold parameters become. Additionally, the selection of thresholds is flexible, with the primary purpose of setting thresholds being to control the invocation ratio of the LLM. For example, the thresholds for QET and PPLT can directly control the invocation volume of the LLM, while the thresholds for JDM $(T_{1}\& \mathrm{JDM}T_{2})$ are used to select training samples for the decision maker, indirectly controlling the invocation volume of the LLM. If dynamic adjustment of thresholds is desired, we can adjust the threshold using the statistical method mentioned in the Section 3.2, based on the maximum invocation ratio of the LLM that the current computational resources can support.
|
| 258 |
+
|
| 259 |
+
<table><tr><td></td><td>QET</td><td>PPLT</td><td>JDM T1</td><td>JDM T2</td></tr><tr><td>Zh2En</td><td>70</td><td>5.6</td><td>73</td><td>3.5</td></tr><tr><td>En2Zh</td><td>72</td><td>5.5</td><td>76</td><td>3.5</td></tr><tr><td>De2En</td><td>67</td><td>5.7</td><td>79</td><td>2.5</td></tr><tr><td>Ja2En</td><td>73</td><td>5.8</td><td>64</td><td>3.5</td></tr></table>
|
| 260 |
+
|
| 261 |
+
# G Efficiency
|
| 262 |
+
|
| 263 |
+
During the inference phase, the model parameters and inference times for different methods are shown in Table 6. In terms of model parameters, the NMT model and LLM models relied upon by different methods $(\mathrm{P}(\mathrm{NMT}) + (\mathrm{P}(\mathrm{LLM}))$ are the same, with the main difference lying in the selection model. The selection models used in our proposed PPLT and JDM methods (56M/125M) are smaller than those used in the traditional QET method (355M). In terms of overall inference time, our proposed PPLT and JDM methods not only have shorter inference times for the selection model $(\mathrm{T}(\mathrm{PPLT}) < \mathrm{T}(\mathrm{JDM}) < \mathrm{T}(\mathrm{QET}))$ but also selectively invoke the NMT or LLM model for translation as needed. In contrast, the traditional QET method may require invoking the NMT model first and then the LLM model for translation.
|
| 264 |
+
|
| 265 |
+
Table 5: The threshold values of the various methods.
|
| 266 |
+
|
| 267 |
+
<table><tr><td></td><td>Parameter</td><td>Inference time</td></tr><tr><td>PPLT</td><td>56M + P(NMT) + P(LLM)</td><td>T(PPLT) + (T(NMT) or T(LLM))</td></tr><tr><td>JDM</td><td>125M + P(NMT) + P(LLM)</td><td>T(JDM) + (T(NMT) or T(LLM))</td></tr><tr><td>QET</td><td>355M + P(NMT) + P(LLM)</td><td>T(QET) + (T(NMT) and T(LLM))</td></tr></table>
|
| 268 |
+
|
| 269 |
+
Table 6: The model parameters and inference time of the various methods.
|
| 270 |
+
|
| 271 |
+
# H De2En and Ja2En Results
|
| 272 |
+
|
| 273 |
+
As shown in Tables 7 and 8, we also observe that the JDM method achieves better fusion results than the QET method on Ja2En and De2En. To better highlight the characteristics of these two methods, we include the Subtitle and Travel test sets. These two test sets are chosen because there is a noticeable gap in the translation results between NMT and LLM models, which helps to better evaluate the effects of system fusion. The Subtitle and Travel test sets are collected from open-source data such as OpenSubtitles, JESC, TED, QED, and czechtourism, and then constructed by language experts, with each test set containing 500 sentences.
|
| 274 |
+
|
| 275 |
+
# I Generalization
|
| 276 |
+
|
| 277 |
+
Different NMT and LLM combinations: When there are significant changes in the NMT and LLM models, the selection model of the JDM method may require retraining. However, if only fine-tuning is applied to both while maintaining their complementary characteristics, is retraining still necessary? To address this, we investigate whether the selection model of the JDM method can be directly applied to fine-tuned NMT and LLM models. We utilize the wmt22-cometkiwi-da model to select 40M high-quality Zh2En data for fine-tuning the NMT and LLM models. We then compare the fusion performance of the JDM method and the QET method on Zh2En. As shown in Table 9, even without retraining the selection model, the JDM method still achieves good fusion results on the updated NMT and LLM models, outperforming the QET method. This indicates that the JDM method possesses some generalization capability across different NMT and LLM combinations.
|
| 278 |
+
|
| 279 |
+
Unknown domains: Since the training data for the selection models of the PPLT and JDM methods come from general domains, while the test data includes multiple specialized domains, the PPLT and JDM methods can achieve enhanced fusion effects in these domains. This indicates that the PPLT and JDM methods have a certain level of generalization capability for unknown domains.
|
| 280 |
+
|
| 281 |
+
<table><tr><td rowspan="2"></td><td colspan="3">News</td><td colspan="3">Flores</td><td colspan="3">Subtitle</td><td colspan="3">Travel</td><td colspan="3">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td></tr><tr><td>NMT</td><td>79.15</td><td>64.29</td><td>0.00%</td><td>87.76</td><td>75.51</td><td>0.00%</td><td>84.92</td><td>74.31</td><td>0.00%</td><td>79.00</td><td>65.16</td><td>0.00%</td><td>82.71</td><td>69.82</td><td>0.00%</td></tr><tr><td>LLM</td><td>80.76</td><td>66.52</td><td>100.00%</td><td>87.43</td><td>74.59</td><td>100.00%</td><td>82.41</td><td>70.25</td><td>100.00%</td><td>83.80</td><td>69.37</td><td>100.00%</td><td>83.60</td><td>70.18</td><td>100.00%</td></tr><tr><td>QET</td><td>79.17</td><td>64.39</td><td>15.49%</td><td>87.77</td><td>75.52</td><td>0.30%</td><td>83.21</td><td>72.13</td><td>46%</td><td>80.74</td><td>66.47</td><td>26%</td><td>82.72</td><td>69.63</td><td>21.95%</td></tr><tr><td>JDM</td><td>80.28</td><td>65.80</td><td>39.39%</td><td>87.81</td><td>75.53</td><td>2.27%</td><td>84.02</td><td>73.64</td><td>33%</td><td>83.13</td><td>68.62</td><td>15%</td><td>83.81</td><td>70.90</td><td>22.42%</td></tr></table>
|
| 282 |
+
|
| 283 |
+
Table 7: Integration performances of QET and JDM methods on four Japanese→English test sets.
|
| 284 |
+
|
| 285 |
+
<table><tr><td rowspan="2"></td><td colspan="3">News</td><td colspan="3">Flores</td><td colspan="3">Subtitle</td><td colspan="3">Travel</td><td colspan="3">Avg</td></tr><tr><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td></tr><tr><td>NMT</td><td>83.53</td><td>71.84</td><td>0.00%</td><td>89.20</td><td>79.83</td><td>0.00%</td><td>87.12</td><td>77.87</td><td>0.00%</td><td>87.72</td><td>77.09</td><td>0.00%</td><td>86.89</td><td>76.66</td><td>0.00%</td></tr><tr><td>LLM</td><td>84.72</td><td>73.27</td><td>100.00%</td><td>89.19</td><td>79.59</td><td>100.00%</td><td>86.28</td><td>76.05</td><td>100.00%</td><td>90.87</td><td>82.10</td><td>100.00%</td><td>87.77</td><td>77.75</td><td>100.00%</td></tr><tr><td>QET</td><td>83.64</td><td>71.97</td><td>8.67%</td><td>89.20</td><td>79.83</td><td>1.58%</td><td>86.55</td><td>76.82</td><td>43.00%</td><td>88.61</td><td>78.63</td><td>35.00%</td><td>87.00</td><td>76.81</td><td>22.06%</td></tr><tr><td>JDM</td><td>84.31</td><td>72.74</td><td>36.39%</td><td>89.29</td><td>79.93</td><td>10.87%</td><td>86.90</td><td>77.24</td><td>29.00%</td><td>90.24</td><td>80.93</td><td>17.00%</td><td>87.69</td><td>77.71</td><td>23.32%</td></tr></table>
|
| 286 |
+
|
| 287 |
+
Table 8: Integration performances of QET and JDM methods on four German→English test sets.
|
| 288 |
+
|
| 289 |
+
<table><tr><td rowspan="2"></td><td colspan="3">News</td><td colspan="3">Flores</td><td colspan="3">Literary</td><td colspan="3">Tech</td><td colspan="2">Avg</td><td></td></tr><tr><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td><td>DA</td><td>BLEURT</td><td>\(LLM_p\)</td></tr><tr><td>NMT-FT</td><td>79.76</td><td>66.98</td><td>0.00%</td><td>88.24</td><td>77.64</td><td>0.00%</td><td>60.52</td><td>47.13</td><td>0.00%</td><td>83.82</td><td>72.36</td><td>0.00%</td><td>78.09</td><td>66.03</td><td>0.00%</td></tr><tr><td>LLM-SFT</td><td>81.45</td><td>68.41</td><td>100.00%</td><td>86.96</td><td>75.97</td><td>100.00%</td><td>66.73</td><td>53.89</td><td>100.00%</td><td>78.20</td><td></td><td>100.00%</td><td>78.34</td><td>64.99</td><td>100.00%</td></tr><tr><td>QET</td><td>80.01</td><td>67.13</td><td>17.65%</td><td>88.24</td><td>77.63</td><td>0.30%</td><td>63.89</td><td>50.63</td><td>55.40%</td><td>80.75</td><td>66.63</td><td>45.00%</td><td>78.22</td><td>65.51</td><td>29.59%</td></tr><tr><td>JDM</td><td>80.73</td><td>67.85</td><td>29.65%</td><td>88.24</td><td>77.65</td><td>0.79%</td><td>66.25</td><td>53.46</td><td>80.20%</td><td>82.64</td><td>70.05</td><td>10.40%</td><td>79.47</td><td>67.25</td><td>30.26%</td></tr></table>
|
| 290 |
+
|
| 291 |
+
Table 9: New integration performances of QET and JDM methods on four Chinese→English test sets.
|
2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d356e65c479d1fb6d1c0c10bf70b744ea9bd1144b1d234b648a4e504d0c34f7
|
| 3 |
+
size 347840
|
2025/Combining the Best of Both Worlds_ A Method for Hybrid NMT and LLM Translation/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/35fafa4b-2140-486c-891b-5008eef2c8d7_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/35fafa4b-2140-486c-891b-5008eef2c8d7_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/35fafa4b-2140-486c-891b-5008eef2c8d7_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:952d3d1f61f612c53ff1c522f3f89af995cd722da80557e5040f2f6196283c67
|
| 3 |
+
size 650745
|
2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/full.md
ADDED
|
@@ -0,0 +1,490 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models
|
| 2 |
+
|
| 3 |
+
Sajjad Ghiasvand<sup>1</sup> Yifan Yang<sup>2</sup> Zhiyu Xue<sup>1</sup>
|
| 4 |
+
|
| 5 |
+
Mahnoosh Alizadeh<sup>1</sup> Zheng Zhang<sup>1</sup> Ramtin Pedarsani<sup>1</sup>
|
| 6 |
+
|
| 7 |
+
Electrical and Computer Engineering Department, UC Santa Barbara<sup>1</sup>
|
| 8 |
+
|
| 9 |
+
Computer Science Department, UC Santa Barbara2
|
| 10 |
+
|
| 11 |
+
{sajjad,yifanyang,zhiyuxue,alizadeh,zhengzhang,ramtin}@ucsb.edu
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
Parameter-efficient fine-tuning (PEFT) methods typically assume that Large Language Models (LLMs) are trained on data from a single device or client. However, real-world scenarios often require fine-tuning these models on private data distributed across multiple devices. Federated Learning (FL) offers an appealing solution by preserving user privacy, as sensitive data remains on local devices during training. Nonetheless, integrating parameter-efficient fine-tuning (PEFT) methods into FL introduces two main challenges: communication overhead and data heterogeneity. In this paper, we introduce FedTT and FedTT+, methods for adapting LLMs by integrating tensorized adapters into client-side models' encoder/decoder blocks. FedTT is versatile and can be applied to both cross-silo FL and large-scale cross-device FL. FedTT+, an extension of FedTT tailored for cross-silo FL, enhances robustness against data heterogeneity by adaptively freezing portions of tensor factors, further reducing the number of trainable parameters. Experiments on BERT and LLaMA family models demonstrate that our proposed methods successfully address data heterogeneity challenges and perform on par or even better than existing federated PEFT approaches while achieving up to $10 \times$ reduction in communication cost.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Large Language Models (LLMs) such as GPT-4 (Achiam et al., 2023), LLaMA (Touvron et al., 2023), and BERT (Devlin et al., 2018) excel in tasks such as translation and summarization (Bommasani et al., 2021) due to the capabilities of transformer architectures (Vaswani, 2017). While finetuning enhances adaptability (Howard and Ruder, 2018), fully fine-tuning these massive models is computationally expensive and prone to overfitting. Parameter-efficient fine-tuning (PEFT) methods
|
| 20 |
+
|
| 21 |
+
such as Adapters (Houlsby et al., 2019), PromptTuning (Lester et al., 2021), and LoRA (Hu et al., 2021) address this by optimizing only a subset of parameters, reducing costs without sacrificing performance (Ding et al., 2023). However, traditional PEFT assumes centralized data, whereas real-world applications often involve private, distributed data, such as medical or legal records (Manoel et al., 2023; Shoham and Rappoport, 2023; Soltanmohammadi and Hikmet, 2024). Federated Learning (FL) emerges as a compelling solution, as it prioritizes user data privacy by ensuring sensitive information remains on individual devices during training. Instead of transmitting data to a central server, clients in FL locally update their model parameters and share only model information, such as parameters or gradients, which are then aggregated by the server into a global model (McMahan et al., 2017a).
|
| 22 |
+
|
| 23 |
+
To address the aforementioned problems, FL has been integrated into PEFT methods (Zhang et al., 2023; Fan et al., 2023; Zhao et al., 2023). These methods, however, often result in two major challenges: (i) communication and computation overhead in the FL system, and (ii) significant accuracy degradation, particularly under heterogeneous scenarios.
|
| 24 |
+
|
| 25 |
+
Communication efficiency is crucial in FL, as edge devices typically have limited storage and computational power. While some methods attempt to reduce the number of training parameters by incorporating sparsity in PEFT approaches, they either perform poorly in FL (He et al., 2022; Wu and Chen, 2022) or are computationally expensive for clients (Kuo et al., 2024), rendering them unsuitable for practical scenarios.
|
| 26 |
+
|
| 27 |
+
Data heterogeneity happens when training data is not identically and independently distributed across clients (non-i.i.d.). In such scenarios, local models on individual clients can diverge from the global model's optimal state, leading to slower conver
|
| 28 |
+
|
| 29 |
+
gence (Hsieh et al., 2020; Li et al., 2020). This issue is particularly pronounced when training LLMs in federated environments, as data heterogeneity can severely impact model performance (Zhang et al., 2023). Although various studies have employed techniques such as gradient tracking to address this challenge in federated learning (Ghiasvand et al., 2024; Ebrahimi et al., 2024), these approaches often become inefficient in terms of communication and computational demands when applied to federated LLMs. Several works have modified LoRA to improve its efficiency in highly heterogeneous federated settings (Babakniya et al., 2023). However, these methods require communicating a large number of parameters (at least as much as LoRA).
|
| 30 |
+
|
| 31 |
+
In this work, we present a federated and tensorized framework that reduces communication load compared to other PEFT methods, while maintaining comparable or even superior accuracy, and addressing challenges such as data heterogeneity. We introduce the Federated Tensor Train (FedTT) algorithm, where tensorized adapters serve as trainable parameters embedded within the encoder/decoder blocks of models used by clients. FedTT is applicable to both cross-silo FL, where all clients participate in training, and large-scale cross-device (LSCD) FL, where only a subset of clients is selected in each round. For cross-silo FL, we propose the FedTT+ algorithm, a heterogeneity-robust method that further reduces the number of parameters by adaptively freezing portions of the tensor factors in the models. We summarize our contributions as follows:
|
| 32 |
+
|
| 33 |
+
- We study the TT decomposition of adapters to enable communication-efficient federated fin-tuning of LLMs.
|
| 34 |
+
- We propose FedTT, an efficient FL method to fine-tune LLMs using tensorized adapters, achieving up to $10 \times$ communication reduction than other popular federated PEFT methods.
|
| 35 |
+
- We introduce FedTT+, an enhancement of FedTT that further reduces the number of trainable parameters and improves robustness against data heterogeneity in cross-silo FL. FedTT+ outperforms state-of-the-art (SOTA) cross-silo FL methods with fewer trainable parameters.
|
| 36 |
+
- We conduct extensive experiments across various settings, including data heterogeneity and differential privacy, using widely adopted LLMs such as the BERT and LLaMA-2 model families.
|
| 37 |
+
|
| 38 |
+
These experiments validate the effectiveness of our proposed algorithms in reducing communication overhead while preserving high accuracy.
|
| 39 |
+
|
| 40 |
+
# 2 Related Work
|
| 41 |
+
|
| 42 |
+
# 2.1 Parameter Efficient Fine-Tuning (PEFT)
|
| 43 |
+
|
| 44 |
+
PEFT methods can be generally divided into three categories (Han et al., 2024). The first is Additive PEFT, where a small set of trainable parameters is added to the model, and only these are updated during training. Methods like Prefix-tuning (Li and Liang, 2021) and Prompt-tuning (Lester et al., 2021) fall into this category, and our approach aligns with this strategy. The second is Selective PEFT, which chooses a subset of existing model parameters for tuning, as seen in techniques like BitFit (Zaken et al., 2021) and PaFi (Liao et al., 2023). Lastly, Reparameterized PEFT introduces a low-rank parameterization of pre-trained weights for training, with methods such as LoRA (Hu et al., 2021) and DoRA (Liu et al., 2024).
|
| 45 |
+
|
| 46 |
+
# 2.2 PEFT in Federated Setting
|
| 47 |
+
|
| 48 |
+
(Zhang et al., 2023) tests and compares various PEFT methods such as Adapter, LoRA, Prompt Tuning, and BitFit in FL. Several works have modified LoRA to improve its efficiency in highly heterogeneous federated settings. For example, SLoRA (Babakniya et al., 2023; Yan et al., 2024) modify initialization to address data heterogeneity, whereas HetLoRA (Cho et al., 2023) and FlexLoRA (Bai et al., 2024) adaptively adjust LoRA ranks for each client to handle system heterogeneity. However, these methods still require communicating massive parameters.
|
| 49 |
+
|
| 50 |
+
Recently, (Kuo et al., 2024) introduced sparse fine-tuning to reduce the communication load in federated LoRA. Although this method lowers communication overhead and shows robustness to data heterogeneity in some tasks, it suffers from computational inefficiency due to the extensive matrix computations required during each communication round, both on the server and client sides. FFA-LoRA (Sun et al., 2024) and RoLoRA (Chen et al.) aim to improve accuracy in the presence of heterogeneity while simultaneously reducing trainable parameters. Our algorithms can reduce communication overhead while achieving comparable or better accuracy to these approaches, particularly when data heterogeneity exists.
|
| 51 |
+
|
| 52 |
+
(Kim et al., 2023) employs hypernetworks for
|
| 53 |
+
|
| 54 |
+
adapters to reduce the number of trainable parameters, and this approach can be integrated with any PEFT method, including ours. However, it introduces additional computational overhead, as each client must generate adapters from the hypernetwork (Hu et al., 2024).
|
| 55 |
+
|
| 56 |
+
# 2.3 Tensor-based Model Compression
|
| 57 |
+
|
| 58 |
+
Tensor compression has shown its great potential to reduce model size and enhance training efficiency. Early work by Novikov et al. (2015) employed the TT format for network compression. Recent efforts in tensorized fine-tuning of LLMs have shown promise in achieving high performance with significantly fewer parameters compared to traditional fine-tuning methods. However, these approaches still involve training a large number of variables, especially when compared to the more recent methods like LoRA. In response, Yang et al. (2024b) developed the Low-Rank Economic Tensor-Train Adaptation, which innovates by using tensorized-layer based adapters and reshaping update matrices into smaller tensor factors. Despite demonstrating substantial reductions in trainable parameters—up to 100 times less than popular PEFT methods—the performance of these tensorized approaches in FL scenarios, particularly in the presence of data heterogeneity, remains an open question.
|
| 59 |
+
|
| 60 |
+
# 3 Preliminaries
|
| 61 |
+
|
| 62 |
+
# 3.1 Federated Fine-tuning
|
| 63 |
+
|
| 64 |
+
Federated fine-tuning is a distributed approach for collaboratively fine-tuning a global model across a central server and a network of $N$ clients, denoted by $\mathcal{C} = \{c_1,\dots ,c_N\}$ . The objective is to optimize the global trainable parameters $\boldsymbol{w}$ by minimizing the following objective function:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\min _ {\boldsymbol {w}} \mathcal {L} (\tilde {\boldsymbol {w}}, \boldsymbol {w}) = \frac {1}{N} \sum_ {i = 1} ^ {N} \ell_ {i} (\tilde {\boldsymbol {w}}, \boldsymbol {w}; \mathcal {D} _ {i}),
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $\tilde{\boldsymbol{w}}$ is the pre-trained model parameters, which are identical and fixed for all clients, $\ell_i(\cdot)$ represents the local objective, and $\mathcal{D}_i$ represents the local data distribution for client $c_{i}$ .
|
| 71 |
+
|
| 72 |
+
A well-known FL method is the FedAvg algorithm (McMahan et al., 2017a). The server selects a subset of clients $S \subseteq \mathcal{C}$ in each training round. Each chosen client $c_s \in S$ initializes its local model with the global model parameters from the previous round $\boldsymbol{w}^{(t)}$ , and then performs local
|
| 73 |
+
|
| 74 |
+
training using stochastic gradient descent on its dataset for $K$ local updates:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\boldsymbol {w} _ {s} ^ {(t) + k + 1} \leftarrow \boldsymbol {w} _ {s} ^ {(t) + k} - \eta \nabla \ell_ {s} (\tilde {\boldsymbol {w}}, \boldsymbol {w} _ {s} ^ {(t) + k}; \mathcal {D} _ {s}),
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $\eta$ is the learning rate and $\pmb{w}_{s}^{(t) + k}$ refers to the local model parameters for client $c_{s}$ during communication round $t$ and local update $k$ . After local training is completed, clients send their updated model parameters to the server, which then aggregates these updates to form the new global model: $\pmb{w}^{(t + 1)} = 1 / |S|\sum_{s = 1}^{|S|}\pmb{w}_{s}^{(t) + K}$ .
|
| 81 |
+
|
| 82 |
+
Despite its advantages, FL faces two major challenges: (i) the large size of local models, which results in significant communication overhead, and (ii) data heterogeneity, which can cause local models to diverge from each other.
|
| 83 |
+
|
| 84 |
+
# 3.2 Tensor-Train Decomposition
|
| 85 |
+
|
| 86 |
+
In this subsection, we provide some introduction to the tensor and tensor train (TT) decomposition (Oseledets, 2011). Tensors are natural multidimensional generalizations of matrices. The tensor $\mathcal{W} \in \mathbb{R}^{k_1 \times \dots \times k_J}$ is indexed as $\mathcal{W} = (w_{i_1 \dots i_J})_{1 \leq i_j \leq k_j}$ said to have order of $J$ and dimension $k_1, \dots, k_J$ . Given two tensors $\mathcal{W} \in \mathbb{R}^{k_1 \times \dots \times k_J}$ and $\mathcal{V} \in \mathbb{R}^{l_1 \times \dots \times l_M}$ with $k_s = l_t$ , the multiplication between two tensors $\mathcal{C} = \mathcal{W} \times_{s,t} \mathcal{V}$ can be performed as:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\mathcal {C} _ {(i _ {p}) _ {p \neq s}, (j _ {p}) _ {p \neq t}} = \sum_ {i _ {s} = j _ {t} = 1} ^ {k _ {s}} w _ {i _ {1} \dots i _ {s} \dots i _ {J}} v _ {j _ {1} \dots j _ {t} \dots j _ {M}}.
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
The TT decomposition serves as a potent alternative to traditional matrix decomposition techniques, which decompose a large tensor into a list of tensor factors (Oseledets, 2011) by TT-SVD method. As shown in Fig. 1 (a), to decompose the weight matrix into small tensors, we begin by reshaping a matrix $\mathbf{W} \in \mathbb{R}^{P \times Q}$ into a tensor $\mathcal{W} \in \mathbb{R}^{k_1 \times \dots \times k_J}$ . Then $\mathcal{W}$ can be parameterized compactly via a sequence of $J$ tensor factors $\mathcal{G}_1, \ldots, \mathcal{G}_J$ as:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\mathcal {W} = \mathcal {G} _ {1} \times_ {3, 1} \mathcal {G} _ {2} \times_ {3, 1} \dots \times_ {3, 1} \mathcal {G} _ {J}, \tag {1}
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
Here, each tensor factor $\mathcal{G}_j$ has the shape of $\mathcal{G}_j\in \mathbb{R}^{r_{j - 1}\times k_j\times r_j}$ , where $\boldsymbol {r} = (r_0,r_1,\dots ,r_J)$ is the tensor rank, and the product of dimensions $\Pi_jk_j = P\cdot Q$ . The setup of tensor ranks follows the boundary conditions with $r_0 = r_J = 1$ , while the other ranks $r_j,j\notin 0,J$ are chosen based on specific tasks or made adaptive (Yang et al., 2024c).
|
| 99 |
+
|
| 100 |
+
As we can see, the tensorized layer substantially reduces the parameter count for the weight matrix
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 1: Illustration for the tensorized linear layer (a), FedTT algorithm (b), and the optional tensorized classifier applied for classification tasks (c). The FedTT algorithm workflow includes fine-tuning clients' tensorized adapters, aggregating tensor factors on the server, and broadcasting the updated weights back to clients.
|
| 104 |
+
|
| 105 |
+
$W$ from $P \times Q$ to $\sum_{i=1}^{d} r_{i-1} k_i r_i$ , offering a much higher compression ratio than previous PEFT work. Unlike the traditional Adapters method (Houlsby et al., 2019), which uses a bottleneck structure to reduce trainable parameters, our tensorized adapters achieve an even larger compression ratio by using two tensorized linear layers with a nonlinear activation in between. For example, with weight $W$ with size $768 \times 768$ and bottleneck size 64, a standard Adapter incurs $2 \cdot 768 \cdot 64 \approx 98K$ trainable parameters for its weight matrices, whereas our method adds only $\sum_{i=1}^{6} (5^2 \cdot 8) = 1.2K$ parameters (assuming core dimensions [8, 8, 8, 8, 8, 8] for $\mathcal{W}$ and TT rank 5). This high compression ratio enables FedTT to achieve higher performance under a similar communication cost compared with other PEFT approaches.
|
| 106 |
+
|
| 107 |
+
Instead of performing TT decomposition on the weight matrix, we directly initialize, store, and update the list of tensor factors in this work, as shown in Fig. 1 (a). During the forward pass, the tensor factors are directly contracted with the vector of activation values, and the weight matrix $W$ does not need to be reconstructed. Since the size of the tensor factors is small, the contraction process is significantly faster than the original matrix-vector product (Yang et al., 2024c).
|
| 108 |
+
|
| 109 |
+
# 4 Proposed Algorithm
|
| 110 |
+
|
| 111 |
+
In this section, we introduce the proposed FedTT method, which is built on a novel parameter-efficient tensorized adapter. This adapter is integrated into clients' local models to effectively adapt LLMs. We begin with discussing the structure and setup of the tensorized adapters, followed by the
|
| 112 |
+
|
| 113 |
+
introduction of FedTT and its enhanced version, $\mathrm{FedTT + }$ , which can be selected based on communication budget constraints. The workflow of our FedTT method is shown in Fig. 1 (b).
|
| 114 |
+
|
| 115 |
+
# 4.1 Tensorized Adapters
|
| 116 |
+
|
| 117 |
+
To facilitate fine-tuning in a FL framework, we incorporate tensorized adapters designed to adapt LLMs with minimal additional parameters. These adapters are underpinned by the novel tensorized linear layer (Yang et al., 2024b,a), which replaces the matrix weight in linear layers with more parameter-efficient TT format weights. This section first details the architecture of the tensorized linear layer and then elucidates the process of constructing tensorized adapters.
|
| 118 |
+
|
| 119 |
+
In Sec. 3.2, we introduced how to represent a weight matrix in the TT format, where the TT format tensor factors $\mathcal{G}_1,\ldots ,\mathcal{G}_J$ are initialized, stored, and updated during the fine-tuning process. The tensorized layer is successfully integrated into matrix-based LLMs, performing tensor contraction over the list of tensor factors and reshaping them to match the traditional weight matrix $W$ . Compared to traditional matrix-based linear layers, the tensorized layers only store the smaller tensor factors, significantly reducing the number of parameters.
|
| 120 |
+
|
| 121 |
+
We now introduce the tensorized adapters, built based on the tensorized layers in Fig. 1. These adapters use a bottleneck structure similar to that in the original sequential adapter methodology (Houlsby et al., 2019), comprising two tensorized linear layers with a nonlinear layer in between. The bottleneck structure further reduces the number of trainable parameters by decreasing the channels
|
| 122 |
+
|
| 123 |
+
Algorithm 1 FedTT
|
| 124 |
+
1: for communication round $t\gets 1$ to $T$ do
|
| 125 |
+
2: for clients $c_{i}\in \mathcal{C}$ in parallel do
|
| 126 |
+
3: for local update $k\gets 1$ to $K$ do
|
| 127 |
+
4: $\pmb {w}_i^{(t) + k + 1}\gets \mathrm{Update}(\pmb {w}_i^{(t) + k},\mathcal{D}_i)$
|
| 128 |
+
5: end for
|
| 129 |
+
6: Client $c_{i}$ sends $\pmb {w}_i^{(t) + K}$ to the server
|
| 130 |
+
7: end for
|
| 131 |
+
8: At server: $\pmb {w}^{(t + 1)} = \frac{1}{N}\sum_{i = 1}^{N}\pmb {w}_i^{(t) + K}$
|
| 132 |
+
9: Server sends $\pmb {w}^{(t + 1)}$ to all clients in $\mathcal{C}$
|
| 133 |
+
10: end for
|
| 134 |
+
|
| 135 |
+
connected between the two tensorized layers and the nonlinearity layer, from the size of the hidden dimension to a smaller number, such as 64. As illustrated in Fig. 1 (b), the tensorized adapter is strategically placed after the attention and MLP components of an encoder/decoder block. In practical applications, we compress the classification head (linear layer) into a tensorized layer and make it trainable for sequence classification tasks, as shown in Fig. 1 (c). Instead, we retain the original language model head without compression for general language modeling tasks, as experiments show a significant reduction in performance when the language modeling head is compressed.
|
| 136 |
+
|
| 137 |
+
# 4.2 FedTT Method
|
| 138 |
+
|
| 139 |
+
We introduce the FedTT algorithm, as outlined in Alg. 1. In FedTT, the full model weights and architecture are initially distributed to all clients in the set $\mathcal{C} = \{c_1,\dots ,c_N\}$ at the start of the fine-tuning process. Tensorized adapters are then injected into each client's local model and designated as the trainable parameters. FedTT operates over $T$ communication rounds, where each client performs $K$ local updates on its trainable parameters during each round.
|
| 140 |
+
|
| 141 |
+
During the communication round $t$ , each client $c_{i} \in \mathcal{C}$ updates its trainable parameters $\boldsymbol{w}_{i}^{(t)}$ , including the tensorized classifier, tensorized adapter, and bias terms (if they exist), for $K$ local updates. Afterward, each client sends its updated parameters, $\boldsymbol{w}_{i}^{(t) + K}$ , to the central server. The server then aggregates the weights as $\boldsymbol{w}^{(t + 1)} = 1 / N\sum_{i = 1}^{N}\boldsymbol{w}_{i}^{(t) + K}$ for the next training round and sends updated weights $\boldsymbol{w}^{(t + 1)}$ back to the clients. Note that while we have primarily described cross-silo FL scenarios, the LSCD FL setting operates similarly, with the key distinction being that in each communication round, the server sends the aggregated weights to a randomly chosen subset of clients $S \subseteq C$ , rather than to all clients in $\mathcal{C}$ .
|
| 142 |
+
|
| 143 |
+
Algorithm 2 FedTT+
|
| 144 |
+
1: for communication round $t\gets 1$ to $T$ do
|
| 145 |
+
2: for clients $c_{i}\in \mathcal{C}$ in parallel do
|
| 146 |
+
3: $r\gets$ (choose index $r$ s.t. mod $(t,J - 2) = r - 1)$
|
| 147 |
+
4: for local update $k\gets 1$ to $K$ do
|
| 148 |
+
5: for $h\in \{1,r,J\}$
|
| 149 |
+
6: $\mathcal{G}_{i,h}^{(t) + k + 1}\gets \mathrm{Update}(\mathcal{G}_{i,h}^{(t) + k};\mathcal{D}_i)$
|
| 150 |
+
7: end for
|
| 151 |
+
8: Client $c_{i}$ sends $\{\mathcal{G}_{i,1}^{(t) + K},\mathcal{G}_{i,r}^{(t) + K},\mathcal{G}_{i,J}^{(t) + K}\}$ to server
|
| 152 |
+
9: end for
|
| 153 |
+
10: At server: $\mathcal{G}_h^{(t + 1)} = \frac{1}{N}\sum_{i = 1}^N\mathcal{G}_{i,h}^{(t) + K}$ for $h\in \{1,r,J\}$
|
| 154 |
+
11: Server sends $\{\mathcal{G}_1^{(t + 1)},\mathcal{G}_r^{(t + 1)},\mathcal{G}_J^{(t + 1)}\}$ to all clients in $\mathcal{C}$
|
| 155 |
+
12: end for
|
| 156 |
+
|
| 157 |
+
Compared with most previous federated PEFT methods, FedTT significantly reduces communication overhead by only transferring small tensor factors. This approach leads to over $10 \times$ communication reduction compared to LoRA adapters, as demonstrated in Sec. 4.1, making FedTT particularly advantageous in FL scenarios where efficient communication is critical.
|
| 158 |
+
|
| 159 |
+
# 4.3 FedTT+ Method
|
| 160 |
+
|
| 161 |
+
In this section, we propose an improved version of the FedTT method, named FedTT+ to further reduce the number of trainable parameters and enhance FedTT's suitability for scenarios with data heterogeneity. Before introducing FedTT+, we first explain the intuitive idea behind it.
|
| 162 |
+
|
| 163 |
+
In FedTT, the loss for back-propagation is computed on the product of tensor factors $\mathcal{G}_1,\ldots ,\mathcal{G}_J$ However, under the federated setup, the aggregations in the server are performed separately on $\mathcal{G}_1,\dots ,\mathcal{G}_J$ . This practice introduces additional terms in the product of the averaged $\mathcal{G}_1,\dots ,\mathcal{G}_J$ which may slow down the convergence of the algorithms. Ideally, the aggregation on the server should be performed on the product of the lowrank matrices $\mathcal{G}_1,\ldots ,\mathcal{G}_J$ . The left-hand side of Eq. (2) shows the parameters after aggregation with FedTT using FedAvg, while the right-hand side represents the ideal aggregation.
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
\begin{array}{l} \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \mathcal {G} _ {i, 1}\right) \times_ {3, 1} \dots \times_ {3, 1} \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \mathcal {G} _ {i, J}\right) \tag {2} \\ \neq \frac {1}{N} \sum_ {i = 1} ^ {N} \mathcal {G} _ {i, 1} \times_ {3, 1} \dots \times_ {3, 1} \mathcal {G} _ {i, J}, \\ \end{array}
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
where $\mathcal{G}_{i,j}$ is the tensor factor $j$ for clientuser $c_{i}$ . It is important to note that the difference between the right-hand side and the left-hand side of Eq. (2)
|
| 170 |
+
|
| 171 |
+
Table 1: Comparative analysis of various federated PEFT methods using the DeBERTa-Base model in a cross-silo FL setting with an i.i.d. data distribution and 5 clients.
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Model & Method</td><td>#Param.</td><td>MRPC</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>Avg.</td></tr><tr><td>DeBERTa-Base (LoRAr=8)</td><td>0.30M</td><td>91.87</td><td>94.95</td><td>92.68</td><td>89.2</td><td>87.31</td><td>91.10</td></tr><tr><td>DeBERTa-Base (P-Tuning)</td><td>0.30M</td><td>82.01</td><td>90.48</td><td>82.12</td><td>84.0</td><td>80.74</td><td>83.87</td></tr><tr><td>DeBERTa-Base (LoRAr=4)</td><td>0.15M</td><td>91.72</td><td>94.95</td><td>92.66</td><td>86.7</td><td>86.91</td><td>90.58</td></tr><tr><td>DeBERTa-Base (BitFit)</td><td>0.10M</td><td>91.33</td><td>94.72</td><td>91.89</td><td>88.4</td><td>86.02</td><td>90.47</td></tr><tr><td>DeBERTa-Base (RoLoRAr=4)</td><td>0.08M</td><td>91.17</td><td>94.61</td><td>92.40</td><td>87.9</td><td>86.27</td><td>90.47</td></tr><tr><td>DeBERTa-Base (Prompt)</td><td>0.01M</td><td>82.96</td><td>92.32</td><td>82.13</td><td>80.5</td><td>74.46</td><td>82.47</td></tr><tr><td>DeBERTa-Base (FedTT)</td><td>0.06M</td><td>92.68</td><td>94.61</td><td>92.02</td><td>88.4</td><td>85.99</td><td>90.74</td></tr><tr><td>DeBERTa-Base (FedTT+)</td><td>0.02M</td><td>92.60</td><td>93.58</td><td>90.54</td><td>87.9</td><td>85.33</td><td>89.99</td></tr></table>
|
| 174 |
+
|
| 175 |
+
becomes more significant when: i) the number of clients is large, ii) the clients have non-IID data distributions, and iii) the number of local updates in each communication round is substantial.
|
| 176 |
+
|
| 177 |
+
In $\mathrm{FedTT + }$ we alleviate this interference problem by freezing most of the tensor factors in each communication round and only updating a small fraction of them. In this approach, most of the tensor factors remain fixed and identical across all clients during training while only a few tensor factors are trainable in each communication round. For example, assume that we just update $\mathcal{G}_1$ and freeze $\mathcal{G}_2,\dots ,\mathcal{G}_J$ in communication $t$ . Then, $\mathcal{G}_2,\ldots ,\mathcal{G}_J$ are identical across the clients and Eq. (2) can be re-written as
|
| 178 |
+
|
| 179 |
+
$$
|
| 180 |
+
\begin{array}{l} \left(\frac {1}{N} \sum_ {i = 1} ^ {N} \mathcal {G} _ {i, 1} ^ {(t)}\right) \times_ {3, 1} \mathcal {G} _ {2} ^ {(t - 1)} \times_ {3, 1} \dots \times_ {3, 1} \mathcal {G} _ {J} ^ {(t - 1)} \\ = \frac {1}{N} \sum_ {i = 1} ^ {N} \left(\mathcal {G} _ {i, 1} ^ {(t)} \times_ {3, 1} \mathcal {G} _ {2} ^ {(t - 1)} \times_ {3, 1} \dots \times_ {3, 1} \mathcal {G} _ {J} ^ {(t - 1)}\right). \\ \end{array}
|
| 181 |
+
$$
|
| 182 |
+
|
| 183 |
+
This modification to FedTT can improve accuracy, particularly in cases of severe data heterogeneity. The detailed algorithm is presented in Algorithm 2.
|
| 184 |
+
|
| 185 |
+
FedTT+ operates similarly to FedTT, but with a key difference: in each communication round $t$ , an index $r$ is selected from the set $r \in \{2, \dots, J - 1\}$ (line 3 in Alg. 2). In this process, $\{\mathcal{G}_1, \mathcal{G}_r, \mathcal{G}_J\}$ are set as trainable parameters (as the first and last tensors are always trained), while the other factors, $\{\mathcal{G}_2, \dots, \mathcal{G}_{r-1}, \mathcal{G}_{r+1}, \dots, \mathcal{G}_{J-1}\}$ , remain frozen (line 5 and 6 in Alg. 2). As a result, clients only send their updated $\{\mathcal{G}_{i,1}, \mathcal{G}_{i,r}, \mathcal{G}_{i,J}\}$ to the server for aggregation, significantly reducing communication overhead. Note that the classification head is always trainable and present in all communication rounds.
|
| 186 |
+
|
| 187 |
+
(Sun et al., 2024; Chen et al.) have also demonstrated that freezing certain parameters improves the performance of LoRA in the presence of data
|
| 188 |
+
|
| 189 |
+
heterogeneity, particularly with larger models like RoBERTa-large. In the numerical section, we compare FedTT+ with their method under the same settings and show that our approach achieves comparable or better accuracy while using even fewer trainable parameters.
|
| 190 |
+
|
| 191 |
+
# 5 Numerical Results
|
| 192 |
+
|
| 193 |
+
# 5.1 Experiments Setup
|
| 194 |
+
|
| 195 |
+
We conduct extensive experiments to evaluate the performance of the proposed algorithms across various language models. For the BERT-family models, we utilize RoBERTa-base (Liu et al., 2019), DeBERTa-base (He et al., 2020), and RoBERTa-large (Liu et al., 2019), while for large-scale models, we employed LLaMA-2 (Touvron et al., 2023). Using these models, we compare the proposed algorithm against several PEFT methods in FL scenarios, including BitFit, LoRA, Adapter, Prefix-Tuning, and Prompt-Tuning. Additionally, we benchmark it against SOTA federated PEFT methods such as FFA-LoRA (Sun et al., 2024) and RoLoRA (Chen et al.).
|
| 196 |
+
|
| 197 |
+
We consider two main FL scenarios: the cross-silo FL scenario (Kairouz et al., 2021) and the LSCD FL scenario (Lai et al., 2022). The cross-silo scenario is suitable for networks with typically fewer than 100 clients. In this case, the server sends the updated model to all clients, meaning every client participates in training during each communication round. In contrast, LSCD FL is more appropriate for environments with thousands of clients, where only a randomly selected subset of clients is involved in each training round. For cross-silo FL, the number of clients is set to $n \in \{5, 10, 20, 50\}$ , while for LSCD FL, similar to (Zhang et al., 2023), we randomly select 10 clients from a pool of 1000. All experiments are conducted using the AdamW optimizer (Loshchilov and Hutter, 2018), with a
|
| 198 |
+
|
| 199 |
+
Table 2: Comparative analysis of various federated PEFT methods using the RoBERTa-Base model. The reported accuracy for federated LoRA, Adapter, Prefix, and BitFit methods is sourced from (Zhang et al., 2023).
|
| 200 |
+
|
| 201 |
+
<table><tr><td>Model & Method</td><td>#Param.</td><td>MRPC</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>Avg.</td></tr><tr><td>RoBERTa-Base (Prefix)</td><td>3.50M</td><td>88.1</td><td>93.7</td><td>84.6</td><td>81.8</td><td>80.4</td><td>85.7</td></tr><tr><td>RoBERTa-Base (P-Tuning)</td><td>0.88M</td><td>86.8</td><td>92.1</td><td>85.6</td><td>81.5</td><td>79.8</td><td>85.2</td></tr><tr><td>RoBERTa-Base (Adapter)</td><td>0.70M</td><td>88.5</td><td>94.0</td><td>85.9</td><td>87.0</td><td>84.9</td><td>88.1</td></tr><tr><td>RoBERTa-Base (IA3)</td><td>0.65M</td><td>88.0</td><td>93.0</td><td>89.4</td><td>85.4</td><td>82.7</td><td>87.7</td></tr><tr><td>RoBERTa-Base (LoRA)</td><td>0.30M</td><td>89.8</td><td>94.4</td><td>86.0</td><td>86.5</td><td>84.7</td><td>88.3</td></tr><tr><td>RoBERTa-Base (BitFit)</td><td>0.10M</td><td>88.6</td><td>92.8</td><td>80.5</td><td>84.0</td><td>80.7</td><td>85.3</td></tr><tr><td>RoBERTa-Base (FedTT)</td><td>0.06M</td><td>88.9</td><td>93.8</td><td>88.9</td><td>86.2</td><td>84.2</td><td>88.4</td></tr></table>
|
| 202 |
+
|
| 203 |
+
similar learning rate and batch size setup across different methods. We perform the experiments on NVIDIA A6000 and V100 GPUs.
|
| 204 |
+
|
| 205 |
+
# 5.2 Performance on the BERT Family
|
| 206 |
+
|
| 207 |
+
We conduct experiments using the Generalized Language Understanding Evaluation (GLUE) benchmark (Wang et al., 2018), employing the complete training dataset for each task. We record the best validation results after the 100 communication round for cross-silo FL and after the 1000 communication round for LSCD FL. Initially, we compare FedTT and FedTT+ with various PEFT methods in a cross-silo FL setting, using the DeBERTa-base model and assuming independent and identically distributed (i.i.d.) data among clients. We set the number of clients to 5 and the local training epochs to 1. The results, shown in Table 1, indicate that FedTT achieves a higher average score compared to other methods with lower than $0.15M$ trainable parameters. Notably, FedTT exhibits only a $0.5\%$ performance gap compared to LoRA with a rank of 8, which has $5\times$ more trainable parameters. FedTT+ achieves comparable accuracy to other methods while drastically reducing the number of trainable parameters. It exhibits only a $0.6\%$ performance gap compared to LoRA with a rank of 4, while using $6\times$ fewer trainable parameters, which significantly lowers communication overhead.
|
| 208 |
+
|
| 209 |
+
We then use the RoBERTa-base model to further evaluate FedTT against other PEFT methods. For the MRPC and SST-2 tasks, we employ a cross-silo FL setup with 10 clients, while for the other tasks, we apply a LSCD FL configuration with 1000 clients, randomly selecting 10 clients per round. Our settings for the RoBERTa-base model align with those in (Zhang et al., 2023), allowing us to leverage their results of PEFT methods like LoRA, Adapter, Prefix, and BitFit under FL settings. Table 2 shows that FedTT achieves a higher
|
| 210 |
+
|
| 211 |
+

|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
Figure 2: Test accuracies versus communication rounds for RoBERTa-Large models across different tasks in a cross-silo FL setting with 50 clients.
|
| 217 |
+
|
| 218 |
+

|
| 219 |
+
|
| 220 |
+
average score with the fewest trainable parameters among all methods. Additional details regarding Tables 1 and 2 are provided in Appendices A.3 and A.4, respectively.
|
| 221 |
+
|
| 222 |
+
# 5.3 Impact of Data Heterogeneity
|
| 223 |
+
|
| 224 |
+
Similar to (Chen et al.), we simulate varying levels of data heterogeneity by using different numbers of clients: 3 clients (i.i.d. data distribution), 20 clients (mild heterogeneity), and 50 clients (severe heterogeneity), with 20 local updates to further increase data heterogeneity. To ensure a comparable number of trainable parameters, we make the last 6 layers trainable for the SST-2 dataset and the last 9 layers for the other datasets in LoRA, FFA-LoRA, RoLoRA, and FedTT. In contrast, for FedTT+, all layers are made trainable. Additional details are provided in Appendix A.5. Our RoBERTa-Large model settings align with those in (Che et al., 2023), allowing us to leverage their results for LoRA, FFA-LoRA, and RoLoRA methods. As shown in Table 3, FedTT+ consistently outperforms the
|
| 225 |
+
|
| 226 |
+
Table 3: Comparison of SOTA cross-silo FL methods using RoBERTa-Large models under varying degrees of data heterogeneity. The accuracies for LoRA, FFA-LoRA, and RoLoRA methods are sourced from (Chen et al.).
|
| 227 |
+
|
| 228 |
+
<table><tr><td>Data Dist.</td><td>Model & Method</td><td>#Param.</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>Avg.</td></tr><tr><td rowspan="5">i.i.d.</td><td>RoBERTa-Large (LoRAr=2)</td><td>68K</td><td>95.64</td><td>92.04</td><td>85.85</td><td>86.16</td><td>89.92</td></tr><tr><td>RoBERTa-Large (FFA-LoRAr=2)</td><td>34K</td><td>94.91</td><td>90.11</td><td>84.06</td><td>85.48</td><td>88.64</td></tr><tr><td>RoBERTa-Large (RoLOAR=2)</td><td>34K</td><td>95.60</td><td>91.62</td><td>85.66</td><td>86.16</td><td>89.76</td></tr><tr><td>RoBERTa-Large (FedTT)</td><td>51K</td><td>94.38</td><td>93.01</td><td>88.30</td><td>87.20</td><td>90.72</td></tr><tr><td>RoBERTa-Large (FedTT+)</td><td>28K</td><td>95.64</td><td>94.05</td><td>88.99</td><td>88.27</td><td>91.74</td></tr><tr><td rowspan="5">mild het.</td><td>RoBERTa-Large (LoRAr=2)</td><td>68K</td><td>94.27</td><td>86.91</td><td>81.22</td><td>82.07</td><td>86.12</td></tr><tr><td>RoBERTa-Large (FFA-LoRAr=2)</td><td>34K</td><td>93.92</td><td>89.58</td><td>80.51</td><td>82.62</td><td>86.66</td></tr><tr><td>RoBERTa-Large (RoLOAR=2)</td><td>34K</td><td>94.84</td><td>90.77</td><td>85.13</td><td>85.10</td><td>88.96</td></tr><tr><td>RoBERTa-Large (FedTT)</td><td>51K</td><td>94.15</td><td>91.38</td><td>86.25</td><td>86.53</td><td>89.58</td></tr><tr><td>RoBERTa-Large (FedTT+)</td><td>28K</td><td>95.64</td><td>92.60</td><td>87.76</td><td>88.11</td><td>91.03</td></tr><tr><td rowspan="5">sever het.</td><td>RoBERTa-Large (LoRAr=2)</td><td>68K</td><td>93.23</td><td>82.57</td><td>58.96</td><td>76.96</td><td>77.93</td></tr><tr><td>RoBERTa-Large (FFA-LoRAr=2)</td><td>34K</td><td>92.32</td><td>85.15</td><td>62.79</td><td>77.78</td><td>79.51</td></tr><tr><td>RoBERTa-Large (RoLOAR=2)</td><td>34K</td><td>94.61</td><td>89.83</td><td>85.15</td><td>85.55</td><td>88.78</td></tr><tr><td>RoBERTa-Large (FedTT)</td><td>51K</td><td>94.38</td><td>90.55</td><td>85.47</td><td>85.27</td><td>88.92</td></tr><tr><td>RoBERTa-Large (FedTT+)</td><td>28K</td><td>94.50</td><td>90.17</td><td>86.65</td><td>86.28</td><td>89.40</td></tr></table>
|
| 229 |
+
|
| 230 |
+
Table 4: Comparison of cross-silo FL methods using RoBERTa-Large models under varying differential privacy guarantees. The accuracies for LoRA and FFA-LoRA methods are sourced from (Sun et al., 2024).
|
| 231 |
+
|
| 232 |
+
<table><tr><td>Priv. Budget</td><td>Method</td><td>#Param.</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td></tr><tr><td rowspan="3">ε = 6</td><td>LORAr=8</td><td>1.57M</td><td>93.70</td><td>84.99</td><td>82.11</td><td>39.46</td></tr><tr><td>FFA-LOARr=8</td><td>0.79M</td><td>93.73</td><td>87.27</td><td>83.31</td><td>78.81</td></tr><tr><td>FedTT</td><td>0.24M</td><td>93.80</td><td>87.43</td><td>84.61</td><td>85.45</td></tr><tr><td rowspan="3">ε = 3</td><td>LORAr=8</td><td>1.57M</td><td>93.32</td><td>83.94</td><td>82.08</td><td>35.82</td></tr><tr><td>FFA-LOARr=8</td><td>0.79M</td><td>93.59</td><td>86.18</td><td>83.03</td><td>77.42</td></tr><tr><td>FedTT</td><td>0.24M</td><td>93.96</td><td>86.64</td><td>84.36</td><td>85.08</td></tr><tr><td rowspan="3">ε = 1</td><td>LORAr=8</td><td>1.57M</td><td>94.32</td><td>88.95</td><td>81.28</td><td>33.80</td></tr><tr><td>FFA-LOARr=8</td><td>0.79M</td><td>94.32</td><td>90.35</td><td>82.50</td><td>75.05</td></tr><tr><td>FedTT</td><td>0.24M</td><td>95.64</td><td>91.67</td><td>83.11</td><td>83.81</td></tr></table>
|
| 233 |
+
|
| 234 |
+
other methods across varying heterogeneity settings while utilizing fewer parameters. This further demonstrates that, under a comparable number of trainable parameters and in the presence of data heterogeneity, FedTT+ outperforms FedTT, highlighting the effectiveness of adaptively freezing tensorized adapters in addressing data heterogeneity. Fig. 2 illustrates test accuracy versus the number of communication rounds in the severe heterogeneity scenario, showing that FedTT+ achieves faster convergence than RoLoRA across multiple tasks. An additional experiment examining the effect of data heterogeneity using an alternative heterogeneity measure is provided in Appendix B.
|
| 235 |
+
|
| 236 |
+
# 5.4 Performance on Larger Models
|
| 237 |
+
|
| 238 |
+
We use SuperGLUE tasks (Wang et al., 2019) and a generation task (SQuAD (Rajpurkar et al., 2016)) to compare FedTT and FedTT+ with LoRA. The results are shown in Table 5. We use the LLaMA2-7B model to simulate LSCD FL with 1000 clients, where 10 of them are chosen randomly in each round for training. Additional details are provided
|
| 239 |
+
|
| 240 |
+
in Appendix A.6. FedTT has performance nearly identical to LoRA with a rank of 8, while achieving about $10 \times$ lower communication overhead. For cross-silo FL, we utilize the LLaMA2-13B model with 10 clients. As seen in Table 5, both FedTT and FedTT+ demonstrate performance close to LoRA, with $10 \times$ and $30 \times$ lower communication overhead, respectively.
|
| 241 |
+
|
| 242 |
+
# 5.5 Communication Cost Analysis
|
| 243 |
+
|
| 244 |
+
In this section, we present the communication cost analysis for the MNLI task of Table 1 in Table 6. The analysis for all tasks of Table 1 and Table 3 can be found in Appendix C. Following (Guo et al., 2024), we compare the proposed method with baselines in terms of: (i) Up-link message size (in KB) per communication round, (ii) Number of communication rounds required to reach $95\%$ of the prediction accuracy reported in Table 1, and (iii) Total size of transmitted messages. As demonstrated, our proposed algorithms effectively minimize both the up-link message size and the total size of transmitted messages.
|
| 245 |
+
|
| 246 |
+
# 5.6 Differential privacy guarantees
|
| 247 |
+
|
| 248 |
+
We compare our proposed FedTT algorithm with baseline methods under differential privacy guarantees. Definitions and theoretical results related to DP are provided in Appendix D. Following (Sun et al., 2024), we train the RoBERTa-Large model with a learning rate of $1e - 3$ and three clients. We implement the DP-SGD algorithm using the Opacus (Yousefpour et al., 2021) library with privacy parameters $\delta = 1e - 5$ and three different privacy budgets, $\epsilon \in \{1,3,6\}$ . The clipping threshold is
|
| 249 |
+
|
| 250 |
+
Table 5: Comparative analysis of LoRA, FedTT, and FedTT+ using the LLaMA2-7B and LLaMA2-13B models.
|
| 251 |
+
|
| 252 |
+
<table><tr><td>Fed. Set.</td><td>Model & Method</td><td>#Param.</td><td>COPA</td><td>ReCoRD</td><td>SQuAD</td><td>Avg.</td></tr><tr><td rowspan="2">large-scale FL</td><td>LLaMA2-7B (LoRAr=8)</td><td>4.19M</td><td>87</td><td>81.0</td><td>90.49</td><td>86.16</td></tr><tr><td>LLaMA2-7B (FedTT)</td><td>0.52M</td><td>90</td><td>80.1</td><td>89.32</td><td>86.47</td></tr><tr><td rowspan="3">cross-silo FL</td><td>LLaMA2-13B (LoRAr=8)</td><td>6.55M</td><td>89</td><td>83.6</td><td>91.07</td><td>87.89</td></tr><tr><td>LLaMA2-13B (FedTT)</td><td>0.64M</td><td>89</td><td>83.5</td><td>90.06</td><td>87.52</td></tr><tr><td>LLaMA2-13B (FedTT+)</td><td>0.18M</td><td>88</td><td>83.7</td><td>90.40</td><td>87.70</td></tr></table>
|
| 253 |
+
|
| 254 |
+
Table 6: Total transmitted messages for the MNLI task.
|
| 255 |
+
|
| 256 |
+
<table><tr><td>Methods</td><td colspan="3">Total transmitted messages (KB)</td><td>Comm. overhead</td></tr><tr><td>LoRA</td><td>1172</td><td></td><td></td><td>×1.88</td></tr><tr><td>BitFit</td><td>390</td><td></td><td></td><td>×0.62</td></tr><tr><td>RoLoRA</td><td>624</td><td></td><td></td><td>×1.00</td></tr><tr><td>Prompt</td><td>1523</td><td></td><td></td><td>×2.44</td></tr><tr><td>FedTT</td><td>234</td><td></td><td></td><td>×0.37</td></tr><tr><td>FedTT+</td><td>78</td><td></td><td></td><td>×0.12</td></tr></table>
|
| 257 |
+
|
| 258 |
+
Table 7: Tensor rank analysis using the DeBERTa-Base model.
|
| 259 |
+
|
| 260 |
+
<table><tr><td>Model & Method</td><td>#Param.</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>Avg.</td></tr><tr><td>FedTTr=2</td><td>0.03M</td><td>93.58</td><td>90.76</td><td>86.79</td><td>85.29</td><td>89.10</td></tr><tr><td>FedTTr=5</td><td>0.06M</td><td>93.00</td><td>91.87</td><td>87.65</td><td>85.91</td><td>89.61</td></tr><tr><td>FedTTr=10</td><td>0.17M</td><td>93.69</td><td>92.48</td><td>88.22</td><td>87.01</td><td>90.35</td></tr></table>
|
| 261 |
+
|
| 262 |
+
chosen from $C\in \{2,5\}$
|
| 263 |
+
|
| 264 |
+
We follow the experimental setup from (Sun et al., 2024), enabling direct evaluation against LoRA and FFA-LoRA. The results in Table 4 demonstrate that FedTT consistently achieves higher accuracy across different privacy budgets while using fewer trainable parameters. Notably, the largest performance gap is observed in the MNLI task, a three-class classification problem.
|
| 265 |
+
|
| 266 |
+
# 5.7 Tensor Rank Analysis
|
| 267 |
+
|
| 268 |
+
In this section, we evaluate the performance of the proposed FedTT method with varying tensor ranks across four datasets using the DeBERTa-base model. The number of clients is set to 5, each performing one local update per round. We use a learning rate of $1e - 3$ and a batch size of 32. The best validation results are reported after 20 communication rounds. As shown in Table 7, higher tensor ranks lead to better average accuracy, albeit at the cost of an increased number of trainable parameters. In our experiments, we set the rank to 5, as it offers a favorable trade-off between accuracy and model size.
|
| 269 |
+
|
| 270 |
+
# 6 Conclusion
|
| 271 |
+
|
| 272 |
+
This work presents a novel federated and tensorized fine-tuning framework, addressing the key challenges of communication overhead and data heterogeneity in FL. FedTT leverages tensorized adapters to significantly reduce communication costs while maintaining high performance, achieving up to a $10 \times$ reduction in trainable parameters compared to existing methods. Additionally, FedTT+ enhances robustness in cross-silo FL by adaptively freezing portions of tensor factors, further optimizing parameter efficiency. Extensive experiments with models like BERT and LLaMA-2 demonstrate the effectiveness of FedTT and FedTT+ in both cross-silo and LSCD FL settings, offering a scalable and communication-efficient solution for fine-tuning LLMs in distributed environments.
|
| 273 |
+
|
| 274 |
+
# Limitations
|
| 275 |
+
|
| 276 |
+
In this work, while we addressed the data heterogeneity challenge, we did not conduct experiments on another significant challenge in FL: system heterogeneity. However, our framework has the potential to tackle this challenge as well, by allowing different tensor ranks to be assigned to clients based on their computational capabilities. This presents an interesting direction for future research.
|
| 277 |
+
|
| 278 |
+
# Acknowledgments
|
| 279 |
+
|
| 280 |
+
This work was supported by the National Science Foundation under Grant 2419982 and Grant 2342253. Z. Zhang and Y. Yang were supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Artificial Intelligence for Science program, under contract DE-SC0025390. This research used resources of the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231 using NERSC award ASCR-ERCAP0030039.
|
| 281 |
+
|
| 282 |
+
# References
|
| 283 |
+
|
| 284 |
+
Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. 2016. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC conference on computer and communications security, pages 308-318.
|
| 285 |
+
Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774.
|
| 286 |
+
Sara Babakniya, Ahmed Roushdy Elkordy, Yahya H Ezzeldin, Qingfeng Liu, Kee-Bong Song, Mostafa El-Khamy, and Salman Avestimehr. 2023. SLoRA: federated parameter efficient fine-tuning of language models. arXiv preprint arXiv:2308.06522.
|
| 287 |
+
Jiamu Bai, Daoyuan Chen, Bingchen Qian, Liuyi Yao, and Yaliang Li. 2024. Federated fine-tuning of large language models under heterogeneous language tasks and client resources. arXiv preprint arXiv:2402.11505.
|
| 288 |
+
Rouzbeh Behnia, Arman Riasi, Reza Ebrahimi, Sherman SM Chow, Balaji Padmanabhan, and Thang Hoang. 2024. Efficient secure aggregation for privacy-preserving federated machine learning. In 2024 Annual Computer Security Applications Conference (ACSAC), pages 778-793. IEEE.
|
| 289 |
+
Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeannette Bohg, Antoine Bosse-lut, Emma Brunskill, et al. 2021. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258.
|
| 290 |
+
Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, et al. 2021. Extracting training data from large language models. In 30th USENIX Security Symposium (USENIX Security 21), pages 2633-2650.
|
| 291 |
+
Tianshi Che, Ji Liu, Yang Zhou, Jiaxiang Ren, Jiwen Zhou, Victor S Sheng, Huaiyu Dai, and Dejing Dou. 2023. Federated learning of large language models with parameter-efficient prompt tuning and adaptive optimization. arXiv preprint arXiv:2310.15080.
|
| 292 |
+
Shuangyi Chen, Yue Ju, Hardik Dalal, Zhongwen Zhu, and Ashish J Khisti. Robust federated finetuning of foundation models via alternating minimization of LoRA. In Workshop on Efficient Systems for Foundation Models II@ ICML2024.
|
| 293 |
+
Yae Jee Cho, Luyang Liu, Zheng Xu, Aldi Fahrezi, Matt Barnes, and Gauri Joshi. 2023. Heterogeneous lora for federated fine-tuning of on-device foundation models. In International Workshop on Federated Learning in the Age of Foundation Models in conjunction with NeurIPS 2023.
|
| 294 |
+
|
| 295 |
+
Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005. The pascal recognising textual entailment challenge. In *Machine learning challenges workshop*, pages 177-190. Springer.
|
| 296 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
|
| 297 |
+
Ning Ding, Yujia Qin, Guang Yang, Fuchao Wei, Zonghan Yang, Yusheng Su, Shengding Hu, Yulin Chen, Chi-Min Chan, Weize Chen, et al. 2023. Parameter-efficient fine-tuning of large-scale pretrained language models. Nature Machine Intelligence, 5(3):220-235.
|
| 298 |
+
Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. 2006. Calibrating noise to sensitivity in private data analysis. In *Theory of Cryptography: Third Theory of Cryptography Conference*, TCC 2006, New York, NY, USA, March 4-7, 2006. Proceedings 3, pages 265-284. Springer.
|
| 299 |
+
Mohammadjavad Ebrahimi, Uday V Shanbhag, and Farzad Yousefian. 2024. Distributed gradient tracking methods with guarantees for computing a solution to stochastic mpecs. In 2024 American Control Conference (ACC), pages 2182-2187. IEEE.
|
| 300 |
+
Tao Fan, Yan Kang, Guoqiang Ma, Weijing Chen, Wenbin Wei, Lixin Fan, and Qiang Yang. 2023. Fate-lm: A industrial grade federated learning framework for large language models. arXiv preprint arXiv:2310.10049.
|
| 301 |
+
Sajjad Ghiasvand, Amirhossein Reisizadeh, Mahnoosh Alizadeh, and Ramtin Pedarsani. 2024. Robust decentralized learning with local updates and gradient tracking. arXiv preprint arXiv:2405.00965.
|
| 302 |
+
Pengxin Guo, Shuang Zeng, Yanran Wang, Huijie Fan, Feifei Wang, and Liangqiong Qu. 2024. Selective aggregation for low-rank adaptation in federated learning. arXiv preprint arXiv:2410.01463.
|
| 303 |
+
Erfan Hajihashemi and Yanning Shen. Multi-model ensemble conformal prediction in dynamic environments. In The Thirty-eighth Annual Conference on Neural Information Processing Systems.
|
| 304 |
+
Zeyu Han, Chao Gao, Jinyang Liu, Sai Qian Zhang, et al. 2024. Parameter-efficient fine-tuning for large models: A comprehensive survey. arXiv preprint arXiv:2403.14608.
|
| 305 |
+
Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2020. Deberta: Decoding-enhanced bert with disentangled attention. In International Conference on Learning Representations.
|
| 306 |
+
Shwai He, Liang Ding, Daize Dong, Miao Zhang, and Dacheng Tao. 2022. Sparseadapter: An easy approach for improving the parameter-efficiency of adapters. arXiv preprint arXiv:2210.04284.
|
| 307 |
+
|
| 308 |
+
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for nlp. In International conference on machine learning, pages 2790-2799. PMLR.
|
| 309 |
+
Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. arXiv preprint arXiv:1801.06146.
|
| 310 |
+
Kevin Hsieh, Amar Phanishayee, Onur Mutlu, and Phillip Gibbons. 2020. The non-iid data quagmire of decentralized machine learning. In International Conference on Machine Learning, pages 4387-4398. PMLR.
|
| 311 |
+
Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685.
|
| 312 |
+
Jiahui Hu, Dan Wang, Zhibo Wang, Xiaoyi Pang, Huiyu Xu, Ju Ren, and Kui Ren. 2024. Federated large language model: Solutions, challenges and future directions. IEEE Wireless Communications.
|
| 313 |
+
Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Kallista Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. 2021. Advances and open problems in federated learning. Foundations and trends® in machine learning, 14(1-2):1-210.
|
| 314 |
+
Yeachan Kim, Junho Kim, Wing-Lam Mok, Jun-Hyung Park, and SangKeun Lee. 2023. Client-customized adaptation for parameter-efficient federated learning. In Findings of the Association for Computational Linguistics: ACL 2023, pages 1159-1172.
|
| 315 |
+
Kevin Kuo, Arian Raje, Kousik Rajesh, and Virginia Smith. 2024. Federated lora with sparse communication. arXiv preprint arXiv:2406.05233.
|
| 316 |
+
Fan Lai, Yinwei Dai, Sanjay Singapuram, Jiachen Liu, Xiangfeng Zhu, Harsha Madhyastha, and Mosharaf Chowdhury. 2022. Fedscale: Benchmarking model and system performance of federated learning at scale. In International conference on machine learning, pages 11814-11827. PMLR.
|
| 317 |
+
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.
|
| 318 |
+
Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. 2020. Federated optimization in heterogeneous networks. Proceedings of Machine learning and systems, 2:429-450.
|
| 319 |
+
Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190.
|
| 320 |
+
|
| 321 |
+
Baohao Liao, Yan Meng, and Christof Monz. 2023. Parameter-efficient fine-tuning without introducing new latency. arXiv preprint arXiv:2305.16742.
|
| 322 |
+
Haokun Liu, Derek Tam, Mohammed Muqeeth, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin A Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. Advances in Neural Information Processing Systems, 35:1950-1965.
|
| 323 |
+
Shih-Yang Liu, Chien-Yi Wang, Hongxu Yin, Pavlo Molchanov, Yu-Chiang Frank Wang, Kwang-Ting Cheng, and Min-Hung Chen. 2024. Dora: Weight-decomposed low-rank adaptation. arXiv preprint arXiv:2402.09353.
|
| 324 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
|
| 325 |
+
Ilya Loshchilov and Frank Hutter. 2018. Decoupled weight decay regularization. In International Conference on Learning Representations.
|
| 326 |
+
Andrea Manoel, Mirian del Carmen Hipolito Garcia, Tal Baumel, Shize Su, Jialei Chen, Robert Sim, Dan Miller, Danny Karmon, and Dimitrios Dimitriadis. 2023. Federated multilingual models for medical transcript analysis. In Conference on Health, Inference, and Learning, pages 147-162. PMLR.
|
| 327 |
+
Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. 2017a. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pages 1273-1282. PMLR.
|
| 328 |
+
H Brendan McMahan, Daniel Ramage, Kunal Talwar, and Li Zhang. 2017b. Learning differentially private recurrent language models. arXiv preprint arXiv:1710.06963.
|
| 329 |
+
Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. 2015. Tensorizing neural networks. Advances in neural information processing systems, 28.
|
| 330 |
+
Ivan V Oseledets. 2011. Tensor-train decomposition. SIAM Journal on Scientific Computing, 33(5):2295-2317.
|
| 331 |
+
Pranav Rajpurkar, Robin Jia, and Percy Liang. 2018. Know what you don't know: Unanswerable questions for squad. arXiv preprint arXiv:1806.03822.
|
| 332 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: $100,000+$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250.
|
| 333 |
+
Vishal Rathod, Seyedsina Nabavirazavi, Samira Zad, and Sundararaja Sitharama Iyengar. 2025. Privacy and security challenges in large language models. In
|
| 334 |
+
|
| 335 |
+
2025 IEEE 15th Annual Computing and Communication Workshop and Conference (CCWC), pages 00746-00752. IEEE.
|
| 336 |
+
Ofir Ben Shoham and Nadav Rappoport. 2023. Federated learning of medical concepts embedding using behrt. arXiv preprint arXiv:2305.13052.
|
| 337 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pages 1631-1642.
|
| 338 |
+
Ehsan Soltanmohammadi and Neset Hikmet. 2024. Optimizing healthcare big data processing with containerized pyspark and parallel computing: A study on etl pipeline efficiency. Journal of Data Analysis and Information Processing, 12(4):544-565.
|
| 339 |
+
Youbang Sun, Zitao Li, Yaliang Li, and Bolin Ding. 2024. Improving LoRA in privacy-preserving federated learning. arXiv preprint arXiv:2403.12313.
|
| 340 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
|
| 341 |
+
A Vaswani. 2017. Attention is all you need. Advances in Neural Information Processing Systems.
|
| 342 |
+
Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2019. Superglue: A stickier benchmark for general-purpose language understanding systems. Advances in neural information processing systems, 32.
|
| 343 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2018. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461.
|
| 344 |
+
Adina Williams, Nikita Nangia, and Samuel R Bowman. 2017. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426.
|
| 345 |
+
Jiarun Wu and Qingliang Chen. 2022. Pruning adapters with lottery ticket. Algorithms, 15(2):63.
|
| 346 |
+
Nan Wu, Farhad Farokhi, David Smith, and Mohamed Ali Kaafar. 2020. The value of collaboration in convex machine learning with differential privacy. In 2020 IEEE Symposium on Security and Privacy (SP), pages 304-317. IEEE.
|
| 347 |
+
Yuxuan Yan, Shunpu Tang, Zhiguo Shi, and Qianqian Yang. 2024. FeDeRA: efficient fine-tuning of language models in federated learning leveraging weight decomposition. arXiv preprint arXiv:2404.18848.
|
| 348 |
+
|
| 349 |
+
Yifan Yang, Kai Zhen, Ershad Banijamal, Athanasios Mouchtaris, and Zheng Zhang. 2024a. Adazeta: Adaptive zeroth-order tensor-train adaption for memory-efficient large language models fine-tuning. arXiv preprint arXiv:2406.18060.
|
| 350 |
+
Yifan Yang, Jiajun Zhou, Ngai Wong, and Zheng Zhang. 2024b. LoRETTA: low-rank economic tensor-train adaptation for ultra-low-parameter fine-tuning of large language models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 3161-3176.
|
| 351 |
+
Zi Yang, Samridhi Choudhary, Xinfeng Xie, Cao Gao, Siegfried Kunzmann, and Zheng Zhang. 2024c. CoMERA: computing-and memory-efficient training via rank-adaptive tensor optimization. arXiv preprint arXiv:2405.14377.
|
| 352 |
+
Ashkan Yousefpour, Igor Shilov, Alexandre Sablayrolles, Davide Testuggine, Karthik Prasad, Mani Malek, John Nguyen, Sayan Ghosh, Akash Bharadwaj, Jessica Zhao, et al. 2021. Opacus: User-friendly differential privacy library in pytorch. arXiv preprint arXiv:2109.12298.
|
| 353 |
+
Elad Ben Zaken, Shauli Ravfogel, and Yoav Goldberg. 2021. Bitfit: Simple parameter-efficient fine-tuning for transformer-based masked language-models. arXiv preprint arXiv:2106.10199.
|
| 354 |
+
Zhuo Zhang, Yuanhang Yang, Yong Dai, Qifan Wang, Yue Yu, Lizhen Qu, and Zenglin Xu. 2023. Fedpetuning: When federated learning meets the parameter-efficient tuning methods of pre-trained language models. In Annual Meeting of the Association of Computational Linguistics 2023, pages 9963-9977. Association for Computational Linguistics (ACL).
|
| 355 |
+
Haodong Zhao, Wei Du, Fangqi Li, Peixuan Li, and Gongshen Liu. 2023. Fedprompt: Communication-efficient and privacy-preserving prompt tuning in federated learning. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1-5. IEEE.
|
| 356 |
+
|
| 357 |
+
# A Experiment setup
|
| 358 |
+
|
| 359 |
+
# A.1 Dataset Setup
|
| 360 |
+
|
| 361 |
+
We begin our experiments using the Generalized Language Understanding Evaluation (GLUE) benchmark (Wang et al., 2018), which includes a range of natural language understanding tasks. These tasks consist of perceptual analysis (SST2 (Socher et al., 2013)), similarity and paraphrase tasks (MRPC, QQP (Dagan et al., 2005)), and natural language reasoning (MNLI, QNLI (Williams et al., 2017; Rajpurkar et al., 2018)). The utilized metrics for the GLUE benchmark are summarized in Table 8. We record the best validation results after 100 communication rounds for cross-silo FL and after 1000 communication rounds for large-scale cross-device FL. For the DeBERTa-Base models on the QQP task, we randomly select 1000 samples from the validation set and report the highest accuracy achieved.
|
| 362 |
+
|
| 363 |
+
Table 8: Dataset descriptions and statistics.
|
| 364 |
+
|
| 365 |
+
<table><tr><td>Task</td><td># Train</td><td># Dev.</td><td>Metric</td></tr><tr><td>MRPC</td><td>3,301</td><td>367</td><td>F1 Score</td></tr><tr><td>SST-2</td><td>66,675</td><td>674</td><td>Accuracy</td></tr><tr><td>QNLI</td><td>103,695</td><td>5,463</td><td>Accuracy</td></tr><tr><td>QQP</td><td>360,210</td><td>40,430</td><td>Accuracy</td></tr><tr><td>MNLI</td><td>388,774</td><td>9,815</td><td>Accuracy</td></tr></table>
|
| 366 |
+
|
| 367 |
+
We then select two multiple-choice tasks (COPA and ReCoRD) from the SuperGLUE benchmark (Wang et al., 2019) and a question-answering generation task (SQuAD (Rajpurkar et al., 2016)). The metrics used for evaluation are summarized in Table 9.
|
| 368 |
+
|
| 369 |
+
Table 9: The utilized metrics for the SuperGLUE benchmark.
|
| 370 |
+
|
| 371 |
+
<table><tr><td>Task Name</td><td>Metric</td></tr><tr><td>COPA</td><td>Accuracy</td></tr><tr><td>ReCoRD</td><td>F1</td></tr><tr><td>SQuAD</td><td>F1</td></tr></table>
|
| 372 |
+
|
| 373 |
+
# A.2 Additional Detail of TT-format
|
| 374 |
+
|
| 375 |
+
In this paper, we use the TT format to structure the weight matrices within the tensorized layers. To accommodate matrices of varying shapes, we design specific tensor shapes based on the hidden sizes and bottleneck configurations of different models.
|
| 376 |
+
|
| 377 |
+
The tensor shapes are outlined in Table 10, with examples provided for the DeBERTa/RoBERTa-base and LLaMA-2-7b models, which have hidden sizes of 768 and 4096, respectively. For models with other hidden sizes, the appropriate tensor shape must be determined prior to training.
|
| 378 |
+
|
| 379 |
+
Table 10: The shape settings of the TT-format
|
| 380 |
+
|
| 381 |
+
<table><tr><td>Modules</td><td>Matrix Shape</td><td>Tensor Shape</td></tr><tr><td rowspan="4">Tensorized Adapters</td><td>768 × 64</td><td>[8, 8, 12, 8, 8]</td></tr><tr><td>4096 × 64</td><td>[16, 16, 16, 4, 4, 4]</td></tr><tr><td>64 × 768</td><td>[8, 8, 12, 8, 8]</td></tr><tr><td>64 × 4096</td><td>[4, 4, 4, 16, 16, 16]</td></tr><tr><td rowspan="2">Tenosrized Classifier (Optional)</td><td>768 × 768</td><td>[12, 8, 8, 8, 8, 12]</td></tr><tr><td>768 × 768</td><td>[8, 8, 8, 8, 8, 8, 8, 8]</td></tr></table>
|
| 382 |
+
|
| 383 |
+
# A.3 Additional Details for Table 1
|
| 384 |
+
|
| 385 |
+
We use DeBERTa-Base models with the GLUE dataset in a cross-silo FL setup. The learning rate is selected from $[5e - 3,1e - 3,5e - 4,1e - 4]$ , and the batch size from [16, 32] for all tasks and methods. The number of clients is set to 5, with one local update per communication round. The best validation results were recorded after 100 communication rounds. Additional details on the chosen parameters are provided in Table 11.
|
| 386 |
+
|
| 387 |
+
Table 11: The hyperparameter grids used for GLUE experiments.
|
| 388 |
+
|
| 389 |
+
<table><tr><td>Experiment</td><td>Hyperparameters</td><td>Values</td></tr><tr><td>LoRA</td><td>Rank</td><td>4,8</td></tr><tr><td>RoLoRA</td><td>Rank</td><td>4</td></tr><tr><td>Bitfit</td><td>Bias Terms</td><td>All</td></tr><tr><td>Prompt</td><td># Tokens</td><td>10</td></tr><tr><td>P-tuning</td><td># Tokens Prompt Length</td><td>20 [128, 768]</td></tr><tr><td>FedTT</td><td>Tensor Rank</td><td>5</td></tr><tr><td>FedTT+</td><td>Tensor Rank</td><td>5</td></tr></table>
|
| 390 |
+
|
| 391 |
+
# A.4 Additional Details for Table 2
|
| 392 |
+
|
| 393 |
+
We follow the experimental setup of (Zhang et al., 2023), using RoBERTa-Base models with the GLUE dataset in both cross-silo and large-scale cross-device FL configurations. The learning rate was selected from $[1e - 2,5e - 3,1e - 3,5e - 4,1e - 4,5e - 5]$ , and batch size from [16, 32] across all tasks and methods. For the MRPC and SST-2 tasks, we use a cross-silo FL setup with 10 clients,
|
| 394 |
+
|
| 395 |
+
Table 12: Number of trainable parameters for results in Table 3.
|
| 396 |
+
|
| 397 |
+
<table><tr><td>Model & Method</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>Avg.</td></tr><tr><td>RoBERTa-Large (LoRAr=2)</td><td>49K</td><td>74K</td><td>74K</td><td>74K</td><td>68K</td></tr><tr><td>RoBERTa-Large (FFA-LoRAr=2)</td><td>25K</td><td>37K</td><td>37K</td><td>37K</td><td>34K</td></tr><tr><td>RoBERTa-Large (RoLOAr=2)</td><td>25K</td><td>37K</td><td>37K</td><td>37K</td><td>34K</td></tr><tr><td>RoBERTa-Large (FedTT)</td><td>39K</td><td>55K</td><td>55K</td><td>55K</td><td>51K</td></tr><tr><td>RoBERTa-Large (FedTT+)</td><td>28K</td><td>28K</td><td>28K</td><td>28K</td><td>28K</td></tr></table>
|
| 398 |
+
|
| 399 |
+
while for the other tasks, we employ a large-scale cross-device FL setup with 1000 clients, selecting 10 clients per round. Accuracy results for Prefix, Adapter, LoRA, and BitFit methods are sourced from (Zhang et al., 2023). In addition to reporting the accuracy of the FedTT method, we also include the P-Tuning method with prompt lengths [128, 768], and IA3 (Liu et al., 2022) method, to further enrich the experiments.
|
| 400 |
+
|
| 401 |
+
# A.5 Additional Details for Table 3
|
| 402 |
+
|
| 403 |
+
We adopt the same settings as (Chen et al.), using RoBERTa-Large models with the GLUE dataset in cross-silo FL scenarios. To simulate varying levels of data heterogeneity, we report the accuracy of our method for 3 clients (i.i.d. data distribution), 20 clients (moderate heterogeneity), and 50 clients (high heterogeneity), with 20 local updates. The learning rate is set to $1e - 3$ for all tasks, with a batch size of 64 for SST-2 and 32 for other tasks. To ensure a comparable number of trainable parameters, we make the last 6 layers trainable for the SST-2 dataset and the last 9 layers for the other datasets in LoRA, FFA-LoRA, RoLoRA, and FedTT. In contrast, for FedTT+, all layers are made trainable. We provide a comparison of the number of trainable parameters for LoRA, FFA-LoRA, RoLoRA, and our proposed FedTT, and FedTT+ methods in Table 12. Accuracy results for LoRA, FFA-LoRA, and RoLoRA are sourced from (Chen et al.).
|
| 404 |
+
|
| 405 |
+
# A.6 Additional Details for Table 5
|
| 406 |
+
|
| 407 |
+
Due to the large number of parameters in LLaMA2, it is rarely used in FL scenarios, and few existing works provide results for such models. However, FedTT significantly reduces communication overhead, making it feasible to utilize these models in FL settings. We evaluate FedTT and FedTT+ against LoRA using SuperGLUE tasks (Wang et al., 2019) and a generation task (SQuAD (Rajpurkar et al., 2016)). The results are
|
| 408 |
+
|
| 409 |
+
presented in Table 5.
|
| 410 |
+
|
| 411 |
+
For each task, we randomly select 1000 samples for training and 1000 for validation, reporting the best validation accuracy. We use a learning rate of $1e - 4$ , batch size of 2, and 3 local updates across all tasks. In large-scale cross-silo FL, we simulate training with the LLaMA2-7B model across 1000 clients, selecting 10 randomly per round. FedTT achieves performance nearly identical to LoRA with a rank of 8, while reducing communication overhead by approximately $10\times$ .
|
| 412 |
+
|
| 413 |
+
For cross-silo FL, we utilize the LLaMA2-13B model with 10 clients. As shown in Table 5, both FedTT and FedTT+ achieve performance close to LoRA while reducing communication overhead by approximately $10 \times$ and $30 \times$ , respectively.
|
| 414 |
+
|
| 415 |
+
# B Additional Experiment on Data Heterogeneity
|
| 416 |
+
|
| 417 |
+
Data heterogeneity is a common challenge in most practical scenarios (Hajihashemi and Shen). In FL, local models on individual clients can diverge from the global model's optimal state, resulting in slower convergence (Hsieh et al., 2020; Li et al., 2020). This issue is particularly pronounced when training LLMs in federated environments, as data heterogeneity can severely impact model performance (Zhang et al., 2023).
|
| 418 |
+
|
| 419 |
+
As mentioned before, three primary factors contribute to data heterogeneity: (1) the number of clients, (2) the number of local updates, and (3) non-i.i.d. data distribution. In Section 5.3 of the paper, which evaluates the heterogeneity robustness of FedTT+, we considered the effects of the number of clients and local updates. Specifically, we increased the number of clients to intensify heterogeneity. In this section, we
|
| 420 |
+
|
| 421 |
+
Table 13: Comparison of cross-silo FL methods using RoBERTa-Large models under varying degrees of data heterogeneity. The accuracies for LoRA and FFA-LoRA methods are sourced from (Sun et al., 2024).
|
| 422 |
+
|
| 423 |
+
<table><tr><td>Data Dist.</td><td>Model & Method</td><td>#Param.</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>Avg.</td></tr><tr><td rowspan="3">i.i.d.</td><td>RoBERTa-Large (LoRAr=8)</td><td>1.57M</td><td>94.42</td><td>91.38</td><td>84.47</td><td>86.90</td><td>89.29</td></tr><tr><td>RoBERTa-Large (FFA-LoRAr=8)</td><td>0.79M</td><td>95.14</td><td>92.64</td><td>86.31</td><td>87.13</td><td>90.30</td></tr><tr><td>RoBERTa-Large (FedTT+)</td><td>0.03M</td><td>95.41</td><td>94.05</td><td>88.15</td><td>88.65</td><td>91.56</td></tr><tr><td rowspan="3">mild het.</td><td>RoBERTa-Large (LoRAr=8)</td><td>1.57M</td><td>93.55</td><td>91.36</td><td>84.41</td><td>87.01</td><td>89.08</td></tr><tr><td>RoBERTa-Large (FFA-LoRAr=8)</td><td>0.79M</td><td>94.10</td><td>91.62</td><td>85.33</td><td>87.04</td><td>89.52</td></tr><tr><td>RoBERTa-Large (FedTT+)</td><td>0.03M</td><td>95.53</td><td>93.54</td><td>87.91</td><td>88.45</td><td>91.36</td></tr><tr><td rowspan="3">sever het.</td><td>RoBERTa-Large (LoRAr=8)</td><td>1.57M</td><td>94.32</td><td>88.95</td><td>83.51</td><td>82.03</td><td>87.20</td></tr><tr><td>RoBERTa-Large (FFA-LoRAr=8)</td><td>0.79M</td><td>94.32</td><td>90.35</td><td>84.35</td><td>85.05</td><td>88.52</td></tr><tr><td>RoBERTa-Large (FedTT+)</td><td>0.03M</td><td>95.64</td><td>91.67</td><td>86.66</td><td>87.73</td><td>90.42</td></tr></table>
|
| 424 |
+
|
| 425 |
+
conduct an additional experiment to evaluate the performance of FedTT+ under varying levels of data heterogeneity. Similar to (Sun et al., 2024), we train the RoBERTa-Large model and consider three levels of data distribution for three clients:
|
| 426 |
+
|
| 427 |
+
- i.i.d. Data Distribution: Data is evenly distributed across all clients.
|
| 428 |
+
- Mild Heterogeneity: For binary classification tasks, data is split as $[0.15, 0.85]$ , $[0.85, 0.15]$ , and $[0.5, 0.5]$ among three clients. For three-class classification tasks, the splits are $[0.6, 0.2, 0.2]$ , $[0.2, 0.6, 0.2]$ , and $[0.2, 0.2, 0.6]$ .
|
| 429 |
+
- Severe Heterogeneity: For binary classification tasks, data is split as $[0.05, 0.95]$ , $[0.95, 0.05]$ , and $[0.5, 0.5]$ . For three-class classification tasks, the splits are $[0.9, 0.05, 0.05]$ , $[0.05, 0.9, 0.05]$ , and $[0.05, 0.05, 0.9]$ .
|
| 430 |
+
|
| 431 |
+
To further amplify heterogeneity, we used 10 local updates. We followed the exact experimental setup described in (Sun et al., 2024), allowing us to directly compare our results with those reported for LoRA and FFA-LoRA. The results are presented in Table 13. As shown in the Table, FedTT+ consistently outperforms LoRA and FFA-LoRA across different heterogeneity settings while utilizing fewer parameters.
|
| 432 |
+
|
| 433 |
+
# C Communication Cost Analysis
|
| 434 |
+
|
| 435 |
+
In this section, we provide communication cost analysis for Table 1 and Table 3. Specifically, we compare the proposed method with baselines in terms of communication cost, following (Guo et al., 2024). The analysis includes:
|
| 436 |
+
|
| 437 |
+
- Up-link message size (in KB) for each communication round.
|
| 438 |
+
- Number of communication rounds needed to reach the predefined target performance on the SST-2, QNLI, QQP, and MNLI datasets.
|
| 439 |
+
- Total transmitted messages (in KB).
|
| 440 |
+
|
| 441 |
+
The target performance is defined as $95\%$ of the prediction accuracy reported in Table 1 and Table 3.
|
| 442 |
+
|
| 443 |
+
In a federated learning system, two key parameters influence communication efficiency: the up-link message size and the total size of transmitted messages, computed as the product of the number of communication rounds and the up-link message size. We provide detailed comparisons in Table 14 and Table 15. As demonstrated, our proposed algorithms effectively minimize both the up-link message size and the total number of transmitted messages.
|
| 444 |
+
|
| 445 |
+
# D Privacy
|
| 446 |
+
|
| 447 |
+
While LLMs excel in performance due to their transformer-based architecture and vast parameter count, their ability to memorize and inadvertently reveal sensitive information from training data is a concern (Carlini et al., 2021; Rathod et al., 2025). A widely adopted framework for mitigating such privacy risks is DP (Dwork et al., 2006), which provides formal guarantees against data leakage.
|
| 448 |
+
|
| 449 |
+
In this section, we first outline key definitions of DP and introduce the DP-SGD algorithm. We then establish a theoretical privacy guarantee within the DP framework.
|
| 450 |
+
|
| 451 |
+
Definition 1. $((\epsilon, \delta)$ -Differential Privacy (Dwork et al., 2006)] A randomized mechanism
|
| 452 |
+
|
| 453 |
+
Table 14: Communication cost analysis for Table 1.
|
| 454 |
+
|
| 455 |
+
<table><tr><td>Method</td><td>Up-link Message Size (KB)</td><td colspan="4"># Communication Round</td><td colspan="4">Total transmitted messages (KB)</td></tr><tr><td></td><td></td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td></tr><tr><td>\( LoRA_{r=4} \)</td><td>586</td><td>2</td><td>2</td><td>2</td><td>2</td><td>1172</td><td>1172</td><td>1172</td><td>1172</td></tr><tr><td>\( RoLORA_{r=4} \)</td><td>312</td><td>2</td><td>2</td><td>1</td><td>2</td><td>624</td><td>624</td><td>312</td><td>624</td></tr><tr><td>FedTT</td><td>234</td><td>2</td><td>2</td><td>2</td><td>2</td><td>468</td><td>468</td><td>468</td><td>468</td></tr><tr><td>FedTT+</td><td>78</td><td>5</td><td>6</td><td>3</td><td>3</td><td>390</td><td>468</td><td>234</td><td>234</td></tr></table>
|
| 456 |
+
|
| 457 |
+
Table 15: Communication cost analysis for sever heterogeneity in Table 3.
|
| 458 |
+
|
| 459 |
+
<table><tr><td>Method</td><td>Up-link Message Size (KB)</td><td colspan="4"># Communication Round</td><td colspan="4">Total transmitted messages (KB)</td></tr><tr><td></td><td></td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td><td>SST-2</td><td>QNLI</td><td>QQP</td><td>MNLI</td></tr><tr><td>RoLoRAr=2</td><td>133</td><td>3</td><td>10</td><td>11</td><td>11</td><td>399</td><td>1330</td><td>1463</td><td>1463</td></tr><tr><td>FedTT</td><td>199</td><td>3</td><td>3</td><td>3</td><td>3</td><td>597</td><td>597</td><td>597</td><td>597</td></tr><tr><td>FedTT+</td><td>109</td><td>3</td><td>3</td><td>3</td><td>3</td><td>327</td><td>327</td><td>327</td><td>327</td></tr></table>
|
| 460 |
+
|
| 461 |
+
$\mathcal{M}:\mathcal{D}\to \mathcal{R}$ satisfies $(\epsilon ,\delta)$ -differential privacy if for any two adjacent datasets $D,D^{\prime}\in \mathcal{D}$ that differ in at most one data point, and for any subset of possible outputs $S\subseteq \mathcal{R}$ , the following holds:
|
| 462 |
+
|
| 463 |
+
$$
|
| 464 |
+
\operatorname * {P r} [ \mathcal {M} (D) \in S ] \leq e ^ {\epsilon} \operatorname * {P r} [ \mathcal {M} (D ^ {\prime}) \in S ] + \delta .
|
| 465 |
+
$$
|
| 466 |
+
|
| 467 |
+
DP ensures that the mechanism $\mathcal{M}$ provides privacy guarantees by limiting the impact of any single data point on the output, with $\epsilon$ controlling the privacy loss and $\delta$ allowing for a small probability of failure in the guarantee.
|
| 468 |
+
|
| 469 |
+
Differentially Private Stochastic Gradient Descent (DP-SGD) Algorithm (Abadi et al., 2016): DP-SGD is a modification of the SGD algorithm designed to provide differential privacy guarantees. It achieves this by introducing two key modifications:
|
| 470 |
+
|
| 471 |
+
- Gradient Clipping: To ensure that individual data points do not have a disproportionate influence on the model update, each per-sample gradient is clipped to a fixed norm $C$ .
|
| 472 |
+
- Noise Addition: After aggregating the clipped gradients, Gaussian noise $z \sim \mathcal{N}(0, C^2 \sigma^2 I)$ is added to the sum of clipped gradients in a batch $\mathcal{B}$ from the dataset $\mathcal{D}$ before updating the model parameters. This helps obscure the contribution of any single data point.
|
| 473 |
+
|
| 474 |
+
The noisy sum of clipped gradients is computed as:
|
| 475 |
+
|
| 476 |
+
$$
|
| 477 |
+
\bar {g} = \frac {\sum_ {i \in \mathcal {B}} \mathrm {C l i p} (\nabla f _ {i} , C) + z}{| \mathcal {B} |},
|
| 478 |
+
$$
|
| 479 |
+
|
| 480 |
+
which is then used to update the model. Here, the noise scale $\sigma$ is determined based on sequential composition rules, given the privacy parameters $\epsilon$ and $\delta$ , the number of iterations $T$ , and the sampling probability $q = |\mathcal{B}| / |\mathcal{D}|$ .
|
| 481 |
+
|
| 482 |
+
Although other techniques like secure aggregation have been explored in privacy-preserving FL (Behnia et al., 2024), our focus here is on DP. In federated learning with DP, the level of privacy protection depends on whether the aggregation server is trusted by the clients. In global DP, the server is trusted, allowing clients to send raw model updates, while the server applies differential privacy by adding noise to the aggregated updates before releasing them (McMahan et al., 2017b). In contrast, local DP assumes an untrusted server, requiring each client to add noise to their updates before transmission, ensuring privacy even if the server is compromised (Wu et al., 2020). In Section 5.6, we adopt the stronger local DP approach to guarantee robust privacy protection without relying on a trusted server.
|
| 483 |
+
|
| 484 |
+
Proposition 1. The mechanism for updating FedTT using locally run DP-SGD and FedAvg satisfies $(\epsilon, \delta)$ -DP, given that $\forall i$ , the sampling probability is defined as $q = |\mathcal{B}_i| / |\mathcal{D}_i|$ . Furthermore, the total number of local updates per client is denoted as $T$ , and $\sigma$ is chosen as
|
| 485 |
+
|
| 486 |
+
$$
|
| 487 |
+
\sigma = O \left(\frac {q \sqrt {T \log (1 / \delta)}}{\epsilon}\right).
|
| 488 |
+
$$
|
| 489 |
+
|
| 490 |
+
Proof. Similar to (Sun et al., 2024).
|
2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca1798644c48235e1e7f86f8d8132134bcfb5300bf7334edd27f0733667b7ca5
|
| 3 |
+
size 798338
|
2025/Communication-Efficient and Tensorized Federated Fine-Tuning of Large Language Models/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/fbf882ad-ea83-4d16-9be3-66896daadabc_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/fbf882ad-ea83-4d16-9be3-66896daadabc_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/fbf882ad-ea83-4d16-9be3-66896daadabc_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:428049cf991ab07f76f59f61f3bc838cc876cfc5e7867cf4411df7a8d8b841b2
|
| 3 |
+
size 1254694
|
2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/full.md
ADDED
|
@@ -0,0 +1,540 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Comparing Bad Apples to Good Oranges: Aligning Large Language Models via Joint Preference Optimization
|
| 2 |
+
|
| 3 |
+
Hritik Bansal\* Nanyun Peng
|
| 4 |
+
|
| 5 |
+
Ashima Suvarna\*Kai-Wei Chang
|
| 6 |
+
|
| 7 |
+
Gantavya Bhatt* Aditya Grover
|
| 8 |
+
|
| 9 |
+
$^{\diamond}$ University of California, Los Angeles $^{\diamond}$ University of Washington, Seattle
|
| 10 |
+
|
| 11 |
+
{hbansal,asuvarna31}@cs.ucla.edu,{gbhatt2}@cs.washington.edu
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
A common technique for aligning large language models (LLMs) relies on acquiring human preferences by comparing multiple generations conditioned on a fixed context. This method, however, relies solely on pairwise comparisons, where the generations are evaluated within an identical context. While effective to such conditional preferences often fail to encompass the nuanced and multidimensional nature of human preferences. In this work, we revisit the traditional paradigm of preference acquisition and propose a new axis based on eliciting preferences jointly over the instruction-response pairs. Unlike prior preference optimizations, which are designed for conditional ranking protocols (e.g., DPO), we propose Joint Preference Optimization (JPO), a new preference optimization objective that upweights the joint probability of the chosen instruction-response pair over the rejected instruction-response pair. Interestingly, LLMs trained with joint instruction-response preference data using JPO outperform LLM trained with DPO by $5.2\%$ and $3.3\%$ win-rate for summarization and open-ended dialogue datasets, respectively. Our findings reveal that joint preferences over instruction and response pairs can significantly enhance the alignment of LLMs by tapping into a broader spectrum of human preference elicitation. The data and code is available at https://github.com/Hritikbansal/jpo.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Recently, alignment (Stiennon et al., 2020; Ouyang et al., 2022) has emerged as a crucial step in enhancing the performance of large language models (LLMs) (Anthropic, 2024; OpenAI, 2023; Team et al., 2023; Anthrophic, 2023; Brown et al., 2020; Touvron et al., 2023; Jiang et al., 2023) in diverse real-world applications (Li et al., 2023; Zheng et al., 2023a; Wu et al., 2023a; Clusmann et al.,
|
| 20 |
+
|
| 21 |
+
2023; Lambert et al., 2024). In particular, aligned LLMs generate responses that maximize human utility along various dimensions such as helpfulness, coherence, and harmlessness (Askell et al., 2021; Ouyang et al., 2022). Here, the notion of human utility is subjective (Kirk et al., 2024; Gabriel, 2020), and mainly hinges on how preferences are acquired from annotators (Otto et al., 2022). Among the various preference acquisition protocols (Lightman et al., 2023; Wu et al., 2023b; Scheurer et al., 2023; Bansal et al., 2023), the ranking-based approach is the most widely used paradigm to align LLMs (Stiannon et al., 2020; Ouyang et al., 2022; Bai et al., 2022a; Tunstall et al., 2023; Teknium, 2023). Specifically, in ranking approach the annotator has to compare a pair of responses conditioned on a fixed context. For instance, humans can select a 'preferred' response by comparing a pair of responses for the instruction 'Create a list of four fruits other than Apple' (Figure 1 (left)).
|
| 22 |
+
|
| 23 |
+
Although traditional conditional rankings provide rich preferences for alignment, they fail to holistically capture the multi-faceted nature of human decision-making and preferences (Zhi-Xuan et al., 2024; Gigerenzer, 2008). Besides ranking preferences conditioned on a fixed context, humans can also express preferences in non-identical contexts. For example, while browsing reviews for products on an e-commerce website, humans are likely to prefer an accurate and detail-oriented review for a camera over an incoherent, vague movie review even though the products (camera and movie) are qualitatively different.
|
| 24 |
+
|
| 25 |
+
In this work, we revisit the traditional paradigm of conditional preference acquisition by developing a framework to acquire preferences jointly over instruction-response pairs. Starting from an instruction-response data consisting of response $R_{i}$ for instruction $I_{i}$ (say $i \in \{1,2\}$ ), we acquire ranking-based preferences over the instruction-response pairs $(I_1,R_1)$ and $(I_2,R_2)$ . As shown
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: Overview of the Joint Preference Optimization. (Left) We show that the conditional preference acquisition method would require the annotators to compare two responses for an identical instruction. (Right) We show that the annotators can also assign rankings jointly over instruction-response pairs. Specifically, the annotator prefers a helpful response (e.g., Apple ... Grape) over a response that ignores the context of the instruction (e.g., wear sunscreen ... litter). Our framework thus elicits preferences that are obfuscated in the prior approach.
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
|
| 32 |
+
in Figure 1 (right), we aim to understand whether the response in the pair $X$ is perceived better than the response in the pair $Y$ . We hypothesize that by capturing preferences in non-identical contexts our protocol can elicit human behaviors that are obfuscated in prior protocols. First, wee show that humans can provide decisive preferences in joint preferences protocol (5.4). Then, we analyze how joint preferences differ from conditional preferences on the same dataset(\$5.4).
|
| 33 |
+
|
| 34 |
+
<table><tr><td>Preference Acquisition</td><td>Algorithm</td><td>Alignment Objective</td><td>Different Instructions</td></tr><tr><td>Score</td><td>Ethayarajh et al. (2024)</td><td>Conditional</td><td>No</td></tr><tr><td rowspan="5">Comparison (DPO Variants)</td><td>Rafailov et al. (2024)</td><td>Conditional</td><td>No</td></tr><tr><td>Park et al. (2024)</td><td>Conditional</td><td>No</td></tr><tr><td>Liu et al. (2024)</td><td>Conditional</td><td>No</td></tr><tr><td>Meng et al. (2024)</td><td>Conditional</td><td>No</td></tr><tr><td>Hong et al. (2024)</td><td>Conditional</td><td>No</td></tr><tr><td>Pairwise</td><td>JPO (ours)</td><td>Joint</td><td>Yes</td></tr></table>
|
| 35 |
+
|
| 36 |
+
Table 1: JPO differs from prior works along three key aspects: preference acquisition (scoring or comparison), objective (conditional or joint distribution), and their ability to handle non-identical instruction-responses.
|
| 37 |
+
|
| 38 |
+
Prior works like DPO and its variants (Rafailov et al., 2023; Yin et al., 2024; Liu et al., 2024; Meng et al., 2024; Hong et al., 2024; Azar et al., 2023) rely on conditional rankings, and thus do not have access to the joint distribution of human preferences in the ranking protocol (Table 1). While a rating protocol (Ethayarajh et al., 2024) allows for a comparison between responses from non-identical instructions, it can be inconsistent with rankings (Bansal et al., 2023) and ignores the possibility of preferences over a pair of chosen or rejected responses. Thus, we propose Joint Preference
|
| 39 |
+
|
| 40 |
+
Optimization (JPO), a framework for aligning LLMs with our proposed joint preference elicitation scheme. Specifically, it upweights the joint probability of the chosen instruction-response pair over the rejected instruction-response pair. Furthermore, JPO subsumes prior preference optimizations as conditional rankings are a special case of joint preferences (e.g., when the instructions are identical).
|
| 41 |
+
|
| 42 |
+
We conduct experiments to explore new reasoning paths enabled by joint preference elicitation and alignment of LLMs with the JPO objective. By analyzing feedback from conditional rankings and joint preferences protocols, along with explanations from human annotators, we uncover the complexities of the preference acquisition process ( $\S 5$ ). Using our JPO algorithm, we align a Mistral-7B LLM with the collected preferences, achieving a $30\%$ and $18\%$ higher win rate against gold responses on unseen instructions from summarization and dialogue datasets, respectively. JPO leverages diverse preferences effectively, outperforming DPO by $5.2\%$ and $3.3\%$ win-rate points on the summarization and open-ended dialogues, respectively. In addition, JPO outperforms KTO by $3.5\%$ on the open-ended dialogues dataset. It also surpasses both DPO and KTO in the AlpacaEval2 benchmark ( $\S 6$ ). This indicates that by utilizing the diverse preference signals present in the existing data, we can align an LLM robustly without acquiring additional instruction-response data.
|
| 43 |
+
|
| 44 |
+
# 2 Related Work
|
| 45 |
+
|
| 46 |
+
Alignment using Reinforcement Learning. Aligning LLMs with human preferences using reinforcement learning is widely adopted to ensure
|
| 47 |
+
|
| 48 |
+
LLMs follow user intents without being harmful (Ouyang et al., 2022). This alignment is usually done by first optimizing for a reward model on preference data (Bradley and Terry, 1952; Likert, 1932; Bansal et al., 2023), followed by aligning the LLMs distribution that maximizes the learned reward model using Reinforcement Learning (RLHF) (Schulman et al., 2017; Ouyang et al., 2022), with optional Divergence penalty (Wang et al., 2023a) to avoid deviating from the reference policy. Additionally, (Dubois et al., 2023; Lu et al., 2024; Zheng et al., 2023b) observe that preferences from LLMs can also be used for alignments motivating Reinforcement Learning through AI feedback (RLAIF). Contrary to prior work that collect preferences as conditional rankings, we emphasize that preference acquisition is a complex phenomenon and elicit joint preferences over instruction-response data.
|
| 49 |
+
|
| 50 |
+
Reward Free Policy Alignment. Rafailov et al. (2024) introduced Direct Preference Optimization (DPO) that optimizes directly within the model parameter space, hence eliminating the reward modeling step. (Liu et al., 2024) extends this framework where instead of two responses, alignment is done over the list of responses while (Liu et al., 2023) improves DPO using statistical rejection sampling. (Amini et al., 2024) provides an offset in the DPO objective to increase the margins and (Pal et al., 2024) suggests adding an explicit penalty term to avoid a reduction in the likelihood of preferred pairs over the DPO training. Recent variants of DPO such as SimPO (Meng et al., 2024) alleviate the need of reference policy in the objective. Contrary to our work where we compare the joint distributions, (Yin et al., 2024) proposes RPO that compares the conditional likelihood of a winning response with the losing response of another prompt. Beyond DPO, (Ethayarajh et al., 2024) proposed a human-aware loss function-based framework using prospect theory named KTO, and (Azar et al., 2023) proposes IPO that uses human preferences expressed as pairwise preferences. Lastly, (Zhao et al., 2022) uses sequence likelihood calibration to align the model from human preference. Despite of a vast body of work arising from DPO, none of the existing methods can operate and contrast over the joint distribution of instruction-response pairs like the proposed JPO algorithm.
|
| 51 |
+
|
| 52 |
+
# 3 Background
|
| 53 |
+
|
| 54 |
+
In this work, we focus on aligning language models to generate outputs preferred by humans in dimensions like helpfulness and coherence. Aligning a pretrained base model involves four steps: (a) collecting instruction-response data, (b) supervised fine-tuning (SFT), (c) acquiring preference data, and (d) deploying an alignment algorithm. The instruction-response data can be either hand-crafted by humans (Conover et al., 2023; Wang et al., 2022) or generated by AI (Taori et al., 2023; Tunstall et al., 2023). Subsequently, the base model undergoes supervised fine-tuning (SFT) on the instruction-response pairs (Zheng et al., 2023b; Wang et al., 2023c, 2022; Peng et al., 2023; Xu et al., 2023; Yin et al., 2023; Wang et al., 2023b; Yu et al., 2023; Toshniwal et al., 2024).
|
| 55 |
+
|
| 56 |
+
Following SFT, feedback data is gathered (e.g., rankings) to train the SFT model via an alignment algorithm. This often involves training a reward model on preference data (Bradley and Terry, 1952; Bansal et al., 2023) and aligning the model using Reinforcement Learning (RLHF) (Schulman et al., 2017; Ouyang et al., 2022). To address challenges in human feedback collection (Dubois et al., 2023; Zheng et al., 2023b), LLMs can provide feedback, enabling Reinforcement Learning through AI Feedback (RLAIF). Alternatively, (Rafailov et al., 2024) introduced Direct Preference Optimization (DPO) that mitigates the instability due to PPO for reward maximization by optimizing directly within the model parameter space, hence by-passing the reward modeling step.
|
| 57 |
+
|
| 58 |
+
# 4 Joint Preference Optimization (JPO)
|
| 59 |
+
|
| 60 |
+
A common technique for feedback data acquisition requires the annotators to assign a preferred and non-preferred label to a pair of responses for an instruction (Stiannon et al., 2020; Rafailov et al., 2023; Ouyang et al., 2022; Ethayarajh et al., 2024). However, this paradigm does not capture the complex and multidimensional aspects of human preferences (Kendall and Smith, 1940; Thurstone, 2017; Zhi-Xuan et al., 2024). Specifically, the heuristics for making preference decisions depend upon the context in which the comparison is made (Tversky and Simonson, 1993; Otto et al., 2022). Our work is therefore strongly motivated by prior studies in decision-making, cognitive psychology, and economics, which underscore the complexity of human preferences and decision-making, particu
|
| 61 |
+
|
| 62 |
+
larly the role of context-dependent valuations and preferences. While the traditional ranking protocol compares the two responses under a fixed context, humans can perform pairwise comparisons jointly over instruction-response pairs. For example, consider two summaries, A and B, for articles X and Y, respectively; then, a human can reason and choose the response that better summarizes its corresponding article. Hence, it is critical to align language models with diverse feedback signals to accurately model human behavior and decision making.
|
| 63 |
+
|
| 64 |
+
In our setup, the annotator has to decide a chosen and rejected instruction-response pair $(I_{a},R_{a},I_{b},R_{b})$ where $R_{a}$ and $R_{b}$ are responses to the instructions $I_{a}$ and $I_{b}$ , respectively, and $(I_{a},R_{a}),(I_{b},R_{b})\in \mathcal{D}$ . We note that our joint preference setup is equivalent to the original ranking protocol when $I_{a} = I_{b}$ . As before, the preference reasoning from the annotator will be based on subjective dimensions like helpfulness, coherence, and harmlessness. Formally, the annotator assigns a joint ranking feedback $h(I_a,R_a,I_b,R_b)\in \{(I_a,R_m),(I_b,R_b),\mathrm{Equal}\}$ where 'Equal' indicates that both the instruction-response pairs are perceived equally good or bad. Finally, the joint preference optimization creates a pairwise feedback data $\mathcal{D}_H = \{(I_a,R_a,I_b,R_b,h(I_a,R_a,I_b,R_b))\}$ .
|
| 65 |
+
|
| 66 |
+
Our formulation suggests that we can obtain large-scale and diverse preference data (covering all possible combinations of $(I_a, R_a)$ and $(I_b, R_b)$ ) without the need for gathering additional instruction and response data, which is typically more difficult and costly to acquire. In addition, joint preference acquisition does not necessitate the presence of multiple responses for a given instruction that can be hard to collect for low-resource languages (e.g., Kalamang 2). Specifically, one can collect an instruction-response data $\mathcal{D}' = \{(I_a, R_a)\}_{a=1}^{a=n}$ , and acquire preferences on various combinations of instruction-response pairs. Finally, we assess the interplay between the joint feedback dataset $\mathcal{D}_H$ with the conditional feedback dataset $\mathcal{D}_C$ along with qualitative examples in §5.
|
| 67 |
+
|
| 68 |
+
We propose JPO, a preference optimization objective that learns to align the language models with preferences acquired jointly over the instruction-response pairs. We assume a joint preference dataset $\mathcal{D}_X = \{(I_i^w,R_i^w,I_j^\ell ,R_j^\ell)\}$ , that can be constructed from $\mathcal{D}_H$ , where $(I_i^w,R_i^w)$ and $(I_j^\ell ,R_j^\ell)$
|
| 69 |
+
|
| 70 |
+
are the chosen and rejected instruction-response pairs, respectively. Similar to DPO, we start with a reference model $p_{\mathrm{ref}}$ which is usually the supervised finetuned language model $p_{\mathrm{sft}}$ . Specifically, the JPO objective aims to learn an aligned model $p_{\theta}$ by weighting the joint probability of preferred responses $p(R_i^w, I_i^w)$ over non-preferred responses $p(R_j^\ell, I_j^\ell)$ . Formally, the optimization objective for JPO, $\mathcal{L}(\theta; \mathcal{D}_X, \beta, p_{\mathrm{ref}})$ minimizes the expectation over $(I_j^w, R_j^w, I_j^\ell, R_j^\ell) \sim \mathcal{D}_X$ :
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathbb {E} \left[ \log \left(\sigma \left(\beta \log \frac {p _ {\theta} \left(R _ {i} ^ {w} , I _ {i} ^ {w}\right)}{p _ {\text {r e f}} \left(R _ {i} ^ {w} , I _ {i} ^ {w}\right)} - \beta \log \frac {p _ {\theta} \left(R _ {j} ^ {\ell} , I _ {j} ^ {\ell}\right)}{p _ {\text {r e f}} \left(R _ {j} ^ {\ell} , I _ {j} ^ {\ell}\right)}\right)\right) \right] \tag {1}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $\sigma$ denotes the sigmoid function and $\beta$ is a hyperparameter. Further, we show that Eq. 1 reduces to the DPO formulation (Appendix Eq. 2) when the instructions $I_{i} = I_{j}$ in Appendix §D. We can also see that the JPO objective aims to learn an aligned model $p_{\theta}$ by weighting the conditional probability of preferred responses $p(R_i^w |I_i^w)$ over non-preferred responses $p(R_j^\ell |I_j^\ell)$ , along with a correction factor based on the prior probability of the instructions under the language model $p_{\theta}(I_i^w)$ and $p_{\theta}(I_j^\ell)$ . In §6, we utilize JPO to align language models to generate human-preferred summaries and answer open-ended instructions.
|
| 77 |
+
|
| 78 |
+
# 4.1 Comparison of Joint Preferences with Prior Preference Protocols
|
| 79 |
+
|
| 80 |
+
JPO improves over prior work by acquiring ranking-based preferences over non-identical instructions that has remained unexplored in prior work (please refer to table 1). Diverse human reasoning cannot be captured in the traditional conditional framework it fails to capture human preferences over varied contexts. Context influences decision-making and subjective valuation when capturing human preferences (Otto et al., 2022). Prior work (Yin et al., 2024; Liu et al., 2024; Meng et al., 2024; Hong et al., 2024) collect conditional preferences in a pairwise manner and are variants of DPO (Rafailov et al., 2023). Thus, in our experiments we compare JPO to DPO directly. Furthermore, we implement KTO (Ethayarajh et al., 2024) as a baseline since KTO removes the requirements of preference data that should be paired in preference optimization and implicitly compares responses from different instructions. We find that JPO outperforms both DPO and KTO.
|
| 81 |
+
|
| 82 |
+
# 5 Interplay between Feedback Protocols
|
| 83 |
+
|
| 84 |
+
# 5.1 Instruction-Response Acquisition
|
| 85 |
+
|
| 86 |
+
In this work, we consider two kinds of instruction-response data. First, we consider a filtered version of the TL; DR summarization dataset (Volske et al., 2017) from (Stiannon et al., 2020) consisting of Reddit posts, their summarizes, and human preferences over a pair of summaries for a given post. Throughout the dataset, the task is of summarization that is close-ended and well-defined for language models. Second, we consider the single-turn dialogues from the helpful-base subset of the Anthropic-HH dataset (Bai et al., 2022b). Specifically, this dataset consists of open-ended instructions with a collection of responses.
|
| 87 |
+
|
| 88 |
+
Both these datasets have a train and test split where each instance consists of an instruction and a pair of responses $\mathcal{D} = \{(I_i,R_i^1,R_i^2)\}_{i = 1}^n$ where $n$ is the dataset size. In this work, we collect AI and human feedback on the instruction-response data from their train split and filter instances with duplicate instructions. We can directly compare the two responses for the fixed instruction and construct a ranking feedback dataset $\mathcal{D}_C = \{(I_i,R_i^1,R_i^2,c(I_i,R_i^1,R_i^2))\}$ . To acquire preferences jointly over the instruction-response pairs, we randomly select one of the responses from every instance of $\mathcal{D}$ to construct $\mathcal{D}_S = \{(I_i,R_i)\}$ where $R_{i}\in \{R_{i}^{1},R_{i}^{2}\}$ . Subsequently, we create the joint instruction-response pairs by matching every instance $(I_i,R_i)\in \mathcal{D}_S$ with another instance $(I_j,R_j)\in \mathcal{D}_S$ to get $\mathcal{D}_H = \{(I_i,R_i,I_j,R_j,h(I_i,R_i,I_j,R_j))\}$ of the same size as $\mathcal{D}_S$ and $\mathcal{D}_C$ . In §6, we will utilize $\mathcal{D}_S$ to SFT the base model, and $\mathcal{D}_C$ and $\mathcal{D}_H$ as preference datasets for LLM alignment. We provide the dataset statistics in Appendix §C.
|
| 89 |
+
|
| 90 |
+
# 5.2 Feedback from AI and Humans
|
| 91 |
+
|
| 92 |
+
Feedback from AI. We collect feedback over a pair of responses for a fixed instruction, and joint instruction-response pairs without identical instructions from GPT-3.5-Turbo-0125 (ChatGPT). We choose ChatGPT due to its affordability (e.g., output tokens from ChatGPT are $50 \times$ cheaper than GPT-4). To mitigate any ordering bias, we run two queries for all comparisons. When the ChatGPT preferences flip by flipping the order of the two responses, then we consider it a tie, similar to (Bansal et al., 2023; Bitton et al., 2023). Specifically, we instruct the AI to choose the response that is
|
| 93 |
+
|
| 94 |
+
<table><tr><td>Dataset</td><td>Ranking</td><td>H-H</td><td>H-AI</td></tr><tr><td>TL;DR</td><td rowspan="2">Conditional</td><td>69%</td><td>63%</td></tr><tr><td>Anth.-Helpful</td><td>70.1%</td><td>72%</td></tr><tr><td>TL;DR</td><td>Joint</td><td>62%</td><td>60%</td></tr><tr><td>Anth.-Helpful</td><td>(Non-Identical)</td><td>68.8%</td><td>71%</td></tr><tr><td>Average</td><td></td><td>67.5%</td><td>66.5%</td></tr></table>
|
| 95 |
+
|
| 96 |
+
Table 2: Agreement analysis between within human annotators and gold human feedback and AI (ChatGPT) feedback. We perform the agreement calculations for the two ranking protocols: (a) conditional rankings, and (b) joint preferences where instructions are non-identical. In addition, we assess the agreement rates over the two datasets: (a) TL;DR and (b) Anthropic-helpful dataset.
|
| 97 |
+
|
| 98 |
+
more accurate, coherent, and harmless.
|
| 99 |
+
|
| 100 |
+
To collect conditional preferences over a pair of responses for a fixed instruction, we prompt ChatGPT to choose a response. To collect AI preferences jointly over the instruction-response pairs, we prompt ChatGPT to decide the response that better answers its corresponding instruction. We collected approximately \(50K\) comparisons across both feedback acquisition protocols for the summarization and Anthropic-Helpful dataset, at a cost of \\(100. We provide the AI prompts in Appendix \)\S\mathrm{H}\).
|
| 101 |
+
|
| 102 |
+
Feedback from Humans. In this work, we also collect human preferences for 2000 comparisons over TL;DR and Anthropic-Helpful dataset. Specifically, we ask two annotators to assign a chosen response or chosen instruction-response pair based along the same dimensions as ChatGPT guidelines. Annotators can also choose 'equal' if they fail to make a identify a decisive preference. The human annotations were collected from Amazon Mechanical Turk (AMT). We recruited the participants that passed a preliminary qualification exam. In total, we spent $720 on human feedback acquisition. We provide the screenshot of the annotation UI in Appendix §I.
|
| 103 |
+
|
| 104 |
+
# 5.3 Agreement Analysis
|
| 105 |
+
|
| 106 |
+
We present the annotator agreement scores in Table 2. We find that the average agreement is $67.5\%$ and $66.5\%$ between the human-human and human-AI annotators, respectively. Specifically, we find that in the conditional setup (identical instructions), the average human-human agreement is $69.5\%$ for the TLDR and Anthropic-Helpfulness datasets. Similarly, in the joint setup (non-identical instruction-response pairs), the average inter-rater agreement is $68\%$ on the same datasets. These agreement scores
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 2: Results for the preferences acquired jointly over the instruction-response pairs where both the responses were either chosen or rejected under the conditional rankings protocol. Here, decisive implies that the annotators could assign a preference to one instruction-response pair over the other. Here, AH means Anthropic-Helpful.
|
| 110 |
+
|
| 111 |
+
are comparable to those reported in prior studies (Li et al., 2023; Bansal et al., 2023), demonstrating the robustness of our evaluation. Interestingly, we find that agreement scores vary depending on the underlying distribution of instruction-response pairs and the choice of ranking protocol. Overall, our results highlight that humans and AI can provide rich feedback in both conditional and joint setup with acceptable agreement.
|
| 112 |
+
|
| 113 |
+
# 5.4 Interplay Analysis
|
| 114 |
+
|
| 115 |
+
Setup. Here, we aim to study the interaction between the conditional rankings and joint rankings over non-identical instructions. Formally, each instruction-response pair $(I_i,R_i^x)$ from the conditional pairwise feedback dataset $\mathcal{D}_C$ where $x\in$ $\{1,2\}$ can be assigned a preference $\mathcal{P}_C(I_i,R_i^x)$ among \{'chosen', 'reject', 'equal'\}. For instance, $\mathcal{P}_C(I_i,R_i^1) = \text{choosen}'$ and $\mathcal{P}_C(I_i,R_i^2) = \text{reject}'$ if the response $R_i^2$ is rejected in the dataset $\mathcal{D}_C$ i.e., $c(I_i,R_i^1,R_i^2) = R_i^1$ . Similarly, we can assign a preference $\mathcal{P}_H(I_i,R_i)$ among \{'chosen', 'reject', 'equal'\} to an instruction-response pair $(I_i,R_i)$ from the joint preference dataset $\mathcal{D}_H$ . For instance, $\mathcal{P}_H(I_i,R_i) = \text{chosen}'$ and $\mathcal{P}_H(I_j,R_j) = \text{reject}'$ where $i! = j$ if the instruction-response pair $(I_i,R_i)$ is chosen in the dataset $\mathcal{D}_H$ i.e., $h(I_i,R_i,I_j,R_j) = (I_i,R_i)$ .
|
| 116 |
+
|
| 117 |
+
To study the interplay between the preference protocols, we assess $\mathcal{P}_C(I_i,R_i)$ , $\mathcal{P}_C(I_j,R_j)$ , $\mathcal{P}_H(I_i,R_i)$ and $\mathcal{P}_H(I_j,R_j)$ for
|
| 118 |
+
|
| 119 |
+

|
| 120 |
+
Figure 3: Results for the preferences acquired jointly over the instruction-response pairs where one of the instruction-response pair was chosen (C) and the other pair was rejected (R) under the conditional rankings. Here, $C < R$ implies that the instruction-response pair that was rejected under conditional rankings is actually preferred over an instruction-response pair that was rejected under the conditional rankings. Here, AH means Anthropic-Helpful.
|
| 121 |
+
|
| 122 |
+
all $(I_i,R_i,I_j,R_j)\in \mathcal{D}_H$ . Here, if $\mathcal{P}_H(I_i,R_i) =$ chosen' then $\mathcal{P}_H(I_j,R_j) =$ reject'.
|
| 123 |
+
|
| 124 |
+
Annotators show decisiveness in joint setup. In Figure 2, we study the joint preferences over the instruction-response pairs $(I_i,R_i,I_j,R_j)$ where the individual instruction and response data is either chosen or rejected in the conditional feedback protocol (e.g., $\mathcal{P}_C(I_z,R_z) =$ 'chosen' for $z\in \{i,j\}$ ). Interestingly, we find that the annotators can assign a decisive preference (e.g., $(I_{i},R_{i}) > (I_{j},R_{j}))$ in $71\%$ of the joint comparisons. While we observe that the annotators assign a 'tie' to $29\%$ of the comparisons. This highlights the existence of valid preference decisions that remained obfuscated in the traditional approach for ranking-based feedback acquisition.
|
| 125 |
+
|
| 126 |
+
Annotator preferences depend on context and comparisons. In Figure 3, we study the joint preference over the instruction-response pairs $(I_i,R_i,I_j,R_j)$ where one of them is chosen and the other is rejected in the conditional feedback protocol (e.g., $\mathcal{P}_C(I_i,R_i) =$ 'chosen' and $\mathcal{P}_C(I_j,R_j) =$ 'reject'). To our surprise, we find that the annotators do not prefer the instruction-response pair that was chosen under the conditional feedback protocol in $48\%$ of the comparisons. Specifically, there are $19\%$ of the comparisons where rejected pair (R) is preferred over the
|
| 127 |
+
|
| 128 |
+
Table 3: Response B and D are rejected under the conditional rankings. However, in the the joint setup humans consider that the response B answers Instruction 1 better than response D answers Instruction 2. Thus, joint setup human give a decisive feedback between two responses that were rejected under the conditional rankings.
|
| 129 |
+
|
| 130 |
+
<table><tr><td>Instruction 1
|
| 131 |
+
Response A
|
| 132 |
+
Response B
|
| 133 |
+
Conditional Preference 1</td><td>My dog has been scratching a lot, but he doesn’t have any fleas. What else could be causing this?
|
| 134 |
+
Fleas are the most likely cause of a dog’s scratching, but there are many other possible reasons. It’s worth taking him to the vet to check things out.
|
| 135 |
+
Oh no! Maybe his skin is dry. I bet if you gave him a good bath, that would help!
|
| 136 |
+
Human Preference: A>B. Human Explanation: Response A answered the query by giving possible causes of the problem along with a suggestion of just going to the vet.</td></tr><tr><td>Instruction 2
|
| 137 |
+
Response C
|
| 138 |
+
Response D
|
| 139 |
+
Conditional Preference 2</td><td>Do you have any good chili recipes?
|
| 140 |
+
I’m happy to give some suggestions and ideas, but I’m not really an expert on chili. What kind of chili do you want to make?
|
| 141 |
+
I’m afraid not, I don’t have any experience in cooking, and have been programmed to give answers and ask for clarification on issues in the area of cooking!
|
| 142 |
+
Human Preference: C>D. Human Explanation: Response D claims they can’t help and then later on in the same sentence claims they’ve been programmed to give answers on cooking issues, which doesn’t make much sense. C asks a reasonable clarifying question.</td></tr><tr><td>Joint preference</td><td>Human Preference: (Instruction 1, Response B) > (Instruction 2, Response D). Human Explanation: Response B provides answer to the Instruction 1 while Response D does not provide an accurate answer to Instruction 2.</td></tr></table>
|
| 143 |
+
|
| 144 |
+
chosen pair (C) and $28\%$ of the comparisons where the annotators considered the pair equally good or bad. This highlights that both human and AI annotators' perceptions of preferred and non-preferred data depends on the context of the comparisons, indicating that feedback acquisition is a multifaceted phenomenon.
|
| 145 |
+
|
| 146 |
+
Qualitative Case Study. To understand the heuristics used in preference annotations, we asked human annotators to provide brief explanations for their feedback decisions in both conditional and joint preference setups. In Table 3, we observe that humans provide reasonable explanations for rejecting responses B and D in the conditional setup. However, when these same rejected responses are presented in a joint setup, humans offer decisive feedback, basing their decisions on the accuracy of the responses—an aspect not emphasized in the explanations for the conditional preferences. We present additional qualitative examples in Appendix §F to showcase the multi-faceted nature of human feedback revealed through joint preferences.
|
| 147 |
+
|
| 148 |
+
# 6 LLM Alignment with JPO
|
| 149 |
+
|
| 150 |
+
In previous sections, we explore how we collect ranking-based feedback for a pair of responses for identical and non-identical instructions. Here, we study how to leverage joint and conditional feedback data to align large language models effectively with JPO §4.
|
| 151 |
+
|
| 152 |
+
# 6.1 Setup
|
| 153 |
+
|
| 154 |
+
We align Mistral-7B (Jiang et al., 2023), a strong base LLM for its model capacity. We experiment with two datasets that exhibit diverse characteristics: (a) TL;DR dataset where the instruction is to summarize Reddit posts, and (b) open-ended dialogues from Anthropic-Helpful dataset (§5.1). In particular, we collect a conditional preference data $\mathcal{D}_C$ and joint preference data for non-identical instructions $\mathcal{D}_H$ of similar data sizes from ChatGPT. Then, we convert the conditional preference data into an instruction-response data for supervised finetuning $\mathcal{D}_{\mathrm{SFT}}$ .
|
| 155 |
+
|
| 156 |
+
We supervise finetune the entire base LLM model parameters with the SFT dataset to ensure that the preference data is in-policy for the alignment algorithms (Rafailov et al., 2023). JPO algorithm can utilize both the conditional preferences and joint preference with non-identical context. Thus, we train the base LLM with JPO algorithm after merging conditional and joint preferences data $\mathcal{D}_M = \mathcal{D}_C\cup \mathcal{D}_H$ . We provide more details on training setup in Appendix §G. We also apply we apply DPO and KTO algorithm on the SFT model to compare against JPO.
|
| 157 |
+
|
| 158 |
+
Post-alignment, we evaluate the aligned model responses against the gold responses in the dataset's test split. We utilize ChatGPT to compare model and gold responses to decide on the preferred response or a tie. Finally, we report the win-rate of the
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
(a) Performance on TL;DR
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 4: Results for aligning LLMs with JPO. We utilize ChatGPT to compare the model responses with the gold responses. In 4a and 4b we report the results averaged over three runs of the preference optimization objectives and three sampling temperatures. In 4c, we report the results for temperature set at 0.7 for AlpacaEval2.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
(b) Performance on Anthropic-Helpful
|
| 168 |
+
(c) Performance on AlpacaEval2.0
|
| 169 |
+
|
| 170 |
+
model responses as the evaluation metric for 500 unseen instructions from the test sets. In particular, we report the win-rate against the gold responses for the model generated responses averaged across three sampling temperatures $\mathrm{T} \in \{0.001, 0.5, 1.0\}$ .
|
| 171 |
+
|
| 172 |
+
# 6.2 Results
|
| 173 |
+
|
| 174 |
+
We compare the performance of the DPO, KTO, and JPO aligned models in Figure 4a and 4b. Interestingly, we find that JPO outperforms DPO by $5.2\%$ and $3.3\%$ win-rate points on the summarization and helpfulness datasets, respectively. In addition, the performance of JPO is better than DPO across all the sampling temperatures. We observe similar trends in comparison to KTO. This highlights that one can align LLMs by leveraging novel preference acquisition paths without collecting new instruction-response data.
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 5: Win-rate against the gold response in the TL;DR averaged over three sampling temperatures. We study the impact of the joint preferences over non-identical instructions using JPO.
|
| 178 |
+
|
| 179 |
+
# 6.3 Extending the Results to AlpacaEval
|
| 180 |
+
|
| 181 |
+
Similar to Rafailov et al. (2023), we show the usefulness of aligning LLMs using joint preferences
|
| 182 |
+
|
| 183 |
+
via JPO on close-ended (e.g., summarization) and open-ended tasks (e.g., dialogues). However, we further evaluate the effectiveness of our method on a broad set of instructions in the AlpacaEval2 leaderboard using the length-controlled win-rate metric (Li et al., 2023). Additional experimental details are provided in Appendix E.
|
| 184 |
+
|
| 185 |
+
We present the results in Figure 4c where we compare JPO with DPO and KTO. We find that the JPO-aligned LLM outperforms DPO-aligned LLM by 1.8 percentage points on the challenging AlpacaEval2 leaderboard using the length-controlled win-rate metric. This indicates that the JPO can utilize the joint preferences and elicit helpful and accurate responses for a broad set of instructions.
|
| 186 |
+
|
| 187 |
+
# 7 Ablations
|
| 188 |
+
|
| 189 |
+
Impact of Joint Preferences over Non-Identical Instructions. Here, we aim to understand the sole impact of joint preferences acquired over non-identical instructions on the performance of the JPO algorithm. To do so, we train JPO algorithm with joint feedback data $\mathcal{D}_H$ only. We present the results averaged across the three sampling temperatures in Figure 5. We find that training with joint preferences over non-identical instructions achieves $71.7\%$ win-rate on the summarization dataset. This indicates that it is possible to align LLMs with just joint preferences over instruction-response data without any conditional preferences too. Furthermore, this highlights that the feedback paths exposed in our setup are robust and effective for alignment.
|
| 190 |
+
|
| 191 |
+
Impact of Dataset Size. In the main experiments, we demonstrated that JPO can learn effectively from a combination of conditional preferences (i.e.,
|
| 192 |
+
|
| 193 |
+
$100\%$ of the conditional rankings) and joint preferences over non-identical instructions (of the same size as the conditional preferences). To assess the impact of dataset size, we trained JPO using a 50:50 mix of conditional and joint preferences for the TL;DR dataset, with a fixed total size as that of conditional. Our results in Figure 6 show that JPO achieves a win rate of $71.9\%$ , outperforming DPO, which was trained on only the conditional preference dataset of the same size, by 4.2 percentage points.
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 6: Win-rate against the gold response in the TL;DR dataset averaged over three sampling temperatures. We study the impact of dataset size on JPO.
|
| 197 |
+
|
| 198 |
+
Data Scaling. We aim to understand the impact of increasing the number of preferences collected jointly over instruction-response pairs, for non-identical instructions, on the win-rate against the reference summaries in the TL;DR summarization dataset using JPO algorithm. We present the results in Figure 7 for the sampling temperature of 0.001. We find that the win-rate scales from $42.4\%$ to $71.7\%$ as the size of the dataset increases from 100 to 9000 comparisons. We also observe that the change in the win-rate is within $1\%$ when the dataset size increases from 4000 to 9000. This highlights that the performance gains are non-linear with the dataset size. In the future, it would be pertinent to explore techniques for selecting a subset of joint preference comparisons that result in maximum performance gains.
|
| 199 |
+
|
| 200 |
+
# 8 Conclusion
|
| 201 |
+
|
| 202 |
+
In this work, we propose a framework that elicits preferences jointly over instruction-response pairs. Further, we find that the joint preference optimization uncovers heuristics of human decision making that remain obscured in the traditional approach. Additionally, we propose JPO, a novel preference
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
Figure 7: Results for scaling the feedback data size on TL;DR summarization dataset. We find that the win-rate improves with the increase in the dataset size using the JPO preference optimization objective.
|
| 206 |
+
|
| 207 |
+
optimization objective for aligning LLMs. In our experiments, we show that it outperforms DPO and KTO on summarization and dialogue datasets. JPO also outperforms DPO and KTO on AlpacaEval2. We note that the number of joint preferences over instruction-response data scales quadratically with the number of instances in the instruction-response dataset. Therefore, identifying the most informative joint comparisons for robust LLM alignment represents a relevant area for future research. While traditional LLM evaluation has focused on conditional rankings, LLM evaluation through joint rankings would be an important future work.
|
| 208 |
+
|
| 209 |
+
# 9 Limitations
|
| 210 |
+
|
| 211 |
+
While there are various protocols for feedback acquisition, our work is focused on acquiring rankings on a pair of responses under a fixed context or jointly over instruction-response pairs. While ranking-based protocol is widely accepted, there are several limitations associated with it. For instance, conditional or joint rankings do not quantify the strengths or weaknesses for a particular task. In addition, (Bansal et al., 2023) show that different forms of feedback data often disagree with each other. This highlights at the complex and multidimensional aspects of human preferences.
|
| 212 |
+
|
| 213 |
+
In our work, we propose the joint acquisition of feedback for pairs of instruction-response over diverse tasks (e.g., comparing a movie review with an e-commerce product review). However, acquiring joint preferences may be challenging for certain combinations of instruction-response data. This difficulty arises particularly when the distributions of the instructions are significantly dissimilar. For ex
|
| 214 |
+
|
| 215 |
+
ample, it may be challenging to compare feedback for a response to the instruction 'how to cook fried rice?' with a response to 'how to steal my neighbor's wifi?'. In this scenario, the first instruction aims to elicit a helpful response, while the latter seeks a harmful one. In such cases, it is reasonable to expect that human annotators will be biased, preferring more helpful responses over harmful ones or vice versa. Therefore, introducing a notion of instruction similarity to decide which instruction-response pairs to compare under the joint preference protocol might be beneficial.
|
| 216 |
+
|
| 217 |
+
Finally, we acquire human annotations from Amazon Mechanical Turk (AMT) where most of the annotators belong to the U.S. or Canada regions. Hence, the preferences in our dataset are not represented of the diverse demographics in the world. It is pertinent that the future work should study the impact of the diverse groups on the feedback data behaviours and subsequent LLM alignment (Zhao et al., 2023).
|
| 218 |
+
|
| 219 |
+
# References
|
| 220 |
+
|
| 221 |
+
Afra Amini, Tim Vieira, and Ryan Cotterell. 2024. Direct preference optimization with an offset. arXiv preprint arXiv:2402.10571.
|
| 222 |
+
Anthrophic. 2023. Introducing claude.
|
| 223 |
+
Anthropic. 2024. The claude 3 model family: Opus, sonnet, haiku.
|
| 224 |
+
Amanda Askell, Yuntao Bai, Anna Chen, Dawn Drain, Deep Ganguli, Tom Henighan, Andy Jones, Nicholas Joseph, Ben Mann, Nova DasSarma, et al. 2021. A general language assistant as a laboratory for alignment. arXiv preprint arXiv:2112.00861.
|
| 225 |
+
Mohammad Gheshlaghi Azar, Mark Rowland, Bilal Piot, Daniel Guo, Daniele Calandriello, Michal Valko, and Rémi Munos. 2023. A general theoretical paradigm to understand learning from human preferences. arXiv preprint arXiv:2310.12036.
|
| 226 |
+
Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. 2022a. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862.
|
| 227 |
+
Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, Anna Goldie, Azalia Mirhoseini, Cameron McKinnon, et al. 2022b. Constitutional ai: Harmlessness from ai feedback. arXiv preprint arXiv:2212.08073.
|
| 228 |
+
|
| 229 |
+
Hritik Bansal, John Dang, and Aditya Grover. 2023. Peering through preferences: Unraveling feedback acquisition for aligning large language models. arXiv preprint arXiv:2308.15812.
|
| 230 |
+
Yonatan Bitton, Hritik Bansal, Jack Hessel, Rulin Shao, Wanrong Zhu, Anas Awadalla, Josh Gardner, Rohan Taori, and Ludwig Schimdt. 2023. Visit-bench: A benchmark for vision-language instruction following inspired by real-world use. Preprint, arXiv:2308.06595.
|
| 231 |
+
Ralph Allan Bradley and Milton E Terry. 1952. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324-345.
|
| 232 |
+
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.
|
| 233 |
+
Jan Clusmann, Fiona R Kolbinger, Hannah Sophie Muti, Zunamys I Carrero, Jan-Niklas Eckardt, Narmin Ghaffari Laleh, Chiara Maria Lavinia Löffler, Sophie-Caroline Schwarzkopf, Michaela Unger, Gregory P Veldhuizen, et al. 2023. The future landscape of large language models in medicine. Communications medicine, 3(1):141.
|
| 234 |
+
Mike Conover, Matt Hayes, Ankit Mathur, Jianwei Xie, Jun Wan, Sam Shah, Ali Ghodsi, Patrick Wendell, Matei Zaharia, and Reynold Xin. 2023. Free dolly: Introducing the world's first truly open instruction-tuned llm.
|
| 235 |
+
Ganqu Cui, Lifan Yuan, Ning Ding, Guanming Yao, Wei Zhu, Yuan Ni, Guotong Xie, Zhiyuan Liu, and Maosong Sun. 2023. Ultrafeedback: Boosting language models with high-quality feedback. arXiv preprint arXiv:2310.01377.
|
| 236 |
+
Ning Ding, Yulin Chen, Bokai Xu, Yujia Qin, Zhi Zheng, Shengding Hu, Zhiyuan Liu, Maosong Sun, and Bowen Zhou. 2023. Enhancing chat language models by scaling high-quality instructional conversations. arXiv preprint arXiv:2305.14233.
|
| 237 |
+
Yann Dubois, Xuechen Li, Rohan Taori, Tianyi Zhang, Ishaan Gulrajani, Jimmy Ba, Carlos Guestrin, Percy Liang, and Tatsunori B Hashimoto. 2023. Alpacafarm: A simulation framework for methods that learn from human feedback. arXiv preprint arXiv:2305.14387.
|
| 238 |
+
Kawin Ethayarajh, Winnie Xu, Niklas Muennighoff, Dan Jurafsky, and Douwe Kiela. 2024. Kto: Model alignment as prospect theoretic optimization. arXiv preprint arXiv:2402.01306.
|
| 239 |
+
Jason Gabriel. 2020. Artificial intelligence, values, and alignment. *Minds and machines*, 30(3):411-437.
|
| 240 |
+
Gerd Gigerenzer. 2008. Why heuristics work. Perspectives on psychological science, 3(1):20-29.
|
| 241 |
+
|
| 242 |
+
Jiwoo Hong, Noah Lee, and James Thorne. 2024. Orpo: Monolithic preference optimization without reference model. Preprint, arXiv:2403.07691.
|
| 243 |
+
Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. 2023. Mistral 7b. arXiv preprint arXiv:2310.06825.
|
| 244 |
+
Maurice G Kendall and B Babington Smith. 1940. On the method of paired comparisons. Biometrika, 31(3/4):324-345.
|
| 245 |
+
Hannah Rose Kirk, Alexander Whitefield, Paul Röttger, Andrew Bean, Katerina Margatina, Juan Ciro, Rafael Mosquera, Max Bartolo, Adina Williams, He He, et al. 2024. The prism alignment project: What participatory, representative and individualised human feedback reveals about the subjective and multicultural alignment of large language models. arXiv preprint arXiv:2404.16019.
|
| 246 |
+
Nathan Lambert, Valentina Pyatkin, Jacob Morrison, LJ Miranda, Bill Yuchen Lin, Khyathi Chandu, Nouha Dziri, Sachin Kumar, Tom Zick, Yejin Choi, et al. 2024. Rewardbench: Evaluating reward models for language modeling. arXiv preprint arXiv:2403.13787.
|
| 247 |
+
Xuechen Li, Tianyi Zhang, Yann Dubois, Rohan Taori, Ishaan Gulrajani, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. 2023. Alpacaeval: An automatic evaluator of instruction-following models. https://github.com/tatsu-lab/alpaca_eval.
|
| 248 |
+
Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. 2023. Let's verify step by step. arXiv preprint arXiv:2305.20050.
|
| 249 |
+
Rensis Likert. 1932. A technique for the measurement of attitudes. Archives of psychology.
|
| 250 |
+
Tianqi Liu, Zhen Qin, Junru Wu, Jiaming Shen, Misha Khalman, Rishabh Joshi, Yao Zhao, Mohammad Saleh, Simon Baumgartner, Jialu Liu, et al. 2024. Lipo: Listwise preference optimization through learning-to-rank. arXiv preprint arXiv:2402.01878.
|
| 251 |
+
Tianqi Liu, Yao Zhao, Rishabh Joshi, Misha Khalman, Mohammad Saleh, Peter J Liu, and Jialu Liu. 2023. Statistical rejection sampling improves preference optimization. arXiv preprint arXiv:2309.06657.
|
| 252 |
+
Ilya Loshchilov and Frank Hutter. 2017. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101.
|
| 253 |
+
Yujie Lu, Xianjun Yang, Xiujun Li, Xin Eric Wang, and William Yang Wang. 2024. Llmscore: Unveiling the power of large language models in text-to-image synthesis evaluation. Advances in Neural Information Processing Systems, 36.
|
| 254 |
+
|
| 255 |
+
Yu Meng, Mengzhou Xia, and Danqi Chen. 2024. Simpo: Simple preference optimization with a reference-free reward. Preprint, arXiv:2405.14734.
|
| 256 |
+
OpenAI. 2023. Gpt-4 technical report. Preprint, arXiv:2303.08774.
|
| 257 |
+
A Ross Otto, Sean Devine, Eric Schulz, Aaron M Bornstein, and Kenway Louie. 2022. Context-dependent choice and evaluation in real-world consumer behavior. Scientific reports, 12(1):17744.
|
| 258 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. 2022. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730-27744.
|
| 259 |
+
Arka Pal, Deep Karkhanis, Samuel Dooley, Manley Roberts, Siddartha Naidu, and Colin White. 2024. Smaug: Fixing failure modes of preference optimisation with dpo-positive. arXiv preprint arXiv:2402.13228.
|
| 260 |
+
Ryan Park, Rafael Rafailov, Stefano Ermon, and Chelsea Finn. 2024. Disentangling length from quality in direct preference optimization. arXiv preprint arXiv:2403.19159.
|
| 261 |
+
Baolin Peng, Chunyuan Li, Pengcheng He, Michel Galley, and Jianfeng Gao. 2023. Instruction tuning with gpt-4. arXiv preprint arXiv:2304.03277.
|
| 262 |
+
Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D Manning, and Chelsea Finn. 2023. Direct preference optimization: Your language model is secretly a reward model. arXiv preprint arXiv:2305.18290.
|
| 263 |
+
Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. 2024. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36.
|
| 264 |
+
Jérémy Scheurer, Jon Ander Campos, Tomasz Korbak, Jun Shern Chan, Angelica Chen, Kyunghyun Cho, and Ethan Perez. 2023. Training language models with language feedback at scale. arXiv preprint arXiv:2303.16755.
|
| 265 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal policy optimization algorithms. Preprint, arXiv:1707.06347.
|
| 266 |
+
Nisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F Christiano. 2020. Learning to summarize with human feedback. Advances in Neural Information Processing Systems, 33:3008-3021.
|
| 267 |
+
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.
|
| 268 |
+
|
| 269 |
+
Gemini Team, Rohan Anil, Sebastian Borgeaud, Yonghui Wu, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M Dai, Anja Hauth, et al. 2023. Gemini: a family of highly capable multimodal models. arXiv preprint arXiv:2312.11805.
|
| 270 |
+
Teknium. 2023. Openhermes 2.5: An open dataset of synthetic data for generalist llm assistants.
|
| 271 |
+
Louis L Thurstone. 2017. A law of comparative judgment. In *Scaling*, pages 81–92. Routledge.
|
| 272 |
+
Shubham Toshniwal, Ivan Moshkov, Sean Narethiran, Daria Gitman, Fei Jia, and Igor Gitman. 2024. Openmathinstruct-1: A 1.8 million math instruction tuning dataset. arXiv preprint arXiv:2402.10176.
|
| 273 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
|
| 274 |
+
Lewis Tunstall, Edward Beeching, Nathan Lambert, Nazneen Rajani, Kashif Rasul, Younes Belkada, Shengyi Huang, Leandro von Werra, Clémentine Fourrier, Nathan Habib, Nathan Sarrazin, Omar Sanseviero, Alexander M. Rush, and Thomas Wolf. 2023. Zephyr: Direct distillation of lm alignment. Preprint, arXiv:2310.16944.
|
| 275 |
+
Amos Tversky and Itamar Simonson. 1993. Context-dependent preferences. Management science, 39(10):1179-1189.
|
| 276 |
+
Michael Volske, Martin Potthast, Shahbaz Syed, and Benno Stein. 2017. Tl; dr: Mining reddit to learn automatic summarization. In Proceedings of the Workshop on New Frontiers in Summarization, pages 59-63.
|
| 277 |
+
Leandro von Werra, Younes Belkada, Lewis Tunstall, Edward Beeching, Tristan Thrush, Nathan Lambert, and Shengyi Huang. 2020. Trl: Transformer reinforcement learning. https://github.com/huggingface/trl.
|
| 278 |
+
Chaoqi Wang, Yibo Jiang, Chenghao Yang, Han Liu, and Yuxin Chen. 2023a. Beyond reverse kl: Generalizing direct preference optimization with diverse divergence constraints. arXiv preprint arXiv:2309.16240.
|
| 279 |
+
Yizhong Wang, Hamish Ivison, Pradeep Dasigi, Jack Hessel, Tushar Khot, Khyathi Raghavi Chandu, David Wadden, Kelsey MacMillan, Noah A Smith, Iz Beltagy, et al. 2023b. How far can camels go? exploring the state of instruction tuning on open resources. arXiv preprint arXiv:2306.04751.
|
| 280 |
+
Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, and Hannaneh Hajishirzi. 2023c. Self-instruct: Aligning language models with self-generated instructions. Preprint, arXiv:2212.10560.
|
| 281 |
+
|
| 282 |
+
Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Anjana Arunkumar, Arjun Ashok, Arut Selvan Dhanasekaran, Atharva Naik, David Stap, et al. 2022. Super-naturalinstructions: Generalization via declarative instructions on $1600+$ nlp tasks. arXiv preprint arXiv:2204.07705.
|
| 283 |
+
Shijie Wu, Ozan Irsoy, Steven Lu, Vadim Dabravolski, Mark Dredze, Sebastian Gehrmann, Prabhanjan Kambadur, David Rosenberg, and Gideon Mann. 2023a. Bloomberggpt: A large language model for finance. arXiv preprint arXiv:2303.17564.
|
| 284 |
+
Zeqiu Wu, Yushi Hu, Weijia Shi, Nouha Dziri, Alane Suhr, Prithviraj Ammanabrolu, Noah A Smith, Mari Ostendorf, and Hannaneh Hajishirzi. 2023b. Fine-grained human feedback gives better rewards for language model training. arXiv preprint arXiv:2306.01693.
|
| 285 |
+
Can Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng, Pu Zhao, Jiazhan Feng, Chongyang Tao, and Daxin Jiang. 2023. Wizardlm: Empowering large language models to follow complex instructions. arXiv preprint arXiv:2304.12244.
|
| 286 |
+
Da Yin, Xiao Liu, Fan Yin, Ming Zhong, Hritik Bansal, Jiawei Han, and Kai-Wei Chang. 2023. Dynosaur: A dynamic growth paradigm for instruction-tuning data curation. Preprint, arXiv:2305.14327.
|
| 287 |
+
Yueqin Yin, Zhendong Wang, Yi Gu, Hai Huang, Weizhu Chen, and Mingyuan Zhou. 2024. Relative preference optimization: Enhancing llm alignment through contrasting responses across identical and diverse prompts. arXiv preprint arXiv:2402.10958.
|
| 288 |
+
Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. 2023. Metamath: Bootstrap your own mathematical questions for large language models. arXiv preprint arXiv:2309.12284.
|
| 289 |
+
Siyan Zhao, John Dang, and Aditya Grover. 2023. Group preference optimization: Few-shot alignment of large language models. arXiv preprint arXiv:2310.11523.
|
| 290 |
+
Yao Zhao, Mikhail Khalman, Rishabh Joshi, Shashi Narayan, Mohammad Saleh, and Peter J Liu. 2022. Calibrating sequence likelihood improves conditional language generation. In *The Eleventh International Conference on Learning Representations*.
|
| 291 |
+
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Tianle Li, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zhuohan Li, Zi Lin, Eric Xing, et al. 2023a. Lmsyschat-1m: A large-scale real-world llm conversation dataset. arXiv preprint arXiv:2309.11998.
|
| 292 |
+
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. 2023b. Judging llm-as-a-judge with mt-bench and chatbot arena. arXiv preprint arXiv:2306.05685.
|
| 293 |
+
|
| 294 |
+
Tan Zhi-Xuan, Micah Carroll, Matija Franklin, and Hal Ashton. 2024. Beyond preferences in ai alignment. Philosophical Studies, pages 1-51.
|
| 295 |
+
|
| 296 |
+
# A Ranking Feedback Acquisition Protocol
|
| 297 |
+
|
| 298 |
+
Assume a supervised finetuned language model $p_{\mathrm{sft}}$ that is capable of responding to user instructions (e.g., imperative tasks or questions). The goal of alignment is to ensure that the SFT model generates high-quality outputs, preferred by humans. To do so, we consider a set of instructions $\mathcal{I} = \{I_1, \dots, I_n\}$ where $n$ is the number of instructions. Further, we consider a set of responses $\{R_j^1, R_j^2, \dots, R_j^k\}$ where $k$ is the number of responses for each of the instruction $I_j \in \mathcal{I}$ . This forms a dataset of instructions and their corresponding responses, $\mathcal{D} = \{(I_j, R_j^1, R_j^2, \dots, R_j^k)\}$ . Next, we acquire conditional ranking-based feedback over the collected instruction-response data.
|
| 299 |
+
|
| 300 |
+
Under this feedback acquisition protocol, the annotator selects a chosen and rejected response from $\{R_j^x,R_j^y\}$ conditioned on the instruction $I_{j}$ where $x,y\in \{1,2,\ldots ,k\}$ . The preference decision by the annotator is based on the perceived quality of the responses along various dimensions such as helpfulness (accuracy), coherence (grammar), and harmlessness (safety).
|
| 301 |
+
|
| 302 |
+
Formally, the annotator assigns an instruction-conditioned ranking feedback $c(I_j, R_j^x, R_j^y) \in \{R_j^x, R_j^y, \text{Equal}\}$ where 'Equal' indicates that both responses are perceived equally good or bad. If $c(I_j, R_j^x, R_j^y) = R_j^x$ , this implies that the response $R_j^x$ is the chosen response while the $R_j^y$ is the rejected response by the annotator. As a result, the ranking protocol creates a conditional pairwise feedback data $\mathcal{D}_C = \{(I_j, R_j^x, R_j^y, c(I_j, R_j^x, R_j^y))\}$ . Next, we apply an alignment algorithm on this data to elicit human-preferred responses from the LLM.
|
| 303 |
+
|
| 304 |
+
# B Alignment Algorithms
|
| 305 |
+
|
| 306 |
+
Rafailov et al. (2023) introduced direct preference optimization (DPO) that can align a language model without utilizing on an external reward model. Specifically, DPO requires that feedback data should consist of conditional preferences between a pair of responses for a given instruction. Additionally, the algorithm assumes a preference dataset $\mathcal{D}_C$ and the reference model $p_{\mathrm{ref}}$ which is usually the supervised finetuned language model $p_{\mathrm{sft}}$ . Specifically, it aims to train an aligned model $p_{\theta}$ using an optimization objective that upweights
|
| 307 |
+
|
| 308 |
+
the conditional probability of the chosen response $p_{\theta}(R_j^w |I_j)$ over the rejected response $p_{\theta}(R_j^\ell |I_j)$ where $R_{j}^{w}$ and $R_{j}^{\ell}$ are the chosen and rejected response, respectively. Formally, the optimization objective for DPO, $\mathcal{L}_{\mathrm{DPO}}(\theta ;\mathcal{D}_C,\beta ,p_{\mathrm{ref}})$ minimizes the expectation over $(I_j,R_j^w,R_j^\ell)\sim \mathcal{D}_C$ ..
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
\mathbb {E} \left[ \log \left(\sigma \left(\beta \log \frac {p _ {\theta} \left(R _ {j} ^ {w} \mid I _ {j}\right)}{p _ {\text {r e f}} \left(R _ {j} ^ {w} \mid I _ {j}\right)} - \beta \log \frac {p _ {\theta} \left(R _ {j} ^ {\ell} \mid I _ {j}\right)}{p _ {\text {r e f}} \left(R _ {j} ^ {\ell} \mid I _ {j}\right)}\right)\right) \right] \tag {2}
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
where $\sigma$ denotes the sigmoid function and $\beta$ is a hyperparameter. Post-alignment, the model generates high-quality outputs for unseen instructions.
|
| 315 |
+
|
| 316 |
+
# C Dataset Statistics
|
| 317 |
+
|
| 318 |
+
We present the dataset statistics in Table 4. We report the number of instructions after filtering the instances with repeated instructions. Each instance in the dataset consists of an instruction, and a pair of responses. Originally, the number of AI-generated conditional and joint preferences equals the number of instructions data. Here, we report the number of instances for which we observe a decisive preference from ChatGPT i.e., after removing the ties.
|
| 319 |
+
|
| 320 |
+
# D Proof for JPO subsuming DPO
|
| 321 |
+
|
| 322 |
+
We highlight a result that reduces JPO into DPO when the prompts are the same in Lemma E.1.
|
| 323 |
+
|
| 324 |
+
# E JPO on AlpacaEval2 Leaderboard
|
| 325 |
+
|
| 326 |
+
We train Mistral-7B base model on the UltraChat200K dataset (Ding et al., 2023) to get the SFT (reference) model. Subsequently, we utilize the conditional preference dataset, Ultrafeedback-binarized (60K instances) (Cui et al., 2023) to align the SFT model using DPO as the baseline algorithm. Specifically, we utilize the training setup highlighted in the alignment handbook for SFT and DPO (Tunstall et al., 2023). Since JPO algorithm allows access to joint preferences, we construct non-identical instruction-response tuples by pairing a chosen instruction-response $(I_{\text{chosen}}, R_{\text{chosen}})$ with a rejected instruction-response $(I_{\text{reject}}, R_{\text{reject}})$ from the Ultrafeedback dataset. For simplicity, we do not collect new joint preferences for this experiment, and rather utilize the pairings between chosen and rejected instruction-response pairs as a proxy for true joint preference distribution. In particular, we train with JPO algorithm for one epoch, and sweep over three learning rates {1e-7, 3e-7, 5e-7} and set the $\beta = 0.01$ . Post-training, we sample responses
|
| 327 |
+
|
| 328 |
+
<table><tr><td>OpenAI TL;DR Summarization Dataset</td><td>Number</td></tr><tr><td>Number of instructions</td><td>11.8K</td></tr><tr><td>Number of AI generated conditional preferences</td><td>7.2K</td></tr><tr><td>Number of AI generated joint preferences</td><td>7.7K</td></tr><tr><td>Anthropic-Helpful Dataset</td><td></td></tr><tr><td>Number of instructions</td><td>12.8K</td></tr><tr><td>Number of AI generated conditional preferences</td><td>9.4K</td></tr><tr><td>Number of AI generated joint preferences</td><td>8.5K</td></tr></table>
|
| 329 |
+
|
| 330 |
+
Table 4: Statistics for the train split of the summarization and open-ended dialogue datasets.
|
| 331 |
+
|
| 332 |
+
Lemma D.1. Under the case where $\mathcal{D}_X = \{(I_i,R_i,I_i,R_j)\}$ , that is, prompts are the same for preferred and not-preferred prompt generation pairs, $\mathcal{L}_{\mathrm{DPO}}(\theta ;\mathcal{D}_C,\beta ,p_{ref}) = \mathcal{L}_{\mathrm{JPO}}(\theta ;\mathcal{D}_X,\beta ,p_{ref})$ , where $\mathcal{D}_C = \{(I_j,R_j^w,R_j^\ell)\}$ .
|
| 333 |
+
|
| 334 |
+
Proof. $\mathcal{L}_{\mathrm{JPO}}(\theta ;\mathcal{D}_X,\beta ,p_{\mathrm{ref}})$
|
| 335 |
+
|
| 336 |
+
$$
|
| 337 |
+
\begin{array}{l} = \mathbb {E} _ {\left(I _ {j} ^ {w}, R _ {j} ^ {w}, I _ {j} ^ {\ell}, R _ {j} ^ {\ell}\right) \sim \mathcal {D} _ {X}} \left[ \log \left(\sigma \left(\beta \log \frac {p _ {\theta} \left(R _ {i} ^ {w} , I _ {i} ^ {w}\right)}{p _ {\text {r e f}} \left(R _ {i} ^ {w} , I _ {i} ^ {w}\right)} - \beta \log \frac {p _ {\theta} \left(R _ {j} ^ {\ell} , I _ {j} ^ {\ell}\right)}{p _ {\text {r e f}} \left(R _ {j} ^ {\ell} , I _ {j} ^ {\ell}\right)}\right)\right) \right] (3) \\ = \mathbb {E} _ {\left(I _ {j} ^ {w} R _ {j} ^ {w}, I _ {j} ^ {\ell}, R _ {j} ^ {\ell}\right) \sim \mathcal {D} _ {X}} \left[ \log \left(\sigma \left(\beta \log \frac {p _ {\theta} \left(R _ {i} ^ {w} \mid I _ {i} ^ {w}\right) p _ {\theta} \left(I _ {i} ^ {w}\right)}{p _ {\text {r e f}} \left(R _ {i} ^ {w} \mid I _ {i} ^ {w}\right) p _ {\text {r e f}} \left(I _ {i} ^ {w}\right)} - \beta \log \frac {p _ {\theta} \left(R _ {j} ^ {\ell} \mid I _ {j} ^ {\ell}\right) p _ {\theta} \left(I _ {j} ^ {\ell}\right)}{p _ {\text {r e f}} \left(R _ {j} ^ {\ell} , I _ {j} ^ {\ell}\right) p _ {\text {r e f}} \left(I _ {j} ^ {\ell}\right)}\right)\right) \right] (4) \\ = \mathbb {E} _ {\left(I _ {j}, R _ {j} ^ {w}, R _ {j} ^ {\ell}\right) \sim \mathcal {D} _ {C}} \left[ \log \left(\sigma \left(\beta \log \frac {p _ {\theta} \left(R _ {j} ^ {w} \mid I _ {j}\right)}{p _ {\text {r e f}} \left(R _ {j} ^ {w} \mid I _ {j}\right)} - \beta \log \frac {p _ {\theta} \left(R _ {j} ^ {\ell} \mid I _ {j}\right)}{p _ {\text {r e f}} \left(R _ {j} ^ {\ell} \mid I _ {j}\right)}\right)\right) \right] (5) \\ = \mathcal {L} _ {\mathrm {D P O}} (\theta ; \mathcal {D} _ {C}, \beta , p _ {\text {r e f}}) (6) \\ \end{array}
|
| 338 |
+
$$
|
| 339 |
+
|
| 340 |
+
The proof follows from applying bayes rule and substituting $I_{j}^{w} = I_{j}^{\ell} = I_{j}$ .
|
| 341 |
+
|
| 342 |
+
from the SFT model, DPO-aligned LLM, KTO-aligned LLM, and JPO-aligned LLM for the instructions in the AlpacaEval2 with a temperature of 0.7.
|
| 343 |
+
|
| 344 |
+
# F Qualitative Examples
|
| 345 |
+
|
| 346 |
+
In this section, we present the qualitative examples to study the interplay between the conditional rankings and the joint preference over instruction-response pairs. Here, we acquire ranking feedback from the human annotators and ask them to provide the reasoning for their decision.
|
| 347 |
+
|
| 348 |
+
# F.1 Anthropic-Helpful Examples
|
| 349 |
+
|
| 350 |
+
We present the qualitative examples for the preferences acquired for the Anthropic-helpful dataset in Figure 8, and 9. We present our observations in the figure captions.
|
| 351 |
+
|
| 352 |
+
# F.2 TL;DR Summarization Examples
|
| 353 |
+
|
| 354 |
+
We present the qualitative examples for the preferences acquired for the TL;DR summarization
|
| 355 |
+
|
| 356 |
+
dataset in Figure 10, 11, and 12. We present our observations in the figure captions.
|
| 357 |
+
|
| 358 |
+
# G Alignment Training Details
|
| 359 |
+
|
| 360 |
+
# G.1 Supervised Finetuning Details
|
| 361 |
+
|
| 362 |
+
We present the SFT details in table 7. We perform full-finetuning of Mistral-7B using the source code from https://github.com/abacaj/fine-tune-mistral.
|
| 363 |
+
|
| 364 |
+
# G.2 JPO
|
| 365 |
+
|
| 366 |
+
We present the training details for JPO preference optimization objective in the Table 8. We select the learning rate hyperparameter by sweeping over three learning rates: $\{1e - 5,5e - 5,5e - 4\}$ . We utilize the TRL library (von Werra et al., 2020) for the DPO source code.
|
| 367 |
+
|
| 368 |
+
# H ChatGPT Prompts
|
| 369 |
+
|
| 370 |
+
We present the ChatGPT for acquiring conditional rankings feedback and joint preferences over instruction-response pairs in Table 13 and Table 14, respectively.
|
| 371 |
+
|
| 372 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">TL;DR</td><td colspan="4">Anthropic-Helpful</td></tr><tr><td>T = 0.001</td><td>T = 0.5</td><td>T = 1.0</td><td>Average</td><td>T = 0.001</td><td>T = 0.5</td><td>T = 1.0</td><td>Average</td></tr><tr><td>SFT</td><td>46.6</td><td>44.9</td><td>39.8</td><td>43.8</td><td>59.1</td><td>56.2</td><td>56.8</td><td>57.4</td></tr><tr><td>DPO (Rafailov et al., 2024)</td><td>66.5</td><td>67.0</td><td>69.5</td><td>67.7</td><td>73.5</td><td>72</td><td>69.5</td><td>71.7</td></tr><tr><td>KTO (Ethayarajh et al., 2024)</td><td>71.8</td><td>71.9</td><td>70.6</td><td>71.4</td><td>72.8</td><td>72.9</td><td>68.8</td><td>71.5</td></tr><tr><td>JPO (Ours)</td><td>72.7</td><td>71.9</td><td>74.2</td><td>72.9</td><td>76.3</td><td>74.5</td><td>74.1</td><td>75.0</td></tr></table>
|
| 373 |
+
|
| 374 |
+
Table 5: Results for aligning LLMs with the JPO preference optimization objective. We compare the win-rate against the gold responses of the supervised finetuned (SFT), DPO-aligned and JPO-aligned LLM on the (a) TL;DR summarization and (b) the Anthropic-Helpful datasets. In our experiments, we utilize ChatGPT to compare the model responses with the gold responses. We generate model responses for three sampling temperatures. The results are averaged over three runs of the preference optimization objectives.
|
| 375 |
+
|
| 376 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">TL;DR</td><td colspan="4">Anthropic-Helpful</td></tr><tr><td>R1</td><td>R2</td><td>R3</td><td>Average</td><td>R1</td><td>R2</td><td>R3</td><td>Average</td></tr><tr><td>DPO (Rafailov et al., 2024)</td><td>64.8</td><td>69.4</td><td>68.8</td><td>67.7</td><td>68.1</td><td>73.5</td><td>73.5</td><td>71.7</td></tr><tr><td>JPO (Ours)</td><td>68.7</td><td>74.7</td><td>75.3</td><td>72.9</td><td>72.0</td><td>76.3</td><td>76.7</td><td>75.0</td></tr></table>
|
| 377 |
+
|
| 378 |
+
Table 6: Results for aligning LLMs with the JPO preference optimization objective. We show the per run results for TL;DR and Anthropic-Helpful datasets. The final results are averaged over three runs of the preference optimization objectives.
|
| 379 |
+
|
| 380 |
+
# I Human Annotation Platform
|
| 381 |
+
|
| 382 |
+
For human evaluation, we recruit annotators from Amazon Mechanical Turk, and all annotators are fairly paid more than \(18 USD per hour (it varies depending on the time spent on HITs), which is higher than the national minimum wage where the annotators are recruited. We present the screenshots for the human interface in the Figure 15 (conditional rankings) and Figure 16 (joint ranking preferences over instruction-response pairs).
|
| 383 |
+
|
| 384 |
+

|
| 385 |
+
Figure 8: Interplay between the conditional rankings and joint rankings and reasoning acquired from the human annotators for the Anthropic-Helpful dataset. In this example, we find that the response A and C are accepted under the conditional rankings. When asked to compare the response A and C, humans consider that the response A answers Instruction 1 better than response C answers Instruction 2. This indicates that the joint preference humans elicits a decisive feedback between two responses that were accepted under the conditional rankings.
|
| 386 |
+
|
| 387 |
+
<table><tr><td colspan="2">Anthropic-Helpful Dataset</td></tr><tr><td>Learning Rate</td><td>1.5e-6</td></tr><tr><td>Batch Size</td><td>6</td></tr><tr><td>Epochs</td><td>3</td></tr><tr><td colspan="2">OpenAI TL;DR Summarization Dataset</td></tr><tr><td>Learning Rate</td><td>2e-5</td></tr><tr><td>Batch Size</td><td>12</td></tr><tr><td>Epochs</td><td>3</td></tr></table>
|
| 388 |
+
|
| 389 |
+
Table 7: Training details for the supervised finetuning of Mistral-7B.
|
| 390 |
+
|
| 391 |
+

|
| 392 |
+
Figure 9: Interplay between the conditional rankings and joint rankings and reasoning acquired from the human annotators for the Anthropic-Helpful dataset. In this example, we find that the response A is accepted and D is rejected under the conditional rankings. When asked to compare the response A and D, humans consider that the response A answers Instruction 1 better than response D answers Instruction 2. This indicates that a response that was preferred (rejected) under the conditional rankings can still be preferred (rejected) under the joint rankings.
|
| 393 |
+
|
| 394 |
+

|
| 395 |
+
Figure 10: Interplay between the conditional rankings and joint rankings and reasoning acquired from the human annotators for the TL;DR summarization dataset. In this example, we find that the response B is accepted and C is rejected under the conditional rankings. When asked to compare the response B and C, humans consider that the response C answers Instruction 2 better than response B answers Instruction 1. This indicates that a response that was preferred (rejected) under the conditional rankings can be rejected (preferred) under the joint rankings, further highlighting at the complex and multidimensional nature of human preferences.
|
| 396 |
+
|
| 397 |
+

|
| 398 |
+
Figure 11: Interplay between the conditional rankings and joint rankings and reasoning acquired from the human annotators for the TL;DR summarization dataset. In this example, we find that the response B and C are accepted under the conditional rankings. When asked to compare the response B and C, humans consider that the response B answers Instruction 1 better than response C answers Instruction 2. This indicates that the joint preference humans elicits a decisive feedback between two responses that were accepted under the conditional rankings.
|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
Figure 12: Interplay between the conditional rankings and joint rankings and reasoning acquired from the human annotators for the TL;DR summarization dataset. In this example, we find that the response A is considered to be equally good as response B for the instruction 1. In addition, response C is rejected in comparison to the response D for the instruction 2. However, when asked to compare the response A and C, humans consider that the response C answers Instruction 2 better than response A answers Instruction 1. This highlights that a rejected response can be preferred over a non-rejected response under joint rankings.
|
| 402 |
+
|
| 403 |
+
<table><tr><td colspan="2">OpenAI TL;DR Summarization Dataset</td></tr><tr><td>Peak Learning Rate</td><td>5e-5</td></tr><tr><td>Optimizer</td><td>AdamW (Loshchilov and Hutter, 2017)</td></tr><tr><td>Learning Schedule</td><td>Cosine</td></tr><tr><td>Batch Size</td><td>32</td></tr><tr><td>Epochs</td><td>10</td></tr><tr><td>Warmup Steps</td><td>100</td></tr><tr><td>α (LoRA)</td><td>16</td></tr><tr><td>Dropout (LoRA)</td><td>0.05</td></tr><tr><td>Bottleneck r (LoRA)</td><td>8</td></tr><tr><td>4bit Loading</td><td>True</td></tr><tr><td>β</td><td>0.1</td></tr></table>
|
| 404 |
+
|
| 405 |
+
<table><tr><td colspan="2">Anthropic-Helpful Dataset</td></tr><tr><td>Peak Learning Rate</td><td>5e-5</td></tr><tr><td>Optimizer</td><td>AdamW</td></tr><tr><td>Learning Schedule</td><td>Cosine</td></tr><tr><td>Batch Size</td><td>32</td></tr><tr><td>Epochs</td><td>5</td></tr><tr><td>Warmup Steps</td><td>100</td></tr><tr><td>α (LoRA)</td><td>16</td></tr><tr><td>Dropout (LoRA)</td><td>0.05</td></tr><tr><td>Bottleneck r (LoRA)</td><td>8</td></tr><tr><td>4bit Loading</td><td>True</td></tr><tr><td>β</td><td>0.1</td></tr></table>
|
| 406 |
+
|
| 407 |
+
Table 8: Training details for JPO preference optimization objective. We use the identical settings for DPO.
|
| 408 |
+
|
| 409 |
+
You are a helpful following assistant whose goal is to select the preferred output for a given instruction. Answer the question by printing only a single choice from ["Output (a)", "Output (b)"] (without quotes) corresponding to the correct answer with no other text.
|
| 410 |
+
|
| 411 |
+
Annotation Guideline
|
| 412 |
+
|
| 413 |
+
In this task, we will ask you to select the preferred output AI model's responses to instructions.
|
| 414 |
+
|
| 415 |
+
You will read examples, which are composed of the following:
|
| 416 |
+
|
| 417 |
+
1. an Instruction we give to the AI system
|
| 418 |
+
2. Output (a), the first output from the AI system
|
| 419 |
+
3. Output (b), the second output from the AI system
|
| 420 |
+
|
| 421 |
+
Your task is to decide which response is better for each example. There are several dimensions that you can think along. Consider the following dimensions:
|
| 422 |
+
|
| 423 |
+
Accuracy: The output sentence should be factually consistent with the instruction and the input. Coherence: The output sentence should be easy to understand and free of grammatical errors when read on its own. Harmlessness: The output sentence should not contain derogatory, harmful, or toxic connotations.
|
| 424 |
+
|
| 425 |
+
You should answer using only Output (a) or Output (b) depending on which response is better.
|
| 426 |
+
|
| 427 |
+
Instruction:
|
| 428 |
+
|
| 429 |
+
instruction
|
| 430 |
+
|
| 431 |
+
Output (a):
|
| 432 |
+
|
| 433 |
+
output1
|
| 434 |
+
|
| 435 |
+
Output (b):
|
| 436 |
+
|
| 437 |
+
output2
|
| 438 |
+
|
| 439 |
+
## Preferred Output:
|
| 440 |
+
|
| 441 |
+
Figure 13: GPT-3.5-Turbo API prompt for comparisons on identical instructions
|
| 442 |
+
|
| 443 |
+
You are a helpful following assistant whose goal is to select the preferred output for a given instruction. Answer the question by printing only a single choice from ["Output (a)", "Output (b)"] (without quotes) corresponding to the correct answer with no other text.
|
| 444 |
+
|
| 445 |
+
Annotation Guideline
|
| 446 |
+
|
| 447 |
+
In this task, we will ask you to select the preferred output AI model's responses to instructions.
|
| 448 |
+
|
| 449 |
+
You will read examples, which are composed of the following:
|
| 450 |
+
|
| 451 |
+
1. Instruction (a), the first input to the AI system and Output (a), the first output from the AI system
|
| 452 |
+
2. Instruction (b), the second input to the AI system and Output (b), the second output from the AI system
|
| 453 |
+
|
| 454 |
+
Your task is to decide which response is better for each example. There are several dimensions that you can think along. Consider the following dimensions:
|
| 455 |
+
|
| 456 |
+
Accuracy: The output sentence should be factually consistent with the instruction and the input. Coherence: The output sentence should be easy to understand and free of grammatical errors when read on its own. Harmlessness: The output sentence should not contain derogatory, harmful, or toxic connotations.
|
| 457 |
+
|
| 458 |
+
You should answer using only Output (a) or Output (b) depending on which response is better.
|
| 459 |
+
|
| 460 |
+
Instruction (a):
|
| 461 |
+
|
| 462 |
+
instruction1
|
| 463 |
+
|
| 464 |
+
Output (a):
|
| 465 |
+
|
| 466 |
+
output1
|
| 467 |
+
|
| 468 |
+
Instruction (b):
|
| 469 |
+
|
| 470 |
+
instruction2
|
| 471 |
+
|
| 472 |
+
Output (b):
|
| 473 |
+
|
| 474 |
+
output2
|
| 475 |
+
|
| 476 |
+
## Preferred Output:
|
| 477 |
+
|
| 478 |
+
Figure 14: GPT-3.5-Turbo API prompt for comparisons on non-identical instructions
|
| 479 |
+
|
| 480 |
+
Please thoroughly read the provided Instruction and the corresponding responses. In this task, we will ask you to select the preferred output AI model's responses to instructions. Your task is to decide which response is better for each example i.e., Response A, Response B, or whether both are equally good/bad. There are several dimensions that you can think along. Consider the following questions:
|
| 481 |
+
|
| 482 |
+
Is the response helpful? For example, if the instruction asked for a recipe for healthy food, and the response is a useful recipe, then we can consider it helpful. Is the response language natural? For example, AI responses often have repetitions, which is not natural.
|
| 483 |
+
|
| 484 |
+
Is the response factual/accurate? For example, AI responses often make up new information. For example, if the response claims that Donald Trump is the current U.S. president, then you should consider it inaccurate.
|
| 485 |
+
|
| 486 |
+
and so on ... ultimately, you should decide which response is better based on your judgment and based on your own preference.
|
| 487 |
+
|
| 488 |
+
(WARNING: There might be some offensive and harmful content in the tasks.)
|
| 489 |
+
|
| 490 |
+
Instruction:
|
| 491 |
+
|
| 492 |
+
$(instruction)
|
| 493 |
+
|
| 494 |
+
Response A:
|
| 495 |
+
|
| 496 |
+
\$\{response_a\}
|
| 497 |
+
|
| 498 |
+
Response B:
|
| 499 |
+
|
| 500 |
+
$\S[\text{response\_b}]$
|
| 501 |
+
|
| 502 |
+
Choose the preferred response:
|
| 503 |
+
|
| 504 |
+
$\mathbb{O}$ Response A
|
| 505 |
+
$\mathbb{O}$ Response B
|
| 506 |
+
Equally Good/Bad
|
| 507 |
+
|
| 508 |
+
Figure 15: Human annotation interface for Conditional Rankings
|
| 509 |
+
|
| 510 |
+
Please thoroughly read the provided Instruction and Response pairs. In this task, we will ask you to select the pair of instruction and response. Your task is to decide which response is better for the posed instruction. For example, Response A better answers the Instruction A (say summarize paragraph A) than Response B answers the Instruction B (say summarize paragraph B). Here, we are interested to know whether the model does a better summarization task for paragraph A or paragraph B. While this example is for summarizes, the actual task can have diverse prompts. Consider the following questions:
|
| 511 |
+
|
| 512 |
+
Is the response helpful? For example, if the instruction asked for a recipe for healthy food, and the response is a useful recipe, then we can consider it helpful. Is the response language natural? For example, AI responses often have repetitions, which is not natural.
|
| 513 |
+
|
| 514 |
+
Is the response factual/accurate? For example, AI responses often make up new information. For example, if the response claims that Donald Trump is the current U.S. president, then you should consider it inaccurate.
|
| 515 |
+
|
| 516 |
+
and so on ... ultimately, you should decide which response is better based on your judgment and based on your own preference. (WARNING: There might be some offensive and harmful content in the tasks.)
|
| 517 |
+
|
| 518 |
+
Instruction A:
|
| 519 |
+
|
| 520 |
+
{$instruction_a}
|
| 521 |
+
|
| 522 |
+
Response A:
|
| 523 |
+
|
| 524 |
+
$\S[\text{response\_a}]$
|
| 525 |
+
|
| 526 |
+
Instruction B:
|
| 527 |
+
|
| 528 |
+
{$instruction_b}
|
| 529 |
+
|
| 530 |
+
Response B:
|
| 531 |
+
|
| 532 |
+
{\response_b}
|
| 533 |
+
|
| 534 |
+
Choose the preferred instruction, response pair:
|
| 535 |
+
|
| 536 |
+
Instruction A, Response A
|
| 537 |
+
Instruction B, Response B
|
| 538 |
+
Both pairs are equally answered well or bad
|
| 539 |
+
|
| 540 |
+
Figure 16: Human annotation interface for joint preferences over instruction-response pairs.
|
2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4575195fe6b8f80d3e6cf653f396e01868240217c24b6efcddb902500609545c
|
| 3 |
+
size 1147795
|
2025/Comparing Bad Apples to Good Oranges Aligning Large Language Models via Joint Preference Optimization/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/ea72460d-d305-41d9-919b-812f11c036ef_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/ea72460d-d305-41d9-919b-812f11c036ef_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/ea72460d-d305-41d9-919b-812f11c036ef_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8970b58856e17d8ca1ff4562d1071027299391200625b051b8c3ff43abb3f70d
|
| 3 |
+
size 552706
|
2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/full.md
ADDED
|
@@ -0,0 +1,409 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COMPARISONQA: Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty
|
| 2 |
+
|
| 3 |
+
Qing Zong, Zhaowei Wang, Tianshi Zheng, Xiyu Ren, Yangqiu Song
|
| 4 |
+
|
| 5 |
+
Department of Computer Science and Engineering, HKUST {qzong, yqsong}@cse.ust.hk
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
The rapid development of LLMs has sparked extensive research into their factual knowledge. Current works find that LLMs fall short on questions around low-frequency entities. However, such proofs are unreliable since the questions can differ not only in entity frequency but also in difficulty themselves. So we introduce COMPARISONQA benchmark, containing 283K abstract questions, each instantiated by a pair of high-frequency and low-frequency entities. It ensures a controllable comparison to study the role of knowledge frequency in the performance of LLMs. Because the difference between such a pair is only the entity with different frequencies. In addition, we use both correctness and uncertainty to develop a two-round method to evaluate LLMs' knowledge robustness. It aims to avoid possible semantic shortcuts which is a serious problem of current QA study. Experiments reveal that LLMs, including GPT-4o, exhibit particularly low robustness regarding low-frequency knowledge. Besides, we find that uncertainty can be used to effectively identify high-quality and shortcut-free questions while maintaining the data size. Based on this, we propose an automatic method to select such questions to form a subset called COMPARISONQA-Hard, containing only hard low-frequency questions.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
The rapid advancement of large language models (LLMs) has promoted a lot of study on their factual knowledge and reasoning ability (Wei et al., 2024a,b; Hendrycks et al., 2021).
|
| 14 |
+
|
| 15 |
+
Sun et al. (2024) and Mallen et al. (2023) compare LLMs' performance on questions around entities with different frequencies. LLMs are found struggle to handle tail knowledge. However, the questions they study are different and can vary in
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: An example from COMPARISONQA
|
| 19 |
+
|
| 20 |
+
difficulty levels, not only in entity frequencies. As Allen-Zhu and Li (2023) emphasized, we need a more "controlled, synthetic experiment that confirms the weakness of LLMs" nowadays. Therefore, existing comparisons are not enough since they can not guarantee that the low frequency is the only cause of LLMs' poor performance.
|
| 21 |
+
|
| 22 |
+
To tackle the issue, we introduce our COMPARISONQA benchmark. Pairs of high-frequency and low-frequency entities share the same question, as shown in Figure 1. The shared abstract question, with a hypernym to represent the two specific entities, guarantees that the difference between such a pair is only the entity. This allows for a controllable comparison between high-frequency and low-frequency entities. COMPARISONQA is a large scale dataset containing 283K such question pairs. It is generated through an automatic pipeline base on raw knowledge base, ensuring both diversity and scalability. Through this benchmark, we can completely compare LLM's performance on different knowledge frequencies.
|
| 23 |
+
|
| 24 |
+
For a more robust and accurate evaluation, we use the multiple-choice format (Hendrycks et al., 2021; Geva et al., 2021) in our benchmark. But semantic shortcuts (Geirhos et al., 2020) between questions and options may help LLMs to guess the answer, which is also a common but severe problem recently. Thus, we further design a two-round method using both correctness and uncertainty to evaluate LLMs' knowledge. During experiments, we found that LLMs have very poor robustness, especially on low-frequency knowledge, where even the powerful GPT-4o also performs badly.
|
| 25 |
+
|
| 26 |
+
Recent benchmarks, like SimpleQA (Wei et al., 2024a), ensure their difficulty by collecting questions adversarially against LLMs' responses. But relying only on accuracy, they ignore the quality of their questions, and the difficulty is closely related to the models they use. Fortunately, our experiments find that uncertainty is also an effective tool in selecting both high-quality and shortcut-free questions while maintaining the benchmark size. Combining accuracy and uncertainty, we propose a new flexible method to select our subset called COMPARISONQA-Hard for future study. It contains 81K difficult low-frequency questions with high-quality and no semantic shortcuts.
|
| 27 |
+
|
| 28 |
+
In summary, we have three main contributions: (1) [Resource] We introduce COMPARISONQA benchmark, where a pair of entities share the same abstract question. It enables a more controllable and reasonable proof that LLMs perform worse when the required knowledge is less frequent. $(\S 3)$
|
| 29 |
+
(2) [Method] We design a two-round method using correctness and uncertainty to evaluate LLMs' robust knowledge. [Finding] LLMs can not stand such a test, especially on low-frequency knowledge, where even GPT-4o performs badly. (§4)
|
| 30 |
+
(3) [Finding] Uncertainty is more helpful to find questions with high quality. [Resource] Through this, we select COMPARISONQA-Hard benchmark containing only hard and low-frequency questions of high quality and no shortcuts. (§5)
|
| 31 |
+
|
| 32 |
+
# 2 Related Works
|
| 33 |
+
|
| 34 |
+
# 2.1 Benchmarking LLMs' Factuality
|
| 35 |
+
|
| 36 |
+
The factuality evaluation of LLMs has recently attracted significant attention. Some factuality benchmarks require open-ended generation by LLMs, such as SimpleQA (Wei et al., 2024a), Self-Aware (Yin et al., 2023), CLR-Fact (Zheng et al., 2024b), and HaluEval (Li et al., 2023). Such eval
|
| 37 |
+
|
| 38 |
+
uations either rely heavily on expert annotation, or utilize automatic answer matching that sacrifices evaluation accuracy (Min et al., 2023; Chern et al., 2023; Wang et al., 2024b). Other benchmarks adopt the format of Yes-or-No questions (Geva et al., 2021; Zhang et al., 2024) or multiple-choice questions (MCQ) (Hendrycks et al., 2021; Wang et al., 2024a; Zheng et al., 2024a). These formats allow model responses to be easily parsed and compared with gold labels, enabling solid yet efficient evaluations.
|
| 39 |
+
|
| 40 |
+
# 2.2 Long-Tail Knowledge
|
| 41 |
+
|
| 42 |
+
Long-tail knowledge (Wei et al., 2024b; Chen et al., 2023) is an important aspect of factuality. Kumar et al. (2024) proposes an automatic approach to generate questions for tail entities. Kandpal et al. (2023) find LLMs struggle to learn long-tail knowledge. Other works study the influence of knowledge frequency: Mallen et al. (2023) introduced PopQA, a long-tail benchmark, and found that models' performance will change with the frequency of entities in the questions. Sun et al. (2024) also proves this by constructing questions around head, torso, and tail entities. However, questions in these benchmarks are all in the form of open-ended generation, which can not be easily evaluated. They also depend on limited number of templates to produce QA questions from knowledge graphs, which will significantly harm the diversity of the benchmarks. Most importantly, the questions are different, so they may vary in difficulty levels, and thus can not provide fair comparisons.
|
| 43 |
+
|
| 44 |
+
# 2.3 Abstraction Knowledge
|
| 45 |
+
|
| 46 |
+
Existing works have studied various aspects of abstraction, for example, entity abstraction (Wu et al., 2012; Song et al., 2015; Xu et al., 2023), event abstraction (Wang et al., 2024d,c), and conceptual abstraction (Han et al., 2024). Abstraction has been shown to be beneficial for downstream tasks like commonsense reasoning, numerical reasoning, and logical reasoning (Zhou et al., 2024; Hong et al., 2024). In this paper, we control question difficulty by sharing the same abstraction form between a pair of entities.
|
| 47 |
+
|
| 48 |
+
# 3 COMPARISONQA
|
| 49 |
+
|
| 50 |
+
To ensure more fair and controllable comparisons between LLMs' performance on high-frequency and low-frequency factual knowledge, we propose a new benchmark called COMPARISONQA.
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
1) Entity Pairs Extraction from DBpedia
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
2) Abstract Question Generation
|
| 57 |
+
3) Hard High-Quality Question Selecting
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 2: An overview of our benchmark curation pipeline. It contains three parts. Through the first two parts, (1) Entity Pairs Extraction from DBpedia and (2) Abstract Question Generation, we can get the whole COMPARISONQA. And through the third part, (3) Hard High-Quality Question Selecting, we can get a harder subset, containing only difficult low-frequency questions with high quality and no semantic shortcut.
|
| 61 |
+
|
| 62 |
+
# 3.1 Question Formulation
|
| 63 |
+
|
| 64 |
+
For an accurate evaluation, our questions are in the form of multiple choice. Although recently there are several generative QA benchmarks, like SimpleQA (Wei et al., 2024a), and also some automatic methods (Zheng et al., 2023) to evaluate generated answers. There are still significant limitations in such generative QAs since the answer should be single and indisputable. Questions like What is the primary focus or intention behind Civil Procedure Rules cannot be included since there are many ways to answer this question. However, multiple-choice questions do not have such limitations.
|
| 65 |
+
|
| 66 |
+
Each piece of data in COMPARISONQA, shown in Figure 1, contains an abstract question shared by two entities having the same hypernym. One entity, having many relationships in DBpedia (Auer et al., 2007), which will be introduced next, is the high-frequency entity, and the other, with only a few relationships, is the low-frequency one. The question will have different answers for the two entities, respectively. Such data form can ensure detailed and controllable comparisons between entities with different frequencies, and that is why we call it COMPARISONQA. Containing 283K such question pairs, the benchmark is constructed through a fully automated pipeline, which is cheap and scalable.
|
| 67 |
+
|
| 68 |
+
# 3.2 Curation Pipeline
|
| 69 |
+
|
| 70 |
+
In this section, we discuss the data curation pipeline for our dataset. As shown in Figure 2, the pipeline contains three parts: (1) Entity Pairs Extraction
|
| 71 |
+
|
| 72 |
+
from DBpedia, (2) Abstract Question Generation, and (3) Hard High-Quality Question Filtering. Here we will introduce the first two parts, used to build COMPARISONQA, and leave the third part, used to build COMPARISONQA-Hard, for §5.
|
| 73 |
+
|
| 74 |
+
# 3.2.1 Entity Pairs Extraction from DBpedia
|
| 75 |
+
|
| 76 |
+
Following Sun et al. (2024), an entity's frequency is defined by its number of relationships in DBpedia. High-frequency entities are those whose cumulative relationships account for the first $1/3$ of all sorted entities, and low-frequency entities are for the last $1/3$ . Details are shown in Appendix B.
|
| 77 |
+
|
| 78 |
+
In practice, we first get all the hypernyms in DBpedia and classify the entities belonging to them into high-frequent and low-frequent. Then, we map the entities one-by-one to get entity pairs. The reason behind this is that not every random pair of entities can have a shared abstract question easily. For example, it's hard to write a shared question for Einstein and Apple even though they are all high-frequency entities. But it's easy for two specific universities to share a same abstract question. In order for our entity pairs to produce high quality abstract questions, we ensure that the two entities have the same hypernym. This allows them to have similar descriptions, making it easier to generate an abstract question.
|
| 79 |
+
|
| 80 |
+
# 3.2.2 Abstract Question Generation
|
| 81 |
+
|
| 82 |
+
After acquiring the entity pairs, we adopt a multi-step curation pipeline to generate high-quality abstract multiple-choice questions: (1) Generate an abstract question (without options) according to the
|
| 83 |
+
|
| 84 |
+
DBpedia descriptions of both entity. (2) Separately generate the corresponding answers based on the descriptions, with length control to alleviate bias among candidate answers. (3) Generate distractors for both entities with length control. Compared to randomly selected distractors, LLM-selected distractors generation have demonstrated its effectiveness for the high relevance between distractors and designated choices (Zheng et al., 2024c). (4) Formulate the final multiple-choice question using the four answer candidates above. (5) Proofread the question according to the standards below.
|
| 85 |
+
|
| 86 |
+
The standards for questions are presented as follows: (1) Quality: The questions should have one and only one correct answer for both entities. (2) Semantic Shortcuts: The correct answer cannot be simply guessed by the names of the entities or the way the questions are asked. For example, the question: What was the primary operational location of Sydney O-Class Tram? A. Oslo, Norway B. Sydney, Australia C. Stockholm, Sweden D. Melbourne, Australia is not allowed since only the correct answer contains Sydney which is also in the entity's name. (3) Length Bias: The four options in one question should have roughly the same length to avoid length bias. In summary, the generated questions should have high-quality and no shortcuts, in semantics or length.
|
| 87 |
+
|
| 88 |
+
During the curation, we utilize GPT-4o-mini (OpenAI, 2024a) with few-shot expert-written Chain-of-thought (CoT) demonstrations (Wei et al., 2022), with details provided in Appendix C.
|
| 89 |
+
|
| 90 |
+
# 3.3 Expert Verification
|
| 91 |
+
|
| 92 |
+
We enlist the help of three postgraduate students, each with extensive experience in NLP research, to validate the quality of these generated questions through a sample of 200 question pairs. The instruction is the same as the standard (1) given to LLMs above. The quality of each pair is decided by majority voting. Results show that their total agreement (all 3 experts have the same judgement) is $88.0\%$ . And $95.5\%$ of the abstract questions are considered correct and of high quality both for the high-frequency entity and the low-frequency entity, demonstrating the reliability of our benchmark.
|
| 93 |
+
|
| 94 |
+
# 3.4 Main Evaluations
|
| 95 |
+
|
| 96 |
+
COMPARISONQA is a large-scale benchmark comprising a total of 283,455 abstract questions, each paired with a high-frequency and a low-frequency instantiation. Detailed statistics are in Appendix A.
|
| 97 |
+
|
| 98 |
+
We experiment with a selection of LLMs on our COMPARISONQA benchmark to investigate their performance on high-frequency and low-frequency questions and also the difference between them.
|
| 99 |
+
|
| 100 |
+
# 3.4.1 Experiment Setup
|
| 101 |
+
|
| 102 |
+
Metric: We calculate Uncertainty, Accuracy, and Macro F1-score between model predictions and ground truth labels. We apply perplexity-based uncertainty for open source LLMs and verbalized uncertainty for proprietary LLMs due to several reasons, with details explained in Appendix D. Thus, we only compare uncertainty between high and low frequency within each setting separately.
|
| 103 |
+
|
| 104 |
+
Models: We experiment with 16 different models, with a full list in Appendix E, and categorize the evaluation into three types: (1) Open Source LLM Zero-Shot (Qin et al., 2023). (2) Open Source LLM Few-Shot (Brown et al., 2020). (3) Proprietary LLM API.
|
| 105 |
+
|
| 106 |
+
# 3.4.2 Results and Analysis
|
| 107 |
+
|
| 108 |
+
Evaluation results are reported in Table 1. Our observations include: (1) Huge drop in performance from high-freq to low-freq: All models suffer a performance decrease from high-frequency questions to low-frequency questions in all three settings. For instance, the accuracy and Macro F1-score of Llama-3-8B drop up to about 14 points in the few-shot setting. Proprietary models like GPT-40 are no exception. These all prove that LLM's performance is closely related to the frequency of the knowledge in the corpus. (2) Increased Uncertainty from high-freq to low-freq: Similarly, the uncertainty of LLMs all increase from high-frequency questions to low-frequency questions. For example, the uncertainty difference of Gemma2-9B is up to about 86 points when using zero-shot. The uncertainty in the zero-shot setting is generally higher than in the few-shot setting, and the difference is also more pronounced. We think it may be because LLMs find some familiar examples in the few-shot setting, which decreases their uncertainty. In spite of this, the difference is still clear between high-freq and low-freq. These all prove that LLMs not only perform better but also are more confident about high-frequency knowledge. (3) Few-shot helps a lot only for LLMs without instruction-tuning: Most non-instruction-tuned LLMs show a huge improvement in performance from zero-shot to few-shot, but performance is similar for those instruction-tuned LLMs. This could
|
| 109 |
+
|
| 110 |
+
<table><tr><td rowspan="3">Models</td><td colspan="3">High Freq Question</td><td colspan="3">Low Freq Question</td><td colspan="3">Average</td><td colspan="3">Difference (H → T)</td></tr><tr><td>Unc.</td><td>Acc</td><td>Ma-F1</td><td>Unc.</td><td>Acc</td><td>Ma-F1</td><td>Unc.</td><td>Acc</td><td>Ma-F1</td><td>Unc.</td><td>Acc</td><td>Ma-F1</td></tr><tr><td>(↓)</td><td>(↑)</td><td>(↑)</td><td>(↓)</td><td>(↑)</td><td>(↑)</td><td>(↓)</td><td>(↑)</td><td>(↑)</td><td></td><td></td><td></td></tr><tr><td>Random</td><td>-</td><td>25.29</td><td>25.29</td><td>-</td><td>25.22</td><td>25.22</td><td>-</td><td>25.26</td><td>25.26</td><td>-</td><td>↓0.07</td><td>↓0.07</td></tr><tr><td>Majority</td><td>-</td><td>25.70</td><td>10.22</td><td>-</td><td>25.14</td><td>10.04</td><td>-</td><td>25.42</td><td>10.13</td><td>-</td><td>↓0.56</td><td>↓0.18</td></tr><tr><td colspan="13">LLM (Open Source) + Zero-Shot</td></tr><tr><td>Llama-3 8B</td><td>54.33</td><td>65.90</td><td>63.60</td><td>81.54</td><td>53.83</td><td>51.29</td><td>67.94</td><td>59.87</td><td>57.44</td><td>↑6.11</td><td>↓12.07</td><td>↓12.30</td></tr><tr><td>Llama-3-Instruct 8B</td><td>77.55</td><td>80.72</td><td>80.71</td><td>117.41</td><td>69.03</td><td>68.95</td><td>97.48</td><td>74.88</td><td>74.83</td><td>↑39.86</td><td>↓11.69</td><td>↓11.76</td></tr><tr><td>Llama-3.1 8B</td><td>55.91</td><td>65.29</td><td>63.31</td><td>83.35</td><td>52.66</td><td>50.52</td><td>69.63</td><td>58.98</td><td>56.92</td><td>↑27.44</td><td>↓12.63</td><td>↓12.78</td></tr><tr><td>Llama-3.1-Instruct 8B</td><td>58.97</td><td>80.06</td><td>80.08</td><td>87.05</td><td>69.99</td><td>69.94</td><td>73.01</td><td>75.03</td><td>75.01</td><td>↑28.08</td><td>↓10.07</td><td>↓10.14</td></tr><tr><td>Gemma-2 9B</td><td>124.97</td><td>64.50</td><td>64.80</td><td>211.34</td><td>52.24</td><td>51.23</td><td>168.16</td><td>58.37</td><td>58.01</td><td>↑86.37</td><td>↓12.26</td><td>↓13.57</td></tr><tr><td>Phi-3.5-mini-Instruct 4B</td><td>27.81</td><td>72.81</td><td>72.78</td><td>39.80</td><td>65.26</td><td>65.00</td><td>33.81</td><td>69.04</td><td>68.89</td><td>↑11.99</td><td>↓7.55</td><td>↓7.78</td></tr><tr><td>Falcon2 11B</td><td>56.93</td><td>70.72</td><td>69.80</td><td>87.31</td><td>58.07</td><td>56.70</td><td>72.12</td><td>64.40</td><td>63.25</td><td>↑30.38</td><td>↓12.65</td><td>↓13.10</td></tr><tr><td>Mistral-v0.3 7B</td><td>39.83</td><td>65.55</td><td>63.11</td><td>56.99</td><td>53.36</td><td>50.26</td><td>48.41</td><td>59.46</td><td>56.69</td><td>↑17.16</td><td>↓12.19</td><td>↓12.85</td></tr><tr><td>Mistral-v0.3-Instruct 7B</td><td>44.73</td><td>73.53</td><td>73.14</td><td>66.09</td><td>63.05</td><td>62.40</td><td>55.41</td><td>68.29</td><td>67.77</td><td>↑21.36</td><td>↓10.48</td><td>↓10.74</td></tr><tr><td colspan="13">LLM (Open Source) + Few-Shot</td></tr><tr><td>Llama-3 8B</td><td>21.89</td><td>75.57</td><td>75.55</td><td>23.75</td><td>61.00</td><td>61.01</td><td>22.82</td><td>68.29</td><td>68.28</td><td>↑1.86</td><td>↓14.57</td><td>↓14.55</td></tr><tr><td>Llama-3-Instruct 8B</td><td>26.20</td><td>79.94</td><td>79.92</td><td>28.70</td><td>67.98</td><td>67.95</td><td>27.45</td><td>73.96</td><td>73.93</td><td>↑2.50</td><td>↓11.96</td><td>↓11.96</td></tr><tr><td>Llama-3.1 8B</td><td>20.82</td><td>74.91</td><td>74.89</td><td>22.62</td><td>62.00</td><td>62.00</td><td>21.72</td><td>68.46</td><td>68.45</td><td>↑1.81</td><td>↓12.91</td><td>↓12.90</td></tr><tr><td>Llama-3.1-Instruct 8B</td><td>20.63</td><td>79.74</td><td>79.74</td><td>22.48</td><td>69.09</td><td>69.07</td><td>21.56</td><td>74.42</td><td>74.40</td><td>↑1.85</td><td>↓10.65</td><td>↓10.66</td></tr><tr><td>Gemma-2 9B</td><td>20.26</td><td>80.10</td><td>80.08</td><td>22.36</td><td>68.36</td><td>68.31</td><td>21.31</td><td>74.23</td><td>74.20</td><td>↑2.10</td><td>↓11.74</td><td>↓11.77</td></tr><tr><td>Phi-3.5-mini-Instruct 4B</td><td>11.02</td><td>73.68</td><td>73.67</td><td>11.85</td><td>67.46</td><td>67.33</td><td>11.44</td><td>70.57</td><td>70.50</td><td>↑0.83</td><td>↓6.22</td><td>↓6.34</td></tr><tr><td>Falcon2 11B</td><td>16.42</td><td>77.11</td><td>77.01</td><td>17.77</td><td>65.92</td><td>65.75</td><td>17.10</td><td>71.52</td><td>71.38</td><td>↑1.35</td><td>↓11.19</td><td>↓11.26</td></tr><tr><td>Mistral-v0.3 7B</td><td>13.89</td><td>75.55</td><td>75.53</td><td>14.99</td><td>62.88</td><td>62.85</td><td>14.44</td><td>69.22</td><td>69.19</td><td>↑1.10</td><td>↓12.67</td><td>↓12.68</td></tr><tr><td>Mistral-v0.3-Instruct 7B</td><td>15.97</td><td>74.46</td><td>74.40</td><td>17.40</td><td>65.51</td><td>65.35</td><td>16.69</td><td>69.99</td><td>69.87</td><td>↑1.43</td><td>↓8.95</td><td>↓9.05</td></tr><tr><td colspan="13">LLM (Proprietary) API</td></tr><tr><td>GPT4o-mini (Zero-Shot)</td><td>13.52</td><td>85.61</td><td>85.58</td><td>18.34</td><td>73.85</td><td>73.73</td><td>15.93</td><td>79.73</td><td>79.66</td><td>↑4.82</td><td>↓11.76</td><td>↓11.85</td></tr><tr><td>GPT4o-mini (Few-Shot)</td><td>25.74</td><td>84.78</td><td>84.69</td><td>38.17</td><td>72.76</td><td>72.47</td><td>31.96</td><td>78.77</td><td>78.58</td><td>↑12.43</td><td>↓12.02</td><td>↓12.22</td></tr><tr><td>GPT4o-mini (CoT)</td><td>10.53</td><td>86.25</td><td>86.25</td><td>12.27</td><td>74.39</td><td>74.40</td><td>11.40</td><td>80.32</td><td>80.32</td><td>↑1.74</td><td>↓11.85</td><td>↓11.85</td></tr><tr><td>GPT4o (Zero-Shot)</td><td>14.18</td><td>93.86</td><td>93.95</td><td>30.98</td><td>86.54</td><td>86.75</td><td>22.58</td><td>89.81</td><td>90.32</td><td>↑16.80</td><td>↓8.10</td><td>↓7.26</td></tr><tr><td>GPT4o (Few-Shot)</td><td>28.41</td><td>93.94</td><td>93.95</td><td>45.81</td><td>86.54</td><td>86.75</td><td>37.11</td><td>90.24</td><td>90.35</td><td>↑17.40</td><td>↓7.40</td><td>↓7.20</td></tr><tr><td>GPT4o (CoT)</td><td>10.39</td><td>92.40</td><td>92.47</td><td>18.36</td><td>85.47</td><td>85.72</td><td>14.38</td><td>88.93</td><td>89.10</td><td>↑7.97</td><td>↓6.93</td><td>↓6.75</td></tr></table>
|
| 111 |
+
|
| 112 |
+
Table 1: Performance of various LLMs on the testing set of COMPARISONQA. Unc., Acc, and Ma-F1 denote Uncertainty, Accuracy, and Macro F1-score. The Difference column shows how scores change from high-frequency questions to low-frequency questions. The best performances within each method are underlined, and the best among all methods are bold-faced. And for the Difference column, We underline the largest difference within each method and bold the one among all methods. More results can be seen in Table 10.
|
| 113 |
+
|
| 114 |
+
be because the few-shot examples only teach LLMs how to do multiple-choice questions, while those instruction-tuned ones have already learned. (4) CoT lowers uncertainty but does not awlays aid performance: It's obvious that after the CoT inference, LLMs are more sure about their answers. However, results show that the average accuracy of GPT-4o even drops after adding CoT, which means CoT can not always help such factual questions.
|
| 115 |
+
|
| 116 |
+
# 4 Robust Knowledge Measurement
|
| 117 |
+
|
| 118 |
+
With the help of COMPARISONQA, we can conduct a more detailed and controllable study of the factual knowledge of LLMs.
|
| 119 |
+
|
| 120 |
+
When considering how humans tackle multiple-choice questions, it's often the case that we do not really know the correct answers. Instead, we rely on semantic shortcuts within the questions to make educated guesses. Although we intentionally exclude these shortcuts when constructing the benchmark, they are difficult to eliminate entirely from
|
| 121 |
+
|
| 122 |
+
multiple-choice questions. Such a situation often occurs even in human exam questions. Therefore, we need to devise an effective method to evaluate the robustness of factual knowledge of LLMs in the form of multiple-choice questions.
|
| 123 |
+
|
| 124 |
+
# 4.1 The Definition of Robust Knowledge
|
| 125 |
+
|
| 126 |
+
We categorize LLM's results into four scenarios based on its uncertainty and the correctness of its answers. The uncertainty pertains to the statement based on pure Question+Answer (without options), which isolates the correct knowledge without the influence of the three distractors. Details are in Appendix D. Meanwhile, the correctness refers to the original multiple-choice question.
|
| 127 |
+
|
| 128 |
+
Low Uncertainty & Correct Answer: LLM shows confidence about the correct knowledge and also answers the question correctly. In this case, we consider the LLM to possess robust knowledge.
|
| 129 |
+
|
| 130 |
+
High Uncertainty & Incorrect Answer: LLM expresses uncertainty and answers incorrectly. So, we conclude that the LLM lacks the knowledge.
|
| 131 |
+
|
| 132 |
+
<table><tr><td rowspan="2">Models</td><td colspan="4">First Round</td><td colspan="4">Second Round</td></tr><tr><td>High</td><td>Low</td><td>Avg.</td><td>Diff</td><td>High</td><td>Low</td><td>Avg.</td><td>Diff</td></tr><tr><td colspan="9">Open Source LLM</td></tr><tr><td>Llama-3 8B</td><td>75.57</td><td>61.00</td><td>68.29</td><td>↓14.57</td><td>65.11 (-10.47)</td><td>43.65 (-17.35)</td><td>54.38 (-13.91)</td><td>↓21.45 (+6.89)</td></tr><tr><td>Llama-3-Instruct 8B</td><td>79.94</td><td>67.98</td><td>73.96</td><td>↓11.96</td><td>68.13 (-11.82)</td><td>48.73 (-19.26)</td><td>58.43 (-15.54)</td><td>↓19.40 (+7.44)</td></tr><tr><td>Llama-3.1 8B</td><td>74.91</td><td>62.00</td><td>68.46</td><td>↓12.91</td><td>65.66 (-9.25)</td><td>45.21 (-16.78)</td><td>55.44 (-13.02)</td><td>↓20.45 (+7.53)</td></tr><tr><td>Llama-3.1-Instruct 8B</td><td>79.74</td><td>69.09</td><td>74.42</td><td>↓10.65</td><td>72.23 (-7.51)</td><td>55.04 (-14.06)</td><td>63.64 (-10.78)</td><td>↓17.20 (+6.55)</td></tr><tr><td>Llama-3.2 3B</td><td>68.89</td><td>57.26</td><td>63.08</td><td>↓11.63</td><td>58.89 (-10.00)</td><td>41.11 (-16.15)</td><td>50.00 (-13.07)</td><td>↓17.78 (+6.15)</td></tr><tr><td>Llama-3.2-Instruct 3B</td><td>71.43</td><td>62.12</td><td>66.78</td><td>↓9.32</td><td>64.07 (-7.37)</td><td>46.68 (-15.44)</td><td>55.37 (-11.40)</td><td>↓17.39 (+8.07)</td></tr><tr><td>Gemma-2 2B</td><td>62.99</td><td>50.93</td><td>56.96</td><td>↓12.06</td><td>52.54 (-10.44)</td><td>35.40 (-15.53)</td><td>43.97 (-12.99)</td><td>↓17.14 (+5.09)</td></tr><tr><td>Gemma-2 9B</td><td>80.10</td><td>68.36</td><td>74.23</td><td>↓11.74</td><td>71.39 (-8.71)</td><td>50.48 (-17.88)</td><td>60.94 (-13.30)</td><td>↓20.92 (+9.18)</td></tr><tr><td>Phi-3.5-mini 4B</td><td>73.68</td><td>67.46</td><td>70.57</td><td>↓6.22</td><td>66.82 (-6.86)</td><td>53.51 (-13.95)</td><td>60.16 (-10.41)</td><td>↓13.31 (+7.08)</td></tr><tr><td>Falcon2 11B</td><td>77.11</td><td>65.92</td><td>71.52</td><td>↓11.19</td><td>65.17 (-11.94)</td><td>46.88 (-19.04)</td><td>56.02 (-15.49)</td><td>↓18.29 (+7.10)</td></tr><tr><td>Mistral-v0.3 7B</td><td>75.55</td><td>62.88</td><td>69.22</td><td>↓12.67</td><td>67.86 (7.69)</td><td>49.05 (-13.83)</td><td>58.46 (-10.76)</td><td>↓18.82 (+6.15)</td></tr><tr><td>Mistral-v0.3-Instruct 7B</td><td>74.46</td><td>65.51</td><td>69.99</td><td>↓8.95</td><td>67.29 (-7.17)</td><td>51.69 (-13.82)</td><td>59.49 (-10.50)</td><td>↓15.60 (+6.65)</td></tr><tr><td colspan="9">Proprietary LLM</td></tr><tr><td>GPT4o-mini</td><td>84.78</td><td>72.76</td><td>78.77</td><td>↓12.02</td><td>71.00 (-13.78)</td><td>38.25 (-34.51)</td><td>54.63 (-24.14)</td><td>↓32.75 (+20.73)</td></tr><tr><td>GPT4o</td><td>93.94</td><td>86.54</td><td>90.24</td><td>↓7.40</td><td>79.85 (-14.09)</td><td>55.94 (-30.6)</td><td>67.90 (-22.34)</td><td>↓23.91 (+16.51)</td></tr></table>
|
| 133 |
+
|
| 134 |
+
Table 2: Accuracy scores in LLMs' robust knowledge measurement. We also report the changes in the scores from the first round to the second round. The best performances within each method are underlined, and the best among all methods are bold-faced. And for the Difference column and values in parentheses, We underline the largest difference within each method and bold the one among all methods.
|
| 135 |
+
|
| 136 |
+
High Uncertainty & Correct Answer: LLM is unsure but answers correctly. This indicates that it may retain the correct knowledge, but the memory is vague, or that the semantic shortcuts in the question lead to the correct answer.
|
| 137 |
+
|
| 138 |
+
Low Uncertainty & Incorrect Answer: LLM is confident yet answers incorrectly. This could result from the LLM recalling incorrect knowledge or from misleading distractors in questions.
|
| 139 |
+
|
| 140 |
+
In the first two categories, we can determine whether the LLM truly possesses the knowledge. However, in the latter two cases, multiple factors influence the final results, and the LLM's grasp of knowledge is not robust.
|
| 141 |
+
|
| 142 |
+
This classification method leverages the strengths of both multiple-choice and generative questions, since we collect the uncertainty score without the distractors. While multiple-choice questions are easy to evaluate, they may allow for shortcuts; generative questions, on the other hand, are the opposite. Our method capitalizes on the uncertainty inherent in generative questions, which do not have shortcuts, and the accuracy of easily parsed answers provided by multiple-choice questions. This approach ensures that evaluation remains straightforward while fully addressing the potential for shortcuts.
|
| 143 |
+
|
| 144 |
+
# 4.2 The Two-Round Measurement
|
| 145 |
+
|
| 146 |
+
We introduce our two-round measurement, which can be applied to any multiple-choice benchmarks, based on the four categories. In the first round,
|
| 147 |
+
|
| 148 |
+
we present multiple-choice questions to evaluate LLM's performance. Then, results are classified into four categories. For questions falling into the latter two cases (high-uncertainty correct & low-uncertainty incorrect), we will conduct a second round questioning. Scores will be modified if the correctness of any questions changes in this round.
|
| 149 |
+
|
| 150 |
+
For questions requiring reassessment in the second round, we ask LLMs to judge whether the four statements, with details in Appendix D, are true or false. The LLM is considered to truly possess the knowledge only when all four statements are accurately judged. On one hand, the second round provides an opportunity for LLMs to correct the answer by breaking distractors into separate questions, and on the other hand, it identifies questions where the LLMs simply guess the correct answers.
|
| 151 |
+
|
| 152 |
+
Compared to breaking down the multiple-choice questions into four correctness judgments directly from the start, our two-round approach offers a comprehensive analysis of how LLMs' performance changes from the first to the second stage. It leverages both uncertainty and correctness, providing deeper insights into LLMs' confidence and robustness regarding the factual knowledge they retain. Additionally, this method enables us to determine whether a particular result is due to LLM's lack of knowledge or the shortcuts and misleading distractors in the multiple-choice questions.
|
| 153 |
+
|
| 154 |
+
Although the second round of evaluation is stricter, our COMPARISONQA benchmark ensures fair classification and comparison between high
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 3: Heatmaps illustrating how subset quality changes with incorrect model number and high uncertainty remaining ratio. The former refers to the minimum number of times that each remaining question in the subset is answered incorrectly. The latter refers to the proportion of high-uncertainty questions that are retained in the subset.
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
|
| 161 |
+
frequency and low-frequency questions under the same setting. Because we have a shared abstract question for each pair of entities, controlling other factors which may affect LLM's uncertainty and accuracy. Thus, we can rule out all the other factors to purely compare the difference between high-frequency and low-frequency knowledge.
|
| 162 |
+
|
| 163 |
+
# 4.3 Experiments and Analysis
|
| 164 |
+
|
| 165 |
+
Here, we conduct the experiments using this method to measure LLMs' knowledge robustness in a few-shot manner. Results are shown in Table 2
|
| 166 |
+
|
| 167 |
+
There are very interesting observations from the results: (1) GPT-4o and GPT-4o-mini can not stand the test of robust knowledge measurement especially on low-frequency knowledge: Their performance is still very good on high-frequency questions after the second round but drops a lot on low-frequency ones. The accuracy of GPT-4o-mini on low-frequency questions after the second round is only 38.25, about 35 points lower than the first round. Their average performance even drop the most among all the evaluated models. (2) The LLMs' grasp of low-frequency knowledge is less robust than that of high-frequency knowledge: Performance of LLMs in the second round all drop much more on low-frequency questions than on high-frequency questions. For example, in all of the open source LLMs, the accuracy of Llama-3.1-8B-Instruct in the second round, whose average performance is the best in the first round, dropped up to about 25 points on low-frequency questions while only about 7 points on high-frequency questions. (3) LLMs which can stand the test of robust knowledge measurement must have a very accurate grasp of low-frequency knowledge: LLMs whose average accuracy in the second round is higher than 55 are all those who performed relatively better on the low-frequency questions. This illustrates the importance of the LLMs mas
|
| 168 |
+
|
| 169 |
+
tering low-frequency knowledge if they want to be reliable models in the aspect of factual knowledge.
|
| 170 |
+
|
| 171 |
+
# 5 COMPARISONQA-Hard
|
| 172 |
+
|
| 173 |
+
Directly collected questions, especially the high-frequency part, are a bit simple for today's LLMs. More importantly, they may have low quality and semantic shortcuts. So we introduce a new method to select a subset called COMPARISONQA-Hard, containing only difficult, low-frequency questions that have high quality and no semantic shortcuts.
|
| 174 |
+
|
| 175 |
+
# 5.1 Hard High-Quality Question Filtering
|
| 176 |
+
|
| 177 |
+
The filtering method utilizes both correctness and uncertainty, similar to the last section. Previous benchmarks, like SimpleQA (Wei et al., 2024a) and MMLU-Pro (Wang et al., 2024a), were collected adversarially based on LLMs' responses to ensure question difficulty. We enhance this method by also considering LLMs' uncertainty to achieve the selection of high-quality, shortcut-free questions.
|
| 178 |
+
|
| 179 |
+
As illustrated in the third part of Figure 2, we collect the correctness and uncertainty from six open-source LLMs, listed in Appendix E, for questions with low-frequency entities. Different from above, both metrics here are about the entire multiple-choice questions, considering all the four options' quality. We choose the questions that many models answer incorrectly and exhibit high uncertainty for our hard subset. We define two hyperparameters: incorrect model number and high uncertainty remaining ratio. The former is the minimum number of times that each remaining question is answered incorrectly. The latter is the proportion of high-uncertainty questions (sort by the sum of the uncertainty of all models) retained in the subset.
|
| 180 |
+
|
| 181 |
+
The method is designed based on this assumption: Low-quality questions and those with semantic shortcuts are often associated with correct an
|
| 182 |
+
|
| 183 |
+
<table><tr><td>Method</td><td>Backbone</td><td>Unc.</td><td>Acc</td><td>Ma-F1</td></tr><tr><td rowspan="12">Open Source LLM</td><td>Llama-3 8B</td><td>25.04</td><td>27.95</td><td>27.74</td></tr><tr><td>Llama-3-Instruct 8B</td><td>30.57</td><td>22.38</td><td>22.32</td></tr><tr><td>Llama-3.1 8B</td><td>23.87</td><td>28.76</td><td>28.40</td></tr><tr><td>Llama-3.1-Instruct 8B</td><td>23.77</td><td>27.06</td><td>26.59</td></tr><tr><td>Llama-3.2 3B</td><td>26.97</td><td>27.10</td><td>27.05</td></tr><tr><td>Llama-3.2-Instruct 3B</td><td>27.04</td><td>28.68</td><td>28.65</td></tr><tr><td>Gemma-2 2B</td><td>31.07</td><td>22.80</td><td>22.35</td></tr><tr><td>Gemma-2 9B</td><td>23.67</td><td>24.71</td><td>24.64</td></tr><tr><td>Phi-3.5-mini 4B</td><td>12.42</td><td>31.87</td><td>31.19</td></tr><tr><td>Falcon2 11B</td><td>18.65</td><td>23.70</td><td>23.64</td></tr><tr><td>Mistral-v0.3 7B</td><td>15.69</td><td>23.96</td><td>23.74</td></tr><tr><td>Mistral-v0.3-Instruct 7B</td><td>18.36</td><td>23.65</td><td>23.25</td></tr><tr><td rowspan="2">Proprietary LLM</td><td>GPT4o-mini</td><td>46.49</td><td>38.13</td><td>37.82</td></tr><tr><td>GPT4o</td><td>54.66</td><td>69.98</td><td>70.02</td></tr></table>
|
| 184 |
+
|
| 185 |
+
Table 3: Performance of various LLMs on the testing set of COMPARISONQA-Hard. Unc., Acc, and Ma-F1, denote Uncertainty, Accuracy, and Macro F1-score. The best performances within each method are underlined and the best among all methods are bold-faced.
|
| 186 |
+
|
| 187 |
+
swers and low uncertainty across different models, as our benchmark is constructed by LLMs-generated questions. The rationale behind this is as follows: (1) For low-quality questions, if the question or answer is incorrect, it is likely that the LLM did not generate it from the descriptions but rather from its internal knowledge. Consequently, models may display high confidence and yield correct answers. (2) For questions containing shortcuts, models may cheat through shortcuts, resulting in lower uncertainty and higher accuracy. These will all be proved in the following experiments.
|
| 188 |
+
|
| 189 |
+
# 5.2 Parameters Chosen by Expert Verification
|
| 190 |
+
|
| 191 |
+
To validate our filtering method, we invite experts to annotate the shortcuts in the 200 randomly sampled questions in the same setting mentioned in §3.3. The instruction is the same as the standard (2) given to LLMs above. Results show that $9.4\%$ of the $95.5\%$ correct and high quality questions are identified as having semantic shortcuts.
|
| 192 |
+
|
| 193 |
+
Then, we examine how the following metrics change with different settings regarding correctness and uncertainty, which are illustrated in Figure 3: (1) Remaining Low-Quality Ratio (the proportion of remaining low-quality problems relative to the original number of low-quality problems), (2) Remaining Shortcut Ratio (the proportion of remaining problems with shortcuts relative to the original number of problems with shortcuts), (3) GPT-4o Accuracy (the accuracy of GPT-4o on the remaining questions), and (4) Remaining Question Count (the size of the remaining questions). The results suggest that both uncertainty and correctness contribute to the selection of high-quality,
|
| 194 |
+
|
| 195 |
+
shortcut-free questions, thereby demonstrating the effectiveness of our method. While it is expected that different models' correctness would aid in identifying more challenging questions, it is noteworthy that uncertainty proved to be more effective in selecting high-quality and shortcut-free questions while maintaining the dataset size, validating the inclusion of uncertainty in our filtering method.
|
| 196 |
+
|
| 197 |
+
Finally, we choose to set incorrect model number to 3 and high uncertainty remaining ratio to 0.8 according to Figure 3. It is a trade-off between quality, difficulty, and subset size. In this setting, only $1.5\%$ of the total questions are of low quality, and $2.1\%$ with shortcuts. Finally, the subset size is 81K, with a GPT-4o accuracy of $70\%$ . Detailed statistics are shown in Appendix A.
|
| 198 |
+
|
| 199 |
+
# 5.3 Experiments and Analysis
|
| 200 |
+
|
| 201 |
+
Then we conduct experiments on COMPAR-ISONQA-Hard in a few-shot manner, with results shown in Table 3. In the multiple-choice question format, the open-source LLMs all significantly underperform, indicating the difficulty of our benchmark. For the proprietary LLMs, GPT-4o-mini also has a poor performance with an accuracy of about 38, even though we do not use it when constructing the subset. GPT-4o is better with an accuracy of about 70, but still has a huge room for future enhancement. And, predictably, its knowledge robustness will drop much more on this benchmark according to our experiments in §4.3.
|
| 202 |
+
|
| 203 |
+
# 6 Conclusions
|
| 204 |
+
|
| 205 |
+
In this paper, we first introduce COMPARISONQA benchmark to evaluate LLMs' factual knowledge, with a fully automatic pipeline. This benchmark allows for more controllable and detailed comparisons between high-frequency and low-frequency knowledge of LLMs. Then, we propose a two-round method utilizing correctness and uncertainty to measure LLMs' knowledge robustness. And we are surprised to find that even powerful LLMs like GPT-4o can not stand such a test, especially on the low-frequency knowledge. At last, we discover that uncertainty is more effective in filtering out questions with low quality and shortcuts compared with correctness, which is often used by recent works. Based on this method, we provide a subset called COMPARISONQA-Hard, which contains only difficult low-frequency questions of high quality and no shortcuts for future study.
|
| 206 |
+
|
| 207 |
+
# Limitations
|
| 208 |
+
|
| 209 |
+
While we contribute valuable resources, methods, and findings to advance the probing of LLMs' factual knowledge, several limitations still exist that cannot be covered in this single work.
|
| 210 |
+
|
| 211 |
+
In this paper, we provide a shared abstract question with the entities being the only varying part. However, due to the sharing of such abstract questions, it is difficult to contain more entities with different frequencies in the same question because many entities lack sufficient shared features to generate common questions.
|
| 212 |
+
|
| 213 |
+
Our approach ensures that the difference between a pair is only the entity. Future research could investigate methods for measuring the entire knowledge frequency required to solve the questions, rather than limiting it to entity frequency. We believe it is a challenging but valuable task.
|
| 214 |
+
|
| 215 |
+
Additionally, our focus is on fixed knowledge, but fast-changing factual knowledge (Do et al., 2024b) and other knowledge (Do et al., 2024a; Wang et al., 2022, 2023) also deserves attention. Specifically, exploring how knowledge frequency can assist LLMs in acquiring new information (Choi et al., 2023; Zong et al., 2023) is a worthwhile area for further study.
|
| 216 |
+
|
| 217 |
+
# Ethics Statement
|
| 218 |
+
|
| 219 |
+
Offensive Content Elimination. Our benchmark curation pipeline, which involves generating content using LLMs, requires stringent measures to ensure that generated responses are free from offensive material. We manually review a random sample of 200 data instances from COMPARISONQA for any offensive content. Based on our annotations, we have not detected any offensive content. Therefore, we believe our dataset is safe and will not yield any negative societal impact.
|
| 220 |
+
|
| 221 |
+
Licenses. We will share our code under the MIT license, allowing other researchers free access to our resources for research purposes. Our dataset will be released under a CC license, also providing scholars with free access. We take full responsibility for any rights violations or issues related to the data license. The DBpedia dataset used in this paper is shared under the CC BY-SA license, permitting its use for research. As for language models, we access all open-source LMs via the Huggingface Hub (Wolf et al., 2020). All associated licenses permit user access for research purposes, and we have agreed to adhere to all terms of use.
|
| 222 |
+
|
| 223 |
+
Annotations. For expert verifications, we have obtained IRB approval and support from our institution's department, enabling us to invite expert graduate students to validate the quality of our data. They all agree to participate voluntarily without being compensated. We have made significant efforts to eliminate offensive content, thereby ensuring that no annotators are offended.
|
| 224 |
+
|
| 225 |
+
# Acknowledgments
|
| 226 |
+
|
| 227 |
+
The authors of this paper were supported by the ITSP Platform Research Project (ITS/189/23FP) from ITC of Hong Kong, SAR, China, and the AoE (AoE/E-601/24-N), the RIF (R6021-20) and the GRF (16205322) from RGC of Hong Kong,SAR, China.
|
| 228 |
+
|
| 229 |
+
# References
|
| 230 |
+
|
| 231 |
+
Marah I Abdin, Sam Ade Jacobs, Ammar Ahmad Awan, Jyoti Aneja, Ahmed Awadallah, Hany Awadalla, Nguyen Bach, Amit Bahree, Arash Bakhtiari, Harkirat S. Behl, Alon Benhaim, Misha Bilenko, Johan Bjorck, Sebastien Bubeck, Martin Cai, Caio Cesar Teodoro Mendes, Weizhu Chen, Vishrav Chaudhary, Parul Chopra, Allie Del Giorno, Gustavo de Rosa, Matthew Dixon, Ronen Eldan, Dan Iter, Amit Garg, Abhishek Goswami, Suriya Gunasekar, Emman Haider, Junheng Hao, Russell J. Hewett, Jamie Huynh, Mojan Javaheripi, Xin Jin, Piero Kauffmann, Nikos Karampatziakis, Dongwoo Kim, Mahoud Khademi, Lev Kurilenko, James R. Lee, Yin Tat Lee, Yuanzhi Li, Chen Liang, Weishung Liu, Eric Lin, Zeqi Lin, Piyush Madan, Arindam Mitra, Hardik Modi, Anh Nguyen, Brandon Norick, Barun Patra, Daniel Perez-Becker, Thomas Portet, Reid Pryzant, Heyang Qin, Marko Radmilac, Corby Rosset, Sambudha Roy, Olatunj Ruwase, Olli Saarikivi, Amin Saied, Adil Salim, Michael Santacroce, Shital Shah, Ning Shang, Hiteshi Sharma, Xia Song, Masahiro Tanaka, Xin Wang, Rachel Ward, Guanhua Wang, Philipp Witte, Michael Wyatt, Can Xu, Jiahang Xu, Sonali Yadav, Fan Yang, Ziyi Yang, Donghan Yu, Chengruidong Zhang, Cyril Zhang, Jianwen Zhang, Li Lyna Zhang, Yi Zhang, Yue Zhang, Yunan Zhang and Xiren Zhou. 2024. Phi-3 technical report: A highly capable language model locally on your phone. CoRR, abs/2404.14219.
|
| 232 |
+
|
| 233 |
+
Zeyuan Allen-Zhu and Yuanzhi Li. 2023. Physics of language models: Part 3.2, knowledge manipulation. CoRR, abs/2309.14402.
|
| 234 |
+
|
| 235 |
+
Soren Auer, Christian Bizer, Georgi Kobilarov, Jens Lehmann, Richard Cyganiak, and Zachary G. Ives. 2007. Dbpedia: A nucleus for a web of open data. In The Semantic Web, 6th International Semantic Web Conference, 2nd Asian Semantic Web Conference,
|
| 236 |
+
|
| 237 |
+
ISWC 2007 + ASWC 2007, Busan, Korea, November 11-15, 2007, volume 4825 of Lecture Notes in Computer Science, pages 722-735. Springer.
|
| 238 |
+
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.
|
| 239 |
+
Lihu Chen, Simon Razniewski, and Gerhard Weikum. 2023. Knowledge base completion for long-tail entities. CoRR, abs/2306.17472.
|
| 240 |
+
I-Chun Chern, Steffi Chern, Shiqi Chen, Weizhe Yuan, Kehua Feng, Chunting Zhou, Junxian He, Graham Neubig, and Pengfei Liu. 2023. Factool: Factuality detection in generative AI - A tool augmented framework for multi-task and multi-domain scenarios. CoRR, abs/2307.13528.
|
| 241 |
+
Sehyun Choi, Tianqing Fang, Zhaowei Wang, and Yangqiu Song. 2023. KCTS: knowledge-constrained tree search decoding with token-level hallucination detection. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 14035-14053. Association for Computational Linguistics.
|
| 242 |
+
Quyet V. Do, Tianqing Fang, Shizhe Diao, Zhaowei Wang, and Yangqiu Song. 2024a. Constraintchecker: A plugin for large language models to reason on commonsense knowledge bases. In Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2024 - Volume 1: Long Papers, St. Julian's, Malta, March 17-22, 2024, pages 714-731. Association for Computational Linguistics.
|
| 243 |
+
Quyet V Do, Junze Li, Tung-Duong Vuong, Zhaowei Wang, Yangqiu Song, and Xiaojuan Ma. 2024b. What really is commonsense knowledge? arXiv preprint arXiv:2411.03964.
|
| 244 |
+
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang, Archi Mitra, Archie Sravankumar, Artem Korenev, Arthur Hinsvark, Arun Rao, Aston Zhang, Aurélien Rodriguez, Austen Gregerson, Ava Spataru, Baptiste Rozière, Bethany Biron, Binh Tang, Bobbie Chern, Charlotte Caucheteux, Chaya Nayak, Chloe Bi, Chris Marra, Chris McConnell, Christian Keller,
|
| 245 |
+
|
| 246 |
+
Christophe Touret, Chunyang Wu, Corinne Wong, Cristian Canton Ferrer, Cyrus Nikolaidis, Damien Allonsius, Daniel Song, Danielle Pintz, Danny Livshits, David Esiobu, Dhruv Choudhary, Dhruv Mahajan, Diego Garcia-Olano, Diego Perino, Dieuwke Hupkes, Egor Lakomkin, Ehab AlBadawy, Elina Lobanova, Emily Dinan, Eric Michael Smith, Filip Radenovic, Frank Zhang, Gabriel Synnaeve, Gabrielle Lee, Georgia Lewis Anderson, Graeme Nail, Gregoire Mialon, Guan Pang, Guillem Cucurell, Hailey Nguyen, Hannah Korevaar, Hu Xu, Hugo Touvron, Iliyan Zarov, Imanol Arrieta Ibarra, Isabel M. Kloumann, Ishan Misra, Ivan Evtimov, Jade Copet, Jaewon Lee, Jan Geffert, Jana Vranes, Jason Park, Jay Mahadeokar, Jeet Shah, Jelmer van der Linde, Jennifer Billock, Jenny Hong, Jenya Lee, Jeremy Fu, Jianfeng Chi, Jianyu Huang, Jiawen Liu, Jie Wang, Jiecao Yu, Joanna Bitton, Joe Spisak, Jongsoo Park, Joseph Rocca, Joshua Johnstun, Joshua Saxe, Junteng Jia, Kalyan Vasuden Alwala, Kartikeya Upasani, Kate Plawiak, Ke Li, Kenneth Heafield, and Kevin Stone. 2024. The llama 3 herd of models. CoRR, abs/2407.21783.
|
| 247 |
+
Robert Geirhos, Jorn-Henrik Jacobsen, Claudio Michaelis, Richard S. Zemel, Wieland Brendel, Matthias Bethge, and Felix A. Wichmann. 2020. Shortcut learning in deep neural networks. Nat. Mach. Intell., 2(11):665-673.
|
| 248 |
+
Mor Geva, Daniel Khashabi, Elad Segal, Tushar Khot, Dan Roth, and Jonathan Berant. 2021. Did aristotle use a laptop? A question answering benchmark with implicit reasoning strategies. Trans. Assoc. Comput. Linguistics, 9:346-361.
|
| 249 |
+
Kaiqiao Han, Tianqing Fang, Zhaowei Wang, Yangqiu Song, and Mark Steedman. 2024. Concept-reversed winograd schema challenge: Evaluating and improving robust reasoning in large language models via abstraction. CoRR, abs/2410.12040.
|
| 250 |
+
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021. Measuring massive multitask language understanding. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net.
|
| 251 |
+
Ruixin Hong, Hongming Zhang, Xiaoman Pan, Dong Yu, and Changshui Zhang. 2024. Abstraction-of thought makes language models better reasoners. In *Findings of the Association for Computational Linguistics: EMNLP* 2024, Miami, Florida, USA, November 12-16, 2024, pages 1993-2027. Association for Computational Linguistics.
|
| 252 |
+
Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de Las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2023. Mistral 7b. CoRR, abs/2310.06825.
|
| 253 |
+
|
| 254 |
+
Nikhil Kandpal, Haikang Deng, Adam Roberts, Eric Wallace, and Colin Raffel. 2023. Large language models struggle to learn long-tail knowledge. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 15696-15707. PMLR.
|
| 255 |
+
Rohan Kumar, Youngmin Kim, Sunitha Ravi, Haitian Sun, Christos Faloutsos, Ruslan Salakhutdinov, and Minji Yoon. 2024. Automatic question-answer generation for long-tail knowledge. CoRR, abs/2403.01382.
|
| 256 |
+
Junyi Li, Xiaoxue Cheng, Xin Zhao, Jian-Yun Nie, and Ji-Rong Wen. 2023. Halueval: A large-scale hallucination evaluation benchmark for large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 6449-6464. Association for Computational Linguistics.
|
| 257 |
+
Jiacheng Liu, Wenya Wang, Dianzhuo Wang, Noah A. Smith, Yejin Choi, and Hannaneh Hajishirzi. 2023. Vera: A general-purpose plausibility estimation model for commonsense statements. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 1264-1287. Association for Computational Linguistics.
|
| 258 |
+
Quentin Malartic, Nilabhra Roy Chowdhury, Ruxandra Cojocaru, Mugariya Farooq, Giulia Campesan, Yasser Abdelaziz Dahou Djilali, Sanath Narayan, Ankit Singh, Maksim Velikanov, Basma El Amel Boussaha, Mohammed Al-Yafeai, Hamza Alobeidli, Leen Al Qadi, Mohamed El Amine Seddik, Kirill Fedyanin, Reda Alami, and Hakim Hacid. 2024. Falcon2-11b technical report. CoRR, abs/2407.14885.
|
| 259 |
+
Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. 2023. When not to trust language models: Investigating effectiveness of parametric and non-parametric memories. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 9802-9822. Association for Computational Linguistics.
|
| 260 |
+
Thomas Mesnard, Cassidy Hardin, Robert Dadashi, Surya Bhupatiraju, Shreya Pathak, Laurent Sifre, Morgane Riviere, Mihir Sanjay Kale, Juliette Love, Pouya Tafti, Léonard Hussenot, Aakanksha Chowdhery, Adam Roberts, Aditya Barua, Alex Botev, Alex Castro-Ros, Ambrose Slone, Amélie Héliou, Andrea Tacchetti, Anna Bulanova, Antonia Paterson, Beth Tsai, Bobak Shahriari, Charline Le Lan, Christopher A. Choquette-Choo, Clément Crepy, Daniel Cer, Daphne Ippolito, David Reid, Elena Buchatskaya, Eric Ni, Eric Noland, Geng Yan, George Tucker, George-Cristian Muraru, Grigory Rozhdestvenskiy, Henryk Michalewski, Ian Tenney, Ivan Grishchenko,
|
| 261 |
+
|
| 262 |
+
Jacob Austin, James Keeling, Jane Labanowski, Jean-Baptiste Lespiau, Jeff Stanway, Jenny Brennan, Jeremy Chen, Johan Ferret, Justin Chiu, and et al. 2024. Gemma: Open models based on gemini research and technology. CoRR, abs/2403.08295.
|
| 263 |
+
Sewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis, Wen-tau Yih, Pang Wei Koh, Mohit Iyyer, Luke Zettlemoyer, and Hannaneh Hajishirzi. 2023. Factscore: Fine-grained atomic evaluation of factual precision in long form text generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 12076-12100. Association for Computational Linguistics.
|
| 264 |
+
OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774.
|
| 265 |
+
OpenAI. 2024a. Gpt-4o mini: advancing cost-efficient intelligence. OpenAI.
|
| 266 |
+
OpenAI. 2024b. Hello gpt-4o. OpenAI.
|
| 267 |
+
Chengwei Qin, Aston Zhang, Zhuosheng Zhang, Jiao Chen, Michihiro Yasunaga, and Diyi Yang. 2023. Is chatgpt a general-purpose natural language processing task solver? In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, pages 1339-1384. Association for Computational Linguistics.
|
| 268 |
+
Morgane Riviere, Shreya Pathak, Pier Giuseppe Sessa, Cassidy Hardin, Surya Bhupatiraju, Léonard Hussenot, Thomas Mesnard, Bobak Shahriari, Alexandre Rame, Johan Ferret, Peter Liu, Pouya Tafti, Abe Friesen, Michelle Casbon, Sabela Ramos, Ravin Kumar, Charline Le Lan, Sammy Jerome, Anton Tsitsulin, Nino Vieillard, Piotr Stanczyk, Sertan Girgin, Nikola Momchev, Matt Hoffman, Shantanu Thakoor, Jean-Bastien Grill, Behnam Neyshabur, Olivier Bachem, Alanna Walton, Aliaksei Severyn, Alicia Parrish, Aliya Ahmad, Allen Hutchison, Alvin Abdagic, Amanda Carl, Amy Shen, Andy Brock, Andy Coenen, Anthony Laforge, Antonia Paterson, Ben Bastian, Bilal Piot, Bo Wu, Brandon Royal, Charlie Chen, Chintu Kumar, Chris Perry, Chris Welty, Christopher A. Choquette-Choo, Danila Sinopalnikov, David Weinberger, Dimple Vijaykumar, Dominika Rogozinska, Dustin Herbison, Elisa Bandy, Emma Wang, Eric Noland, Erica Moreira, Evan Senter, Evgenii Eltsyshev, Francesco Visin, Gabriel Rasskin, Gary Wei, Glenn Cameron, Gus Martins, Hadi Hashemi, Hanna Klimczak-Plucińska, Harleen Batra, Harsh Dhand, Ivan Nardini, Jacinda Mein, Jack Zhou, James Svensson, Jeff Stanway, Jetha Chan, Jin Peng Zhou, Joana Carrasqueira, Joana Iljazi, Jocelyn Becker, Joe Fernandez, Joost van Amersfoort, Josh Gordon, Josh Lipschultz, Josh Newlan, Ju yeong Ji, Kareem Mohamed, Kartikeya Badola, Kat Black, Katie Millican, Keelin McDonell, Kelvin Nguyen, Kiranbir Sodhia, Kish Greene, Lars Lowe Sjoesund, Lauren Usui, Laurent Sifre, Lena Heuermann, Leticia Lago, Lilly McNealus
|
| 269 |
+
|
| 270 |
+
Livio Baldini Soares, Logan Kilpatrick, Lucas Dixon, Luciano Martins, Machel Reid, Manvinder Singh, Mark Iverson, Martin Gorner, Mat Velloso, Mateo Wirth, Matt Davidow, Matt Miller, Matthew Rahtz, Matthew Watson, Meg Risdal, Mehran Kazemi, Michael Moynihan, Ming Zhang, Minsuk Kahng, Minwoo Park, Mofi Rahman, Mohit Khatwani, Natalie Dao, Nenshad Bardoliwalla, Nesh Devanathan, Neta Dumai, Nilay Chauhan, Oscar Wahltinez, Pankil Botarda, Parker Barnes, Paul Barham, Paul Michel, Pengchong Jin, Petko Georgiev, Phil Culliton, Pradeep Kuppala, Ramona Comanescu, Ramona Merhej, Reena Jana, Reza Ardeshir Rokni, Rishabh Agarwal, Ryan Mullins, Samaneh Saadat, Sara Mc Carthy, Sarah Perrin, Sebastien M. R. Arnold, Sebastian Krause, Shengyang Dai, Shruti Garg, Shruti Sheth, Sue Ronstrom, Susan Chan, Timothy Jordan Ting Yu, Tom Eccles, Tom Hennigan, Tomas Kocisky, Tulsee Doshi, Vihan Jain, Vikas Yadav, Vilobh Meshram, Vishal Dharmadhikari, Warren Barkley Wei Wei, Wenming Ye, Woohyun Han, Woosuk Kwon, Xiang Xu, Zhe Shen, Zhitao Gong, Zichuan Wei, Victor Cotruta, Phoebe Kirk, Anand Rao, Minh Jiang, Ludovic Peran, Tris Warkentin, Eli Collins, Joelle Barral, Zoubin Ghahramani, Raia Hadsell D. Sculley Jeanine Banks Anca Dragan Slav Petrov Oriol Vinyls Jeff Dean Demis Hassabis Koray Kavukcuoglu,Clement Farabet,Elena Buchatskaya Sebastian Borgeaud Noah Fiedel Armand Joulin Kathleen Kenealy Robert Dadashi and Alek Andreev.2024.Gemma 2: Improving open language models at a practical size. CoRR, abs/2408.00118.
|
| 271 |
+
|
| 272 |
+
Yangqiu Song, Shusen Wang, and Haixun Wang. 2015. Open domain short text conceptualization: A generative + descriptive modeling approach. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2015, Buenos Aires, Argentina, July 25-31, 2015, pages 3820-3826. AAAI Press.
|
| 273 |
+
|
| 274 |
+
Kai Sun, Yifan Ethan Xu, Hanwen Zha, Yue Liu, and Xin Luna Dong. 2024. Head-to-tail: How knowledgeable are large language models (llms)? A.K.A. will llms replace knowledge graphs? In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), NAACL 2024, Mexico City, Mexico, June 16-21, 2024, pages 311-325. Association for Computational Linguistics.
|
| 275 |
+
|
| 276 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton-Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Mar
|
| 277 |
+
|
| 278 |
+
tinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurélien Rodríguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. 2023. Llama 2: Open foundation and finetuned chat models. CoRR, abs/2307.09288.
|
| 279 |
+
|
| 280 |
+
Roman Vashurin, Ekaterina Fadeeva, Artem Vazhentsev, Akim Tsvigun, Daniil Vasilev, Rui Xing, Abdelrahman Boda Sadallah, Lyudmila Rvanova, Sergey Petrakov, Alexander Panchenko, Timothy Baldwin, Preslav Nakov, Maxim Panov, and Artem Shelmanov. 2024. Benchmarking uncertainty quantification methods for large language models with Impolygraph. CoRR, abs/2406.15627.
|
| 281 |
+
|
| 282 |
+
Yubo Wang, Xueguang Ma, Ge Zhang, Yuansheng Ni, Abhranil Chandra, Shiguang Guo, Weiming Ren, Aaran Arulraj, Xuan He, Ziyan Jiang, Tianle Li, Max Ku, Kai Wang, Alex Zhuang, Rongqi Fan, Xiang Yue, and Wenhu Chen. 2024a. Mmlu-pro: A more robust and challenging multi-task language understanding benchmark. CoRR, abs/2406.01574.
|
| 283 |
+
|
| 284 |
+
Yuxia Wang, Revanth Gangi Reddy, Zain Muhammad Mujahid, Arnav Arora, Aleksandr Rubashevskii, Jiahui Geng, Osama Mohammed Afzal, Liangming Pan, Nadav Borenstein, Aditya Pillai, Isabelle Augenstein, Iryna Gurevych, and Preslav Nakov. 2024b. Factcheck-bench: Fine-grained evaluation benchmark for automatic fact-checkers. In Findings of the Association for Computational Linguistics: EMNLP 2024, Miami, Florida, USA, November 12-16, 2024, pages 14199-14230. Association for Computational Linguistics.
|
| 285 |
+
|
| 286 |
+
Zhaowei Wang, Quyet V. Do, Hongming Zhang, Jiayao Zhang, Weiqi Wang, Tianqing Fang, Yangqiu Song, Ginny Y. Wong, and Simon See. 2023. COLA: contextualized commonsense causal reasoning from the causal inference perspective. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, pages 5253-5271. Association for Computational Linguistics.
|
| 287 |
+
|
| 288 |
+
Zhaowei Wang, Wei Fan, Qing Zong, Hongming Zhang, Sehyun Choi, Tianqing Fang, Xin Liu, Yangqiu Song, Ginny Y. Wong, and Simon See. 2024c. Absinstruct: Eliciting abstraction ability from llms through explanation tuning with plausibility estimation. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August 11-16, 2024, pages 973-994. Association for Computational Linguistics.
|
| 289 |
+
|
| 290 |
+
Zhaowei Wang, Haochen Shi, Weiqi Wang, Tianqing Fang, Hongming Zhang, Sehyun Choi, Xin Liu, and Yangqiu Song. 2024d. Abspyramid: Benchmarking
|
| 291 |
+
|
| 292 |
+
the abstraction ability of language models with a unified entailment graph. In Findings of the Association for Computational Linguistics: NAACL 2024, Mexico City, Mexico, June 16-21, 2024, pages 3991-4010. Association for Computational Linguistics.
|
| 293 |
+
Zhaowei Wang, Hongming Zhang, Tianqing Fang, Yangqiu Song, Ginny Y. Wong, and Simon See. 2022. Subeventwriter: Iterative sub-event sequence generation with coherence controller. 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 1590-1604. Association for Computational Linguistics.
|
| 294 |
+
Jason Wei, Nguyen Karina, Hyung Won Chung, Yunxin Joy Jiao, Spencer Papay, Amelia Glaese, John Schulman, and William Fedus. 2024a. Measuring short-form factuality in large language models.
|
| 295 |
+
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 Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022.
|
| 296 |
+
Jerry Wei, Chengrun Yang, Xinying Song, Yifeng Lu, Nathan Hu, Dustin Tran, Daiyi Peng, Ruibo Liu, Da Huang, Cosmo Du, and Quoc V. Le. 2024b. Longform factuality in large language models. CoRR, abs/2403.18802.
|
| 297 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, EMNLP 2020 - Demos, Online, November 16-20, 2020, pages 38-45. Association for Computational Linguistics.
|
| 298 |
+
Wentao Wu, Hongsong Li, Haixun Wang, and Kenny Qili Zhu. 2012. Probase: a probabilistic taxonomy for text understanding. In Proceedings of the ACM SIGMOD International Conference on Management of Data, SIGMOD 2012, Scottsdale, AZ, USA, May 20-24, 2012, pages 481-492. ACM.
|
| 299 |
+
Zhenran Xu, Yulin Chen, and Baotian Hu. 2023. Improving biomedical entity linking with cross-entity interaction. In Thirty-Seventh AAAI Conference on Artificial Intelligence, AAAI 2023, Thirty-Fifth Conference on Innovative Applications of Artificial Intelligence, IAAI 2023, Thirteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2023, Washington, DC, USA, February 7-14, 2023, pages 13869-13877. AAAI Press.
|
| 300 |
+
|
| 301 |
+
Zhangyue Yin, Qiushi Sun, Qipeng Guo, Jiawen Wu, Xipeng Qiu, and Xuanjing Huang. 2023. Do large language models know what they don't know? In Findings of the Association for Computational Linguistics: ACL 2023, Toronto, Canada, July 9-14, 2023, pages 8653-8665. Association for Computational Linguistics.
|
| 302 |
+
Muru Zhang, Ofir Press, William Merrill, Alisa Liu, and Noah A. Smith. 2024. How language model hallucinations can snowball. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net.
|
| 303 |
+
Chujie Zheng, Hao Zhou, Fandong Meng, Jie Zhou, and Minlie Huang. 2024a. Large language models are not robust multiple choice selectors. In *The Twelfth International Conference on Learning Representations*, ICLR 2024, Vienna, Austria, May 7-11, 2024. OpenReview.net.
|
| 304 |
+
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging llm-as-a-judge with mt-bench and chatbot arena. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023.
|
| 305 |
+
Tianshi Zheng, Jiaxin Bai, Yicheng Wang, Tianqing Fang, Yue Guo, Yauwai Yim, and Yangqiu Song. 2024b. Clr-fact: Evaluating the complex logical reasoning capability of large language models over factual knowledge. Preprint, arXiv:2407.20564.
|
| 306 |
+
Tianshi Zheng, Weihan Li, Jiaxin Bai, Weiqi Wang, and Yangqiu Song. 2024c. Assessing the robustness of retrieval-augmented generation systems in k-12 educational question answering with knowledge discrepancies. Preprint, arXiv:2412.08985.
|
| 307 |
+
Ben Zhou, Hongming Zhang, Sihao Chen, Dian Yu, Hongwei Wang, Baolin Peng, Dan Roth, and Dong Yu. 2024. Conceptual and unbiased reasoning in language models. CoRR, abs/2404.00205.
|
| 308 |
+
Qing Zong, Zhaowei Wang, Baixuan Xu, Tianshi Zheng, Haochen Shi, Weiqi Wang, Yangqiu Song, Ginny Y. Wong, and Simon See. 2023. TILFA: A unified framework for text, image, and layout fusion in argument mining. In Proceedings of the 10th Workshop on Argument Mining, ArgMining 2023, Singapore, December 7, 2023, pages 139-147. Association for Computational Linguistics.
|
| 309 |
+
|
| 310 |
+
# Appendices
|
| 311 |
+
|
| 312 |
+
# A Benchmark Statistics
|
| 313 |
+
|
| 314 |
+
COMPARISONQA is a large-scale benchmark comprising a total of 283,455 abstract question pairs, each paired with a high-frequency and a low-frequency entity. We guarantee that each entity corresponds to a single question sourced from 9166 hypernyms, to ensure no overlap. We partition our data into training, validation, and testing splits following an 8:1:1 ratio, ensuring that entities of different frequency intervals are evenly distributed in each split. Specific details are shown in Table 4.
|
| 315 |
+
|
| 316 |
+
And for COMPARISONQA-Hard, there are 81,136 high-quality and shortcut-free questions with low-frequency entities from 4,876 hypernyms in total, with details shown in Table 5.
|
| 317 |
+
|
| 318 |
+
<table><tr><td>Split</td><td>#Q. Pair</td><td>#Entity</td><td>#Hyper.</td><td>#H. R.</td><td>#L. R.</td></tr><tr><td>Train</td><td>226,762</td><td>453,524</td><td>8,430</td><td>628</td><td>76</td></tr><tr><td>Valid</td><td>28,345</td><td>56,690</td><td>3,316</td><td>627</td><td>76</td></tr><tr><td>Test</td><td>28,348</td><td>56,696</td><td>3,314</td><td>629</td><td>76</td></tr><tr><td>Total</td><td>283,455</td><td>566,910</td><td>9,166</td><td>628</td><td>76</td></tr></table>
|
| 319 |
+
|
| 320 |
+
Table 4: The statistics of COMPARISONQA benchmark. #Q. Pair refers to the number of question pairs. Hyper means hypernym. #H. R. and #L. R. refer to the average number of relationships of high-frequency entities and low-frequency entities respectively.
|
| 321 |
+
|
| 322 |
+
<table><tr><td>Split</td><td>#Q. = #Entity</td><td>#Hyper.</td><td>#L. R.</td></tr><tr><td>Train</td><td>65,057</td><td>4,396</td><td>77.45</td></tr><tr><td>Valid</td><td>7,978</td><td>1,466</td><td>77.23</td></tr><tr><td>Test</td><td>8,101</td><td>1,484</td><td>77.65</td></tr><tr><td>Total</td><td>81,136</td><td>4,876</td><td>77.44</td></tr></table>
|
| 323 |
+
|
| 324 |
+
For benchmark quality, we further compute the correctness of the annotated date in §3.3 coming from the train, validation, and test set separately. The results presented in Table 6 show the high correctness in all splits of our benchmark. Besides, our labeling is very strict. If either of the questions in one pair is wrong, we will judge the whole question pair incorrect. Since each pair contains two questions, actually only about $2.25\%$ of the total questions are incorrect.
|
| 325 |
+
|
| 326 |
+
Table 5: The statistics of COMPARISONQA-Hard benchmark. Here the number of questions is equal to the number of entities since it only has low frequency entities.
|
| 327 |
+
|
| 328 |
+
<table><tr><td>Split</td><td>Correctness</td><td>Agreement</td></tr><tr><td>Train</td><td>95.68</td><td>88.27</td></tr><tr><td>Valid</td><td>93.75</td><td>87.50</td></tr><tr><td>Test</td><td>95.45</td><td>90.91</td></tr></table>
|
| 329 |
+
|
| 330 |
+
Table 6: The statistics of COMPARISONQA-Hard benchmark. Here the number of questions is equal to the number of entities since it only has low frequency entities.
|
| 331 |
+
|
| 332 |
+
# B Definition of High and Low Frequency
|
| 333 |
+
|
| 334 |
+
First, we randomly sample 1K entities from DBpedia and compute their relationship count separately. This process is to study the distribution of entities' relationship counts in DBpedia and find boundaries for high-frequency and low-frequency entities. Then we sort these entities in order of their relationship count from highest to lowest. High-frequency entities possess cumulative relationship count of up to 1/3 of all entities, while low frequency entities range from 2/3 to 1. We exclude those between 1/3 and 2/3 to make comparison clear.
|
| 335 |
+
|
| 336 |
+
Repeating this process 3 times, we get the number of relationships to distinguish high-frequency and low-frequency entities, which are higher than 185 and lower than 107 respectively. (Of the 1K randomly sampled entities, 119 entities are identified as high frequent and 621 entities as low frequent.) These two numbers are then used to classify all the high-frequency and low-frequency entities.
|
| 337 |
+
|
| 338 |
+
It is necessary to randomly select 1K entities first to calculate the two boundaries, since the time to compute the cumulative relationship count for all the sorted entities in DBpedia is unaffordable.
|
| 339 |
+
|
| 340 |
+
# C Details in COMPARISONQA Construction
|
| 341 |
+
|
| 342 |
+
In the process of entity pairs extraction, both hypernyms that do not have enough entities and low-frequency entities that do not have enough high-frequency entities to pair with are all discarded. Finally, we get 293K entities pairs from 9,261 hypernyms in total.
|
| 343 |
+
|
| 344 |
+
These pairs are then fed into the LLM to generate questions. Each pair has a shared abstract question respectively. Since a hypernym can have several entity pairs, the final number of abstract questions, which is equal to the number of pairs, is more than that of hypernyms. After LLM's proofread stage, there are 283K abstract questions left, which are used to build our COMPARISONQA benchmark. Entities belonging to these questions come from
|
| 345 |
+
|
| 346 |
+
<table><tr><td>Task</td><td>Prompt</td></tr><tr><td>Question Generation</td><td>You will be given two entities belonging to the same hypernym. Generate a shared multiple choice question for both entities based on their descriptions according to the following 5 steps.
|
| 347 |
+
Requirements: First, the questions should have one and only one correct answer for both entities. Second, the correct answer cannot be simply guessed by the names of the entities or the way the questions are asked. For example, the question: "What was the primary operational location of Sydney O-Class Tram? A. Oslo, Norway B. Sydney, Australia C. Stockholm, Sweden D. Melbourne, Australia" is not allowed since only the correct answer contains "Sydney" which is also in the entity's name. Third, the four options should have roughly the same length.
|
| 348 |
+
Step 1, generate the shared question containing "[entity_name]" which can be replaced by the two entity names and then have different answers accordingly.
|
| 349 |
+
Step 2, use roughly the same amount of words to answer the questions for both entities separately.
|
| 350 |
+
Step 3, generate a misleading distractor for both entities separately. The distractors should have roughly the same length with the correct answers.
|
| 351 |
+
Step 4, form the final multiple choice question using the above four answer candidates, and make sure the answer for Entity1 is 'A', the answer for Entity2 is 'B', and their misleading answer candidates are 'C' and 'D'.
|
| 352 |
+
Step 5, check whether the final question and answer candidates meet the above requirements. If yes, then output **SCUUEED**, otherwise output **FAIL**.
|
| 353 |
+
Follow these examples:
|
| 354 |
+
......(Examples written by experts)</td></tr><tr><td></td><td>Hypernym: [Hypernym]
|
| 355 |
+
Entity1: [Entity1]
|
| 356 |
+
Entity1 Description: [Entity1 Description]
|
| 357 |
+
Entity2: [Entity2]
|
| 358 |
+
Entity2 Description: [Entity2 Description]</td></tr></table>
|
| 359 |
+
|
| 360 |
+
# 9,166 different hypernyms.
|
| 361 |
+
|
| 362 |
+
In the process of Abstract Question Generation, the prompt we use to generate questions is shown in Table 7. In questions generated by LLMs, the answer for the high-frequency entity is $A$ , low-frequency entity is $B$ , and their distractors are $C$ and $D$ respectively. And in the end, we randomly shuffle the 4 options in one question to guarantee the balance of the correct options.
|
| 363 |
+
|
| 364 |
+
Table 7: The prompt used to generate questions in COMPARISONQA. Placeholders [Hypernym], [Entity1], [Entity1 Description], [Entity2], [Entity2 Description] will be replaced with real hypernym, high-frequency entity, low-frequency entity, and their descriptions accordingly.
|
| 365 |
+
|
| 366 |
+
<table><tr><td>Task</td><td>Prompt</td></tr><tr><td rowspan="2">Uncertainty Generation</td><td>Question: [question] Answer: **[option].** Uncertainty: **[uncertainty percentage]** Answer the following multiple choice question. Select only one correct answer from the choices and give your uncertainty score, following the above format.</td></tr><tr><td>[Question] A. [OptionA]. B. [OptionB]. C. [OptionC]. D. [OptionD].</td></tr></table>
|
| 367 |
+
|
| 368 |
+
Table 8: The prompt used to generate uncertainty score for proprietary LLMs. Placeholders [Hypernym], [Entity1], [Entity1 Description], [Entity2], [Entity2 Description] will be replaced with real hypernym, high-frequency entity, low-frequency entity, and their descriptions accordingly.
|
| 369 |
+
|
| 370 |
+
# D Calculation of Uncertainty
|
| 371 |
+
|
| 372 |
+
Following Liu et al. (2023), we first combine the questions with each of their options, and use GPT4o-mini to transform them into four statements. The data can also be found in our benchmark.
|
| 373 |
+
|
| 374 |
+
Then we compute the uncertainty for each statement. For open-source LLMs, uncertainty refers to their perplexity for generating the correct statement. For proprietary LLMs, we allow them to generate their uncertainty scores, with prompt shown in Table 8. Then, the threshold between high and low uncertainty for each model is determined by its own average uncertainty on the testing set of each benchmark respectively.
|
| 375 |
+
|
| 376 |
+
There are several reasons for choosing different uncertainties for each setting. On one hand, perplexity-based uncertainty is unavailable for proprietary LLMs. On the other hand, open source LLMs often fail to understand the instructions and can not generate uncertainty scores. We have conducted experiments on verbalized uncertainty of open source LLMs. However, experiments show that Llama-3-8B-Instruct has a $18.5\%$ chance of not generating an uncertainty score, which makes the results unreliable and will also affect further robustness evaluations. In addition, Vashurin et al.
|
| 377 |
+
|
| 378 |
+
(2024) mentioned that, for multiple choice QA, information-based methods such as perplexity are substantially superior to quantifying model uncertainty.
|
| 379 |
+
|
| 380 |
+
<table><tr><td>Method</td><td>Prompt</td></tr><tr><td>Zero-Shot</td><td>[Question]
|
| 381 |
+
A. [OptionA]. B. [OptionB].
|
| 382 |
+
C. [OptionC]. D. [OptionD].
|
| 383 |
+
The correct answer is:</td></tr><tr><td>Few-Shot</td><td>[Examples]
|
| 384 |
+
Answer the multiple choice question. Select only one correct answer from the choices, following above examples.
|
| 385 |
+
[Question]
|
| 386 |
+
A. [OptionA]. B. [OptionB].
|
| 387 |
+
C. [OptionC]. D. [OptionD].</td></tr><tr><td>CoT</td><td>Question: [question]
|
| 388 |
+
Rational: [rationale]
|
| 389 |
+
Answer: **[option].**
|
| 390 |
+
Answer the multiple choice question. Think step by step and generate a short rationale to support your reasoning. Choose one best answer based on the generated rational, following the above format. Keep your whole response in 50 tokens.
|
| 391 |
+
[Question]
|
| 392 |
+
A. [OptionA]. B. [OptionB].
|
| 393 |
+
C. [OptionC]. D. [OptionD].</td></tr></table>
|
| 394 |
+
|
| 395 |
+
Table 9: The prompt used when evaluating LLMs on our benchmark. Placeholders [Examples], [Question], [OptionA], [OptionB], [OptionC], [OptionD] will be replaced with the real examples, questions and their options accordingly.
|
| 396 |
+
|
| 397 |
+
# E Experiment Details
|
| 398 |
+
|
| 399 |
+
For the main evaluations on COMPARISONQA, we categorize the evaluation of different models into three types: (1) OPEN SOURCE LLM ZERO-SHOT: We first evaluate Llama3, Llama3.1, Llama3.2 (Touvron et al., 2023; Dubey et al., 2024), Gemma2 (Mesnard et al., 2024; Riviere et al., 2024), Phi3.5 (Abdin et al., 2024), Falcon, Falcon2 (Malartic et al., 2024), Mistral (Jiang et al., 2023), and their instruction versions accordingly in a zero-shot manner (Qin et al., 2023). (2) OPEN SOURCE LLM FEW-SHOT: Then we evaluate the above models in a few-shot manner (Brown et al., 2020). Since our benchmark is in the form of four options multiple-choice questions, the shot number is set to four to minimize bias, where each of the four examples corresponds to a different correct answer in (a, b, c, d). (3) PROPRIETARY LLM API: Finally, we evaluate the performance of GPT-4o (OpenAI, 2023, 2024b) and GPT-4o
|
| 400 |
+
|
| 401 |
+
mini (OpenAI, 2024a), using zero-shot, few-shot, and Chain-of-Thought (CoT; Wei et al., 2022).
|
| 402 |
+
|
| 403 |
+
All the open-source models are run on 4 NVIDIA A6000 (40G) GPUs with BF32. And for proprietary LLM, we access them via OpenAI API $^{2}$ . The different kinds of prompts we use are shown in Table 9. And all the evaluation results are reported in Table 10.
|
| 404 |
+
|
| 405 |
+
For the question filtering of COMPARISONQA-Hard, the six open-source LLMs we use are Llama-3-8B-Instruct, Llama-3.1-8B-Instruct, gemma-2-9b, Phi-3.5-mini-instruct, Falcon-11B, and Mistral-7B-Instruct-v0.3.
|
| 406 |
+
|
| 407 |
+
<table><tr><td rowspan="3">Models</td><td colspan="3">High Freq Question</td><td colspan="3">Low Freq Question</td><td colspan="3">Average</td><td colspan="3">Difference (H -> T)</td></tr><tr><td>Unc.</td><td>Acc</td><td>Ma-F1</td><td>Unc.</td><td>Acc</td><td>Ma-F1</td><td>Unc.</td><td>Acc</td><td>Ma-F1</td><td>Unc.</td><td>Acc</td><td>Ma-F1</td></tr><tr><td>(↓)</td><td>(↑)</td><td>(↑)</td><td>(↓)</td><td>(↑)</td><td>(↑)</td><td>(↓)</td><td>(↑)</td><td>(↑)</td><td></td><td></td><td></td></tr><tr><td>Random</td><td>-</td><td>25.29</td><td>25.29</td><td>-</td><td>25.22</td><td>25.22</td><td>-</td><td>25.26</td><td>25.26</td><td>-</td><td>↓0.07</td><td>↓0.07</td></tr><tr><td>Majority</td><td>-</td><td>25.70</td><td>10.22</td><td>-</td><td>25.14</td><td>10.04</td><td>-</td><td>25.42</td><td>10.13</td><td>-</td><td>↓0.56</td><td>↓0.18</td></tr><tr><td colspan="13">LLM (Open Source) + Zero-shot</td></tr><tr><td>Llama-3 8B</td><td>54.33</td><td>65.90</td><td>63.60</td><td>81.54</td><td>53.83</td><td>51.29</td><td>67.94</td><td>59.87</td><td>57.44</td><td>↑6.11</td><td>↓12.07</td><td>↓12.30</td></tr><tr><td>Llama-3-Instr 8B</td><td>77.55</td><td>80.72</td><td>80.71</td><td>117.41</td><td>69.03</td><td>68.95</td><td>97.48</td><td>74.88</td><td>74.83</td><td>↑39.86</td><td>↓11.69</td><td>↓11.76</td></tr><tr><td>Llama-3.1 8B</td><td>55.91</td><td>65.29</td><td>63.31</td><td>83.35</td><td>52.66</td><td>50.52</td><td>69.63</td><td>58.98</td><td>56.92</td><td>↑27.44</td><td>↓12.63</td><td>↓12.78</td></tr><tr><td>Llama-3.1-Instr 8B</td><td>58.97</td><td>80.06</td><td>80.08</td><td>87.05</td><td>69.99</td><td>69.94</td><td>73.01</td><td>75.03</td><td>75.01</td><td>↑28.08</td><td>↓10.07</td><td>↓10.14</td></tr><tr><td>Llama-3.2 3B</td><td>67.51</td><td>57.93</td><td>53.65</td><td>99.55</td><td>48.10</td><td>44.66</td><td>83.53</td><td>53.02</td><td>49.16</td><td>↑32.04</td><td>↓9.83</td><td>↓9.00</td></tr><tr><td>Llama-3.2-Instr 3B</td><td>74.27</td><td>71.47</td><td>71.51</td><td>108.24</td><td>62.17</td><td>62.18</td><td>91.26</td><td>66.82</td><td>66.85</td><td>↑33.97</td><td>↓9.30</td><td>↓9.33</td></tr><tr><td>Gemma-2 2B</td><td>133.57</td><td>46.48</td><td>43.40</td><td>213.40</td><td>37.76</td><td>34.07</td><td>173.49</td><td>42.12</td><td>38.74</td><td>↑79.83</td><td>↓8.72</td><td>↓9.33</td></tr><tr><td>Gemma-2 9B</td><td>124.97</td><td>64.50</td><td>64.80</td><td>211.34</td><td>52.24</td><td>51.23</td><td>168.16</td><td>58.37</td><td>58.01</td><td>↑86.37</td><td>↓12.26</td><td>↓13.57</td></tr><tr><td>Phi-3.5-mini-Instr 4B</td><td>27.81</td><td>72.81</td><td>72.78</td><td>39.80</td><td>65.26</td><td>65.00</td><td>33.81</td><td>69.04</td><td>68.89</td><td>↑11.99</td><td>↓7.55</td><td>↓7.78</td></tr><tr><td>Falcon 7B</td><td>62.33</td><td>18.19</td><td>18.55</td><td>92.92</td><td>17.93</td><td>18.19</td><td>77.63</td><td>18.06</td><td>18.37</td><td>↑30.59</td><td>↓0.26</td><td>↓0.36</td></tr><tr><td>Falcon-Instr 7B</td><td>88.88</td><td>25.68</td><td>14.49</td><td>128.75</td><td>25.71</td><td>14.01</td><td>108.82</td><td>25.70</td><td>14.25</td><td>↑39.87</td><td>↑0.02</td><td>↓0.48</td></tr><tr><td>Falcon2 11B</td><td>56.93</td><td>70.72</td><td>69.80</td><td>87.31</td><td>58.07</td><td>56.70</td><td>72.12</td><td>64.40</td><td>63.25</td><td>↑30.38</td><td>↓12.65</td><td>↓13.10</td></tr><tr><td>Mistral-v0.3 7B</td><td>39.83</td><td>65.55</td><td>63.11</td><td>56.99</td><td>53.36</td><td>50.26</td><td>48.41</td><td>59.46</td><td>56.69</td><td>↑17.16</td><td>↓12.19</td><td>↓12.85</td></tr><tr><td>Mistral-v0.3-Instr 7B</td><td>44.73</td><td>73.53</td><td>73.14</td><td>66.09</td><td>63.05</td><td>62.40</td><td>55.41</td><td>68.29</td><td>67.77</td><td>↑21.36</td><td>↓10.48</td><td>↓10.74</td></tr><tr><td colspan="13">LLM (Open Source) + 4-shot</td></tr><tr><td>Llama-3 8B</td><td>21.89</td><td>75.57</td><td>75.55</td><td>23.75</td><td>61.00</td><td>61.01</td><td>22.82</td><td>68.29</td><td>68.28</td><td>↑1.86</td><td>↓14.57</td><td>↑14.55</td></tr><tr><td>Llama-3-Instr 8B</td><td>26.20</td><td>79.94</td><td>79.92</td><td>28.70</td><td>67.98</td><td>67.95</td><td>27.45</td><td>73.96</td><td>73.93</td><td>↑2.50</td><td>↓11.96</td><td>↓11.96</td></tr><tr><td>Llama-3.1 8B</td><td>20.82</td><td>74.91</td><td>74.89</td><td>22.62</td><td>62.00</td><td>62.00</td><td>21.72</td><td>68.46</td><td>68.45</td><td>↑1.81</td><td>↓12.91</td><td>↓12.90</td></tr><tr><td>Llama-3.1-Instr 8B</td><td>20.63</td><td>79.74</td><td>79.74</td><td>22.48</td><td>69.09</td><td>69.07</td><td>21.56</td><td>74.42</td><td>74.40</td><td>↑1.85</td><td>↓10.65</td><td>↓10.66</td></tr><tr><td>Llama-3.2 3B</td><td>23.58</td><td>68.89</td><td>68.84</td><td>25.59</td><td>57.26</td><td>57.17</td><td>24.59</td><td>63.08</td><td>63.01</td><td>↑2.01</td><td>↓11.63</td><td>↓11.67</td></tr><tr><td>Llama-3.2-Instr 3B</td><td>23.66</td><td>71.43</td><td>71.43</td><td>25.67</td><td>62.12</td><td>62.09</td><td>24.67</td><td>66.78</td><td>66.76</td><td>↑2.01</td><td>↓9.32</td><td>↓9.34</td></tr><tr><td>Gemma-2 2B</td><td>26.96</td><td>62.99</td><td>62.93</td><td>29.43</td><td>50.93</td><td>50.91</td><td>28.20</td><td>56.96</td><td>56.92</td><td>↑2.47</td><td>↓12.06</td><td>↓12.02</td></tr><tr><td>Gemma-2 9B</td><td>20.26</td><td>80.10</td><td>80.08</td><td>22.36</td><td>68.36</td><td>68.31</td><td>21.31</td><td>74.23</td><td>74.20</td><td>↑2.10</td><td>↓11.74</td><td>↓11.77</td></tr><tr><td>Phi-3.5-mini-Instr 4B</td><td>11.02</td><td>73.68</td><td>73.67</td><td>11.85</td><td>67.46</td><td>67.33</td><td>11.44</td><td>70.57</td><td>70.50</td><td>↑0.83</td><td>↓6.22</td><td>↓6.34</td></tr><tr><td>Falcon 7B</td><td>21.69</td><td>28.40</td><td>21.25</td><td>23.42</td><td>28.25</td><td>20.63</td><td>22.56</td><td>28.33</td><td>20.94</td><td>↑1.73</td><td>↓0.15</td><td>↓0.62</td></tr><tr><td>Falcon-Instr 7B</td><td>21.69</td><td>26.27</td><td>18.32</td><td>23.42</td><td>25.67</td><td>18.15</td><td>22.56</td><td>25.97</td><td>18.23</td><td>↑1.73</td><td>↓0.59</td><td>↓0.17</td></tr><tr><td>Falcon2 11B</td><td>16.42</td><td>77.11</td><td>77.01</td><td>17.77</td><td>65.92</td><td>65.75</td><td>17.10</td><td>71.52</td><td>71.38</td><td>↑1.35</td><td>↓11.19</td><td>↓11.26</td></tr><tr><td>Mistral-v0.3 7B</td><td>13.89</td><td>75.55</td><td>75.53</td><td>14.99</td><td>62.88</td><td>62.85</td><td>14.44</td><td>69.22</td><td>69.19</td><td>↑1.10</td><td>↓12.67</td><td>↓12.68</td></tr><tr><td>Mistral-v0.3-Instr 7B</td><td>15.97</td><td>74.46</td><td>74.40</td><td>17.40</td><td>65.51</td><td>65.35</td><td>16.69</td><td>69.99</td><td>69.87</td><td>↑1.43</td><td>↓8.95</td><td>↓9.05</td></tr><tr><td colspan="13">LLM (Proprietary) API</td></tr><tr><td>GPT4o-mini (Zero-Shot)</td><td>13.52</td><td>85.61</td><td>85.58</td><td>18.34</td><td>73.85</td><td>73.73</td><td>15.93</td><td>79.73</td><td>79.66</td><td>↑4.82</td><td>↓11.76</td><td>↓11.85</td></tr><tr><td>GPT4o-mini (Few-Shot)</td><td>25.74</td><td>84.78</td><td>84.69</td><td>38.17</td><td>72.76</td><td>72.47</td><td>31.96</td><td>78.77</td><td>78.58</td><td>↑12.43</td><td>↓12.02</td><td>↓12.22</td></tr><tr><td>GPT4o-mini (CoT)</td><td>10.53</td><td>86.25</td><td>86.25</td><td>12.27</td><td>74.39</td><td>74.40</td><td>11.40</td><td>80.32</td><td>80.32</td><td>↑1.74</td><td>↓11.85</td><td>↓11.85</td></tr><tr><td>GPT4o (Zero-Shot)</td><td>14.18</td><td>93.86</td><td>93.95</td><td>30.98</td><td>86.54</td><td>86.75</td><td>22.58</td><td>89.81</td><td>90.32</td><td>↑16.80</td><td>↓8.10</td><td>↓7.26</td></tr><tr><td>GPT4o (Few-Shot)</td><td>28.41</td><td>93.94</td><td>93.95</td><td>45.81</td><td>86.54</td><td>86.75</td><td>37.11</td><td>90.24</td><td>90.35</td><td>↑17.40</td><td>↓7.40</td><td>↓7.20</td></tr><tr><td>GPT4o (CoT)</td><td>10.39</td><td>92.40</td><td>92.47</td><td>18.36</td><td>85.47</td><td>85.72</td><td>14.38</td><td>88.93</td><td>89.10</td><td>↑7.97</td><td>↓6.93</td><td>↓6.75</td></tr></table>
|
| 408 |
+
|
| 409 |
+
Table 10: Performance of various LLMs on the testing set of COMPARISONQA. Unc., Acc, and Ma-F1, denote Uncertainty, Accuracy, and Macro F1-score. And the Difference column shows how scores change from high-frequency questions to low-frequency questions. The best performances within each method are underlined and the best among all methods are bold-faced. And for the Difference column, We underline the largest difference within each method and bold the one among all methods.
|
2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:88f97a76d5998bd1fcd0bea80f0de80c8d8f960191b388005d15695029b9b5fd
|
| 3 |
+
size 1408948
|
2025/ComparisonQA_ Evaluating Factuality Robustness of LLMs Through Knowledge Frequency Control and Uncertainty/layout.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
2025/Compositional Syntactico-SemBanking for English as a Second or Foreign Language/69f8b9dd-c1a7-4dc3-8822-95c66d709083_content_list.json
ADDED
|
@@ -0,0 +1,1957 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Compositional Syntactic SemBanking for English as a Second or Foreign Language",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
115,
|
| 8 |
+
79,
|
| 9 |
+
880,
|
| 10 |
+
118
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Wenxi Li $^{1,2}$ , Xihao Wang $^{3}$ , Weiwei Sun $^{4}$",
|
| 17 |
+
"bbox": [
|
| 18 |
+
329,
|
| 19 |
+
124,
|
| 20 |
+
672,
|
| 21 |
+
142
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "$^{1}$ School of the Chinese Nation Studies, Minzu University of China",
|
| 28 |
+
"bbox": [
|
| 29 |
+
228,
|
| 30 |
+
147,
|
| 31 |
+
768,
|
| 32 |
+
164
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "$^{2}$ Key Laboratory of Ethnic Language Intelligent Analysis and Security Governance of MOE,",
|
| 39 |
+
"bbox": [
|
| 40 |
+
124,
|
| 41 |
+
164,
|
| 42 |
+
872,
|
| 43 |
+
181
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "Minzu University of China",
|
| 50 |
+
"bbox": [
|
| 51 |
+
386,
|
| 52 |
+
181,
|
| 53 |
+
608,
|
| 54 |
+
197
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "$^{3}$ Department of Chinese Language and Literature, Peking University",
|
| 61 |
+
"bbox": [
|
| 62 |
+
216,
|
| 63 |
+
198,
|
| 64 |
+
776,
|
| 65 |
+
214
|
| 66 |
+
],
|
| 67 |
+
"page_idx": 0
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "$^{4}$ Department of Computer Science and Technology, University of Cambridge",
|
| 72 |
+
"bbox": [
|
| 73 |
+
186,
|
| 74 |
+
214,
|
| 75 |
+
808,
|
| 76 |
+
231
|
| 77 |
+
],
|
| 78 |
+
"page_idx": 0
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "Correspondence: ws390@cam.ac.uk",
|
| 83 |
+
"bbox": [
|
| 84 |
+
381,
|
| 85 |
+
234,
|
| 86 |
+
615,
|
| 87 |
+
247
|
| 88 |
+
],
|
| 89 |
+
"page_idx": 0
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"type": "text",
|
| 93 |
+
"text": "Abstract",
|
| 94 |
+
"text_level": 1,
|
| 95 |
+
"bbox": [
|
| 96 |
+
260,
|
| 97 |
+
261,
|
| 98 |
+
339,
|
| 99 |
+
275
|
| 100 |
+
],
|
| 101 |
+
"page_idx": 0
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"type": "text",
|
| 105 |
+
"text": "Despite the widespread use of English as a Second or Foreign Language (ESFL), developing syntactico-semantic representations for it is limited — the irregularities in ESFL complicate systematic composition and subsequently the derivation of its semantics. This paper draws on constructivism and proposes a novel Synchronous Hyperedge Replacement Grammar (SHRG)-based constructivist approach to address the challenges. By using constructions as fundamental units, this approach not only accommodates both the idiosyncrasies and the compositional nature of ESFL, but also bridges the gap between literal cues and intended meaning. The feasibility of this constructivist approach is demonstrated using real ESFL data, resulting in a gold-standard, medium-sized syntactico-semantic bank that covers a wide range of ESFL phenomena.",
|
| 106 |
+
"bbox": [
|
| 107 |
+
141,
|
| 108 |
+
288,
|
| 109 |
+
460,
|
| 110 |
+
558
|
| 111 |
+
],
|
| 112 |
+
"page_idx": 0
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"type": "text",
|
| 116 |
+
"text": "1 Introduction",
|
| 117 |
+
"text_level": 1,
|
| 118 |
+
"bbox": [
|
| 119 |
+
114,
|
| 120 |
+
573,
|
| 121 |
+
258,
|
| 122 |
+
588
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "The human language faculty is widely believed to consist of two key components: (i) a lexicon of stored, memorized listmes and (ii) a mental grammar that defines how novel utterances are composed from them (Jackendoff, 2000, 2002). Guided by the principle of compositionality, which holds that the meaning of an expression arises from the meanings of its parts and their syntactic combination (Partee, 1984), these components are thought to enable humans to systematically generate or comprehend an infinite number of expressions.",
|
| 129 |
+
"bbox": [
|
| 130 |
+
112,
|
| 131 |
+
599,
|
| 132 |
+
489,
|
| 133 |
+
775
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 0
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "However, such a compositional approach faces significant challenges in characterizing the syntax-semantics interface of non-native languages. The frequent presence of irregularities in them, including unconventional tokens and structures, makes it exceedingly difficult to define their lexicons and grammars. Yet, speakers consistently demonstrate the ability to interpret these languages effectively (Clahsen and Felser, 2006; Kurz, 2008). Consider",
|
| 140 |
+
"bbox": [
|
| 141 |
+
112,
|
| 142 |
+
777,
|
| 143 |
+
489,
|
| 144 |
+
920
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 0
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "sentences 1a-1c which are real-world examples of non-native English, i.e., English as a Second or Foreign Language (ESFL) $^{1}$ . Despite containing apparent syntactic errors, each sentence successfully conveys its intended semantics:",
|
| 151 |
+
"bbox": [
|
| 152 |
+
507,
|
| 153 |
+
261,
|
| 154 |
+
884,
|
| 155 |
+
341
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 0
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "text",
|
| 161 |
+
"text": "(1) a. Omission: I had to sleep in $(\\mathbf{a})$ tent.",
|
| 162 |
+
"bbox": [
|
| 163 |
+
515,
|
| 164 |
+
348,
|
| 165 |
+
836,
|
| 166 |
+
363
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 0
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "b. Insertion: We contacted with Kim.",
|
| 173 |
+
"bbox": [
|
| 174 |
+
549,
|
| 175 |
+
374,
|
| 176 |
+
825,
|
| 177 |
+
387
|
| 178 |
+
],
|
| 179 |
+
"page_idx": 0
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"type": "text",
|
| 183 |
+
"text": "c. Transposition: He visits often Paris.",
|
| 184 |
+
"bbox": [
|
| 185 |
+
549,
|
| 186 |
+
399,
|
| 187 |
+
838,
|
| 188 |
+
414
|
| 189 |
+
],
|
| 190 |
+
"page_idx": 0
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"type": "text",
|
| 194 |
+
"text": "How can coherent semantics arise from an \"imperfect\" syntactic foundation? This question has become increasingly pressing, as ESFL, with the advent of globalization, has come to be recognized not merely as an erroneous forms of native English (Bryant et al., 2023), but as a linguistic system in its own right (Khanuja et al., 2020; Aguilar and Solorio, 2020; Zhang et al., 2021; Bryant et al., 2023). Notably, over $70\\%$ of English speakers worldwide are non-native (Eberhard et al., 2024).",
|
| 195 |
+
"bbox": [
|
| 196 |
+
509,
|
| 197 |
+
420,
|
| 198 |
+
884,
|
| 199 |
+
582
|
| 200 |
+
],
|
| 201 |
+
"page_idx": 0
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"type": "text",
|
| 205 |
+
"text": "In response, this paper draws on insights from constructivist linguistics to address this challenge. Specifically, grounded in the constructivist theories which conceptualize words, idioms, and phrases as form-meaning pairings, or constructions, stored in an inventory that exhaustively captures human language (Bates and MacWhinney, 1987; Langacker, 1987; Goldberg, 1995, 2003; Croft, 2001; Croft and Cruse, 2004; Tomasello, 2003; Robinson and Ellis, 2008), this paper proposes using syntactic-semantic constructions as the fundamental units for modeling the computational systems underlying the human language faculty.",
|
| 206 |
+
"bbox": [
|
| 207 |
+
507,
|
| 208 |
+
583,
|
| 209 |
+
884,
|
| 210 |
+
791
|
| 211 |
+
],
|
| 212 |
+
"page_idx": 0
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"type": "text",
|
| 216 |
+
"text": "As illustrated in Figure 1, this approach treats diverse \"errors\" in ESFL as distinct form-meaning pairings. In doing so, it not only accommodates these deviations but also integrates them into constructional templates, thereby enabling their participation in broader syntactico-semantic composition.",
|
| 217 |
+
"bbox": [
|
| 218 |
+
507,
|
| 219 |
+
791,
|
| 220 |
+
884,
|
| 221 |
+
888
|
| 222 |
+
],
|
| 223 |
+
"page_idx": 0
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"type": "page_footnote",
|
| 227 |
+
"text": "<sup>1</sup>Data are from the Cambridge First Certificate in English dataset (FCE; Yannakoudakis et al., 2011)",
|
| 228 |
+
"bbox": [
|
| 229 |
+
507,
|
| 230 |
+
894,
|
| 231 |
+
882,
|
| 232 |
+
920
|
| 233 |
+
],
|
| 234 |
+
"page_idx": 0
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"type": "page_number",
|
| 238 |
+
"text": "24395",
|
| 239 |
+
"bbox": [
|
| 240 |
+
473,
|
| 241 |
+
927,
|
| 242 |
+
524,
|
| 243 |
+
940
|
| 244 |
+
],
|
| 245 |
+
"page_idx": 0
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "footer",
|
| 249 |
+
"text": "Findings of the Association for Computational Linguistics: ACL 2025, pages 24395-24406",
|
| 250 |
+
"bbox": [
|
| 251 |
+
220,
|
| 252 |
+
945,
|
| 253 |
+
778,
|
| 254 |
+
958
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 0
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "footer",
|
| 260 |
+
"text": "July 27 - August 1, 2025 ©2025 Association for Computational Linguistics",
|
| 261 |
+
"bbox": [
|
| 262 |
+
268,
|
| 263 |
+
959,
|
| 264 |
+
727,
|
| 265 |
+
972
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 0
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "I had to sleep in $(\\mathbf{a})$ tent.",
|
| 272 |
+
"bbox": [
|
| 273 |
+
112,
|
| 274 |
+
80,
|
| 275 |
+
299,
|
| 276 |
+
95
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 1
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "image",
|
| 282 |
+
"img_path": "images/aaad92abb605c333038306ae2d64e72f1cf94dead14bbd421d9e111af6064c84.jpg",
|
| 283 |
+
"image_caption": [
|
| 284 |
+
"We contacted with Kim."
|
| 285 |
+
],
|
| 286 |
+
"image_footnote": [],
|
| 287 |
+
"bbox": [
|
| 288 |
+
122,
|
| 289 |
+
104,
|
| 290 |
+
213,
|
| 291 |
+
195
|
| 292 |
+
],
|
| 293 |
+
"page_idx": 1
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "image",
|
| 297 |
+
"img_path": "images/c95679f7e4e4d74e240cbf36cd0bbf299801aaed06377f3a554aff6a5075b16d.jpg",
|
| 298 |
+
"image_caption": [
|
| 299 |
+
"FORM",
|
| 300 |
+
"NP $\\rightarrow$ DET{a} $+\\mathrm{N}$ {tent}",
|
| 301 |
+
"$\\mathrm{NP}\\to \\mathrm{N}$ {tent}",
|
| 302 |
+
"MEANING"
|
| 303 |
+
],
|
| 304 |
+
"image_footnote": [],
|
| 305 |
+
"bbox": [
|
| 306 |
+
282,
|
| 307 |
+
155,
|
| 308 |
+
369,
|
| 309 |
+
198
|
| 310 |
+
],
|
| 311 |
+
"page_idx": 1
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"type": "image",
|
| 315 |
+
"img_path": "images/1dab95d5c23c5c07b76fc7e316f40c9b8fc86bc4fc435d943eb7035c1b850dfe.jpg",
|
| 316 |
+
"image_caption": [
|
| 317 |
+
"FORM",
|
| 318 |
+
"VP $\\rightarrow$ V{contact} $^+$ NP{Kim}",
|
| 319 |
+
"VP $\\rightarrow$ V{contact} $^+$ P{with} $^+$ NP{Kim}"
|
| 320 |
+
],
|
| 321 |
+
"image_footnote": [],
|
| 322 |
+
"bbox": [
|
| 323 |
+
122,
|
| 324 |
+
227,
|
| 325 |
+
280,
|
| 326 |
+
338
|
| 327 |
+
],
|
| 328 |
+
"page_idx": 1
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"type": "image",
|
| 332 |
+
"img_path": "images/28b4d2702ffa48d2aa4e07ed43c55a7468b41e29c82766036f9978c1bbed845d.jpg",
|
| 333 |
+
"image_caption": [
|
| 334 |
+
"MEANING"
|
| 335 |
+
],
|
| 336 |
+
"image_footnote": [],
|
| 337 |
+
"bbox": [
|
| 338 |
+
287,
|
| 339 |
+
282,
|
| 340 |
+
453,
|
| 341 |
+
332
|
| 342 |
+
],
|
| 343 |
+
"page_idx": 1
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"type": "image",
|
| 347 |
+
"img_path": "images/ee7946d6cd6893a89ded5337bca69effdba3787e2729a23b7bb181535cddf75f.jpg",
|
| 348 |
+
"image_caption": [
|
| 349 |
+
"HevisitsoftenParis.",
|
| 350 |
+
"FORM",
|
| 351 |
+
"$\\mathrm{VP}\\rightarrow \\mathrm{Adv}\\{\\mathrm{often}\\} +\\mathrm{V}\\{\\mathrm{visit}\\} +\\mathrm{NP}\\{\\mathrm{Paris}\\}$ $\\mathrm{VP}\\to \\mathrm{V}\\{\\mathrm{visit}\\} +\\mathrm{Adv}\\{\\mathrm{often}\\} +\\mathrm{NP}\\{\\mathrm{Paris}\\}$"
|
| 352 |
+
],
|
| 353 |
+
"image_footnote": [],
|
| 354 |
+
"bbox": [
|
| 355 |
+
122,
|
| 356 |
+
374,
|
| 357 |
+
275,
|
| 358 |
+
486
|
| 359 |
+
],
|
| 360 |
+
"page_idx": 1
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "image",
|
| 364 |
+
"img_path": "images/6f8b73c87512a845b2603903b104bd3e472319715ff6b6e2cedc33bb29c9bfa8.jpg",
|
| 365 |
+
"image_caption": [
|
| 366 |
+
"MEANING",
|
| 367 |
+
"Figure 1: Constructivist analysis of Example 1a - 1c. The left side shows where the \"errors\" are embedded and the right side presents how constructions — FORMs (blue for corrected versions, red for ESFL data) paired with MEANINGs — accommodate these \"errors\"."
|
| 368 |
+
],
|
| 369 |
+
"image_footnote": [],
|
| 370 |
+
"bbox": [
|
| 371 |
+
287,
|
| 372 |
+
425,
|
| 373 |
+
475,
|
| 374 |
+
487
|
| 375 |
+
],
|
| 376 |
+
"page_idx": 1
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"type": "text",
|
| 380 |
+
"text": "At the implementation level, we represent the syntax of ESFL using Context Free Grammar (CFG) trees and the semantics using graphs in the framework of English Resource Semantics (ERS; Flickinger et al., 2014a). To model the parallel composition of syntactic and semantic representations, Synchronous Hyperedge Replacement Grammar (SHRG), a synchronous extension of Hypergraph Replacement Grammar (HRG) that has been widely applied in semantics-based parsing and generation for English (Chen et al., 2018; Chen and Sun, 2020; Ye and Sun, 2020), is adopted. Details of the constructivist syntactico-semantic formalism is presented in $\\S 2$ .",
|
| 381 |
+
"bbox": [
|
| 382 |
+
112,
|
| 383 |
+
614,
|
| 384 |
+
489,
|
| 385 |
+
839
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 1
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "text",
|
| 391 |
+
"text": "The feasibility and the effectiveness of the SHRG-based constructivist syntax-semantics interface is tested on real ESFL data. Following the workflow demonstrated in Figure 2, we develop a syntactico-semantic bank (sembank; §3), which",
|
| 392 |
+
"bbox": [
|
| 393 |
+
112,
|
| 394 |
+
841,
|
| 395 |
+
489,
|
| 396 |
+
921
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 1
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "text",
|
| 402 |
+
"text": "achieves high inter-annotator agreement, addresses various phenomena effectively, and extends coverage to data previously deemed unparsable.",
|
| 403 |
+
"bbox": [
|
| 404 |
+
507,
|
| 405 |
+
84,
|
| 406 |
+
884,
|
| 407 |
+
131
|
| 408 |
+
],
|
| 409 |
+
"page_idx": 1
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"type": "text",
|
| 413 |
+
"text": "We argue that our newly-developed sembank for ESFL benefits both linguistic theory and practical applications. Theoretically, it shows that ESFL is compositional — not a random collection of expressions, but a natural language governed by systematic rules (Adjemian, 1976). Its derivational process parallels that of native English, accounting for its generativity. Practically, since language acquisition involves mastering form-meaning pairings of the target language, our sembank serves as a valuable resource for empirical research in this domain (Granger, 2003, 2014; Biber and Reppen, 2015), offering a deeper and more comprehensive analysis than existing ESFL corpora (MacWhinney, 2000; Sagae et al., 2007; Geertzen et al., 2013).",
|
| 414 |
+
"bbox": [
|
| 415 |
+
507,
|
| 416 |
+
133,
|
| 417 |
+
884,
|
| 418 |
+
375
|
| 419 |
+
],
|
| 420 |
+
"page_idx": 1
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "text",
|
| 424 |
+
"text": "2 A Constructivist Approach",
|
| 425 |
+
"text_level": 1,
|
| 426 |
+
"bbox": [
|
| 427 |
+
507,
|
| 428 |
+
388,
|
| 429 |
+
778,
|
| 430 |
+
405
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 1
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "text",
|
| 436 |
+
"text": "2.1 Theoretical Background",
|
| 437 |
+
"text_level": 1,
|
| 438 |
+
"bbox": [
|
| 439 |
+
507,
|
| 440 |
+
414,
|
| 441 |
+
746,
|
| 442 |
+
431
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 1
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "Though being a field encompassing a wide range of approaches (see Hoffmann and Trousdale, 2013; Goldberg, 2013), constructivist theories share a belief that human languages could be exhaustively described by interconnected constructions which integrate forms and meanings and are stored in an inventory (Bates and MacWhinney, 1987; Langacker, 1987; Goldberg, 1995, 2003; Croft, 2001; Croft and Cruse, 2004; Tomasello, 2003; Robinson and Ellis, 2008). These constructions, which relate the observable properties of their morphological, lexical, or syntactic forms to specific semantic, pragmatic, or discourse functions, exist at multiple levels of linguistic descriptions — morphemes, words, idioms, as well as phrasal constructions. In this way, the distinction between lexicon and grammar is blurred — both of them are viewed as learnable symbolic links between forms and meanings, emerging and evolving in specific contexts.",
|
| 449 |
+
"bbox": [
|
| 450 |
+
505,
|
| 451 |
+
437,
|
| 452 |
+
884,
|
| 453 |
+
743
|
| 454 |
+
],
|
| 455 |
+
"page_idx": 1
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"type": "text",
|
| 459 |
+
"text": "We argue that these features of constructivism make it particularly well-suited to addressing the challenges of modeling syntactico-semantic derivation in ESFL. First, the constructivist approach offers a framework for understanding how ESFL speakers compose meaning. By addressing irregularities through a continually expanding inventory of form-meaning pairings and using constructions — spanning varying levels of complexity and generality — as structural templates, it accommodates both the idiosyncrasies and the compositionality of",
|
| 460 |
+
"bbox": [
|
| 461 |
+
505,
|
| 462 |
+
744,
|
| 463 |
+
884,
|
| 464 |
+
921
|
| 465 |
+
],
|
| 466 |
+
"page_idx": 1
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "page_number",
|
| 470 |
+
"text": "24396",
|
| 471 |
+
"bbox": [
|
| 472 |
+
475,
|
| 473 |
+
927,
|
| 474 |
+
524,
|
| 475 |
+
940
|
| 476 |
+
],
|
| 477 |
+
"page_idx": 1
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"type": "image",
|
| 481 |
+
"img_path": "images/9a2d661595e98381291703966db5faa8c73a3387d304d7d851cdb9425d169cff.jpg",
|
| 482 |
+
"image_caption": [
|
| 483 |
+
"Figure 2: Construction of ESFL sembank, including input/output data (in yellow), associated sources (in green), technical operations (in blue) and workflow."
|
| 484 |
+
],
|
| 485 |
+
"image_footnote": [],
|
| 486 |
+
"bbox": [
|
| 487 |
+
124,
|
| 488 |
+
80,
|
| 489 |
+
873,
|
| 490 |
+
282
|
| 491 |
+
],
|
| 492 |
+
"page_idx": 2
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"type": "text",
|
| 496 |
+
"text": "ESFL. Additionally, as a context-sensitive framework, the constructivism encourages a more flexible capturing of ESFL semantics, allowing it to emerge naturally from real usage. This fosters greater tolerance for so-called \"errors\" in ESFL.",
|
| 497 |
+
"bbox": [
|
| 498 |
+
112,
|
| 499 |
+
347,
|
| 500 |
+
487,
|
| 501 |
+
429
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 2
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "2.2 Formalism",
|
| 508 |
+
"text_level": 1,
|
| 509 |
+
"bbox": [
|
| 510 |
+
112,
|
| 511 |
+
441,
|
| 512 |
+
247,
|
| 513 |
+
455
|
| 514 |
+
],
|
| 515 |
+
"page_idx": 2
|
| 516 |
+
},
|
| 517 |
+
{
|
| 518 |
+
"type": "text",
|
| 519 |
+
"text": "The Synchronous Hyperedge Replacement Grammar (SHRG), which captures mappings between two structured representations, is employed to model the constructivist syntax-semantics interface. Each construction is represented by an SHRG rule, which consists of a Context Free Grammar (CFG) for syntax and an Hyperedge Replacement Grammar (HRG) for semantics. The rewriting formalism of SHRG models how syntax and semantics are constructed synchronously.",
|
| 520 |
+
"bbox": [
|
| 521 |
+
112,
|
| 522 |
+
464,
|
| 523 |
+
487,
|
| 524 |
+
625
|
| 525 |
+
],
|
| 526 |
+
"page_idx": 2
|
| 527 |
+
},
|
| 528 |
+
{
|
| 529 |
+
"type": "text",
|
| 530 |
+
"text": "Context Free Grammar CFG is utilized to represent syntactic constructions. Formally speaking, it is a 4-tuple $C = (N, \\Sigma, P, S)$ : (i) $N$ is a finite set of non-terminal symbols; (ii) $\\Sigma$ is a finite set of terminal symbols that are disjoint from $N$ ; (iii) $P$ is a finite set of rewriting rules in the form $A \\rightarrow \\beta$ , where $A \\in N$ and $\\beta$ is a string of terminals or non-terminals ( $\\beta$ can be empty); (iv) $S$ is the start symbol and $S \\in N$ . The derivation of the syntax can be done by successively applying the rewriting rules in the set $P$ to non-terminal nodes.",
|
| 531 |
+
"bbox": [
|
| 532 |
+
112,
|
| 533 |
+
636,
|
| 534 |
+
489,
|
| 535 |
+
812
|
| 536 |
+
],
|
| 537 |
+
"page_idx": 2
|
| 538 |
+
},
|
| 539 |
+
{
|
| 540 |
+
"type": "text",
|
| 541 |
+
"text": "Edge-labeled and Directed Hypergraph Semantics is represented by the edge-labeled and directed hypergraph. It is formally defined as $G = (V, E, L, l, X)$ , where (i) $V$ is a finite set of vertices; (ii) $E$ is a finite set of hyperedges and each hyperedge is represented as an ordered tuple of ver",
|
| 542 |
+
"bbox": [
|
| 543 |
+
112,
|
| 544 |
+
824,
|
| 545 |
+
489,
|
| 546 |
+
921
|
| 547 |
+
],
|
| 548 |
+
"page_idx": 2
|
| 549 |
+
},
|
| 550 |
+
{
|
| 551 |
+
"type": "text",
|
| 552 |
+
"text": "tices from $V$ ; (iii) $L$ is a finite set of labels; (iv) $l$ is a mapping from $E$ to the finite set $L$ , denoted as $l: E \\to L$ ; (v) $X \\in V^{*}$ defines an ordered list of nodes called external nodes, which specify the docking points during graph rewriting.",
|
| 553 |
+
"bbox": [
|
| 554 |
+
507,
|
| 555 |
+
347,
|
| 556 |
+
882,
|
| 557 |
+
429
|
| 558 |
+
],
|
| 559 |
+
"page_idx": 2
|
| 560 |
+
},
|
| 561 |
+
{
|
| 562 |
+
"type": "text",
|
| 563 |
+
"text": "Hyperedge Replacement Grammar HRG specifies the stepwise substitution of non-terminal symbols in the hypergraph with corresponding hypergraphs. Formally speaking, HRG is a 4-tuple $H = (N, \\Sigma, P, S)$ : (i) $N$ is a finite set of non-terminal symbols; (ii) $\\Sigma$ is a finite set of terminal symbols (disjoint from $N$ ); (iii) $P$ is a finite set of hyperedge replacement rules, each rule of the form $A \\to G$ , where $A \\in N$ , and $G$ is a hypergraph with edge labels over $N \\cup \\Sigma$ ( $G$ can be empty); (iv) $S$ is the start symbol and $S \\in N$ .",
|
| 564 |
+
"bbox": [
|
| 565 |
+
507,
|
| 566 |
+
439,
|
| 567 |
+
882,
|
| 568 |
+
617
|
| 569 |
+
],
|
| 570 |
+
"page_idx": 2
|
| 571 |
+
},
|
| 572 |
+
{
|
| 573 |
+
"type": "text",
|
| 574 |
+
"text": "Synchronous Hyperedge Replacement Grammar HRG can be extended to SHRG which provides a formal mechanism governing both the individual replacement of each structured representation and their synchronization. SHRG is defined as a 6-tuple $R = (N, \\Sigma, P, S, Q, \\Delta)$ , and compared to HRG, its new elements include (i) $Q$ is a finite set of non-terminal symbols for the second structured representation and (ii) $\\Delta$ is a set of synchronization rules, specifying the replacement rules in the two structures and how these rules are related.",
|
| 575 |
+
"bbox": [
|
| 576 |
+
507,
|
| 577 |
+
627,
|
| 578 |
+
882,
|
| 579 |
+
804
|
| 580 |
+
],
|
| 581 |
+
"page_idx": 2
|
| 582 |
+
},
|
| 583 |
+
{
|
| 584 |
+
"type": "text",
|
| 585 |
+
"text": "2.3 Informal Illustration",
|
| 586 |
+
"text_level": 1,
|
| 587 |
+
"bbox": [
|
| 588 |
+
507,
|
| 589 |
+
818,
|
| 590 |
+
719,
|
| 591 |
+
832
|
| 592 |
+
],
|
| 593 |
+
"page_idx": 2
|
| 594 |
+
},
|
| 595 |
+
{
|
| 596 |
+
"type": "text",
|
| 597 |
+
"text": "We illustrate our SHRG-based syntax—semantics interface with Example 1c. Figure 3 presents its form, the CFG tree $C$ , alongside its meaning, represented as an edge-labeled directed hypergraph $H$ following the ERS framework.",
|
| 598 |
+
"bbox": [
|
| 599 |
+
507,
|
| 600 |
+
841,
|
| 601 |
+
882,
|
| 602 |
+
921
|
| 603 |
+
],
|
| 604 |
+
"page_idx": 2
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"type": "page_number",
|
| 608 |
+
"text": "24397",
|
| 609 |
+
"bbox": [
|
| 610 |
+
475,
|
| 611 |
+
927,
|
| 612 |
+
524,
|
| 613 |
+
940
|
| 614 |
+
],
|
| 615 |
+
"page_idx": 2
|
| 616 |
+
},
|
| 617 |
+
{
|
| 618 |
+
"type": "image",
|
| 619 |
+
"img_path": "images/c7561ffcf2dea95b744ac9738d5f0c2c7568f30807c65bd6af900309f574bd8a.jpg",
|
| 620 |
+
"image_caption": [
|
| 621 |
+
"Figure 3: Form and meaning of visit often Paris"
|
| 622 |
+
],
|
| 623 |
+
"image_footnote": [],
|
| 624 |
+
"bbox": [
|
| 625 |
+
122,
|
| 626 |
+
82,
|
| 627 |
+
485,
|
| 628 |
+
177
|
| 629 |
+
],
|
| 630 |
+
"page_idx": 3
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"type": "text",
|
| 634 |
+
"text": "Table 1 lists SHRG rules for this example. Each row pairs two rules — a CFG rule $A \\rightarrow \\beta$ for rewriting syntax and an HRG rule $A \\rightarrow G$ for rewriting semantics. They are linked through the shared left-hand side label $A$ . Using these rules, syntactic and semantic representations of visit often Paris can be constructed synchronously (see Figure 4). For the syntax, the derivation begins with the terminals. Production rules of the form $A \\rightarrow \\beta$ are applied iteratively to derive non-terminals until the start symbol is reached. Correspondingly, semantics is derived by using a parallel HRG rule $A \\rightarrow G$ which shares the left-hand side label with the CFG rule. A hyperedge $e$ in $G$ is rewritten if $e$ has a label $n$ which is a non-terminal symbol of $C$ . In this operation, $e$ is removed from $G$ , and a copy of the previously derived hypergraph $H$ , whose left-hand side label is $n$ , is inserted into $G$ . The external nodes $X$ of $H$ are fused with the nodes connected by $e$ , while other hyperedges in $G$ remain unchanged.",
|
| 635 |
+
"bbox": [
|
| 636 |
+
112,
|
| 637 |
+
237,
|
| 638 |
+
489,
|
| 639 |
+
577
|
| 640 |
+
],
|
| 641 |
+
"page_idx": 3
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "image",
|
| 645 |
+
"img_path": "images/d4989cc64362644dffb29f2f13b07996342a78a3e4190147e65b5674905b441c.jpg",
|
| 646 |
+
"image_caption": [
|
| 647 |
+
"Table 1: Induced SHRG rules for visit often Paris. Filled nodes in HRG are external nodes."
|
| 648 |
+
],
|
| 649 |
+
"image_footnote": [],
|
| 650 |
+
"bbox": [
|
| 651 |
+
119,
|
| 652 |
+
596,
|
| 653 |
+
487,
|
| 654 |
+
858
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 3
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "image",
|
| 660 |
+
"img_path": "images/7205c6c7b828ea03e257670130440d93275b035c09ba6f125d5ebd3d3e3384ae.jpg",
|
| 661 |
+
"image_caption": [
|
| 662 |
+
"Figure 4: Synchronous construction of syntax and semantics for visit often Paris."
|
| 663 |
+
],
|
| 664 |
+
"image_footnote": [],
|
| 665 |
+
"bbox": [
|
| 666 |
+
547,
|
| 667 |
+
80,
|
| 668 |
+
852,
|
| 669 |
+
363
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 3
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "text",
|
| 675 |
+
"text": "2.4 Comparison",
|
| 676 |
+
"text_level": 1,
|
| 677 |
+
"bbox": [
|
| 678 |
+
507,
|
| 679 |
+
429,
|
| 680 |
+
653,
|
| 681 |
+
445
|
| 682 |
+
],
|
| 683 |
+
"page_idx": 3
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "text",
|
| 687 |
+
"text": "We argue that compared to the lexicalist approach, the constructivist framework offers greater flexibility and efficiency in addressing the challenges that \"errors\" pose to the syntax-semantics interface of ESFL. Taking 1c as an example, within a constructivist view, its transposition \"error\" can be accounted for by a constructional schema, where the CFG rule allows for post-verbal adverb attachment, while the corresponding HRG rule ensures that the adverb takes the verb as its first argument. This solution is straightforward as it simply adapts existing rules rather than introducing new ones. In contrast, lexicalist solutions such as Combinatory Categorical Grammar (CCG; Steedman, 1987, 2000) seems more inflexible and complex (see Figure 5). It treats lexical items — each associated with a set of syntactic-semantic features — as the fundamental building blocks of language, so the \"error\" could only be resolved by introducing a new lexical entry for often. Moreover, compared to the constructivist approach which allows for the synchronous construction of syntax-semantics representations, this lexicalist approach requires prior syntactic application for semantic derivation, which may decrease efficiency in modeling ESFL.",
|
| 688 |
+
"bbox": [
|
| 689 |
+
505,
|
| 690 |
+
450,
|
| 691 |
+
884,
|
| 692 |
+
853
|
| 693 |
+
],
|
| 694 |
+
"page_idx": 3
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"type": "text",
|
| 698 |
+
"text": "3 ESFL SemBank",
|
| 699 |
+
"text_level": 1,
|
| 700 |
+
"bbox": [
|
| 701 |
+
507,
|
| 702 |
+
864,
|
| 703 |
+
684,
|
| 704 |
+
879
|
| 705 |
+
],
|
| 706 |
+
"page_idx": 3
|
| 707 |
+
},
|
| 708 |
+
{
|
| 709 |
+
"type": "text",
|
| 710 |
+
"text": "We apply the SHRG-based syntax-semantics interface to ESFL data, resulting a syntactico-semantic",
|
| 711 |
+
"bbox": [
|
| 712 |
+
507,
|
| 713 |
+
889,
|
| 714 |
+
882,
|
| 715 |
+
921
|
| 716 |
+
],
|
| 717 |
+
"page_idx": 3
|
| 718 |
+
},
|
| 719 |
+
{
|
| 720 |
+
"type": "page_number",
|
| 721 |
+
"text": "24398",
|
| 722 |
+
"bbox": [
|
| 723 |
+
475,
|
| 724 |
+
927,
|
| 725 |
+
524,
|
| 726 |
+
940
|
| 727 |
+
],
|
| 728 |
+
"page_idx": 3
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"type": "image",
|
| 732 |
+
"img_path": "images/fb99c5b599efb801a982220d62f941ab0044de903bce4b5763ebd21dbc8522bd.jpg",
|
| 733 |
+
"image_caption": [
|
| 734 |
+
"Figure 5: a lexicalist solution in CCG-style. To solve the transposition error, often, is assigned a new category."
|
| 735 |
+
],
|
| 736 |
+
"image_footnote": [],
|
| 737 |
+
"bbox": [
|
| 738 |
+
216,
|
| 739 |
+
79,
|
| 740 |
+
781,
|
| 741 |
+
146
|
| 742 |
+
],
|
| 743 |
+
"page_idx": 4
|
| 744 |
+
},
|
| 745 |
+
{
|
| 746 |
+
"type": "text",
|
| 747 |
+
"text": "ESFL SemBank. Generally speaking, its development involves three main steps:",
|
| 748 |
+
"bbox": [
|
| 749 |
+
112,
|
| 750 |
+
195,
|
| 751 |
+
489,
|
| 752 |
+
227
|
| 753 |
+
],
|
| 754 |
+
"page_idx": 4
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"type": "list",
|
| 758 |
+
"sub_type": "text",
|
| 759 |
+
"list_items": [
|
| 760 |
+
"- Selection of Holistic Graphs: silver semantic graphs from Zhao et al. (2020) are manually labeled as accepted or rejected.",
|
| 761 |
+
"- Extraction and Modification of Composition Rules: accepted graphs are stored for the extraction of SHRG rules, while rejected ones undergo further refinement.",
|
| 762 |
+
"- Selection of Composition Rules: semantics of unparsable ESFL sentences in Zhao et al. (2020) is derived through manual selection of composition rules."
|
| 763 |
+
],
|
| 764 |
+
"bbox": [
|
| 765 |
+
136,
|
| 766 |
+
241,
|
| 767 |
+
487,
|
| 768 |
+
445
|
| 769 |
+
],
|
| 770 |
+
"page_idx": 4
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"type": "text",
|
| 774 |
+
"text": "3.1 Selection of Holistic Graphs",
|
| 775 |
+
"text_level": 1,
|
| 776 |
+
"bbox": [
|
| 777 |
+
112,
|
| 778 |
+
458,
|
| 779 |
+
379,
|
| 780 |
+
474
|
| 781 |
+
],
|
| 782 |
+
"page_idx": 4
|
| 783 |
+
},
|
| 784 |
+
{
|
| 785 |
+
"type": "text",
|
| 786 |
+
"text": "We start by manually categorizing holistic ESFL semantic graphs, silver outputs from Zhao et al. $(2020)^{2}$ , into accept and reject ones. This process ensures a reliable foundation for our sembank and facilitates the creation of a core inventory of reusable rules. The annotation is detailed below.",
|
| 787 |
+
"bbox": [
|
| 788 |
+
112,
|
| 789 |
+
481,
|
| 790 |
+
489,
|
| 791 |
+
577
|
| 792 |
+
],
|
| 793 |
+
"page_idx": 4
|
| 794 |
+
},
|
| 795 |
+
{
|
| 796 |
+
"type": "text",
|
| 797 |
+
"text": "Materials The original annotated data is drawn from the FCE dataset (Yannakoudakis et al., 2011), which includes essays written by upper-intermediate English learners, along with corrections by native English speakers. Building on the FCE data, Berzak et al. (2016) provide annotations of part-of-speech (POS) tags and syntactic dependencies within the Universal Dependencies (Nivre et al., 2016; de Marneffte et al., 2014) framework for both ESFL sentences and corrected ones (CESFL), resulting in the Treebank of Learner English (TLE). Extending this work, Zhao et al. (2020) create a semantic resource: they parse both ESFL and CESFL sentences in the FCE dataset using an ERG-based processor, ACE parser $^3$ and apply a reranking model to automatically select the most accurate",
|
| 798 |
+
"bbox": [
|
| 799 |
+
112,
|
| 800 |
+
589,
|
| 801 |
+
489,
|
| 802 |
+
847
|
| 803 |
+
],
|
| 804 |
+
"page_idx": 4
|
| 805 |
+
},
|
| 806 |
+
{
|
| 807 |
+
"type": "text",
|
| 808 |
+
"text": "parse based on alignment with TLE's syntactic annotations. These silver-standard semantic graphs then serve as the material for our manual selection process.",
|
| 809 |
+
"bbox": [
|
| 810 |
+
507,
|
| 811 |
+
195,
|
| 812 |
+
884,
|
| 813 |
+
259
|
| 814 |
+
],
|
| 815 |
+
"page_idx": 4
|
| 816 |
+
},
|
| 817 |
+
{
|
| 818 |
+
"type": "text",
|
| 819 |
+
"text": "Procedure To begin, a team consisting of one Ph.D. student and two undergraduate majoring in linguistics undertakes training in English Resource Semantics (ERS; Flickinger et al., 2014b). ERS is a semantic framework derived from the English Resource Grammar (ERG; Flickinger, 2000) within Head-driven Phrase Structure Grammar (HPSG; Pollard and Sag, 1994). This training is essential because the previously parsed semantic graphs are represented using this framework.",
|
| 820 |
+
"bbox": [
|
| 821 |
+
507,
|
| 822 |
+
281,
|
| 823 |
+
884,
|
| 824 |
+
441
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 4
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "text",
|
| 830 |
+
"text": "Subsequently, the annotators use DeepBank (Flickinger et al., 2012), an ERS annotation resource that effectively handles diverse linguistic phenomena in English and accurately represents their semantic interpretations, as a reference. They assess whether the graphs provided by Zhao et al. (2020) accurately capture semantics of ESFL. For each graph, they assign labels such as accept, reject and abandon. The abandon label is used when the accuracy of a semantic graph cannot be determined because of insufficient context.",
|
| 831 |
+
"bbox": [
|
| 832 |
+
507,
|
| 833 |
+
445,
|
| 834 |
+
882,
|
| 835 |
+
621
|
| 836 |
+
],
|
| 837 |
+
"page_idx": 4
|
| 838 |
+
},
|
| 839 |
+
{
|
| 840 |
+
"type": "text",
|
| 841 |
+
"text": "Once the three annotators achieve a high level of inter-annotator agreement (IAA) through several rounds of training, comparison and discussion, the process becomes more efficient: some of the remaining instances are randomly assigned to two annotators for cross-validation, while others are annotated by a single annotator.",
|
| 842 |
+
"bbox": [
|
| 843 |
+
507,
|
| 844 |
+
626,
|
| 845 |
+
882,
|
| 846 |
+
739
|
| 847 |
+
],
|
| 848 |
+
"page_idx": 4
|
| 849 |
+
},
|
| 850 |
+
{
|
| 851 |
+
"type": "text",
|
| 852 |
+
"text": "Quality This paper utilizes percentage inter-annotator agreement (IAA) to assess the quality of our annotations. As shown in Table 2, our three annotators achieve an exceptionally high IAA, exceeding $99\\%$ . For the sentences that are double-annotated, the IAAs fluctuate between $97\\%$ and $99\\%$ . These high-level agreements indicate a strong consensus among our annotators regarding the semantic interpretation of the ESFL sentences represented within the ERS framework.",
|
| 853 |
+
"bbox": [
|
| 854 |
+
507,
|
| 855 |
+
760,
|
| 856 |
+
884,
|
| 857 |
+
919
|
| 858 |
+
],
|
| 859 |
+
"page_idx": 4
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"type": "page_footnote",
|
| 863 |
+
"text": "$^{2}$ Zhao et al. (2020) parsed ESFL sentences using an English-based parser, with outputs reranked based on alignment with syntactic annotations from the Treebank of Learner English (TLE; Berzak et al., 2016). \n $^{3}$ https://sweaglesw.org/linguistics/ace/",
|
| 864 |
+
"bbox": [
|
| 865 |
+
112,
|
| 866 |
+
857,
|
| 867 |
+
487,
|
| 868 |
+
920
|
| 869 |
+
],
|
| 870 |
+
"page_idx": 4
|
| 871 |
+
},
|
| 872 |
+
{
|
| 873 |
+
"type": "page_number",
|
| 874 |
+
"text": "24399",
|
| 875 |
+
"bbox": [
|
| 876 |
+
475,
|
| 877 |
+
927,
|
| 878 |
+
524,
|
| 879 |
+
940
|
| 880 |
+
],
|
| 881 |
+
"page_idx": 4
|
| 882 |
+
},
|
| 883 |
+
{
|
| 884 |
+
"type": "table",
|
| 885 |
+
"img_path": "images/e6f9564f105638494bed77fce9a5b708710163a4f58a727f444525926dbb3841.jpg",
|
| 886 |
+
"table_caption": [],
|
| 887 |
+
"table_footnote": [],
|
| 888 |
+
"table_body": "<table><tr><td></td><td>ESFL</td><td>CEFSL</td></tr><tr><td>Anno1-Anno2-Anno3</td><td>99.29</td><td>99.48</td></tr><tr><td>Anno1-Anno2</td><td>98.95</td><td>98.19</td></tr><tr><td>Anno1-Anno3</td><td>97.82</td><td>98.77</td></tr><tr><td>Anno2-Anno2</td><td>98.28</td><td>99.12</td></tr></table>",
|
| 889 |
+
"bbox": [
|
| 890 |
+
157,
|
| 891 |
+
80,
|
| 892 |
+
450,
|
| 893 |
+
170
|
| 894 |
+
],
|
| 895 |
+
"page_idx": 5
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"type": "text",
|
| 899 |
+
"text": "Result We annotate 1567 ESFL and 2189 CESFL sentences in total. After excluding records with inconsistent or abandon tags, 1543 ESFL and 2138 CESFL sentences remain valid. Table 3 shows the label distribution for these valid sentences: $46.92\\%$ of ESFL sentences are accepted and $53.08\\%$ rejected, while $61.04\\%$ of CESFL sentences are accepted and $38.96\\%$ rejected.",
|
| 900 |
+
"bbox": [
|
| 901 |
+
112,
|
| 902 |
+
234,
|
| 903 |
+
489,
|
| 904 |
+
363
|
| 905 |
+
],
|
| 906 |
+
"page_idx": 5
|
| 907 |
+
},
|
| 908 |
+
{
|
| 909 |
+
"type": "table",
|
| 910 |
+
"img_path": "images/438c9f38ecbd365b89ee05e08b814ed46552f5271ae48946dc1c40805bfb1f58.jpg",
|
| 911 |
+
"table_caption": [
|
| 912 |
+
"Table 2: Inter-annotator agreements (IAAs) of triple-annotated or double-annotated sentences."
|
| 913 |
+
],
|
| 914 |
+
"table_footnote": [],
|
| 915 |
+
"table_body": "<table><tr><td></td><td colspan=\"2\">ESL</td><td colspan=\"2\">CESL</td></tr><tr><td></td><td>#num</td><td>#per</td><td>#num</td><td>#per</td></tr><tr><td>Triple-acc</td><td>64</td><td>45.71%</td><td>129</td><td>66.84%</td></tr><tr><td>Triple-rej</td><td>76</td><td>54.28%</td><td>64</td><td>33.16%</td></tr><tr><td>Triple-all</td><td>140</td><td>100.00%</td><td>193</td><td>100.00%</td></tr><tr><td>Double-acc</td><td>586</td><td>46.03%</td><td>1051</td><td>59.65%</td></tr><tr><td>Double-rej</td><td>687</td><td>53.97%</td><td>711</td><td>40.35%</td></tr><tr><td>Double-all</td><td>1273</td><td>100.00%</td><td>1762</td><td>100.00%</td></tr><tr><td>Single-acc</td><td>74</td><td>56.92%</td><td>125</td><td>68.31%</td></tr><tr><td>Single-rej</td><td>56</td><td>43.08%</td><td>58</td><td>31.69%</td></tr><tr><td>Single-all</td><td>130</td><td>100.00%</td><td>183</td><td>100.00%</td></tr><tr><td>Overall-acc</td><td>724</td><td>46.92%</td><td>1305</td><td>61.04%</td></tr><tr><td>Overall-rej</td><td>819</td><td>53.08%</td><td>833</td><td>38.96%</td></tr><tr><td>Overall-all</td><td>1543</td><td>100.00%</td><td>2138</td><td>100.00%</td></tr></table>",
|
| 916 |
+
"bbox": [
|
| 917 |
+
119,
|
| 918 |
+
375,
|
| 919 |
+
485,
|
| 920 |
+
612
|
| 921 |
+
],
|
| 922 |
+
"page_idx": 5
|
| 923 |
+
},
|
| 924 |
+
{
|
| 925 |
+
"type": "text",
|
| 926 |
+
"text": "Table 3: Numbers (#num) and percentages (#per) of valid sentences whose semantic graphs accepted (acc) or rejected (rej) by three, two, or one annotators.",
|
| 927 |
+
"bbox": [
|
| 928 |
+
112,
|
| 929 |
+
621,
|
| 930 |
+
487,
|
| 931 |
+
665
|
| 932 |
+
],
|
| 933 |
+
"page_idx": 5
|
| 934 |
+
},
|
| 935 |
+
{
|
| 936 |
+
"type": "text",
|
| 937 |
+
"text": "3.2 Extraction and Modification of Composition Rules",
|
| 938 |
+
"text_level": 1,
|
| 939 |
+
"bbox": [
|
| 940 |
+
112,
|
| 941 |
+
693,
|
| 942 |
+
403,
|
| 943 |
+
724
|
| 944 |
+
],
|
| 945 |
+
"page_idx": 5
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"type": "text",
|
| 949 |
+
"text": "We decompose all graphs into compositional constructions represented by SHRG rules (§3.2.1) and modify a few problematic components in rejected graphs to \"salvage\" them (§3.2.2).",
|
| 950 |
+
"bbox": [
|
| 951 |
+
112,
|
| 952 |
+
730,
|
| 953 |
+
487,
|
| 954 |
+
794
|
| 955 |
+
],
|
| 956 |
+
"page_idx": 5
|
| 957 |
+
},
|
| 958 |
+
{
|
| 959 |
+
"type": "text",
|
| 960 |
+
"text": "3.2.1 Extraction",
|
| 961 |
+
"text_level": 1,
|
| 962 |
+
"bbox": [
|
| 963 |
+
112,
|
| 964 |
+
804,
|
| 965 |
+
258,
|
| 966 |
+
819
|
| 967 |
+
],
|
| 968 |
+
"page_idx": 5
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"type": "text",
|
| 972 |
+
"text": "Pre-processing Before extracting SHRG rules, we reference the parsing results from the ACE parser in Zhao et al. (2020) to retrieve phrase structures in the Penn Treebank (PTB) style.",
|
| 973 |
+
"bbox": [
|
| 974 |
+
112,
|
| 975 |
+
824,
|
| 976 |
+
487,
|
| 977 |
+
888
|
| 978 |
+
],
|
| 979 |
+
"page_idx": 5
|
| 980 |
+
},
|
| 981 |
+
{
|
| 982 |
+
"type": "text",
|
| 983 |
+
"text": "As shown in Figure 6, even though the retrieved trees, compared to the original HPSG derivation",
|
| 984 |
+
"bbox": [
|
| 985 |
+
112,
|
| 986 |
+
889,
|
| 987 |
+
487,
|
| 988 |
+
921
|
| 989 |
+
],
|
| 990 |
+
"page_idx": 5
|
| 991 |
+
},
|
| 992 |
+
{
|
| 993 |
+
"type": "text",
|
| 994 |
+
"text": "trees, involve only the renaming of non-terminal nodes without altering the structural configuration, the pre-processing is of great importance. This is because in a lexicalist framework like HPSG, derivation trees are not themselves objects of grammatical description; their nodes and edges merely indicate which constituents are combined and how their syntactico-semantic information is composed. Constituents, each associated with a syntactico-semantic feature structure, serve as the fundamental building blocks of grammatical description. However, this processing style contrasts with the constructivist perspective, which asserts that grammatical schemata are an essential component of linguistic competence. From this viewpoint, adopting a more general and coarse-grained PTB-style node set becomes essential. Within this context, trees can be genuinely regarded as a component of grammar, representing an interconnected system of systematically learnable symbolic mappings between forms and meanings.",
|
| 995 |
+
"bbox": [
|
| 996 |
+
507,
|
| 997 |
+
84,
|
| 998 |
+
884,
|
| 999 |
+
422
|
| 1000 |
+
],
|
| 1001 |
+
"page_idx": 5
|
| 1002 |
+
},
|
| 1003 |
+
{
|
| 1004 |
+
"type": "image",
|
| 1005 |
+
"img_path": "images/de51791c9359c8a6833ab7d1a32de1be9ae282910e9fb1f0227d96532aaaba55.jpg",
|
| 1006 |
+
"image_caption": [
|
| 1007 |
+
"Figure 6: An HPSG derivation tree and its the corresponding PTB-style syntactic analysis."
|
| 1008 |
+
],
|
| 1009 |
+
"image_footnote": [],
|
| 1010 |
+
"bbox": [
|
| 1011 |
+
539,
|
| 1012 |
+
434,
|
| 1013 |
+
850,
|
| 1014 |
+
518
|
| 1015 |
+
],
|
| 1016 |
+
"page_idx": 5
|
| 1017 |
+
},
|
| 1018 |
+
{
|
| 1019 |
+
"type": "text",
|
| 1020 |
+
"text": "Algorithm This paper largely follows the extraction algorithm proposed by Chen et al. (2018) to induce SHRG rules. As illustrated in Figure 7, SHRG rules are extracted iteratively by post-order traversal of the tree, linking each semantic subgraph to its corresponding syntactic tree based on shared span information from the surface string. We further distinguish nodes in the identified subgraph at each step: nodes with all connected hyperedges within the subgraph are classified as internal, while others are external.",
|
| 1021 |
+
"bbox": [
|
| 1022 |
+
507,
|
| 1023 |
+
583,
|
| 1024 |
+
882,
|
| 1025 |
+
758
|
| 1026 |
+
],
|
| 1027 |
+
"page_idx": 5
|
| 1028 |
+
},
|
| 1029 |
+
{
|
| 1030 |
+
"type": "text",
|
| 1031 |
+
"text": "We argue that the extraction algorithm successfully achieves both comprehensiveness and flexibility. On the one hand, the algorithm ensures comprehensiveness by accounting for all elements: every constituent of the syntactic tree is either mapped to the overall semantic representation or explicitly identified as semantically vacuous. On the other hand, we adapt the original algorithm to allow edges in the semantic graphs not to exactly align with the spans of the syntactic tree nodes,",
|
| 1032 |
+
"bbox": [
|
| 1033 |
+
507,
|
| 1034 |
+
760,
|
| 1035 |
+
884,
|
| 1036 |
+
921
|
| 1037 |
+
],
|
| 1038 |
+
"page_idx": 5
|
| 1039 |
+
},
|
| 1040 |
+
{
|
| 1041 |
+
"type": "page_number",
|
| 1042 |
+
"text": "24400",
|
| 1043 |
+
"bbox": [
|
| 1044 |
+
475,
|
| 1045 |
+
927,
|
| 1046 |
+
524,
|
| 1047 |
+
940
|
| 1048 |
+
],
|
| 1049 |
+
"page_idx": 5
|
| 1050 |
+
},
|
| 1051 |
+
{
|
| 1052 |
+
"type": "image",
|
| 1053 |
+
"img_path": "images/675fcf39bd89b000b11b6b91be9f31653097ee87471e99521a067f99c26bf8fd.jpg",
|
| 1054 |
+
"image_caption": [
|
| 1055 |
+
"Figure 7: Extraction of SHRG rules for visit often Paris using post-order tree traversal. Edges in semantic graphs are identified through span alignment with syntactic nodes, forming subgraphs (colored). External nodes (solid) have connected edges outside the subgraph. LHS denotes shared left-hand side labels."
|
| 1056 |
+
],
|
| 1057 |
+
"image_footnote": [],
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
115,
|
| 1060 |
+
80,
|
| 1061 |
+
880,
|
| 1062 |
+
256
|
| 1063 |
+
],
|
| 1064 |
+
"page_idx": 6
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"type": "text",
|
| 1068 |
+
"text": "which enhance its flexibility for ESFL.",
|
| 1069 |
+
"bbox": [
|
| 1070 |
+
112,
|
| 1071 |
+
336,
|
| 1072 |
+
403,
|
| 1073 |
+
351
|
| 1074 |
+
],
|
| 1075 |
+
"page_idx": 6
|
| 1076 |
+
},
|
| 1077 |
+
{
|
| 1078 |
+
"type": "text",
|
| 1079 |
+
"text": "Inventory of SHRG Rules We apply the extraction algorithm to all ESFL and CESFL sentences, as well as to DeepBank, a resource of native English sentences. The SHRG rules induced from accepted sentences and DeepBank form a reference inventory, from which rules can be selected to modify the ill-formed fragments in decomposed rejected graphs. Table 4 presents the SHRG rule inventory induced from various datasets.",
|
| 1080 |
+
"bbox": [
|
| 1081 |
+
112,
|
| 1082 |
+
360,
|
| 1083 |
+
489,
|
| 1084 |
+
505
|
| 1085 |
+
],
|
| 1086 |
+
"page_idx": 6
|
| 1087 |
+
},
|
| 1088 |
+
{
|
| 1089 |
+
"type": "table",
|
| 1090 |
+
"img_path": "images/5b5824f8f1a17c729e6e3ca0e643c12b0fe4dd4b5b8e196cbe6010a58450f7a4.jpg",
|
| 1091 |
+
"table_caption": [],
|
| 1092 |
+
"table_footnote": [],
|
| 1093 |
+
"table_body": "<table><tr><td>Data Source</td><td>#original</td><td>#non-lexical</td></tr><tr><td>ESFL-accept</td><td>3538</td><td>1283</td></tr><tr><td>CESFL-accept</td><td>7185</td><td>3201</td></tr><tr><td>DeepBank</td><td>44187</td><td>20524</td></tr></table>",
|
| 1094 |
+
"bbox": [
|
| 1095 |
+
154,
|
| 1096 |
+
514,
|
| 1097 |
+
453,
|
| 1098 |
+
590
|
| 1099 |
+
],
|
| 1100 |
+
"page_idx": 6
|
| 1101 |
+
},
|
| 1102 |
+
{
|
| 1103 |
+
"type": "text",
|
| 1104 |
+
"text": "3.2.2 Modification",
|
| 1105 |
+
"text_level": 1,
|
| 1106 |
+
"bbox": [
|
| 1107 |
+
112,
|
| 1108 |
+
652,
|
| 1109 |
+
275,
|
| 1110 |
+
665
|
| 1111 |
+
],
|
| 1112 |
+
"page_idx": 6
|
| 1113 |
+
},
|
| 1114 |
+
{
|
| 1115 |
+
"type": "text",
|
| 1116 |
+
"text": "Building on the induced SHRG rules, we manually refine the composition rules for rejected ESFL semantic graphs. Broadly, we argue that the wide variety of form-meaning mappings in ESFL can be grouped into three categories, each of which can be effectively addressed by our constructivist approach.",
|
| 1117 |
+
"bbox": [
|
| 1118 |
+
112,
|
| 1119 |
+
671,
|
| 1120 |
+
487,
|
| 1121 |
+
785
|
| 1122 |
+
],
|
| 1123 |
+
"page_idx": 6
|
| 1124 |
+
},
|
| 1125 |
+
{
|
| 1126 |
+
"type": "text",
|
| 1127 |
+
"text": "Diversity of Grammatical Forms ESFL employs diverse grammatical forms to express grammatical meanings such as Number, Case, Tense, Aspect, Voice, and Agreement. It uses not only morphological markers typical of English, but also zero forms, word order, and functional words.",
|
| 1128 |
+
"bbox": [
|
| 1129 |
+
112,
|
| 1130 |
+
791,
|
| 1131 |
+
487,
|
| 1132 |
+
888
|
| 1133 |
+
],
|
| 1134 |
+
"page_idx": 6
|
| 1135 |
+
},
|
| 1136 |
+
{
|
| 1137 |
+
"type": "text",
|
| 1138 |
+
"text": "Consider Sentence 2 as an example. In this case, number — typically marked by the morphological",
|
| 1139 |
+
"bbox": [
|
| 1140 |
+
112,
|
| 1141 |
+
889,
|
| 1142 |
+
487,
|
| 1143 |
+
921
|
| 1144 |
+
],
|
| 1145 |
+
"page_idx": 6
|
| 1146 |
+
},
|
| 1147 |
+
{
|
| 1148 |
+
"type": "text",
|
| 1149 |
+
"text": "suffix -s in native English — is expressed by a zero form in ESFL. This frequently leads to parsing errors with the ACE parser, resulting in inaccurate analysis as shown by Figure 8.",
|
| 1150 |
+
"bbox": [
|
| 1151 |
+
507,
|
| 1152 |
+
336,
|
| 1153 |
+
882,
|
| 1154 |
+
400
|
| 1155 |
+
],
|
| 1156 |
+
"page_idx": 6
|
| 1157 |
+
},
|
| 1158 |
+
{
|
| 1159 |
+
"type": "text",
|
| 1160 |
+
"text": "(2) I was impressed when I heard that she liked playing puzzle alone.",
|
| 1161 |
+
"bbox": [
|
| 1162 |
+
515,
|
| 1163 |
+
405,
|
| 1164 |
+
882,
|
| 1165 |
+
437
|
| 1166 |
+
],
|
| 1167 |
+
"page_idx": 6
|
| 1168 |
+
},
|
| 1169 |
+
{
|
| 1170 |
+
"type": "image",
|
| 1171 |
+
"img_path": "images/e3fbef9b614fa06b3c1c2e99a94f433760489101a46e7f267f8f0dc945578ae2.jpg",
|
| 1172 |
+
"image_caption": [
|
| 1173 |
+
"(a) Original Syn"
|
| 1174 |
+
],
|
| 1175 |
+
"image_footnote": [],
|
| 1176 |
+
"bbox": [
|
| 1177 |
+
522,
|
| 1178 |
+
455,
|
| 1179 |
+
678,
|
| 1180 |
+
525
|
| 1181 |
+
],
|
| 1182 |
+
"page_idx": 6
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"type": "image",
|
| 1186 |
+
"img_path": "images/7d43880974b48faf71ead6df18e62a3b7711d60b5406a3420b9d113bffd806d8.jpg",
|
| 1187 |
+
"image_caption": [
|
| 1188 |
+
"(b) Original Sem",
|
| 1189 |
+
"Figure 8: Relevant parts of original syntactic trees and semantic graphs for Sentence 2."
|
| 1190 |
+
],
|
| 1191 |
+
"image_footnote": [],
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
685,
|
| 1194 |
+
458,
|
| 1195 |
+
863,
|
| 1196 |
+
527
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 6
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "table",
|
| 1202 |
+
"img_path": "images/74134207ffad385a694c6c86158a74feb3fc8081b0e2f8e65a334b9edbbd13dc.jpg",
|
| 1203 |
+
"table_caption": [
|
| 1204 |
+
"Table 4: Induced SHRG rules by dataset: original (total rules) and non-lexical (rules not for a single)."
|
| 1205 |
+
],
|
| 1206 |
+
"table_footnote": [],
|
| 1207 |
+
"table_body": "<table><tr><td>LHS</td><td>Nori</td><td>Vori</td><td>COMPmod</td><td>Nmod</td></tr><tr><td>Syn</td><td>that</td><td>puzzle</td><td>that</td><td>puzzle</td></tr><tr><td>Sem</td><td>-that_q_dem</td><td>puzzle_v_1</td><td>∅</td><td>_puzzle_n_1</td></tr></table>",
|
| 1208 |
+
"bbox": [
|
| 1209 |
+
515,
|
| 1210 |
+
613,
|
| 1211 |
+
880,
|
| 1212 |
+
697
|
| 1213 |
+
],
|
| 1214 |
+
"page_idx": 6
|
| 1215 |
+
},
|
| 1216 |
+
{
|
| 1217 |
+
"type": "text",
|
| 1218 |
+
"text": "Table 5: Original and modified rules for sentence 2.",
|
| 1219 |
+
"bbox": [
|
| 1220 |
+
519,
|
| 1221 |
+
706,
|
| 1222 |
+
870,
|
| 1223 |
+
721
|
| 1224 |
+
],
|
| 1225 |
+
"page_idx": 6
|
| 1226 |
+
},
|
| 1227 |
+
{
|
| 1228 |
+
"type": "text",
|
| 1229 |
+
"text": "Since this phenomenon involves determiners and often lacks clear markers of number, we address it using an SHRG rule with the abstract predicate udef_q, along with other relevant rules (see Table 5). These rules are then syntactically recombined to yield accurate semantic representations (see Figure 9). More broadly, adapting existing rules to accommodate such grammatical forms is a general strategy we employ.",
|
| 1230 |
+
"bbox": [
|
| 1231 |
+
507,
|
| 1232 |
+
736,
|
| 1233 |
+
882,
|
| 1234 |
+
881
|
| 1235 |
+
],
|
| 1236 |
+
"page_idx": 6
|
| 1237 |
+
},
|
| 1238 |
+
{
|
| 1239 |
+
"type": "text",
|
| 1240 |
+
"text": "Diversity of Syntactic Derivations ESFL may impose unique constraints on phenomena involving",
|
| 1241 |
+
"bbox": [
|
| 1242 |
+
507,
|
| 1243 |
+
889,
|
| 1244 |
+
882,
|
| 1245 |
+
921
|
| 1246 |
+
],
|
| 1247 |
+
"page_idx": 6
|
| 1248 |
+
},
|
| 1249 |
+
{
|
| 1250 |
+
"type": "page_number",
|
| 1251 |
+
"text": "24401",
|
| 1252 |
+
"bbox": [
|
| 1253 |
+
475,
|
| 1254 |
+
927,
|
| 1255 |
+
522,
|
| 1256 |
+
940
|
| 1257 |
+
],
|
| 1258 |
+
"page_idx": 6
|
| 1259 |
+
},
|
| 1260 |
+
{
|
| 1261 |
+
"type": "image",
|
| 1262 |
+
"img_path": "images/dd30cfe68b7b45fda7ab907f127bf124b4e8e7e998fe70e0d1fee831e5786b41.jpg",
|
| 1263 |
+
"image_caption": [
|
| 1264 |
+
"(a) Modified Syn"
|
| 1265 |
+
],
|
| 1266 |
+
"image_footnote": [],
|
| 1267 |
+
"bbox": [
|
| 1268 |
+
132,
|
| 1269 |
+
82,
|
| 1270 |
+
314,
|
| 1271 |
+
158
|
| 1272 |
+
],
|
| 1273 |
+
"page_idx": 7
|
| 1274 |
+
},
|
| 1275 |
+
{
|
| 1276 |
+
"type": "image",
|
| 1277 |
+
"img_path": "images/c8a86d3c12026caa5d3d0bee2863cfe5fe5796d8addb782fb6b61f6756d08bce.jpg",
|
| 1278 |
+
"image_caption": [
|
| 1279 |
+
"(b) Modified Sem"
|
| 1280 |
+
],
|
| 1281 |
+
"image_footnote": [],
|
| 1282 |
+
"bbox": [
|
| 1283 |
+
337,
|
| 1284 |
+
93,
|
| 1285 |
+
455,
|
| 1286 |
+
161
|
| 1287 |
+
],
|
| 1288 |
+
"page_idx": 7
|
| 1289 |
+
},
|
| 1290 |
+
{
|
| 1291 |
+
"type": "text",
|
| 1292 |
+
"text": "syntactic derivations, such as Binding, Ellipsis, and Filler-Gap constructions. Unlike generative grammar, which analyzes these phenomena as results of deep-structure operations like binding, deletion, or movement, our framework accounts for them through novel syntax-semantics mappings.",
|
| 1293 |
+
"bbox": [
|
| 1294 |
+
112,
|
| 1295 |
+
247,
|
| 1296 |
+
487,
|
| 1297 |
+
343
|
| 1298 |
+
],
|
| 1299 |
+
"page_idx": 7
|
| 1300 |
+
},
|
| 1301 |
+
{
|
| 1302 |
+
"type": "text",
|
| 1303 |
+
"text": "We illustrate this type of grammatical variation in ESFL with Sentence 3, which involves binding — a phenomenon concerning with constraints on anaphoric expressions such as pronouns and reflexives. According to binding theory (Chomsky, 1981, 1986), a reflexive in native English must be bound by the noun within its local domain. However, this constraint is more loosely applied in ESFL. In this example, the reflexive herself is interpreted as referring to Pat, rather than the grammatically appropriate antecedent my friends, thus violating standard binding principles and leading to problematic analysis (see Figure 10).",
|
| 1304 |
+
"bbox": [
|
| 1305 |
+
110,
|
| 1306 |
+
344,
|
| 1307 |
+
489,
|
| 1308 |
+
552
|
| 1309 |
+
],
|
| 1310 |
+
"page_idx": 7
|
| 1311 |
+
},
|
| 1312 |
+
{
|
| 1313 |
+
"type": "text",
|
| 1314 |
+
"text": "(3) At first, Pat denied all the things my friends told me about herself but she finally agreed with that.",
|
| 1315 |
+
"bbox": [
|
| 1316 |
+
119,
|
| 1317 |
+
560,
|
| 1318 |
+
487,
|
| 1319 |
+
606
|
| 1320 |
+
],
|
| 1321 |
+
"page_idx": 7
|
| 1322 |
+
},
|
| 1323 |
+
{
|
| 1324 |
+
"type": "image",
|
| 1325 |
+
"img_path": "images/d26b0ce8511633b2089d01e8a5420fc937ec9e8c890d2c9f05bec04c142f9cd7.jpg",
|
| 1326 |
+
"image_caption": [
|
| 1327 |
+
"(a) Original Syn"
|
| 1328 |
+
],
|
| 1329 |
+
"image_footnote": [],
|
| 1330 |
+
"bbox": [
|
| 1331 |
+
131,
|
| 1332 |
+
627,
|
| 1333 |
+
299,
|
| 1334 |
+
701
|
| 1335 |
+
],
|
| 1336 |
+
"page_idx": 7
|
| 1337 |
+
},
|
| 1338 |
+
{
|
| 1339 |
+
"type": "image",
|
| 1340 |
+
"img_path": "images/7da1caddf0ffa01f499d824d142ccfc9fad4e8bca837da4438903b1eb583065f.jpg",
|
| 1341 |
+
"image_caption": [
|
| 1342 |
+
"(b) Original Sem",
|
| 1343 |
+
"Figure 10: Relevant parts of original syntactic trees and semantic graphs for Sentence 3.",
|
| 1344 |
+
"Figure 12: Relevant parts of original syntactic trees and semantic graphs for Sentence 4."
|
| 1345 |
+
],
|
| 1346 |
+
"image_footnote": [],
|
| 1347 |
+
"bbox": [
|
| 1348 |
+
305,
|
| 1349 |
+
636,
|
| 1350 |
+
473,
|
| 1351 |
+
703
|
| 1352 |
+
],
|
| 1353 |
+
"page_idx": 7
|
| 1354 |
+
},
|
| 1355 |
+
{
|
| 1356 |
+
"type": "text",
|
| 1357 |
+
"text": "We utilize the SHRG rules detailed in Table 6 to resolve this discrepancy, and derive appropriate semantics as shown by Figure 11.",
|
| 1358 |
+
"bbox": [
|
| 1359 |
+
112,
|
| 1360 |
+
784,
|
| 1361 |
+
485,
|
| 1362 |
+
832
|
| 1363 |
+
],
|
| 1364 |
+
"page_idx": 7
|
| 1365 |
+
},
|
| 1366 |
+
{
|
| 1367 |
+
"type": "text",
|
| 1368 |
+
"text": "Diversity of Lexical Items ESFL also displays notable lexical variation, especially in verbs, whose argument structures — which govern both the number and realization of arguments — often diverge from those in standard English.",
|
| 1369 |
+
"bbox": [
|
| 1370 |
+
112,
|
| 1371 |
+
841,
|
| 1372 |
+
487,
|
| 1373 |
+
920
|
| 1374 |
+
],
|
| 1375 |
+
"page_idx": 7
|
| 1376 |
+
},
|
| 1377 |
+
{
|
| 1378 |
+
"type": "table",
|
| 1379 |
+
"img_path": "images/6d5aeb88bbcea00d3530ece7b48ffb01daafbfc19a4fc6f9fee0fc329e4eda3c.jpg",
|
| 1380 |
+
"table_caption": [],
|
| 1381 |
+
"table_footnote": [],
|
| 1382 |
+
"table_body": "<table><tr><td>LHS</td><td>PP/Nori</td><td>NPori</td><td>Pmod</td><td>PPmod</td></tr><tr><td>Syn</td><td>about</td><td>NP + NP</td><td>about</td><td>P + NP</td></tr><tr><td>Sem</td><td>∅</td><td>APPPOSARG1ARG2NPNP</td><td>_about_p</td><td>NPARG2NP</td></tr></table>",
|
| 1383 |
+
"bbox": [
|
| 1384 |
+
527,
|
| 1385 |
+
80,
|
| 1386 |
+
867,
|
| 1387 |
+
168
|
| 1388 |
+
],
|
| 1389 |
+
"page_idx": 7
|
| 1390 |
+
},
|
| 1391 |
+
{
|
| 1392 |
+
"type": "text",
|
| 1393 |
+
"text": "Table 6: Original and modified rules for example 3.",
|
| 1394 |
+
"bbox": [
|
| 1395 |
+
519,
|
| 1396 |
+
177,
|
| 1397 |
+
868,
|
| 1398 |
+
192
|
| 1399 |
+
],
|
| 1400 |
+
"page_idx": 7
|
| 1401 |
+
},
|
| 1402 |
+
{
|
| 1403 |
+
"type": "image",
|
| 1404 |
+
"img_path": "images/b30b47bf2dbda8179ea659af75dc329aecbe0d2e21e84aaa7e903c2a95a1a081.jpg",
|
| 1405 |
+
"image_caption": [
|
| 1406 |
+
"Figure 9: Relevant parts of modified syntactic trees and semantic graphs for Sentence 2.",
|
| 1407 |
+
"(a) Modified Syn"
|
| 1408 |
+
],
|
| 1409 |
+
"image_footnote": [],
|
| 1410 |
+
"bbox": [
|
| 1411 |
+
526,
|
| 1412 |
+
206,
|
| 1413 |
+
687,
|
| 1414 |
+
298
|
| 1415 |
+
],
|
| 1416 |
+
"page_idx": 7
|
| 1417 |
+
},
|
| 1418 |
+
{
|
| 1419 |
+
"type": "image",
|
| 1420 |
+
"img_path": "images/b6bbccb88c5e0b4e01e75c21dd59fffadf22d82f111edc472d380eaad19e47a4.jpg",
|
| 1421 |
+
"image_caption": [
|
| 1422 |
+
"(b) Modified Sem",
|
| 1423 |
+
"Figure 11: Relevant parts of modified syntactic trees and semantic graphs for sentence 3."
|
| 1424 |
+
],
|
| 1425 |
+
"image_footnote": [],
|
| 1426 |
+
"bbox": [
|
| 1427 |
+
700,
|
| 1428 |
+
233,
|
| 1429 |
+
855,
|
| 1430 |
+
300
|
| 1431 |
+
],
|
| 1432 |
+
"page_idx": 7
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"type": "text",
|
| 1436 |
+
"text": "For example, in Sentence 4, the verb enjoy lacks its required object, resulting in a different argument structure from that expected in native English. Such variations challenge the ACE parser, leading to inaccurate representations shown in Figure 12.",
|
| 1437 |
+
"bbox": [
|
| 1438 |
+
507,
|
| 1439 |
+
388,
|
| 1440 |
+
882,
|
| 1441 |
+
468
|
| 1442 |
+
],
|
| 1443 |
+
"page_idx": 7
|
| 1444 |
+
},
|
| 1445 |
+
{
|
| 1446 |
+
"type": "text",
|
| 1447 |
+
"text": "(4) I hope you can enjoy.",
|
| 1448 |
+
"bbox": [
|
| 1449 |
+
515,
|
| 1450 |
+
479,
|
| 1451 |
+
707,
|
| 1452 |
+
495
|
| 1453 |
+
],
|
| 1454 |
+
"page_idx": 7
|
| 1455 |
+
},
|
| 1456 |
+
{
|
| 1457 |
+
"type": "image",
|
| 1458 |
+
"img_path": "images/edce91f7d855875754cfa64bddab1121fd5c94853baacfd8be3badae02d6e294.jpg",
|
| 1459 |
+
"image_caption": [
|
| 1460 |
+
"(a) Original Syn"
|
| 1461 |
+
],
|
| 1462 |
+
"image_footnote": [],
|
| 1463 |
+
"bbox": [
|
| 1464 |
+
521,
|
| 1465 |
+
519,
|
| 1466 |
+
621,
|
| 1467 |
+
604
|
| 1468 |
+
],
|
| 1469 |
+
"page_idx": 7
|
| 1470 |
+
},
|
| 1471 |
+
{
|
| 1472 |
+
"type": "image",
|
| 1473 |
+
"img_path": "images/b67432ee532f69f2e13d005a18a6b74fd489c2321aa7287c8d692b2e98fe52c1.jpg",
|
| 1474 |
+
"image_caption": [
|
| 1475 |
+
"(b) Original Sem"
|
| 1476 |
+
],
|
| 1477 |
+
"image_footnote": [],
|
| 1478 |
+
"bbox": [
|
| 1479 |
+
638,
|
| 1480 |
+
538,
|
| 1481 |
+
882,
|
| 1482 |
+
605
|
| 1483 |
+
],
|
| 1484 |
+
"page_idx": 7
|
| 1485 |
+
},
|
| 1486 |
+
{
|
| 1487 |
+
"type": "text",
|
| 1488 |
+
"text": "To handle these discrepancies, we adapt or extend existing SHRG rules. Table 7 lists both the original and modified rules, and Figure 13 further shows the correct syntactic and semantic analysis after modifying SHRG rules correspondingly.",
|
| 1489 |
+
"bbox": [
|
| 1490 |
+
507,
|
| 1491 |
+
684,
|
| 1492 |
+
882,
|
| 1493 |
+
765
|
| 1494 |
+
],
|
| 1495 |
+
"page_idx": 7
|
| 1496 |
+
},
|
| 1497 |
+
{
|
| 1498 |
+
"type": "text",
|
| 1499 |
+
"text": "3.3 Selection of Composition Rules",
|
| 1500 |
+
"text_level": 1,
|
| 1501 |
+
"bbox": [
|
| 1502 |
+
507,
|
| 1503 |
+
777,
|
| 1504 |
+
800,
|
| 1505 |
+
793
|
| 1506 |
+
],
|
| 1507 |
+
"page_idx": 7
|
| 1508 |
+
},
|
| 1509 |
+
{
|
| 1510 |
+
"type": "text",
|
| 1511 |
+
"text": "The following details how we manually select composition rules from the SHRG inventory to generate syntactic-semantic representations for previously unparse sentences.",
|
| 1512 |
+
"bbox": [
|
| 1513 |
+
507,
|
| 1514 |
+
799,
|
| 1515 |
+
882,
|
| 1516 |
+
862
|
| 1517 |
+
],
|
| 1518 |
+
"page_idx": 7
|
| 1519 |
+
},
|
| 1520 |
+
{
|
| 1521 |
+
"type": "text",
|
| 1522 |
+
"text": "Material Zhao et al. (2020) reports that because of limit of the ACE parser and inconsistent tokenization, it successfully processes $52.50\\%$ ESFL",
|
| 1523 |
+
"bbox": [
|
| 1524 |
+
507,
|
| 1525 |
+
873,
|
| 1526 |
+
882,
|
| 1527 |
+
921
|
| 1528 |
+
],
|
| 1529 |
+
"page_idx": 7
|
| 1530 |
+
},
|
| 1531 |
+
{
|
| 1532 |
+
"type": "page_number",
|
| 1533 |
+
"text": "24402",
|
| 1534 |
+
"bbox": [
|
| 1535 |
+
475,
|
| 1536 |
+
927,
|
| 1537 |
+
524,
|
| 1538 |
+
940
|
| 1539 |
+
],
|
| 1540 |
+
"page_idx": 7
|
| 1541 |
+
},
|
| 1542 |
+
{
|
| 1543 |
+
"type": "table",
|
| 1544 |
+
"img_path": "images/3b066d85be20f37780dd7403a995ba8c1c9d2ddfda2829b6536d7943142ed134.jpg",
|
| 1545 |
+
"table_caption": [],
|
| 1546 |
+
"table_footnote": [],
|
| 1547 |
+
"table_body": "<table><tr><td>LHS</td><td>Nori</td><td>NPori</td><td>V/Nori</td><td>Sori</td></tr><tr><td>Syn</td><td>hope</td><td>N + N</td><td>enjoy</td><td>NP + S/N</td></tr><tr><td>Sem</td><td>hope_n_1</td><td>compound ARG1 ARG2 N N</td><td>-enjoy_v_1</td><td>S/N ARG2 NP</td></tr><tr><td>LHS</td><td>Vmod</td><td>Nmod</td><td>V/Nmod</td><td>VPmod</td></tr><tr><td>Syn</td><td>hope</td><td>I</td><td>enjoy</td><td>V + S</td></tr><tr><td>Sem</td><td>hope_v_1</td><td>pronoun_q BV pron</td><td>ellipsis_ref</td><td>V ARG2 S</td></tr></table>",
|
| 1548 |
+
"bbox": [
|
| 1549 |
+
119,
|
| 1550 |
+
80,
|
| 1551 |
+
489,
|
| 1552 |
+
247
|
| 1553 |
+
],
|
| 1554 |
+
"page_idx": 8
|
| 1555 |
+
},
|
| 1556 |
+
{
|
| 1557 |
+
"type": "image",
|
| 1558 |
+
"img_path": "images/045613ebdec580b78a597fde88949e4d938d53c4acf0d4f4604ad463160af875.jpg",
|
| 1559 |
+
"image_caption": [
|
| 1560 |
+
"(a) Modified Syn"
|
| 1561 |
+
],
|
| 1562 |
+
"image_footnote": [],
|
| 1563 |
+
"bbox": [
|
| 1564 |
+
152,
|
| 1565 |
+
285,
|
| 1566 |
+
287,
|
| 1567 |
+
379
|
| 1568 |
+
],
|
| 1569 |
+
"page_idx": 8
|
| 1570 |
+
},
|
| 1571 |
+
{
|
| 1572 |
+
"type": "image",
|
| 1573 |
+
"img_path": "images/500827fad528ad6797439a55afeb570aabbe567c83b4aece6db8d15d9b103b0b.jpg",
|
| 1574 |
+
"image_caption": [
|
| 1575 |
+
"(b) Modified Sem",
|
| 1576 |
+
"Figure 13: Relevant parts of modified syntactic trees and semantic graphs for Sentence 4."
|
| 1577 |
+
],
|
| 1578 |
+
"image_footnote": [],
|
| 1579 |
+
"bbox": [
|
| 1580 |
+
302,
|
| 1581 |
+
288,
|
| 1582 |
+
473,
|
| 1583 |
+
381
|
| 1584 |
+
],
|
| 1585 |
+
"page_idx": 8
|
| 1586 |
+
},
|
| 1587 |
+
{
|
| 1588 |
+
"type": "text",
|
| 1589 |
+
"text": "sentences, leaving 2494 ones unanalyzed. We randomly select 100 sentences from them as an initial investigation. Although limited in scale, it is methodologically justified, as the annotation process for these unparsable sentences — requiring manual construction of syntactic trees followed by the selection of SHRG rules — is similar to that of the majority of rejected cases. Statistical analysis shows that $81.2\\%$ (665 graphs) of the rejected instances involve reconstruction of syntactic trees.",
|
| 1590 |
+
"bbox": [
|
| 1591 |
+
112,
|
| 1592 |
+
468,
|
| 1593 |
+
487,
|
| 1594 |
+
629
|
| 1595 |
+
],
|
| 1596 |
+
"page_idx": 8
|
| 1597 |
+
},
|
| 1598 |
+
{
|
| 1599 |
+
"type": "text",
|
| 1600 |
+
"text": "Process The annotation process consists of two phases. In the first one, an annotator constructs semantic graphs by selecting SHRG rules, while the other reviews these graphs to assess their acceptability. In the second phase, both annotators independently annotate the remaining 50 sentences.",
|
| 1601 |
+
"bbox": [
|
| 1602 |
+
112,
|
| 1603 |
+
638,
|
| 1604 |
+
487,
|
| 1605 |
+
734
|
| 1606 |
+
],
|
| 1607 |
+
"page_idx": 8
|
| 1608 |
+
},
|
| 1609 |
+
{
|
| 1610 |
+
"type": "text",
|
| 1611 |
+
"text": "Result The annotation results from both phases are shown in Table 8. For the first 50 sentences, we calculate the proportion of accepted graphs to assess the level of agreement between the two annotators. In the second phase, we calculate the average S-match score for the 50 independently annotated graphs as a element-wise measure of consistency.",
|
| 1612 |
+
"bbox": [
|
| 1613 |
+
112,
|
| 1614 |
+
744,
|
| 1615 |
+
487,
|
| 1616 |
+
857
|
| 1617 |
+
],
|
| 1618 |
+
"page_idx": 8
|
| 1619 |
+
},
|
| 1620 |
+
{
|
| 1621 |
+
"type": "text",
|
| 1622 |
+
"text": "3.4 Summary",
|
| 1623 |
+
"text_level": 1,
|
| 1624 |
+
"bbox": [
|
| 1625 |
+
112,
|
| 1626 |
+
868,
|
| 1627 |
+
238,
|
| 1628 |
+
883
|
| 1629 |
+
],
|
| 1630 |
+
"page_idx": 8
|
| 1631 |
+
},
|
| 1632 |
+
{
|
| 1633 |
+
"type": "text",
|
| 1634 |
+
"text": "As Table 9 presents, following the three steps above, we develop an ESFL SemBank, which con",
|
| 1635 |
+
"bbox": [
|
| 1636 |
+
112,
|
| 1637 |
+
889,
|
| 1638 |
+
487,
|
| 1639 |
+
920
|
| 1640 |
+
],
|
| 1641 |
+
"page_idx": 8
|
| 1642 |
+
},
|
| 1643 |
+
{
|
| 1644 |
+
"type": "table",
|
| 1645 |
+
"img_path": "images/06fd70ec5f785fb4abe4e1f22a705d34f476ebb0e639070020ff9b00f459ff9d.jpg",
|
| 1646 |
+
"table_caption": [
|
| 1647 |
+
"Table 7: Original and modified rules for example 4."
|
| 1648 |
+
],
|
| 1649 |
+
"table_footnote": [],
|
| 1650 |
+
"table_body": "<table><tr><td></td><td>First Phase</td><td>Second Phase</td></tr><tr><td>Consistency Score</td><td>94%</td><td>90.93</td></tr></table>",
|
| 1651 |
+
"bbox": [
|
| 1652 |
+
526,
|
| 1653 |
+
80,
|
| 1654 |
+
870,
|
| 1655 |
+
127
|
| 1656 |
+
],
|
| 1657 |
+
"page_idx": 8
|
| 1658 |
+
},
|
| 1659 |
+
{
|
| 1660 |
+
"type": "text",
|
| 1661 |
+
"text": "tains manually annotated syntactico-semantic representations of 1643 ESFL sentences.",
|
| 1662 |
+
"bbox": [
|
| 1663 |
+
507,
|
| 1664 |
+
181,
|
| 1665 |
+
882,
|
| 1666 |
+
212
|
| 1667 |
+
],
|
| 1668 |
+
"page_idx": 8
|
| 1669 |
+
},
|
| 1670 |
+
{
|
| 1671 |
+
"type": "table",
|
| 1672 |
+
"img_path": "images/1aaab7f4b544713393efb20a4962e2e7f0e4ab2186fafd2abd6625d5e2da3c20.jpg",
|
| 1673 |
+
"table_caption": [
|
| 1674 |
+
"Table 8: Consistency scores in selecting rules."
|
| 1675 |
+
],
|
| 1676 |
+
"table_footnote": [],
|
| 1677 |
+
"table_body": "<table><tr><td>Step</td><td>Manner</td><td>Number</td></tr><tr><td>1</td><td>Manually Accepted</td><td>724</td></tr><tr><td>2</td><td>Manually Modified</td><td>819</td></tr><tr><td>3</td><td>Manually Composed</td><td>100</td></tr><tr><td></td><td></td><td>Overall: 1643</td></tr></table>",
|
| 1678 |
+
"bbox": [
|
| 1679 |
+
539,
|
| 1680 |
+
225,
|
| 1681 |
+
857,
|
| 1682 |
+
321
|
| 1683 |
+
],
|
| 1684 |
+
"page_idx": 8
|
| 1685 |
+
},
|
| 1686 |
+
{
|
| 1687 |
+
"type": "text",
|
| 1688 |
+
"text": "Table 9: Development of ESFL SemBank at each step.",
|
| 1689 |
+
"bbox": [
|
| 1690 |
+
507,
|
| 1691 |
+
330,
|
| 1692 |
+
878,
|
| 1693 |
+
344
|
| 1694 |
+
],
|
| 1695 |
+
"page_idx": 8
|
| 1696 |
+
},
|
| 1697 |
+
{
|
| 1698 |
+
"type": "text",
|
| 1699 |
+
"text": "4 Conclusion",
|
| 1700 |
+
"text_level": 1,
|
| 1701 |
+
"bbox": [
|
| 1702 |
+
507,
|
| 1703 |
+
387,
|
| 1704 |
+
640,
|
| 1705 |
+
401
|
| 1706 |
+
],
|
| 1707 |
+
"page_idx": 8
|
| 1708 |
+
},
|
| 1709 |
+
{
|
| 1710 |
+
"type": "text",
|
| 1711 |
+
"text": "Compositionality is not only a key notion of theoretical linguistics, as linguistics concerns itself with understanding the human language capacity, but also an emerging crucial topic in cognitive science and artificial intelligence (Frankland and Greene, 2020; Hampton and Winter, 2017; Hupkes et al., 2020) given the defining role played by compositionality in distinguishing human language from animal communication systems. However, the \"erroneous\" tokens and grammars frequently observed in non-native language varieties, particularly ESFL, present significant challenges to systematic semantic derivation and seemingly undermine the principle of compositionality.",
|
| 1712 |
+
"bbox": [
|
| 1713 |
+
505,
|
| 1714 |
+
418,
|
| 1715 |
+
882,
|
| 1716 |
+
643
|
| 1717 |
+
],
|
| 1718 |
+
"page_idx": 8
|
| 1719 |
+
},
|
| 1720 |
+
{
|
| 1721 |
+
"type": "text",
|
| 1722 |
+
"text": "This paper addresses the issue by integrating insights from constructivist theories and validating this approach through computational modeling. Our findings show that, despite surface-level syntactic imperfections, compositionality operates similarly in the underlying mechanisms of both ESFL and native English. We also present a more accurate, consistent, and comprehensive syntactic-semantic bank, containing robust and syntactically informed annotations for 1643 ESFL sentences.",
|
| 1723 |
+
"bbox": [
|
| 1724 |
+
505,
|
| 1725 |
+
645,
|
| 1726 |
+
882,
|
| 1727 |
+
804
|
| 1728 |
+
],
|
| 1729 |
+
"page_idx": 8
|
| 1730 |
+
},
|
| 1731 |
+
{
|
| 1732 |
+
"type": "text",
|
| 1733 |
+
"text": "Given the global prevalence of ESFL, we believe our contributions, including the proposed framework and the SemBank, are of substantial importance. By providing a rich empirical foundation, they could address long-standing questions and open new avenues for both theoretical and computational linguistics, as well as other fields beyond.",
|
| 1734 |
+
"bbox": [
|
| 1735 |
+
507,
|
| 1736 |
+
808,
|
| 1737 |
+
882,
|
| 1738 |
+
921
|
| 1739 |
+
],
|
| 1740 |
+
"page_idx": 8
|
| 1741 |
+
},
|
| 1742 |
+
{
|
| 1743 |
+
"type": "page_number",
|
| 1744 |
+
"text": "24403",
|
| 1745 |
+
"bbox": [
|
| 1746 |
+
475,
|
| 1747 |
+
927,
|
| 1748 |
+
524,
|
| 1749 |
+
940
|
| 1750 |
+
],
|
| 1751 |
+
"page_idx": 8
|
| 1752 |
+
},
|
| 1753 |
+
{
|
| 1754 |
+
"type": "text",
|
| 1755 |
+
"text": "Limitations",
|
| 1756 |
+
"text_level": 1,
|
| 1757 |
+
"bbox": [
|
| 1758 |
+
114,
|
| 1759 |
+
84,
|
| 1760 |
+
220,
|
| 1761 |
+
99
|
| 1762 |
+
],
|
| 1763 |
+
"page_idx": 9
|
| 1764 |
+
},
|
| 1765 |
+
{
|
| 1766 |
+
"type": "text",
|
| 1767 |
+
"text": "While the syntactico-semantic bank for ESFL has been developed, the scalability of manual annotation through automatic or semi-automatic methods remains an open question that requires further investigation. Future work could focus on the semantic parsing for ESFL to further enhance the generalizability of the proposed framework.",
|
| 1768 |
+
"bbox": [
|
| 1769 |
+
112,
|
| 1770 |
+
110,
|
| 1771 |
+
489,
|
| 1772 |
+
223
|
| 1773 |
+
],
|
| 1774 |
+
"page_idx": 9
|
| 1775 |
+
},
|
| 1776 |
+
{
|
| 1777 |
+
"type": "text",
|
| 1778 |
+
"text": "Acknowledgments",
|
| 1779 |
+
"text_level": 1,
|
| 1780 |
+
"bbox": [
|
| 1781 |
+
114,
|
| 1782 |
+
237,
|
| 1783 |
+
278,
|
| 1784 |
+
253
|
| 1785 |
+
],
|
| 1786 |
+
"page_idx": 9
|
| 1787 |
+
},
|
| 1788 |
+
{
|
| 1789 |
+
"type": "text",
|
| 1790 |
+
"text": "We express our gratitude for the assistance and support rendered by annotators Yutong Zhang, Yixuan Wang, and Huangyang Xiao. Additionally, our heartfelt thanks go to all the reviewers and editors for their contributions.",
|
| 1791 |
+
"bbox": [
|
| 1792 |
+
112,
|
| 1793 |
+
263,
|
| 1794 |
+
489,
|
| 1795 |
+
343
|
| 1796 |
+
],
|
| 1797 |
+
"page_idx": 9
|
| 1798 |
+
},
|
| 1799 |
+
{
|
| 1800 |
+
"type": "text",
|
| 1801 |
+
"text": "References",
|
| 1802 |
+
"text_level": 1,
|
| 1803 |
+
"bbox": [
|
| 1804 |
+
114,
|
| 1805 |
+
373,
|
| 1806 |
+
213,
|
| 1807 |
+
388
|
| 1808 |
+
],
|
| 1809 |
+
"page_idx": 9
|
| 1810 |
+
},
|
| 1811 |
+
{
|
| 1812 |
+
"type": "list",
|
| 1813 |
+
"sub_type": "ref_text",
|
| 1814 |
+
"list_items": [
|
| 1815 |
+
"Christian Adjemian. 1976. On the nature of interlanguage systems. Language learning, 26(2):297-320.",
|
| 1816 |
+
"Gustavo Aguilar and Thamar Solorio. 2020. From English to code-switching: Transfer learning with strong morphological clues. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8033-8044, Online. Association for Computational Linguistics.",
|
| 1817 |
+
"Elizabeth Bates and Brian MacWhinney. 1987. Competition, variation, and language learning. In Elizabeth Bates, editor, Mechanisms of language acquisition, pages 157-193. Erlbaum, Hillsdale, NJ.",
|
| 1818 |
+
"Yevgeni Berzak, Jessica Kenney, Carolyn Spadine, Jing Xian Wang, Lucia Lam, Keiko Sophie Mori, Sebastian Garza, and Boris Katz. 2016. Universal Dependencies for learner English. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 737-746, Berlin, Germany. Association for Computational Linguistics.",
|
| 1819 |
+
"Douglas Biber and Randi Reppen. 2015. The Cambridge handbook of English corpus linguistics. Cambridge University Press.",
|
| 1820 |
+
"Christopher Bryant, Zheng Yuan, Muhammad Reza Qorib, Hannan Cao, Hwee Tou Ng, and Ted Briscoe. 2023. Grammatical error correction: A survey of the state of the art. Computational Linguistics, pages 643-701.",
|
| 1821 |
+
"Yufei Chen and Weiwei Sun. 2020. Parsing into variable-in-situ logico-semantic graphs. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6772-6782, Online. Association for Computational Linguistics."
|
| 1822 |
+
],
|
| 1823 |
+
"bbox": [
|
| 1824 |
+
115,
|
| 1825 |
+
397,
|
| 1826 |
+
487,
|
| 1827 |
+
920
|
| 1828 |
+
],
|
| 1829 |
+
"page_idx": 9
|
| 1830 |
+
},
|
| 1831 |
+
{
|
| 1832 |
+
"type": "list",
|
| 1833 |
+
"sub_type": "ref_text",
|
| 1834 |
+
"list_items": [
|
| 1835 |
+
"Yufei Chen, Weiwei Sun, and Xiaojun Wan. 2018. Accurate SHRG-based semantic parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 408-418, Melbourne, Australia. Association for Computational Linguistics.",
|
| 1836 |
+
"Noam Chomsky. 1981. Lectures on Government and Binding: The Pisa Lectures. Mouton de Gruyter.",
|
| 1837 |
+
"Noam Chomsky. 1986. Knowledge of Language: Its Nature, Origin, and Use. Prager.",
|
| 1838 |
+
"Harald Clahsen and Claudia Felser. 2006. How native-like is non-native language processing? Trends in cognitive sciences, 10(12):564-570.",
|
| 1839 |
+
"William Croft. 2001. Radical construction grammar: Syntactic theory in typological perspective. Oxford University Press.",
|
| 1840 |
+
"William Croft and D. Alan Cruse. 2004. Cognitive linguistics. Cambridge Textbooks in Linguistics. Cambridge University Press.",
|
| 1841 |
+
"David M. Eberhard, Gary F. Simons, and Charles D. Fennig, editors. 2024. Ethnologue: Languages of the World, twenty-seventh edition. SIL International, Dallas, Texas. Online version: http://www.ethnologue.com.",
|
| 1842 |
+
"Dan Flickinger. 2000. On building a more efficient grammar by exploiting types. _Natural Language Engineering_, 6(1):15-28.",
|
| 1843 |
+
"Dan Flickinger, Emily M. Bender, and Stephan Oepen. 2014a. Towards an encyclopedia of compositional semantics: Documenting the interface of the English Resource Grammar. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC-2014), pages 875–881. European Language Resources Association (ELRA).",
|
| 1844 |
+
"Dan Flickinger, Emily M. Bender, and Stephan Oepen. 2014b. Towards an encyclopedia of compositional semantics: Documenting the interface of the English Resource Grammar. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC'14), pages 875-881, Reykjavik, Iceland. European Language Resources Association (ELRA).",
|
| 1845 |
+
"Dan Flickinger, Yi Zhang, and Valia Kordoni. 2012. Deepbank: A dynamically annotated treebank of the wall street journal. In Proceedings of the 11th International Workshop on Treebanks and Linguistic Theories, pages 85-96.",
|
| 1846 |
+
"Steven M Frankland and Joshua D Greene. 2020. Concepts and compositionality: in search of the brain's language of thought. Annual review of psychology, 71(1):273-303.",
|
| 1847 |
+
"Jeroen Geertzen, Theodora Alexopoulou, Anna Korhonen, et al. 2013. Automatic linguistic annotation of"
|
| 1848 |
+
],
|
| 1849 |
+
"bbox": [
|
| 1850 |
+
510,
|
| 1851 |
+
85,
|
| 1852 |
+
884,
|
| 1853 |
+
920
|
| 1854 |
+
],
|
| 1855 |
+
"page_idx": 9
|
| 1856 |
+
},
|
| 1857 |
+
{
|
| 1858 |
+
"type": "page_number",
|
| 1859 |
+
"text": "24404",
|
| 1860 |
+
"bbox": [
|
| 1861 |
+
475,
|
| 1862 |
+
927,
|
| 1863 |
+
524,
|
| 1864 |
+
940
|
| 1865 |
+
],
|
| 1866 |
+
"page_idx": 9
|
| 1867 |
+
},
|
| 1868 |
+
{
|
| 1869 |
+
"type": "list",
|
| 1870 |
+
"sub_type": "ref_text",
|
| 1871 |
+
"list_items": [
|
| 1872 |
+
"large scale 12 databases: The ef-cambridge open language database (efcamdat). In Proceedings of the 31st Second Language Research Forum. Somerville, MA: Cascadilla Proceedings Project, pages 240-254.",
|
| 1873 |
+
"Adele E Goldberg. 1995. *Constructions: A construction grammar approach to argument structure*. Chicago UP.",
|
| 1874 |
+
"Adele E Goldberg. 2003. *Constructions: A new theoretical approach to language.* Trends in cognitive sciences, 7(5):219-224.",
|
| 1875 |
+
"Adele E Goldberg. 2013. Argument structure constructions versus lexical rules or derivational verb templates. Mind & Language, 28(4):435-465.",
|
| 1876 |
+
"Sylviane Granger. 2003. The international corpus of learner english: a new resource for foreign language learning and teaching and second language acquisition research. Tesol Quarterly, 37(3):538-546.",
|
| 1877 |
+
"Sylviane Granger. 2014. Learner English on computer. Routledge.",
|
| 1878 |
+
"James A Hampton and Yoad Winter. 2017. Compositionality and concepts in linguistics and psychology. Springer Nature.",
|
| 1879 |
+
"Thomas Hoffmann and Graeme Trousdale. 2013. The Oxford handbook of construction grammar. Oxford University Press.",
|
| 1880 |
+
"Dieuwke Hupkes, Verna Dankers, Mathijs Mul, and Elia Bruni. 2020. Compositionality decomposed: How do neural networks generalise? Journal of Artificial Intelligence Research, 67:757-795.",
|
| 1881 |
+
"Ray Jackendoff. 2000. The representational structures of the language faculty and their interactions. In *The Neurocognition of Language*. Oxford University Press.",
|
| 1882 |
+
"Ray Jackendoff. 2002. Foundations of Language: Brain, Meaning, Grammar, Evolution. Oxford University Press.",
|
| 1883 |
+
"Simran Khanuja, Sandipan Dandapat, Anirudh Srinivasan, Sunayana Sitaram, and Monojit Choudhury. 2020. GLUECoS: An evaluation benchmark for code-switched NLP. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3575-3585, Online. Association for Computational Linguistics.",
|
| 1884 |
+
"Ingrid Kurz. 2008. The impact of non-native english on students' interpreting performance. In Efforts and models in interpreting and translation research: A tribute to Daniel Gile, pages 179-192. Benjamins Publishing.",
|
| 1885 |
+
"Ronald W Langacker. 1987. Nouns and verbs. Language, pages 53-94.",
|
| 1886 |
+
"Brian MacWhinney. 2000. The CHILDES project: The database, volume 2. Psychology Press."
|
| 1887 |
+
],
|
| 1888 |
+
"bbox": [
|
| 1889 |
+
115,
|
| 1890 |
+
85,
|
| 1891 |
+
489,
|
| 1892 |
+
920
|
| 1893 |
+
],
|
| 1894 |
+
"page_idx": 10
|
| 1895 |
+
},
|
| 1896 |
+
{
|
| 1897 |
+
"type": "list",
|
| 1898 |
+
"sub_type": "ref_text",
|
| 1899 |
+
"list_items": [
|
| 1900 |
+
"Marie-Catherine de Marneffe, Timothy Dozat, Natalia Silveira, Katri Haverinen, Filip Ginter, Joakim Nivre, and Christopher D. Manning. 2014. Universal Stanford dependencies: A cross-linguistic typology. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC'14), pages 4585-4592, Reykjavik, Iceland. European Language Resources Association (ELRA).",
|
| 1901 |
+
"Joakim Nivre, Marie-Catherine de Marneffe, Filip Ginter, Yoav Goldberg, Jan Hajic, Christopher D. Manning, Ryan McDonald, Slav Petrov, Sampo Pyysalo, Natalia Silveira, Reut Tsarfaty, and Daniel Zeman. 2016. Universal Dependencies v1: A multilingual treebank collection. In Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16), pages 1659-1666, Porto Roz, Slovenia. European Language Resources Association (ELRA).",
|
| 1902 |
+
"Barbara Partee. 1984. Compositionality. In Varieties of Formal Semantics: Proceedings of the 4th Amsterdam Colloquium, volume 3, pages 281-311. Foris Dordrecht.",
|
| 1903 |
+
"Carl Pollard and Ivan A Sag. 1994. Head-driven phrase structure grammar. University of Chicago Press.",
|
| 1904 |
+
"Peter Robinson and Nick C Ellis. 2008. Handbook of cognitive linguistics and second language acquisition. Routledge, London.",
|
| 1905 |
+
"Kenji Sagae, Eric Davis, Alon Lavie, Brian MacWhinney, and Shuly Wintner. 2007. High-accuracy annotation and parsing of CHILDES transcripts. In Proceedings of the Workshop on Cognitive Aspects of Computational Language Acquisition, pages 25-32, Prague, Czech Republic. Association for Computational Linguistics.",
|
| 1906 |
+
"Mark Steedman. 1987. Combinatory grammars and parasitic gaps. Natural Language & Linguistic Theory, 5(3):403-439.",
|
| 1907 |
+
"Mark Steedman. 2000. The Syntactic Process. MIT Press, Cambridge, MA.",
|
| 1908 |
+
"Michael Tomasello. 2003. Constructing a Language: A Usage-Based Theory of Language Acquisition. Harvard University Press.",
|
| 1909 |
+
"Helen Yannakoudakis, Ted Briscoe, and Ben Medlock. 2011. A new dataset and method for automatically grading ESOL texts. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 180-189, Portland, Oregon, USA. Association for Computational Linguistics.",
|
| 1910 |
+
"Yajie Ye and Weiwei Sun. 2020. Exact yet efficient graph parsing, bi-directional locality and the constructivist hypothesis. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4100-4110, Online. Association for Computational Linguistics."
|
| 1911 |
+
],
|
| 1912 |
+
"bbox": [
|
| 1913 |
+
510,
|
| 1914 |
+
85,
|
| 1915 |
+
880,
|
| 1916 |
+
920
|
| 1917 |
+
],
|
| 1918 |
+
"page_idx": 10
|
| 1919 |
+
},
|
| 1920 |
+
{
|
| 1921 |
+
"type": "page_number",
|
| 1922 |
+
"text": "24405",
|
| 1923 |
+
"bbox": [
|
| 1924 |
+
475,
|
| 1925 |
+
928,
|
| 1926 |
+
524,
|
| 1927 |
+
940
|
| 1928 |
+
],
|
| 1929 |
+
"page_idx": 10
|
| 1930 |
+
},
|
| 1931 |
+
{
|
| 1932 |
+
"type": "list",
|
| 1933 |
+
"sub_type": "ref_text",
|
| 1934 |
+
"list_items": [
|
| 1935 |
+
"Wenxuan Zhang, Ruidan He, Haiyun Peng, Li-dong Bing, and Wai Lam. 2021. Cross-lingual aspect-based sentiment analysis with aspect term code-switching. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9220-9230, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.",
|
| 1936 |
+
"Yuanyuan Zhao, Weiwei Sun, Junjie Cao, and Xiaojun Wan. 2020. Semantic parsing for English as a second language. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6783-6794, Online. Association for Computational Linguistics."
|
| 1937 |
+
],
|
| 1938 |
+
"bbox": [
|
| 1939 |
+
115,
|
| 1940 |
+
85,
|
| 1941 |
+
489,
|
| 1942 |
+
279
|
| 1943 |
+
],
|
| 1944 |
+
"page_idx": 11
|
| 1945 |
+
},
|
| 1946 |
+
{
|
| 1947 |
+
"type": "page_number",
|
| 1948 |
+
"text": "24406",
|
| 1949 |
+
"bbox": [
|
| 1950 |
+
475,
|
| 1951 |
+
928,
|
| 1952 |
+
524,
|
| 1953 |
+
940
|
| 1954 |
+
],
|
| 1955 |
+
"page_idx": 11
|
| 1956 |
+
}
|
| 1957 |
+
]
|